!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){/*!
  * Bowser - a browser detector
  * https://github.com/ded/bowser
  * MIT License | (c) Dustin Diaz 2015
  */
!function(a,c){"undefined"!=typeof b&&b.exports?b.exports=c():"function"==typeof define&&define.amd?define(c):this[a]=c()}("bowser",function(){function a(a){function c(b){var c=a.match(b);return c&&c.length>1&&c[1]||""}function d(b){var c=a.match(b);return c&&c.length>1&&c[2]||""}var e,f=c(/(ipod|iphone|ipad)/i).toLowerCase(),g=/like android/i.test(a),h=!g&&/android/i.test(a),i=/CrOS/.test(a),j=c(/edge\/(\d+(\.\d+)?)/i),k=c(/version\/(\d+(\.\d+)?)/i),l=/tablet/i.test(a),m=!l&&/[^-]mobi/i.test(a);/opera|opr/i.test(a)?e={name:"Opera",opera:b,version:k||c(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(a)?e={name:"Yandex Browser",yandexbrowser:b,version:k||c(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(a)?(e={name:"Windows Phone",windowsphone:b},j?(e.msedge=b,e.version=j):(e.msie=b,e.version=c(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(a)?e={name:"Internet Explorer",msie:b,version:c(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:i?e={name:"Chrome",chromeBook:b,chrome:b,version:c(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(a)?e={name:"Microsoft Edge",msedge:b,version:j}:/chrome|crios|crmo/i.test(a)?e={name:"Chrome",chrome:b,version:c(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:f?(e={name:"iphone"==f?"iPhone":"ipad"==f?"iPad":"iPod"},k&&(e.version=k)):/sailfish/i.test(a)?e={name:"Sailfish",sailfish:b,version:c(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(a)?e={name:"SeaMonkey",seamonkey:b,version:c(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(a)?(e={name:"Firefox",firefox:b,version:c(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(a)&&(e.firefoxos=b)):/silk/i.test(a)?e={name:"Amazon Silk",silk:b,version:c(/silk\/(\d+(\.\d+)?)/i)}:h?e={name:"Android",version:k}:/phantom/i.test(a)?e={name:"PhantomJS",phantom:b,version:c(/phantomjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(a)||/rim\stablet/i.test(a)?e={name:"BlackBerry",blackberry:b,version:k||c(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(a)?(e={name:"WebOS",webos:b,version:k||c(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(a)&&(e.touchpad=b)):e=/bada/i.test(a)?{name:"Bada",bada:b,version:c(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(a)?{name:"Tizen",tizen:b,version:c(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||k}:/safari/i.test(a)?{name:"Safari",safari:b,version:k}:{name:c(/^(.*)\/(.*) /),version:d(/^(.*)\/(.*) /)},!e.msedge&&/(apple)?webkit/i.test(a)?(e.name=e.name||"Webkit",e.webkit=b,!e.version&&k&&(e.version=k)):!e.opera&&/gecko\//i.test(a)&&(e.name=e.name||"Gecko",e.gecko=b,e.version=e.version||c(/gecko\/(\d+(\.\d+)?)/i)),e.msedge||!h&&!e.silk?f&&(e[f]=b,e.ios=b):e.android=b;var n="";e.windowsphone?n=c(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):f?(n=c(/os (\d+([_\s]\d+)*) like mac os x/i),n=n.replace(/[_\s]/g,".")):h?n=c(/android[ \/-](\d+(\.\d+)*)/i):e.webos?n=c(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):e.blackberry?n=c(/rim\stablet\sos\s(\d+(\.\d+)*)/i):e.bada?n=c(/bada\/(\d+(\.\d+)*)/i):e.tizen&&(n=c(/tizen[\/\s](\d+(\.\d+)*)/i)),n&&(e.osversion=n);var o=n.split(".")[0];return l||"ipad"==f||h&&(3==o||4==o&&!m)||e.silk?e.tablet=b:(m||"iphone"==f||"ipod"==f||h||e.blackberry||e.webos||e.bada)&&(e.mobile=b),e.msedge||e.msie&&e.version>=10||e.yandexbrowser&&e.version>=15||e.chrome&&e.version>=20||e.firefox&&e.version>=20||e.safari&&e.version>=6||e.opera&&e.version>=10||e.ios&&e.osversion&&e.osversion.split(".")[0]>=6||e.blackberry&&e.version>=10.1?e.a=b:e.msie&&e.version<10||e.chrome&&e.version<20||e.firefox&&e.version<20||e.safari&&e.version<6||e.opera&&e.version<10||e.ios&&e.osversion&&e.osversion.split(".")[0]<6?e.c=b:e.x=b,e}var b=!0,c=a("undefined"!=typeof navigator?navigator.userAgent:"");return c.test=function(a){for(var b=0;b<a.length;++b){var d=a[b];if("string"==typeof d&&d in c)return!0}return!1},c._detect=a,c})},{}],2:[function(a,b,c){},{}],3:[function(a,b,c){(function(b){/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
"use strict";function d(){try{var a=new Uint8Array(1);return a.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===a.foo()&&"function"==typeof a.subarray&&0===a.subarray(1,1).byteLength}catch(b){return!1}}function e(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(a,b){if(e()<b)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(a=new Uint8Array(b),a.__proto__=g.prototype):(null===a&&(a=new g(b)),a.length=b),a}function g(a,b,c){if(!(g.TYPED_ARRAY_SUPPORT||this instanceof g))return new g(a,b,c);if("number"==typeof a){if("string"==typeof b)throw new Error("If encoding is specified then the first argument must be a string");return k(this,a)}return h(this,a,b,c)}function h(a,b,c,d){if("number"==typeof b)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&b instanceof ArrayBuffer?n(a,b,c,d):"string"==typeof b?l(a,b,c):o(a,b)}function i(a){if("number"!=typeof a)throw new TypeError('"size" argument must be a number');if(a<0)throw new RangeError('"size" argument must not be negative')}function j(a,b,c,d){return i(b),b<=0?f(a,b):void 0!==c?"string"==typeof d?f(a,b).fill(c,d):f(a,b).fill(c):f(a,b)}function k(a,b){if(i(b),a=f(a,b<0?0:0|p(b)),!g.TYPED_ARRAY_SUPPORT)for(var c=0;c<b;++c)a[c]=0;return a}function l(a,b,c){if("string"==typeof c&&""!==c||(c="utf8"),!g.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding');var d=0|r(b,c);a=f(a,d);var e=a.write(b,c);return e!==d&&(a=a.slice(0,e)),a}function m(a,b){var c=b.length<0?0:0|p(b.length);a=f(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function n(a,b,c,d){if(b.byteLength,c<0||b.byteLength<c)throw new RangeError("'offset' is out of bounds");if(b.byteLength<c+(d||0))throw new RangeError("'length' is out of bounds");return b=void 0===c&&void 0===d?new Uint8Array(b):void 0===d?new Uint8Array(b,c):new Uint8Array(b,c,d),g.TYPED_ARRAY_SUPPORT?(a=b,a.__proto__=g.prototype):a=m(a,b),a}function o(a,b){if(g.isBuffer(b)){var c=0|p(b.length);return a=f(a,c),0===a.length?a:(b.copy(a,0,0,c),a)}if(b){if("undefined"!=typeof ArrayBuffer&&b.buffer instanceof ArrayBuffer||"length"in b)return"number"!=typeof b.length||Y(b.length)?f(a,0):m(a,b);if("Buffer"===b.type&&_(b.data))return m(a,b.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(a){if(a>=e())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e().toString(16)+" bytes");return 0|a}function q(a){return+a!=a&&(a=0),g.alloc(+a)}function r(a,b){if(g.isBuffer(a))return a.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(a)||a instanceof ArrayBuffer))return a.byteLength;"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":case void 0:return T(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return W(a).length;default:if(d)return T(a).length;b=(""+b).toLowerCase(),d=!0}}function s(a,b,c){var d=!1;if((void 0===b||b<0)&&(b=0),b>this.length)return"";if((void 0===c||c>this.length)&&(c=this.length),c<=0)return"";if(c>>>=0,b>>>=0,c<=b)return"";for(a||(a="utf8");;)switch(a){case"hex":return H(this,b,c);case"utf8":case"utf-8":return D(this,b,c);case"ascii":return F(this,b,c);case"latin1":case"binary":return G(this,b,c);case"base64":return C(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function t(a,b,c){var d=a[b];a[b]=a[c],a[c]=d}function u(a,b,c,d,e){if(0===a.length)return-1;if("string"==typeof c?(d=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,isNaN(c)&&(c=e?0:a.length-1),c<0&&(c=a.length+c),c>=a.length){if(e)return-1;c=a.length-1}else if(c<0){if(!e)return-1;c=0}if("string"==typeof b&&(b=g.from(b,d)),g.isBuffer(b))return 0===b.length?-1:v(a,b,c,d,e);if("number"==typeof b)return b=255&b,g.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?e?Uint8Array.prototype.indexOf.call(a,b,c):Uint8Array.prototype.lastIndexOf.call(a,b,c):v(a,[b],c,d,e);throw new TypeError("val must be string, number or Buffer")}function v(a,b,c,d,e){function f(a,b){return 1===g?a[b]:a.readUInt16BE(b*g)}var g=1,h=a.length,i=b.length;if(void 0!==d&&(d=String(d).toLowerCase(),"ucs2"===d||"ucs-2"===d||"utf16le"===d||"utf-16le"===d)){if(a.length<2||b.length<2)return-1;g=2,h/=2,i/=2,c/=2}var j;if(e){var k=-1;for(j=c;j<h;j++)if(f(a,j)===f(b,k===-1?0:j-k)){if(k===-1&&(k=j),j-k+1===i)return k*g}else k!==-1&&(j-=j-k),k=-1}else for(c+i>h&&(c=h-i),j=c;j>=0;j--){for(var l=!0,m=0;m<i;m++)if(f(a,j+m)!==f(b,m)){l=!1;break}if(l)return j}return-1}function w(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new TypeError("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;g<d;++g){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))return g;a[c+g]=h}return g}function x(a,b,c,d){return X(T(b,a.length-c),a,c,d)}function y(a,b,c,d){return X(U(b),a,c,d)}function z(a,b,c,d){return y(a,b,c,d)}function A(a,b,c,d){return X(W(b),a,c,d)}function B(a,b,c,d){return X(V(b,a.length-c),a,c,d)}function C(a,b,c){return 0===b&&c===a.length?Z.fromByteArray(a):Z.fromByteArray(a.slice(b,c))}function D(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;e<c;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(e+h<=c){var i,j,k,l;switch(h){case 1:f<128&&(g=f);break;case 2:i=a[e+1],128===(192&i)&&(l=(31&f)<<6|63&i,l>127&&(g=l));break;case 3:i=a[e+1],j=a[e+2],128===(192&i)&&128===(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j,l>2047&&(l<55296||l>57343)&&(g=l));break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128===(192&i)&&128===(192&j)&&128===(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k,l>65535&&l<1114112&&(g=l))}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return E(d)}function E(a){var b=a.length;if(b<=aa)return String.fromCharCode.apply(String,a);for(var c="",d=0;d<b;)c+=String.fromCharCode.apply(String,a.slice(d,d+=aa));return c}function F(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;e<c;++e)d+=String.fromCharCode(127&a[e]);return d}function G(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;e<c;++e)d+=String.fromCharCode(a[e]);return d}function H(a,b,c){var d=a.length;(!b||b<0)&&(b=0),(!c||c<0||c>d)&&(c=d);for(var e="",f=b;f<c;++f)e+=S(a[f]);return e}function I(a,b,c){for(var d=a.slice(b,c),e="",f=0;f<d.length;f+=2)e+=String.fromCharCode(d[f]+256*d[f+1]);return e}function J(a,b,c){if(a%1!==0||a<0)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function K(a,b,c,d,e,f){if(!g.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>e||b<f)throw new RangeError('"value" argument is out of bounds');if(c+d>a.length)throw new RangeError("Index out of range")}function L(a,b,c,d){b<0&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);e<f;++e)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function M(a,b,c,d){b<0&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);e<f;++e)a[c+e]=b>>>8*(d?e:3-e)&255}function N(a,b,c,d,e,f){if(c+d>a.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function O(a,b,c,d,e){return e||N(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(a,b,c,d,23,4),c+4}function P(a,b,c,d,e){return e||N(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(a,b,c,d,52,8),c+8}function Q(a){if(a=R(a).replace(ba,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function R(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function S(a){return a<16?"0"+a.toString(16):a.toString(16)}function T(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;g<d;++g){if(c=a.charCodeAt(g),c>55295&&c<57344){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(c<56320){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=(e-55296<<10|c-56320)+65536}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,c<128){if((b-=1)<0)break;f.push(c)}else if(c<2048){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(c<65536){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(c<1114112))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function U(a){for(var b=[],c=0;c<a.length;++c)b.push(255&a.charCodeAt(c));return b}function V(a,b){for(var c,d,e,f=[],g=0;g<a.length&&!((b-=2)<0);++g)c=a.charCodeAt(g),d=c>>8,e=c%256,f.push(e),f.push(d);return f}function W(a){return Z.toByteArray(Q(a))}function X(a,b,c,d){for(var e=0;e<d&&!(e+c>=b.length||e>=a.length);++e)b[e+c]=a[e];return e}function Y(a){return a!==a}var Z=a("base64-js"),$=a("ieee754"),_=a("isarray");c.Buffer=g,c.SlowBuffer=q,c.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=void 0!==b.TYPED_ARRAY_SUPPORT?b.TYPED_ARRAY_SUPPORT:d(),c.kMaxLength=e(),g.poolSize=8192,g._augment=function(a){return a.__proto__=g.prototype,a},g.from=function(a,b,c){return h(null,a,b,c)},g.TYPED_ARRAY_SUPPORT&&(g.prototype.__proto__=Uint8Array.prototype,g.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&g[Symbol.species]===g&&Object.defineProperty(g,Symbol.species,{value:null,configurable:!0})),g.alloc=function(a,b,c){return j(null,a,b,c)},g.allocUnsafe=function(a){return k(null,a)},g.allocUnsafeSlow=function(a){return k(null,a)},g.isBuffer=function(a){return!(null==a||!a._isBuffer)},g.compare=function(a,b){if(!g.isBuffer(a)||!g.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,e=0,f=Math.min(c,d);e<f;++e)if(a[e]!==b[e]){c=a[e],d=b[e];break}return c<d?-1:d<c?1:0},g.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},g.concat=function(a,b){if(!_(a))throw new TypeError('"list" argument must be an Array of Buffers');if(0===a.length)return g.alloc(0);var c;if(void 0===b)for(b=0,c=0;c<a.length;++c)b+=a[c].length;var d=g.allocUnsafe(b),e=0;for(c=0;c<a.length;++c){var f=a[c];if(!g.isBuffer(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(d,e),e+=f.length}return d},g.byteLength=r,g.prototype._isBuffer=!0,g.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var b=0;b<a;b+=2)t(this,b,b+1);return this},g.prototype.swap32=function(){var a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var b=0;b<a;b+=4)t(this,b,b+3),t(this,b+1,b+2);return this},g.prototype.swap64=function(){var a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var b=0;b<a;b+=8)t(this,b,b+7),t(this,b+1,b+6),t(this,b+2,b+5),t(this,b+3,b+4);return this},g.prototype.toString=function(){var a=0|this.length;return 0===a?"":0===arguments.length?D(this,0,a):s.apply(this,arguments)},g.prototype.equals=function(a){if(!g.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a||0===g.compare(this,a)},g.prototype.inspect=function(){var a="",b=c.INSPECT_MAX_BYTES;return this.length>0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),"<Buffer "+a+">"},g.prototype.compare=function(a,b,c,d,e){if(!g.isBuffer(a))throw new TypeError("Argument must be a Buffer");if(void 0===b&&(b=0),void 0===c&&(c=a?a.length:0),void 0===d&&(d=0),void 0===e&&(e=this.length),b<0||c>a.length||d<0||e>this.length)throw new RangeError("out of range index");if(d>=e&&b>=c)return 0;if(d>=e)return-1;if(b>=c)return 1;if(b>>>=0,c>>>=0,d>>>=0,e>>>=0,this===a)return 0;for(var f=e-d,h=c-b,i=Math.min(f,h),j=this.slice(d,e),k=a.slice(b,c),l=0;l<i;++l)if(j[l]!==k[l]){f=j[l],h=k[l];break}return f<h?-1:h<f?1:0},g.prototype.includes=function(a,b,c){return this.indexOf(a,b,c)!==-1},g.prototype.indexOf=function(a,b,c){return u(this,a,b,c,!0)},g.prototype.lastIndexOf=function(a,b,c){return u(this,a,b,c,!1)},g.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else{if(!isFinite(b))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0)}var e=this.length-b;if((void 0===c||c>e)&&(c=e),a.length>0&&(c<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");d||(d="utf8");for(var f=!1;;)switch(d){case"hex":return w(this,a,b,c);case"utf8":case"utf-8":return x(this,a,b,c);case"ascii":return y(this,a,b,c);case"latin1":case"binary":return z(this,a,b,c);case"base64":return A(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,a,b,c);default:if(f)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),f=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var aa=4096;g.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,a<0?(a+=c,a<0&&(a=0)):a>c&&(a=c),b<0?(b+=c,b<0&&(b=0)):b>c&&(b=c),b<a&&(b=a);var d;if(g.TYPED_ARRAY_SUPPORT)d=this.subarray(a,b),d.__proto__=g.prototype;else{var e=b-a;d=new g(e,(void 0));for(var f=0;f<e;++f)d[f]=this[f+a]}return d},g.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||J(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return d},g.prototype.readUIntBE=function(a,b,c){a=0|a,b=0|b,c||J(a,b,this.length);for(var d=this[a+--b],e=1;b>0&&(e*=256);)d+=this[a+--b]*e;return d},g.prototype.readUInt8=function(a,b){return b||J(a,1,this.length),this[a]},g.prototype.readUInt16LE=function(a,b){return b||J(a,2,this.length),this[a]|this[a+1]<<8},g.prototype.readUInt16BE=function(a,b){return b||J(a,2,this.length),this[a]<<8|this[a+1]},g.prototype.readUInt32LE=function(a,b){return b||J(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},g.prototype.readUInt32BE=function(a,b){return b||J(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},g.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||J(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return e*=128,d>=e&&(d-=Math.pow(2,8*b)),d},g.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||J(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},g.prototype.readInt8=function(a,b){return b||J(a,1,this.length),128&this[a]?(255-this[a]+1)*-1:this[a]},g.prototype.readInt16LE=function(a,b){b||J(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},g.prototype.readInt16BE=function(a,b){b||J(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},g.prototype.readInt32LE=function(a,b){return b||J(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},g.prototype.readInt32BE=function(a,b){return b||J(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},g.prototype.readFloatLE=function(a,b){return b||J(a,4,this.length),$.read(this,a,!0,23,4)},g.prototype.readFloatBE=function(a,b){return b||J(a,4,this.length),$.read(this,a,!1,23,4)},g.prototype.readDoubleLE=function(a,b){return b||J(a,8,this.length),$.read(this,a,!0,52,8)},g.prototype.readDoubleBE=function(a,b){return b||J(a,8,this.length),$.read(this,a,!1,52,8)},g.prototype.writeUIntLE=function(a,b,c,d){if(a=+a,b=0|b,c=0|c,!d){var e=Math.pow(2,8*c)-1;K(this,a,b,c,e,0)}var f=1,g=0;for(this[b]=255&a;++g<c&&(f*=256);)this[b+g]=a/f&255;return b+c},g.prototype.writeUIntBE=function(a,b,c,d){if(a=+a,b=0|b,c=0|c,!d){var e=Math.pow(2,8*c)-1;K(this,a,b,c,e,0)}var f=c-1,g=1;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=a/g&255;return b+c},g.prototype.writeUInt8=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,1,255,0),g.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=255&a,b+1},g.prototype.writeUInt16LE=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):L(this,a,b,!0),b+2},g.prototype.writeUInt16BE=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):L(this,a,b,!1),b+2},g.prototype.writeUInt32LE=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=255&a):M(this,a,b,!0),b+4},g.prototype.writeUInt32BE=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):M(this,a,b,!1),b+4},g.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);K(this,a,b,c,e-1,-e)}var f=0,g=1,h=0;for(this[b]=255&a;++f<c&&(g*=256);)a<0&&0===h&&0!==this[b+f-1]&&(h=1),this[b+f]=(a/g>>0)-h&255;return b+c},g.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);K(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0;for(this[b+f]=255&a;--f>=0&&(g*=256);)a<0&&0===h&&0!==this[b+f+1]&&(h=1),this[b+f]=(a/g>>0)-h&255;return b+c},g.prototype.writeInt8=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,1,127,-128),g.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),a<0&&(a=255+a+1),this[b]=255&a,b+1},g.prototype.writeInt16LE=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):L(this,a,b,!0),b+2},g.prototype.writeInt16BE=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):L(this,a,b,!1),b+2},g.prototype.writeInt32LE=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):M(this,a,b,!0),b+4},g.prototype.writeInt32BE=function(a,b,c){return a=+a,b=0|b,c||K(this,a,b,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),g.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):M(this,a,b,!1),b+4},g.prototype.writeFloatLE=function(a,b,c){return O(this,a,b,!0,c)},g.prototype.writeFloatBE=function(a,b,c){return O(this,a,b,!1,c)},g.prototype.writeDoubleLE=function(a,b,c){return P(this,a,b,!0,c)},g.prototype.writeDoubleBE=function(a,b,c){return P(this,a,b,!1,c)},g.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&d<c&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("sourceStart out of bounds");if(d<0)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);var e,f=d-c;if(this===a&&c<b&&b<d)for(e=f-1;e>=0;--e)a[e+b]=this[e+c];else if(f<1e3||!g.TYPED_ARRAY_SUPPORT)for(e=0;e<f;++e)a[e+b]=this[e+c];else Uint8Array.prototype.set.call(a,this.subarray(c,c+f),b);return f},g.prototype.fill=function(a,b,c,d){if("string"==typeof a){if("string"==typeof b?(d=b,b=0,c=this.length):"string"==typeof c&&(d=c,c=this.length),1===a.length){var e=a.charCodeAt(0);e<256&&(a=e)}if(void 0!==d&&"string"!=typeof d)throw new TypeError("encoding must be a string");if("string"==typeof d&&!g.isEncoding(d))throw new TypeError("Unknown encoding: "+d)}else"number"==typeof a&&(a=255&a);if(b<0||this.length<b||this.length<c)throw new RangeError("Out of range index");if(c<=b)return this;b>>>=0,c=void 0===c?this.length:c>>>0,a||(a=0);var f;if("number"==typeof a)for(f=b;f<c;++f)this[f]=a;else{var h=g.isBuffer(a)?a:T(new g(a,d).toString()),i=h.length;for(f=0;f<c-b;++f)this[f+b]=h[f%i]}return this};var ba=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":4,ieee754:5,isarray:6}],4:[function(a,b,c){"use strict";function d(a){var b=a.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===a[b-2]?2:"="===a[b-1]?1:0}function e(a){return 3*a.length/4-d(a)}function f(a){var b,c,e,f,g,h,i=a.length;g=d(a),h=new l(3*i/4-g),e=g>0?i-4:i;var j=0;for(b=0,c=0;b<e;b+=4,c+=3)f=k[a.charCodeAt(b)]<<18|k[a.charCodeAt(b+1)]<<12|k[a.charCodeAt(b+2)]<<6|k[a.charCodeAt(b+3)],h[j++]=f>>16&255,h[j++]=f>>8&255,h[j++]=255&f;return 2===g?(f=k[a.charCodeAt(b)]<<2|k[a.charCodeAt(b+1)]>>4,h[j++]=255&f):1===g&&(f=k[a.charCodeAt(b)]<<10|k[a.charCodeAt(b+1)]<<4|k[a.charCodeAt(b+2)]>>2,h[j++]=f>>8&255,h[j++]=255&f),h}function g(a){return j[a>>18&63]+j[a>>12&63]+j[a>>6&63]+j[63&a]}function h(a,b,c){for(var d,e=[],f=b;f<c;f+=3)d=(a[f]<<16)+(a[f+1]<<8)+a[f+2],e.push(g(d));return e.join("")}function i(a){for(var b,c=a.length,d=c%3,e="",f=[],g=16383,i=0,k=c-d;i<k;i+=g)f.push(h(a,i,i+g>k?k:i+g));return 1===d?(b=a[c-1],e+=j[b>>2],e+=j[b<<4&63],e+="=="):2===d&&(b=(a[c-2]<<8)+a[c-1],e+=j[b>>10],e+=j[b>>4&63],e+=j[b<<2&63],e+="="),f.push(e),f.join("")}c.byteLength=e,c.toByteArray=f,c.fromByteArray=i;for(var j=[],k=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=m.length;n<o;++n)j[n]=m[n],k[m.charCodeAt(n)]=n;k["-".charCodeAt(0)]=62,k["_".charCodeAt(0)]=63},{}],5:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<<h)-1,j=i>>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<<j)-1,l=k>>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=b<0||0===b&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<<e|h,j+=e;j>0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],6:[function(a,b,c){var d={}.toString;b.exports=Array.isArray||function(a){return"[object Array]"==d.call(a)}},{}],7:[function(a,b,c){"use strict";c.randomBytes=c.rng=c.pseudoRandomBytes=c.prng=a("randombytes"),c.createHash=c.Hash=a("create-hash"),c.createHmac=c.Hmac=a("create-hmac");var d=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Object.keys(a("browserify-sign/algos")));c.getHashes=function(){return d};var e=a("pbkdf2");c.pbkdf2=e.pbkdf2,c.pbkdf2Sync=e.pbkdf2Sync;var f=a("browserify-cipher");["Cipher","createCipher","Cipheriv","createCipheriv","Decipher","createDecipher","Decipheriv","createDecipheriv","getCiphers","listCiphers"].forEach(function(a){c[a]=f[a]});var g=a("diffie-hellman");["DiffieHellmanGroup","createDiffieHellmanGroup","getDiffieHellman","createDiffieHellman","DiffieHellman"].forEach(function(a){c[a]=g[a]});var h=a("browserify-sign");["createSign","Sign","createVerify","Verify"].forEach(function(a){c[a]=h[a]}),c.createECDH=a("create-ecdh");var i=a("public-encrypt");["publicEncrypt","privateEncrypt","publicDecrypt","privateDecrypt"].forEach(function(a){c[a]=i[a]}),["createCredentials"].forEach(function(a){c[a]=function(){throw new Error(["sorry, "+a+" is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))}})},{"browserify-cipher":8,"browserify-sign":38,"browserify-sign/algos":37,"create-ecdh":108,"create-hash":136,"create-hmac":149,"diffie-hellman":150,pbkdf2:157,"public-encrypt":159,randombytes:205}],8:[function(a,b,c){function d(a,b){var c,d;if(a=a.toLowerCase(),m[a])c=m[a].key,d=m[a].iv;else{if(!l[a])throw new TypeError("invalid suite type");c=8*l[a].key,d=l[a].iv}var e=i(b,!1,c,d);return f(a,e.key,e.iv)}function e(a,b){var c,d;if(a=a.toLowerCase(),m[a])c=m[a].key,d=m[a].iv;else{if(!l[a])throw new TypeError("invalid suite type");c=8*l[a].key,d=l[a].iv}var e=i(b,!1,c,d);return g(a,e.key,e.iv)}function f(a,b,c){if(a=a.toLowerCase(),m[a])return j.createCipheriv(a,b,c);if(l[a])return new k({key:b,iv:c,mode:a});throw new TypeError("invalid suite type")}function g(a,b,c){if(a=a.toLowerCase(),m[a])return j.createDecipheriv(a,b,c);if(l[a])return new k({key:b,iv:c,mode:a,decrypt:!0});throw new TypeError("invalid suite type")}function h(){return Object.keys(l).concat(j.getCiphers())}var i=a("evp_bytestokey"),j=a("browserify-aes/browser"),k=a("browserify-des"),l=a("browserify-des/modes"),m=a("browserify-aes/modes");c.createCipher=c.Cipher=d,c.createCipheriv=c.Cipheriv=f,c.createDecipher=c.Decipher=e,c.createDecipheriv=c.Decipheriv=g,c.listCiphers=c.getCiphers=h},{"browserify-aes/browser":11,"browserify-aes/modes":15,"browserify-des":26,"browserify-des/modes":27,evp_bytestokey:36}],9:[function(a,b,c){(function(a){function b(a){var b,c;return b=a>h||a<0?(c=Math.abs(a)%h,a<0?h-c:c):a}function d(a){for(var b=0;b<a.length;a++)a[b]=0;return!1}function e(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function f(a){for(var b=a.length/4,c=new Array(b),d=-1;++d<b;)c[d]=a.readUInt32BE(4*d);return c}function g(a){this._key=f(a),this._doReset()}var h=Math.pow(2,32);e.prototype.init=function(){var a,b,c,d,e,f,g,h,i,j;for(a=function(){var a,c;for(c=[],b=a=0;a<256;b=++a)b<128?c.push(b<<1):c.push(b<<1^283);return c}(),e=0,i=0,b=j=0;j<256;b=++j)c=i^i<<1^i<<2^i<<3^i<<4,c=c>>>8^255&c^99,this.SBOX[e]=c,this.INV_SBOX[c]=e,f=a[e],g=a[f],h=a[g],d=257*a[c]^16843008*c,this.SUB_MIX[0][e]=d<<24|d>>>8,this.SUB_MIX[1][e]=d<<16|d>>>16,this.SUB_MIX[2][e]=d<<8|d>>>24,this.SUB_MIX[3][e]=d,d=16843009*h^65537*g^257*f^16843008*e,this.INV_SUB_MIX[0][c]=d<<24|d>>>8,this.INV_SUB_MIX[1][c]=d<<16|d>>>16,this.INV_SUB_MIX[2][c]=d<<8|d>>>24,this.INV_SUB_MIX[3][c]=d,0===e?e=i=1:(e=f^a[a[a[h^f]]],i^=a[a[i]]);return!0};var i=new e;g.blockSize=16,g.prototype.blockSize=g.blockSize,g.keySize=32,g.prototype.keySize=g.keySize,g.prototype._doReset=function(){var a,b,c,d,e,f;for(c=this._key,b=c.length,this._nRounds=b+6,e=4*(this._nRounds+1),this._keySchedule=[],d=0;d<e;d++)this._keySchedule[d]=d<b?c[d]:(f=this._keySchedule[d-1],d%b===0?(f=f<<8|f>>>24,f=i.SBOX[f>>>24]<<24|i.SBOX[f>>>16&255]<<16|i.SBOX[f>>>8&255]<<8|i.SBOX[255&f],f^=i.RCON[d/b|0]<<24):b>6&&d%b===4?f=i.SBOX[f>>>24]<<24|i.SBOX[f>>>16&255]<<16|i.SBOX[f>>>8&255]<<8|i.SBOX[255&f]:void 0,this._keySchedule[d-b]^f);for(this._invKeySchedule=[],a=0;a<e;a++)d=e-a,f=this._keySchedule[d-(a%4?0:4)],this._invKeySchedule[a]=a<4||d<=4?f:i.INV_SUB_MIX[0][i.SBOX[f>>>24]]^i.INV_SUB_MIX[1][i.SBOX[f>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[f>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&f]];return!0},g.prototype.encryptBlock=function(b){b=f(new a(b));var c=this._doCryptBlock(b,this._keySchedule,i.SUB_MIX,i.SBOX),d=new a(16);return d.writeUInt32BE(c[0],0),d.writeUInt32BE(c[1],4),d.writeUInt32BE(c[2],8),d.writeUInt32BE(c[3],12),d},g.prototype.decryptBlock=function(b){b=f(new a(b));var c=[b[3],b[1]];b[1]=c[0],b[3]=c[1];var d=this._doCryptBlock(b,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX),e=new a(16);return e.writeUInt32BE(d[0],0),e.writeUInt32BE(d[3],4),e.writeUInt32BE(d[2],8),e.writeUInt32BE(d[1],12),e},g.prototype.scrub=function(){d(this._keySchedule),d(this._invKeySchedule),d(this._key)},g.prototype._doCryptBlock=function(a,c,d,e){var f,g,h,i,j,k,l,m,n;g=a[0]^c[0],h=a[1]^c[1],i=a[2]^c[2],j=a[3]^c[3],f=4;for(var o=1;o<this._nRounds;o++)k=d[0][g>>>24]^d[1][h>>>16&255]^d[2][i>>>8&255]^d[3][255&j]^c[f++],l=d[0][h>>>24]^d[1][i>>>16&255]^d[2][j>>>8&255]^d[3][255&g]^c[f++],m=d[0][i>>>24]^d[1][j>>>16&255]^d[2][g>>>8&255]^d[3][255&h]^c[f++],n=d[0][j>>>24]^d[1][g>>>16&255]^d[2][h>>>8&255]^d[3][255&i]^c[f++],g=k,h=l,i=m,j=n;return k=(e[g>>>24]<<24|e[h>>>16&255]<<16|e[i>>>8&255]<<8|e[255&j])^c[f++],l=(e[h>>>24]<<24|e[i>>>16&255]<<16|e[j>>>8&255]<<8|e[255&g])^c[f++],m=(e[i>>>24]<<24|e[j>>>16&255]<<16|e[g>>>8&255]<<8|e[255&h])^c[f++],n=(e[j>>>24]<<24|e[g>>>16&255]<<16|e[h>>>8&255]<<8|e[255&i])^c[f++],[b(k),b(l),b(m),b(n)]},c.AES=g}).call(this,a("buffer").Buffer)},{buffer:3}],10:[function(a,b,c){(function(c){function d(a,b,e,h){if(!(this instanceof d))return new d(a,b,e);g.call(this),this._finID=c.concat([e,new c([0,0,0,1])]),e=c.concat([e,new c([0,0,0,2])]),this._cipher=new f.AES(b),this._prev=new c(e.length),this._cache=new c(""),this._secCache=new c(""),this._decrypt=h,this._alen=0,this._len=0,e.copy(this._prev),this._mode=a;var j=new c(4);j.fill(0),this._ghash=new i(this._cipher.encryptBlock(j)),this._authTag=null,this._called=!1}function e(a,b){var c=0;a.length!==b.length&&c++;for(var d=Math.min(a.length,b.length),e=-1;++e<d;)c+=a[e]^b[e];return c}var f=a("./aes"),g=a("cipher-base"),h=a("inherits"),i=a("./ghash"),j=a("buffer-xor");h(d,g),b.exports=d,d.prototype._update=function(a){if(!this._called&&this._alen){var b=16-this._alen%16;b<16&&(b=new c(b),b.fill(0),this._ghash.update(b))}this._called=!0;var d=this._mode.encrypt(this,a);return this._decrypt?this._ghash.update(a):this._ghash.update(d),this._len+=a.length,d},d.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var a=j(this._ghash["final"](8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(e(a,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=a;this._cipher.scrub()},d.prototype.getAuthTag=function(){if(!this._decrypt&&c.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},d.prototype.setAuthTag=function(a){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=a},d.prototype.setAAD=function(a){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(a),this._alen+=a.length}}).call(this,a("buffer").Buffer)},{"./aes":9,"./ghash":14,buffer:3,"buffer-xor":23,"cipher-base":24,inherits:207}],11:[function(a,b,c){function d(){return Object.keys(g)}var e=a("./encrypter");c.createCipher=c.Cipher=e.createCipher,c.createCipheriv=c.Cipheriv=e.createCipheriv;var f=a("./decrypter");c.createDecipher=c.Decipher=f.createDecipher,c.createDecipheriv=c.Decipheriv=f.createDecipheriv;var g=a("./modes");c.listCiphers=c.getCiphers=d},{"./decrypter":12,"./encrypter":13,"./modes":15}],12:[function(a,b,c){(function(b){function d(a,c,f){return this instanceof d?(j.call(this),this._cache=new e,this._last=void 0,this._cipher=new i.AES(c),this._prev=new b(f.length),f.copy(this._prev),this._mode=a,void(this._autopadding=!0)):new d(a,c,f)}function e(){return this instanceof e?void(this.cache=new b("")):new e}function f(a){for(var b=a[15],c=-1;++c<b;)if(a[c+(16-b)]!==b)throw new Error("unable to decrypt data");if(16!==b)return a.slice(0,16-b)}function g(a,c,e){var f=l[a.toLowerCase()];if(!f)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=new b(e)),"string"==typeof c&&(c=new b(c)),c.length!==f.key/8)throw new TypeError("invalid key length "+c.length);if(e.length!==f.iv)throw new TypeError("invalid iv length "+e.length);return"stream"===f.type?new m(p[f.mode],c,e,(!0)):"auth"===f.type?new n(p[f.mode],c,e,(!0)):new d(p[f.mode],c,e)}function h(a,b){var c=l[a.toLowerCase()];if(!c)throw new TypeError("invalid suite type");var d=o(b,!1,c.key,c.iv);return g(a,d.key,d.iv)}var i=a("./aes"),j=a("cipher-base"),k=a("inherits"),l=a("./modes"),m=a("./streamCipher"),n=a("./authCipher"),o=a("evp_bytestokey");k(d,j),d.prototype._update=function(a){this._cache.add(a);for(var c,d,e=[];c=this._cache.get(this._autopadding);)d=this._mode.decrypt(this,c),e.push(d);return b.concat(e)},d.prototype._final=function(){
var a=this._cache.flush();if(this._autopadding)return f(this._mode.decrypt(this,a));if(a)throw new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(a){return this._autopadding=!!a,this},e.prototype.add=function(a){this.cache=b.concat([this.cache,a])},e.prototype.get=function(a){var b;if(a){if(this.cache.length>16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b}else if(this.cache.length>=16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b;return null},e.prototype.flush=function(){if(this.cache.length)return this.cache};var p={ECB:a("./modes/ecb"),CBC:a("./modes/cbc"),CFB:a("./modes/cfb"),CFB8:a("./modes/cfb8"),CFB1:a("./modes/cfb1"),OFB:a("./modes/ofb"),CTR:a("./modes/ctr"),GCM:a("./modes/ctr")};c.createDecipher=h,c.createDecipheriv=g}).call(this,a("buffer").Buffer)},{"./aes":9,"./authCipher":10,"./modes":15,"./modes/cbc":16,"./modes/cfb":17,"./modes/cfb1":18,"./modes/cfb8":19,"./modes/ctr":20,"./modes/ecb":21,"./modes/ofb":22,"./streamCipher":25,buffer:3,"cipher-base":24,evp_bytestokey:36,inherits:207}],13:[function(a,b,c){(function(b){function d(a,c,f){return this instanceof d?(i.call(this),this._cache=new e,this._cipher=new h.AES(c),this._prev=new b(f.length),f.copy(this._prev),this._mode=a,void(this._autopadding=!0)):new d(a,c,f)}function e(){return this instanceof e?void(this.cache=new b("")):new e}function f(a,c,e){var f=k[a.toLowerCase()];if(!f)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=new b(e)),"string"==typeof c&&(c=new b(c)),c.length!==f.key/8)throw new TypeError("invalid key length "+c.length);if(e.length!==f.iv)throw new TypeError("invalid iv length "+e.length);return"stream"===f.type?new m(o[f.mode],c,e):"auth"===f.type?new n(o[f.mode],c,e):new d(o[f.mode],c,e)}function g(a,b){var c=k[a.toLowerCase()];if(!c)throw new TypeError("invalid suite type");var d=l(b,!1,c.key,c.iv);return f(a,d.key,d.iv)}var h=a("./aes"),i=a("cipher-base"),j=a("inherits"),k=a("./modes"),l=a("evp_bytestokey"),m=a("./streamCipher"),n=a("./authCipher");j(d,i),d.prototype._update=function(a){this._cache.add(a);for(var c,d,e=[];c=this._cache.get();)d=this._mode.encrypt(this,c),e.push(d);return b.concat(e)},d.prototype._final=function(){var a=this._cache.flush();if(this._autopadding)return a=this._mode.encrypt(this,a),this._cipher.scrub(),a;if("10101010101010101010101010101010"!==a.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(a){return this._autopadding=!!a,this},e.prototype.add=function(a){this.cache=b.concat([this.cache,a])},e.prototype.get=function(){if(this.cache.length>15){var a=this.cache.slice(0,16);return this.cache=this.cache.slice(16),a}return null},e.prototype.flush=function(){for(var a=16-this.cache.length,c=new b(a),d=-1;++d<a;)c.writeUInt8(a,d);var e=b.concat([this.cache,c]);return e};var o={ECB:a("./modes/ecb"),CBC:a("./modes/cbc"),CFB:a("./modes/cfb"),CFB8:a("./modes/cfb8"),CFB1:a("./modes/cfb1"),OFB:a("./modes/ofb"),CTR:a("./modes/ctr"),GCM:a("./modes/ctr")};c.createCipheriv=f,c.createCipher=g}).call(this,a("buffer").Buffer)},{"./aes":9,"./authCipher":10,"./modes":15,"./modes/cbc":16,"./modes/cfb":17,"./modes/cfb1":18,"./modes/cfb8":19,"./modes/ctr":20,"./modes/ecb":21,"./modes/ofb":22,"./streamCipher":25,buffer:3,"cipher-base":24,evp_bytestokey:36,inherits:207}],14:[function(a,b,c){(function(a){function c(b){this.h=b,this.state=new a(16),this.state.fill(0),this.cache=new a("")}function d(a){return[a.readUInt32BE(0),a.readUInt32BE(4),a.readUInt32BE(8),a.readUInt32BE(12)]}function e(b){b=b.map(f);var c=new a(16);return c.writeUInt32BE(b[0],0),c.writeUInt32BE(b[1],4),c.writeUInt32BE(b[2],8),c.writeUInt32BE(b[3],12),c}function f(a){var b,c;return b=a>i||a<0?(c=Math.abs(a)%i,a<0?i-c:c):a}function g(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}var h=new a(16);h.fill(0),b.exports=c,c.prototype.ghash=function(a){for(var b=-1;++b<a.length;)this.state[b]^=a[b];this._multiply()},c.prototype._multiply=function(){for(var a,b,c,f=d(this.h),h=[0,0,0,0],i=-1;++i<128;){for(b=0!==(this.state[~~(i/8)]&1<<7-i%8),b&&(h=g(h,f)),c=0!==(1&f[3]),a=3;a>0;a--)f[a]=f[a]>>>1|(1&f[a-1])<<31;f[0]=f[0]>>>1,c&&(f[0]=f[0]^225<<24)}this.state=e(h)},c.prototype.update=function(b){this.cache=a.concat([this.cache,b]);for(var c;this.cache.length>=16;)c=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(c)},c.prototype["final"]=function(b,c){return this.cache.length&&this.ghash(a.concat([this.cache,h],16)),this.ghash(e([0,b,0,c])),this.state};var i=Math.pow(2,32)}).call(this,a("buffer").Buffer)},{buffer:3}],15:[function(a,b,c){c["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},c["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},c["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},c["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},c["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},c["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},c.aes128=c["aes-128-cbc"],c.aes192=c["aes-192-cbc"],c.aes256=c["aes-256-cbc"],c["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},c["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},c["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},c["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},c["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},c["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},c["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},c["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},c["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},c["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},c["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},c["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},c["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},c["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},c["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},c["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},c["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},c["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],16:[function(a,b,c){var d=a("buffer-xor");c.encrypt=function(a,b){var c=d(b,a._prev);return a._prev=a._cipher.encryptBlock(c),a._prev},c.decrypt=function(a,b){var c=a._prev;a._prev=b;var e=a._cipher.decryptBlock(b);return d(e,c)}},{"buffer-xor":23}],17:[function(a,b,c){(function(b){function d(a,c,d){var f=c.length,g=e(c,a._cache);return a._cache=a._cache.slice(f),a._prev=b.concat([a._prev,d?c:g]),g}var e=a("buffer-xor");c.encrypt=function(a,c,e){for(var f,g=new b("");c.length;){if(0===a._cache.length&&(a._cache=a._cipher.encryptBlock(a._prev),a._prev=new b("")),!(a._cache.length<=c.length)){g=b.concat([g,d(a,c,e)]);break}f=a._cache.length,g=b.concat([g,d(a,c.slice(0,f),e)]),c=c.slice(f)}return g}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":23}],18:[function(a,b,c){(function(a){function b(a,b,c){for(var e,f,g,h=-1,i=8,j=0;++h<i;)e=a._cipher.encryptBlock(a._prev),f=b&1<<7-h?128:0,g=e[0]^f,j+=(128&g)>>h%8,a._prev=d(a._prev,c?f:g);return j}function d(b,c){var d=b.length,e=-1,f=new a(b.length);for(b=a.concat([b,new a([c])]);++e<d;)f[e]=b[e]<<1|b[e+1]>>7;return f}c.encrypt=function(c,d,e){for(var f=d.length,g=new a(f),h=-1;++h<f;)g[h]=b(c,d[h],e);return g}}).call(this,a("buffer").Buffer)},{buffer:3}],19:[function(a,b,c){(function(a){function b(b,c,d){var e=b._cipher.encryptBlock(b._prev),f=e[0]^c;return b._prev=a.concat([b._prev.slice(1),new a([d?c:f])]),f}c.encrypt=function(c,d,e){for(var f=d.length,g=new a(f),h=-1;++h<f;)g[h]=b(c,d[h],e);return g}}).call(this,a("buffer").Buffer)},{buffer:3}],20:[function(a,b,c){(function(b){function d(a){for(var b,c=a.length;c--;){if(b=a.readUInt8(c),255!==b){b++,a.writeUInt8(b,c);break}a.writeUInt8(0,c)}}function e(a){var b=a._cipher.encryptBlock(a._prev);return d(a._prev),b}var f=a("buffer-xor");c.encrypt=function(a,c){for(;a._cache.length<c.length;)a._cache=b.concat([a._cache,e(a)]);var d=a._cache.slice(0,c.length);return a._cache=a._cache.slice(c.length),f(c,d)}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":23}],21:[function(a,b,c){c.encrypt=function(a,b){return a._cipher.encryptBlock(b)},c.decrypt=function(a,b){return a._cipher.decryptBlock(b)}},{}],22:[function(a,b,c){(function(b){function d(a){return a._prev=a._cipher.encryptBlock(a._prev),a._prev}var e=a("buffer-xor");c.encrypt=function(a,c){for(;a._cache.length<c.length;)a._cache=b.concat([a._cache,d(a)]);var f=a._cache.slice(0,c.length);return a._cache=a._cache.slice(c.length),e(c,f)}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":23}],23:[function(a,b,c){(function(a){b.exports=function(b,c){for(var d=Math.min(b.length,c.length),e=new a(d),f=0;f<d;++f)e[f]=b[f]^c[f];return e}}).call(this,a("buffer").Buffer)},{buffer:3}],24:[function(a,b,c){(function(c){function d(a){e.call(this),this.hashMode="string"==typeof a,this.hashMode?this[a]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var e=a("stream").Transform,f=a("inherits"),g=a("string_decoder").StringDecoder;b.exports=d,f(d,e),d.prototype.update=function(a,b,d){"string"==typeof a&&(a=new c(a,b));var e=this._update(a);return this.hashMode?this:(d&&(e=this._toString(e,d)),e)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(a,b,c){var d;try{this.hashMode?this._update(a):this.push(this._update(a))}catch(e){d=e}finally{c(d)}},d.prototype._flush=function(a){var b;try{this.push(this._final())}catch(c){b=c}finally{a(b)}},d.prototype._finalOrDigest=function(a){var b=this._final()||new c("");return a&&(b=this._toString(b,a,!0)),b},d.prototype._toString=function(a,b,c){if(this._decoder||(this._decoder=new g(b),this._encoding=b),this._encoding!==b)throw new Error("can't switch encodings");var d=this._decoder.write(a);return c&&(d+=this._decoder.end()),d}}).call(this,a("buffer").Buffer)},{buffer:3,inherits:207,stream:226,string_decoder:227}],25:[function(a,b,c){(function(c){function d(a,b,g,h){return this instanceof d?(f.call(this),this._cipher=new e.AES(b),this._prev=new c(g.length),this._cache=new c(""),this._secCache=new c(""),this._decrypt=h,g.copy(this._prev),void(this._mode=a)):new d(a,b,g)}var e=a("./aes"),f=a("cipher-base"),g=a("inherits");g(d,f),b.exports=d,d.prototype._update=function(a){return this._mode.encrypt(this,a,this._decrypt)},d.prototype._final=function(){this._cipher.scrub()}}).call(this,a("buffer").Buffer)},{"./aes":9,buffer:3,"cipher-base":24,inherits:207}],26:[function(a,b,c){(function(c){function d(a){e.call(this);var b,d=a.mode.toLowerCase(),f=h[d];b=a.decrypt?"decrypt":"encrypt";var g=a.key;"des-ede"!==d&&"des-ede-cbc"!==d||(g=c.concat([g,g.slice(0,8)]));var i=a.iv;this._des=f.create({key:g,iv:i,type:b})}var e=a("cipher-base"),f=a("des.js"),g=a("inherits"),h={"des-ede3-cbc":f.CBC.instantiate(f.EDE),"des-ede3":f.EDE,"des-ede-cbc":f.CBC.instantiate(f.EDE),"des-ede":f.EDE,"des-cbc":f.CBC.instantiate(f.DES),"des-ecb":f.DES};h.des=h["des-cbc"],h.des3=h["des-ede3-cbc"],b.exports=d,g(d,e),d.prototype._update=function(a){return new c(this._des.update(a))},d.prototype._final=function(){return new c(this._des["final"]())}}).call(this,a("buffer").Buffer)},{buffer:3,"cipher-base":28,"des.js":29,inherits:207}],27:[function(a,b,c){c["des-ecb"]={key:8,iv:0},c["des-cbc"]=c.des={key:8,iv:8},c["des-ede3-cbc"]=c.des3={key:24,iv:8},c["des-ede3"]={key:24,iv:0},c["des-ede-cbc"]={key:16,iv:8},c["des-ede"]={key:16,iv:0}},{}],28:[function(a,b,c){(function(c){function d(a){e.call(this),this.hashMode="string"==typeof a,this.hashMode?this[a]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var e=a("stream").Transform,f=a("inherits"),g=a("string_decoder").StringDecoder;b.exports=d,f(d,e),d.prototype.update=function(a,b,d){"string"==typeof a&&(a=new c(a,b));var e=this._update(a);return this.hashMode?this:(d&&(e=this._toString(e,d)),e)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(a,b,c){var d;try{this.hashMode?this._update(a):this.push(this._update(a))}catch(e){d=e}finally{c(d)}},d.prototype._flush=function(a){var b;try{this.push(this._final())}catch(c){b=c}finally{a(b)}},d.prototype._finalOrDigest=function(a){var b=this._final()||new c("");return a&&(b=this._toString(b,a,!0)),b},d.prototype._toString=function(a,b,c){if(this._decoder||(this._decoder=new g(b),this._encoding=b),this._encoding!==b)throw new Error("can't switch encodings");var d=this._decoder.write(a);return c&&(d+=this._decoder.end()),d}}).call(this,a("buffer").Buffer)},{buffer:3,inherits:207,stream:226,string_decoder:227}],29:[function(a,b,c){"use strict";c.utils=a("./des/utils"),c.Cipher=a("./des/cipher"),c.DES=a("./des/des"),c.CBC=a("./des/cbc"),c.EDE=a("./des/ede")},{"./des/cbc":30,"./des/cipher":31,"./des/des":32,"./des/ede":33,"./des/utils":34}],30:[function(a,b,c){"use strict";function d(a){f.equal(a.length,8,"Invalid IV length"),this.iv=new Array(8);for(var b=0;b<this.iv.length;b++)this.iv[b]=a[b]}function e(a){function b(b){a.call(this,b),this._cbcInit()}g(b,a);for(var c=Object.keys(h),d=0;d<c.length;d++){var e=c[d];b.prototype[e]=h[e]}return b.create=function(a){return new b(a)},b}var f=a("minimalistic-assert"),g=a("inherits"),h={};c.instantiate=e,h._cbcInit=function(){var a=new d(this.options.iv);this._cbcState=a},h._update=function(a,b,c,d){var e=this._cbcState,f=this.constructor.super_.prototype,g=e.iv;if("encrypt"===this.type){for(var h=0;h<this.blockSize;h++)g[h]^=a[b+h];f._update.call(this,g,0,c,d);for(var h=0;h<this.blockSize;h++)g[h]=c[d+h]}else{f._update.call(this,a,b,c,d);for(var h=0;h<this.blockSize;h++)c[d+h]^=g[h];for(var h=0;h<this.blockSize;h++)g[h]=a[b+h]}}},{inherits:207,"minimalistic-assert":35}],31:[function(a,b,c){"use strict";function d(a){this.options=a,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}var e=a("minimalistic-assert");b.exports=d,d.prototype._init=function(){},d.prototype.update=function(a){return 0===a.length?[]:"decrypt"===this.type?this._updateDecrypt(a):this._updateEncrypt(a)},d.prototype._buffer=function(a,b){for(var c=Math.min(this.buffer.length-this.bufferOff,a.length-b),d=0;d<c;d++)this.buffer[this.bufferOff+d]=a[b+d];return this.bufferOff+=c,c},d.prototype._flushBuffer=function(a,b){return this._update(this.buffer,0,a,b),this.bufferOff=0,this.blockSize},d.prototype._updateEncrypt=function(a){var b=0,c=0,d=(this.bufferOff+a.length)/this.blockSize|0,e=new Array(d*this.blockSize);0!==this.bufferOff&&(b+=this._buffer(a,b),this.bufferOff===this.buffer.length&&(c+=this._flushBuffer(e,c)));for(var f=a.length-(a.length-b)%this.blockSize;b<f;b+=this.blockSize)this._update(a,b,e,c),c+=this.blockSize;for(;b<a.length;b++,this.bufferOff++)this.buffer[this.bufferOff]=a[b];return e},d.prototype._updateDecrypt=function(a){for(var b=0,c=0,d=Math.ceil((this.bufferOff+a.length)/this.blockSize)-1,e=new Array(d*this.blockSize);d>0;d--)b+=this._buffer(a,b),c+=this._flushBuffer(e,c);return b+=this._buffer(a,b),e},d.prototype["final"]=function(a){var b;a&&(b=this.update(a));var c;return c="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),b?b.concat(c):c},d.prototype._pad=function(a,b){if(0===b)return!1;for(;b<a.length;)a[b++]=0;return!0},d.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var a=new Array(this.blockSize);return this._update(this.buffer,0,a,0),a},d.prototype._unpad=function(a){return a},d.prototype._finalDecrypt=function(){e.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var a=new Array(this.blockSize);return this._flushBuffer(a,0),this._unpad(a)}},{"minimalistic-assert":35}],32:[function(a,b,c){"use strict";function d(){this.tmp=new Array(2),this.keys=null}function e(a){j.call(this,a);var b=new d;this._desState=b,this.deriveKeys(b,a.key)}var f=a("minimalistic-assert"),g=a("inherits"),h=a("../des"),i=h.utils,j=h.Cipher;g(e,j),b.exports=e,e.create=function(a){return new e(a)};var k=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];e.prototype.deriveKeys=function(a,b){a.keys=new Array(32),f.equal(b.length,this.blockSize,"Invalid key length");var c=i.readUInt32BE(b,0),d=i.readUInt32BE(b,4);i.pc1(c,d,a.tmp,0),c=a.tmp[0],d=a.tmp[1];for(var e=0;e<a.keys.length;e+=2){var g=k[e>>>1];c=i.r28shl(c,g),d=i.r28shl(d,g),i.pc2(c,d,a.keys,e)}},e.prototype._update=function(a,b,c,d){var e=this._desState,f=i.readUInt32BE(a,b),g=i.readUInt32BE(a,b+4);i.ip(f,g,e.tmp,0),f=e.tmp[0],g=e.tmp[1],"encrypt"===this.type?this._encrypt(e,f,g,e.tmp,0):this._decrypt(e,f,g,e.tmp,0),f=e.tmp[0],g=e.tmp[1],i.writeUInt32BE(c,f,d),i.writeUInt32BE(c,g,d+4)},e.prototype._pad=function(a,b){for(var c=a.length-b,d=b;d<a.length;d++)a[d]=c;return!0},e.prototype._unpad=function(a){for(var b=a[a.length-1],c=a.length-b;c<a.length;c++)f.equal(a[c],b);return a.slice(0,a.length-b)},e.prototype._encrypt=function(a,b,c,d,e){for(var f=b,g=c,h=0;h<a.keys.length;h+=2){var j=a.keys[h],k=a.keys[h+1];i.expand(g,a.tmp,0),j^=a.tmp[0],k^=a.tmp[1];var l=i.substitute(j,k),m=i.permute(l),n=g;g=(f^m)>>>0,f=n}i.rip(g,f,d,e)},e.prototype._decrypt=function(a,b,c,d,e){for(var f=c,g=b,h=a.keys.length-2;h>=0;h-=2){var j=a.keys[h],k=a.keys[h+1];i.expand(f,a.tmp,0),j^=a.tmp[0],k^=a.tmp[1];var l=i.substitute(j,k),m=i.permute(l),n=f;f=(g^m)>>>0,g=n}i.rip(f,g,d,e)}},{"../des":29,inherits:207,"minimalistic-assert":35}],33:[function(a,b,c){"use strict";function d(a,b){f.equal(b.length,24,"Invalid key length");var c=b.slice(0,8),d=b.slice(8,16),e=b.slice(16,24);"encrypt"===a?this.ciphers=[j.create({type:"encrypt",key:c}),j.create({type:"decrypt",key:d}),j.create({type:"encrypt",key:e})]:this.ciphers=[j.create({type:"decrypt",key:e}),j.create({type:"encrypt",key:d}),j.create({type:"decrypt",key:c})]}function e(a){i.call(this,a);var b=new d(this.type,this.options.key);this._edeState=b}var f=a("minimalistic-assert"),g=a("inherits"),h=a("../des"),i=h.Cipher,j=h.DES;g(e,i),b.exports=e,e.create=function(a){return new e(a)},e.prototype._update=function(a,b,c,d){var e=this._edeState;e.ciphers[0]._update(a,b,c,d),e.ciphers[1]._update(c,d,c,d),e.ciphers[2]._update(c,d,c,d)},e.prototype._pad=j.prototype._pad,e.prototype._unpad=j.prototype._unpad},{"../des":29,inherits:207,"minimalistic-assert":35}],34:[function(a,b,c){"use strict";c.readUInt32BE=function(a,b){var c=a[0+b]<<24|a[1+b]<<16|a[2+b]<<8|a[3+b];return c>>>0},c.writeUInt32BE=function(a,b,c){a[0+c]=b>>>24,a[1+c]=b>>>16&255,a[2+c]=b>>>8&255,a[3+c]=255&b},c.ip=function(a,b,c,d){for(var e=0,f=0,g=6;g>=0;g-=2){for(var h=0;h<=24;h+=8)e<<=1,e|=b>>>h+g&1;for(var h=0;h<=24;h+=8)e<<=1,e|=a>>>h+g&1}for(var g=6;g>=0;g-=2){for(var h=1;h<=25;h+=8)f<<=1,f|=b>>>h+g&1;for(var h=1;h<=25;h+=8)f<<=1,f|=a>>>h+g&1}c[d+0]=e>>>0,c[d+1]=f>>>0},c.rip=function(a,b,c,d){for(var e=0,f=0,g=0;g<4;g++)for(var h=24;h>=0;h-=8)e<<=1,e|=b>>>h+g&1,e<<=1,e|=a>>>h+g&1;for(var g=4;g<8;g++)for(var h=24;h>=0;h-=8)f<<=1,f|=b>>>h+g&1,f<<=1,f|=a>>>h+g&1;c[d+0]=e>>>0,c[d+1]=f>>>0},c.pc1=function(a,b,c,d){for(var e=0,f=0,g=7;g>=5;g--){for(var h=0;h<=24;h+=8)e<<=1,e|=b>>h+g&1;for(var h=0;h<=24;h+=8)e<<=1,e|=a>>h+g&1}for(var h=0;h<=24;h+=8)e<<=1,e|=b>>h+g&1;for(var g=1;g<=3;g++){for(var h=0;h<=24;h+=8)f<<=1,f|=b>>h+g&1;for(var h=0;h<=24;h+=8)f<<=1,f|=a>>h+g&1}for(var h=0;h<=24;h+=8)f<<=1,f|=a>>h+g&1;c[d+0]=e>>>0,c[d+1]=f>>>0},c.r28shl=function(a,b){return a<<b&268435455|a>>>28-b};var d=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];c.pc2=function(a,b,c,e){for(var f=0,g=0,h=d.length>>>1,i=0;i<h;i++)f<<=1,f|=a>>>d[i]&1;for(var i=h;i<d.length;i++)g<<=1,g|=b>>>d[i]&1;c[e+0]=f>>>0,c[e+1]=g>>>0},c.expand=function(a,b,c){var d=0,e=0;d=(1&a)<<5|a>>>27;for(var f=23;f>=15;f-=4)d<<=6,d|=a>>>f&63;for(var f=11;f>=3;f-=4)e|=a>>>f&63,e<<=6;e|=(31&a)<<1|a>>>31,b[c+0]=d>>>0,b[c+1]=e>>>0};var e=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];c.substitute=function(a,b){for(var c=0,d=0;d<4;d++){var f=a>>>18-6*d&63,g=e[64*d+f];c<<=4,c|=g}for(var d=0;d<4;d++){var f=b>>>18-6*d&63,g=e[256+64*d+f];c<<=4,c|=g}return c>>>0};var f=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];c.permute=function(a){for(var b=0,c=0;c<f.length;c++)b<<=1,b|=a>>>f[c]&1;return b>>>0},c.padSplit=function(a,b,c){for(var d=a.toString(2);d.length<b;)d="0"+d;for(var e=[],f=0;f<b;f+=c)e.push(d.slice(f,f+c));return e.join(" ")}},{}],35:[function(a,b,c){function d(a,b){if(!a)throw new Error(b||"Assertion failed")}b.exports=d,d.equal=function(a,b,c){if(a!=b)throw new Error(c||"Assertion failed: "+a+" != "+b)}},{}],36:[function(a,b,c){(function(c){function d(a,b,d,f){c.isBuffer(a)||(a=new c(a,"binary")),b&&!c.isBuffer(b)&&(b=new c(b,"binary")),d/=8,f=f||0;for(var g,h,i=0,j=0,k=new c(d),l=new c(f),m=0,n=[];;){if(m++>0&&n.push(g),n.push(a),b&&n.push(b),g=e(c.concat(n)),n=[],h=0,d>0)for(;;){if(0===d)break;if(h===g.length)break;k[i++]=g[h],d--,h++}if(f>0&&h!==g.length)for(;;){if(0===f)break;if(h===g.length)break;l[j++]=g[h],f--,h++}if(0===d&&0===f)break}for(h=0;h<g.length;h++)g[h]=0;return{key:k,iv:l}}var e=a("create-hash/md5");b.exports=d}).call(this,a("buffer").Buffer)},{buffer:3,"create-hash/md5":138}],37:[function(a,b,c){(function(a){"use strict";c["RSA-SHA224"]=c.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new a("302d300d06096086480165030402040500041c","hex")},c["RSA-SHA256"]=c.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new a("3031300d060960864801650304020105000420","hex")},c["RSA-SHA384"]=c.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new a("3041300d060960864801650304020205000430","hex")},c["RSA-SHA512"]=c.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new a("3051300d060960864801650304020305000440","hex")},c["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new a("3021300906052b0e03021a05000414","hex")},c["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new a("","hex")},c.DSA=c["DSA-SHA1"]=c["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new a("","hex")},c["DSA-SHA224"]=c["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new a("","hex")},c["DSA-SHA256"]=c["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new a("","hex")},c["DSA-SHA384"]=c["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new a("","hex")},c["DSA-SHA512"]=c["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new a("","hex")},c["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new a("","hex")},c["RSA-RIPEMD160"]=c.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new a("3021300906052b2403020105000414","hex")},c["RSA-MD5"]=c.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new a("3020300c06082a864886f70d020505000410","hex")}}).call(this,a("buffer").Buffer)},{buffer:3}],38:[function(a,b,c){(function(c){function d(a){l.Writable.call(this);var b=n[a];if(!b)throw new Error("Unknown message digest");this._hashType=b.hash,this._hash=i(b.hash),this._tag=b.id,this._signType=b.sign}function e(a){l.Writable.call(this);var b=n[a];if(!b)throw new Error("Unknown message digest");this._hash=i(b.hash),this._tag=b.id,this._signType=b.sign}function f(a){return new d(a)}function g(a){return new e(a)}var h=a("./algos"),i=a("create-hash"),j=a("inherits"),k=a("./sign"),l=a("stream"),m=a("./verify"),n={};Object.keys(h).forEach(function(a){n[a]=n[a.toLowerCase()]=h[a]}),j(d,l.Writable),d.prototype._write=function(a,b,c){this._hash.update(a),c()},d.prototype.update=function(a,b){return"string"==typeof a&&(a=new c(a,b)),this._hash.update(a),this},d.prototype.sign=function(a,b){this.end();var d=this._hash.digest(),e=k(c.concat([this._tag,d]),a,this._hashType,this._signType);return b?e.toString(b):e},j(e,l.Writable),e.prototype._write=function(a,b,c){this._hash.update(a),c()},e.prototype.update=function(a,b){return"string"==typeof a&&(a=new c(a,b)),this._hash.update(a),this},e.prototype.verify=function(a,b,d){"string"==typeof b&&(b=new c(b,d)),this.end();var e=this._hash.digest();return m(b,c.concat([this._tag,e]),a,this._signType)},b.exports={Sign:f,Verify:g,createSign:f,createVerify:g}}).call(this,a("buffer").Buffer)},{"./algos":37,"./sign":106,"./verify":107,buffer:3,"create-hash":136,inherits:207,stream:226}],39:[function(a,b,c){"use strict";c["1.3.132.0.10"]="secp256k1",c["1.3.132.0.33"]="p224",c["1.2.840.10045.3.1.1"]="p192",c["1.2.840.10045.3.1.7"]="p256",c["1.3.132.0.34"]="p384",c["1.3.132.0.35"]="p521"},{}],40:[function(a,b,c){!function(b,c){"use strict";function d(a,b){if(!a)throw new Error(b||"Assertion failed")}function e(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}function f(a,b,c){return f.isBN(a)?a:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==a&&("le"!==b&&"be"!==b||(c=b,b=10),this._init(a||0,b||10,c||"be"))))}function g(a,b,c){for(var d=0,e=Math.min(a.length,c),f=b;f<e;f++){var g=a.charCodeAt(f)-48;d<<=4,d|=g>=49&&g<=54?g-49+10:g>=17&&g<=22?g-17+10:15&g}return d}function h(a,b,c,d){for(var e=0,f=Math.min(a.length,c),g=b;g<f;g++){var h=a.charCodeAt(g)-48;e*=d,e+=h>=49?h-49+10:h>=17?h-17+10:h}return e}function i(a){for(var b=new Array(a.bitLength()),c=0;c<b.length;c++){var d=c/26|0,e=c%26;b[c]=(a.words[d]&1<<e)>>>e}return b}function j(a,b,c){c.negative=b.negative^a.negative;var d=a.length+b.length|0;c.length=d,d=d-1|0;var e=0|a.words[0],f=0|b.words[0],g=e*f,h=67108863&g,i=g/67108864|0;c.words[0]=h;for(var j=1;j<d;j++){for(var k=i>>>26,l=67108863&i,m=Math.min(j,b.length-1),n=Math.max(0,j-a.length+1);n<=m;n++){var o=j-n|0;e=0|a.words[o],f=0|b.words[n],g=e*f+l,k+=g/67108864|0,l=67108863&g}c.words[j]=0|l,i=0|k}return 0!==i?c.words[j]=0|i:c.length--,c.strip()}function k(a,b,c){c.negative=b.negative^a.negative,c.length=a.length+b.length;for(var d=0,e=0,f=0;f<c.length-1;f++){var g=e;e=0;for(var h=67108863&d,i=Math.min(f,b.length-1),j=Math.max(0,f-a.length+1);j<=i;j++){var k=f-j,l=0|a.words[k],m=0|b.words[j],n=l*m,o=67108863&n;g=g+(n/67108864|0)|0,o=o+h|0,h=67108863&o,g=g+(o>>>26)|0,e+=g>>>26,g&=67108863}c.words[f]=h,d=g,g=e}return 0!==d?c.words[f]=d:c.length--,c.strip()}function l(a,b,c){var d=new m;return d.mulp(a,b,c)}function m(a,b){this.x=a,this.y=b}function n(a,b){this.name=a,this.p=new f(b,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function o(){n.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){n.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){n.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function r(){n.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function s(a){if("string"==typeof a){var b=f._prime(a);this.m=b.p,this.prime=b}else d(a.gtn(1),"modulus must be greater than 1"),this.m=a,this.prime=null}function t(a){s.call(this,a),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof b?b.exports=f:c.BN=f,f.BN=f,f.wordSize=26;var u;try{u=a("buffer").Buffer}catch(v){}f.isBN=function(a){return a instanceof f||null!==a&&"object"==typeof a&&a.constructor.wordSize===f.wordSize&&Array.isArray(a.words)},f.max=function(a,b){return a.cmp(b)>0?a:b},f.min=function(a,b){return a.cmp(b)<0?a:b},f.prototype._init=function(a,b,c){if("number"==typeof a)return this._initNumber(a,b,c);if("object"==typeof a)return this._initArray(a,b,c);"hex"===b&&(b=16),d(b===(0|b)&&b>=2&&b<=36),a=a.toString().replace(/\s+/g,"");var e=0;"-"===a[0]&&e++,16===b?this._parseHex(a,e):this._parseBase(a,b,e),"-"===a[0]&&(this.negative=1),this.strip(),"le"===c&&this._initArray(this.toArray(),b,c)},f.prototype._initNumber=function(a,b,c){a<0&&(this.negative=1,a=-a),a<67108864?(this.words=[67108863&a],this.length=1):a<4503599627370496?(this.words=[67108863&a,a/67108864&67108863],this.length=2):(d(a<9007199254740992),this.words=[67108863&a,a/67108864&67108863,1],this.length=3),"le"===c&&this._initArray(this.toArray(),b,c)},f.prototype._initArray=function(a,b,c){if(d("number"==typeof a.length),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=new Array(this.length);for(var e=0;e<this.length;e++)this.words[e]=0;var f,g,h=0;if("be"===c)for(e=a.length-1,f=0;e>=0;e-=3)g=a[e]|a[e-1]<<8|a[e-2]<<16,this.words[f]|=g<<h&67108863,this.words[f+1]=g>>>26-h&67108863,h+=24,h>=26&&(h-=26,f++);else if("le"===c)for(e=0,f=0;e<a.length;e+=3)g=a[e]|a[e+1]<<8|a[e+2]<<16,this.words[f]|=g<<h&67108863,this.words[f+1]=g>>>26-h&67108863,h+=24,h>=26&&(h-=26,f++);return this.strip()},f.prototype._parseHex=function(a,b){this.length=Math.ceil((a.length-b)/6),this.words=new Array(this.length);for(var c=0;c<this.length;c++)this.words[c]=0;var d,e,f=0;for(c=a.length-6,d=0;c>=b;c-=6)e=g(a,c,c+6),this.words[d]|=e<<f&67108863,this.words[d+1]|=e>>>26-f&4194303,f+=24,f>=26&&(f-=26,d++);c+6!==b&&(e=g(a,b,c+6),this.words[d]|=e<<f&67108863,this.words[d+1]|=e>>>26-f&4194303),this.strip()},f.prototype._parseBase=function(a,b,c){this.words=[0],this.length=1;for(var d=0,e=1;e<=67108863;e*=b)d++;d--,e=e/b|0;for(var f=a.length-c,g=f%d,i=Math.min(f,f-g)+c,j=0,k=c;k<i;k+=d)j=h(a,k,k+d,b),this.imuln(e),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j);if(0!==g){var l=1;for(j=h(a,k,a.length,b),k=0;k<g;k++)l*=b;this.imuln(l),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j)}},f.prototype.copy=function(a){a.words=new Array(this.length);for(var b=0;b<this.length;b++)a.words[b]=this.words[b];a.length=this.length,a.negative=this.negative,a.red=this.red},f.prototype.clone=function(){var a=new f(null);return this.copy(a),a},f.prototype._expand=function(a){for(;this.length<a;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;
return this._normSign()},f.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(a,b){a=a||10,b=0|b||1;var c;if(16===a||"hex"===a){c="";for(var e=0,f=0,g=0;g<this.length;g++){var h=this.words[g],i=(16777215&(h<<e|f)).toString(16);f=h>>>24-e&16777215,c=0!==f||g!==this.length-1?w[6-i.length]+i+c:i+c,e+=2,e>=26&&(e-=26,g--)}for(0!==f&&(c=f.toString(16)+c);c.length%b!==0;)c="0"+c;return 0!==this.negative&&(c="-"+c),c}if(a===(0|a)&&a>=2&&a<=36){var j=x[a],k=y[a];c="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modn(k).toString(a);l=l.idivn(k),c=l.isZero()?m+c:w[j-m.length]+m+c}for(this.isZero()&&(c="0"+c);c.length%b!==0;)c="0"+c;return 0!==this.negative&&(c="-"+c),c}d(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var a=this.words[0];return 2===this.length?a+=67108864*this.words[1]:3===this.length&&1===this.words[2]?a+=4503599627370496+67108864*this.words[1]:this.length>2&&d(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-a:a},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(a,b){return d("undefined"!=typeof u),this.toArrayLike(u,a,b)},f.prototype.toArray=function(a,b){return this.toArrayLike(Array,a,b)},f.prototype.toArrayLike=function(a,b,c){var e=this.byteLength(),f=c||Math.max(1,e);d(e<=f,"byte array longer than desired length"),d(f>0,"Requested array length <= 0"),this.strip();var g,h,i="le"===b,j=new a(f),k=this.clone();if(i){for(h=0;!k.isZero();h++)g=k.andln(255),k.iushrn(8),j[h]=g;for(;h<f;h++)j[h]=0}else{for(h=0;h<f-e;h++)j[h]=0;for(h=0;!k.isZero();h++)g=k.andln(255),k.iushrn(8),j[f-h-1]=g}return j},Math.clz32?f.prototype._countBits=function(a){return 32-Math.clz32(a)}:f.prototype._countBits=function(a){var b=a,c=0;return b>=4096&&(c+=13,b>>>=13),b>=64&&(c+=7,b>>>=7),b>=8&&(c+=4,b>>>=4),b>=2&&(c+=2,b>>>=2),c+b},f.prototype._zeroBits=function(a){if(0===a)return 26;var b=a,c=0;return 0===(8191&b)&&(c+=13,b>>>=13),0===(127&b)&&(c+=7,b>>>=7),0===(15&b)&&(c+=4,b>>>=4),0===(3&b)&&(c+=2,b>>>=2),0===(1&b)&&c++,c},f.prototype.bitLength=function(){var a=this.words[this.length-1],b=this._countBits(a);return 26*(this.length-1)+b},f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,b=0;b<this.length;b++){var c=this._zeroBits(this.words[b]);if(a+=c,26!==c)break}return a},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(a){return 0!==this.negative?this.abs().inotn(a).iaddn(1):this.clone()},f.prototype.fromTwos=function(a){return this.testn(a-1)?this.notn(a).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return 0!==this.negative},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(a){for(;this.length<a.length;)this.words[this.length++]=0;for(var b=0;b<a.length;b++)this.words[b]=this.words[b]|a.words[b];return this.strip()},f.prototype.ior=function(a){return d(0===(this.negative|a.negative)),this.iuor(a)},f.prototype.or=function(a){return this.length>a.length?this.clone().ior(a):a.clone().ior(this)},f.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},f.prototype.iuand=function(a){var b;b=this.length>a.length?a:this;for(var c=0;c<b.length;c++)this.words[c]=this.words[c]&a.words[c];return this.length=b.length,this.strip()},f.prototype.iand=function(a){return d(0===(this.negative|a.negative)),this.iuand(a)},f.prototype.and=function(a){return this.length>a.length?this.clone().iand(a):a.clone().iand(this)},f.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},f.prototype.iuxor=function(a){var b,c;this.length>a.length?(b=this,c=a):(b=a,c=this);for(var d=0;d<c.length;d++)this.words[d]=b.words[d]^c.words[d];if(this!==b)for(;d<b.length;d++)this.words[d]=b.words[d];return this.length=b.length,this.strip()},f.prototype.ixor=function(a){return d(0===(this.negative|a.negative)),this.iuxor(a)},f.prototype.xor=function(a){return this.length>a.length?this.clone().ixor(a):a.clone().ixor(this)},f.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},f.prototype.inotn=function(a){d("number"==typeof a&&a>=0);var b=0|Math.ceil(a/26),c=a%26;this._expand(b),c>0&&b--;for(var e=0;e<b;e++)this.words[e]=67108863&~this.words[e];return c>0&&(this.words[e]=~this.words[e]&67108863>>26-c),this.strip()},f.prototype.notn=function(a){return this.clone().inotn(a)},f.prototype.setn=function(a,b){d("number"==typeof a&&a>=0);var c=a/26|0,e=a%26;return this._expand(c+1),b?this.words[c]=this.words[c]|1<<e:this.words[c]=this.words[c]&~(1<<e),this.strip()},f.prototype.iadd=function(a){var b;if(0!==this.negative&&0===a.negative)return this.negative=0,b=this.isub(a),this.negative^=1,this._normSign();if(0===this.negative&&0!==a.negative)return a.negative=0,b=this.isub(a),a.negative=1,b._normSign();var c,d;this.length>a.length?(c=this,d=a):(c=a,d=this);for(var e=0,f=0;f<d.length;f++)b=(0|c.words[f])+(0|d.words[f])+e,this.words[f]=67108863&b,e=b>>>26;for(;0!==e&&f<c.length;f++)b=(0|c.words[f])+e,this.words[f]=67108863&b,e=b>>>26;if(this.length=c.length,0!==e)this.words[this.length]=e,this.length++;else if(c!==this)for(;f<c.length;f++)this.words[f]=c.words[f];return this},f.prototype.add=function(a){var b;return 0!==a.negative&&0===this.negative?(a.negative=0,b=this.sub(a),a.negative^=1,b):0===a.negative&&0!==this.negative?(this.negative=0,b=a.sub(this),this.negative=1,b):this.length>a.length?this.clone().iadd(a):a.clone().iadd(this)},f.prototype.isub=function(a){if(0!==a.negative){a.negative=0;var b=this.iadd(a);return a.negative=1,b._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(0===c)return this.negative=0,this.length=1,this.words[0]=0,this;var d,e;c>0?(d=this,e=a):(d=a,e=this);for(var f=0,g=0;g<e.length;g++)b=(0|d.words[g])-(0|e.words[g])+f,f=b>>26,this.words[g]=67108863&b;for(;0!==f&&g<d.length;g++)b=(0|d.words[g])+f,f=b>>26,this.words[g]=67108863&b;if(0===f&&g<d.length&&d!==this)for(;g<d.length;g++)this.words[g]=d.words[g];return this.length=Math.max(this.length,g),d!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(a){return this.clone().isub(a)};var z=function(a,b,c){var d,e,f,g=a.words,h=b.words,i=c.words,j=0,k=0|g[0],l=8191&k,m=k>>>13,n=0|g[1],o=8191&n,p=n>>>13,q=0|g[2],r=8191&q,s=q>>>13,t=0|g[3],u=8191&t,v=t>>>13,w=0|g[4],x=8191&w,y=w>>>13,z=0|g[5],A=8191&z,B=z>>>13,C=0|g[6],D=8191&C,E=C>>>13,F=0|g[7],G=8191&F,H=F>>>13,I=0|g[8],J=8191&I,K=I>>>13,L=0|g[9],M=8191&L,N=L>>>13,O=0|h[0],P=8191&O,Q=O>>>13,R=0|h[1],S=8191&R,T=R>>>13,U=0|h[2],V=8191&U,W=U>>>13,X=0|h[3],Y=8191&X,Z=X>>>13,$=0|h[4],_=8191&$,aa=$>>>13,ba=0|h[5],ca=8191&ba,da=ba>>>13,ea=0|h[6],fa=8191&ea,ga=ea>>>13,ha=0|h[7],ia=8191&ha,ja=ha>>>13,ka=0|h[8],la=8191&ka,ma=ka>>>13,na=0|h[9],oa=8191&na,pa=na>>>13;c.negative=a.negative^b.negative,c.length=19,d=Math.imul(l,P),e=Math.imul(l,Q),e=e+Math.imul(m,P)|0,f=Math.imul(m,Q);var qa=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(qa>>>26)|0,qa&=67108863,d=Math.imul(o,P),e=Math.imul(o,Q),e=e+Math.imul(p,P)|0,f=Math.imul(p,Q),d=d+Math.imul(l,S)|0,e=e+Math.imul(l,T)|0,e=e+Math.imul(m,S)|0,f=f+Math.imul(m,T)|0;var ra=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(ra>>>26)|0,ra&=67108863,d=Math.imul(r,P),e=Math.imul(r,Q),e=e+Math.imul(s,P)|0,f=Math.imul(s,Q),d=d+Math.imul(o,S)|0,e=e+Math.imul(o,T)|0,e=e+Math.imul(p,S)|0,f=f+Math.imul(p,T)|0,d=d+Math.imul(l,V)|0,e=e+Math.imul(l,W)|0,e=e+Math.imul(m,V)|0,f=f+Math.imul(m,W)|0;var sa=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(sa>>>26)|0,sa&=67108863,d=Math.imul(u,P),e=Math.imul(u,Q),e=e+Math.imul(v,P)|0,f=Math.imul(v,Q),d=d+Math.imul(r,S)|0,e=e+Math.imul(r,T)|0,e=e+Math.imul(s,S)|0,f=f+Math.imul(s,T)|0,d=d+Math.imul(o,V)|0,e=e+Math.imul(o,W)|0,e=e+Math.imul(p,V)|0,f=f+Math.imul(p,W)|0,d=d+Math.imul(l,Y)|0,e=e+Math.imul(l,Z)|0,e=e+Math.imul(m,Y)|0,f=f+Math.imul(m,Z)|0;var ta=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(ta>>>26)|0,ta&=67108863,d=Math.imul(x,P),e=Math.imul(x,Q),e=e+Math.imul(y,P)|0,f=Math.imul(y,Q),d=d+Math.imul(u,S)|0,e=e+Math.imul(u,T)|0,e=e+Math.imul(v,S)|0,f=f+Math.imul(v,T)|0,d=d+Math.imul(r,V)|0,e=e+Math.imul(r,W)|0,e=e+Math.imul(s,V)|0,f=f+Math.imul(s,W)|0,d=d+Math.imul(o,Y)|0,e=e+Math.imul(o,Z)|0,e=e+Math.imul(p,Y)|0,f=f+Math.imul(p,Z)|0,d=d+Math.imul(l,_)|0,e=e+Math.imul(l,aa)|0,e=e+Math.imul(m,_)|0,f=f+Math.imul(m,aa)|0;var ua=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(ua>>>26)|0,ua&=67108863,d=Math.imul(A,P),e=Math.imul(A,Q),e=e+Math.imul(B,P)|0,f=Math.imul(B,Q),d=d+Math.imul(x,S)|0,e=e+Math.imul(x,T)|0,e=e+Math.imul(y,S)|0,f=f+Math.imul(y,T)|0,d=d+Math.imul(u,V)|0,e=e+Math.imul(u,W)|0,e=e+Math.imul(v,V)|0,f=f+Math.imul(v,W)|0,d=d+Math.imul(r,Y)|0,e=e+Math.imul(r,Z)|0,e=e+Math.imul(s,Y)|0,f=f+Math.imul(s,Z)|0,d=d+Math.imul(o,_)|0,e=e+Math.imul(o,aa)|0,e=e+Math.imul(p,_)|0,f=f+Math.imul(p,aa)|0,d=d+Math.imul(l,ca)|0,e=e+Math.imul(l,da)|0,e=e+Math.imul(m,ca)|0,f=f+Math.imul(m,da)|0;var va=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(va>>>26)|0,va&=67108863,d=Math.imul(D,P),e=Math.imul(D,Q),e=e+Math.imul(E,P)|0,f=Math.imul(E,Q),d=d+Math.imul(A,S)|0,e=e+Math.imul(A,T)|0,e=e+Math.imul(B,S)|0,f=f+Math.imul(B,T)|0,d=d+Math.imul(x,V)|0,e=e+Math.imul(x,W)|0,e=e+Math.imul(y,V)|0,f=f+Math.imul(y,W)|0,d=d+Math.imul(u,Y)|0,e=e+Math.imul(u,Z)|0,e=e+Math.imul(v,Y)|0,f=f+Math.imul(v,Z)|0,d=d+Math.imul(r,_)|0,e=e+Math.imul(r,aa)|0,e=e+Math.imul(s,_)|0,f=f+Math.imul(s,aa)|0,d=d+Math.imul(o,ca)|0,e=e+Math.imul(o,da)|0,e=e+Math.imul(p,ca)|0,f=f+Math.imul(p,da)|0,d=d+Math.imul(l,fa)|0,e=e+Math.imul(l,ga)|0,e=e+Math.imul(m,fa)|0,f=f+Math.imul(m,ga)|0;var wa=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(wa>>>26)|0,wa&=67108863,d=Math.imul(G,P),e=Math.imul(G,Q),e=e+Math.imul(H,P)|0,f=Math.imul(H,Q),d=d+Math.imul(D,S)|0,e=e+Math.imul(D,T)|0,e=e+Math.imul(E,S)|0,f=f+Math.imul(E,T)|0,d=d+Math.imul(A,V)|0,e=e+Math.imul(A,W)|0,e=e+Math.imul(B,V)|0,f=f+Math.imul(B,W)|0,d=d+Math.imul(x,Y)|0,e=e+Math.imul(x,Z)|0,e=e+Math.imul(y,Y)|0,f=f+Math.imul(y,Z)|0,d=d+Math.imul(u,_)|0,e=e+Math.imul(u,aa)|0,e=e+Math.imul(v,_)|0,f=f+Math.imul(v,aa)|0,d=d+Math.imul(r,ca)|0,e=e+Math.imul(r,da)|0,e=e+Math.imul(s,ca)|0,f=f+Math.imul(s,da)|0,d=d+Math.imul(o,fa)|0,e=e+Math.imul(o,ga)|0,e=e+Math.imul(p,fa)|0,f=f+Math.imul(p,ga)|0,d=d+Math.imul(l,ia)|0,e=e+Math.imul(l,ja)|0,e=e+Math.imul(m,ia)|0,f=f+Math.imul(m,ja)|0;var xa=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(xa>>>26)|0,xa&=67108863,d=Math.imul(J,P),e=Math.imul(J,Q),e=e+Math.imul(K,P)|0,f=Math.imul(K,Q),d=d+Math.imul(G,S)|0,e=e+Math.imul(G,T)|0,e=e+Math.imul(H,S)|0,f=f+Math.imul(H,T)|0,d=d+Math.imul(D,V)|0,e=e+Math.imul(D,W)|0,e=e+Math.imul(E,V)|0,f=f+Math.imul(E,W)|0,d=d+Math.imul(A,Y)|0,e=e+Math.imul(A,Z)|0,e=e+Math.imul(B,Y)|0,f=f+Math.imul(B,Z)|0,d=d+Math.imul(x,_)|0,e=e+Math.imul(x,aa)|0,e=e+Math.imul(y,_)|0,f=f+Math.imul(y,aa)|0,d=d+Math.imul(u,ca)|0,e=e+Math.imul(u,da)|0,e=e+Math.imul(v,ca)|0,f=f+Math.imul(v,da)|0,d=d+Math.imul(r,fa)|0,e=e+Math.imul(r,ga)|0,e=e+Math.imul(s,fa)|0,f=f+Math.imul(s,ga)|0,d=d+Math.imul(o,ia)|0,e=e+Math.imul(o,ja)|0,e=e+Math.imul(p,ia)|0,f=f+Math.imul(p,ja)|0,d=d+Math.imul(l,la)|0,e=e+Math.imul(l,ma)|0,e=e+Math.imul(m,la)|0,f=f+Math.imul(m,ma)|0;var ya=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(ya>>>26)|0,ya&=67108863,d=Math.imul(M,P),e=Math.imul(M,Q),e=e+Math.imul(N,P)|0,f=Math.imul(N,Q),d=d+Math.imul(J,S)|0,e=e+Math.imul(J,T)|0,e=e+Math.imul(K,S)|0,f=f+Math.imul(K,T)|0,d=d+Math.imul(G,V)|0,e=e+Math.imul(G,W)|0,e=e+Math.imul(H,V)|0,f=f+Math.imul(H,W)|0,d=d+Math.imul(D,Y)|0,e=e+Math.imul(D,Z)|0,e=e+Math.imul(E,Y)|0,f=f+Math.imul(E,Z)|0,d=d+Math.imul(A,_)|0,e=e+Math.imul(A,aa)|0,e=e+Math.imul(B,_)|0,f=f+Math.imul(B,aa)|0,d=d+Math.imul(x,ca)|0,e=e+Math.imul(x,da)|0,e=e+Math.imul(y,ca)|0,f=f+Math.imul(y,da)|0,d=d+Math.imul(u,fa)|0,e=e+Math.imul(u,ga)|0,e=e+Math.imul(v,fa)|0,f=f+Math.imul(v,ga)|0,d=d+Math.imul(r,ia)|0,e=e+Math.imul(r,ja)|0,e=e+Math.imul(s,ia)|0,f=f+Math.imul(s,ja)|0,d=d+Math.imul(o,la)|0,e=e+Math.imul(o,ma)|0,e=e+Math.imul(p,la)|0,f=f+Math.imul(p,ma)|0,d=d+Math.imul(l,oa)|0,e=e+Math.imul(l,pa)|0,e=e+Math.imul(m,oa)|0,f=f+Math.imul(m,pa)|0;var za=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(za>>>26)|0,za&=67108863,d=Math.imul(M,S),e=Math.imul(M,T),e=e+Math.imul(N,S)|0,f=Math.imul(N,T),d=d+Math.imul(J,V)|0,e=e+Math.imul(J,W)|0,e=e+Math.imul(K,V)|0,f=f+Math.imul(K,W)|0,d=d+Math.imul(G,Y)|0,e=e+Math.imul(G,Z)|0,e=e+Math.imul(H,Y)|0,f=f+Math.imul(H,Z)|0,d=d+Math.imul(D,_)|0,e=e+Math.imul(D,aa)|0,e=e+Math.imul(E,_)|0,f=f+Math.imul(E,aa)|0,d=d+Math.imul(A,ca)|0,e=e+Math.imul(A,da)|0,e=e+Math.imul(B,ca)|0,f=f+Math.imul(B,da)|0,d=d+Math.imul(x,fa)|0,e=e+Math.imul(x,ga)|0,e=e+Math.imul(y,fa)|0,f=f+Math.imul(y,ga)|0,d=d+Math.imul(u,ia)|0,e=e+Math.imul(u,ja)|0,e=e+Math.imul(v,ia)|0,f=f+Math.imul(v,ja)|0,d=d+Math.imul(r,la)|0,e=e+Math.imul(r,ma)|0,e=e+Math.imul(s,la)|0,f=f+Math.imul(s,ma)|0,d=d+Math.imul(o,oa)|0,e=e+Math.imul(o,pa)|0,e=e+Math.imul(p,oa)|0,f=f+Math.imul(p,pa)|0;var Aa=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,d=Math.imul(M,V),e=Math.imul(M,W),e=e+Math.imul(N,V)|0,f=Math.imul(N,W),d=d+Math.imul(J,Y)|0,e=e+Math.imul(J,Z)|0,e=e+Math.imul(K,Y)|0,f=f+Math.imul(K,Z)|0,d=d+Math.imul(G,_)|0,e=e+Math.imul(G,aa)|0,e=e+Math.imul(H,_)|0,f=f+Math.imul(H,aa)|0,d=d+Math.imul(D,ca)|0,e=e+Math.imul(D,da)|0,e=e+Math.imul(E,ca)|0,f=f+Math.imul(E,da)|0,d=d+Math.imul(A,fa)|0,e=e+Math.imul(A,ga)|0,e=e+Math.imul(B,fa)|0,f=f+Math.imul(B,ga)|0,d=d+Math.imul(x,ia)|0,e=e+Math.imul(x,ja)|0,e=e+Math.imul(y,ia)|0,f=f+Math.imul(y,ja)|0,d=d+Math.imul(u,la)|0,e=e+Math.imul(u,ma)|0,e=e+Math.imul(v,la)|0,f=f+Math.imul(v,ma)|0,d=d+Math.imul(r,oa)|0,e=e+Math.imul(r,pa)|0,e=e+Math.imul(s,oa)|0,f=f+Math.imul(s,pa)|0;var Ba=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,d=Math.imul(M,Y),e=Math.imul(M,Z),e=e+Math.imul(N,Y)|0,f=Math.imul(N,Z),d=d+Math.imul(J,_)|0,e=e+Math.imul(J,aa)|0,e=e+Math.imul(K,_)|0,f=f+Math.imul(K,aa)|0,d=d+Math.imul(G,ca)|0,e=e+Math.imul(G,da)|0,e=e+Math.imul(H,ca)|0,f=f+Math.imul(H,da)|0,d=d+Math.imul(D,fa)|0,e=e+Math.imul(D,ga)|0,e=e+Math.imul(E,fa)|0,f=f+Math.imul(E,ga)|0,d=d+Math.imul(A,ia)|0,e=e+Math.imul(A,ja)|0,e=e+Math.imul(B,ia)|0,f=f+Math.imul(B,ja)|0,d=d+Math.imul(x,la)|0,e=e+Math.imul(x,ma)|0,e=e+Math.imul(y,la)|0,f=f+Math.imul(y,ma)|0,d=d+Math.imul(u,oa)|0,e=e+Math.imul(u,pa)|0,e=e+Math.imul(v,oa)|0,f=f+Math.imul(v,pa)|0;var Ca=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,d=Math.imul(M,_),e=Math.imul(M,aa),e=e+Math.imul(N,_)|0,f=Math.imul(N,aa),d=d+Math.imul(J,ca)|0,e=e+Math.imul(J,da)|0,e=e+Math.imul(K,ca)|0,f=f+Math.imul(K,da)|0,d=d+Math.imul(G,fa)|0,e=e+Math.imul(G,ga)|0,e=e+Math.imul(H,fa)|0,f=f+Math.imul(H,ga)|0,d=d+Math.imul(D,ia)|0,e=e+Math.imul(D,ja)|0,e=e+Math.imul(E,ia)|0,f=f+Math.imul(E,ja)|0,d=d+Math.imul(A,la)|0,e=e+Math.imul(A,ma)|0,e=e+Math.imul(B,la)|0,f=f+Math.imul(B,ma)|0,d=d+Math.imul(x,oa)|0,e=e+Math.imul(x,pa)|0,e=e+Math.imul(y,oa)|0,f=f+Math.imul(y,pa)|0;var Da=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(Da>>>26)|0,Da&=67108863,d=Math.imul(M,ca),e=Math.imul(M,da),e=e+Math.imul(N,ca)|0,f=Math.imul(N,da),d=d+Math.imul(J,fa)|0,e=e+Math.imul(J,ga)|0,e=e+Math.imul(K,fa)|0,f=f+Math.imul(K,ga)|0,d=d+Math.imul(G,ia)|0,e=e+Math.imul(G,ja)|0,e=e+Math.imul(H,ia)|0,f=f+Math.imul(H,ja)|0,d=d+Math.imul(D,la)|0,e=e+Math.imul(D,ma)|0,e=e+Math.imul(E,la)|0,f=f+Math.imul(E,ma)|0,d=d+Math.imul(A,oa)|0,e=e+Math.imul(A,pa)|0,e=e+Math.imul(B,oa)|0,f=f+Math.imul(B,pa)|0;var Ea=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(Ea>>>26)|0,Ea&=67108863,d=Math.imul(M,fa),e=Math.imul(M,ga),e=e+Math.imul(N,fa)|0,f=Math.imul(N,ga),d=d+Math.imul(J,ia)|0,e=e+Math.imul(J,ja)|0,e=e+Math.imul(K,ia)|0,f=f+Math.imul(K,ja)|0,d=d+Math.imul(G,la)|0,e=e+Math.imul(G,ma)|0,e=e+Math.imul(H,la)|0,f=f+Math.imul(H,ma)|0,d=d+Math.imul(D,oa)|0,e=e+Math.imul(D,pa)|0,e=e+Math.imul(E,oa)|0,f=f+Math.imul(E,pa)|0;var Fa=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,d=Math.imul(M,ia),e=Math.imul(M,ja),e=e+Math.imul(N,ia)|0,f=Math.imul(N,ja),d=d+Math.imul(J,la)|0,e=e+Math.imul(J,ma)|0,e=e+Math.imul(K,la)|0,f=f+Math.imul(K,ma)|0,d=d+Math.imul(G,oa)|0,e=e+Math.imul(G,pa)|0,e=e+Math.imul(H,oa)|0,f=f+Math.imul(H,pa)|0;var Ga=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,d=Math.imul(M,la),e=Math.imul(M,ma),e=e+Math.imul(N,la)|0,f=Math.imul(N,ma),d=d+Math.imul(J,oa)|0,e=e+Math.imul(J,pa)|0,e=e+Math.imul(K,oa)|0,f=f+Math.imul(K,pa)|0;var Ha=(j+d|0)+((8191&e)<<13)|0;j=(f+(e>>>13)|0)+(Ha>>>26)|0,Ha&=67108863,d=Math.imul(M,oa),e=Math.imul(M,pa),e=e+Math.imul(N,oa)|0,f=Math.imul(N,pa);var Ia=(j+d|0)+((8191&e)<<13)|0;return j=(f+(e>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,i[0]=qa,i[1]=ra,i[2]=sa,i[3]=ta,i[4]=ua,i[5]=va,i[6]=wa,i[7]=xa,i[8]=ya,i[9]=za,i[10]=Aa,i[11]=Ba,i[12]=Ca,i[13]=Da,i[14]=Ea,i[15]=Fa,i[16]=Ga,i[17]=Ha,i[18]=Ia,0!==j&&(i[19]=j,c.length++),c};Math.imul||(z=j),f.prototype.mulTo=function(a,b){var c,d=this.length+a.length;return c=10===this.length&&10===a.length?z(this,a,b):d<63?j(this,a,b):d<1024?k(this,a,b):l(this,a,b)},m.prototype.makeRBT=function(a){for(var b=new Array(a),c=f.prototype._countBits(a)-1,d=0;d<a;d++)b[d]=this.revBin(d,c,a);return b},m.prototype.revBin=function(a,b,c){if(0===a||a===c-1)return a;for(var d=0,e=0;e<b;e++)d|=(1&a)<<b-e-1,a>>=1;return d},m.prototype.permute=function(a,b,c,d,e,f){for(var g=0;g<f;g++)d[g]=b[a[g]],e[g]=c[a[g]]},m.prototype.transform=function(a,b,c,d,e,f){this.permute(f,a,b,c,d,e);for(var g=1;g<e;g<<=1)for(var h=g<<1,i=Math.cos(2*Math.PI/h),j=Math.sin(2*Math.PI/h),k=0;k<e;k+=h)for(var l=i,m=j,n=0;n<g;n++){var o=c[k+n],p=d[k+n],q=c[k+n+g],r=d[k+n+g],s=l*q-m*r;r=l*r+m*q,q=s,c[k+n]=o+q,d[k+n]=p+r,c[k+n+g]=o-q,d[k+n+g]=p-r,n!==h&&(s=i*l-j*m,m=i*m+j*l,l=s)}},m.prototype.guessLen13b=function(a,b){var c=1|Math.max(b,a),d=1&c,e=0;for(c=c/2|0;c;c>>>=1)e++;return 1<<e+1+d},m.prototype.conjugate=function(a,b,c){if(!(c<=1))for(var d=0;d<c/2;d++){var e=a[d];a[d]=a[c-d-1],a[c-d-1]=e,e=b[d],b[d]=-b[c-d-1],b[c-d-1]=-e}},m.prototype.normalize13b=function(a,b){for(var c=0,d=0;d<b/2;d++){var e=8192*Math.round(a[2*d+1]/b)+Math.round(a[2*d]/b)+c;a[d]=67108863&e,c=e<67108864?0:e/67108864|0}return a},m.prototype.convert13b=function(a,b,c,e){for(var f=0,g=0;g<b;g++)f+=0|a[g],c[2*g]=8191&f,f>>>=13,c[2*g+1]=8191&f,f>>>=13;for(g=2*b;g<e;++g)c[g]=0;d(0===f),d(0===(f&-8192))},m.prototype.stub=function(a){for(var b=new Array(a),c=0;c<a;c++)b[c]=0;return b},m.prototype.mulp=function(a,b,c){var d=2*this.guessLen13b(a.length,b.length),e=this.makeRBT(d),f=this.stub(d),g=new Array(d),h=new Array(d),i=new Array(d),j=new Array(d),k=new Array(d),l=new Array(d),m=c.words;m.length=d,this.convert13b(a.words,a.length,g,d),this.convert13b(b.words,b.length,j,d),this.transform(g,f,h,i,d,e),this.transform(j,f,k,l,d,e);for(var n=0;n<d;n++){var o=h[n]*k[n]-i[n]*l[n];i[n]=h[n]*l[n]+i[n]*k[n],h[n]=o}return this.conjugate(h,i,d),this.transform(h,i,m,f,d,e),this.conjugate(m,f,d),this.normalize13b(m,d),c.negative=a.negative^b.negative,c.length=a.length+b.length,c.strip()},f.prototype.mul=function(a){var b=new f(null);return b.words=new Array(this.length+a.length),this.mulTo(a,b)},f.prototype.mulf=function(a){var b=new f(null);return b.words=new Array(this.length+a.length),l(this,a,b)},f.prototype.imul=function(a){return this.clone().mulTo(a,this)},f.prototype.imuln=function(a){d("number"==typeof a),d(a<67108864);for(var b=0,c=0;c<this.length;c++){var e=(0|this.words[c])*a,f=(67108863&e)+(67108863&b);b>>=26,b+=e/67108864|0,b+=f>>>26,this.words[c]=67108863&f}return 0!==b&&(this.words[c]=b,this.length++),this},f.prototype.muln=function(a){return this.clone().imuln(a)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(a){var b=i(a);if(0===b.length)return new f(1);for(var c=this,d=0;d<b.length&&0===b[d];d++,c=c.sqr());if(++d<b.length)for(var e=c.sqr();d<b.length;d++,e=e.sqr())0!==b[d]&&(c=c.mul(e));return c},f.prototype.iushln=function(a){d("number"==typeof a&&a>=0);var b,c=a%26,e=(a-c)/26,f=67108863>>>26-c<<26-c;if(0!==c){var g=0;for(b=0;b<this.length;b++){var h=this.words[b]&f,i=(0|this.words[b])-h<<c;this.words[b]=i|g,g=h>>>26-c}g&&(this.words[b]=g,this.length++)}if(0!==e){for(b=this.length-1;b>=0;b--)this.words[b+e]=this.words[b];for(b=0;b<e;b++)this.words[b]=0;this.length+=e}return this.strip()},f.prototype.ishln=function(a){return d(0===this.negative),this.iushln(a)},f.prototype.iushrn=function(a,b,c){d("number"==typeof a&&a>=0);var e;e=b?(b-b%26)/26:0;var f=a%26,g=Math.min((a-f)/26,this.length),h=67108863^67108863>>>f<<f,i=c;if(e-=g,e=Math.max(0,e),i){for(var j=0;j<g;j++)i.words[j]=this.words[j];i.length=g}if(0===g);else if(this.length>g)for(this.length-=g,j=0;j<this.length;j++)this.words[j]=this.words[j+g];else this.words[0]=0,this.length=1;var k=0;for(j=this.length-1;j>=0&&(0!==k||j>=e);j--){var l=0|this.words[j];this.words[j]=k<<26-f|l>>>f,k=l&h}return i&&0!==k&&(i.words[i.length++]=k),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(a,b,c){return d(0===this.negative),this.iushrn(a,b,c)},f.prototype.shln=function(a){return this.clone().ishln(a)},f.prototype.ushln=function(a){return this.clone().iushln(a)},f.prototype.shrn=function(a){return this.clone().ishrn(a)},f.prototype.ushrn=function(a){return this.clone().iushrn(a)},f.prototype.testn=function(a){d("number"==typeof a&&a>=0);var b=a%26,c=(a-b)/26,e=1<<b;if(this.length<=c)return!1;var f=this.words[c];return!!(f&e)},f.prototype.imaskn=function(a){d("number"==typeof a&&a>=0);var b=a%26,c=(a-b)/26;if(d(0===this.negative,"imaskn works only with positive numbers"),this.length<=c)return this;if(0!==b&&c++,this.length=Math.min(c,this.length),0!==b){var e=67108863^67108863>>>b<<b;this.words[this.length-1]&=e}return this.strip()},f.prototype.maskn=function(a){return this.clone().imaskn(a)},f.prototype.iaddn=function(a){return d("number"==typeof a),d(a<67108864),a<0?this.isubn(-a):0!==this.negative?1===this.length&&(0|this.words[0])<a?(this.words[0]=a-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(a),this.negative=1,this):this._iaddn(a)},f.prototype._iaddn=function(a){this.words[0]+=a;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},f.prototype.isubn=function(a){if(d("number"==typeof a),d(a<67108864),a<0)return this.iaddn(-a);if(0!==this.negative)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this.strip()},f.prototype.addn=function(a){return this.clone().iaddn(a)},f.prototype.subn=function(a){return this.clone().isubn(a)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(a,b,c){var e,f=a.length+c;this._expand(f);var g,h=0;for(e=0;e<a.length;e++){g=(0|this.words[e+c])+h;var i=(0|a.words[e])*b;g-=67108863&i,h=(g>>26)-(i/67108864|0),this.words[e+c]=67108863&g}for(;e<this.length-c;e++)g=(0|this.words[e+c])+h,h=g>>26,this.words[e+c]=67108863&g;if(0===h)return this.strip();for(d(h===-1),h=0,e=0;e<this.length;e++)g=-(0|this.words[e])+h,h=g>>26,this.words[e]=67108863&g;return this.negative=1,this.strip()},f.prototype._wordDiv=function(a,b){var c=this.length-a.length,d=this.clone(),e=a,g=0|e.words[e.length-1],h=this._countBits(g);c=26-h,0!==c&&(e=e.ushln(c),d.iushln(c),g=0|e.words[e.length-1]);var i,j=d.length-e.length;if("mod"!==b){i=new f(null),i.length=j+1,i.words=new Array(i.length);for(var k=0;k<i.length;k++)i.words[k]=0}var l=d.clone()._ishlnsubmul(e,1,j);0===l.negative&&(d=l,i&&(i.words[j]=1));for(var m=j-1;m>=0;m--){var n=67108864*(0|d.words[e.length+m])+(0|d.words[e.length+m-1]);for(n=Math.min(n/g|0,67108863),d._ishlnsubmul(e,n,m);0!==d.negative;)n--,d.negative=0,d._ishlnsubmul(e,1,m),d.isZero()||(d.negative^=1);i&&(i.words[m]=n)}return i&&i.strip(),d.strip(),"div"!==b&&0!==c&&d.iushrn(c),{div:i||null,mod:d}},f.prototype.divmod=function(a,b,c){if(d(!a.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var e,g,h;return 0!==this.negative&&0===a.negative?(h=this.neg().divmod(a,b),"mod"!==b&&(e=h.div.neg()),"div"!==b&&(g=h.mod.neg(),c&&0!==g.negative&&g.iadd(a)),{div:e,mod:g}):0===this.negative&&0!==a.negative?(h=this.divmod(a.neg(),b),"mod"!==b&&(e=h.div.neg()),{div:e,mod:h.mod}):0!==(this.negative&a.negative)?(h=this.neg().divmod(a.neg(),b),"div"!==b&&(g=h.mod.neg(),c&&0!==g.negative&&g.isub(a)),{div:h.div,mod:g}):a.length>this.length||this.cmp(a)<0?{div:new f(0),mod:this}:1===a.length?"div"===b?{div:this.divn(a.words[0]),mod:null}:"mod"===b?{div:null,mod:new f(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new f(this.modn(a.words[0]))}:this._wordDiv(a,b)},f.prototype.div=function(a){return this.divmod(a,"div",!1).div},f.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},f.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},f.prototype.divRound=function(a){var b=this.divmod(a);if(b.mod.isZero())return b.div;var c=0!==b.div.negative?b.mod.isub(a):b.mod,d=a.ushrn(1),e=a.andln(1),f=c.cmp(d);return f<0||1===e&&0===f?b.div:0!==b.div.negative?b.div.isubn(1):b.div.iaddn(1)},f.prototype.modn=function(a){d(a<=67108863);for(var b=(1<<26)%a,c=0,e=this.length-1;e>=0;e--)c=(b*c+(0|this.words[e]))%a;return c},f.prototype.idivn=function(a){d(a<=67108863);for(var b=0,c=this.length-1;c>=0;c--){var e=(0|this.words[c])+67108864*b;this.words[c]=e/a|0,b=e%a}return this.strip()},f.prototype.divn=function(a){return this.clone().idivn(a)},f.prototype.egcd=function(a){d(0===a.negative),d(!a.isZero());var b=this,c=a.clone();b=0!==b.negative?b.umod(a):b.clone();for(var e=new f(1),g=new f(0),h=new f(0),i=new f(1),j=0;b.isEven()&&c.isEven();)b.iushrn(1),c.iushrn(1),++j;for(var k=c.clone(),l=b.clone();!b.isZero();){for(var m=0,n=1;0===(b.words[0]&n)&&m<26;++m,n<<=1);if(m>0)for(b.iushrn(m);m-- >0;)(e.isOdd()||g.isOdd())&&(e.iadd(k),g.isub(l)),e.iushrn(1),g.iushrn(1);for(var o=0,p=1;0===(c.words[0]&p)&&o<26;++o,p<<=1);if(o>0)for(c.iushrn(o);o-- >0;)(h.isOdd()||i.isOdd())&&(h.iadd(k),i.isub(l)),h.iushrn(1),i.iushrn(1);b.cmp(c)>=0?(b.isub(c),e.isub(h),g.isub(i)):(c.isub(b),h.isub(e),i.isub(g))}return{a:h,b:i,gcd:c.iushln(j)}},f.prototype._invmp=function(a){d(0===a.negative),d(!a.isZero());var b=this,c=a.clone();b=0!==b.negative?b.umod(a):b.clone();for(var e=new f(1),g=new f(0),h=c.clone();b.cmpn(1)>0&&c.cmpn(1)>0;){for(var i=0,j=1;0===(b.words[0]&j)&&i<26;++i,j<<=1);if(i>0)for(b.iushrn(i);i-- >0;)e.isOdd()&&e.iadd(h),e.iushrn(1);for(var k=0,l=1;0===(c.words[0]&l)&&k<26;++k,l<<=1);if(k>0)for(c.iushrn(k);k-- >0;)g.isOdd()&&g.iadd(h),g.iushrn(1);b.cmp(c)>=0?(b.isub(c),e.isub(g)):(c.isub(b),g.isub(e))}var m;return m=0===b.cmpn(1)?e:g,m.cmpn(0)<0&&m.iadd(a),m},f.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var b=this.clone(),c=a.clone();b.negative=0,c.negative=0;for(var d=0;b.isEven()&&c.isEven();d++)b.iushrn(1),c.iushrn(1);for(;;){for(;b.isEven();)b.iushrn(1);for(;c.isEven();)c.iushrn(1);var e=b.cmp(c);if(e<0){var f=b;b=c,c=f}else if(0===e||0===c.cmpn(1))break;b.isub(c)}return c.iushln(d)},f.prototype.invm=function(a){return this.egcd(a).a.umod(a)},f.prototype.isEven=function(){return 0===(1&this.words[0])},f.prototype.isOdd=function(){return 1===(1&this.words[0])},f.prototype.andln=function(a){return this.words[0]&a},f.prototype.bincn=function(a){d("number"==typeof a);var b=a%26,c=(a-b)/26,e=1<<b;if(this.length<=c)return this._expand(c+1),this.words[c]|=e,this;for(var f=e,g=c;0!==f&&g<this.length;g++){var h=0|this.words[g];h+=f,f=h>>>26,h&=67108863,this.words[g]=h}return 0!==f&&(this.words[g]=f,this.length++),this},f.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},f.prototype.cmpn=function(a){var b=a<0;if(0!==this.negative&&!b)return-1;if(0===this.negative&&b)return 1;this.strip();var c;if(this.length>1)c=1;else{b&&(a=-a),d(a<=67108863,"Number is too big");var e=0|this.words[0];c=e===a?0:e<a?-1:1}return 0!==this.negative?0|-c:c},f.prototype.cmp=function(a){if(0!==this.negative&&0===a.negative)return-1;if(0===this.negative&&0!==a.negative)return 1;var b=this.ucmp(a);return 0!==this.negative?0|-b:b},f.prototype.ucmp=function(a){if(this.length>a.length)return 1;if(this.length<a.length)return-1;for(var b=0,c=this.length-1;c>=0;c--){var d=0|this.words[c],e=0|a.words[c];if(d!==e){d<e?b=-1:d>e&&(b=1);break}}return b},f.prototype.gtn=function(a){return 1===this.cmpn(a)},f.prototype.gt=function(a){return 1===this.cmp(a)},f.prototype.gten=function(a){return this.cmpn(a)>=0},f.prototype.gte=function(a){return this.cmp(a)>=0},f.prototype.ltn=function(a){return this.cmpn(a)===-1},f.prototype.lt=function(a){return this.cmp(a)===-1},f.prototype.lten=function(a){return this.cmpn(a)<=0},f.prototype.lte=function(a){return this.cmp(a)<=0},f.prototype.eqn=function(a){return 0===this.cmpn(a)},f.prototype.eq=function(a){return 0===this.cmp(a)},f.red=function(a){return new s(a)},f.prototype.toRed=function(a){return d(!this.red,"Already a number in reduction context"),d(0===this.negative,"red works only with positives"),a.convertTo(this)._forceRed(a)},f.prototype.fromRed=function(){return d(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(a){return this.red=a,this},f.prototype.forceRed=function(a){return d(!this.red,"Already a number in reduction context"),this._forceRed(a)},f.prototype.redAdd=function(a){return d(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},f.prototype.redIAdd=function(a){return d(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},f.prototype.redSub=function(a){return d(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},f.prototype.redISub=function(a){return d(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},f.prototype.redShl=function(a){return d(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},f.prototype.redMul=function(a){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},f.prototype.redIMul=function(a){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},f.prototype.redSqr=function(){return d(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return d(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return d(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){
return d(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return d(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(a){return d(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var A={k256:null,p224:null,p192:null,p25519:null};n.prototype._tmp=function(){var a=new f(null);return a.words=new Array(Math.ceil(this.n/13)),a},n.prototype.ireduce=function(a){var b,c=a;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),b=c.bitLength();while(b>this.n);var d=b<this.n?-1:c.ucmp(this.p);return 0===d?(c.words[0]=0,c.length=1):d>0?c.isub(this.p):c.strip(),c},n.prototype.split=function(a,b){a.iushrn(this.n,0,b)},n.prototype.imulK=function(a){return a.imul(this.k)},e(o,n),o.prototype.split=function(a,b){for(var c=4194303,d=Math.min(a.length,9),e=0;e<d;e++)b.words[e]=a.words[e];if(b.length=d,a.length<=9)return a.words[0]=0,void(a.length=1);var f=a.words[9];for(b.words[b.length++]=f&c,e=10;e<a.length;e++){var g=0|a.words[e];a.words[e-10]=(g&c)<<4|f>>>22,f=g}f>>>=22,a.words[e-10]=f,0===f&&a.length>10?a.length-=10:a.length-=9},o.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var b=0,c=0;c<a.length;c++){var d=0|a.words[c];b+=977*d,a.words[c]=67108863&b,b=64*d+(b/67108864|0)}return 0===a.words[a.length-1]&&(a.length--,0===a.words[a.length-1]&&a.length--),a},e(p,n),e(q,n),e(r,n),r.prototype.imulK=function(a){for(var b=0,c=0;c<a.length;c++){var d=19*(0|a.words[c])+b,e=67108863&d;d>>>=26,a.words[c]=e,b=d}return 0!==b&&(a.words[a.length++]=b),a},f._prime=function B(a){if(A[a])return A[a];var B;if("k256"===a)B=new o;else if("p224"===a)B=new p;else if("p192"===a)B=new q;else{if("p25519"!==a)throw new Error("Unknown prime "+a);B=new r}return A[a]=B,B},s.prototype._verify1=function(a){d(0===a.negative,"red works only with positives"),d(a.red,"red works only with red numbers")},s.prototype._verify2=function(a,b){d(0===(a.negative|b.negative),"red works only with positives"),d(a.red&&a.red===b.red,"red works only with red numbers")},s.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},s.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},s.prototype.add=function(a,b){this._verify2(a,b);var c=a.add(b);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},s.prototype.iadd=function(a,b){this._verify2(a,b);var c=a.iadd(b);return c.cmp(this.m)>=0&&c.isub(this.m),c},s.prototype.sub=function(a,b){this._verify2(a,b);var c=a.sub(b);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},s.prototype.isub=function(a,b){this._verify2(a,b);var c=a.isub(b);return c.cmpn(0)<0&&c.iadd(this.m),c},s.prototype.shl=function(a,b){return this._verify1(a),this.imod(a.ushln(b))},s.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},s.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},s.prototype.isqr=function(a){return this.imul(a,a.clone())},s.prototype.sqr=function(a){return this.mul(a,a)},s.prototype.sqrt=function(a){if(a.isZero())return a.clone();var b=this.m.andln(3);if(d(b%2===1),3===b){var c=this.m.add(new f(1)).iushrn(2);return this.pow(a,c)}for(var e=this.m.subn(1),g=0;!e.isZero()&&0===e.andln(1);)g++,e.iushrn(1);d(!e.isZero());var h=new f(1).toRed(this),i=h.redNeg(),j=this.m.subn(1).iushrn(1),k=this.m.bitLength();for(k=new f(2*k*k).toRed(this);0!==this.pow(k,j).cmp(i);)k.redIAdd(i);for(var l=this.pow(k,e),m=this.pow(a,e.addn(1).iushrn(1)),n=this.pow(a,e),o=g;0!==n.cmp(h);){for(var p=n,q=0;0!==p.cmp(h);q++)p=p.redSqr();d(q<o);var r=this.pow(l,new f(1).iushln(o-q-1));m=m.redMul(r),l=r.redSqr(),n=n.redMul(l),o=q}return m},s.prototype.invm=function(a){var b=a._invmp(this.m);return 0!==b.negative?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},s.prototype.pow=function(a,b){if(b.isZero())return new f(1);if(0===b.cmpn(1))return a.clone();var c=4,d=new Array(1<<c);d[0]=new f(1).toRed(this),d[1]=a;for(var e=2;e<d.length;e++)d[e]=this.mul(d[e-1],a);var g=d[0],h=0,i=0,j=b.bitLength()%26;for(0===j&&(j=26),e=b.length-1;e>=0;e--){for(var k=b.words[e],l=j-1;l>=0;l--){var m=k>>l&1;g!==d[0]&&(g=this.sqr(g)),0!==m||0!==h?(h<<=1,h|=m,i++,(i===c||0===e&&0===l)&&(g=this.mul(g,d[h]),i=0,h=0)):i=0}j=26}return g},s.prototype.convertTo=function(a){var b=a.umod(this.m);return b===a?b.clone():b},s.prototype.convertFrom=function(a){var b=a.clone();return b.red=null,b},f.mont=function(a){return new t(a)},e(t,s),t.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},t.prototype.convertFrom=function(a){var b=this.imod(a.mul(this.rinv));return b.red=null,b},t.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(b),d=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=c.isub(d).iushrn(this.shift),f=e;return e.cmp(this.m)>=0?f=e.isub(this.m):e.cmpn(0)<0&&(f=e.iadd(this.m)),f._forceRed(this)},t.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new f(0)._forceRed(this);var c=a.mul(b),d=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=c.isub(d).iushrn(this.shift),g=e;return e.cmp(this.m)>=0?g=e.isub(this.m):e.cmpn(0)<0&&(g=e.iadd(this.m)),g._forceRed(this)},t.prototype.invm=function(a){var b=this.imod(a._invmp(this.m).mul(this.r2));return b._forceRed(this)}}("undefined"==typeof b||b,this)},{}],41:[function(a,b,c){(function(c){function d(a){var b=f(a),c=b.toRed(g.mont(a.modulus)).redPow(new g(a.publicExponent)).fromRed();return{blinder:c,unblinder:b.invm(a.modulus)}}function e(a,b){var e=d(b),f=b.modulus.byteLength(),h=(g.mont(b.modulus),new g(a).mul(e.blinder).umod(b.modulus)),i=h.toRed(g.mont(b.prime1)),j=h.toRed(g.mont(b.prime2)),k=b.coefficient,l=b.prime1,m=b.prime2,n=i.redPow(b.exponent1),o=j.redPow(b.exponent2);n=n.fromRed(),o=o.fromRed();var p=n.isub(o).imul(k).umod(l);return p.imul(m),o.iadd(p),new c(o.imul(e.unblinder).umod(b.modulus).toArray(!1,f))}function f(a){for(var b=a.modulus.byteLength(),c=new g(h(b));c.cmp(a.modulus)>=0||!c.umod(a.prime1)||!c.umod(a.prime2);)c=new g(h(b));return c}var g=a("bn.js"),h=a("randombytes");b.exports=e,e.getr=f}).call(this,a("buffer").Buffer)},{"bn.js":40,buffer:3,randombytes:205}],42:[function(a,b,c){"use strict";var d=c;d.version=a("../package.json").version,d.utils=a("./elliptic/utils"),d.rand=a("brorand"),d.curve=a("./elliptic/curve"),d.curves=a("./elliptic/curves"),d.ec=a("./elliptic/ec"),d.eddsa=a("./elliptic/eddsa")},{"../package.json":67,"./elliptic/curve":45,"./elliptic/curves":48,"./elliptic/ec":49,"./elliptic/eddsa":52,"./elliptic/utils":56,brorand:57}],43:[function(a,b,c){"use strict";function d(a,b){this.type=a,this.p=new f(b.p,16),this.red=b.prime?f.red(b.prime):f.mont(this.p),this.zero=new f(0).toRed(this.red),this.one=new f(1).toRed(this.red),this.two=new f(2).toRed(this.red),this.n=b.n&&new f(b.n,16),this.g=b.g&&this.pointFromJSON(b.g,b.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var c=this.n&&this.p.div(this.n);!c||c.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function e(a,b){this.curve=a,this.type=b,this.precomputed=null}var f=a("bn.js"),g=a("../../elliptic"),h=g.utils,i=h.getNAF,j=h.getJSF,k=h.assert;b.exports=d,d.prototype.point=function(){throw new Error("Not implemented")},d.prototype.validate=function(){throw new Error("Not implemented")},d.prototype._fixedNafMul=function(a,b){k(a.precomputed);var c=a._getDoubles(),d=i(b,1),e=(1<<c.step+1)-(c.step%2===0?2:1);e/=3;for(var f=[],g=0;g<d.length;g+=c.step){for(var h=0,b=g+c.step-1;b>=g;b--)h=(h<<1)+d[b];f.push(h)}for(var j=this.jpoint(null,null,null),l=this.jpoint(null,null,null),m=e;m>0;m--){for(var g=0;g<f.length;g++){var h=f[g];h===m?l=l.mixedAdd(c.points[g]):h===-m&&(l=l.mixedAdd(c.points[g].neg()))}j=j.add(l)}return j.toP()},d.prototype._wnafMul=function(a,b){var c=4,d=a._getNAFPoints(c);c=d.wnd;for(var e=d.points,f=i(b,c),g=this.jpoint(null,null,null),h=f.length-1;h>=0;h--){for(var b=0;h>=0&&0===f[h];h--)b++;if(h>=0&&b++,g=g.dblp(b),h<0)break;var j=f[h];k(0!==j),g="affine"===a.type?j>0?g.mixedAdd(e[j-1>>1]):g.mixedAdd(e[-j-1>>1].neg()):j>0?g.add(e[j-1>>1]):g.add(e[-j-1>>1].neg())}return"affine"===a.type?g.toP():g},d.prototype._wnafMulAdd=function(a,b,c,d,e){for(var f=this._wnafT1,g=this._wnafT2,h=this._wnafT3,k=0,l=0;l<d;l++){var m=b[l],n=m._getNAFPoints(a);f[l]=n.wnd,g[l]=n.points}for(var l=d-1;l>=1;l-=2){var o=l-1,p=l;if(1===f[o]&&1===f[p]){var q=[b[o],null,null,b[p]];0===b[o].y.cmp(b[p].y)?(q[1]=b[o].add(b[p]),q[2]=b[o].toJ().mixedAdd(b[p].neg())):0===b[o].y.cmp(b[p].y.redNeg())?(q[1]=b[o].toJ().mixedAdd(b[p]),q[2]=b[o].add(b[p].neg())):(q[1]=b[o].toJ().mixedAdd(b[p]),q[2]=b[o].toJ().mixedAdd(b[p].neg()));var r=[-3,-1,-5,-7,0,7,5,1,3],s=j(c[o],c[p]);k=Math.max(s[0].length,k),h[o]=new Array(k),h[p]=new Array(k);for(var t=0;t<k;t++){var u=0|s[0][t],v=0|s[1][t];h[o][t]=r[3*(u+1)+(v+1)],h[p][t]=0,g[o]=q}}else h[o]=i(c[o],f[o]),h[p]=i(c[p],f[p]),k=Math.max(h[o].length,k),k=Math.max(h[p].length,k)}for(var w=this.jpoint(null,null,null),x=this._wnafT4,l=k;l>=0;l--){for(var y=0;l>=0;){for(var z=!0,t=0;t<d;t++)x[t]=0|h[t][l],0!==x[t]&&(z=!1);if(!z)break;y++,l--}if(l>=0&&y++,w=w.dblp(y),l<0)break;for(var t=0;t<d;t++){var m,A=x[t];0!==A&&(A>0?m=g[t][A-1>>1]:A<0&&(m=g[t][-A-1>>1].neg()),w="affine"===m.type?w.mixedAdd(m):w.add(m))}}for(var l=0;l<d;l++)g[l]=null;return e?w:w.toP()},d.BasePoint=e,e.prototype.eq=function(){throw new Error("Not implemented")},e.prototype.validate=function(){return this.curve.validate(this)},d.prototype.decodePoint=function(a,b){a=h.toArray(a,b);var c=this.p.byteLength();if((4===a[0]||6===a[0]||7===a[0])&&a.length-1===2*c){6===a[0]?k(a[a.length-1]%2===0):7===a[0]&&k(a[a.length-1]%2===1);var d=this.point(a.slice(1,1+c),a.slice(1+c,1+2*c));return d}if((2===a[0]||3===a[0])&&a.length-1===c)return this.pointFromX(a.slice(1,1+c),3===a[0]);throw new Error("Unknown point format")},e.prototype.encodeCompressed=function(a){return this.encode(a,!0)},e.prototype._encode=function(a){var b=this.curve.p.byteLength(),c=this.getX().toArray("be",b);return a?[this.getY().isEven()?2:3].concat(c):[4].concat(c,this.getY().toArray("be",b))},e.prototype.encode=function(a,b){return h.encode(this._encode(b),a)},e.prototype.precompute=function(a){if(this.precomputed)return this;var b={doubles:null,naf:null,beta:null};return b.naf=this._getNAFPoints(8),b.doubles=this._getDoubles(4,a),b.beta=this._getBeta(),this.precomputed=b,this},e.prototype._hasDoubles=function(a){if(!this.precomputed)return!1;var b=this.precomputed.doubles;return!!b&&b.points.length>=Math.ceil((a.bitLength()+1)/b.step)},e.prototype._getDoubles=function(a,b){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var c=[this],d=this,e=0;e<b;e+=a){for(var f=0;f<a;f++)d=d.dbl();c.push(d)}return{step:a,points:c}},e.prototype._getNAFPoints=function(a){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var b=[this],c=(1<<a)-1,d=1===c?null:this.dbl(),e=1;e<c;e++)b[e]=b[e-1].add(d);return{wnd:a,points:b}},e.prototype._getBeta=function(){return null},e.prototype.dblp=function(a){for(var b=this,c=0;c<a;c++)b=b.dbl();return b}},{"../../elliptic":42,"bn.js":40}],44:[function(a,b,c){"use strict";function d(a){this.twisted=1!==(0|a.a),this.mOneA=this.twisted&&(0|a.a)===-1,this.extended=this.mOneA,j.call(this,"edwards",a),this.a=new h(a.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new h(a.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new h(a.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),k(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|a.c)}function e(a,b,c,d,e){j.BasePoint.call(this,a,"projective"),null===b&&null===c&&null===d?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new h(b,16),this.y=new h(c,16),this.z=d?new h(d,16):this.curve.one,this.t=e&&new h(e,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}var f=a("../curve"),g=a("../../elliptic"),h=a("bn.js"),i=a("inherits"),j=f.base,k=g.utils.assert;i(d,j),b.exports=d,d.prototype._mulA=function(a){return this.mOneA?a.redNeg():this.a.redMul(a)},d.prototype._mulC=function(a){return this.oneC?a:this.c.redMul(a)},d.prototype.jpoint=function(a,b,c,d){return this.point(a,b,c,d)},d.prototype.pointFromX=function(a,b){a=new h(a,16),a.red||(a=a.toRed(this.red));var c=a.redSqr(),d=this.c2.redSub(this.a.redMul(c)),e=this.one.redSub(this.c2.redMul(this.d).redMul(c)),f=d.redMul(e.redInvm()),g=f.redSqrt();if(0!==g.redSqr().redSub(f).cmp(this.zero))throw new Error("invalid point");var i=g.fromRed().isOdd();return(b&&!i||!b&&i)&&(g=g.redNeg()),this.point(a,g)},d.prototype.pointFromY=function(a,b){a=new h(a,16),a.red||(a=a.toRed(this.red));var c=a.redSqr(),d=c.redSub(this.one),e=c.redMul(this.d).redAdd(this.one),f=d.redMul(e.redInvm());if(0===f.cmp(this.zero)){if(b)throw new Error("invalid point");return this.point(this.zero,a)}var g=f.redSqrt();if(0!==g.redSqr().redSub(f).cmp(this.zero))throw new Error("invalid point");return g.isOdd()!==b&&(g=g.redNeg()),this.point(g,a)},d.prototype.validate=function(a){if(a.isInfinity())return!0;a.normalize();var b=a.x.redSqr(),c=a.y.redSqr(),d=b.redMul(this.a).redAdd(c),e=this.c2.redMul(this.one.redAdd(this.d.redMul(b).redMul(c)));return 0===d.cmp(e)},i(e,j.BasePoint),d.prototype.pointFromJSON=function(a){return e.fromJSON(this,a)},d.prototype.point=function(a,b,c,d){return new e(this,a,b,c,d)},e.fromJSON=function(a,b){return new e(a,b[0],b[1],b[2])},e.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},e.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},e.prototype._extDbl=function(){var a=this.x.redSqr(),b=this.y.redSqr(),c=this.z.redSqr();c=c.redIAdd(c);var d=this.curve._mulA(a),e=this.x.redAdd(this.y).redSqr().redISub(a).redISub(b),f=d.redAdd(b),g=f.redSub(c),h=d.redSub(b),i=e.redMul(g),j=f.redMul(h),k=e.redMul(h),l=g.redMul(f);return this.curve.point(i,j,l,k)},e.prototype._projDbl=function(){var a,b,c,d=this.x.redAdd(this.y).redSqr(),e=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){var g=this.curve._mulA(e),h=g.redAdd(f);if(this.zOne)a=d.redSub(e).redSub(f).redMul(h.redSub(this.curve.two)),b=h.redMul(g.redSub(f)),c=h.redSqr().redSub(h).redSub(h);else{var i=this.z.redSqr(),j=h.redSub(i).redISub(i);a=d.redSub(e).redISub(f).redMul(j),b=h.redMul(g.redSub(f)),c=h.redMul(j)}}else{var g=e.redAdd(f),i=this.curve._mulC(this.c.redMul(this.z)).redSqr(),j=g.redSub(i).redSub(i);a=this.curve._mulC(d.redISub(g)).redMul(j),b=this.curve._mulC(g).redMul(e.redISub(f)),c=g.redMul(j)}return this.curve.point(a,b,c)},e.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},e.prototype._extAdd=function(a){var b=this.y.redSub(this.x).redMul(a.y.redSub(a.x)),c=this.y.redAdd(this.x).redMul(a.y.redAdd(a.x)),d=this.t.redMul(this.curve.dd).redMul(a.t),e=this.z.redMul(a.z.redAdd(a.z)),f=c.redSub(b),g=e.redSub(d),h=e.redAdd(d),i=c.redAdd(b),j=f.redMul(g),k=h.redMul(i),l=f.redMul(i),m=g.redMul(h);return this.curve.point(j,k,m,l)},e.prototype._projAdd=function(a){var b,c,d=this.z.redMul(a.z),e=d.redSqr(),f=this.x.redMul(a.x),g=this.y.redMul(a.y),h=this.curve.d.redMul(f).redMul(g),i=e.redSub(h),j=e.redAdd(h),k=this.x.redAdd(this.y).redMul(a.x.redAdd(a.y)).redISub(f).redISub(g),l=d.redMul(i).redMul(k);return this.curve.twisted?(b=d.redMul(j).redMul(g.redSub(this.curve._mulA(f))),c=i.redMul(j)):(b=d.redMul(j).redMul(g.redSub(f)),c=this.curve._mulC(i).redMul(j)),this.curve.point(l,b,c)},e.prototype.add=function(a){return this.isInfinity()?a:a.isInfinity()?this:this.curve.extended?this._extAdd(a):this._projAdd(a)},e.prototype.mul=function(a){return this._hasDoubles(a)?this.curve._fixedNafMul(this,a):this.curve._wnafMul(this,a)},e.prototype.mulAdd=function(a,b,c){return this.curve._wnafMulAdd(1,[this,b],[a,c],2,!1)},e.prototype.jmulAdd=function(a,b,c){return this.curve._wnafMulAdd(1,[this,b],[a,c],2,!0)},e.prototype.normalize=function(){if(this.zOne)return this;var a=this.z.redInvm();return this.x=this.x.redMul(a),this.y=this.y.redMul(a),this.t&&(this.t=this.t.redMul(a)),this.z=this.curve.one,this.zOne=!0,this},e.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},e.prototype.getX=function(){return this.normalize(),this.x.fromRed()},e.prototype.getY=function(){return this.normalize(),this.y.fromRed()},e.prototype.eq=function(a){return this===a||0===this.getX().cmp(a.getX())&&0===this.getY().cmp(a.getY())},e.prototype.eqXToP=function(a){var b=a.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(b))return!0;for(var c=a.clone(),d=this.curve.redN.redMul(this.z);;){if(c.iadd(this.curve.n),c.cmp(this.curve.p)>=0)return!1;if(b.redIAdd(d),0===this.x.cmp(b))return!0}return!1},e.prototype.toP=e.prototype.normalize,e.prototype.mixedAdd=e.prototype.add},{"../../elliptic":42,"../curve":45,"bn.js":40,inherits:207}],45:[function(a,b,c){"use strict";var d=c;d.base=a("./base"),d["short"]=a("./short"),d.mont=a("./mont"),d.edwards=a("./edwards")},{"./base":43,"./edwards":44,"./mont":46,"./short":47}],46:[function(a,b,c){"use strict";function d(a){i.call(this,"mont",a),this.a=new g(a.a,16).toRed(this.red),this.b=new g(a.b,16).toRed(this.red),this.i4=new g(4).toRed(this.red).redInvm(),this.two=new g(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function e(a,b,c){i.BasePoint.call(this,a,"projective"),null===b&&null===c?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new g(b,16),this.z=new g(c,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var f=a("../curve"),g=a("bn.js"),h=a("inherits"),i=f.base,j=a("../../elliptic"),k=j.utils;h(d,i),b.exports=d,d.prototype.validate=function(a){var b=a.normalize().x,c=b.redSqr(),d=c.redMul(b).redAdd(c.redMul(this.a)).redAdd(b),e=d.redSqrt();return 0===e.redSqr().cmp(d)},h(e,i.BasePoint),d.prototype.decodePoint=function(a,b){return this.point(k.toArray(a,b),1)},d.prototype.point=function(a,b){return new e(this,a,b)},d.prototype.pointFromJSON=function(a){return e.fromJSON(this,a)},e.prototype.precompute=function(){},e.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},e.fromJSON=function(a,b){return new e(a,b[0],b[1]||a.one)},e.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},e.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},e.prototype.dbl=function(){var a=this.x.redAdd(this.z),b=a.redSqr(),c=this.x.redSub(this.z),d=c.redSqr(),e=b.redSub(d),f=b.redMul(d),g=e.redMul(d.redAdd(this.curve.a24.redMul(e)));return this.curve.point(f,g)},e.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.diffAdd=function(a,b){var c=this.x.redAdd(this.z),d=this.x.redSub(this.z),e=a.x.redAdd(a.z),f=a.x.redSub(a.z),g=f.redMul(c),h=e.redMul(d),i=b.z.redMul(g.redAdd(h).redSqr()),j=b.x.redMul(g.redISub(h).redSqr());return this.curve.point(i,j)},e.prototype.mul=function(a){for(var b=a.clone(),c=this,d=this.curve.point(null,null),e=this,f=[];0!==b.cmpn(0);b.iushrn(1))f.push(b.andln(1));for(var g=f.length-1;g>=0;g--)0===f[g]?(c=c.diffAdd(d,e),d=d.dbl()):(d=c.diffAdd(d,e),c=c.dbl());return d},e.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.eq=function(a){return 0===this.getX().cmp(a.getX())},e.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},e.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":42,"../curve":45,"bn.js":40,inherits:207}],47:[function(a,b,c){"use strict";function d(a){k.call(this,"short",a),this.a=new i(a.a,16).toRed(this.red),this.b=new i(a.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(a),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function e(a,b,c,d){k.BasePoint.call(this,a,"affine"),null===b&&null===c?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(b,16),this.y=new i(c,16),d&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(a,b,c,d){k.BasePoint.call(this,a,"jacobian"),null===b&&null===c&&null===d?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(b,16),this.y=new i(c,16),this.z=new i(d,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var g=a("../curve"),h=a("../../elliptic"),i=a("bn.js"),j=a("inherits"),k=g.base,l=h.utils.assert;j(d,k),b.exports=d,d.prototype._getEndomorphism=function(a){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var b,c;if(a.beta)b=new i(a.beta,16).toRed(this.red);else{var d=this._getEndoRoots(this.p);b=d[0].cmp(d[1])<0?d[0]:d[1],b=b.toRed(this.red)}if(a.lambda)c=new i(a.lambda,16);else{var e=this._getEndoRoots(this.n);0===this.g.mul(e[0]).x.cmp(this.g.x.redMul(b))?c=e[0]:(c=e[1],l(0===this.g.mul(c).x.cmp(this.g.x.redMul(b))))}var f;return f=a.basis?a.basis.map(function(a){return{a:new i(a.a,16),b:new i(a.b,16)}}):this._getEndoBasis(c),{beta:b,lambda:c,basis:f}}},d.prototype._getEndoRoots=function(a){var b=a===this.p?this.red:i.mont(a),c=new i(2).toRed(b).redInvm(),d=c.redNeg(),e=new i(3).toRed(b).redNeg().redSqrt().redMul(c),f=d.redAdd(e).fromRed(),g=d.redSub(e).fromRed();return[f,g]},d.prototype._getEndoBasis=function(a){for(var b,c,d,e,f,g,h,j,k,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),m=a,n=this.n.clone(),o=new i(1),p=new i(0),q=new i(0),r=new i(1),s=0;0!==m.cmpn(0);){var t=n.div(m);j=n.sub(t.mul(m)),k=q.sub(t.mul(o));var u=r.sub(t.mul(p));if(!d&&j.cmp(l)<0)b=h.neg(),c=o,d=j.neg(),e=k;else if(d&&2===++s)break;h=j,n=m,m=j,q=o,o=k,r=p,p=u}f=j.neg(),g=k;var v=d.sqr().add(e.sqr()),w=f.sqr().add(g.sqr());return w.cmp(v)>=0&&(f=b,g=c),d.negative&&(d=d.neg(),e=e.neg()),f.negative&&(f=f.neg(),g=g.neg()),[{a:d,b:e},{a:f,b:g}]},d.prototype._endoSplit=function(a){var b=this.endo.basis,c=b[0],d=b[1],e=d.b.mul(a).divRound(this.n),f=c.b.neg().mul(a).divRound(this.n),g=e.mul(c.a),h=f.mul(d.a),i=e.mul(c.b),j=f.mul(d.b),k=a.sub(g).sub(h),l=i.add(j).neg();return{k1:k,k2:l}},d.prototype.pointFromX=function(a,b){a=new i(a,16),a.red||(a=a.toRed(this.red));var c=a.redSqr().redMul(a).redIAdd(a.redMul(this.a)).redIAdd(this.b),d=c.redSqrt();if(0!==d.redSqr().redSub(c).cmp(this.zero))throw new Error("invalid point");var e=d.fromRed().isOdd();return(b&&!e||!b&&e)&&(d=d.redNeg()),this.point(a,d)},d.prototype.validate=function(a){if(a.inf)return!0;var b=a.x,c=a.y,d=this.a.redMul(b),e=b.redSqr().redMul(b).redIAdd(d).redIAdd(this.b);return 0===c.redSqr().redISub(e).cmpn(0)},d.prototype._endoWnafMulAdd=function(a,b,c){for(var d=this._endoWnafT1,e=this._endoWnafT2,f=0;f<a.length;f++){var g=this._endoSplit(b[f]),h=a[f],i=h._getBeta();g.k1.negative&&(g.k1.ineg(),h=h.neg(!0)),g.k2.negative&&(g.k2.ineg(),i=i.neg(!0)),d[2*f]=h,d[2*f+1]=i,e[2*f]=g.k1,e[2*f+1]=g.k2}for(var j=this._wnafMulAdd(1,d,e,2*f,c),k=0;k<2*f;k++)d[k]=null,e[k]=null;return j},j(e,k.BasePoint),d.prototype.point=function(a,b,c){return new e(this,a,b,c)},d.prototype.pointFromJSON=function(a,b){return e.fromJSON(this,a,b)},e.prototype._getBeta=function(){if(this.curve.endo){var a=this.precomputed;if(a&&a.beta)return a.beta;var b=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(a){var c=this.curve,d=function(a){return c.point(a.x.redMul(c.endo.beta),a.y)};a.beta=b,b.precomputed={beta:null,naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(d)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(d)}}}return b}},e.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},e.fromJSON=function(a,b,c){function d(b){return a.point(b[0],b[1],c)}"string"==typeof b&&(b=JSON.parse(b));var e=a.point(b[0],b[1],c);if(!b[2])return e;var f=b[2];return e.precomputed={beta:null,doubles:f.doubles&&{step:f.doubles.step,points:[e].concat(f.doubles.points.map(d))},naf:f.naf&&{wnd:f.naf.wnd,points:[e].concat(f.naf.points.map(d))}},e},e.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},e.prototype.isInfinity=function(){return this.inf},e.prototype.add=function(a){if(this.inf)return a;if(a.inf)return this;if(this.eq(a))return this.dbl();if(this.neg().eq(a))return this.curve.point(null,null);if(0===this.x.cmp(a.x))return this.curve.point(null,null);var b=this.y.redSub(a.y);0!==b.cmpn(0)&&(b=b.redMul(this.x.redSub(a.x).redInvm()));var c=b.redSqr().redISub(this.x).redISub(a.x),d=b.redMul(this.x.redSub(c)).redISub(this.y);return this.curve.point(c,d)},e.prototype.dbl=function(){if(this.inf)return this;var a=this.y.redAdd(this.y);if(0===a.cmpn(0))return this.curve.point(null,null);var b=this.curve.a,c=this.x.redSqr(),d=a.redInvm(),e=c.redAdd(c).redIAdd(c).redIAdd(b).redMul(d),f=e.redSqr().redISub(this.x.redAdd(this.x)),g=e.redMul(this.x.redSub(f)).redISub(this.y);return this.curve.point(f,g)},e.prototype.getX=function(){return this.x.fromRed()},e.prototype.getY=function(){return this.y.fromRed()},e.prototype.mul=function(a){return a=new i(a,16),this._hasDoubles(a)?this.curve._fixedNafMul(this,a):this.curve.endo?this.curve._endoWnafMulAdd([this],[a]):this.curve._wnafMul(this,a)},e.prototype.mulAdd=function(a,b,c){var d=[this,b],e=[a,c];return this.curve.endo?this.curve._endoWnafMulAdd(d,e):this.curve._wnafMulAdd(1,d,e,2)},e.prototype.jmulAdd=function(a,b,c){var d=[this,b],e=[a,c];return this.curve.endo?this.curve._endoWnafMulAdd(d,e,!0):this.curve._wnafMulAdd(1,d,e,2,!0)},e.prototype.eq=function(a){return this===a||this.inf===a.inf&&(this.inf||0===this.x.cmp(a.x)&&0===this.y.cmp(a.y))},e.prototype.neg=function(a){if(this.inf)return this;var b=this.curve.point(this.x,this.y.redNeg());if(a&&this.precomputed){var c=this.precomputed,d=function(a){return a.neg()};b.precomputed={naf:c.naf&&{wnd:c.naf.wnd,points:c.naf.points.map(d)},doubles:c.doubles&&{step:c.doubles.step,points:c.doubles.points.map(d)}}}return b},e.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var a=this.curve.jpoint(this.x,this.y,this.curve.one);return a},j(f,k.BasePoint),d.prototype.jpoint=function(a,b,c){return new f(this,a,b,c)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var a=this.z.redInvm(),b=a.redSqr(),c=this.x.redMul(b),d=this.y.redMul(b).redMul(a);return this.curve.point(c,d)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(a){if(this.isInfinity())return a;if(a.isInfinity())return this;var b=a.z.redSqr(),c=this.z.redSqr(),d=this.x.redMul(b),e=a.x.redMul(c),f=this.y.redMul(b.redMul(a.z)),g=a.y.redMul(c.redMul(this.z)),h=d.redSub(e),i=f.redSub(g);if(0===h.cmpn(0))return 0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var j=h.redSqr(),k=j.redMul(h),l=d.redMul(j),m=i.redSqr().redIAdd(k).redISub(l).redISub(l),n=i.redMul(l.redISub(m)).redISub(f.redMul(k)),o=this.z.redMul(a.z).redMul(h);return this.curve.jpoint(m,n,o)},f.prototype.mixedAdd=function(a){if(this.isInfinity())return a.toJ();if(a.isInfinity())return this;var b=this.z.redSqr(),c=this.x,d=a.x.redMul(b),e=this.y,f=a.y.redMul(b).redMul(this.z),g=c.redSub(d),h=e.redSub(f);if(0===g.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var i=g.redSqr(),j=i.redMul(g),k=c.redMul(i),l=h.redSqr().redIAdd(j).redISub(k).redISub(k),m=h.redMul(k.redISub(l)).redISub(e.redMul(j)),n=this.z.redMul(g);return this.curve.jpoint(l,m,n)},f.prototype.dblp=function(a){if(0===a)return this;if(this.isInfinity())return this;if(!a)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var b=this,c=0;c<a;c++)b=b.dbl();return b}for(var d=this.curve.a,e=this.curve.tinv,f=this.x,g=this.y,h=this.z,i=h.redSqr().redSqr(),j=g.redAdd(g),c=0;c<a;c++){var k=f.redSqr(),l=j.redSqr(),m=l.redSqr(),n=k.redAdd(k).redIAdd(k).redIAdd(d.redMul(i)),o=f.redMul(l),p=n.redSqr().redISub(o.redAdd(o)),q=o.redISub(p),r=n.redMul(q);r=r.redIAdd(r).redISub(m);var s=j.redMul(h);c+1<a&&(i=i.redMul(m)),f=p,h=s,j=r}return this.curve.jpoint(f,j.redMul(e),h)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var a,b,c;if(this.zOne){var d=this.x.redSqr(),e=this.y.redSqr(),f=e.redSqr(),g=this.x.redAdd(e).redSqr().redISub(d).redISub(f);g=g.redIAdd(g);var h=d.redAdd(d).redIAdd(d),i=h.redSqr().redISub(g).redISub(g),j=f.redIAdd(f);j=j.redIAdd(j),j=j.redIAdd(j),a=i,b=h.redMul(g.redISub(i)).redISub(j),c=this.y.redAdd(this.y)}else{var k=this.x.redSqr(),l=this.y.redSqr(),m=l.redSqr(),n=this.x.redAdd(l).redSqr().redISub(k).redISub(m);n=n.redIAdd(n);var o=k.redAdd(k).redIAdd(k),p=o.redSqr(),q=m.redIAdd(m);q=q.redIAdd(q),q=q.redIAdd(q),a=p.redISub(n).redISub(n),b=o.redMul(n.redISub(a)).redISub(q),c=this.y.redMul(this.z),c=c.redIAdd(c)}return this.curve.jpoint(a,b,c)},f.prototype._threeDbl=function(){var a,b,c;if(this.zOne){var d=this.x.redSqr(),e=this.y.redSqr(),f=e.redSqr(),g=this.x.redAdd(e).redSqr().redISub(d).redISub(f);g=g.redIAdd(g);var h=d.redAdd(d).redIAdd(d).redIAdd(this.curve.a),i=h.redSqr().redISub(g).redISub(g);a=i;var j=f.redIAdd(f);j=j.redIAdd(j),j=j.redIAdd(j),b=h.redMul(g.redISub(i)).redISub(j),c=this.y.redAdd(this.y)}else{var k=this.z.redSqr(),l=this.y.redSqr(),m=this.x.redMul(l),n=this.x.redSub(k).redMul(this.x.redAdd(k));n=n.redAdd(n).redIAdd(n);var o=m.redIAdd(m);o=o.redIAdd(o);var p=o.redAdd(o);a=n.redSqr().redISub(p),c=this.y.redAdd(this.z).redSqr().redISub(l).redISub(k);var q=l.redSqr();q=q.redIAdd(q),q=q.redIAdd(q),q=q.redIAdd(q),b=n.redMul(o.redISub(a)).redISub(q)}return this.curve.jpoint(a,b,c)},f.prototype._dbl=function(){var a=this.curve.a,b=this.x,c=this.y,d=this.z,e=d.redSqr().redSqr(),f=b.redSqr(),g=c.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(a.redMul(e)),i=b.redAdd(b);i=i.redIAdd(i);var j=i.redMul(g),k=h.redSqr().redISub(j.redAdd(j)),l=j.redISub(k),m=g.redSqr();m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var n=h.redMul(l).redISub(m),o=c.redAdd(c).redMul(d);return this.curve.jpoint(k,n,o)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var a=this.x.redSqr(),b=this.y.redSqr(),c=this.z.redSqr(),d=b.redSqr(),e=a.redAdd(a).redIAdd(a),f=e.redSqr(),g=this.x.redAdd(b).redSqr().redISub(a).redISub(d);g=g.redIAdd(g),g=g.redAdd(g).redIAdd(g),g=g.redISub(f);var h=g.redSqr(),i=d.redIAdd(d);i=i.redIAdd(i),i=i.redIAdd(i),i=i.redIAdd(i);var j=e.redIAdd(g).redSqr().redISub(f).redISub(h).redISub(i),k=b.redMul(j);k=k.redIAdd(k),k=k.redIAdd(k);var l=this.x.redMul(h).redISub(k);
l=l.redIAdd(l),l=l.redIAdd(l);var m=this.y.redMul(j.redMul(i.redISub(j)).redISub(g.redMul(h)));m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var n=this.z.redAdd(g).redSqr().redISub(c).redISub(h);return this.curve.jpoint(l,m,n)},f.prototype.mul=function(a,b){return a=new i(a,b),this.curve._wnafMul(this,a)},f.prototype.eq=function(a){if("affine"===a.type)return this.eq(a.toJ());if(this===a)return!0;var b=this.z.redSqr(),c=a.z.redSqr();if(0!==this.x.redMul(c).redISub(a.x.redMul(b)).cmpn(0))return!1;var d=b.redMul(this.z),e=c.redMul(a.z);return 0===this.y.redMul(e).redISub(a.y.redMul(d)).cmpn(0)},f.prototype.eqXToP=function(a){var b=this.z.redSqr(),c=a.toRed(this.curve.red).redMul(b);if(0===this.x.cmp(c))return!0;for(var d=a.clone(),e=this.curve.redN.redMul(b);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(c.redIAdd(e),0===this.x.cmp(c))return!0}return!1},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":42,"../curve":45,"bn.js":40,inherits:207}],48:[function(a,b,c){"use strict";function d(a){"short"===a.type?this.curve=new h.curve["short"](a):"edwards"===a.type?this.curve=new h.curve.edwards(a):this.curve=new h.curve.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function e(a,b){Object.defineProperty(f,a,{configurable:!0,enumerable:!0,get:function(){var c=new d(b);return Object.defineProperty(f,a,{configurable:!0,enumerable:!0,value:c}),c}})}var f=c,g=a("hash.js"),h=a("../elliptic"),i=h.utils.assert;f.PresetCurve=d,e("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:g.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),e("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:g.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),e("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:g.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),e("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:g.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),e("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:g.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),e("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:g.sha256,gRed:!1,g:["9"]}),e("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:g.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var j;try{j=a("./precomputed/secp256k1")}catch(k){j=void 0}e("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:g.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",j]})},{"../elliptic":42,"./precomputed/secp256k1":55,"hash.js":58}],49:[function(a,b,c){"use strict";function d(a){return this instanceof d?("string"==typeof a&&(i(g.curves.hasOwnProperty(a),"Unknown curve "+a),a=g.curves[a]),a instanceof g.curves.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),void(this.hash=a.hash||a.curve.hash)):new d(a)}var e=a("bn.js"),f=a("hmac-drbg"),g=a("../../elliptic"),h=g.utils,i=h.assert,j=a("./key"),k=a("./signature");b.exports=d,d.prototype.keyPair=function(a){return new j(this,a)},d.prototype.keyFromPrivate=function(a,b){return j.fromPrivate(this,a,b)},d.prototype.keyFromPublic=function(a,b){return j.fromPublic(this,a,b)},d.prototype.genKeyPair=function(a){a||(a={});for(var b=new f({hash:this.hash,pers:a.pers,persEnc:a.persEnc||"utf8",entropy:a.entropy||g.rand(this.hash.hmacStrength),entropyEnc:a.entropy&&a.entropyEnc||"utf8",nonce:this.n.toArray()}),c=this.n.byteLength(),d=this.n.sub(new e(2));;){var h=new e(b.generate(c));if(!(h.cmp(d)>0))return h.iaddn(1),this.keyFromPrivate(h)}},d.prototype._truncateToN=function(a,b){var c=8*a.byteLength()-this.n.bitLength();return c>0&&(a=a.ushrn(c)),!b&&a.cmp(this.n)>=0?a.sub(this.n):a},d.prototype.sign=function(a,b,c,d){"object"==typeof c&&(d=c,c=null),d||(d={}),b=this.keyFromPrivate(b,c),a=this._truncateToN(new e(a,16));for(var g=this.n.byteLength(),h=b.getPrivate().toArray("be",g),i=a.toArray("be",g),j=new f({hash:this.hash,entropy:h,nonce:i,pers:d.pers,persEnc:d.persEnc||"utf8"}),l=this.n.sub(new e(1)),m=0;!0;m++){var n=d.k?d.k(m):new e(j.generate(this.n.byteLength()));if(n=this._truncateToN(n,!0),!(n.cmpn(1)<=0||n.cmp(l)>=0)){var o=this.g.mul(n);if(!o.isInfinity()){var p=o.getX(),q=p.umod(this.n);if(0!==q.cmpn(0)){var r=n.invm(this.n).mul(q.mul(b.getPrivate()).iadd(a));if(r=r.umod(this.n),0!==r.cmpn(0)){var s=(o.getY().isOdd()?1:0)|(0!==p.cmp(q)?2:0);return d.canonical&&r.cmp(this.nh)>0&&(r=this.n.sub(r),s^=1),new k({r:q,s:r,recoveryParam:s})}}}}}},d.prototype.verify=function(a,b,c,d){a=this._truncateToN(new e(a,16)),c=this.keyFromPublic(c,d),b=new k(b,"hex");var f=b.r,g=b.s;if(f.cmpn(1)<0||f.cmp(this.n)>=0)return!1;if(g.cmpn(1)<0||g.cmp(this.n)>=0)return!1;var h=g.invm(this.n),i=h.mul(a).umod(this.n),j=h.mul(f).umod(this.n);if(!this.curve._maxwellTrick){var l=this.g.mulAdd(i,c.getPublic(),j);return!l.isInfinity()&&0===l.getX().umod(this.n).cmp(f)}var l=this.g.jmulAdd(i,c.getPublic(),j);return!l.isInfinity()&&l.eqXToP(f)},d.prototype.recoverPubKey=function(a,b,c,d){i((3&c)===c,"The recovery param is more than two bits"),b=new k(b,d);var f=this.n,g=new e(a),h=b.r,j=b.s,l=1&c,m=c>>1;if(h.cmp(this.curve.p.umod(this.curve.n))>=0&&m)throw new Error("Unable to find sencond key candinate");h=m?this.curve.pointFromX(h.add(this.curve.n),l):this.curve.pointFromX(h,l);var n=b.r.invm(f),o=f.sub(g).mul(n).umod(f),p=j.mul(n).umod(f);return this.g.mulAdd(o,h,p)},d.prototype.getKeyRecoveryParam=function(a,b,c,d){if(b=new k(b,d),null!==b.recoveryParam)return b.recoveryParam;for(var e=0;e<4;e++){var f;try{f=this.recoverPubKey(a,b,e)}catch(a){continue}if(f.eq(c))return e}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":42,"./key":50,"./signature":51,"bn.js":40,"hmac-drbg":64}],50:[function(a,b,c){"use strict";function d(a,b){this.ec=a,this.priv=null,this.pub=null,b.priv&&this._importPrivate(b.priv,b.privEnc),b.pub&&this._importPublic(b.pub,b.pubEnc)}var e=a("bn.js"),f=a("../../elliptic"),g=f.utils,h=g.assert;b.exports=d,d.fromPublic=function(a,b,c){return b instanceof d?b:new d(a,{pub:b,pubEnc:c})},d.fromPrivate=function(a,b,c){return b instanceof d?b:new d(a,{priv:b,privEnc:c})},d.prototype.validate=function(){var a=this.getPublic();return a.isInfinity()?{result:!1,reason:"Invalid public key"}:a.validate()?a.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},d.prototype.getPublic=function(a,b){return"string"==typeof a&&(b=a,a=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),b?this.pub.encode(b,a):this.pub},d.prototype.getPrivate=function(a){return"hex"===a?this.priv.toString(16,2):this.priv},d.prototype._importPrivate=function(a,b){this.priv=new e(a,b||16),this.priv=this.priv.umod(this.ec.curve.n)},d.prototype._importPublic=function(a,b){return a.x||a.y?("mont"===this.ec.curve.type?h(a.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||h(a.x&&a.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(a.x,a.y))):void(this.pub=this.ec.curve.decodePoint(a,b))},d.prototype.derive=function(a){return a.mul(this.priv).getX()},d.prototype.sign=function(a,b,c){return this.ec.sign(a,this,b,c)},d.prototype.verify=function(a,b){return this.ec.verify(a,b,this)},d.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":42,"bn.js":40}],51:[function(a,b,c){"use strict";function d(a,b){return a instanceof d?a:void(this._importDER(a,b)||(l(a.r&&a.s,"Signature without r or s"),this.r=new i(a.r,16),this.s=new i(a.s,16),void 0===a.recoveryParam?this.recoveryParam=null:this.recoveryParam=a.recoveryParam))}function e(){this.place=0}function f(a,b){var c=a[b.place++];if(!(128&c))return c;for(var d=15&c,e=0,f=0,g=b.place;f<d;f++,g++)e<<=8,e|=a[g];return b.place=g,e}function g(a){for(var b=0,c=a.length-1;!a[b]&&!(128&a[b+1])&&b<c;)b++;return 0===b?a:a.slice(b)}function h(a,b){if(b<128)return void a.push(b);var c=1+(Math.log(b)/Math.LN2>>>3);for(a.push(128|c);--c;)a.push(b>>>(c<<3)&255);a.push(b)}var i=a("bn.js"),j=a("../../elliptic"),k=j.utils,l=k.assert;b.exports=d,d.prototype._importDER=function(a,b){a=k.toArray(a,b);var c=new e;if(48!==a[c.place++])return!1;var d=f(a,c);if(d+c.place!==a.length)return!1;if(2!==a[c.place++])return!1;var g=f(a,c),h=a.slice(c.place,g+c.place);if(c.place+=g,2!==a[c.place++])return!1;var j=f(a,c);if(a.length!==j+c.place)return!1;var l=a.slice(c.place,j+c.place);return 0===h[0]&&128&h[1]&&(h=h.slice(1)),0===l[0]&&128&l[1]&&(l=l.slice(1)),this.r=new i(h),this.s=new i(l),this.recoveryParam=null,!0},d.prototype.toDER=function(a){var b=this.r.toArray(),c=this.s.toArray();for(128&b[0]&&(b=[0].concat(b)),128&c[0]&&(c=[0].concat(c)),b=g(b),c=g(c);!(c[0]||128&c[1]);)c=c.slice(1);var d=[2];h(d,b.length),d=d.concat(b),d.push(2),h(d,c.length);var e=d.concat(c),f=[48];return h(f,e.length),f=f.concat(e),k.encode(f,a)}},{"../../elliptic":42,"bn.js":40}],52:[function(a,b,c){"use strict";function d(a){if(h("ed25519"===a,"only tested with ed25519 so far"),!(this instanceof d))return new d(a);var a=f.curves[a].curve;this.curve=a,this.g=a.g,this.g.precompute(a.n.bitLength()+1),this.pointClass=a.point().constructor,this.encodingLength=Math.ceil(a.n.bitLength()/8),this.hash=e.sha512}var e=a("hash.js"),f=a("../../elliptic"),g=f.utils,h=g.assert,i=g.parseBytes,j=a("./key"),k=a("./signature");b.exports=d,d.prototype.sign=function(a,b){a=i(a);var c=this.keyFromSecret(b),d=this.hashInt(c.messagePrefix(),a),e=this.g.mul(d),f=this.encodePoint(e),g=this.hashInt(f,c.pubBytes(),a).mul(c.priv()),h=d.add(g).umod(this.curve.n);return this.makeSignature({R:e,S:h,Rencoded:f})},d.prototype.verify=function(a,b,c){a=i(a),b=this.makeSignature(b);var d=this.keyFromPublic(c),e=this.hashInt(b.Rencoded(),d.pubBytes(),a),f=this.g.mul(b.S()),g=b.R().add(d.pub().mul(e));return g.eq(f)},d.prototype.hashInt=function(){for(var a=this.hash(),b=0;b<arguments.length;b++)a.update(arguments[b]);return g.intFromLE(a.digest()).umod(this.curve.n)},d.prototype.keyFromPublic=function(a){return j.fromPublic(this,a)},d.prototype.keyFromSecret=function(a){return j.fromSecret(this,a)},d.prototype.makeSignature=function(a){return a instanceof k?a:new k(this,a)},d.prototype.encodePoint=function(a){var b=a.getY().toArray("le",this.encodingLength);return b[this.encodingLength-1]|=a.getX().isOdd()?128:0,b},d.prototype.decodePoint=function(a){a=g.parseBytes(a);var b=a.length-1,c=a.slice(0,b).concat(a[b]&-129),d=0!==(128&a[b]),e=g.intFromLE(c);return this.curve.pointFromY(e,d)},d.prototype.encodeInt=function(a){return a.toArray("le",this.encodingLength)},d.prototype.decodeInt=function(a){return g.intFromLE(a)},d.prototype.isPoint=function(a){return a instanceof this.pointClass}},{"../../elliptic":42,"./key":53,"./signature":54,"hash.js":58}],53:[function(a,b,c){"use strict";function d(a,b){this.eddsa=a,this._secret=h(b.secret),a.isPoint(b.pub)?this._pub=b.pub:this._pubBytes=h(b.pub)}var e=a("../../elliptic"),f=e.utils,g=f.assert,h=f.parseBytes,i=f.cachedProperty;d.fromPublic=function(a,b){return b instanceof d?b:new d(a,{pub:b})},d.fromSecret=function(a,b){return b instanceof d?b:new d(a,{secret:b})},d.prototype.secret=function(){return this._secret},i(d,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),i(d,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),i(d,"privBytes",function(){var a=this.eddsa,b=this.hash(),c=a.encodingLength-1,d=b.slice(0,a.encodingLength);return d[0]&=248,d[c]&=127,d[c]|=64,d}),i(d,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),i(d,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),i(d,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),d.prototype.sign=function(a){return g(this._secret,"KeyPair can only verify"),this.eddsa.sign(a,this)},d.prototype.verify=function(a,b){return this.eddsa.verify(a,b,this)},d.prototype.getSecret=function(a){return g(this._secret,"KeyPair is public only"),f.encode(this.secret(),a)},d.prototype.getPublic=function(a){return f.encode(this.pubBytes(),a)},b.exports=d},{"../../elliptic":42}],54:[function(a,b,c){"use strict";function d(a,b){this.eddsa=a,"object"!=typeof b&&(b=j(b)),Array.isArray(b)&&(b={R:b.slice(0,a.encodingLength),S:b.slice(a.encodingLength)}),h(b.R&&b.S,"Signature without R or S"),a.isPoint(b.R)&&(this._R=b.R),b.S instanceof e&&(this._S=b.S),this._Rencoded=Array.isArray(b.R)?b.R:b.Rencoded,this._Sencoded=Array.isArray(b.S)?b.S:b.Sencoded}var e=a("bn.js"),f=a("../../elliptic"),g=f.utils,h=g.assert,i=g.cachedProperty,j=g.parseBytes;i(d,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),i(d,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),i(d,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),i(d,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),d.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},d.prototype.toHex=function(){return g.encode(this.toBytes(),"hex").toUpperCase()},b.exports=d},{"../../elliptic":42,"bn.js":40}],55:[function(a,b,c){b.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]
}}},{}],56:[function(a,b,c){"use strict";function d(a,b){for(var c=[],d=1<<b+1,e=a.clone();e.cmpn(1)>=0;){var f;if(e.isOdd()){var g=e.andln(d-1);f=g>(d>>1)-1?(d>>1)-g:g,e.isubn(f)}else f=0;c.push(f);for(var h=0!==e.cmpn(0)&&0===e.andln(d-1)?b+1:1,i=1;i<h;i++)c.push(0);e.iushrn(h)}return c}function e(a,b){var c=[[],[]];a=a.clone(),b=b.clone();for(var d=0,e=0;a.cmpn(-d)>0||b.cmpn(-e)>0;){var f=a.andln(3)+d&3,g=b.andln(3)+e&3;3===f&&(f=-1),3===g&&(g=-1);var h;if(0===(1&f))h=0;else{var i=a.andln(7)+d&7;h=3!==i&&5!==i||2!==g?f:-f}c[0].push(h);var j;if(0===(1&g))j=0;else{var i=b.andln(7)+e&7;j=3!==i&&5!==i||2!==f?g:-g}c[1].push(j),2*d===h+1&&(d=1-d),2*e===j+1&&(e=1-e),a.iushrn(1),b.iushrn(1)}return c}function f(a,b,c){var d="_"+b;a.prototype[b]=function(){return void 0!==this[d]?this[d]:this[d]=c.call(this)}}function g(a){return"string"==typeof a?i.toArray(a,"hex"):a}function h(a){return new j(a,"hex","le")}var i=c,j=a("bn.js"),k=a("minimalistic-assert"),l=a("minimalistic-crypto-utils");i.assert=k,i.toArray=l.toArray,i.zero2=l.zero2,i.toHex=l.toHex,i.encode=l.encode,i.getNAF=d,i.getJSF=e,i.cachedProperty=f,i.parseBytes=g,i.intFromLE=h},{"bn.js":40,"minimalistic-assert":65,"minimalistic-crypto-utils":66}],57:[function(a,b,c){function d(a){this.rand=a}var e;if(b.exports=function(a){return e||(e=new d(null)),e.generate(a)},b.exports.Rand=d,d.prototype.generate=function(a){return this._rand(a)},d.prototype._rand=function(a){if(this.rand.getBytes)return this.rand.getBytes(a);for(var b=new Uint8Array(a),c=0;c<b.length;c++)b[c]=this.rand.getByte();return b},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?d.prototype._rand=function(a){var b=new Uint8Array(a);return self.crypto.getRandomValues(b),b}:self.msCrypto&&self.msCrypto.getRandomValues?d.prototype._rand=function(a){var b=new Uint8Array(a);return self.msCrypto.getRandomValues(b),b}:"object"==typeof window&&(d.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var f=a("crypto");if("function"!=typeof f.randomBytes)throw new Error("Not supported");d.prototype._rand=function(a){return f.randomBytes(a)}}catch(g){}},{crypto:2}],58:[function(a,b,c){var d=c;d.utils=a("./hash/utils"),d.common=a("./hash/common"),d.sha=a("./hash/sha"),d.ripemd=a("./hash/ripemd"),d.hmac=a("./hash/hmac"),d.sha1=d.sha.sha1,d.sha256=d.sha.sha256,d.sha224=d.sha.sha224,d.sha384=d.sha.sha384,d.sha512=d.sha.sha512,d.ripemd160=d.ripemd.ripemd160},{"./hash/common":59,"./hash/hmac":60,"./hash/ripemd":61,"./hash/sha":62,"./hash/utils":63}],59:[function(a,b,c){function d(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var e=a("../hash"),f=e.utils,g=f.assert;c.BlockHash=d,d.prototype.update=function(a,b){if(a=f.toArray(a,b),this.pending?this.pending=this.pending.concat(a):this.pending=a,this.pendingTotal+=a.length,this.pending.length>=this._delta8){a=this.pending;var c=a.length%this._delta8;this.pending=a.slice(a.length-c,a.length),0===this.pending.length&&(this.pending=null),a=f.join32(a,0,a.length-c,this.endian);for(var d=0;d<a.length;d+=this._delta32)this._update(a,d,d+this._delta32)}return this},d.prototype.digest=function(a){return this.update(this._pad()),g(null===this.pending),this._digest(a)},d.prototype._pad=function(){var a=this.pendingTotal,b=this._delta8,c=b-(a+this.padLength)%b,d=new Array(c+this.padLength);d[0]=128;for(var e=1;e<c;e++)d[e]=0;if(a<<=3,"big"===this.endian){for(var f=8;f<this.padLength;f++)d[e++]=0;d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=a>>>24&255,d[e++]=a>>>16&255,d[e++]=a>>>8&255,d[e++]=255&a}else{d[e++]=255&a,d[e++]=a>>>8&255,d[e++]=a>>>16&255,d[e++]=a>>>24&255,d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=0;for(var f=8;f<this.padLength;f++)d[e++]=0}return d}},{"../hash":58}],60:[function(a,b,c){function d(a,b,c){return this instanceof d?(this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,void this._init(f.toArray(b,c))):new d(a,b,c)}var e=a("../hash"),f=e.utils,g=f.assert;b.exports=d,d.prototype._init=function(a){a.length>this.blockSize&&(a=(new this.Hash).update(a).digest()),g(a.length<=this.blockSize);for(var b=a.length;b<this.blockSize;b++)a.push(0);for(var b=0;b<a.length;b++)a[b]^=54;this.inner=(new this.Hash).update(a);for(var b=0;b<a.length;b++)a[b]^=106;this.outer=(new this.Hash).update(a)},d.prototype.update=function(a,b){return this.inner.update(a,b),this},d.prototype.digest=function(a){return this.outer.update(this.inner.digest()),this.outer.digest(a)}},{"../hash":58}],61:[function(a,b,c){function d(){return this instanceof d?(n.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.endian="little")):new d}function e(a,b,c,d){return a<=15?b^c^d:a<=31?b&c|~b&d:a<=47?(b|~c)^d:a<=63?b&d|c&~d:b^(c|~d)}function f(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function g(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var h=a("../hash"),i=h.utils,j=i.rotl32,k=i.sum32,l=i.sum32_3,m=i.sum32_4,n=h.common.BlockHash;i.inherits(d,n),c.ripemd160=d,d.blockSize=512,d.outSize=160,d.hmacStrength=192,d.padLength=64,d.prototype._update=function(a,b){for(var c=this.h[0],d=this.h[1],h=this.h[2],i=this.h[3],n=this.h[4],s=c,t=d,u=h,v=i,w=n,x=0;x<80;x++){var y=k(j(m(c,e(x,d,h,i),a[o[x]+b],f(x)),q[x]),n);c=n,n=i,i=j(h,10),h=d,d=y,y=k(j(m(s,e(79-x,t,u,v),a[p[x]+b],g(x)),r[x]),w),s=w,w=v,v=j(u,10),u=t,t=y}y=l(this.h[1],h,v),this.h[1]=l(this.h[2],i,w),this.h[2]=l(this.h[3],n,s),this.h[3]=l(this.h[4],c,t),this.h[4]=l(this.h[0],d,u),this.h[0]=y},d.prototype._digest=function(a){return"hex"===a?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],q=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],r=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"../hash":58}],62:[function(a,b,c){function d(){return this instanceof d?(V.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=W,void(this.W=new Array(64))):new d}function e(){return this instanceof e?(d.call(this),void(this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])):new e}function f(){return this instanceof f?(V.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=X,void(this.W=new Array(160))):new f}function g(){return this instanceof g?(f.call(this),void(this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428])):new g}function h(){return this instanceof h?(V.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.W=new Array(80))):new h}function i(a,b,c){return a&b^~a&c}function j(a,b,c){return a&b^a&c^b&c}function k(a,b,c){return a^b^c}function l(a){return F(a,2)^F(a,13)^F(a,22)}function m(a){return F(a,6)^F(a,11)^F(a,25)}function n(a){return F(a,7)^F(a,18)^a>>>3}function o(a){return F(a,17)^F(a,19)^a>>>10}function p(a,b,c,d){return 0===a?i(b,c,d):1===a||3===a?k(b,c,d):2===a?j(b,c,d):void 0}function q(a,b,c,d,e,f){var g=a&c^~a&e;return g<0&&(g+=4294967296),g}function r(a,b,c,d,e,f){var g=b&d^~b&f;return g<0&&(g+=4294967296),g}function s(a,b,c,d,e,f){var g=a&c^a&e^c&e;return g<0&&(g+=4294967296),g}function t(a,b,c,d,e,f){var g=b&d^b&f^d&f;return g<0&&(g+=4294967296),g}function u(a,b){var c=K(a,b,28),d=K(b,a,2),e=K(b,a,7),f=c^d^e;return f<0&&(f+=4294967296),f}function v(a,b){var c=L(a,b,28),d=L(b,a,2),e=L(b,a,7),f=c^d^e;return f<0&&(f+=4294967296),f}function w(a,b){var c=K(a,b,14),d=K(a,b,18),e=K(b,a,9),f=c^d^e;return f<0&&(f+=4294967296),f}function x(a,b){var c=L(a,b,14),d=L(a,b,18),e=L(b,a,9),f=c^d^e;return f<0&&(f+=4294967296),f}function y(a,b){var c=K(a,b,1),d=K(a,b,8),e=M(a,b,7),f=c^d^e;return f<0&&(f+=4294967296),f}function z(a,b){var c=L(a,b,1),d=L(a,b,8),e=N(a,b,7),f=c^d^e;return f<0&&(f+=4294967296),f}function A(a,b){var c=K(a,b,19),d=K(b,a,29),e=M(a,b,6),f=c^d^e;return f<0&&(f+=4294967296),f}function B(a,b){var c=L(a,b,19),d=L(b,a,29),e=N(a,b,6),f=c^d^e;return f<0&&(f+=4294967296),f}var C=a("../hash"),D=C.utils,E=D.assert,F=D.rotr32,G=D.rotl32,H=D.sum32,I=D.sum32_4,J=D.sum32_5,K=D.rotr64_hi,L=D.rotr64_lo,M=D.shr64_hi,N=D.shr64_lo,O=D.sum64,P=D.sum64_hi,Q=D.sum64_lo,R=D.sum64_4_hi,S=D.sum64_4_lo,T=D.sum64_5_hi,U=D.sum64_5_lo,V=C.common.BlockHash,W=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],X=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Y=[1518500249,1859775393,2400959708,3395469782];D.inherits(d,V),c.sha256=d,d.blockSize=512,d.outSize=256,d.hmacStrength=192,d.padLength=64,d.prototype._update=function(a,b){for(var c=this.W,d=0;d<16;d++)c[d]=a[b+d];for(;d<c.length;d++)c[d]=I(o(c[d-2]),c[d-7],n(c[d-15]),c[d-16]);var e=this.h[0],f=this.h[1],g=this.h[2],h=this.h[3],k=this.h[4],p=this.h[5],q=this.h[6],r=this.h[7];E(this.k.length===c.length);for(var d=0;d<c.length;d++){var s=J(r,m(k),i(k,p,q),this.k[d],c[d]),t=H(l(e),j(e,f,g));r=q,q=p,p=k,k=H(h,s),h=g,g=f,f=e,e=H(s,t)}this.h[0]=H(this.h[0],e),this.h[1]=H(this.h[1],f),this.h[2]=H(this.h[2],g),this.h[3]=H(this.h[3],h),this.h[4]=H(this.h[4],k),this.h[5]=H(this.h[5],p),this.h[6]=H(this.h[6],q),this.h[7]=H(this.h[7],r)},d.prototype._digest=function(a){return"hex"===a?D.toHex32(this.h,"big"):D.split32(this.h,"big")},D.inherits(e,d),c.sha224=e,e.blockSize=512,e.outSize=224,e.hmacStrength=192,e.padLength=64,e.prototype._digest=function(a){return"hex"===a?D.toHex32(this.h.slice(0,7),"big"):D.split32(this.h.slice(0,7),"big")},D.inherits(f,V),c.sha512=f,f.blockSize=1024,f.outSize=512,f.hmacStrength=192,f.padLength=128,f.prototype._prepareBlock=function(a,b){for(var c=this.W,d=0;d<32;d++)c[d]=a[b+d];for(;d<c.length;d+=2){var e=A(c[d-4],c[d-3]),f=B(c[d-4],c[d-3]),g=c[d-14],h=c[d-13],i=y(c[d-30],c[d-29]),j=z(c[d-30],c[d-29]),k=c[d-32],l=c[d-31];c[d]=R(e,f,g,h,i,j,k,l),c[d+1]=S(e,f,g,h,i,j,k,l)}},f.prototype._update=function(a,b){this._prepareBlock(a,b);var c=this.W,d=this.h[0],e=this.h[1],f=this.h[2],g=this.h[3],h=this.h[4],i=this.h[5],j=this.h[6],k=this.h[7],l=this.h[8],m=this.h[9],n=this.h[10],o=this.h[11],p=this.h[12],y=this.h[13],z=this.h[14],A=this.h[15];E(this.k.length===c.length);for(var B=0;B<c.length;B+=2){var C=z,D=A,F=w(l,m),G=x(l,m),H=q(l,m,n,o,p,y),I=r(l,m,n,o,p,y),J=this.k[B],K=this.k[B+1],L=c[B],M=c[B+1],N=T(C,D,F,G,H,I,J,K,L,M),R=U(C,D,F,G,H,I,J,K,L,M),C=u(d,e),D=v(d,e),F=s(d,e,f,g,h,i),G=t(d,e,f,g,h,i),S=P(C,D,F,G),V=Q(C,D,F,G);z=p,A=y,p=n,y=o,n=l,o=m,l=P(j,k,N,R),m=Q(k,k,N,R),j=h,k=i,h=f,i=g,f=d,g=e,d=P(N,R,S,V),e=Q(N,R,S,V)}O(this.h,0,d,e),O(this.h,2,f,g),O(this.h,4,h,i),O(this.h,6,j,k),O(this.h,8,l,m),O(this.h,10,n,o),O(this.h,12,p,y),O(this.h,14,z,A)},f.prototype._digest=function(a){return"hex"===a?D.toHex32(this.h,"big"):D.split32(this.h,"big")},D.inherits(g,f),c.sha384=g,g.blockSize=1024,g.outSize=384,g.hmacStrength=192,g.padLength=128,g.prototype._digest=function(a){return"hex"===a?D.toHex32(this.h.slice(0,12),"big"):D.split32(this.h.slice(0,12),"big")},D.inherits(h,V),c.sha1=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(a,b){for(var c=this.W,d=0;d<16;d++)c[d]=a[b+d];for(;d<c.length;d++)c[d]=G(c[d-3]^c[d-8]^c[d-14]^c[d-16],1);for(var e=this.h[0],f=this.h[1],g=this.h[2],h=this.h[3],i=this.h[4],d=0;d<c.length;d++){var j=~~(d/20),k=J(G(e,5),p(j,f,g,h),i,c[d],Y[j]);i=h,h=g,g=G(f,30),f=e,e=k}this.h[0]=H(this.h[0],e),this.h[1]=H(this.h[1],f),this.h[2]=H(this.h[2],g),this.h[3]=H(this.h[3],h),this.h[4]=H(this.h[4],i)},h.prototype._digest=function(a){return"hex"===a?D.toHex32(this.h,"big"):D.split32(this.h,"big")}},{"../hash":58}],63:[function(a,b,c){function d(a,b){if(Array.isArray(a))return a.slice();if(!a)return[];var c=[];if("string"==typeof a)if(b){if("hex"===b){a=a.replace(/[^a-z0-9]+/gi,""),a.length%2!==0&&(a="0"+a);for(var d=0;d<a.length;d+=2)c.push(parseInt(a[d]+a[d+1],16))}}else for(var d=0;d<a.length;d++){var e=a.charCodeAt(d),f=e>>8,g=255&e;f?c.push(f,g):c.push(g)}else for(var d=0;d<a.length;d++)c[d]=0|a[d];return c}function e(a){for(var b="",c=0;c<a.length;c++)b+=h(a[c].toString(16));return b}function f(a){var b=a>>>24|a>>>8&65280|a<<8&16711680|(255&a)<<24;return b>>>0}function g(a,b){for(var c="",d=0;d<a.length;d++){var e=a[d];"little"===b&&(e=f(e)),c+=i(e.toString(16))}return c}function h(a){return 1===a.length?"0"+a:a}function i(a){return 7===a.length?"0"+a:6===a.length?"00"+a:5===a.length?"000"+a:4===a.length?"0000"+a:3===a.length?"00000"+a:2===a.length?"000000"+a:1===a.length?"0000000"+a:a}function j(a,b,c,d){var e=c-b;r(e%4===0);for(var f=new Array(e/4),g=0,h=b;g<f.length;g++,h+=4){var i;i="big"===d?a[h]<<24|a[h+1]<<16|a[h+2]<<8|a[h+3]:a[h+3]<<24|a[h+2]<<16|a[h+1]<<8|a[h],f[g]=i>>>0}return f}function k(a,b){for(var c=new Array(4*a.length),d=0,e=0;d<a.length;d++,e+=4){var f=a[d];"big"===b?(c[e]=f>>>24,c[e+1]=f>>>16&255,c[e+2]=f>>>8&255,c[e+3]=255&f):(c[e+3]=f>>>24,c[e+2]=f>>>16&255,c[e+1]=f>>>8&255,c[e]=255&f)}return c}function l(a,b){return a>>>b|a<<32-b}function m(a,b){return a<<b|a>>>32-b}function n(a,b){return a+b>>>0}function o(a,b,c){return a+b+c>>>0}function p(a,b,c,d){return a+b+c+d>>>0}function q(a,b,c,d,e){return a+b+c+d+e>>>0}function r(a,b){if(!a)throw new Error(b||"Assertion failed")}function s(a,b,c,d){var e=a[b],f=a[b+1],g=d+f>>>0,h=(g<d?1:0)+c+e;a[b]=h>>>0,a[b+1]=g}function t(a,b,c,d){var e=b+d>>>0,f=(e<b?1:0)+a+c;return f>>>0}function u(a,b,c,d){var e=b+d;return e>>>0}function v(a,b,c,d,e,f,g,h){var i=0,j=b;j=j+d>>>0,i+=j<b?1:0,j=j+f>>>0,i+=j<f?1:0,j=j+h>>>0,i+=j<h?1:0;var k=a+c+e+g+i;return k>>>0}function w(a,b,c,d,e,f,g,h){var i=b+d+f+h;return i>>>0}function x(a,b,c,d,e,f,g,h,i,j){var k=0,l=b;l=l+d>>>0,k+=l<b?1:0,l=l+f>>>0,k+=l<f?1:0,l=l+h>>>0,k+=l<h?1:0,l=l+j>>>0,k+=l<j?1:0;var m=a+c+e+g+i+k;return m>>>0}function y(a,b,c,d,e,f,g,h,i,j){var k=b+d+f+h+j;return k>>>0}function z(a,b,c){var d=b<<32-c|a>>>c;return d>>>0}function A(a,b,c){var d=a<<32-c|b>>>c;return d>>>0}function B(a,b,c){return a>>>c}function C(a,b,c){var d=a<<32-c|b>>>c;return d>>>0}var D=c,E=a("inherits");D.toArray=d,D.toHex=e,D.htonl=f,D.toHex32=g,D.zero2=h,D.zero8=i,D.join32=j,D.split32=k,D.rotr32=l,D.rotl32=m,D.sum32=n,D.sum32_3=o,D.sum32_4=p,D.sum32_5=q,D.assert=r,D.inherits=E,c.sum64=s,c.sum64_hi=t,c.sum64_lo=u,c.sum64_4_hi=v,c.sum64_4_lo=w,c.sum64_5_hi=x,c.sum64_5_lo=y,c.rotr64_hi=z,c.rotr64_lo=A,c.shr64_hi=B,c.shr64_lo=C},{inherits:207}],64:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var b=f.toArray(a.entropy,a.entropyEnc||"hex"),c=f.toArray(a.nonce,a.nonceEnc||"hex"),e=f.toArray(a.pers,a.persEnc||"hex");g(b.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(b,c,e)}var e=a("hash.js"),f=a("minimalistic-crypto-utils"),g=a("minimalistic-assert");b.exports=d,d.prototype._init=function(a,b,c){var d=a.concat(b).concat(c);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var e=0;e<this.V.length;e++)this.K[e]=0,this.V[e]=1;this._update(d),this.reseed=1,this.reseedInterval=281474976710656},d.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},d.prototype._update=function(a){var b=this._hmac().update(this.V).update([0]);a&&(b=b.update(a)),this.K=b.digest(),this.V=this._hmac().update(this.V).digest(),a&&(this.K=this._hmac().update(this.V).update([1]).update(a).digest(),this.V=this._hmac().update(this.V).digest())},d.prototype.reseed=function(a,b,c,d){"string"!=typeof b&&(d=c,c=b,b=null),a=f.toArray(a,b),c=f.toArray(c,d),g(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(a.concat(c||[])),this.reseed=1},d.prototype.generate=function(a,b,c,d){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof b&&(d=c,c=b,b=null),c&&(c=f.toArray(c,d||"hex"),this._update(c));for(var e=[];e.length<a;)this.V=this._hmac().update(this.V).digest(),e=e.concat(this.V);var g=e.slice(0,a);return this._update(c),this.reseed++,f.encode(g,b)}},{"hash.js":58,"minimalistic-assert":65,"minimalistic-crypto-utils":66}],65:[function(a,b,c){arguments[4][35][0].apply(c,arguments)},{dup:35}],66:[function(a,b,c){"use strict";function d(a,b){if(Array.isArray(a))return a.slice();if(!a)return[];var c=[];if("string"!=typeof a){for(var d=0;d<a.length;d++)c[d]=0|a[d];return c}if("hex"===b){a=a.replace(/[^a-z0-9]+/gi,""),a.length%2!==0&&(a="0"+a);for(var d=0;d<a.length;d+=2)c.push(parseInt(a[d]+a[d+1],16))}else for(var d=0;d<a.length;d++){var e=a.charCodeAt(d),f=e>>8,g=255&e;f?c.push(f,g):c.push(g)}return c}function e(a){return 1===a.length?"0"+a:a}function f(a){for(var b="",c=0;c<a.length;c++)b+=e(a[c].toString(16));return b}var g=c;g.toArray=d,g.zero2=e,g.toHex=f,g.encode=function(a,b){return"hex"===b?f(a):a}},{}],67:[function(a,b,c){b.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},keywords:["EC","Elliptic","curve","Cryptography"],author:{name:"Fedor Indutny",email:"fedor@indutny.com"},license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",_id:"elliptic@6.4.0",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_from:"elliptic@>=6.0.0 <7.0.0",_npmVersion:"3.10.8",_nodeVersion:"7.0.0",_npmUser:{name:"indutny",email:"fedor@indutny.com"},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},maintainers:[{name:"indutny",email:"fedor@indutny.com"}],_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},directories:{},_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",readme:"ERROR: No README data found!"}},{}],68:[function(a,b,c){b.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],69:[function(a,b,c){"use strict";var d=a("asn1.js");c.certificate=a("./certificate");var e=d.define("RSAPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("modulus")["int"](),this.key("publicExponent")["int"](),this.key("privateExponent")["int"](),this.key("prime1")["int"](),this.key("prime2")["int"](),this.key("exponent1")["int"](),this.key("exponent2")["int"](),this.key("coefficient")["int"]())});c.RSAPrivateKey=e;var f=d.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus")["int"](),this.key("publicExponent")["int"]())});c.RSAPublicKey=f;var g=d.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(h),this.key("subjectPublicKey").bitstr())});c.PublicKey=g;var h=d.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p")["int"](),this.key("q")["int"](),this.key("g")["int"]()).optional())}),i=d.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version")["int"](),this.key("algorithm").use(h),this.key("subjectPrivateKey").octstr())});c.PrivateKey=i;var j=d.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters")["int"]())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});c.EncryptedPrivateKey=j;var k=d.define("DSAPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("p")["int"](),this.key("q")["int"](),this.key("g")["int"](),this.key("pub_key")["int"](),this.key("priv_key")["int"]())});c.DSAPrivateKey=k,c.DSAparam=d.define("DSAparam",function(){this["int"]()});var l=d.define("ECPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(m),this.key("publicKey").optional().explicit(1).bitstr())});c.ECPrivateKey=l;var m=d.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});c.signature=d.define("signature",function(){this.seq().obj(this.key("r")["int"](),this.key("s")["int"]())})},{"./certificate":70,"asn1.js":73}],70:[function(a,b,c){"use strict";var d=a("asn1.js"),e=d.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),f=d.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),g=d.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),h=d.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(g),this.key("subjectPublicKey").bitstr())}),i=d.define("RelativeDistinguishedName",function(){this.setof(f)}),j=d.define("RDNSequence",function(){this.seqof(i)}),k=d.define("Name",function(){this.choice({rdnSequence:this.use(j)})}),l=d.define("Validity",function(){this.seq().obj(this.key("notBefore").use(e),this.key("notAfter").use(e))}),m=d.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),n=d.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0)["int"](),this.key("serialNumber")["int"](),this.key("signature").use(g),this.key("issuer").use(k),this.key("validity").use(l),this.key("subject").use(k),this.key("subjectPublicKeyInfo").use(h),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(m).optional())}),o=d.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(n),this.key("signatureAlgorithm").use(g),this.key("signatureValue").bitstr())});b.exports=o},{"asn1.js":73}],71:[function(a,b,c){(function(c){var d=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,e=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,f=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,g=a("evp_bytestokey"),h=a("browserify-aes");b.exports=function(a,b){var i,j=a.toString(),k=j.match(d);if(k){var l="aes"+k[1],m=new c(k[2],"hex"),n=new c(k[3].replace(/\r?\n/g,""),"base64"),o=g(b,m.slice(0,8),parseInt(k[1],10)).key,p=[],q=h.createDecipheriv(l,o,m);p.push(q.update(n)),p.push(q["final"]()),i=c.concat(p)}else{var r=j.match(f);i=new c(r[2].replace(/\r?\n/g,""),"base64")}var s=j.match(e)[1];return{tag:s,data:i}}}).call(this,a("buffer").Buffer)},{"browserify-aes":90,buffer:3,evp_bytestokey:105}],72:[function(a,b,c){(function(c){function d(a){var b;"object"!=typeof a||c.isBuffer(a)||(b=a.passphrase,a=a.key),"string"==typeof a&&(a=new c(a));var d,g,i=h(a,b),j=i.tag,k=i.data;switch(j){case"CERTIFICATE":g=f.certificate.decode(k,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(g||(g=f.PublicKey.decode(k,"der")),d=g.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return f.RSAPublicKey.decode(g.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return g.subjectPrivateKey=g.subjectPublicKey,{type:"ec",data:g};case"1.2.840.10040.4.1":return g.algorithm.params.pub_key=f.DSAparam.decode(g.subjectPublicKey.data,"der"),{type:"dsa",data:g.algorithm.params};default:throw new Error("unknown key id "+d)}throw new Error("unknown key type "+j);case"ENCRYPTED PRIVATE KEY":k=f.EncryptedPrivateKey.decode(k,"der"),k=e(k,b);case"PRIVATE KEY":switch(g=f.PrivateKey.decode(k,"der"),d=g.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return f.RSAPrivateKey.decode(g.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:g.algorithm.curve,privateKey:f.ECPrivateKey.decode(g.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return g.algorithm.params.priv_key=f.DSAparam.decode(g.subjectPrivateKey,"der"),{type:"dsa",params:g.algorithm.params};default:throw new Error("unknown key id "+d)}throw new Error("unknown key type "+j);case"RSA PUBLIC KEY":return f.RSAPublicKey.decode(k,"der");case"RSA PRIVATE KEY":return f.RSAPrivateKey.decode(k,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:f.DSAPrivateKey.decode(k,"der")};case"EC PRIVATE KEY":return k=f.ECPrivateKey.decode(k,"der"),{curve:k.parameters.value,privateKey:k.privateKey};default:throw new Error("unknown key type "+j)}}function e(a,b){var d=a.algorithm.decrypt.kde.kdeparams.salt,e=parseInt(a.algorithm.decrypt.kde.kdeparams.iters.toString(),10),f=g[a.algorithm.decrypt.cipher.algo.join(".")],h=a.algorithm.decrypt.cipher.iv,k=a.subjectPrivateKey,l=parseInt(f.split("-")[1],10)/8,m=j.pbkdf2Sync(b,d,e,l),n=i.createDecipheriv(f,m,h),o=[];return o.push(n.update(k)),o.push(n["final"]()),c.concat(o)}var f=a("./asn1"),g=a("./aesid.json"),h=a("./fixProc"),i=a("browserify-aes"),j=a("pbkdf2");b.exports=d,d.signature=f.signature}).call(this,a("buffer").Buffer)},{"./aesid.json":68,"./asn1":69,"./fixProc":71,"browserify-aes":90,buffer:3,pbkdf2:157}],73:[function(a,b,c){var d=c;d.bignum=a("bn.js"),d.define=a("./asn1/api").define,d.base=a("./asn1/base"),d.constants=a("./asn1/constants"),d.decoders=a("./asn1/decoders"),d.encoders=a("./asn1/encoders")},{"./asn1/api":74,"./asn1/base":76,"./asn1/constants":80,"./asn1/decoders":82,"./asn1/encoders":85,"bn.js":40}],74:[function(a,b,c){function d(a,b){this.name=a,this.body=b,this.decoders={},this.encoders={}}var e=a("../asn1"),f=a("inherits"),g=c;g.define=function(a,b){return new d(a,b)},d.prototype._createNamed=function(b){var c;try{c=a("vm").runInThisContext("(function "+this.name+"(entity) {\n  this._initNamed(entity);\n})")}catch(d){c=function(a){this._initNamed(a)}}return f(c,b),c.prototype._initNamed=function(a){b.call(this,a)},new c(this)},d.prototype._getDecoder=function(a){return a=a||"der",this.decoders.hasOwnProperty(a)||(this.decoders[a]=this._createNamed(e.decoders[a])),this.decoders[a]},d.prototype.decode=function(a,b,c){return this._getDecoder(b).decode(a,c)},d.prototype._getEncoder=function(a){return a=a||"der",this.encoders.hasOwnProperty(a)||(this.encoders[a]=this._createNamed(e.encoders[a])),this.encoders[a]},d.prototype.encode=function(a,b,c){return this._getEncoder(b).encode(a,c)}},{"../asn1":73,inherits:207,vm:228}],75:[function(a,b,c){function d(a,b){return g.call(this,b),h.isBuffer(a)?(this.base=a,this.offset=0,void(this.length=a.length)):void this.error("Input not Buffer")}function e(a,b){if(Array.isArray(a))this.length=0,this.value=a.map(function(a){return a instanceof e||(a=new e(a,b)),this.length+=a.length,a},this);else if("number"==typeof a){if(!(0<=a&&a<=255))return b.error("non-byte EncoderBuffer value");this.value=a,this.length=1}else if("string"==typeof a)this.value=a,this.length=h.byteLength(a);else{if(!h.isBuffer(a))return b.error("Unsupported type: "+typeof a);this.value=a,this.length=a.length}}var f=a("inherits"),g=a("../base").Reporter,h=a("buffer").Buffer;f(d,g),c.DecoderBuffer=d,d.prototype.save=function(){return{offset:this.offset,reporter:g.prototype.save.call(this)}},d.prototype.restore=function(a){
var b=new d(this.base);return b.offset=a.offset,b.length=this.offset,this.offset=a.offset,g.prototype.restore.call(this,a.reporter),b},d.prototype.isEmpty=function(){return this.offset===this.length},d.prototype.readUInt8=function(a){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(a||"DecoderBuffer overrun")},d.prototype.skip=function(a,b){if(!(this.offset+a<=this.length))return this.error(b||"DecoderBuffer overrun");var c=new d(this.base);return c._reporterState=this._reporterState,c.offset=this.offset,c.length=this.offset+a,this.offset+=a,c},d.prototype.raw=function(a){return this.base.slice(a?a.offset:this.offset,this.length)},c.EncoderBuffer=e,e.prototype.join=function(a,b){return a||(a=new h(this.length)),b||(b=0),0===this.length?a:(Array.isArray(this.value)?this.value.forEach(function(c){c.join(a,b),b+=c.length}):("number"==typeof this.value?a[b]=this.value:"string"==typeof this.value?a.write(this.value,b):h.isBuffer(this.value)&&this.value.copy(a,b),b+=this.length),a)}},{"../base":76,buffer:3,inherits:207}],76:[function(a,b,c){var d=c;d.Reporter=a("./reporter").Reporter,d.DecoderBuffer=a("./buffer").DecoderBuffer,d.EncoderBuffer=a("./buffer").EncoderBuffer,d.Node=a("./node")},{"./buffer":75,"./node":77,"./reporter":78}],77:[function(a,b,c){function d(a,b){var c={};this._baseState=c,c.enc=a,c.parent=b||null,c.children=null,c.tag=null,c.args=null,c.reverseArgs=null,c.choice=null,c.optional=!1,c.any=!1,c.obj=!1,c.use=null,c.useDecoder=null,c.key=null,c["default"]=null,c.explicit=null,c.implicit=null,c.contains=null,c.parent||(c.children=[],this._wrap())}var e=a("../base").Reporter,f=a("../base").EncoderBuffer,g=a("../base").DecoderBuffer,h=a("minimalistic-assert"),i=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],j=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(i),k=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];b.exports=d;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];d.prototype.clone=function(){var a=this._baseState,b={};l.forEach(function(c){b[c]=a[c]});var c=new this.constructor(b.parent);return c._baseState=b,c},d.prototype._wrap=function(){var a=this._baseState;j.forEach(function(b){this[b]=function(){var c=new this.constructor(this);return a.children.push(c),c[b].apply(c,arguments)}},this)},d.prototype._init=function(a){var b=this._baseState;h(null===b.parent),a.call(this),b.children=b.children.filter(function(a){return a._baseState.parent===this},this),h.equal(b.children.length,1,"Root node can have only one child")},d.prototype._useArgs=function(a){var b=this._baseState,c=a.filter(function(a){return a instanceof this.constructor},this);a=a.filter(function(a){return!(a instanceof this.constructor)},this),0!==c.length&&(h(null===b.children),b.children=c,c.forEach(function(a){a._baseState.parent=this},this)),0!==a.length&&(h(null===b.args),b.args=a,b.reverseArgs=a.map(function(a){if("object"!=typeof a||a.constructor!==Object)return a;var b={};return Object.keys(a).forEach(function(c){c==(0|c)&&(c|=0);var d=a[c];b[d]=c}),b}))},k.forEach(function(a){d.prototype[a]=function(){var b=this._baseState;throw new Error(a+" not implemented for encoding: "+b.enc)}}),i.forEach(function(a){d.prototype[a]=function(){var b=this._baseState,c=Array.prototype.slice.call(arguments);return h(null===b.tag),b.tag=a,this._useArgs(c),this}}),d.prototype.use=function(a){h(a);var b=this._baseState;return h(null===b.use),b.use=a,this},d.prototype.optional=function(){var a=this._baseState;return a.optional=!0,this},d.prototype.def=function(a){var b=this._baseState;return h(null===b["default"]),b["default"]=a,b.optional=!0,this},d.prototype.explicit=function(a){var b=this._baseState;return h(null===b.explicit&&null===b.implicit),b.explicit=a,this},d.prototype.implicit=function(a){var b=this._baseState;return h(null===b.explicit&&null===b.implicit),b.implicit=a,this},d.prototype.obj=function(){var a=this._baseState,b=Array.prototype.slice.call(arguments);return a.obj=!0,0!==b.length&&this._useArgs(b),this},d.prototype.key=function(a){var b=this._baseState;return h(null===b.key),b.key=a,this},d.prototype.any=function(){var a=this._baseState;return a.any=!0,this},d.prototype.choice=function(a){var b=this._baseState;return h(null===b.choice),b.choice=a,this._useArgs(Object.keys(a).map(function(b){return a[b]})),this},d.prototype.contains=function(a){var b=this._baseState;return h(null===b.use),b.contains=a,this},d.prototype._decode=function(a,b){var c=this._baseState;if(null===c.parent)return a.wrapResult(c.children[0]._decode(a,b));var d=c["default"],e=!0,f=null;if(null!==c.key&&(f=a.enterKey(c.key)),c.optional){var h=null;if(null!==c.explicit?h=c.explicit:null!==c.implicit?h=c.implicit:null!==c.tag&&(h=c.tag),null!==h||c.any){if(e=this._peekTag(a,h,c.any),a.isError(e))return e}else{var i=a.save();try{null===c.choice?this._decodeGeneric(c.tag,a,b):this._decodeChoice(a,b),e=!0}catch(j){e=!1}a.restore(i)}}var k;if(c.obj&&e&&(k=a.enterObject()),e){if(null!==c.explicit){var l=this._decodeTag(a,c.explicit);if(a.isError(l))return l;a=l}var m=a.offset;if(null===c.use&&null===c.choice){if(c.any)var i=a.save();var n=this._decodeTag(a,null!==c.implicit?c.implicit:c.tag,c.any);if(a.isError(n))return n;c.any?d=a.raw(i):a=n}if(b&&b.track&&null!==c.tag&&b.track(a.path(),m,a.length,"tagged"),b&&b.track&&null!==c.tag&&b.track(a.path(),a.offset,a.length,"content"),d=c.any?d:null===c.choice?this._decodeGeneric(c.tag,a,b):this._decodeChoice(a,b),a.isError(d))return d;if(c.any||null!==c.choice||null===c.children||c.children.forEach(function(c){c._decode(a,b)}),c.contains&&("octstr"===c.tag||"bitstr"===c.tag)){var o=new g(d);d=this._getUse(c.contains,a._reporterState.obj)._decode(o,b)}}return c.obj&&e&&(d=a.leaveObject(k)),null===c.key||null===d&&e!==!0?null!==f&&a.exitKey(f):a.leaveKey(f,c.key,d),d},d.prototype._decodeGeneric=function(a,b,c){var d=this._baseState;return"seq"===a||"set"===a?null:"seqof"===a||"setof"===a?this._decodeList(b,a,d.args[0],c):/str$/.test(a)?this._decodeStr(b,a,c):"objid"===a&&d.args?this._decodeObjid(b,d.args[0],d.args[1],c):"objid"===a?this._decodeObjid(b,null,null,c):"gentime"===a||"utctime"===a?this._decodeTime(b,a,c):"null_"===a?this._decodeNull(b,c):"bool"===a?this._decodeBool(b,c):"objDesc"===a?this._decodeStr(b,a,c):"int"===a||"enum"===a?this._decodeInt(b,d.args&&d.args[0],c):null!==d.use?this._getUse(d.use,b._reporterState.obj)._decode(b,c):b.error("unknown tag: "+a)},d.prototype._getUse=function(a,b){var c=this._baseState;return c.useDecoder=this._use(a,b),h(null===c.useDecoder._baseState.parent),c.useDecoder=c.useDecoder._baseState.children[0],c.implicit!==c.useDecoder._baseState.implicit&&(c.useDecoder=c.useDecoder.clone(),c.useDecoder._baseState.implicit=c.implicit),c.useDecoder},d.prototype._decodeChoice=function(a,b){var c=this._baseState,d=null,e=!1;return Object.keys(c.choice).some(function(f){var g=a.save(),h=c.choice[f];try{var i=h._decode(a,b);if(a.isError(i))return!1;d={type:f,value:i},e=!0}catch(j){return a.restore(g),!1}return!0},this),e?d:a.error("Choice not matched")},d.prototype._createEncoderBuffer=function(a){return new f(a,this.reporter)},d.prototype._encode=function(a,b,c){var d=this._baseState;if(null===d["default"]||d["default"]!==a){var e=this._encodeValue(a,b,c);if(void 0!==e&&!this._skipDefault(e,b,c))return e}},d.prototype._encodeValue=function(a,b,c){var d=this._baseState;if(null===d.parent)return d.children[0]._encode(a,b||new e);var f=null;if(this.reporter=b,d.optional&&void 0===a){if(null===d["default"])return;a=d["default"]}var g=null,h=!1;if(d.any)f=this._createEncoderBuffer(a);else if(d.choice)f=this._encodeChoice(a,b);else if(d.contains)g=this._getUse(d.contains,c)._encode(a,b),h=!0;else if(d.children)g=d.children.map(function(c){if("null_"===c._baseState.tag)return c._encode(null,b,a);if(null===c._baseState.key)return b.error("Child should have a key");var d=b.enterKey(c._baseState.key);if("object"!=typeof a)return b.error("Child expected, but input is not object");var e=c._encode(a[c._baseState.key],b,a);return b.leaveKey(d),e},this).filter(function(a){return a}),g=this._createEncoderBuffer(g);else if("seqof"===d.tag||"setof"===d.tag){if(!d.args||1!==d.args.length)return b.error("Too many args for : "+d.tag);if(!Array.isArray(a))return b.error("seqof/setof, but data is not Array");var i=this.clone();i._baseState.implicit=null,g=this._createEncoderBuffer(a.map(function(c){var d=this._baseState;return this._getUse(d.args[0],a)._encode(c,b)},i))}else null!==d.use?f=this._getUse(d.use,c)._encode(a,b):(g=this._encodePrimitive(d.tag,a),h=!0);var f;if(!d.any&&null===d.choice){var j=null!==d.implicit?d.implicit:d.tag,k=null===d.implicit?"universal":"context";null===j?null===d.use&&b.error("Tag could be ommited only for .use()"):null===d.use&&(f=this._encodeComposite(j,h,k,g))}return null!==d.explicit&&(f=this._encodeComposite(d.explicit,!1,"context",f)),f},d.prototype._encodeChoice=function(a,b){var c=this._baseState,d=c.choice[a.type];return d||h(!1,a.type+" not found in "+JSON.stringify(Object.keys(c.choice))),d._encode(a.value,b)},d.prototype._encodePrimitive=function(a,b){var c=this._baseState;if(/str$/.test(a))return this._encodeStr(b,a);if("objid"===a&&c.args)return this._encodeObjid(b,c.reverseArgs[0],c.args[1]);if("objid"===a)return this._encodeObjid(b,null,null);if("gentime"===a||"utctime"===a)return this._encodeTime(b,a);if("null_"===a)return this._encodeNull();if("int"===a||"enum"===a)return this._encodeInt(b,c.args&&c.reverseArgs[0]);if("bool"===a)return this._encodeBool(b);if("objDesc"===a)return this._encodeStr(b,a);throw new Error("Unsupported tag: "+a)},d.prototype._isNumstr=function(a){return/^[0-9 ]*$/.test(a)},d.prototype._isPrintstr=function(a){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(a)}},{"../base":76,"minimalistic-assert":87}],78:[function(a,b,c){function d(a){this._reporterState={obj:null,path:[],options:a||{},errors:[]}}function e(a,b){this.path=a,this.rethrow(b)}var f=a("inherits");c.Reporter=d,d.prototype.isError=function(a){return a instanceof e},d.prototype.save=function(){var a=this._reporterState;return{obj:a.obj,pathLen:a.path.length}},d.prototype.restore=function(a){var b=this._reporterState;b.obj=a.obj,b.path=b.path.slice(0,a.pathLen)},d.prototype.enterKey=function(a){return this._reporterState.path.push(a)},d.prototype.exitKey=function(a){var b=this._reporterState;b.path=b.path.slice(0,a-1)},d.prototype.leaveKey=function(a,b,c){var d=this._reporterState;this.exitKey(a),null!==d.obj&&(d.obj[b]=c)},d.prototype.path=function(){return this._reporterState.path.join("/")},d.prototype.enterObject=function(){var a=this._reporterState,b=a.obj;return a.obj={},b},d.prototype.leaveObject=function(a){var b=this._reporterState,c=b.obj;return b.obj=a,c},d.prototype.error=function(a){var b,c=this._reporterState,d=a instanceof e;if(b=d?a:new e(c.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),a.message||a,a.stack),!c.options.partial)throw b;return d||c.errors.push(b),b},d.prototype.wrapResult=function(a){var b=this._reporterState;return b.options.partial?{result:this.isError(a)?null:a,errors:b.errors}:a},f(e,Error),e.prototype.rethrow=function(a){if(this.message=a+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,e),!this.stack)try{throw new Error(this.message)}catch(b){this.stack=b.stack}return this}},{inherits:207}],79:[function(a,b,c){var d=a("../constants");c.tagClass={0:"universal",1:"application",2:"context",3:"private"},c.tagClassByName=d._reverse(c.tagClass),c.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},c.tagByName=d._reverse(c.tag)},{"../constants":80}],80:[function(a,b,c){var d=c;d._reverse=function(a){var b={};return Object.keys(a).forEach(function(c){(0|c)==c&&(c=0|c);var d=a[c];b[d]=c}),b},d.der=a("./der")},{"./der":79}],81:[function(a,b,c){function d(a){this.enc="der",this.name=a.name,this.entity=a,this.tree=new e,this.tree._init(a.body)}function e(a){j.Node.call(this,"der",a)}function f(a,b){var c=a.readUInt8(b);if(a.isError(c))return c;var d=l.tagClass[c>>6],e=0===(32&c);if(31===(31&c)){var f=c;for(c=0;128===(128&f);){if(f=a.readUInt8(b),a.isError(f))return f;c<<=7,c|=127&f}}else c&=31;var g=l.tag[c];return{cls:d,primitive:e,tag:c,tagStr:g}}function g(a,b,c){var d=a.readUInt8(c);if(a.isError(d))return d;if(!b&&128===d)return null;if(0===(128&d))return d;var e=127&d;if(e>4)return a.error("length octect is too long");d=0;for(var f=0;f<e;f++){d<<=8;var g=a.readUInt8(c);if(a.isError(g))return g;d|=g}return d}var h=a("inherits"),i=a("../../asn1"),j=i.base,k=i.bignum,l=i.constants.der;b.exports=d,d.prototype.decode=function(a,b){return a instanceof j.DecoderBuffer||(a=new j.DecoderBuffer(a,b)),this.tree._decode(a,b)},h(e,j.Node),e.prototype._peekTag=function(a,b,c){if(a.isEmpty())return!1;var d=a.save(),e=f(a,'Failed to peek tag: "'+b+'"');return a.isError(e)?e:(a.restore(d),e.tag===b||e.tagStr===b||e.tagStr+"of"===b||c)},e.prototype._decodeTag=function(a,b,c){var d=f(a,'Failed to decode tag of "'+b+'"');if(a.isError(d))return d;var e=g(a,d.primitive,'Failed to get length of "'+b+'"');if(a.isError(e))return e;if(!c&&d.tag!==b&&d.tagStr!==b&&d.tagStr+"of"!==b)return a.error('Failed to match tag: "'+b+'"');if(d.primitive||null!==e)return a.skip(e,'Failed to match body of: "'+b+'"');var h=a.save(),i=this._skipUntilEnd(a,'Failed to skip indefinite length body: "'+this.tag+'"');return a.isError(i)?i:(e=a.offset-h.offset,a.restore(h),a.skip(e,'Failed to match body of: "'+b+'"'))},e.prototype._skipUntilEnd=function(a,b){for(;;){var c=f(a,b);if(a.isError(c))return c;var d=g(a,c.primitive,b);if(a.isError(d))return d;var e;if(e=c.primitive||null!==d?a.skip(d):this._skipUntilEnd(a,b),a.isError(e))return e;if("end"===c.tagStr)break}},e.prototype._decodeList=function(a,b,c,d){for(var e=[];!a.isEmpty();){var f=this._peekTag(a,"end");if(a.isError(f))return f;var g=c.decode(a,"der",d);if(a.isError(g)&&f)break;e.push(g)}return e},e.prototype._decodeStr=function(a,b){if("bitstr"===b){var c=a.readUInt8();return a.isError(c)?c:{unused:c,data:a.raw()}}if("bmpstr"===b){var d=a.raw();if(d.length%2===1)return a.error("Decoding of string type: bmpstr length mismatch");for(var e="",f=0;f<d.length/2;f++)e+=String.fromCharCode(d.readUInt16BE(2*f));return e}if("numstr"===b){var g=a.raw().toString("ascii");return this._isNumstr(g)?g:a.error("Decoding of string type: numstr unsupported characters")}if("octstr"===b)return a.raw();if("objDesc"===b)return a.raw();if("printstr"===b){var h=a.raw().toString("ascii");return this._isPrintstr(h)?h:a.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(b)?a.raw().toString():a.error("Decoding of string type: "+b+" unsupported")},e.prototype._decodeObjid=function(a,b,c){for(var d,e=[],f=0;!a.isEmpty();){var g=a.readUInt8();f<<=7,f|=127&g,0===(128&g)&&(e.push(f),f=0)}128&g&&e.push(f);var h=e[0]/40|0,i=e[0]%40;if(d=c?e:[h,i].concat(e.slice(1)),b){var j=b[d.join(" ")];void 0===j&&(j=b[d.join(".")]),void 0!==j&&(d=j)}return d},e.prototype._decodeTime=function(a,b){var c=a.raw().toString();if("gentime"===b)var d=0|c.slice(0,4),e=0|c.slice(4,6),f=0|c.slice(6,8),g=0|c.slice(8,10),h=0|c.slice(10,12),i=0|c.slice(12,14);else{if("utctime"!==b)return a.error("Decoding "+b+" time is not supported yet");var d=0|c.slice(0,2),e=0|c.slice(2,4),f=0|c.slice(4,6),g=0|c.slice(6,8),h=0|c.slice(8,10),i=0|c.slice(10,12);d=d<70?2e3+d:1900+d}return Date.UTC(d,e-1,f,g,h,i,0)},e.prototype._decodeNull=function(a){return null},e.prototype._decodeBool=function(a){var b=a.readUInt8();return a.isError(b)?b:0!==b},e.prototype._decodeInt=function(a,b){var c=a.raw(),d=new k(c);return b&&(d=b[d.toString(10)]||d),d},e.prototype._use=function(a,b){return"function"==typeof a&&(a=a(b)),a._getDecoder("der").tree}},{"../../asn1":73,inherits:207}],82:[function(a,b,c){var d=c;d.der=a("./der"),d.pem=a("./pem")},{"./der":81,"./pem":83}],83:[function(a,b,c){function d(a){g.call(this,a),this.enc="pem"}var e=a("inherits"),f=a("buffer").Buffer,g=a("./der");e(d,g),b.exports=d,d.prototype.decode=function(a,b){for(var c=a.toString().split(/[\r\n]+/g),d=b.label.toUpperCase(),e=/^-----(BEGIN|END) ([^-]+)-----$/,h=-1,i=-1,j=0;j<c.length;j++){var k=c[j].match(e);if(null!==k&&k[2]===d){if(h!==-1){if("END"!==k[1])break;i=j;break}if("BEGIN"!==k[1])break;h=j}}if(h===-1||i===-1)throw new Error("PEM section not found for: "+d);var l=c.slice(h+1,i).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var m=new f(l,"base64");return g.prototype.decode.call(this,m,b)}},{"./der":81,buffer:3,inherits:207}],84:[function(a,b,c){function d(a){this.enc="der",this.name=a.name,this.entity=a,this.tree=new e,this.tree._init(a.body)}function e(a){k.Node.call(this,"der",a)}function f(a){return a<10?"0"+a:a}function g(a,b,c,d){var e;if("seqof"===a?a="seq":"setof"===a&&(a="set"),l.tagByName.hasOwnProperty(a))e=l.tagByName[a];else{if("number"!=typeof a||(0|a)!==a)return d.error("Unknown tag: "+a);e=a}return e>=31?d.error("Multi-octet tag encoding unsupported"):(b||(e|=32),e|=l.tagClassByName[c||"universal"]<<6)}var h=a("inherits"),i=a("buffer").Buffer,j=a("../../asn1"),k=j.base,l=j.constants.der;b.exports=d,d.prototype.encode=function(a,b){return this.tree._encode(a,b).join()},h(e,k.Node),e.prototype._encodeComposite=function(a,b,c,d){var e=g(a,b,c,this.reporter);if(d.length<128){var f=new i(2);return f[0]=e,f[1]=d.length,this._createEncoderBuffer([f,d])}for(var h=1,j=d.length;j>=256;j>>=8)h++;var f=new i(2+h);f[0]=e,f[1]=128|h;for(var j=1+h,k=d.length;k>0;j--,k>>=8)f[j]=255&k;return this._createEncoderBuffer([f,d])},e.prototype._encodeStr=function(a,b){if("bitstr"===b)return this._createEncoderBuffer([0|a.unused,a.data]);if("bmpstr"===b){for(var c=new i(2*a.length),d=0;d<a.length;d++)c.writeUInt16BE(a.charCodeAt(d),2*d);return this._createEncoderBuffer(c)}return"numstr"===b?this._isNumstr(a)?this._createEncoderBuffer(a):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===b?this._isPrintstr(a)?this._createEncoderBuffer(a):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(b)?this._createEncoderBuffer(a):"objDesc"===b?this._createEncoderBuffer(a):this.reporter.error("Encoding of string type: "+b+" unsupported")},e.prototype._encodeObjid=function(a,b,c){if("string"==typeof a){if(!b)return this.reporter.error("string objid given, but no values map found");if(!b.hasOwnProperty(a))return this.reporter.error("objid not found in values map");a=b[a].split(/[\s\.]+/g);for(var d=0;d<a.length;d++)a[d]|=0}else if(Array.isArray(a)){a=a.slice();for(var d=0;d<a.length;d++)a[d]|=0}if(!Array.isArray(a))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(a));if(!c){if(a[1]>=40)return this.reporter.error("Second objid identifier OOB");a.splice(0,2,40*a[0]+a[1])}for(var e=0,d=0;d<a.length;d++){var f=a[d];for(e++;f>=128;f>>=7)e++}for(var g=new i(e),h=g.length-1,d=a.length-1;d>=0;d--){var f=a[d];for(g[h--]=127&f;(f>>=7)>0;)g[h--]=128|127&f}return this._createEncoderBuffer(g)},e.prototype._encodeTime=function(a,b){var c,d=new Date(a);return"gentime"===b?c=[f(d.getFullYear()),f(d.getUTCMonth()+1),f(d.getUTCDate()),f(d.getUTCHours()),f(d.getUTCMinutes()),f(d.getUTCSeconds()),"Z"].join(""):"utctime"===b?c=[f(d.getFullYear()%100),f(d.getUTCMonth()+1),f(d.getUTCDate()),f(d.getUTCHours()),f(d.getUTCMinutes()),f(d.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+b+" time is not supported yet"),this._encodeStr(c,"octstr")},e.prototype._encodeNull=function(){return this._createEncoderBuffer("")},e.prototype._encodeInt=function(a,b){if("string"==typeof a){if(!b)return this.reporter.error("String int or enum given, but no values map");if(!b.hasOwnProperty(a))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(a));a=b[a]}if("number"!=typeof a&&!i.isBuffer(a)){var c=a.toArray();!a.sign&&128&c[0]&&c.unshift(0),a=new i(c)}if(i.isBuffer(a)){var d=a.length;0===a.length&&d++;var e=new i(d);return a.copy(e),0===a.length&&(e[0]=0),this._createEncoderBuffer(e)}if(a<128)return this._createEncoderBuffer(a);if(a<256)return this._createEncoderBuffer([0,a]);for(var d=1,f=a;f>=256;f>>=8)d++;for(var e=new Array(d),f=e.length-1;f>=0;f--)e[f]=255&a,a>>=8;return 128&e[0]&&e.unshift(0),this._createEncoderBuffer(new i(e))},e.prototype._encodeBool=function(a){return this._createEncoderBuffer(a?255:0)},e.prototype._use=function(a,b){return"function"==typeof a&&(a=a(b)),a._getEncoder("der").tree},e.prototype._skipDefault=function(a,b,c){var d,e=this._baseState;if(null===e["default"])return!1;var f=a.join();if(void 0===e.defaultBuffer&&(e.defaultBuffer=this._encodeValue(e["default"],b,c).join()),f.length!==e.defaultBuffer.length)return!1;for(d=0;d<f.length;d++)if(f[d]!==e.defaultBuffer[d])return!1;return!0}},{"../../asn1":73,buffer:3,inherits:207}],85:[function(a,b,c){var d=c;d.der=a("./der"),d.pem=a("./pem")},{"./der":84,"./pem":86}],86:[function(a,b,c){function d(a){f.call(this,a),this.enc="pem"}var e=a("inherits"),f=a("./der");e(d,f),b.exports=d,d.prototype.encode=function(a,b){for(var c=f.prototype.encode.call(this,a),d=c.toString("base64"),e=["-----BEGIN "+b.label+"-----"],g=0;g<d.length;g+=64)e.push(d.slice(g,g+64));return e.push("-----END "+b.label+"-----"),e.join("\n")}},{"./der":84,inherits:207}],87:[function(a,b,c){arguments[4][35][0].apply(c,arguments)},{dup:35}],88:[function(a,b,c){(function(a){function b(a){var b,c;return b=a>h||a<0?(c=Math.abs(a)%h,a<0?h-c:c):a}function d(a){for(var b=0;b<a.length;a++)a[b]=0;return!1}function e(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function f(a){for(var b=a.length/4,c=new Array(b),d=-1;++d<b;)c[d]=a.readUInt32BE(4*d);return c}function g(a){this._key=f(a),this._doReset()}var h=Math.pow(2,32);e.prototype.init=function(){var a,b,c,d,e,f,g,h,i,j;for(a=function(){var a,c;for(c=[],b=a=0;a<256;b=++a)b<128?c.push(b<<1):c.push(b<<1^283);return c}(),e=0,i=0,b=j=0;j<256;b=++j)c=i^i<<1^i<<2^i<<3^i<<4,c=c>>>8^255&c^99,this.SBOX[e]=c,this.INV_SBOX[c]=e,f=a[e],g=a[f],h=a[g],d=257*a[c]^16843008*c,this.SUB_MIX[0][e]=d<<24|d>>>8,this.SUB_MIX[1][e]=d<<16|d>>>16,this.SUB_MIX[2][e]=d<<8|d>>>24,this.SUB_MIX[3][e]=d,d=16843009*h^65537*g^257*f^16843008*e,this.INV_SUB_MIX[0][c]=d<<24|d>>>8,this.INV_SUB_MIX[1][c]=d<<16|d>>>16,this.INV_SUB_MIX[2][c]=d<<8|d>>>24,this.INV_SUB_MIX[3][c]=d,0===e?e=i=1:(e=f^a[a[a[h^f]]],i^=a[a[i]]);return!0};var i=new e;g.blockSize=16,g.prototype.blockSize=g.blockSize,g.keySize=32,g.prototype.keySize=g.keySize,g.prototype._doReset=function(){var a,b,c,d,e,f;for(c=this._key,b=c.length,this._nRounds=b+6,e=4*(this._nRounds+1),this._keySchedule=[],d=0;d<e;d++)this._keySchedule[d]=d<b?c[d]:(f=this._keySchedule[d-1],d%b===0?(f=f<<8|f>>>24,f=i.SBOX[f>>>24]<<24|i.SBOX[f>>>16&255]<<16|i.SBOX[f>>>8&255]<<8|i.SBOX[255&f],f^=i.RCON[d/b|0]<<24):b>6&&d%b===4?f=i.SBOX[f>>>24]<<24|i.SBOX[f>>>16&255]<<16|i.SBOX[f>>>8&255]<<8|i.SBOX[255&f]:void 0,this._keySchedule[d-b]^f);for(this._invKeySchedule=[],a=0;a<e;a++)d=e-a,f=this._keySchedule[d-(a%4?0:4)],this._invKeySchedule[a]=a<4||d<=4?f:i.INV_SUB_MIX[0][i.SBOX[f>>>24]]^i.INV_SUB_MIX[1][i.SBOX[f>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[f>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&f]];return!0},g.prototype.encryptBlock=function(b){b=f(new a(b));var c=this._doCryptBlock(b,this._keySchedule,i.SUB_MIX,i.SBOX),d=new a(16);return d.writeUInt32BE(c[0],0),d.writeUInt32BE(c[1],4),d.writeUInt32BE(c[2],8),d.writeUInt32BE(c[3],12),d},g.prototype.decryptBlock=function(b){b=f(new a(b));var c=[b[3],b[1]];b[1]=c[0],b[3]=c[1];var d=this._doCryptBlock(b,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX),e=new a(16);return e.writeUInt32BE(d[0],0),e.writeUInt32BE(d[3],4),e.writeUInt32BE(d[2],8),e.writeUInt32BE(d[1],12),e},g.prototype.scrub=function(){d(this._keySchedule),d(this._invKeySchedule),d(this._key)},g.prototype._doCryptBlock=function(a,c,d,e){var f,g,h,i,j,k,l,m,n;g=a[0]^c[0],h=a[1]^c[1],i=a[2]^c[2],j=a[3]^c[3],f=4;for(var o=1;o<this._nRounds;o++)k=d[0][g>>>24]^d[1][h>>>16&255]^d[2][i>>>8&255]^d[3][255&j]^c[f++],l=d[0][h>>>24]^d[1][i>>>16&255]^d[2][j>>>8&255]^d[3][255&g]^c[f++],m=d[0][i>>>24]^d[1][j>>>16&255]^d[2][g>>>8&255]^d[3][255&h]^c[f++],n=d[0][j>>>24]^d[1][g>>>16&255]^d[2][h>>>8&255]^d[3][255&i]^c[f++],g=k,h=l,i=m,j=n;return k=(e[g>>>24]<<24|e[h>>>16&255]<<16|e[i>>>8&255]<<8|e[255&j])^c[f++],l=(e[h>>>24]<<24|e[i>>>16&255]<<16|e[j>>>8&255]<<8|e[255&g])^c[f++],m=(e[i>>>24]<<24|e[j>>>16&255]<<16|e[g>>>8&255]<<8|e[255&h])^c[f++],n=(e[j>>>24]<<24|e[g>>>16&255]<<16|e[h>>>8&255]<<8|e[255&i])^c[f++],[b(k),b(l),b(m),b(n)]},c.AES=g}).call(this,a("buffer").Buffer)},{buffer:3}],89:[function(a,b,c){(function(c){function d(a,b,e,h){if(!(this instanceof d))return new d(a,b,e);g.call(this),this._finID=c.concat([e,new c([0,0,0,1])]),e=c.concat([e,new c([0,0,0,2])]),this._cipher=new f.AES(b),this._prev=new c(e.length),this._cache=new c(""),this._secCache=new c(""),this._decrypt=h,this._alen=0,this._len=0,e.copy(this._prev),this._mode=a;var j=new c(4);j.fill(0),this._ghash=new i(this._cipher.encryptBlock(j)),this._authTag=null,this._called=!1}function e(a,b){var c=0;a.length!==b.length&&c++;for(var d=Math.min(a.length,b.length),e=-1;++e<d;)c+=a[e]^b[e];return c}var f=a("./aes"),g=a("cipher-base"),h=a("inherits"),i=a("./ghash"),j=a("buffer-xor");h(d,g),b.exports=d,d.prototype._update=function(a){if(!this._called&&this._alen){var b=16-this._alen%16;b<16&&(b=new c(b),b.fill(0),this._ghash.update(b))}this._called=!0;var d=this._mode.encrypt(this,a);return this._decrypt?this._ghash.update(a):this._ghash.update(d),this._len+=a.length,d},d.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var a=j(this._ghash["final"](8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(e(a,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=a;this._cipher.scrub()},d.prototype.getAuthTag=function(){if(!this._decrypt&&c.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},d.prototype.setAuthTag=function(a){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=a},d.prototype.setAAD=function(a){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(a),this._alen+=a.length}}).call(this,a("buffer").Buffer)},{"./aes":88,"./ghash":93,buffer:3,"buffer-xor":102,"cipher-base":103,inherits:207}],90:[function(a,b,c){arguments[4][11][0].apply(c,arguments)},{"./decrypter":91,"./encrypter":92,"./modes":94,dup:11}],91:[function(a,b,c){(function(b){function d(a,c,f){return this instanceof d?(j.call(this),this._cache=new e,this._last=void 0,this._cipher=new i.AES(c),this._prev=new b(f.length),f.copy(this._prev),this._mode=a,void(this._autopadding=!0)):new d(a,c,f)}function e(){return this instanceof e?void(this.cache=new b("")):new e}function f(a){for(var b=a[15],c=-1;++c<b;)if(a[c+(16-b)]!==b)throw new Error("unable to decrypt data");if(16!==b)return a.slice(0,16-b)}function g(a,c,e){var f=l[a.toLowerCase()];if(!f)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=new b(e)),"string"==typeof c&&(c=new b(c)),c.length!==f.key/8)throw new TypeError("invalid key length "+c.length);if(e.length!==f.iv)throw new TypeError("invalid iv length "+e.length);return"stream"===f.type?new m(p[f.mode],c,e,(!0)):"auth"===f.type?new n(p[f.mode],c,e,(!0)):new d(p[f.mode],c,e)}function h(a,b){var c=l[a.toLowerCase()];if(!c)throw new TypeError("invalid suite type");var d=o(b,!1,c.key,c.iv);return g(a,d.key,d.iv)}var i=a("./aes"),j=a("cipher-base"),k=a("inherits"),l=a("./modes"),m=a("./streamCipher"),n=a("./authCipher"),o=a("evp_bytestokey");k(d,j),d.prototype._update=function(a){this._cache.add(a);for(var c,d,e=[];c=this._cache.get(this._autopadding);)d=this._mode.decrypt(this,c),e.push(d);return b.concat(e)},d.prototype._final=function(){var a=this._cache.flush();if(this._autopadding)return f(this._mode.decrypt(this,a));if(a)throw new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(a){return this._autopadding=!!a,this},e.prototype.add=function(a){this.cache=b.concat([this.cache,a])},e.prototype.get=function(a){var b;if(a){if(this.cache.length>16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b}else if(this.cache.length>=16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b;return null},e.prototype.flush=function(){if(this.cache.length)return this.cache};var p={ECB:a("./modes/ecb"),CBC:a("./modes/cbc"),CFB:a("./modes/cfb"),CFB8:a("./modes/cfb8"),CFB1:a("./modes/cfb1"),OFB:a("./modes/ofb"),CTR:a("./modes/ctr"),GCM:a("./modes/ctr")};c.createDecipher=h,c.createDecipheriv=g}).call(this,a("buffer").Buffer)},{"./aes":88,"./authCipher":89,"./modes":94,"./modes/cbc":95,"./modes/cfb":96,"./modes/cfb1":97,"./modes/cfb8":98,"./modes/ctr":99,"./modes/ecb":100,"./modes/ofb":101,"./streamCipher":104,buffer:3,"cipher-base":103,evp_bytestokey:105,inherits:207}],92:[function(a,b,c){(function(b){function d(a,c,f){return this instanceof d?(i.call(this),this._cache=new e,this._cipher=new h.AES(c),this._prev=new b(f.length),f.copy(this._prev),this._mode=a,void(this._autopadding=!0)):new d(a,c,f)}function e(){return this instanceof e?void(this.cache=new b("")):new e}function f(a,c,e){var f=k[a.toLowerCase()];if(!f)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=new b(e)),"string"==typeof c&&(c=new b(c)),c.length!==f.key/8)throw new TypeError("invalid key length "+c.length);if(e.length!==f.iv)throw new TypeError("invalid iv length "+e.length);return"stream"===f.type?new m(o[f.mode],c,e):"auth"===f.type?new n(o[f.mode],c,e):new d(o[f.mode],c,e)}function g(a,b){var c=k[a.toLowerCase()];if(!c)throw new TypeError("invalid suite type");var d=l(b,!1,c.key,c.iv);return f(a,d.key,d.iv)}var h=a("./aes"),i=a("cipher-base"),j=a("inherits"),k=a("./modes"),l=a("evp_bytestokey"),m=a("./streamCipher"),n=a("./authCipher");j(d,i),d.prototype._update=function(a){this._cache.add(a);for(var c,d,e=[];c=this._cache.get();)d=this._mode.encrypt(this,c),e.push(d);return b.concat(e)},d.prototype._final=function(){var a=this._cache.flush();if(this._autopadding)return a=this._mode.encrypt(this,a),this._cipher.scrub(),a;if("10101010101010101010101010101010"!==a.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(a){return this._autopadding=!!a,this},e.prototype.add=function(a){this.cache=b.concat([this.cache,a])},e.prototype.get=function(){if(this.cache.length>15){var a=this.cache.slice(0,16);return this.cache=this.cache.slice(16),a}return null},e.prototype.flush=function(){for(var a=16-this.cache.length,c=new b(a),d=-1;++d<a;)c.writeUInt8(a,d);var e=b.concat([this.cache,c]);return e};var o={ECB:a("./modes/ecb"),CBC:a("./modes/cbc"),
CFB:a("./modes/cfb"),CFB8:a("./modes/cfb8"),CFB1:a("./modes/cfb1"),OFB:a("./modes/ofb"),CTR:a("./modes/ctr"),GCM:a("./modes/ctr")};c.createCipheriv=f,c.createCipher=g}).call(this,a("buffer").Buffer)},{"./aes":88,"./authCipher":89,"./modes":94,"./modes/cbc":95,"./modes/cfb":96,"./modes/cfb1":97,"./modes/cfb8":98,"./modes/ctr":99,"./modes/ecb":100,"./modes/ofb":101,"./streamCipher":104,buffer:3,"cipher-base":103,evp_bytestokey:105,inherits:207}],93:[function(a,b,c){(function(a){function c(b){this.h=b,this.state=new a(16),this.state.fill(0),this.cache=new a("")}function d(a){return[a.readUInt32BE(0),a.readUInt32BE(4),a.readUInt32BE(8),a.readUInt32BE(12)]}function e(b){b=b.map(f);var c=new a(16);return c.writeUInt32BE(b[0],0),c.writeUInt32BE(b[1],4),c.writeUInt32BE(b[2],8),c.writeUInt32BE(b[3],12),c}function f(a){var b,c;return b=a>i||a<0?(c=Math.abs(a)%i,a<0?i-c:c):a}function g(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}var h=new a(16);h.fill(0),b.exports=c,c.prototype.ghash=function(a){for(var b=-1;++b<a.length;)this.state[b]^=a[b];this._multiply()},c.prototype._multiply=function(){for(var a,b,c,f=d(this.h),h=[0,0,0,0],i=-1;++i<128;){for(b=0!==(this.state[~~(i/8)]&1<<7-i%8),b&&(h=g(h,f)),c=0!==(1&f[3]),a=3;a>0;a--)f[a]=f[a]>>>1|(1&f[a-1])<<31;f[0]=f[0]>>>1,c&&(f[0]=f[0]^225<<24)}this.state=e(h)},c.prototype.update=function(b){this.cache=a.concat([this.cache,b]);for(var c;this.cache.length>=16;)c=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(c)},c.prototype["final"]=function(b,c){return this.cache.length&&this.ghash(a.concat([this.cache,h],16)),this.ghash(e([0,b,0,c])),this.state};var i=Math.pow(2,32)}).call(this,a("buffer").Buffer)},{buffer:3}],94:[function(a,b,c){arguments[4][15][0].apply(c,arguments)},{dup:15}],95:[function(a,b,c){arguments[4][16][0].apply(c,arguments)},{"buffer-xor":102,dup:16}],96:[function(a,b,c){(function(b){function d(a,c,d){var f=c.length,g=e(c,a._cache);return a._cache=a._cache.slice(f),a._prev=b.concat([a._prev,d?c:g]),g}var e=a("buffer-xor");c.encrypt=function(a,c,e){for(var f,g=new b("");c.length;){if(0===a._cache.length&&(a._cache=a._cipher.encryptBlock(a._prev),a._prev=new b("")),!(a._cache.length<=c.length)){g=b.concat([g,d(a,c,e)]);break}f=a._cache.length,g=b.concat([g,d(a,c.slice(0,f),e)]),c=c.slice(f)}return g}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":102}],97:[function(a,b,c){(function(a){function b(a,b,c){for(var e,f,g,h=-1,i=8,j=0;++h<i;)e=a._cipher.encryptBlock(a._prev),f=b&1<<7-h?128:0,g=e[0]^f,j+=(128&g)>>h%8,a._prev=d(a._prev,c?f:g);return j}function d(b,c){var d=b.length,e=-1,f=new a(b.length);for(b=a.concat([b,new a([c])]);++e<d;)f[e]=b[e]<<1|b[e+1]>>7;return f}c.encrypt=function(c,d,e){for(var f=d.length,g=new a(f),h=-1;++h<f;)g[h]=b(c,d[h],e);return g}}).call(this,a("buffer").Buffer)},{buffer:3}],98:[function(a,b,c){(function(a){function b(b,c,d){var e=b._cipher.encryptBlock(b._prev),f=e[0]^c;return b._prev=a.concat([b._prev.slice(1),new a([d?c:f])]),f}c.encrypt=function(c,d,e){for(var f=d.length,g=new a(f),h=-1;++h<f;)g[h]=b(c,d[h],e);return g}}).call(this,a("buffer").Buffer)},{buffer:3}],99:[function(a,b,c){(function(b){function d(a){for(var b,c=a.length;c--;){if(b=a.readUInt8(c),255!==b){b++,a.writeUInt8(b,c);break}a.writeUInt8(0,c)}}function e(a){var b=a._cipher.encryptBlock(a._prev);return d(a._prev),b}var f=a("buffer-xor");c.encrypt=function(a,c){for(;a._cache.length<c.length;)a._cache=b.concat([a._cache,e(a)]);var d=a._cache.slice(0,c.length);return a._cache=a._cache.slice(c.length),f(c,d)}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":102}],100:[function(a,b,c){arguments[4][21][0].apply(c,arguments)},{dup:21}],101:[function(a,b,c){(function(b){function d(a){return a._prev=a._cipher.encryptBlock(a._prev),a._prev}var e=a("buffer-xor");c.encrypt=function(a,c){for(;a._cache.length<c.length;)a._cache=b.concat([a._cache,d(a)]);var f=a._cache.slice(0,c.length);return a._cache=a._cache.slice(c.length),e(c,f)}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":102}],102:[function(a,b,c){(function(a){b.exports=function(b,c){for(var d=Math.min(b.length,c.length),e=new a(d),f=0;f<d;++f)e[f]=b[f]^c[f];return e}}).call(this,a("buffer").Buffer)},{buffer:3}],103:[function(a,b,c){(function(c){function d(a){e.call(this),this.hashMode="string"==typeof a,this.hashMode?this[a]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var e=a("stream").Transform,f=a("inherits"),g=a("string_decoder").StringDecoder;b.exports=d,f(d,e),d.prototype.update=function(a,b,d){"string"==typeof a&&(a=new c(a,b));var e=this._update(a);return this.hashMode?this:(d&&(e=this._toString(e,d)),e)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(a,b,c){var d;try{this.hashMode?this._update(a):this.push(this._update(a))}catch(e){d=e}finally{c(d)}},d.prototype._flush=function(a){var b;try{this.push(this._final())}catch(c){b=c}finally{a(b)}},d.prototype._finalOrDigest=function(a){var b=this._final()||new c("");return a&&(b=this._toString(b,a,!0)),b},d.prototype._toString=function(a,b,c){if(this._decoder||(this._decoder=new g(b),this._encoding=b),this._encoding!==b)throw new Error("can't switch encodings");var d=this._decoder.write(a);return c&&(d+=this._decoder.end()),d}}).call(this,a("buffer").Buffer)},{buffer:3,inherits:207,stream:226,string_decoder:227}],104:[function(a,b,c){(function(c){function d(a,b,g,h){return this instanceof d?(f.call(this),this._cipher=new e.AES(b),this._prev=new c(g.length),this._cache=new c(""),this._secCache=new c(""),this._decrypt=h,g.copy(this._prev),void(this._mode=a)):new d(a,b,g)}var e=a("./aes"),f=a("cipher-base"),g=a("inherits");g(d,f),b.exports=d,d.prototype._update=function(a){return this._mode.encrypt(this,a,this._decrypt)},d.prototype._final=function(){this._cipher.scrub()}}).call(this,a("buffer").Buffer)},{"./aes":88,buffer:3,"cipher-base":103,inherits:207}],105:[function(a,b,c){(function(c){function d(a,b,d,f){c.isBuffer(a)||(a=new c(a,"binary")),b&&!c.isBuffer(b)&&(b=new c(b,"binary")),d/=8,f=f||0;for(var g,h,i=0,j=0,k=new c(d),l=new c(f),m=0,n=[];;){if(m++>0&&n.push(g),n.push(a),b&&n.push(b),g=e(c.concat(n)),n=[],h=0,d>0)for(;;){if(0===d)break;if(h===g.length)break;k[i++]=g[h],d--,h++}if(f>0&&h!==g.length)for(;;){if(0===f)break;if(h===g.length)break;l[j++]=g[h],f--,h++}if(0===d&&0===f)break}for(h=0;h<g.length;h++)g[h]=0;return{key:k,iv:l}}var e=a("create-hash/md5");b.exports=d}).call(this,a("buffer").Buffer)},{buffer:3,"create-hash/md5":138}],106:[function(a,b,c){(function(c){function d(a,b,c,d){var g=q(b);if(g.curve){if("ecdsa"!==d)throw new Error("wrong private key type");return e(a,g)}if("dsa"===g.type){if("dsa"!==d)throw new Error("wrong private key type");return f(a,g,c)}if("rsa"!==d)throw new Error("wrong private key type");for(var h=g.modulus.byteLength(),i=[0,1];a.length+i.length+1<h;)i.push(255);i.push(0);for(var j=-1;++j<a.length;)i.push(a[j]);var k=n(i,g);return k}function e(a,b){var d=o[b.curve.join(".")];if(!d)throw new Error("unknown curve "+b.curve.join("."));var e=new s(d),f=e.genKeyPair();f._importPrivate(b.privateKey);var g=f.sign(a);return new c(g.toDER())}function f(a,b,c){for(var d,e=b.params.priv_key,f=b.params.p,j=b.params.q,m=b.params.g,n=new r(0),o=i(a,j).mod(j),p=!1,q=h(e,j,a,c);p===!1;)d=k(j,q,c),n=l(m,d,f,j),p=d.invm(j).imul(o.add(e.mul(n))).mod(j),p.cmpn(0)||(p=!1,n=new r(0));return g(n,p)}function g(a,b){a=a.toArray(),b=b.toArray(),128&a[0]&&(a=[0].concat(a)),128&b[0]&&(b=[0].concat(b));var d=a.length+b.length+4,e=[48,d,2,a.length];return e=e.concat(a,[2,b.length],b),new c(e)}function h(a,b,d,e){if(a=new c(a.toArray()),a.length<b.byteLength()){var f=new c(b.byteLength()-a.length);f.fill(0),a=c.concat([f,a])}var g=d.length,h=j(d,b),i=new c(g);i.fill(1);var k=new c(g);return k.fill(0),k=m(e,k).update(i).update(new c([0])).update(a).update(h).digest(),i=m(e,k).update(i).digest(),k=m(e,k).update(i).update(new c([1])).update(a).update(h).digest(),i=m(e,k).update(i).digest(),{k:k,v:i}}function i(a,b){var c=new r(a),d=(a.length<<3)-b.bitLength();return d>0&&c.ishrn(d),c}function j(a,b){a=i(a,b),a=a.mod(b);var d=new c(a.toArray());if(d.length<b.byteLength()){var e=new c(b.byteLength()-d.length);e.fill(0),d=c.concat([e,d])}return d}function k(a,b,d){var e,f;do{for(e=new c("");8*e.length<a.bitLength();)b.v=m(d,b.k).update(b.v).digest(),e=c.concat([e,b.v]);f=i(e,a),b.k=m(d,b.k).update(b.v).update(new c([0])).digest(),b.v=m(d,b.k).update(b.v).digest()}while(f.cmp(a)!==-1);return f}function l(a,b,c,d){return a.toRed(r.mont(c)).redPow(b).fromRed().mod(d)}var m=a("create-hmac"),n=a("browserify-rsa"),o=a("./curves"),p=a("elliptic"),q=a("parse-asn1"),r=a("bn.js"),s=p.ec;b.exports=d,b.exports.getKey=h,b.exports.makeKey=k}).call(this,a("buffer").Buffer)},{"./curves":39,"bn.js":40,"browserify-rsa":41,buffer:3,"create-hmac":149,elliptic:42,"parse-asn1":72}],107:[function(a,b,c){(function(c){function d(a,b,d,g){var h=j(d);if("ec"===h.type){if("ecdsa"!==g)throw new Error("wrong public key type");return e(a,b,h)}if("dsa"===h.type){if("dsa"!==g)throw new Error("wrong public key type");return f(a,b,h)}if("rsa"!==g)throw new Error("wrong public key type");for(var i=h.modulus.byteLength(),l=[1],m=0;b.length+l.length+2<i;)l.push(255),m++;l.push(0);for(var n=-1;++n<b.length;)l.push(b[n]);l=new c(l);var o=k.mont(h.modulus);a=new k(a).toRed(o),a=a.redPow(new k(h.publicExponent)),a=new c(a.fromRed().toArray());var p=0;for(m<8&&(p=1),i=Math.min(a.length,l.length),a.length!==l.length&&(p=1),n=-1;++n<i;)p|=a[n]^l[n];return 0===p}function e(a,b,c){var d=h[c.data.algorithm.curve.join(".")];if(!d)throw new Error("unknown curve "+c.data.algorithm.curve.join("."));var e=new l(d),f=c.data.subjectPrivateKey.data;return e.verify(b,a,f)}function f(a,b,c){var d=c.data.p,e=c.data.q,f=c.data.g,h=c.data.pub_key,i=j.signature.decode(a,"der"),l=i.s,m=i.r;g(l,e),g(m,e);var n=k.mont(d),o=l.invm(e),p=f.toRed(n).redPow(new k(b).mul(o).mod(e)).fromRed().mul(h.toRed(n).redPow(m.mul(o).mod(e)).fromRed()).mod(d).mod(e);return!p.cmp(m)}function g(a,b){if(a.cmpn(0)<=0)throw new Error("invalid sig");if(a.cmp(b)>=b)throw new Error("invalid sig")}var h=a("./curves"),i=a("elliptic"),j=a("parse-asn1"),k=a("bn.js"),l=i.ec;b.exports=d}).call(this,a("buffer").Buffer)},{"./curves":39,"bn.js":40,buffer:3,elliptic:42,"parse-asn1":72}],108:[function(a,b,c){(function(c){function d(a){this.curveType=h[a],this.curveType||(this.curveType={name:a}),this.curve=new f.ec(this.curveType.name),this.keys=void 0}function e(a,b,d){Array.isArray(a)||(a=a.toArray());var e=new c(a);if(d&&e.length<d){var f=new c(d-e.length);f.fill(0),e=c.concat([f,e])}return b?e.toString(b):e}var f=a("elliptic"),g=a("bn.js");b.exports=function(a){return new d(a)};var h={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};h.p224=h.secp224r1,h.p256=h.secp256r1=h.prime256v1,h.p192=h.secp192r1=h.prime192v1,h.p384=h.secp384r1,h.p521=h.secp521r1,d.prototype.generateKeys=function(a,b){return this.keys=this.curve.genKeyPair(),this.getPublicKey(a,b)},d.prototype.computeSecret=function(a,b,d){b=b||"utf8",c.isBuffer(a)||(a=new c(a,b));var f=this.curve.keyFromPublic(a).getPublic(),g=f.mul(this.keys.getPrivate()).getX();return e(g,d,this.curveType.byteLength)},d.prototype.getPublicKey=function(a,b){var c=this.keys.getPublic("compressed"===b,!0);return"hybrid"===b&&(c[c.length-1]%2?c[0]=7:c[0]=6),e(c,a)},d.prototype.getPrivateKey=function(a){return e(this.keys.getPrivate(),a)},d.prototype.setPublicKey=function(a,b){return b=b||"utf8",c.isBuffer(a)||(a=new c(a,b)),this.keys._importPublic(a),this},d.prototype.setPrivateKey=function(a,b){b=b||"utf8",c.isBuffer(a)||(a=new c(a,b));var d=new g(a);return d=d.toString(16),this.keys._importPrivate(d),this}}).call(this,a("buffer").Buffer)},{"bn.js":109,buffer:3,elliptic:110}],109:[function(a,b,c){arguments[4][40][0].apply(c,arguments)},{dup:40}],110:[function(a,b,c){arguments[4][42][0].apply(c,arguments)},{"../package.json":135,"./elliptic/curve":113,"./elliptic/curves":116,"./elliptic/ec":117,"./elliptic/eddsa":120,"./elliptic/utils":124,brorand:125,dup:42}],111:[function(a,b,c){arguments[4][43][0].apply(c,arguments)},{"../../elliptic":110,"bn.js":109,dup:43}],112:[function(a,b,c){arguments[4][44][0].apply(c,arguments)},{"../../elliptic":110,"../curve":113,"bn.js":109,dup:44,inherits:207}],113:[function(a,b,c){arguments[4][45][0].apply(c,arguments)},{"./base":111,"./edwards":112,"./mont":114,"./short":115,dup:45}],114:[function(a,b,c){arguments[4][46][0].apply(c,arguments)},{"../../elliptic":110,"../curve":113,"bn.js":109,dup:46,inherits:207}],115:[function(a,b,c){arguments[4][47][0].apply(c,arguments)},{"../../elliptic":110,"../curve":113,"bn.js":109,dup:47,inherits:207}],116:[function(a,b,c){arguments[4][48][0].apply(c,arguments)},{"../elliptic":110,"./precomputed/secp256k1":123,dup:48,"hash.js":126}],117:[function(a,b,c){arguments[4][49][0].apply(c,arguments)},{"../../elliptic":110,"./key":118,"./signature":119,"bn.js":109,dup:49,"hmac-drbg":132}],118:[function(a,b,c){arguments[4][50][0].apply(c,arguments)},{"../../elliptic":110,"bn.js":109,dup:50}],119:[function(a,b,c){arguments[4][51][0].apply(c,arguments)},{"../../elliptic":110,"bn.js":109,dup:51}],120:[function(a,b,c){arguments[4][52][0].apply(c,arguments)},{"../../elliptic":110,"./key":121,"./signature":122,dup:52,"hash.js":126}],121:[function(a,b,c){arguments[4][53][0].apply(c,arguments)},{"../../elliptic":110,dup:53}],122:[function(a,b,c){arguments[4][54][0].apply(c,arguments)},{"../../elliptic":110,"bn.js":109,dup:54}],123:[function(a,b,c){arguments[4][55][0].apply(c,arguments)},{dup:55}],124:[function(a,b,c){arguments[4][56][0].apply(c,arguments)},{"bn.js":109,dup:56,"minimalistic-assert":133,"minimalistic-crypto-utils":134}],125:[function(a,b,c){arguments[4][57][0].apply(c,arguments)},{crypto:2,dup:57}],126:[function(a,b,c){arguments[4][58][0].apply(c,arguments)},{"./hash/common":127,"./hash/hmac":128,"./hash/ripemd":129,"./hash/sha":130,"./hash/utils":131,dup:58}],127:[function(a,b,c){arguments[4][59][0].apply(c,arguments)},{"../hash":126,dup:59}],128:[function(a,b,c){arguments[4][60][0].apply(c,arguments)},{"../hash":126,dup:60}],129:[function(a,b,c){arguments[4][61][0].apply(c,arguments)},{"../hash":126,dup:61}],130:[function(a,b,c){arguments[4][62][0].apply(c,arguments)},{"../hash":126,dup:62}],131:[function(a,b,c){arguments[4][63][0].apply(c,arguments)},{dup:63,inherits:207}],132:[function(a,b,c){arguments[4][64][0].apply(c,arguments)},{dup:64,"hash.js":126,"minimalistic-assert":133,"minimalistic-crypto-utils":134}],133:[function(a,b,c){arguments[4][35][0].apply(c,arguments)},{dup:35}],134:[function(a,b,c){arguments[4][66][0].apply(c,arguments)},{dup:66}],135:[function(a,b,c){b.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},keywords:["EC","Elliptic","curve","Cryptography"],author:{name:"Fedor Indutny",email:"fedor@indutny.com"},license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",_id:"elliptic@6.4.0",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_from:"elliptic@>=6.0.0 <7.0.0",_npmVersion:"3.10.8",_nodeVersion:"7.0.0",_npmUser:{name:"indutny",email:"fedor@indutny.com"},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},maintainers:[{name:"indutny",email:"fedor@indutny.com"}],_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},directories:{},_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"}},{}],136:[function(a,b,c){(function(c){"use strict";function d(a){j.call(this,"digest"),this._hash=a,this.buffers=[]}function e(a){j.call(this,"digest"),this._hash=a}var f=a("inherits"),g=a("./md5"),h=a("ripemd160"),i=a("sha.js"),j=a("cipher-base");f(d,j),d.prototype._update=function(a){this.buffers.push(a)},d.prototype._final=function(){var a=c.concat(this.buffers),b=this._hash(a);return this.buffers=null,b},f(e,j),e.prototype._update=function(a){this._hash.update(a)},e.prototype._final=function(){return this._hash.digest()},b.exports=function(a){return a=a.toLowerCase(),"md5"===a?new d(g):"rmd160"===a||"ripemd160"===a?new d(h):new e(i(a))}}).call(this,a("buffer").Buffer)},{"./md5":138,buffer:3,"cipher-base":139,inherits:207,ripemd160:140,"sha.js":142}],137:[function(a,b,c){(function(a){"use strict";function b(b,c){if(b.length%f!==0){var d=b.length+(f-b.length%f);b=a.concat([b,g],d)}for(var e=[],h=c?b.readInt32BE:b.readInt32LE,i=0;i<b.length;i+=f)e.push(h.call(b,i));return e}function d(b,c,d){for(var e=new a(c),f=d?e.writeInt32BE:e.writeInt32LE,g=0;g<b.length;g++)f.call(e,b[g],4*g,!0);return e}function e(c,e,f,g){a.isBuffer(c)||(c=new a(c));var i=e(b(c,g),c.length*h);return d(i,f,g)}var f=4,g=new a(f);g.fill(0);var h=8;c.hash=e}).call(this,a("buffer").Buffer)},{buffer:3}],138:[function(a,b,c){"use strict";function d(a,b){a[b>>5]|=128<<b%32,a[(b+64>>>9<<4)+14]=b;for(var c=1732584193,d=-271733879,e=-1732584194,k=271733878,l=0;l<a.length;l+=16){var m=c,n=d,o=e,p=k;c=f(c,d,e,k,a[l+0],7,-680876936),k=f(k,c,d,e,a[l+1],12,-389564586),e=f(e,k,c,d,a[l+2],17,606105819),d=f(d,e,k,c,a[l+3],22,-1044525330),c=f(c,d,e,k,a[l+4],7,-176418897),k=f(k,c,d,e,a[l+5],12,1200080426),e=f(e,k,c,d,a[l+6],17,-1473231341),d=f(d,e,k,c,a[l+7],22,-45705983),c=f(c,d,e,k,a[l+8],7,1770035416),k=f(k,c,d,e,a[l+9],12,-1958414417),e=f(e,k,c,d,a[l+10],17,-42063),d=f(d,e,k,c,a[l+11],22,-1990404162),c=f(c,d,e,k,a[l+12],7,1804603682),k=f(k,c,d,e,a[l+13],12,-40341101),e=f(e,k,c,d,a[l+14],17,-1502002290),d=f(d,e,k,c,a[l+15],22,1236535329),c=g(c,d,e,k,a[l+1],5,-165796510),k=g(k,c,d,e,a[l+6],9,-1069501632),e=g(e,k,c,d,a[l+11],14,643717713),d=g(d,e,k,c,a[l+0],20,-373897302),c=g(c,d,e,k,a[l+5],5,-701558691),k=g(k,c,d,e,a[l+10],9,38016083),e=g(e,k,c,d,a[l+15],14,-660478335),d=g(d,e,k,c,a[l+4],20,-405537848),c=g(c,d,e,k,a[l+9],5,568446438),k=g(k,c,d,e,a[l+14],9,-1019803690),e=g(e,k,c,d,a[l+3],14,-187363961),d=g(d,e,k,c,a[l+8],20,1163531501),c=g(c,d,e,k,a[l+13],5,-1444681467),k=g(k,c,d,e,a[l+2],9,-51403784),e=g(e,k,c,d,a[l+7],14,1735328473),d=g(d,e,k,c,a[l+12],20,-1926607734),c=h(c,d,e,k,a[l+5],4,-378558),k=h(k,c,d,e,a[l+8],11,-2022574463),e=h(e,k,c,d,a[l+11],16,1839030562),d=h(d,e,k,c,a[l+14],23,-35309556),c=h(c,d,e,k,a[l+1],4,-1530992060),k=h(k,c,d,e,a[l+4],11,1272893353),e=h(e,k,c,d,a[l+7],16,-155497632),d=h(d,e,k,c,a[l+10],23,-1094730640),c=h(c,d,e,k,a[l+13],4,681279174),k=h(k,c,d,e,a[l+0],11,-358537222),e=h(e,k,c,d,a[l+3],16,-722521979),d=h(d,e,k,c,a[l+6],23,76029189),c=h(c,d,e,k,a[l+9],4,-640364487),k=h(k,c,d,e,a[l+12],11,-421815835),e=h(e,k,c,d,a[l+15],16,530742520),d=h(d,e,k,c,a[l+2],23,-995338651),c=i(c,d,e,k,a[l+0],6,-198630844),k=i(k,c,d,e,a[l+7],10,1126891415),e=i(e,k,c,d,a[l+14],15,-1416354905),d=i(d,e,k,c,a[l+5],21,-57434055),c=i(c,d,e,k,a[l+12],6,1700485571),k=i(k,c,d,e,a[l+3],10,-1894986606),e=i(e,k,c,d,a[l+10],15,-1051523),d=i(d,e,k,c,a[l+1],21,-2054922799),c=i(c,d,e,k,a[l+8],6,1873313359),k=i(k,c,d,e,a[l+15],10,-30611744),e=i(e,k,c,d,a[l+6],15,-1560198380),d=i(d,e,k,c,a[l+13],21,1309151649),c=i(c,d,e,k,a[l+4],6,-145523070),k=i(k,c,d,e,a[l+11],10,-1120210379),e=i(e,k,c,d,a[l+2],15,718787259),d=i(d,e,k,c,a[l+9],21,-343485551),c=j(c,m),d=j(d,n),e=j(e,o),k=j(k,p)}return Array(c,d,e,k)}function e(a,b,c,d,e,f){return j(k(j(j(b,a),j(d,f)),e),c)}function f(a,b,c,d,f,g,h){return e(b&c|~b&d,a,b,f,g,h)}function g(a,b,c,d,f,g,h){return e(b&d|c&~d,a,b,f,g,h)}function h(a,b,c,d,f,g,h){return e(b^c^d,a,b,f,g,h)}function i(a,b,c,d,f,g,h){return e(c^(b|~d),a,b,f,g,h)}function j(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function k(a,b){return a<<b|a>>>32-b}var l=a("./helpers");b.exports=function(a){return l.hash(a,d,16)}},{"./helpers":137}],139:[function(a,b,c){(function(c){function d(a){e.call(this),this.hashMode="string"==typeof a,this.hashMode?this[a]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var e=a("stream").Transform,f=a("inherits"),g=a("string_decoder").StringDecoder;b.exports=d,f(d,e),d.prototype.update=function(a,b,d){"string"==typeof a&&(a=new c(a,b));var e=this._update(a);return this.hashMode?this:(d&&(e=this._toString(e,d)),e)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(a,b,c){var d;try{this.hashMode?this._update(a):this.push(this._update(a))}catch(e){d=e}finally{c(d)}},d.prototype._flush=function(a){var b;try{this.push(this._final())}catch(c){b=c}finally{a(b)}},d.prototype._finalOrDigest=function(a){var b=this._final()||new c("");return a&&(b=this._toString(b,a,!0)),b},d.prototype._toString=function(a,b,c){if(this._decoder||(this._decoder=new g(b),this._encoding=b),this._encoding!==b)throw new Error("can't switch encodings");var d=this._decoder.write(a);return c&&(d+=this._decoder.end()),d}}).call(this,a("buffer").Buffer)},{buffer:3,inherits:207,stream:226,string_decoder:227}],140:[function(a,b,c){(function(a){function c(a){for(var b=[],c=0,d=0;c<a.length;c++,d+=8)b[d>>>5]|=a[c]<<24-d%32;return b}function d(a){for(var b=[],c=0;c<32*a.length;c+=8)b.push(a[c>>>5]>>>24-c%32&255);return b}function e(a,b,c){for(var d=0;d<16;d++){var e=c+d,l=b[e];b[e]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var s,t,u,v,w,x,y,z,A,B;x=s=a[0],y=t=a[1],z=u=a[2],A=v=a[3],B=w=a[4];var C;for(d=0;d<80;d+=1)C=s+b[c+m[d]]|0,C+=d<16?f(t,u,v)+q[0]:d<32?g(t,u,v)+q[1]:d<48?h(t,u,v)+q[2]:d<64?i(t,u,v)+q[3]:j(t,u,v)+q[4],C=0|C,C=k(C,o[d]),C=C+w|0,s=w,w=v,v=k(u,10),u=t,t=C,C=x+b[c+n[d]]|0,C+=d<16?j(y,z,A)+r[0]:d<32?i(y,z,A)+r[1]:d<48?h(y,z,A)+r[2]:d<64?g(y,z,A)+r[3]:f(y,z,A)+r[4],C=0|C,C=k(C,p[d]),C=C+B|0,x=B,B=A,A=k(z,10),z=y,y=C;C=a[1]+u+A|0,a[1]=a[2]+v+B|0,a[2]=a[3]+w+x|0,a[3]=a[4]+s+y|0,a[4]=a[0]+t+z|0,a[0]=C}function f(a,b,c){return a^b^c}function g(a,b,c){return a&b|~a&c}function h(a,b,c){return(a|~b)^c}function i(a,b,c){return a&c|b&~c}function j(a,b,c){return a^(b|~c)}function k(a,b){return a<<b|a>>>32-b}function l(b){var f=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof b&&(b=new a(b,"utf8"));var g=c(b),h=8*b.length,i=8*b.length;g[h>>>5]|=128<<24-h%32,g[(h+64>>>9<<4)+14]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);for(var j=0;j<g.length;j+=16)e(f,g,j);for(j=0;j<5;j++){var k=f[j];f[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var l=d(f);return new a(l)}/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var m=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],n=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],o=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],q=[0,1518500249,1859775393,2400959708,2840853838],r=[1352829926,1548603684,1836072691,2053994217,0];b.exports=l}).call(this,a("buffer").Buffer)},{buffer:3}],141:[function(a,b,c){(function(a){function c(b,c){this._block=new a(b),this._finalSize=c,this._blockSize=b,this._len=0,this._s=0}c.prototype.update=function(b,c){"string"==typeof b&&(c=c||"utf8",b=new a(b,c));for(var d=this._len+=b.length,e=this._s||0,f=0,g=this._block;e<d;){for(var h=Math.min(b.length,f+this._blockSize-e%this._blockSize),i=h-f,j=0;j<i;j++)g[e%this._blockSize+j]=b[j+f];e+=i,f+=i,e%this._blockSize===0&&this._update(g)}return this._s=e,this},c.prototype.digest=function(a){var b=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),b%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(b,this._blockSize-4);var c=this._update(this._block)||this._hash();return a?c.toString(a):c},c.prototype._update=function(){throw new Error("_update must be implemented by subclass")},b.exports=c}).call(this,a("buffer").Buffer)},{buffer:3}],142:[function(a,b,c){var c=b.exports=function(a){a=a.toLowerCase();var b=c[a];if(!b)throw new Error(a+" is not supported (we accept pull requests)");return new b};c.sha=a("./sha"),c.sha1=a("./sha1"),c.sha224=a("./sha224"),c.sha256=a("./sha256"),c.sha384=a("./sha384"),c.sha512=a("./sha512")},{"./sha":143,"./sha1":144,"./sha224":145,"./sha256":146,"./sha384":147,"./sha512":148}],143:[function(a,b,c){(function(c){function d(){this.init(),this._w=k,i.call(this,64,56)}function e(a){return a<<5|a>>>27}function f(a){return a<<30|a>>>2}function g(a,b,c,d){return 0===a?b&c|~b&d:2===a?b&c|b&d|c&d:b^c^d}var h=a("inherits"),i=a("./hash"),j=[1518500249,1859775393,-1894007588,-899497514],k=new Array(80);h(d,i),d.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},d.prototype._update=function(a){for(var b=this._w,c=0|this._a,d=0|this._b,h=0|this._c,i=0|this._d,k=0|this._e,l=0;l<16;++l)b[l]=a.readInt32BE(4*l);for(;l<80;++l)b[l]=b[l-3]^b[l-8]^b[l-14]^b[l-16];for(var m=0;m<80;++m){var n=~~(m/20),o=e(c)+g(n,d,h,i)+k+b[m]+j[n]|0;k=i,i=h,h=f(d),d=c,c=o}this._a=c+this._a|0,this._b=d+this._b|0,this._c=h+this._c|0,this._d=i+this._d|0,this._e=k+this._e|0},d.prototype._hash=function(){var a=new c(20);return a.writeInt32BE(0|this._a,0),a.writeInt32BE(0|this._b,4),a.writeInt32BE(0|this._c,8),a.writeInt32BE(0|this._d,12),a.writeInt32BE(0|this._e,16),a},b.exports=d}).call(this,a("buffer").Buffer)},{"./hash":141,buffer:3,inherits:207}],144:[function(a,b,c){(function(c){function d(){this.init(),this._w=l,j.call(this,64,56)}function e(a){return a<<1|a>>>31}function f(a){return a<<5|a>>>27}function g(a){return a<<30|a>>>2}function h(a,b,c,d){return 0===a?b&c|~b&d:2===a?b&c|b&d|c&d:b^c^d}var i=a("inherits"),j=a("./hash"),k=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);i(d,j),d.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},d.prototype._update=function(a){for(var b=this._w,c=0|this._a,d=0|this._b,i=0|this._c,j=0|this._d,l=0|this._e,m=0;m<16;++m)b[m]=a.readInt32BE(4*m);for(;m<80;++m)b[m]=e(b[m-3]^b[m-8]^b[m-14]^b[m-16]);for(var n=0;n<80;++n){var o=~~(n/20),p=f(c)+h(o,d,i,j)+l+b[n]+k[o]|0;l=j,j=i,i=g(d),d=c,c=p}this._a=c+this._a|0,this._b=d+this._b|0,this._c=i+this._c|0,this._d=j+this._d|0,this._e=l+this._e|0},d.prototype._hash=function(){var a=new c(20);return a.writeInt32BE(0|this._a,0),a.writeInt32BE(0|this._b,4),a.writeInt32BE(0|this._c,8),a.writeInt32BE(0|this._d,12),a.writeInt32BE(0|this._e,16),a},b.exports=d}).call(this,a("buffer").Buffer)},{"./hash":141,buffer:3,inherits:207}],145:[function(a,b,c){(function(c){function d(){this.init(),this._w=h,g.call(this,64,56)}var e=a("inherits"),f=a("./sha256"),g=a("./hash"),h=new Array(64);e(d,f),d.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},d.prototype._hash=function(){var a=new c(28);return a.writeInt32BE(this._a,0),a.writeInt32BE(this._b,4),a.writeInt32BE(this._c,8),a.writeInt32BE(this._d,12),a.writeInt32BE(this._e,16),a.writeInt32BE(this._f,20),a.writeInt32BE(this._g,24),a},b.exports=d}).call(this,a("buffer").Buffer)},{"./hash":141,"./sha256":146,buffer:3,inherits:207}],146:[function(a,b,c){(function(c){function d(){this.init(),this._w=n,l.call(this,64,56)}function e(a,b,c){return c^a&(b^c)}function f(a,b,c){return a&b|c&(a|b)}function g(a){return(a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10)}function h(a){return(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7)}function i(a){return(a>>>7|a<<25)^(a>>>18|a<<14)^a>>>3}function j(a){return(a>>>17|a<<15)^(a>>>19|a<<13)^a>>>10}var k=a("inherits"),l=a("./hash"),m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],n=new Array(64);k(d,l),d.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},d.prototype._update=function(a){for(var b=this._w,c=0|this._a,d=0|this._b,k=0|this._c,l=0|this._d,n=0|this._e,o=0|this._f,p=0|this._g,q=0|this._h,r=0;r<16;++r)b[r]=a.readInt32BE(4*r);for(;r<64;++r)b[r]=j(b[r-2])+b[r-7]+i(b[r-15])+b[r-16]|0;for(var s=0;s<64;++s){var t=q+h(n)+e(n,o,p)+m[s]+b[s]|0,u=g(c)+f(c,d,k)|0;q=p,p=o,o=n,n=l+t|0,l=k,k=d,d=c,c=t+u|0}this._a=c+this._a|0,this._b=d+this._b|0,this._c=k+this._c|0,this._d=l+this._d|0,this._e=n+this._e|0,this._f=o+this._f|0,this._g=p+this._g|0,this._h=q+this._h|0},d.prototype._hash=function(){var a=new c(32);return a.writeInt32BE(this._a,0),a.writeInt32BE(this._b,4),a.writeInt32BE(this._c,8),a.writeInt32BE(this._d,12),a.writeInt32BE(this._e,16),a.writeInt32BE(this._f,20),a.writeInt32BE(this._g,24),a.writeInt32BE(this._h,28),a},b.exports=d}).call(this,a("buffer").Buffer)},{"./hash":141,buffer:3,inherits:207}],147:[function(a,b,c){(function(c){function d(){this.init(),this._w=h,g.call(this,128,112)}var e=a("inherits"),f=a("./sha512"),g=a("./hash"),h=new Array(160);e(d,f),d.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},d.prototype._hash=function(){function a(a,c,d){b.writeInt32BE(a,d),b.writeInt32BE(c,d+4)}var b=new c(48);return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),b},b.exports=d}).call(this,a("buffer").Buffer)},{"./hash":141,"./sha512":148,buffer:3,inherits:207}],148:[function(a,b,c){(function(c){function d(){this.init(),this._w=q,o.call(this,128,112)}function e(a,b,c){return c^a&(b^c)}function f(a,b,c){return a&b|c&(a|b)}function g(a,b){return(a>>>28|b<<4)^(b>>>2|a<<30)^(b>>>7|a<<25)}function h(a,b){return(a>>>14|b<<18)^(a>>>18|b<<14)^(b>>>9|a<<23)}function i(a,b){return(a>>>1|b<<31)^(a>>>8|b<<24)^a>>>7}function j(a,b){return(a>>>1|b<<31)^(a>>>8|b<<24)^(a>>>7|b<<25)}function k(a,b){return(a>>>19|b<<13)^(b>>>29|a<<3)^a>>>6}function l(a,b){return(a>>>19|b<<13)^(b>>>29|a<<3)^(a>>>6|b<<26)}function m(a,b){return a>>>0<b>>>0?1:0}var n=a("inherits"),o=a("./hash"),p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],q=new Array(160);n(d,o),d.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},d.prototype._update=function(a){for(var b=this._w,c=0|this._ah,d=0|this._bh,n=0|this._ch,o=0|this._dh,q=0|this._eh,r=0|this._fh,s=0|this._gh,t=0|this._hh,u=0|this._al,v=0|this._bl,w=0|this._cl,x=0|this._dl,y=0|this._el,z=0|this._fl,A=0|this._gl,B=0|this._hl,C=0;C<32;C+=2)b[C]=a.readInt32BE(4*C),b[C+1]=a.readInt32BE(4*C+4);for(;C<160;C+=2){var D=b[C-30],E=b[C-30+1],F=i(D,E),G=j(E,D);D=b[C-4],E=b[C-4+1];var H=k(D,E),I=l(E,D),J=b[C-14],K=b[C-14+1],L=b[C-32],M=b[C-32+1],N=G+K|0,O=F+J+m(N,G)|0;N=N+I|0,O=O+H+m(N,I)|0,N=N+M|0,O=O+L+m(N,M)|0,b[C]=O,b[C+1]=N}for(var P=0;P<160;P+=2){O=b[P],N=b[P+1];var Q=f(c,d,n),R=f(u,v,w),S=g(c,u),T=g(u,c),U=h(q,y),V=h(y,q),W=p[P],X=p[P+1],Y=e(q,r,s),Z=e(y,z,A),$=B+V|0,_=t+U+m($,B)|0;$=$+Z|0,_=_+Y+m($,Z)|0,$=$+X|0,_=_+W+m($,X)|0,$=$+N|0,_=_+O+m($,N)|0;var aa=T+R|0,ba=S+Q+m(aa,T)|0;t=s,B=A,s=r,A=z,r=q,z=y,y=x+$|0,q=o+_+m(y,x)|0,o=n,x=w,n=d,w=v,d=c,v=u,u=$+aa|0,c=_+ba+m(u,$)|0}this._al=this._al+u|0,this._bl=this._bl+v|0,this._cl=this._cl+w|0,this._dl=this._dl+x|0,this._el=this._el+y|0,this._fl=this._fl+z|0,this._gl=this._gl+A|0,this._hl=this._hl+B|0,this._ah=this._ah+c+m(this._al,u)|0,this._bh=this._bh+d+m(this._bl,v)|0,this._ch=this._ch+n+m(this._cl,w)|0,this._dh=this._dh+o+m(this._dl,x)|0,this._eh=this._eh+q+m(this._el,y)|0,this._fh=this._fh+r+m(this._fl,z)|0,this._gh=this._gh+s+m(this._gl,A)|0,this._hh=this._hh+t+m(this._hl,B)|0},d.prototype._hash=function(){function a(a,c,d){b.writeInt32BE(a,d),b.writeInt32BE(c,d+4)}var b=new c(64);return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),a(this._gh,this._gl,48),a(this._hh,this._hl,56),b},b.exports=d}).call(this,a("buffer").Buffer)},{"./hash":141,buffer:3,inherits:207}],149:[function(a,b,c){(function(c){"use strict";function d(a,b){g.call(this),a=a.toLowerCase(),"string"==typeof b&&(b=new c(b));var d="sha512"===a||"sha384"===a?128:64;this._alg=a,this._key=b,b.length>d?b=e(a).update(b).digest():b.length<d&&(b=c.concat([b,h],d));for(var f=this._ipad=new c(d),i=this._opad=new c(d),j=0;j<d;j++)f[j]=54^b[j],i[j]=92^b[j];this._hash=e(a).update(f)}var e=a("create-hash/browser"),f=a("inherits"),g=a("stream").Transform,h=new c(128);h.fill(0),f(d,g),d.prototype.update=function(a,b){return this._hash.update(a,b),this},d.prototype._transform=function(a,b,c){this._hash.update(a),c()},d.prototype._flush=function(a){this.push(this.digest()),a()},d.prototype.digest=function(a){var b=this._hash.digest();return e(this._alg).update(this._opad).update(b).digest(a)},b.exports=function(a,b){return new d(a,b)}}).call(this,a("buffer").Buffer)},{buffer:3,"create-hash/browser":136,inherits:207,stream:226}],150:[function(a,b,c){(function(b){function d(a){var c=new b(g[a].prime,"hex"),d=new b(g[a].gen,"hex");return new h(c,d)}function e(a,c,d,g){return b.isBuffer(c)||void 0===i[c]?e(a,"binary",c,d):(c=c||"binary",g=g||"binary",d=d||new b([2]),b.isBuffer(d)||(d=new b(d,g)),"number"==typeof a?new h(f(a,d),d,(!0)):(b.isBuffer(a)||(a=new b(a,c)),new h(a,d,(!0))))}var f=a("./lib/generatePrime"),g=a("./lib/primes.json"),h=a("./lib/dh"),i={binary:!0,hex:!0,base64:!0};c.DiffieHellmanGroup=c.createDiffieHellmanGroup=c.getDiffieHellman=d,c.createDiffieHellman=c.DiffieHellman=e}).call(this,a("buffer").Buffer)},{"./lib/dh":151,"./lib/generatePrime":152,"./lib/primes.json":153,buffer:3}],151:[function(a,b,c){(function(c){function d(a,b){return b=b||"utf8",c.isBuffer(a)||(a=new c(a,b)),this._pub=new i(a),this}function e(a,b){return b=b||"utf8",c.isBuffer(a)||(a=new c(a,b)),this._priv=new i(a),this}function f(a,b){var c=b.toString("hex"),d=[c,a.toString(16)].join("_");if(d in s)return s[d];var e=0;if(a.isEven()||!q.simpleSieve||!q.fermatTest(a)||!k.test(a))return e+=1,e+="02"===c||"05"===c?8:4,s[d]=e,e;k.test(a.shrn(1))||(e+=2);var f;switch(c){case"02":a.mod(l).cmp(m)&&(e+=8);break;case"05":f=a.mod(n),f.cmp(o)&&f.cmp(p)&&(e+=8);break;default:e+=4}return s[d]=e,e}function g(a,b,c){this.setGenerator(b),this.__prime=new i(a),this._prime=i.mont(this.__prime),this._primeLen=a.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,c?(this.setPublicKey=d,this.setPrivateKey=e):this._primeCode=8}function h(a,b){var d=new c(a.toArray());return b?d.toString(b):d}var i=a("bn.js"),j=a("miller-rabin"),k=new j,l=new i(24),m=new i(11),n=new i(10),o=new i(3),p=new i(7),q=a("./generatePrime"),r=a("randombytes");b.exports=g;var s={};Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=f(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new i(r(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(a){a=new i(a),a=a.toRed(this._prime);var b=a.redPow(this._priv).fromRed(),d=new c(b.toArray()),e=this.getPrime();if(d.length<e.length){var f=new c(e.length-d.length);f.fill(0),d=c.concat([f,d])}return d},g.prototype.getPublicKey=function(a){return h(this._pub,a)},g.prototype.getPrivateKey=function(a){return h(this._priv,a)},g.prototype.getPrime=function(a){return h(this.__prime,a)},g.prototype.getGenerator=function(a){return h(this._gen,a)},g.prototype.setGenerator=function(a,b){return b=b||"utf8",c.isBuffer(a)||(a=new c(a,b)),this.__gen=a,this._gen=new i(a),this}}).call(this,a("buffer").Buffer)},{"./generatePrime":152,"bn.js":154,buffer:3,"miller-rabin":155,randombytes:205}],152:[function(a,b,c){function d(){if(null!==t)return t;var a=1048576,b=[];b[0]=2;for(var c=1,d=3;d<a;d+=2){for(var e=Math.ceil(Math.sqrt(d)),f=0;f<c&&b[f]<=e&&d%b[f]!==0;f++);c!==f&&b[f]<=e||(b[c++]=d)}return t=b,b}function e(a){for(var b=d(),c=0;c<b.length;c++)if(0===a.modn(b[c]))return 0===a.cmpn(b[c]);return!0}function f(a){var b=i.mont(a);return 0===n.toRed(b).redPow(a.subn(1)).fromRed().cmpn(1)}function g(a,b){if(a<16)return new i(2===b||5===b?[140,123]:[140,39]);b=new i(b);for(var c,d;;){for(c=new i(h(Math.ceil(a/8)));c.bitLength()>a;)c.ishrn(1);if(c.isEven()&&c.iadd(m),c.testn(1)||c.iadd(n),b.cmp(n)){if(!b.cmp(o))for(;c.mod(p).cmp(q);)c.iadd(s)}else for(;c.mod(j).cmp(r);)c.iadd(s);if(d=c.shrn(1),e(d)&&e(c)&&f(d)&&f(c)&&l.test(d)&&l.test(c))return c}}var h=a("randombytes");b.exports=g,g.simpleSieve=e,g.fermatTest=f;var i=a("bn.js"),j=new i(24),k=a("miller-rabin"),l=new k,m=new i(1),n=new i(2),o=new i(5),p=(new i(16),new i(8),new i(10)),q=new i(3),r=(new i(7),new i(11)),s=new i(4),t=(new i(12),null)},{"bn.js":154,"miller-rabin":155,randombytes:205}],153:[function(a,b,c){b.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],154:[function(a,b,c){arguments[4][40][0].apply(c,arguments)},{dup:40}],155:[function(a,b,c){function d(a){this.rand=a||new f.Rand}var e=a("bn.js"),f=a("brorand");b.exports=d,d.create=function(a){return new d(a)},d.prototype._rand=function(a){var b=a.bitLength(),c=this.rand.generate(Math.ceil(b/8));c[0]|=3;var d=7&b;return 0!==d&&(c[c.length-1]>>=7-d),new e(c)},d.prototype.test=function(a,b,c){var d=a.bitLength(),f=e.mont(a),g=new e(1).toRed(f);b||(b=Math.max(1,d/48|0));for(var h=a.subn(1),i=h.subn(1),j=0;!h.testn(j);j++);for(var k=a.shrn(j),l=h.toRed(f),m=!0;b>0;b--){var n=this._rand(i);c&&c(n);var o=n.toRed(f).redPow(k);if(0!==o.cmp(g)&&0!==o.cmp(l)){for(var p=1;p<j;p++){if(o=o.redSqr(),0===o.cmp(g))return!1;if(0===o.cmp(l))break}if(p===j)return!1}}return m},d.prototype.getDivisor=function(a,b){var c=a.bitLength(),d=e.mont(a),f=new e(1).toRed(d);b||(b=Math.max(1,c/48|0));for(var g=a.subn(1),h=g.subn(1),i=0;!g.testn(i);i++);for(var j=a.shrn(i),k=g.toRed(d);b>0;b--){var l=this._rand(h),m=a.gcd(l);if(0!==m.cmpn(1))return m;var n=l.toRed(d).redPow(j);if(0!==n.cmp(f)&&0!==n.cmp(k)){for(var o=1;o<i;o++){if(n=n.redSqr(),0===n.cmp(f))return n.fromRed().subn(1).gcd(a);if(0===n.cmp(k))break}if(o===i)return n=n.redSqr(),n.fromRed().subn(1).gcd(a)}}return!1}},{"bn.js":154,brorand:156}],156:[function(a,b,c){arguments[4][57][0].apply(c,arguments)},{crypto:2,dup:57}],157:[function(a,b,c){(function(b,d){var e=a("create-hmac"),f=a("./precondition");c.pbkdf2=function(a,b,d,e,g,h){if("function"==typeof g&&(h=g,g=void 0),f(d,e),"function"!=typeof h)throw new Error("No callback provided to pbkdf2");setTimeout(function(){h(null,c.pbkdf2Sync(a,b,d,e,g))})};var g;if(b.browser)g="utf-8";else{var h=parseInt(b.version.split(".")[0].slice(1),10);g=h>=6?"utf-8":"binary"}c.pbkdf2Sync=function(a,b,c,h,i){d.isBuffer(a)||(a=new d(a,g)),d.isBuffer(b)||(b=new d(b,g)),f(c,h),i=i||"sha1";var j,k=1,l=new d(h),m=new d(b.length+4);b.copy(m,0,0,b.length);for(var n,o,p=1;p<=k;p++){m.writeUInt32BE(p,b.length);var q=e(i,a).update(m).digest();j||(j=q.length,o=new d(j),k=Math.ceil(h/j),n=h-(k-1)*j),q.copy(o,0,0,j);for(var r=1;r<c;r++){q=e(i,a).update(q).digest();for(var s=0;s<j;s++)o[s]^=q[s]}var t=(p-1)*j,u=p===k?n:j;o.copy(l,t,0,u)}return l}}).call(this,a("_process"),a("buffer").Buffer)},{"./precondition":158,_process:209,buffer:3,"create-hmac":149}],158:[function(a,b,c){var d=Math.pow(2,30)-1;b.exports=function(a,b){if("number"!=typeof a)throw new TypeError("Iterations not a number");if(a<0)throw new TypeError("Bad iterations");if("number"!=typeof b)throw new TypeError("Key length not a number");if(b<0||b>d||b!==b)throw new TypeError("Bad key length")}},{}],159:[function(a,b,c){c.publicEncrypt=a("./publicEncrypt"),c.privateDecrypt=a("./privateDecrypt"),c.privateEncrypt=function(a,b){return c.publicEncrypt(a,b,!0)},c.publicDecrypt=function(a,b){return c.privateDecrypt(a,b,!0)}},{"./privateDecrypt":201,"./publicEncrypt":202}],160:[function(a,b,c){(function(c){function d(a){var b=new c(4);return b.writeUInt32BE(a,0),b}var e=a("create-hash");b.exports=function(a,b){for(var f,g=new c(""),h=0;g.length<b;)f=d(h++),g=c.concat([g,e("sha1").update(a).update(f).digest()]);return g.slice(0,b)}}).call(this,a("buffer").Buffer)},{buffer:3,"create-hash":136}],161:[function(a,b,c){arguments[4][40][0].apply(c,arguments)},{dup:40}],162:[function(a,b,c){(function(c){function d(a){var b=f(a),c=b.toRed(g.mont(a.modulus)).redPow(new g(a.publicExponent)).fromRed();return{blinder:c,unblinder:b.invm(a.modulus)}}function e(a,b){var e=d(b),f=b.modulus.byteLength(),h=(g.mont(b.modulus),new g(a).mul(e.blinder).umod(b.modulus)),i=h.toRed(g.mont(b.prime1)),j=h.toRed(g.mont(b.prime2)),k=b.coefficient,l=b.prime1,m=b.prime2,n=i.redPow(b.exponent1),o=j.redPow(b.exponent2);n=n.fromRed(),o=o.fromRed();var p=n.isub(o).imul(k).umod(l);return p.imul(m),o.iadd(p),new c(o.imul(e.unblinder).umod(b.modulus).toArray(!1,f))}function f(a){for(var b=a.modulus.byteLength(),c=new g(h(b));c.cmp(a.modulus)>=0||!c.umod(a.prime1)||!c.umod(a.prime2);)c=new g(h(b));return c}var g=a("bn.js"),h=a("randombytes");b.exports=e,e.getr=f}).call(this,a("buffer").Buffer)},{"bn.js":161,buffer:3,randombytes:205}],163:[function(a,b,c){arguments[4][68][0].apply(c,arguments)},{dup:68}],164:[function(a,b,c){arguments[4][69][0].apply(c,arguments)},{"./certificate":165,"asn1.js":168,dup:69}],165:[function(a,b,c){arguments[4][70][0].apply(c,arguments)},{"asn1.js":168,dup:70}],166:[function(a,b,c){(function(c){var d=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,e=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,f=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,g=a("evp_bytestokey"),h=a("browserify-aes");b.exports=function(a,b){var i,j=a.toString(),k=j.match(d);if(k){var l="aes"+k[1],m=new c(k[2],"hex"),n=new c(k[3].replace(/\r?\n/g,""),"base64"),o=g(b,m.slice(0,8),parseInt(k[1],10)).key,p=[],q=h.createDecipheriv(l,o,m);p.push(q.update(n)),p.push(q["final"]()),i=c.concat(p)}else{var r=j.match(f);i=new c(r[2].replace(/\r?\n/g,""),"base64")}var s=j.match(e)[1];return{tag:s,data:i}}}).call(this,a("buffer").Buffer)},{"browserify-aes":185,buffer:3,evp_bytestokey:200}],167:[function(a,b,c){(function(c){function d(a){var b;"object"!=typeof a||c.isBuffer(a)||(b=a.passphrase,a=a.key),"string"==typeof a&&(a=new c(a));var d,g,i=h(a,b),j=i.tag,k=i.data;switch(j){case"CERTIFICATE":g=f.certificate.decode(k,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(g||(g=f.PublicKey.decode(k,"der")),d=g.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return f.RSAPublicKey.decode(g.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return g.subjectPrivateKey=g.subjectPublicKey,{type:"ec",data:g};case"1.2.840.10040.4.1":return g.algorithm.params.pub_key=f.DSAparam.decode(g.subjectPublicKey.data,"der"),{type:"dsa",data:g.algorithm.params};default:throw new Error("unknown key id "+d)}throw new Error("unknown key type "+j);case"ENCRYPTED PRIVATE KEY":k=f.EncryptedPrivateKey.decode(k,"der"),k=e(k,b);case"PRIVATE KEY":switch(g=f.PrivateKey.decode(k,"der"),d=g.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return f.RSAPrivateKey.decode(g.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:g.algorithm.curve,privateKey:f.ECPrivateKey.decode(g.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return g.algorithm.params.priv_key=f.DSAparam.decode(g.subjectPrivateKey,"der"),{type:"dsa",params:g.algorithm.params};default:throw new Error("unknown key id "+d)}throw new Error("unknown key type "+j);case"RSA PUBLIC KEY":return f.RSAPublicKey.decode(k,"der");case"RSA PRIVATE KEY":return f.RSAPrivateKey.decode(k,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:f.DSAPrivateKey.decode(k,"der")};case"EC PRIVATE KEY":return k=f.ECPrivateKey.decode(k,"der"),{curve:k.parameters.value,privateKey:k.privateKey};default:throw new Error("unknown key type "+j)}}function e(a,b){var d=a.algorithm.decrypt.kde.kdeparams.salt,e=parseInt(a.algorithm.decrypt.kde.kdeparams.iters.toString(),10),f=g[a.algorithm.decrypt.cipher.algo.join(".")],h=a.algorithm.decrypt.cipher.iv,k=a.subjectPrivateKey,l=parseInt(f.split("-")[1],10)/8,m=j.pbkdf2Sync(b,d,e,l),n=i.createDecipheriv(f,m,h),o=[];return o.push(n.update(k)),o.push(n["final"]()),
c.concat(o)}var f=a("./asn1"),g=a("./aesid.json"),h=a("./fixProc"),i=a("browserify-aes"),j=a("pbkdf2");b.exports=d,d.signature=f.signature}).call(this,a("buffer").Buffer)},{"./aesid.json":163,"./asn1":164,"./fixProc":166,"browserify-aes":185,buffer:3,pbkdf2:157}],168:[function(a,b,c){arguments[4][73][0].apply(c,arguments)},{"./asn1/api":169,"./asn1/base":171,"./asn1/constants":175,"./asn1/decoders":177,"./asn1/encoders":180,"bn.js":161,dup:73}],169:[function(a,b,c){arguments[4][74][0].apply(c,arguments)},{"../asn1":168,dup:74,inherits:207,vm:228}],170:[function(a,b,c){arguments[4][75][0].apply(c,arguments)},{"../base":171,buffer:3,dup:75,inherits:207}],171:[function(a,b,c){arguments[4][76][0].apply(c,arguments)},{"./buffer":170,"./node":172,"./reporter":173,dup:76}],172:[function(a,b,c){arguments[4][77][0].apply(c,arguments)},{"../base":171,dup:77,"minimalistic-assert":182}],173:[function(a,b,c){arguments[4][78][0].apply(c,arguments)},{dup:78,inherits:207}],174:[function(a,b,c){arguments[4][79][0].apply(c,arguments)},{"../constants":175,dup:79}],175:[function(a,b,c){arguments[4][80][0].apply(c,arguments)},{"./der":174,dup:80}],176:[function(a,b,c){arguments[4][81][0].apply(c,arguments)},{"../../asn1":168,dup:81,inherits:207}],177:[function(a,b,c){arguments[4][82][0].apply(c,arguments)},{"./der":176,"./pem":178,dup:82}],178:[function(a,b,c){arguments[4][83][0].apply(c,arguments)},{"./der":176,buffer:3,dup:83,inherits:207}],179:[function(a,b,c){arguments[4][84][0].apply(c,arguments)},{"../../asn1":168,buffer:3,dup:84,inherits:207}],180:[function(a,b,c){arguments[4][85][0].apply(c,arguments)},{"./der":179,"./pem":181,dup:85}],181:[function(a,b,c){arguments[4][86][0].apply(c,arguments)},{"./der":179,dup:86,inherits:207}],182:[function(a,b,c){arguments[4][35][0].apply(c,arguments)},{dup:35}],183:[function(a,b,c){(function(a){function b(a){var b,c;return b=a>h||a<0?(c=Math.abs(a)%h,a<0?h-c:c):a}function d(a){for(var b=0;b<a.length;a++)a[b]=0;return!1}function e(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function f(a){for(var b=a.length/4,c=new Array(b),d=-1;++d<b;)c[d]=a.readUInt32BE(4*d);return c}function g(a){this._key=f(a),this._doReset()}var h=Math.pow(2,32);e.prototype.init=function(){var a,b,c,d,e,f,g,h,i,j;for(a=function(){var a,c;for(c=[],b=a=0;a<256;b=++a)b<128?c.push(b<<1):c.push(b<<1^283);return c}(),e=0,i=0,b=j=0;j<256;b=++j)c=i^i<<1^i<<2^i<<3^i<<4,c=c>>>8^255&c^99,this.SBOX[e]=c,this.INV_SBOX[c]=e,f=a[e],g=a[f],h=a[g],d=257*a[c]^16843008*c,this.SUB_MIX[0][e]=d<<24|d>>>8,this.SUB_MIX[1][e]=d<<16|d>>>16,this.SUB_MIX[2][e]=d<<8|d>>>24,this.SUB_MIX[3][e]=d,d=16843009*h^65537*g^257*f^16843008*e,this.INV_SUB_MIX[0][c]=d<<24|d>>>8,this.INV_SUB_MIX[1][c]=d<<16|d>>>16,this.INV_SUB_MIX[2][c]=d<<8|d>>>24,this.INV_SUB_MIX[3][c]=d,0===e?e=i=1:(e=f^a[a[a[h^f]]],i^=a[a[i]]);return!0};var i=new e;g.blockSize=16,g.prototype.blockSize=g.blockSize,g.keySize=32,g.prototype.keySize=g.keySize,g.prototype._doReset=function(){var a,b,c,d,e,f;for(c=this._key,b=c.length,this._nRounds=b+6,e=4*(this._nRounds+1),this._keySchedule=[],d=0;d<e;d++)this._keySchedule[d]=d<b?c[d]:(f=this._keySchedule[d-1],d%b===0?(f=f<<8|f>>>24,f=i.SBOX[f>>>24]<<24|i.SBOX[f>>>16&255]<<16|i.SBOX[f>>>8&255]<<8|i.SBOX[255&f],f^=i.RCON[d/b|0]<<24):b>6&&d%b===4?f=i.SBOX[f>>>24]<<24|i.SBOX[f>>>16&255]<<16|i.SBOX[f>>>8&255]<<8|i.SBOX[255&f]:void 0,this._keySchedule[d-b]^f);for(this._invKeySchedule=[],a=0;a<e;a++)d=e-a,f=this._keySchedule[d-(a%4?0:4)],this._invKeySchedule[a]=a<4||d<=4?f:i.INV_SUB_MIX[0][i.SBOX[f>>>24]]^i.INV_SUB_MIX[1][i.SBOX[f>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[f>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&f]];return!0},g.prototype.encryptBlock=function(b){b=f(new a(b));var c=this._doCryptBlock(b,this._keySchedule,i.SUB_MIX,i.SBOX),d=new a(16);return d.writeUInt32BE(c[0],0),d.writeUInt32BE(c[1],4),d.writeUInt32BE(c[2],8),d.writeUInt32BE(c[3],12),d},g.prototype.decryptBlock=function(b){b=f(new a(b));var c=[b[3],b[1]];b[1]=c[0],b[3]=c[1];var d=this._doCryptBlock(b,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX),e=new a(16);return e.writeUInt32BE(d[0],0),e.writeUInt32BE(d[3],4),e.writeUInt32BE(d[2],8),e.writeUInt32BE(d[1],12),e},g.prototype.scrub=function(){d(this._keySchedule),d(this._invKeySchedule),d(this._key)},g.prototype._doCryptBlock=function(a,c,d,e){var f,g,h,i,j,k,l,m,n;g=a[0]^c[0],h=a[1]^c[1],i=a[2]^c[2],j=a[3]^c[3],f=4;for(var o=1;o<this._nRounds;o++)k=d[0][g>>>24]^d[1][h>>>16&255]^d[2][i>>>8&255]^d[3][255&j]^c[f++],l=d[0][h>>>24]^d[1][i>>>16&255]^d[2][j>>>8&255]^d[3][255&g]^c[f++],m=d[0][i>>>24]^d[1][j>>>16&255]^d[2][g>>>8&255]^d[3][255&h]^c[f++],n=d[0][j>>>24]^d[1][g>>>16&255]^d[2][h>>>8&255]^d[3][255&i]^c[f++],g=k,h=l,i=m,j=n;return k=(e[g>>>24]<<24|e[h>>>16&255]<<16|e[i>>>8&255]<<8|e[255&j])^c[f++],l=(e[h>>>24]<<24|e[i>>>16&255]<<16|e[j>>>8&255]<<8|e[255&g])^c[f++],m=(e[i>>>24]<<24|e[j>>>16&255]<<16|e[g>>>8&255]<<8|e[255&h])^c[f++],n=(e[j>>>24]<<24|e[g>>>16&255]<<16|e[h>>>8&255]<<8|e[255&i])^c[f++],[b(k),b(l),b(m),b(n)]},c.AES=g}).call(this,a("buffer").Buffer)},{buffer:3}],184:[function(a,b,c){(function(c){function d(a,b,e,h){if(!(this instanceof d))return new d(a,b,e);g.call(this),this._finID=c.concat([e,new c([0,0,0,1])]),e=c.concat([e,new c([0,0,0,2])]),this._cipher=new f.AES(b),this._prev=new c(e.length),this._cache=new c(""),this._secCache=new c(""),this._decrypt=h,this._alen=0,this._len=0,e.copy(this._prev),this._mode=a;var j=new c(4);j.fill(0),this._ghash=new i(this._cipher.encryptBlock(j)),this._authTag=null,this._called=!1}function e(a,b){var c=0;a.length!==b.length&&c++;for(var d=Math.min(a.length,b.length),e=-1;++e<d;)c+=a[e]^b[e];return c}var f=a("./aes"),g=a("cipher-base"),h=a("inherits"),i=a("./ghash"),j=a("buffer-xor");h(d,g),b.exports=d,d.prototype._update=function(a){if(!this._called&&this._alen){var b=16-this._alen%16;b<16&&(b=new c(b),b.fill(0),this._ghash.update(b))}this._called=!0;var d=this._mode.encrypt(this,a);return this._decrypt?this._ghash.update(a):this._ghash.update(d),this._len+=a.length,d},d.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var a=j(this._ghash["final"](8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(e(a,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=a;this._cipher.scrub()},d.prototype.getAuthTag=function(){if(!this._decrypt&&c.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},d.prototype.setAuthTag=function(a){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=a},d.prototype.setAAD=function(a){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(a),this._alen+=a.length}}).call(this,a("buffer").Buffer)},{"./aes":183,"./ghash":188,buffer:3,"buffer-xor":197,"cipher-base":198,inherits:207}],185:[function(a,b,c){arguments[4][11][0].apply(c,arguments)},{"./decrypter":186,"./encrypter":187,"./modes":189,dup:11}],186:[function(a,b,c){(function(b){function d(a,c,f){return this instanceof d?(j.call(this),this._cache=new e,this._last=void 0,this._cipher=new i.AES(c),this._prev=new b(f.length),f.copy(this._prev),this._mode=a,void(this._autopadding=!0)):new d(a,c,f)}function e(){return this instanceof e?void(this.cache=new b("")):new e}function f(a){for(var b=a[15],c=-1;++c<b;)if(a[c+(16-b)]!==b)throw new Error("unable to decrypt data");if(16!==b)return a.slice(0,16-b)}function g(a,c,e){var f=l[a.toLowerCase()];if(!f)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=new b(e)),"string"==typeof c&&(c=new b(c)),c.length!==f.key/8)throw new TypeError("invalid key length "+c.length);if(e.length!==f.iv)throw new TypeError("invalid iv length "+e.length);return"stream"===f.type?new m(p[f.mode],c,e,(!0)):"auth"===f.type?new n(p[f.mode],c,e,(!0)):new d(p[f.mode],c,e)}function h(a,b){var c=l[a.toLowerCase()];if(!c)throw new TypeError("invalid suite type");var d=o(b,!1,c.key,c.iv);return g(a,d.key,d.iv)}var i=a("./aes"),j=a("cipher-base"),k=a("inherits"),l=a("./modes"),m=a("./streamCipher"),n=a("./authCipher"),o=a("evp_bytestokey");k(d,j),d.prototype._update=function(a){this._cache.add(a);for(var c,d,e=[];c=this._cache.get(this._autopadding);)d=this._mode.decrypt(this,c),e.push(d);return b.concat(e)},d.prototype._final=function(){var a=this._cache.flush();if(this._autopadding)return f(this._mode.decrypt(this,a));if(a)throw new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(a){return this._autopadding=!!a,this},e.prototype.add=function(a){this.cache=b.concat([this.cache,a])},e.prototype.get=function(a){var b;if(a){if(this.cache.length>16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b}else if(this.cache.length>=16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b;return null},e.prototype.flush=function(){if(this.cache.length)return this.cache};var p={ECB:a("./modes/ecb"),CBC:a("./modes/cbc"),CFB:a("./modes/cfb"),CFB8:a("./modes/cfb8"),CFB1:a("./modes/cfb1"),OFB:a("./modes/ofb"),CTR:a("./modes/ctr"),GCM:a("./modes/ctr")};c.createDecipher=h,c.createDecipheriv=g}).call(this,a("buffer").Buffer)},{"./aes":183,"./authCipher":184,"./modes":189,"./modes/cbc":190,"./modes/cfb":191,"./modes/cfb1":192,"./modes/cfb8":193,"./modes/ctr":194,"./modes/ecb":195,"./modes/ofb":196,"./streamCipher":199,buffer:3,"cipher-base":198,evp_bytestokey:200,inherits:207}],187:[function(a,b,c){(function(b){function d(a,c,f){return this instanceof d?(i.call(this),this._cache=new e,this._cipher=new h.AES(c),this._prev=new b(f.length),f.copy(this._prev),this._mode=a,void(this._autopadding=!0)):new d(a,c,f)}function e(){return this instanceof e?void(this.cache=new b("")):new e}function f(a,c,e){var f=k[a.toLowerCase()];if(!f)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=new b(e)),"string"==typeof c&&(c=new b(c)),c.length!==f.key/8)throw new TypeError("invalid key length "+c.length);if(e.length!==f.iv)throw new TypeError("invalid iv length "+e.length);return"stream"===f.type?new m(o[f.mode],c,e):"auth"===f.type?new n(o[f.mode],c,e):new d(o[f.mode],c,e)}function g(a,b){var c=k[a.toLowerCase()];if(!c)throw new TypeError("invalid suite type");var d=l(b,!1,c.key,c.iv);return f(a,d.key,d.iv)}var h=a("./aes"),i=a("cipher-base"),j=a("inherits"),k=a("./modes"),l=a("evp_bytestokey"),m=a("./streamCipher"),n=a("./authCipher");j(d,i),d.prototype._update=function(a){this._cache.add(a);for(var c,d,e=[];c=this._cache.get();)d=this._mode.encrypt(this,c),e.push(d);return b.concat(e)},d.prototype._final=function(){var a=this._cache.flush();if(this._autopadding)return a=this._mode.encrypt(this,a),this._cipher.scrub(),a;if("10101010101010101010101010101010"!==a.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(a){return this._autopadding=!!a,this},e.prototype.add=function(a){this.cache=b.concat([this.cache,a])},e.prototype.get=function(){if(this.cache.length>15){var a=this.cache.slice(0,16);return this.cache=this.cache.slice(16),a}return null},e.prototype.flush=function(){for(var a=16-this.cache.length,c=new b(a),d=-1;++d<a;)c.writeUInt8(a,d);var e=b.concat([this.cache,c]);return e};var o={ECB:a("./modes/ecb"),CBC:a("./modes/cbc"),CFB:a("./modes/cfb"),CFB8:a("./modes/cfb8"),CFB1:a("./modes/cfb1"),OFB:a("./modes/ofb"),CTR:a("./modes/ctr"),GCM:a("./modes/ctr")};c.createCipheriv=f,c.createCipher=g}).call(this,a("buffer").Buffer)},{"./aes":183,"./authCipher":184,"./modes":189,"./modes/cbc":190,"./modes/cfb":191,"./modes/cfb1":192,"./modes/cfb8":193,"./modes/ctr":194,"./modes/ecb":195,"./modes/ofb":196,"./streamCipher":199,buffer:3,"cipher-base":198,evp_bytestokey:200,inherits:207}],188:[function(a,b,c){(function(a){function c(b){this.h=b,this.state=new a(16),this.state.fill(0),this.cache=new a("")}function d(a){return[a.readUInt32BE(0),a.readUInt32BE(4),a.readUInt32BE(8),a.readUInt32BE(12)]}function e(b){b=b.map(f);var c=new a(16);return c.writeUInt32BE(b[0],0),c.writeUInt32BE(b[1],4),c.writeUInt32BE(b[2],8),c.writeUInt32BE(b[3],12),c}function f(a){var b,c;return b=a>i||a<0?(c=Math.abs(a)%i,a<0?i-c:c):a}function g(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}var h=new a(16);h.fill(0),b.exports=c,c.prototype.ghash=function(a){for(var b=-1;++b<a.length;)this.state[b]^=a[b];this._multiply()},c.prototype._multiply=function(){for(var a,b,c,f=d(this.h),h=[0,0,0,0],i=-1;++i<128;){for(b=0!==(this.state[~~(i/8)]&1<<7-i%8),b&&(h=g(h,f)),c=0!==(1&f[3]),a=3;a>0;a--)f[a]=f[a]>>>1|(1&f[a-1])<<31;f[0]=f[0]>>>1,c&&(f[0]=f[0]^225<<24)}this.state=e(h)},c.prototype.update=function(b){this.cache=a.concat([this.cache,b]);for(var c;this.cache.length>=16;)c=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(c)},c.prototype["final"]=function(b,c){return this.cache.length&&this.ghash(a.concat([this.cache,h],16)),this.ghash(e([0,b,0,c])),this.state};var i=Math.pow(2,32)}).call(this,a("buffer").Buffer)},{buffer:3}],189:[function(a,b,c){arguments[4][15][0].apply(c,arguments)},{dup:15}],190:[function(a,b,c){arguments[4][16][0].apply(c,arguments)},{"buffer-xor":197,dup:16}],191:[function(a,b,c){(function(b){function d(a,c,d){var f=c.length,g=e(c,a._cache);return a._cache=a._cache.slice(f),a._prev=b.concat([a._prev,d?c:g]),g}var e=a("buffer-xor");c.encrypt=function(a,c,e){for(var f,g=new b("");c.length;){if(0===a._cache.length&&(a._cache=a._cipher.encryptBlock(a._prev),a._prev=new b("")),!(a._cache.length<=c.length)){g=b.concat([g,d(a,c,e)]);break}f=a._cache.length,g=b.concat([g,d(a,c.slice(0,f),e)]),c=c.slice(f)}return g}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":197}],192:[function(a,b,c){(function(a){function b(a,b,c){for(var e,f,g,h=-1,i=8,j=0;++h<i;)e=a._cipher.encryptBlock(a._prev),f=b&1<<7-h?128:0,g=e[0]^f,j+=(128&g)>>h%8,a._prev=d(a._prev,c?f:g);return j}function d(b,c){var d=b.length,e=-1,f=new a(b.length);for(b=a.concat([b,new a([c])]);++e<d;)f[e]=b[e]<<1|b[e+1]>>7;return f}c.encrypt=function(c,d,e){for(var f=d.length,g=new a(f),h=-1;++h<f;)g[h]=b(c,d[h],e);return g}}).call(this,a("buffer").Buffer)},{buffer:3}],193:[function(a,b,c){(function(a){function b(b,c,d){var e=b._cipher.encryptBlock(b._prev),f=e[0]^c;return b._prev=a.concat([b._prev.slice(1),new a([d?c:f])]),f}c.encrypt=function(c,d,e){for(var f=d.length,g=new a(f),h=-1;++h<f;)g[h]=b(c,d[h],e);return g}}).call(this,a("buffer").Buffer)},{buffer:3}],194:[function(a,b,c){(function(b){function d(a){for(var b,c=a.length;c--;){if(b=a.readUInt8(c),255!==b){b++,a.writeUInt8(b,c);break}a.writeUInt8(0,c)}}function e(a){var b=a._cipher.encryptBlock(a._prev);return d(a._prev),b}var f=a("buffer-xor");c.encrypt=function(a,c){for(;a._cache.length<c.length;)a._cache=b.concat([a._cache,e(a)]);var d=a._cache.slice(0,c.length);return a._cache=a._cache.slice(c.length),f(c,d)}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":197}],195:[function(a,b,c){arguments[4][21][0].apply(c,arguments)},{dup:21}],196:[function(a,b,c){(function(b){function d(a){return a._prev=a._cipher.encryptBlock(a._prev),a._prev}var e=a("buffer-xor");c.encrypt=function(a,c){for(;a._cache.length<c.length;)a._cache=b.concat([a._cache,d(a)]);var f=a._cache.slice(0,c.length);return a._cache=a._cache.slice(c.length),e(c,f)}}).call(this,a("buffer").Buffer)},{buffer:3,"buffer-xor":197}],197:[function(a,b,c){(function(a){b.exports=function(b,c){for(var d=Math.min(b.length,c.length),e=new a(d),f=0;f<d;++f)e[f]=b[f]^c[f];return e}}).call(this,a("buffer").Buffer)},{buffer:3}],198:[function(a,b,c){(function(c){function d(a){e.call(this),this.hashMode="string"==typeof a,this.hashMode?this[a]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var e=a("stream").Transform,f=a("inherits"),g=a("string_decoder").StringDecoder;b.exports=d,f(d,e),d.prototype.update=function(a,b,d){"string"==typeof a&&(a=new c(a,b));var e=this._update(a);return this.hashMode?this:(d&&(e=this._toString(e,d)),e)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(a,b,c){var d;try{this.hashMode?this._update(a):this.push(this._update(a))}catch(e){d=e}finally{c(d)}},d.prototype._flush=function(a){var b;try{this.push(this._final())}catch(c){b=c}finally{a(b)}},d.prototype._finalOrDigest=function(a){var b=this._final()||new c("");return a&&(b=this._toString(b,a,!0)),b},d.prototype._toString=function(a,b,c){if(this._decoder||(this._decoder=new g(b),this._encoding=b),this._encoding!==b)throw new Error("can't switch encodings");var d=this._decoder.write(a);return c&&(d+=this._decoder.end()),d}}).call(this,a("buffer").Buffer)},{buffer:3,inherits:207,stream:226,string_decoder:227}],199:[function(a,b,c){(function(c){function d(a,b,g,h){return this instanceof d?(f.call(this),this._cipher=new e.AES(b),this._prev=new c(g.length),this._cache=new c(""),this._secCache=new c(""),this._decrypt=h,g.copy(this._prev),void(this._mode=a)):new d(a,b,g)}var e=a("./aes"),f=a("cipher-base"),g=a("inherits");g(d,f),b.exports=d,d.prototype._update=function(a){return this._mode.encrypt(this,a,this._decrypt)},d.prototype._final=function(){this._cipher.scrub()}}).call(this,a("buffer").Buffer)},{"./aes":183,buffer:3,"cipher-base":198,inherits:207}],200:[function(a,b,c){(function(c){function d(a,b,d,f){c.isBuffer(a)||(a=new c(a,"binary")),b&&!c.isBuffer(b)&&(b=new c(b,"binary")),d/=8,f=f||0;for(var g,h,i=0,j=0,k=new c(d),l=new c(f),m=0,n=[];;){if(m++>0&&n.push(g),n.push(a),b&&n.push(b),g=e(c.concat(n)),n=[],h=0,d>0)for(;;){if(0===d)break;if(h===g.length)break;k[i++]=g[h],d--,h++}if(f>0&&h!==g.length)for(;;){if(0===f)break;if(h===g.length)break;l[j++]=g[h],f--,h++}if(0===d&&0===f)break}for(h=0;h<g.length;h++)g[h]=0;return{key:k,iv:l}}var e=a("create-hash/md5");b.exports=d}).call(this,a("buffer").Buffer)},{buffer:3,"create-hash/md5":138}],201:[function(a,b,c){(function(c){function d(a,b){var d=(a.modulus,a.modulus.byteLength()),e=(b.length,l("sha1").update(new c("")).digest()),g=e.length;if(0!==b[0])throw new Error("decryption error");var j=b.slice(1,g+1),k=b.slice(g+1),m=i(j,h(k,g)),n=i(k,h(m,d-g-1));if(f(e,n.slice(0,g)))throw new Error("decryption error");for(var o=g;0===n[o];)o++;if(1!==n[o++])throw new Error("decryption error");return n.slice(o)}function e(a,b,c){for(var d=b.slice(0,2),e=2,f=0;0!==b[e++];)if(e>=b.length){f++;break}var g=b.slice(2,e-1);b.slice(e-1,e);if(("0002"!==d.toString("hex")&&!c||"0001"!==d.toString("hex")&&c)&&f++,g.length<8&&f++,f)throw new Error("decryption error");return b.slice(e)}function f(a,b){a=new c(a),b=new c(b);var d=0,e=a.length;a.length!==b.length&&(d++,e=Math.min(a.length,b.length));for(var f=-1;++f<e;)d+=a[f]^b[f];return d}var g=a("parse-asn1"),h=a("./mgf"),i=a("./xor"),j=a("bn.js"),k=a("browserify-rsa"),l=a("create-hash"),m=a("./withPublic");b.exports=function(a,b,f){var h;h=a.padding?a.padding:f?1:4;var i=g(a),l=i.modulus.byteLength();if(b.length>l||new j(b).cmp(i.modulus)>=0)throw new Error("decryption error");var n;n=f?m(new j(b),i):k(b,i);var o=new c(l-n.length);if(o.fill(0),n=c.concat([o,n],l),4===h)return d(i,n);if(1===h)return e(i,n,f);if(3===h)return n;throw new Error("unknown padding")}}).call(this,a("buffer").Buffer)},{"./mgf":160,"./withPublic":203,"./xor":204,"bn.js":161,"browserify-rsa":162,buffer:3,"create-hash":136,"parse-asn1":167}],202:[function(a,b,c){(function(c){function d(a,b){var d=a.modulus.byteLength(),e=b.length,f=i("sha1").update(new c("")).digest(),g=f.length,m=2*g;if(e>d-m-2)throw new Error("message too long");var n=new c(d-e-m-2);n.fill(0);var o=d-g-1,p=h(g),q=k(c.concat([f,n,new c([1]),b],o),j(p,o)),r=k(p,j(q,g));return new l(c.concat([new c([0]),r,q],d))}function e(a,b,d){var e=b.length,g=a.modulus.byteLength();if(e>g-11)throw new Error("message too long");var h;return d?(h=new c(g-e-3),h.fill(255)):h=f(g-e-3),new l(c.concat([new c([0,d?1:2]),h,new c([0]),b],g))}function f(a,b){for(var d,e=new c(a),f=0,g=h(2*a),i=0;f<a;)i===g.length&&(g=h(2*a),i=0),d=g[i++],d&&(e[f++]=d);return e}var g=a("parse-asn1"),h=a("randombytes"),i=a("create-hash"),j=a("./mgf"),k=a("./xor"),l=a("bn.js"),m=a("./withPublic"),n=a("browserify-rsa");b.exports=function(a,b,c){var f;f=a.padding?a.padding:c?1:4;var h,i=g(a);if(4===f)h=d(i,b);else if(1===f)h=e(i,b,c);else{if(3!==f)throw new Error("unknown padding");if(h=new l(b),h.cmp(i.modulus)>=0)throw new Error("data too long for modulus")}return c?n(h,i):m(h,i)}}).call(this,a("buffer").Buffer)},{"./mgf":160,"./withPublic":203,"./xor":204,"bn.js":161,"browserify-rsa":162,buffer:3,"create-hash":136,"parse-asn1":167,randombytes:205}],203:[function(a,b,c){(function(c){function d(a,b){return new c(a.toRed(e.mont(b.modulus)).redPow(new e(b.publicExponent)).fromRed().toArray())}var e=a("bn.js");b.exports=d}).call(this,a("buffer").Buffer)},{"bn.js":161,buffer:3}],204:[function(a,b,c){b.exports=function(a,b){for(var c=a.length,d=-1;++d<c;)a[d]^=b[d];return a}},{}],205:[function(a,b,c){(function(a,c,d){"use strict";function e(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function f(b,e){if(b>65536)throw new Error("requested too many random bytes");var f=new c.Uint8Array(b);b>0&&g.getRandomValues(f);var h=new d(f.buffer);return"function"==typeof e?a.nextTick(function(){e(null,h)}):h}var g=c.crypto||c.msCrypto;g&&g.getRandomValues?b.exports=f:b.exports=e}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer)},{_process:209,buffer:3}],206:[function(a,b,c){
// distribute, sublicense, and/or sell copies of the Software, and to permit
function d(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function e(a){return"function"==typeof a}function f(a){return"number"==typeof a}function g(a){return"object"==typeof a&&null!==a}function h(a){return void 0===a}b.exports=d,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._maxListeners=void 0,d.defaultMaxListeners=10,d.prototype.setMaxListeners=function(a){if(!f(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},d.prototype.emit=function(a){var b,c,d,f,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||g(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;var k=new Error('Uncaught, unspecified "error" event. ('+b+")");throw k.context=b,k}if(c=this._events[a],h(c))return!1;if(e(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),c.apply(this,f)}else if(g(c))for(f=Array.prototype.slice.call(arguments,1),j=c.slice(),d=j.length,i=0;i<d;i++)j[i].apply(this,f);return!0},d.prototype.addListener=function(a,b){var c;if(!e(b))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,e(b.listener)?b.listener:b),this._events[a]?g(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,g(this._events[a])&&!this._events[a].warned&&(c=h(this._maxListeners)?d.defaultMaxListeners:this._maxListeners,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())),this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(d<0)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else if(c)for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.prototype.listenerCount=function(a){if(this._events){var b=this._events[a];if(e(b))return 1;if(b)return b.length}return 0},d.listenerCount=function(a,b){return a.listenerCount(b)}},{}],207:[function(a,b,c){"function"==typeof Object.create?b.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:b.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],208:[function(a,b,c){function d(a){return!!a.constructor&&"function"==typeof a.constructor.isBuffer&&a.constructor.isBuffer(a)}function e(a){return"function"==typeof a.readFloatLE&&"function"==typeof a.slice&&d(a.slice(0,0))}/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
b.exports=function(a){return null!=a&&(d(a)||e(a)||!!a._isBuffer)}},{}],209:[function(a,b,c){function d(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function f(a){if(l===setTimeout)return setTimeout(a,0);if((l===d||!l)&&setTimeout)return l=setTimeout,setTimeout(a,0);try{return l(a,0)}catch(b){try{return l.call(null,a,0)}catch(b){return l.call(this,a,0)}}}function g(a){if(m===clearTimeout)return clearTimeout(a);if((m===e||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(a);try{return m(a)}catch(b){try{return m.call(null,a)}catch(b){return m.call(this,a)}}}function h(){q&&o&&(q=!1,o.length?p=o.concat(p):r=-1,p.length&&i())}function i(){if(!q){var a=f(h);q=!0;for(var b=p.length;b;){for(o=p,p=[];++r<b;)o&&o[r].run();r=-1,b=p.length}o=null,q=!1,g(a)}}function j(a,b){this.fun=a,this.array=b}function k(){}var l,m,n=b.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:d}catch(a){l=d}try{m="function"==typeof clearTimeout?clearTimeout:e}catch(a){m=e}}();var o,p=[],q=!1,r=-1;n.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];p.push(new j(a,b)),1!==p.length||q||f(i)},j.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=k,n.addListener=k,n.once=k,n.off=k,n.removeListener=k,n.removeAllListeners=k,n.emit=k,n.binding=function(a){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(a){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],210:[function(a,b,c){b.exports=a("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":211}],211:[function(a,b,c){"use strict";function d(a){return this instanceof d?(j.call(this,a),k.call(this,a),a&&a.readable===!1&&(this.readable=!1),a&&a.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,a&&a.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",e)):new d(a)}function e(){this.allowHalfOpen||this._writableState.ended||h(f,this)}function f(a){a.end()}var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b};b.exports=d;var h=a("process-nextick-args"),i=a("core-util-is");i.inherits=a("inherits");var j=a("./_stream_readable"),k=a("./_stream_writable");i.inherits(d,j);for(var l=g(k.prototype),m=0;m<l.length;m++){var n=l[m];d.prototype[n]||(d.prototype[n]=k.prototype[n])}},{"./_stream_readable":213,"./_stream_writable":215,"core-util-is":218,inherits:207,"process-nextick-args":220}],212:[function(a,b,c){"use strict";function d(a){return this instanceof d?void e.call(this,a):new d(a)}b.exports=d;var e=a("./_stream_transform"),f=a("core-util-is");f.inherits=a("inherits"),f.inherits(d,e),d.prototype._transform=function(a,b,c){c(null,a)}},{"./_stream_transform":214,"core-util-is":218,inherits:207}],213:[function(a,b,c){(function(c){"use strict";function d(a,b,c){return"function"==typeof a.prependListener?a.prependListener(b,c):void(a._events&&a._events[b]?F(a._events[b])?a._events[b].unshift(c):a._events[b]=[c,a._events[b]]:a.on(b,c))}function e(b,c){D=D||a("./_stream_duplex"),b=b||{},this.objectMode=!!b.objectMode,c instanceof D&&(this.objectMode=this.objectMode||!!b.readableObjectMode);var d=b.highWaterMark,e=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:e,this.highWaterMark=~~this.highWaterMark,this.buffer=new O,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(N||(N=a("string_decoder/").StringDecoder),this.decoder=new N(b.encoding),this.encoding=b.encoding)}function f(b){return D=D||a("./_stream_duplex"),this instanceof f?(this._readableState=new e(b,this),this.readable=!0,b&&"function"==typeof b.read&&(this._read=b.read),void G.call(this)):new f(b)}function g(a,b,c,d,e){var f=k(b,c);if(f)a.emit("error",f);else if(null===c)b.reading=!1,l(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var g=new Error("stream.push() after EOF");a.emit("error",g)}else if(b.endEmitted&&e){var i=new Error("stream.unshift() after end event");a.emit("error",i)}else{var j;!b.decoder||e||d||(c=b.decoder.write(c),j=!b.objectMode&&0===c.length),e||(b.reading=!1),j||(b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&m(a))),o(a,b)}else e||(b.reading=!1);return h(b)}function h(a){return!a.ended&&(a.needReadable||a.length<a.highWaterMark||0===a.length)}function i(a){return a>=P?a=P:(a--,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++),a}function j(a,b){return a<=0||0===b.length&&b.ended?0:b.objectMode?1:a!==a?b.flowing&&b.length?b.buffer.head.data.length:b.length:(a>b.highWaterMark&&(b.highWaterMark=i(a)),a<=b.length?a:b.ended?b.length:(b.needReadable=!0,0))}function k(a,b){var c=null;return I.isBuffer(b)||"string"==typeof b||null===b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function l(a,b){if(!b.ended){if(b.decoder){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,m(a)}}function m(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(M("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?E(n,a):n(a))}function n(a){M("emit readable"),a.emit("readable"),u(a)}function o(a,b){b.readingMore||(b.readingMore=!0,E(p,a,b))}function p(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length<b.highWaterMark&&(M("maybeReadMore read 0"),a.read(0),c!==b.length);)c=b.length;b.readingMore=!1}function q(a){return function(){var b=a._readableState;M("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&H(a,"data")&&(b.flowing=!0,u(a))}}function r(a){M("readable nexttick read 0"),a.read(0)}function s(a,b){b.resumeScheduled||(b.resumeScheduled=!0,E(t,a,b))}function t(a,b){b.reading||(M("resume read 0"),a.read(0)),b.resumeScheduled=!1,b.awaitDrain=0,a.emit("resume"),u(a),b.flowing&&!b.reading&&a.read(0)}function u(a){var b=a._readableState;for(M("flow",b.flowing);b.flowing&&null!==a.read(););}function v(a,b){if(0===b.length)return null;var c;return b.objectMode?c=b.buffer.shift():!a||a>=b.length?(c=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),b.buffer.clear()):c=w(a,b.buffer,b.decoder),c}function w(a,b,c){var d;return a<b.head.data.length?(d=b.head.data.slice(0,a),b.head.data=b.head.data.slice(a)):d=a===b.head.data.length?b.shift():c?x(a,b):y(a,b),d}function x(a,b){var c=b.head,d=1,e=c.data;for(a-=e.length;c=c.next;){var f=c.data,g=a>f.length?f.length:a;if(e+=g===f.length?f:f.slice(0,a),a-=g,0===a){g===f.length?(++d,c.next?b.head=c.next:b.head=b.tail=null):(b.head=c,c.data=f.slice(g));break}++d}return b.length-=d,e}function y(a,b){var c=J.allocUnsafe(a),d=b.head,e=1;for(d.data.copy(c),a-=d.data.length;d=d.next;){var f=d.data,g=a>f.length?f.length:a;if(f.copy(c,c.length-a,0,g),a-=g,0===a){g===f.length?(++e,d.next?b.head=d.next:b.head=b.tail=null):(b.head=d,d.data=f.slice(g));break}++e}return b.length-=e,c}function z(a){var b=a._readableState;if(b.length>0)throw new Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,E(A,b,a))}function A(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function B(a,b){for(var c=0,d=a.length;c<d;c++)b(a[c],c)}function C(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}b.exports=f;var D,E=a("process-nextick-args"),F=a("isarray");f.ReadableState=e;var G,H=(a("events").EventEmitter,function(a,b){return a.listeners(b).length});!function(){try{G=a("stream")}catch(b){}finally{G||(G=a("events").EventEmitter)}}();var I=a("buffer").Buffer,J=a("buffer-shims"),K=a("core-util-is");K.inherits=a("inherits");var L=a("util"),M=void 0;M=L&&L.debuglog?L.debuglog("stream"):function(){};var N,O=a("./internal/streams/BufferList");K.inherits(f,G),f.prototype.push=function(a,b){var c=this._readableState;return c.objectMode||"string"!=typeof a||(b=b||c.defaultEncoding,b!==c.encoding&&(a=J.from(a,b),b="")),g(this,c,a,b,!1)},f.prototype.unshift=function(a){var b=this._readableState;return g(this,b,a,"",!0)},f.prototype.isPaused=function(){return this._readableState.flowing===!1},f.prototype.setEncoding=function(b){return N||(N=a("string_decoder/").StringDecoder),this._readableState.decoder=new N(b),this._readableState.encoding=b,this};var P=8388608;f.prototype.read=function(a){M("read",a),a=parseInt(a,10);var b=this._readableState,c=a;if(0!==a&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return M("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?z(this):m(this),null;if(a=j(a,b),0===a&&b.ended)return 0===b.length&&z(this),null;var d=b.needReadable;M("need readable",d),(0===b.length||b.length-a<b.highWaterMark)&&(d=!0,M("length less than watermark",d)),b.ended||b.reading?(d=!1,M("reading or ended",d)):d&&(M("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1,b.reading||(a=j(c,b)));var e;return e=a>0?v(a,b):null,null===e?(b.needReadable=!0,a=0):b.length-=a,0===b.length&&(b.ended||(b.needReadable=!0),c!==a&&b.ended&&z(this)),null!==e&&this.emit("data",e),e},f.prototype._read=function(a){this.emit("error",new Error("_read() is not implemented"))},f.prototype.pipe=function(a,b){function e(a){M("onunpipe"),a===m&&g()}function f(){M("onend"),a.end()}function g(){M("cleanup"),a.removeListener("close",j),a.removeListener("finish",k),a.removeListener("drain",r),a.removeListener("error",i),a.removeListener("unpipe",e),m.removeListener("end",f),m.removeListener("end",g),m.removeListener("data",h),s=!0,!n.awaitDrain||a._writableState&&!a._writableState.needDrain||r()}function h(b){M("ondata"),t=!1;var c=a.write(b);!1!==c||t||((1===n.pipesCount&&n.pipes===a||n.pipesCount>1&&C(n.pipes,a)!==-1)&&!s&&(M("false write response, pause",m._readableState.awaitDrain),m._readableState.awaitDrain++,t=!0),m.pause())}function i(b){M("onerror",b),l(),a.removeListener("error",i),0===H(a,"error")&&a.emit("error",b)}function j(){a.removeListener("finish",k),l()}function k(){M("onfinish"),a.removeListener("close",j),l()}function l(){M("unpipe"),m.unpipe(a)}var m=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=a;break;case 1:n.pipes=[n.pipes,a];break;default:n.pipes.push(a)}n.pipesCount+=1,M("pipe count=%d opts=%j",n.pipesCount,b);var o=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,p=o?f:g;n.endEmitted?E(p):m.once("end",p),a.on("unpipe",e);var r=q(m);a.on("drain",r);var s=!1,t=!1;return m.on("data",h),d(a,"error",i),a.once("close",j),a.once("finish",k),a.emit("pipe",m),n.flowing||(M("pipe resume"),m.resume()),a},f.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;e<d;e++)c[e].emit("unpipe",this);return this}var f=C(b.pipes,a);return f===-1?this:(b.pipes.splice(f,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},f.prototype.on=function(a,b){var c=G.prototype.on.call(this,a,b);if("data"===a)this._readableState.flowing!==!1&&this.resume();else if("readable"===a){var d=this._readableState;d.endEmitted||d.readableListening||(d.readableListening=d.needReadable=!0,d.emittedReadable=!1,d.reading?d.length&&m(this,d):E(r,this))}return c},f.prototype.addListener=f.prototype.on,f.prototype.resume=function(){var a=this._readableState;return a.flowing||(M("resume"),a.flowing=!0,s(this,a)),this},f.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this},f.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(M("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(M("wrapped data"),b.decoder&&(e=b.decoder.write(e)),(!b.objectMode||null!==e&&void 0!==e)&&(b.objectMode||e&&e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)void 0===this[e]&&"function"==typeof a[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return B(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){M("wrapped _read",b),c&&(c=!1,a.resume())},d},f._fromList=v}).call(this,a("_process"))},{"./_stream_duplex":211,"./internal/streams/BufferList":216,_process:209,buffer:3,"buffer-shims":217,"core-util-is":218,events:206,inherits:207,isarray:219,"process-nextick-args":220,"string_decoder/":227,util:2}],214:[function(a,b,c){"use strict";function d(a){this.afterTransform=function(b,c){return e(a,b,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length<f.highWaterMark)&&a._read(f.highWaterMark)}function f(a){if(!(this instanceof f))return new f(a);h.call(this,a),this._transformState=new d(this);var b=this;this._readableState.needReadable=!0,this._readableState.sync=!1,a&&("function"==typeof a.transform&&(this._transform=a.transform),"function"==typeof a.flush&&(this._flush=a.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(a,c){g(b,a,c)}):g(b)})}function g(a,b,c){if(b)return a.emit("error",b);null!==c&&void 0!==c&&a.push(c);var d=a._writableState,e=a._transformState;if(d.length)throw new Error("Calling transform done when ws.length != 0");if(e.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}b.exports=f;var h=a("./_stream_duplex"),i=a("core-util-is");i.inherits=a("inherits"),i.inherits(f,h),f.prototype.push=function(a,b){return this._transformState.needTransform=!1,h.prototype.push.call(this,a,b)},f.prototype._transform=function(a,b,c){throw new Error("_transform() is not implemented")},f.prototype._write=function(a,b,c){var d=this._transformState;if(d.writecb=c,d.writechunk=a,d.writeencoding=b,!d.transforming){var e=this._readableState;(d.needTransform||e.needReadable||e.length<e.highWaterMark)&&this._read(e.highWaterMark)}},f.prototype._read=function(a){var b=this._transformState;null!==b.writechunk&&b.writecb&&!b.transforming?(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform)):b.needTransform=!0}},{"./_stream_duplex":211,"core-util-is":218,inherits:207}],215:[function(a,b,c){(function(c){"use strict";function d(){}function e(a,b,c){this.chunk=a,this.encoding=b,this.callback=c,this.next=null}function f(b,c){x=x||a("./_stream_duplex"),b=b||{},this.objectMode=!!b.objectMode,c instanceof x&&(this.objectMode=this.objectMode||!!b.writableObjectMode);var d=b.highWaterMark,e=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:e,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var f=b.decodeStrings===!1;this.decodeStrings=!f,this.defaultEncoding=b.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){o(c,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}function g(b){return x=x||a("./_stream_duplex"),F.call(g,this)||this instanceof x?(this._writableState=new f(b,this),this.writable=!0,b&&("function"==typeof b.write&&(this._write=b.write),"function"==typeof b.writev&&(this._writev=b.writev)),void B.call(this)):new g(b)}function h(a,b){var c=new Error("write after end");a.emit("error",c),y(b,c)}function i(a,b,c,d){var e=!0,f=!1;return null===c?f=new TypeError("May not write null values to stream"):"string"==typeof c||void 0===c||b.objectMode||(f=new TypeError("Invalid non-string/buffer chunk")),f&&(a.emit("error",f),y(d,f),e=!1),e}function j(a,b,c){return a.objectMode||a.decodeStrings===!1||"string"!=typeof b||(b=E.from(b,c)),b}function k(a,b,c,d,f,g){c||(d=j(b,d,f),D.isBuffer(d)&&(f="buffer"));var h=b.objectMode?1:d.length;b.length+=h;var i=b.length<b.highWaterMark;if(i||(b.needDrain=!0),b.writing||b.corked){var k=b.lastBufferedRequest;b.lastBufferedRequest=new e(d,f,g),k?k.next=b.lastBufferedRequest:b.bufferedRequest=b.lastBufferedRequest,b.bufferedRequestCount+=1}else l(a,b,!1,h,d,f,g);return i}function l(a,b,c,d,e,f,g){b.writelen=d,b.writecb=g,b.writing=!0,b.sync=!0,c?a._writev(e,b.onwrite):a._write(e,f,b.onwrite),b.sync=!1}function m(a,b,c,d,e){--b.pendingcb,c?y(e,d):e(d),a._writableState.errorEmitted=!0,a.emit("error",d)}function n(a){a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0}function o(a,b){var c=a._writableState,d=c.sync,e=c.writecb;if(n(c),b)m(a,c,d,b,e);else{var f=s(c);f||c.corked||c.bufferProcessing||!c.bufferedRequest||r(a,c),d?z(p,a,c,f,e):p(a,c,f,e)}}function p(a,b,c,d){c||q(a,b),b.pendingcb--,d(),u(a,b)}function q(a,b){0===b.length&&b.needDrain&&(b.needDrain=!1,a.emit("drain"))}function r(a,b){b.bufferProcessing=!0;var c=b.bufferedRequest;if(a._writev&&c&&c.next){var d=b.bufferedRequestCount,e=new Array(d),f=b.corkedRequestsFree;f.entry=c;for(var g=0;c;)e[g]=c,c=c.next,g+=1;l(a,b,!0,b.length,e,"",f.finish),b.pendingcb++,b.lastBufferedRequest=null,f.next?(b.corkedRequestsFree=f.next,f.next=null):b.corkedRequestsFree=new w(b)}else{for(;c;){var h=c.chunk,i=c.encoding,j=c.callback,k=b.objectMode?1:h.length;if(l(a,b,!1,k,h,i,j),c=c.next,b.writing)break}null===c&&(b.lastBufferedRequest=null)}b.bufferedRequestCount=0,b.bufferedRequest=c,b.bufferProcessing=!1}function s(a){return a.ending&&0===a.length&&null===a.bufferedRequest&&!a.finished&&!a.writing}function t(a,b){b.prefinished||(b.prefinished=!0,a.emit("prefinish"))}function u(a,b){var c=s(b);return c&&(0===b.pendingcb?(t(a,b),b.finished=!0,a.emit("finish")):t(a,b)),c}function v(a,b,c){b.ending=!0,u(a,b),c&&(b.finished?y(c):a.once("finish",c)),b.ended=!0,a.writable=!1}function w(a){var b=this;this.next=null,this.entry=null,this.finish=function(c){var d=b.entry;for(b.entry=null;d;){var e=d.callback;a.pendingcb--,e(c),d=d.next}a.corkedRequestsFree?a.corkedRequestsFree.next=b:a.corkedRequestsFree=b}}b.exports=g;var x,y=a("process-nextick-args"),z=!c.browser&&["v0.10","v0.9."].indexOf(c.version.slice(0,5))>-1?setImmediate:y;g.WritableState=f;var A=a("core-util-is");A.inherits=a("inherits");var B,C={deprecate:a("util-deprecate")};!function(){try{B=a("stream")}catch(b){}finally{B||(B=a("events").EventEmitter)}}();var D=a("buffer").Buffer,E=a("buffer-shims");A.inherits(g,B),f.prototype.getBuffer=function(){for(var a=this.bufferedRequest,b=[];a;)b.push(a),a=a.next;return b},function(){try{Object.defineProperty(f.prototype,"buffer",{get:C.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(a){}}();var F;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(F=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(a){return!!F.call(this,a)||a&&a._writableState instanceof f}})):F=function(a){return a instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(a,b,c){var e=this._writableState,f=!1,g=D.isBuffer(a);return"function"==typeof b&&(c=b,b=null),g?b="buffer":b||(b=e.defaultEncoding),"function"!=typeof c&&(c=d),e.ended?h(this,c):(g||i(this,e,a,c))&&(e.pendingcb++,f=k(this,e,g,a,b,c)),f},g.prototype.cork=function(){var a=this._writableState;a.corked++},g.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,a.writing||a.corked||a.finished||a.bufferProcessing||!a.bufferedRequest||r(this,a))},g.prototype.setDefaultEncoding=function(a){if("string"==typeof a&&(a=a.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((a+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+a);return this._writableState.defaultEncoding=a,this},g.prototype._write=function(a,b,c){c(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(a,b,c){var d=this._writableState;"function"==typeof a?(c=a,a=null,b=null):"function"==typeof b&&(c=b,b=null),null!==a&&void 0!==a&&this.write(a,b),d.corked&&(d.corked=1,this.uncork()),d.ending||d.finished||v(this,d,c)}}).call(this,a("_process"))},{"./_stream_duplex":211,_process:209,buffer:3,"buffer-shims":217,"core-util-is":218,events:206,inherits:207,"process-nextick-args":220,"util-deprecate":221}],216:[function(a,b,c){"use strict";function d(){this.head=null,this.tail=null,this.length=0}var e=(a("buffer").Buffer,a("buffer-shims"));b.exports=d,d.prototype.push=function(a){var b={data:a,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},d.prototype.unshift=function(a){var b={data:a,next:this.head};0===this.length&&(this.tail=b),this.head=b,++this.length},d.prototype.shift=function(){if(0!==this.length){var a=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},d.prototype.clear=function(){this.head=this.tail=null,this.length=0},d.prototype.join=function(a){if(0===this.length)return"";for(var b=this.head,c=""+b.data;b=b.next;)c+=a+b.data;return c},d.prototype.concat=function(a){if(0===this.length)return e.alloc(0);if(1===this.length)return this.head.data;for(var b=e.allocUnsafe(a>>>0),c=this.head,d=0;c;)c.data.copy(b,d),d+=c.data.length,c=c.next;return b}},{buffer:3,"buffer-shims":217}],217:[function(a,b,c){(function(b){"use strict";var d=a("buffer"),e=d.Buffer,f=d.SlowBuffer,g=d.kMaxLength||2147483647;c.alloc=function(a,b,c){if("function"==typeof e.alloc)return e.alloc(a,b,c);if("number"==typeof c)throw new TypeError("encoding must not be number");if("number"!=typeof a)throw new TypeError("size must be a number");if(a>g)throw new RangeError("size is too large");var d=c,f=b;void 0===f&&(d=void 0,f=0);var h=new e(a);if("string"==typeof f)for(var i=new e(f,d),j=i.length,k=-1;++k<a;)h[k]=i[k%j];else h.fill(f);return h},c.allocUnsafe=function(a){if("function"==typeof e.allocUnsafe)return e.allocUnsafe(a);if("number"!=typeof a)throw new TypeError("size must be a number");if(a>g)throw new RangeError("size is too large");return new e(a)},c.from=function(a,c,d){if("function"==typeof e.from&&(!b.Uint8Array||Uint8Array.from!==e.from))return e.from(a,c,d);if("number"==typeof a)throw new TypeError('"value" argument must not be a number');if("string"==typeof a)return new e(a,c);if("undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer){var f=c;if(1===arguments.length)return new e(a);"undefined"==typeof f&&(f=0);var g=d;if("undefined"==typeof g&&(g=a.byteLength-f),f>=a.byteLength)throw new RangeError("'offset' is out of bounds");if(g>a.byteLength-f)throw new RangeError("'length' is out of bounds");return new e(a.slice(f,f+g))}if(e.isBuffer(a)){var h=new e(a.length);return a.copy(h,0,0,a.length),h}if(a){if(Array.isArray(a)||"undefined"!=typeof ArrayBuffer&&a.buffer instanceof ArrayBuffer||"length"in a)return new e(a);if("Buffer"===a.type&&Array.isArray(a.data))return new e(a.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},c.allocUnsafeSlow=function(a){if("function"==typeof e.allocUnsafeSlow)return e.allocUnsafeSlow(a);if("number"!=typeof a)throw new TypeError("size must be a number");if(a>=g)throw new RangeError("size is too large");return new f(a)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:3}],218:[function(a,b,c){(function(a){
// distribute, sublicense, and/or sell copies of the Software, and to permit
function b(a){return Array.isArray?Array.isArray(a):"[object Array]"===q(a)}function d(a){return"boolean"==typeof a}function e(a){return null===a}function f(a){return null==a}function g(a){return"number"==typeof a}function h(a){return"string"==typeof a}function i(a){return"symbol"==typeof a}function j(a){return void 0===a}function k(a){return"[object RegExp]"===q(a)}function l(a){return"object"==typeof a&&null!==a}function m(a){return"[object Date]"===q(a)}function n(a){return"[object Error]"===q(a)||a instanceof Error}function o(a){return"function"==typeof a}function p(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function q(a){return Object.prototype.toString.call(a)}c.isArray=b,c.isBoolean=d,c.isNull=e,c.isNullOrUndefined=f,c.isNumber=g,c.isString=h,c.isSymbol=i,c.isUndefined=j,c.isRegExp=k,c.isObject=l,c.isDate=m,c.isError=n,c.isFunction=o,c.isPrimitive=p,c.isBuffer=a.isBuffer}).call(this,{isBuffer:a("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":208}],219:[function(a,b,c){arguments[4][6][0].apply(c,arguments)},{dup:6}],220:[function(a,b,c){(function(a){"use strict";function c(b,c,d,e){if("function"!=typeof b)throw new TypeError('"callback" argument must be a function');var f,g,h=arguments.length;switch(h){case 0:case 1:return a.nextTick(b);case 2:return a.nextTick(function(){b.call(null,c)});case 3:return a.nextTick(function(){b.call(null,c,d)});case 4:return a.nextTick(function(){b.call(null,c,d,e)});default:for(f=new Array(h-1),g=0;g<f.length;)f[g++]=arguments[g];return a.nextTick(function(){b.apply(null,f)})}}!a.version||0===a.version.indexOf("v0.")||0===a.version.indexOf("v1.")&&0!==a.version.indexOf("v1.8.")?b.exports=c:b.exports=a.nextTick}).call(this,a("_process"))},{_process:209}],221:[function(a,b,c){(function(a){function c(a,b){function c(){if(!e){if(d("throwDeprecation"))throw new Error(b);d("traceDeprecation")?console.trace(b):console.warn(b),e=!0}return a.apply(this,arguments)}if(d("noDeprecation"))return a;var e=!1;return c}function d(b){try{if(!a.localStorage)return!1}catch(c){return!1}var d=a.localStorage[b];return null!=d&&"true"===String(d).toLowerCase()}b.exports=c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],222:[function(a,b,c){b.exports=a("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":212}],223:[function(a,b,c){(function(d){var e=function(){try{return a("stream")}catch(b){}}();c=b.exports=a("./lib/_stream_readable.js"),c.Stream=e||c,c.Readable=c,c.Writable=a("./lib/_stream_writable.js"),c.Duplex=a("./lib/_stream_duplex.js"),c.Transform=a("./lib/_stream_transform.js"),c.PassThrough=a("./lib/_stream_passthrough.js"),!d.browser&&"disable"===d.env.READABLE_STREAM&&e&&(b.exports=e)}).call(this,a("_process"))},{"./lib/_stream_duplex.js":211,"./lib/_stream_passthrough.js":212,"./lib/_stream_readable.js":213,"./lib/_stream_transform.js":214,"./lib/_stream_writable.js":215,_process:209}],224:[function(a,b,c){b.exports=a("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":214}],225:[function(a,b,c){b.exports=a("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":215}],226:[function(a,b,c){function d(){e.call(this)}
// distribute, sublicense, and/or sell copies of the Software, and to permit
b.exports=d;var e=a("events").EventEmitter,f=a("inherits");f(d,e),d.Readable=a("readable-stream/readable.js"),d.Writable=a("readable-stream/writable.js"),d.Duplex=a("readable-stream/duplex.js"),d.Transform=a("readable-stream/transform.js"),d.PassThrough=a("readable-stream/passthrough.js"),d.Stream=d,d.prototype.pipe=function(a,b){function c(b){a.writable&&!1===a.write(b)&&j.pause&&j.pause()}function d(){j.readable&&j.resume&&j.resume()}function f(){k||(k=!0,a.end())}function g(){k||(k=!0,"function"==typeof a.destroy&&a.destroy())}function h(a){if(i(),0===e.listenerCount(this,"error"))throw a}function i(){j.removeListener("data",c),a.removeListener("drain",d),j.removeListener("end",f),j.removeListener("close",g),j.removeListener("error",h),a.removeListener("error",h),j.removeListener("end",i),j.removeListener("close",i),a.removeListener("close",i)}var j=this;j.on("data",c),a.on("drain",d),a._isStdio||b&&b.end===!1||(j.on("end",f),j.on("close",g));var k=!1;return j.on("error",h),a.on("error",h),j.on("end",i),j.on("close",i),a.on("close",i),a.emit("pipe",j),a}},{events:206,inherits:207,"readable-stream/duplex.js":210,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],227:[function(a,b,c){function d(a){if(a&&!i(a))throw new Error("Unknown encoding: "+a)}function e(a){return a.toString(this.encoding)}function f(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function g(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}
// distribute, sublicense, and/or sell copies of the Software, and to permit
var h=a("buffer").Buffer,i=h.isEncoding||function(a){switch(a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},j=c.StringDecoder=function(a){switch(this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),d(a),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:return void(this.write=e)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};j.prototype.write=function(a){for(var b="";this.charLength;){var c=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived<this.charLength)return"";a=a.slice(c,a.length),b=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var d=b.charCodeAt(b.length-1);if(!(d>=55296&&d<=56319)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&d<=56319){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(b<=2&&c>>4==14){this.charLength=3;break}if(b<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{buffer:3}],228:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(a){if(Object.keys)return Object.keys(a);var b=[];for(var c in a)b.push(c);return b},forEach=function(a,b){if(a.forEach)return a.forEach(b);for(var c=0;c<a.length;c++)b(a[c],c,a)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(a,b,c){Object.defineProperty(a,b,{writable:!0,enumerable:!1,configurable:!0,value:c})}}catch(a){return function(a,b,c){a[b]=c}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];Context.prototype={};var Script=exports.Script=function(a){return this instanceof Script?void(this.code=a):new Script(a)};Script.prototype.runInContext=function(a){if(!(a instanceof Context))throw new TypeError("needs a 'context' argument.");var b=document.createElement("iframe");b.style||(b.style={}),b.style.display="none",document.body.appendChild(b);var c=b.contentWindow,d=c.eval,e=c.execScript;!d&&e&&(e.call(c,"null"),d=c.eval),forEach(Object_keys(a),function(b){c[b]=a[b]}),forEach(globals,function(b){a[b]&&(c[b]=a[b])});var f=Object_keys(c),g=d.call(c,this.code);return forEach(Object_keys(c),function(b){(b in a||indexOf(f,b)===-1)&&(a[b]=c[b])}),forEach(globals,function(b){b in a||defineProp(a,b,c[b])}),document.body.removeChild(b),g},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(a){var b=Script.createContext(a),c=this.runInContext(b);return forEach(Object_keys(b),function(c){a[c]=b[c]}),c},forEach(Object_keys(Script.prototype),function(a){exports[a]=Script[a]=function(b){var c=Script(b);return c[a].apply(c,[].slice.call(arguments,1))}}),exports.createScript=function(a){return exports.Script(a)},exports.createContext=Script.createContext=function(a){var b=new Context;return"object"==typeof a&&forEach(Object_keys(a),function(c){b[c]=a[c]}),b}},{indexof:229}],229:[function(a,b,c){var d=[].indexOf;b.exports=function(a,b){if(d)return a.indexOf(b);for(var c=0;c<a.length;++c)if(a[c]===b)return c;return-1}},{}],230:[function(a,b,c){b.exports={BZ2:{name:"UniFi AP",type:"uap",features:{zh:!0}},BZ2LR:{name:"UniFi AP-LR",type:"uap",features:{zh:!0}},U2HSR:{name:"UniFi AP-Outdoor+",type:"uap",features:{zh:!0}},U2IW:{name:"UniFi AP-In Wall",type:"uap",hybrid:"uap+usw",features:{zh:!0},ports:{standard:2}},U2L48:{name:"UniFi AP-LR",type:"uap"},U2Lv2:{name:"UniFi AP-LR v2",type:"uap"},U2M:{name:"UniFi AP-Mini",type:"uap"},U2O:{name:"UniFi AP-Outdoor",type:"uap",features:{zh:!0}},U2S48:{name:"UniFi AP",type:"uap"},U2Sv2:{name:"UniFi AP v2",type:"uap"},U5O:{name:"UniFi AP-Outdoor 5G",type:"uap",features:{dfs:!0,zh:!0}},U7E:{name:"UniFi AP-AC",type:"uap",features:{ac:!0,brcm:!0}},U7EDU:{name:"UniFi AP-AC-EDU",type:"uap",features:{gen:2,ac:!0,bandsteer:!0}},U7Ev2:{name:"UniFi AP-AC v2",type:"uap",features:{ac:!0,brcm:!0}},U7HD:{name:"UniFi AP-AC-HD",type:"uap",features:{gen:2,ac:!0,bandsteer:!0}},U7IW:{name:"UniFi AP-AC-In Wall",type:"uap",ports:{standard:2},features:{gen:2,ac:!0,bandsteer:!0}},U7MP:{name:"UniFi AP-AC-Mesh-Pro",type:"uap",features:{gen:2,ac:!0,bandsteer:!0}},U7LR:{name:"UniFi AP-AC-LR",type:"uap",features:{gen:2,ac:!0,bandsteer:!0}},U7LT:{name:"UniFi AP-AC-Lite",type:"uap",features:{gen:2,ac:!0,bandsteer:!0}},U7O:{name:"UniFi AP-AC Outdoor",type:"uap",features:{ac:!0,brcm:!0}},U7P:{name:"UniFi AP-Pro",type:"uap",features:{dfs:!0,bandsteer:!0,zh:!0}},U7MSH:{name:"UniFi AP-AC-Mesh",type:"uap",features:{gen:2,ac:!0,bandsteer:!0}},U7PG2:{name:"UniFi AP-AC-Pro",type:"uap",features:{gen:2,ac:!0,bandsteer:!0}},p2N:{name:"PicoStation M2",type:"uap",features:{zh:!0}},US8:{name:"UniFi Switch 8",type:"usw",features:{poe:!0},ports:{standard:8}},US8P60:{name:"UniFi Switch 8 POE-60W",type:"usw",features:{poe:!0},ports:{standard:8}},US8P150:{name:"UniFi Switch 8 POE-150W",type:"usw",features:{poe:!0},ports:{standard:8,sfp:[9,10]}},US16P150:{name:"UniFi Switch 16 POE-150W",type:"usw",features:{poe:!0,fan:"simple"},ports:{standard:16,sfp:[17,18]}},US24:{name:"UniFi Switch 24",type:"usw",features:{fan:"simple"},ports:{standard:24,sfp:[25,26]}},US24P250:{name:"UniFi Switch 24 POE-250W",type:"usw",features:{poe:!0,fan:"alwayson"},ports:{standard:24,sfp:[25,26]}},US24P500:{name:"UniFi Switch 24 POE-500W",type:"usw",features:{poe:!0,fan:"alwayson"},ports:{standard:24,sfp:[25,26]}},US48:{name:"UniFi Switch 48",type:"usw",features:{fan:"simple"},ports:{standard:48,sfp:[51,52],plus:[49,50]}},US48P500:{name:"UniFi Switch 48 POE-500W",type:"usw",features:{poe:!0,fan:"alwayson"},ports:{standard:48,sfp:[51,52],plus:[49,50]}},US48P750:{name:"UniFi Switch 48 POE-750W",type:"usw",features:{poe:!0,fan:"alwayson"},ports:{standard:48,sfp:[51,52],plus:[49,50]}},USXG:{name:"UniFi Switch XG",type:"usw",ports:{plus:"1-12",standard:"13-16"},diagram:["01 03 05 07 09 11 __ __ __ __ __","02 04 06 08 10 12 __ 13 14 15 16"]},UGW3:{name:"UniFi Security Gateway 3P",type:"ugw",ports:["wan","lan","voip"],remap:{voip:{to:"wan2",pref:"ugw3_wan2_enabled"}}},UGW4:{name:"UniFi Security Gateway 4P",type:"ugw",ports:["lan","voip","wan","wan2"],remap:{voip:{to:"lan2",superficial:!0}}},UGW8:{name:"UniFi Security Gateway 8P",type:"ugw",ports:["lan","lan2","lan3","lan4","lan5","voip","wan","wan2"]},UP4:{name:"UniFi Phone-X",type:"uph"},UP5:{name:"UniFi Phone",type:"uph"},UP5t:{name:"UniFi Phone-Pro",type:"uph"},UP7:{name:"UniFi Phone-Executive",type:"uph"},UP5c:{name:"UniFi Phone",type:"uph"},UP5tc:{name:"UniFi Phone-Pro",type:"uph"},UP7c:{name:"UniFi Phone-Executive",type:"uph"}}},{}],231:[function(a,b,c){b.exports=["af","af_ZA","ar","ar_AE","ar_BH","ar_DZ","ar_EG","ar_IQ","ar_JO","ar_KW","ar_LB","ar_LY","ar_MA","ar_OM","ar_QA","ar_SA","ar_SY","ar_TN","ar_YE","az","az_AZ","be","be_BY","bg","bg_BG","bs","bs_BA","ca","ca_ES","cs","cs_CZ","cy","cy_GB","da","da_DK","de","de_AT","de_CH","de_DE","de_LI","de_LU","dv","dv_MV","el","el_GR","en","en_AU","en_BZ","en_CA","en_CB","en_GB","en_IE","en_JM","en_NZ","en_PH","en_TT","en_US","en_ZA","en_ZW","eo","es","es_AR","es_BO","es_CL","es_CO","es_CR","es_DO","es_EC","es_ES","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PR","es_PY","es_SV","es_UY","es_VE","et","et_EE","eu","eu_ES","fa","fa_IR","fi","fi_FI","fo","fo_FO","fr","fr_BE","fr_CA","fr_CH","fr_FR","fr_LU","fr_MC","gl","gl_ES","gu","gu_IN","he","he_IL","hi","hi_IN","hr","hr_BA","hr_HR","hu","hu_HU","hy","hy_AM","id","id_ID","is","is_IS","it","it_CH","it_IT","ja","ja_JP","ka","ka_GE","kk","kk_KZ","kn","kn_IN","ko","ko_KR","kok","kok_IN","ky","ky_KG","lt","lt_LT","lv","lv_LV","mi","mi_NZ","mk","mk_MK","mn","mn_MN","mr","mr_IN","ms","ms_BN","ms_MY","mt","mt_MT","nb","nb_NO","nl","nl_BE","nl_NL","nn","nn_NO","ns","ns_ZA","pa","pa_IN","pl","pl_PL","ps","ps_AF","pt","pt_BR","pt_PT","qu","qu_BO","qu_EC","qu_PE","ro","ro_RO","ru","ru_RU","sa","sa_IN","se","se_FI","se_NO","se_SE","sk","sk_SK","sl","sl_SI","sq","sq_AL","sr","sr_BA","sr_SP","sv","sv_FI","sv_SE","sw","sw_KE","syr","syr_SY","ta","ta_IN","te","te_IN","th","th_TH","tl","tl_PH","tn","tn_ZA","tr","tr_TR","tt","tt_RU","ts","uk","uk_UA","ur","ur_PK","uz","uz_UZ","vi","vi_VN","xh","xh_ZA","zh","zh_CN","zh_HK","zh_MO","zh_SG","zh_TW","zu","zu_ZA"]},{}],232:[function(a,b,c){(function(d){!function(a){if("object"==typeof c&&"undefined"!=typeof b)b.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof d?d:"undefined"!=typeof self?self:this,e.jade=a()}}(function(){return function b(c,d,e){function f(h,i){if(!d[h]){if(!c[h]){var j="function"==typeof a&&a;if(!i&&j)return j(h,!0);if(g)return g(h,!0);var k=new Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k}var l=d[h]={exports:{}};c[h][0].call(l.exports,function(a){var b=c[h][1][a];return f(b?b:a)},l,l.exports,b,c,d,e)}return d[h].exports}for(var g="function"==typeof a&&a,h=0;h<e.length;h++)f(e[h]);return f}({1:[function(a,b,c){"use strict";function d(a){return null!=a&&""!==a}function e(a){return(Array.isArray(a)?a.map(e):a&&"object"==typeof a?Object.keys(a).filter(function(b){return a[b]}):[a]).filter(d).join(" ")}function f(a){return h[a]||a}function g(a){var b=String(a).replace(i,f);return b===""+a?a:b}c.merge=function j(a,b){if(1===arguments.length){for(var c=a[0],e=1;e<a.length;e++)c=j(c,a[e]);return c}var f=a["class"],g=b["class"];(f||g)&&(f=f||[],g=g||[],Array.isArray(f)||(f=[f]),Array.isArray(g)||(g=[g]),a["class"]=f.concat(g).filter(d));for(var h in b)"class"!=h&&(a[h]=b[h]);return a},c.joinClasses=e,c.cls=function(a,b){for(var d=[],f=0;f<a.length;f++)b&&b[f]?d.push(c.escape(e([a[f]]))):d.push(e(a[f]));var g=e(d);return g.length?' class="'+g+'"':""},c.style=function(a){return a&&"object"==typeof a?Object.keys(a).map(function(b){return b+":"+a[b]}).join(";"):a},c.attr=function(a,b,d,e){return"style"===a&&(b=c.style(b)),"boolean"==typeof b||null==b?b?" "+(e?a:a+'="'+a+'"'):"":0==a.indexOf("data")&&"string"!=typeof b?(JSON.stringify(b).indexOf("&")!==-1&&console.warn("Since Jade 2.0.0, ampersands (`&`) in data attributes will be escaped to `&amp;`"),b&&"function"==typeof b.toISOString&&console.warn("Jade will eliminate the double quotes around dates in ISO form after 2.0.0")," "+a+"='"+JSON.stringify(b).replace(/'/g,"&apos;")+"'"):d?(b&&"function"==typeof b.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+a+'="'+c.escape(b)+'"'):(b&&"function"==typeof b.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+a+'="'+b+'"')},c.attrs=function(a,b){var d=[],f=Object.keys(a);if(f.length)for(var g=0;g<f.length;++g){var h=f[g],i=a[h];"class"==h?(i=e(i))&&d.push(" "+h+'="'+i+'"'):d.push(c.attr(h,i,!1,b))}return d.join("")};var h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},i=/[&<>"]/g;c.escape=g,c.rethrow=function k(b,c,d,e){if(!(b instanceof Error))throw b;if(!("undefined"==typeof window&&c||e))throw b.message+=" on line "+d,b;try{e=e||a("fs").readFileSync(c,"utf8")}catch(f){k(b,null,d)}var g=3,h=e.split("\n"),i=Math.max(d-g,0),j=Math.min(h.length,d+g),g=h.slice(i,j).map(function(a,b){var c=b+i+1;return(c==d?"  > ":"    ")+c+"| "+a}).join("\n");throw b.path=c,b.message=(c||"Jade")+":"+d+"\n"+g+"\n\n"+b.message,b},c.DebugItem=function(a,b){this.lineno=a,this.filename=b}},{fs:2}],2:[function(a,b,c){},{}]},{},[1])(1)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{fs:2}],233:[function(a,b,c){var d=a("lodash");d.defaults;b.exports=d.partialRight(d.merge,function e(a,b){return d.isArray(arguments[0])||d.isDate(arguments[0])?arguments[0]:d.merge(a,b,e)})},{lodash:234}],234:[function(a,b,c){(function(a){(function(){function d(a,b,c){for(var d=(c||0)-1,e=a?a.length:0;++d<e;)if(a[d]===b)return d;return-1}function e(a,b){var c=typeof b;if(a=a.cache,"boolean"==c||null==b)return a[b]?0:-1;"number"!=c&&"string"!=c&&(c="object");var e="number"==c?b:u+b;return a=(a=a[c])&&a[e],"object"==c?a&&d(a,b)>-1?0:-1:a?0:-1}function f(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var d="number"==c?a:u+a,e=b[c]||(b[c]={});"object"==c?(e[d]||(e[d]=[])).push(a):e[d]=!0}}function g(a){return a.charCodeAt(0)}function h(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++e<f;){var g=c[e],h=d[e];if(g!==h){if(g>h||"undefined"==typeof g)return 1;if(g<h||"undefined"==typeof h)return-1}}return a.index-b.index}function i(a){var b=-1,c=a.length,d=a[0],e=a[c/2|0],g=a[c-1];if(d&&"object"==typeof d&&e&&"object"==typeof e&&g&&"object"==typeof g)return!1;var h=l();h["false"]=h["null"]=h["true"]=h.undefined=!1;var i=l();for(i.array=a,i.cache=h,i.push=f;++b<c;)i.push(a[b]);return i}function j(a){return"\\"+Y[a]}function k(){return r.pop()||[]}function l(){return s.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function m(a){a.length=0,r.length<w&&r.push(a)}function n(a){var b=a.cache;b&&n(b),a.array=a.cache=a.criteria=a.object=a.number=a.string=a.value=null,s.length<w&&s.push(a)}function o(a,b,c){b||(b=0),"undefined"==typeof c&&(c=a?a.length:0);for(var d=-1,e=c-b||0,f=Array(e<0?0:e);++d<e;)f[d]=a[b+d];return f}function p(a){function b(a){return a&&"object"==typeof a&&!Zc(a)&&Hc.call(a,"__wrapped__")?a:new c(a)}function c(a,b){this.__chain__=!!b,this.__wrapped__=a}function f(a){function b(){if(d){var a=o(d);Ic.apply(a,arguments)}if(this instanceof b){var f=s(c.prototype),g=c.apply(f,a||arguments);return Ea(g)?g:f}return c.apply(e,a||arguments)}var c=a[0],d=a[2],e=a[4];return Yc(b,a),b}function r(a,b,c,d,e){if(c){var f=c(a);if("undefined"!=typeof f)return f}var g=Ea(a);if(!g)return a;var h=Ac.call(a);if(!U[h])return a;var i=Wc[h];switch(h){case N:case O:return new i((+a));case Q:case T:return new i(a);case S:return f=i(a.source,C.exec(a)),f.lastIndex=a.lastIndex,f}var j=Zc(a);if(b){var l=!d;d||(d=k()),e||(e=k());for(var n=d.length;n--;)if(d[n]==a)return e[n];f=j?i(a.length):{}}else f=j?o(a):ed({},a);return j&&(Hc.call(a,"index")&&(f.index=a.index),Hc.call(a,"input")&&(f.input=a.input)),b?(d.push(a),e.push(f),(j?Ya:hd)(a,function(a,g){f[g]=r(a,b,c,d,e)}),l&&(m(d),m(e)),f):f}function s(a,b){return Ea(a)?Nc(a):{}}function w(a,b,c){if("function"!=typeof a)return Zb;if("undefined"==typeof b||!("prototype"in a))return a;var d=a.__bindData__;if("undefined"==typeof d&&(Xc.funcNames&&(d=!a.name),d=d||!Xc.funcDecomp,!d)){var e=Fc.call(a);Xc.funcNames||(d=!D.test(e)),d||(d=H.test(e),Yc(a,d))}if(d===!1||d!==!0&&1&d[1])return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return Ib(a,b)}function Y(a){function b(){var a=i?g:this;if(e){var n=o(e);Ic.apply(n,arguments)}if((f||k)&&(n||(n=o(arguments)),f&&Ic.apply(n,f),k&&n.length<h))return d|=16,Y([c,l?d:d&-4,n,null,g,h]);if(n||(n=arguments),j&&(c=a[m]),this instanceof b){a=s(c.prototype);var p=c.apply(a,n);return Ea(p)?p:a}return c.apply(a,n)}var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],i=1&d,j=2&d,k=4&d,l=8&d,m=c;return Yc(b,a),b}function $(a,b){var c=-1,f=ia(),g=a?a.length:0,h=g>=v&&f===d,j=[];if(h){var k=i(b);k?(f=e,b=k):h=!1}for(;++c<g;){var l=a[c];f(b,l)<0&&j.push(l)}return h&&n(b),j}function _(a,b,c,d){for(var e=(d||0)-1,f=a?a.length:0,g=[];++e<f;){var h=a[e];if(h&&"object"==typeof h&&"number"==typeof h.length&&(Zc(h)||ma(h))){b||(h=_(h,b,c));var i=-1,j=h.length,k=g.length;for(g.length+=j;++i<j;)g[k++]=h[i]}else c||g.push(h)}return g}function aa(a,b,c,d,e,f){if(c){var g=c(a,b);if("undefined"!=typeof g)return!!g}if(a===b)return 0!==a||1/a==1/b;var h=typeof a,i=typeof b;if(!(a!==a||a&&X[h]||b&&X[i]))return!1;if(null==a||null==b)return a===b;var j=Ac.call(a),l=Ac.call(b);if(j==L&&(j=R),l==L&&(l=R),j!=l)return!1;switch(j){case N:case O:return+a==+b;case Q:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case S:case T:return a==vc(b)}var n=j==M;if(!n){var o=Hc.call(a,"__wrapped__"),p=Hc.call(b,"__wrapped__");if(o||p)return aa(o?a.__wrapped__:a,p?b.__wrapped__:b,c,d,e,f);if(j!=R)return!1;var q=a.constructor,r=b.constructor;if(q!=r&&!(Da(q)&&q instanceof q&&Da(r)&&r instanceof r)&&"constructor"in a&&"constructor"in b)return!1}var s=!e;e||(e=k()),f||(f=k());for(var t=e.length;t--;)if(e[t]==a)return f[t]==b;var u=0;if(g=!0,e.push(a),f.push(b),n){if(t=a.length,u=b.length,g=u==t,g||d)for(;u--;){var v=t,w=b[u];if(d)for(;v--&&!(g=aa(a[v],w,c,d,e,f)););else if(!(g=aa(a[u],w,c,d,e,f)))break}}else gd(b,function(b,h,i){if(Hc.call(i,h))return u++,g=Hc.call(a,h)&&aa(a[h],b,c,d,e,f)}),g&&!d&&gd(a,function(a,b,c){if(Hc.call(c,b))return g=--u>-1});return e.pop(),f.pop(),s&&(m(e),m(f)),g}function ba(a,b,c,d,e){(Zc(b)?Ya:hd)(b,function(b,f){var g,h,i=b,j=a[f];if(b&&((h=Zc(b))||id(b))){for(var k=d.length;k--;)if(g=d[k]==b){j=e[k];break}if(!g){var l;c&&(i=c(j,b),(l="undefined"!=typeof i)&&(j=i)),l||(j=h?Zc(j)?j:[]:id(j)?j:{}),d.push(b),e.push(j),l||ba(j,b,c,d,e)}}else c&&(i=c(j,b),"undefined"==typeof i&&(i=b)),"undefined"!=typeof i&&(j=i);a[f]=j})}function da(a,b){return a+Ec(Vc()*(b-a+1))}function ea(a,b,c){var f=-1,g=ia(),h=a?a.length:0,j=[],l=!b&&h>=v&&g===d,o=c||l?k():j;if(l){var p=i(o);g=e,o=p}for(;++f<h;){var q=a[f],r=c?c(q,f,a):q;(b?!f||o[o.length-1]!==r:g(o,r)<0)&&((c||l)&&o.push(r),j.push(q))}return l?(m(o.array),n(o)):c&&m(o),j}function fa(a){return function(c,d,e){var f={};d=b.createCallback(d,e,3);var g=-1,h=c?c.length:0;if("number"==typeof h)for(;++g<h;){var i=c[g];a(f,i,d(i,g,c),c)}else hd(c,function(b,c,e){a(f,b,d(b,c,e),e)});return f}}function ga(a,b,c,d,e,g){var h=1&b,i=2&b,j=4&b,k=16&b,l=32&b;if(!i&&!Da(a))throw new wc;k&&!c.length&&(b&=-17,k=c=!1),l&&!d.length&&(b&=-33,l=d=!1);var m=a&&a.__bindData__;if(m&&m!==!0)return m=o(m),m[2]&&(m[2]=o(m[2])),m[3]&&(m[3]=o(m[3])),!h||1&m[1]||(m[4]=e),!h&&1&m[1]&&(b|=8),!j||4&m[1]||(m[5]=g),k&&Ic.apply(m[2]||(m[2]=[]),c),l&&Lc.apply(m[3]||(m[3]=[]),d),m[1]|=b,ga.apply(null,m);var n=1==b||17===b?f:Y;return n([a,b,c,d,e,g])}function ha(a){return ad[a]}function ia(){var a=(a=b.indexOf)===rb?d:a;return a}function ja(a){return"function"==typeof a&&Bc.test(a)}function ka(a){var b,c;return!!(a&&Ac.call(a)==R&&(b=a.constructor,!Da(b)||b instanceof b))&&(gd(a,function(a,b){c=b}),"undefined"==typeof c||Hc.call(a,c))}function la(a){return bd[a]}function ma(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Ac.call(a)==L||!1}function na(a,b,c,d){return"boolean"!=typeof b&&null!=b&&(d=c,c=b,b=!1),r(a,b,"function"==typeof c&&w(c,d,1))}function oa(a,b,c){return r(a,!0,"function"==typeof b&&w(b,c,1))}function pa(a,b){var c=s(a);return b?ed(c,b):c}function qa(a,c,d){var e;return c=b.createCallback(c,d,3),hd(a,function(a,b,d){if(c(a,b,d))return e=b,!1}),e}function ra(a,c,d){var e;return c=b.createCallback(c,d,3),ta(a,function(a,b,d){if(c(a,b,d))return e=b,!1}),e}function sa(a,b,c){var d=[];gd(a,function(a,b){d.push(b,a)});var e=d.length;for(b=w(b,c,3);e--&&b(d[e--],d[e],a)!==!1;);return a}function ta(a,b,c){var d=_c(a),e=d.length;for(b=w(b,c,3);e--;){var f=d[e];if(b(a[f],f,a)===!1)break}return a}function ua(a){var b=[];return gd(a,function(a,c){Da(a)&&b.push(c)}),b.sort()}function va(a,b){return!!a&&Hc.call(a,b)}function wa(a){for(var b=-1,c=_c(a),d=c.length,e={};++b<d;){var f=c[b];e[a[f]]=f}return e}function xa(a){return a===!0||a===!1||a&&"object"==typeof a&&Ac.call(a)==N||!1}function ya(a){return a&&"object"==typeof a&&Ac.call(a)==O||!1}function za(a){return a&&1===a.nodeType||!1}function Aa(a){var b=!0;if(!a)return b;var c=Ac.call(a),d=a.length;return c==M||c==T||c==L||c==R&&"number"==typeof d&&Da(a.splice)?!d:(hd(a,function(){return b=!1}),b)}function Ba(a,b,c,d){return aa(a,b,"function"==typeof c&&w(c,d,2))}function Ca(a){return Pc(a)&&!Qc(parseFloat(a))}function Da(a){return"function"==typeof a}function Ea(a){return!(!a||!X[typeof a])}function Fa(a){return Ha(a)&&a!=+a}function Ga(a){return null===a}function Ha(a){return"number"==typeof a||a&&"object"==typeof a&&Ac.call(a)==Q||!1}function Ia(a){return a&&"object"==typeof a&&Ac.call(a)==S||!1}function Ja(a){return"string"==typeof a||a&&"object"==typeof a&&Ac.call(a)==T||!1}function Ka(a){return"undefined"==typeof a}function La(a,c,d){var e={};return c=b.createCallback(c,d,3),hd(a,function(a,b,d){e[b]=c(a,b,d)}),e}function Ma(a){var b=arguments,c=2;if(!Ea(a))return a;if("number"!=typeof b[2]&&(c=b.length),c>3&&"function"==typeof b[c-2])var d=w(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(d=b[--c]);for(var e=o(arguments,1,c),f=-1,g=k(),h=k();++f<c;)ba(a,e[f],d,g,h);return m(g),m(h),a}function Na(a,c,d){var e={};if("function"!=typeof c){var f=[];gd(a,function(a,b){f.push(b)}),f=$(f,_(arguments,!0,!1,1));for(var g=-1,h=f.length;++g<h;){var i=f[g];e[i]=a[i]}}else c=b.createCallback(c,d,3),gd(a,function(a,b,d){c(a,b,d)||(e[b]=a)});return e}function Oa(a){for(var b=-1,c=_c(a),d=c.length,e=nc(d);++b<d;){var f=c[b];e[b]=[f,a[f]]}return e}function Pa(a,c,d){var e={};if("function"!=typeof c)for(var f=-1,g=_(arguments,!0,!1,1),h=Ea(a)?g.length:0;++f<h;){var i=g[f];i in a&&(e[i]=a[i])}else c=b.createCallback(c,d,3),gd(a,function(a,b,d){c(a,b,d)&&(e[b]=a)});return e}function Qa(a,c,d,e){var f=Zc(a);if(null==d)if(f)d=[];else{var g=a&&a.constructor,h=g&&g.prototype;d=s(h)}return c&&(c=b.createCallback(c,e,4),(f?Ya:hd)(a,function(a,b,e){return c(d,a,b,e)})),d}function Ra(a){for(var b=-1,c=_c(a),d=c.length,e=nc(d);++b<d;)e[b]=a[c[b]];return e}function Sa(a){for(var b=arguments,c=-1,d=_(b,!0,!1,1),e=b[2]&&b[2][b[1]]===a?1:d.length,f=nc(e);++c<e;)f[c]=a[d[c]];return f}function Ta(a,b,c){var d=-1,e=ia(),f=a?a.length:0,g=!1;return c=(c<0?Sc(0,f+c):c)||0,Zc(a)?g=e(a,b,c)>-1:"number"==typeof f?g=(Ja(a)?a.indexOf(b,c):e(a,b,c))>-1:hd(a,function(a){if(++d>=c)return!(g=a===b)}),g}function Ua(a,c,d){var e=!0;c=b.createCallback(c,d,3);var f=-1,g=a?a.length:0;if("number"==typeof g)for(;++f<g&&(e=!!c(a[f],f,a)););else hd(a,function(a,b,d){return e=!!c(a,b,d)});return e}function Va(a,c,d){var e=[];c=b.createCallback(c,d,3);var f=-1,g=a?a.length:0;if("number"==typeof g)for(;++f<g;){var h=a[f];c(h,f,a)&&e.push(h)}else hd(a,function(a,b,d){c(a,b,d)&&e.push(a)});return e}function Wa(a,c,d){c=b.createCallback(c,d,3);var e=-1,f=a?a.length:0;if("number"!=typeof f){var g;return hd(a,function(a,b,d){if(c(a,b,d))return g=a,!1}),g}for(;++e<f;){var h=a[e];if(c(h,e,a))return h}}function Xa(a,c,d){var e;return c=b.createCallback(c,d,3),Za(a,function(a,b,d){if(c(a,b,d))return e=a,!1}),e}function Ya(a,b,c){var d=-1,e=a?a.length:0;if(b=b&&"undefined"==typeof c?b:w(b,c,3),"number"==typeof e)for(;++d<e&&b(a[d],d,a)!==!1;);else hd(a,b);return a}function Za(a,b,c){var d=a?a.length:0;if(b=b&&"undefined"==typeof c?b:w(b,c,3),"number"==typeof d)for(;d--&&b(a[d],d,a)!==!1;);else{var e=_c(a);d=e.length,hd(a,function(a,c,f){return c=e?e[--d]:--d,b(f[c],c,f)})}return a}function $a(a,b){var c=o(arguments,2),d=-1,e="function"==typeof b,f=a?a.length:0,g=nc("number"==typeof f?f:0);return Ya(a,function(a){g[++d]=(e?b:a[b]).apply(a,c)}),g}function _a(a,c,d){var e=-1,f=a?a.length:0;if(c=b.createCallback(c,d,3),"number"==typeof f)for(var g=nc(f);++e<f;)g[e]=c(a[e],e,a);else g=[],hd(a,function(a,b,d){g[++e]=c(a,b,d)});return g}function ab(a,c,d){var e=-(1/0),f=e;if("function"!=typeof c&&d&&d[c]===a&&(c=null),null==c&&Zc(a))for(var h=-1,i=a.length;++h<i;){var j=a[h];j>f&&(f=j)}else c=null==c&&Ja(a)?g:b.createCallback(c,d,3),Ya(a,function(a,b,d){var g=c(a,b,d);g>e&&(e=g,f=a)});return f}function bb(a,c,d){var e=1/0,f=e;if("function"!=typeof c&&d&&d[c]===a&&(c=null),null==c&&Zc(a))for(var h=-1,i=a.length;++h<i;){var j=a[h];j<f&&(f=j)}else c=null==c&&Ja(a)?g:b.createCallback(c,d,3),Ya(a,function(a,b,d){var g=c(a,b,d);g<e&&(e=g,f=a)});return f}function cb(a,c,d,e){if(!a)return d;var f=arguments.length<3;c=b.createCallback(c,e,4);var g=-1,h=a.length;if("number"==typeof h)for(f&&(d=a[++g]);++g<h;)d=c(d,a[g],g,a);else hd(a,function(a,b,e){d=f?(f=!1,a):c(d,a,b,e)});return d}function db(a,c,d,e){var f=arguments.length<3;return c=b.createCallback(c,e,4),Za(a,function(a,b,e){d=f?(f=!1,a):c(d,a,b,e)}),d}function eb(a,c,d){return c=b.createCallback(c,d,3),Va(a,function(a,b,d){return!c(a,b,d)})}function fb(a,b,c){if(a&&"number"!=typeof a.length&&(a=Ra(a)),null==b||c)return a?a[da(0,a.length-1)]:q;var d=gb(a);return d.length=Tc(Sc(0,b),d.length),d}function gb(a){var b=-1,c=a?a.length:0,d=nc("number"==typeof c?c:0);return Ya(a,function(a){var c=da(0,++b);d[b]=d[c],d[c]=a}),d}function hb(a){var b=a?a.length:0;return"number"==typeof b?b:_c(a).length}function ib(a,c,d){var e;c=b.createCallback(c,d,3);var f=-1,g=a?a.length:0;if("number"==typeof g)for(;++f<g&&!(e=c(a[f],f,a)););else hd(a,function(a,b,d){return!(e=c(a,b,d))});return!!e}function jb(a,c,d){var e=-1,f=Zc(c),g=a?a.length:0,i=nc("number"==typeof g?g:0);for(f||(c=b.createCallback(c,d,3)),Ya(a,function(a,b,d){var g=i[++e]=l();f?g.criteria=_a(c,function(b){return a[b]}):(g.criteria=k())[0]=c(a,b,d),g.index=e,g.value=a}),g=i.length,i.sort(h);g--;){var j=i[g];i[g]=j.value,f||m(j.criteria),n(j)}return i}function kb(a){return a&&"number"==typeof a.length?o(a):Ra(a)}function lb(a){for(var b=-1,c=a?a.length:0,d=[];++b<c;){var e=a[b];e&&d.push(e)}return d}function mb(a){return $(a,_(arguments,!0,!0,1))}function nb(a,c,d){var e=-1,f=a?a.length:0;for(c=b.createCallback(c,d,3);++e<f;)if(c(a[e],e,a))return e;return-1}function ob(a,c,d){var e=a?a.length:0;for(c=b.createCallback(c,d,3);e--;)if(c(a[e],e,a))return e;return-1}function pb(a,c,d){var e=0,f=a?a.length:0;if("number"!=typeof c&&null!=c){var g=-1;for(c=b.createCallback(c,d,3);++g<f&&c(a[g],g,a);)e++}else if(e=c,null==e||d)return a?a[0]:q;return o(a,0,Tc(Sc(0,e),f))}function qb(a,b,c,d){return"boolean"!=typeof b&&null!=b&&(d=c,c="function"!=typeof b&&d&&d[b]===a?null:b,b=!1),null!=c&&(a=_a(a,c,d)),_(a,b)}function rb(a,b,c){if("number"==typeof c){var e=a?a.length:0;c=c<0?Sc(0,e+c):c||0}else if(c){var f=Ab(a,b);return a[f]===b?f:-1}return d(a,b,c)}function sb(a,c,d){var e=0,f=a?a.length:0;if("number"!=typeof c&&null!=c){var g=f;for(c=b.createCallback(c,d,3);g--&&c(a[g],g,a);)e++}else e=null==c||d?1:c||e;return o(a,0,Tc(Sc(0,f-e),f))}function tb(){for(var a=[],b=-1,c=arguments.length,f=k(),g=ia(),h=g===d,j=k();++b<c;){var l=arguments[b];(Zc(l)||ma(l))&&(a.push(l),f.push(h&&l.length>=v&&i(b?a[b]:j)))}var o=a[0],p=-1,q=o?o.length:0,r=[];a:for(;++p<q;){var s=f[0];if(l=o[p],(s?e(s,l):g(j,l))<0){for(b=c,(s||j).push(l);--b;)if(s=f[b],(s?e(s,l):g(a[b],l))<0)continue a;r.push(l)}}for(;c--;)s=f[c],s&&n(s);return m(f),m(j),r}function ub(a,c,d){var e=0,f=a?a.length:0;if("number"!=typeof c&&null!=c){var g=f;for(c=b.createCallback(c,d,3);g--&&c(a[g],g,a);)e++}else if(e=c,null==e||d)return a?a[f-1]:q;return o(a,Sc(0,f-e))}function vb(a,b,c){var d=a?a.length:0;for("number"==typeof c&&(d=(c<0?Sc(0,d+c):Tc(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function wb(a){for(var b=arguments,c=0,d=b.length,e=a?a.length:0;++c<d;)for(var f=-1,g=b[c];++f<e;)a[f]===g&&(Kc.call(a,f--,1),e--);return a}function xb(a,b,c){a=+a||0,c="number"==typeof c?c:+c||1,null==b&&(b=a,a=0);for(var d=-1,e=Sc(0,Cc((b-a)/(c||1))),f=nc(e);++d<e;)f[d]=a,a+=c;return f}function yb(a,c,d){var e=-1,f=a?a.length:0,g=[];for(c=b.createCallback(c,d,3);++e<f;){var h=a[e];c(h,e,a)&&(g.push(h),Kc.call(a,e--,1),f--)}return g}function zb(a,c,d){if("number"!=typeof c&&null!=c){var e=0,f=-1,g=a?a.length:0;for(c=b.createCallback(c,d,3);++f<g&&c(a[f],f,a);)e++}else e=null==c||d?1:Sc(0,c);return o(a,e)}function Ab(a,c,d,e){var f=0,g=a?a.length:f;for(d=d?b.createCallback(d,e,1):Zb,c=d(c);f<g;){var h=f+g>>>1;d(a[h])<c?f=h+1:g=h}return f}function Bb(){return ea(_(arguments,!0,!0))}function Cb(a,c,d,e){return"boolean"!=typeof c&&null!=c&&(e=d,d="function"!=typeof c&&e&&e[c]===a?null:c,c=!1),null!=d&&(d=b.createCallback(d,e,3)),ea(a,c,d)}function Db(a){return $(a,o(arguments,1))}function Eb(){for(var a=-1,b=arguments.length;++a<b;){var c=arguments[a];if(Zc(c)||ma(c))var d=d?ea($(d,c).concat($(c,d))):c}return d||[]}function Fb(){for(var a=arguments.length>1?arguments:arguments[0],b=-1,c=a?ab(md(a,"length")):0,d=nc(c<0?0:c);++b<c;)d[b]=md(a,b);return d}function Gb(a,b){var c=-1,d=a?a.length:0,e={};for(b||!d||Zc(a[0])||(b=[]);++c<d;){var f=a[c];b?e[f]=b[c]:f&&(e[f[0]]=f[1])}return e}function Hb(a,b){if(!Da(b))throw new wc;return function(){if(--a<1)return b.apply(this,arguments)}}function Ib(a,b){return arguments.length>2?ga(a,17,o(arguments,2),null,b):ga(a,1,null,null,b)}function Jb(a){for(var b=arguments.length>1?_(arguments,!0,!1,1):ua(a),c=-1,d=b.length;++c<d;){var e=b[c];a[e]=ga(a[e],1,null,null,a)}return a}function Kb(a,b){return arguments.length>2?ga(b,19,o(arguments,2),null,a):ga(b,3,null,null,a)}function Lb(){for(var a=arguments,b=a.length;b--;)if(!Da(a[b]))throw new wc;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}function Mb(a,b){return b="number"==typeof b?b:+b||a.length,ga(a,4,null,null,null,b)}function Nb(a,b,c){var d,e,f,g,h,i,j,k=0,l=!1,m=!0;if(!Da(a))throw new wc;if(b=Sc(0,b)||0,c===!0){var n=!0;m=!1}else Ea(c)&&(n=c.leading,l="maxWait"in c&&(Sc(b,c.maxWait)||0),m="trailing"in c?c.trailing:m);var o=function(){var c=b-(od()-g);if(c<=0){e&&Dc(e);var l=j;e=i=j=q,l&&(k=od(),f=a.apply(h,d),i||e||(d=h=null))}else i=Jc(o,c)},p=function(){i&&Dc(i),e=i=j=q,(m||l!==b)&&(k=od(),f=a.apply(h,d),i||e||(d=h=null))};return function(){if(d=arguments,g=od(),h=this,j=m&&(i||!n),l===!1)var c=n&&!i;else{e||n||(k=g);var q=l-(g-k),r=q<=0;r?(e&&(e=Dc(e)),k=g,f=a.apply(h,d)):e||(e=Jc(p,q))}return r&&i?i=Dc(i):i||b===l||(i=Jc(o,b)),c&&(r=!0,f=a.apply(h,d)),!r||i||e||(d=h=null),f}}function Ob(a){if(!Da(a))throw new wc;var b=o(arguments,1);return Jc(function(){a.apply(q,b)},1)}function Pb(a,b){if(!Da(a))throw new wc;var c=o(arguments,2);return Jc(function(){a.apply(q,c)},b)}function Qb(a,b){if(!Da(a))throw new wc;var c=function(){var d=c.cache,e=b?b.apply(this,arguments):u+arguments[0];return Hc.call(d,e)?d[e]:d[e]=a.apply(this,arguments)};return c.cache={},c}function Rb(a){var b,c;if(!Da(a))throw new wc;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Sb(a){return ga(a,16,o(arguments,1))}function Tb(a){return ga(a,32,null,o(arguments,1))}function Ub(a,b,c){var d=!0,e=!0;if(!Da(a))throw new wc;return c===!1?d=!1:Ea(c)&&(d="leading"in c?c.leading:d,e="trailing"in c?c.trailing:e),V.leading=d,V.maxWait=b,V.trailing=e,Nb(a,b,V)}function Vb(a,b){return ga(b,16,[a])}function Wb(a){return function(){return a}}function Xb(a,b,c){var d=typeof a;if(null==a||"function"==d)return w(a,b,c);if("object"!=d)return bc(a);var e=_c(a),f=e[0],g=a[f];
return 1!=e.length||g!==g||Ea(g)?function(b){for(var c=e.length,d=!1;c--&&(d=aa(b[e[c]],a[e[c]],null,!0)););return d}:function(a){var b=a[f];return g===b&&(0!==g||1/g==1/b)}}function Yb(a){return null==a?"":vc(a).replace(dd,ha)}function Zb(a){return a}function $b(a,d,e){var f=!0,g=d&&ua(d);d&&(e||g.length)||(null==e&&(e=d),h=c,d=a,a=b,g=ua(d)),e===!1?f=!1:Ea(e)&&"chain"in e&&(f=e.chain);var h=a,i=Da(h);Ya(g,function(b){var c=a[b]=d[b];i&&(h.prototype[b]=function(){var b=this.__chain__,d=this.__wrapped__,e=[d];Ic.apply(e,arguments);var g=c.apply(a,e);if(f||b){if(d===g&&Ea(g))return this;g=new h(g),g.__chain__=b}return g})})}function _b(){return a._=zc,this}function ac(){}function bc(a){return function(b){return b[a]}}function cc(a,b,c){var d=null==a,e=null==b;if(null==c&&("boolean"==typeof a&&e?(c=a,a=1):e||"boolean"!=typeof b||(c=b,e=!0)),d&&e&&(b=1),a=+a||0,e?(b=a,a=0):b=+b||0,c||a%1||b%1){var f=Vc();return Tc(a+f*(b-a+parseFloat("1e-"+((f+"").length-1))),b)}return da(a,b)}function dc(a,b){if(a){var c=a[b];return Da(c)?a[b]():c}}function ec(a,c,d){var e=b.templateSettings;a=vc(a||""),d=fd({},d,e);var f,g=fd({},d.imports,e.imports),h=_c(g),i=Ra(g),k=0,l=d.interpolate||G,m="__p += '",n=uc((d.escape||G).source+"|"+l.source+"|"+(l===E?B:G).source+"|"+(d.evaluate||G).source+"|$","g");a.replace(n,function(b,c,d,e,g,h){return d||(d=e),m+=a.slice(k,h).replace(I,j),c&&(m+="' +\n__e("+c+") +\n'"),g&&(f=!0,m+="';\n"+g+";\n__p += '"),d&&(m+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),k=h+b.length,b}),m+="';\n";var o=d.variable,p=o;p||(o="obj",m="with ("+o+") {\n"+m+"\n}\n"),m=(f?m.replace(y,""):m).replace(z,"$1").replace(A,"$1;"),m="function("+o+") {\n"+(p?"":o+" || ("+o+" = {});\n")+"var __t, __p = '', __e = _.escape"+(f?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+m+"return __p\n}";var r="\n/*\n//# sourceURL="+(d.sourceURL||"/lodash/template/source["+K++ +"]")+"\n*/";try{var s=qc(h,"return "+m+r).apply(q,i)}catch(t){throw t.source=m,t}return c?s(c):(s.source=m,s)}function fc(a,b,c){a=(a=+a)>-1?a:0;var d=-1,e=nc(a);for(b=w(b,c,1);++d<a;)e[d]=b(d);return e}function gc(a){return null==a?"":vc(a).replace(cd,la)}function hc(a){var b=++t;return vc(null==a?"":a)+b}function ic(a){return a=new c(a),a.__chain__=!0,a}function jc(a,b){return b(a),a}function kc(){return this.__chain__=!0,this}function lc(){return vc(this.__wrapped__)}function mc(){return this.__wrapped__}a=a?ca.defaults(Z.Object(),a,ca.pick(Z,J)):Z;var nc=a.Array,oc=a.Boolean,pc=a.Date,qc=a.Function,rc=a.Math,sc=a.Number,tc=a.Object,uc=a.RegExp,vc=a.String,wc=a.TypeError,xc=[],yc=tc.prototype,zc=a._,Ac=yc.toString,Bc=uc("^"+vc(Ac).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Cc=rc.ceil,Dc=a.clearTimeout,Ec=rc.floor,Fc=qc.prototype.toString,Gc=ja(Gc=tc.getPrototypeOf)&&Gc,Hc=yc.hasOwnProperty,Ic=xc.push,Jc=a.setTimeout,Kc=xc.splice,Lc=xc.unshift,Mc=function(){try{var a={},b=ja(b=tc.defineProperty)&&b,c=b(a,a,a)&&b}catch(d){}return c}(),Nc=ja(Nc=tc.create)&&Nc,Oc=ja(Oc=nc.isArray)&&Oc,Pc=a.isFinite,Qc=a.isNaN,Rc=ja(Rc=tc.keys)&&Rc,Sc=rc.max,Tc=rc.min,Uc=a.parseInt,Vc=rc.random,Wc={};Wc[M]=nc,Wc[N]=oc,Wc[O]=pc,Wc[P]=qc,Wc[R]=tc,Wc[Q]=sc,Wc[S]=uc,Wc[T]=vc,c.prototype=b.prototype;var Xc=b.support={};Xc.funcDecomp=!ja(a.WinRTError)&&H.test(p),Xc.funcNames="string"==typeof qc.name,b.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:E,variable:"",imports:{_:b}},Nc||(s=function(){function b(){}return function(c){if(Ea(c)){b.prototype=c;var d=new b;b.prototype=null}return d||a.Object()}}());var Yc=Mc?function(a,b){W.value=b,Mc(a,"__bindData__",W),W.value=null}:ac,Zc=Oc||function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Ac.call(a)==M||!1},$c=function(a){var b,c=a,d=[];if(!c)return d;if(!X[typeof a])return d;for(b in c)Hc.call(c,b)&&d.push(b);return d},_c=Rc?function(a){return Ea(a)?Rc(a):[]}:$c,ad={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bd=wa(ad),cd=uc("("+_c(bd).join("|")+")","g"),dd=uc("["+_c(ad).join("")+"]","g"),ed=function(a,b,c){var d,e=a,f=e;if(!e)return f;var g=arguments,h=0,i="number"==typeof c?2:g.length;if(i>3&&"function"==typeof g[i-2])var j=w(g[--i-1],g[i--],2);else i>2&&"function"==typeof g[i-1]&&(j=g[--i]);for(;++h<i;)if(e=g[h],e&&X[typeof e])for(var k=-1,l=X[typeof e]&&_c(e),m=l?l.length:0;++k<m;)d=l[k],f[d]=j?j(f[d],e[d]):e[d];return f},fd=function(a,b,c){var d,e=a,f=e;if(!e)return f;for(var g=arguments,h=0,i="number"==typeof c?2:g.length;++h<i;)if(e=g[h],e&&X[typeof e])for(var j=-1,k=X[typeof e]&&_c(e),l=k?k.length:0;++j<l;)d=k[j],"undefined"==typeof f[d]&&(f[d]=e[d]);return f},gd=function(a,b,c){var d,e=a,f=e;if(!e)return f;if(!X[typeof e])return f;b=b&&"undefined"==typeof c?b:w(b,c,3);for(d in e)if(b(e[d],d,a)===!1)return f;return f},hd=function(a,b,c){var d,e=a,f=e;if(!e)return f;if(!X[typeof e])return f;b=b&&"undefined"==typeof c?b:w(b,c,3);for(var g=-1,h=X[typeof e]&&_c(e),i=h?h.length:0;++g<i;)if(d=h[g],b(e[d],d,a)===!1)return f;return f},id=Gc?function(a){if(!a||Ac.call(a)!=R)return!1;var b=a.valueOf,c=ja(b)&&(c=Gc(b))&&Gc(c);return c?a==c||Gc(a)==c:ka(a)}:ka,jd=fa(function(a,b,c){Hc.call(a,c)?a[c]++:a[c]=1}),kd=fa(function(a,b,c){(Hc.call(a,c)?a[c]:a[c]=[]).push(b)}),ld=fa(function(a,b,c){a[c]=b}),md=_a,nd=Va,od=ja(od=pc.now)&&od||function(){return(new pc).getTime()},pd=8==Uc(x+"08")?Uc:function(a,b){return Uc(Ja(a)?a.replace(F,""):a,b||0)};return b.after=Hb,b.assign=ed,b.at=Sa,b.bind=Ib,b.bindAll=Jb,b.bindKey=Kb,b.chain=ic,b.compact=lb,b.compose=Lb,b.constant=Wb,b.countBy=jd,b.create=pa,b.createCallback=Xb,b.curry=Mb,b.debounce=Nb,b.defaults=fd,b.defer=Ob,b.delay=Pb,b.difference=mb,b.filter=Va,b.flatten=qb,b.forEach=Ya,b.forEachRight=Za,b.forIn=gd,b.forInRight=sa,b.forOwn=hd,b.forOwnRight=ta,b.functions=ua,b.groupBy=kd,b.indexBy=ld,b.initial=sb,b.intersection=tb,b.invert=wa,b.invoke=$a,b.keys=_c,b.map=_a,b.mapValues=La,b.max=ab,b.memoize=Qb,b.merge=Ma,b.min=bb,b.omit=Na,b.once=Rb,b.pairs=Oa,b.partial=Sb,b.partialRight=Tb,b.pick=Pa,b.pluck=md,b.property=bc,b.pull=wb,b.range=xb,b.reject=eb,b.remove=yb,b.rest=zb,b.shuffle=gb,b.sortBy=jb,b.tap=jc,b.throttle=Ub,b.times=fc,b.toArray=kb,b.transform=Qa,b.union=Bb,b.uniq=Cb,b.values=Ra,b.where=nd,b.without=Db,b.wrap=Vb,b.xor=Eb,b.zip=Fb,b.zipObject=Gb,b.collect=_a,b.drop=zb,b.each=Ya,b.eachRight=Za,b.extend=ed,b.methods=ua,b.object=Gb,b.select=Va,b.tail=zb,b.unique=Cb,b.unzip=Fb,$b(b),b.clone=na,b.cloneDeep=oa,b.contains=Ta,b.escape=Yb,b.every=Ua,b.find=Wa,b.findIndex=nb,b.findKey=qa,b.findLast=Xa,b.findLastIndex=ob,b.findLastKey=ra,b.has=va,b.identity=Zb,b.indexOf=rb,b.isArguments=ma,b.isArray=Zc,b.isBoolean=xa,b.isDate=ya,b.isElement=za,b.isEmpty=Aa,b.isEqual=Ba,b.isFinite=Ca,b.isFunction=Da,b.isNaN=Fa,b.isNull=Ga,b.isNumber=Ha,b.isObject=Ea,b.isPlainObject=id,b.isRegExp=Ia,b.isString=Ja,b.isUndefined=Ka,b.lastIndexOf=vb,b.mixin=$b,b.noConflict=_b,b.noop=ac,b.now=od,b.parseInt=pd,b.random=cc,b.reduce=cb,b.reduceRight=db,b.result=dc,b.runInContext=p,b.size=hb,b.some=ib,b.sortedIndex=Ab,b.template=ec,b.unescape=gc,b.uniqueId=hc,b.all=Ua,b.any=ib,b.detect=Wa,b.findWhere=Wa,b.foldl=cb,b.foldr=db,b.include=Ta,b.inject=cb,$b(function(){var a={};return hd(b,function(c,d){b.prototype[d]||(a[d]=c)}),a}(),!1),b.first=pb,b.last=ub,b.sample=fb,b.take=pb,b.head=pb,hd(b,function(a,d){var e="sample"!==d;b.prototype[d]||(b.prototype[d]=function(b,d){var f=this.__chain__,g=a(this.__wrapped__,b,d);return f||null!=b&&(!d||e&&"function"==typeof b)?new c(g,f):g})}),b.VERSION="2.4.2",b.prototype.chain=kc,b.prototype.toString=lc,b.prototype.value=mc,b.prototype.valueOf=mc,Ya(["join","pop","shift"],function(a){var d=xc[a];b.prototype[a]=function(){var a=this.__chain__,b=d.apply(this.__wrapped__,arguments);return a?new c(b,a):b}}),Ya(["push","reverse","sort","unshift"],function(a){var c=xc[a];b.prototype[a]=function(){return c.apply(this.__wrapped__,arguments),this}}),Ya(["concat","slice","splice"],function(a){var d=xc[a];b.prototype[a]=function(){return new c(d.apply(this.__wrapped__,arguments),this.__chain__)}}),b}var q,r=[],s=[],t=0,u=+new Date+"",v=75,w=40,x=" \t\x0B\f \ufeff\n\r\u2028\u2029 ᠎             　",y=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,A=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,D=/^\s*function[ \n\r\t]+\w/,E=/<%=([\s\S]+?)%>/g,F=RegExp("^["+x+"]*0+(?=.$)"),G=/($^)/,H=/\bthis\b/,I=/['\n\r\t\u2028\u2029\\]/g,J=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],K=0,L="[object Arguments]",M="[object Array]",N="[object Boolean]",O="[object Date]",P="[object Function]",Q="[object Number]",R="[object Object]",S="[object RegExp]",T="[object String]",U={};U[P]=!1,U[L]=U[M]=U[N]=U[O]=U[Q]=U[R]=U[S]=U[T]=!0;var V={leading:!1,maxWait:0,trailing:!1},W={configurable:!1,enumerable:!1,value:null,writable:!1},X={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Z=X[typeof window]&&window||this,$=X[typeof c]&&c&&!c.nodeType&&c,_=X[typeof b]&&b&&!b.nodeType&&b,aa=_&&_.exports===$&&$,ba=X[typeof a]&&a;!ba||ba.global!==ba&&ba.window!==ba||(Z=ba);var ca=p();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Z._=ca,define(function(){return ca})):$&&_?aa?(_.exports=ca)._=ca:$._=ca:Z._=ca}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],235:[function(a,b,c){/*! Moment Duration Format v1.3.0
 *  https://github.com/jsmreese/moment-duration-format 
 *  Date: 2014-07-15
 *
 *  Duration format plugin function for the Moment.js library
 *  http://momentjs.com/
 *
 *  Copyright 2014 John Madhavan-Reese
 *  Released under the MIT license
 */
!function(b,c){function d(a){var b="";if(a=parseInt(a,10),!a||a<1)return b;for(;a;)b+="0",a-=1;return b}function e(a,b,c){return null==a&&(a=""),a=""+a,(c?a:"")+d(b-a.length)+(c?"":a)}function f(a){return"[object Array]"===Object.prototype.toString.call(a)}function g(a){return"[object Object]"===Object.prototype.toString.call(a)}function h(a,b){for(var c=a.length;c-=1;)if(b(a[c]))return a[c]}function i(a,b){var c,d=0,e=a.length;for("function"!=typeof b&&(c=b,b=function(a){return a===c});d<e;){if(b(a[d]))return a[d];d+=1}}function j(a,b){var c=0,d=a.length;if(a&&d)for(;c<d;){if(b(a[c],c)===!1)return;c+=1}}function k(a,b){var c=0,d=a.length,e=[];if(!a||!d)return e;for(;c<d;)e[c]=b(a[c],c),c+=1;return e}function l(a,b){return k(a,function(a){return a[b]})}function m(a){var b=[];return j(a,function(a){a&&b.push(a)}),b}function n(a){var b=[];return j(a,function(a){i(b,a)||b.push(a)}),b}function o(a,b){var c=[];return j(a,function(a){j(b,function(b){a===b&&c.push(a)})}),n(c)}function p(a,b){var c=[];return j(a,function(d,e){if(!b(d))return c=a.slice(e),!1}),c}function q(a,b){var c=a.slice().reverse();return p(c,b).reverse()}function r(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var s;if("function"==typeof a)try{s=a("moment")}catch(t){}if(!s&&b.moment&&(s=b.moment),!s)throw"Moment Duration Format cannot find Moment.js";s.duration.fn.format=function(){var a,b,c,h,t,u,v=[].slice.call(arguments),w=r({},this.format.defaults),x=s.duration(this);return w.duration=this,j(v,function(a){return"string"==typeof a||"function"==typeof a?void(w.template=a):"number"==typeof a?void(w.precision=a):void(g(a)&&r(w,a))}),c=w.types=f(w.types)?w.types:w.types.split(" "),"function"==typeof w.template&&(w.template=w.template.apply(w)),a=new RegExp(k(c,function(a){return w[a].source}).join("|"),"g"),h=function(a){return i(c,function(b){return w[b].test(a)})},b=k(w.template.match(a),function(a,b){var c=h(a),d=a.length;return{index:b,length:d,token:"escape"===c?a.replace(w.escape,"$1"):a,type:"escape"===c||"general"===c?null:c}},this),t=o(c,n(m(l(b,"type")))),t.length?(j(t,function(a,c){var d,e,f,g,h;d=x.as(a),e=d>0?Math.floor(d):Math.ceil(d),f=d-e,g=c+1===t.length,h=!c,j(b,function(b){b.type===a&&(r(b,{value:d,wholeValue:e,decimalValue:f,isLeast:g,isMost:h}),h&&null==w.forceLength&&b.length>1&&(w.forceLength=!0))}),x.subtract(e,a)}),w.trim&&(b=("left"===w.trim?p:q)(b,function(a){return!(a.isLeast||null!=a.type&&a.wholeValue)})),u=!1,"right"===w.trim&&b.reverse(),b=k(b,function(a){var b,c;if(!a.type)return a.token;if(b=a.isLeast&&w.precision<0?(Math.floor(a.wholeValue*Math.pow(10,w.precision))*Math.pow(10,-w.precision)).toString():a.wholeValue.toString(),b=b.replace(/^\-/,""),a.length>1&&(u||a.isMost||w.forceLength)&&(b=e(b,a.length)),a.isLeast&&w.precision>0)switch(c=a.decimalValue.toString().replace(/^\-/,"").split(/\.|e\-/),c.length){case 1:b+="."+e(c[0],w.precision,!0).slice(0,w.precision);break;case 2:b+="."+e(c[1],w.precision,!0).slice(0,w.precision);break;case 3:b+="."+e(d(+c[2]-1)+(c[0]||"0")+c[1],w.precision,!0).slice(0,w.precision);break;default:throw"Moment Duration Format: unable to parse token decimal value."}return a.isMost&&a.value<0&&(b="-"+b),u=!0,b}),"right"===w.trim&&b.reverse(),b.join("")):l(b,"token").join("")},s.duration.fn.format.defaults={escape:/\[(.+?)\]/,years:/[Yy]+/,months:/M+/,weeks:/[Ww]+/,days:/[Dd]+/,hours:/[Hh]+/,minutes:/m+/,seconds:/s+/,milliseconds:/S+/,general:/.+?/,types:"escape years months weeks days hours minutes seconds milliseconds general",trim:"left",precision:0,forceLength:null,template:function(){var a=this.types,b=this.duration,c=h(a,function(a){return b._data[a]});switch(c){case"seconds":return"h:mm:ss";case"minutes":return"d[d] h:mm";case"hours":return"d[d] h[h]";case"days":return"M[m] d[d]";case"weeks":return"y[y] w[w]";case"months":return"y[y] M[m]";case"years":return"y[y]";default:return"y[y] M[m] d[d] h:mm:ss"}}}}(this)},{moment:238}],236:[function(a,b,c){(function(){var c,d,e,f,g,h,i;h=1e3,g=6e4,e=36e5,c=864e5,i=6048e5,d={seconds:{"short":"s","long":" sec"},minutes:{"short":"m","long":" min"},hours:{"short":"h","long":" hr"},days:{"short":"d","long":" day"}},f=function(a){var b;return b=function(b){var f,j,k,l;if(f=Math.abs(this.diff(a())),k=null,j=null,f<=h)k="seconds",j=1;else if(f<g)k="seconds";else if(f<e)k="minutes";else if(f<c)k="hours";else{if("short"!==b)return this.format("MMM D");if(!(f<i))return this.format("M/D/YY");k="days"}return j&&k||(j=a.duration(f)[k]()),l=k=d[k][b],"long"===b&&j>1&&(l+="s"),j+l},a.fn.twitterLong=function(){return b.call(this,"long")},a.fn.twitter=a.fn.twitterShort=function(){return b.call(this,"short")},a},"function"==typeof define&&define.amd?define("moment-twitter",["moment"],function(a){return this.moment=f(a)}):"undefined"!=typeof b?b.exports=f(a("moment")):"undefined"!=typeof window&&window.moment&&(this.moment=f(this.moment))}).call(this)},{moment:237}],237:[function(a,b,c){
//! moment.js
//! version : 2.4.0
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function(c){function d(a,b){return function(c){return k(a.call(this,c),b)}}function e(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function f(){}function g(a){w(a),i(this,a)}function h(a){var b=q(a),c=b.year||0,d=b.month||0,e=b.week||0,f=b.day||0,g=b.hour||0,h=b.minute||0,i=b.second||0,j=b.millisecond||0;this._input=a,this._milliseconds=+j+1e3*i+6e4*h+36e5*g,this._days=+f+7*e,this._months=+d+12*c,this._data={},this._bubble()}function i(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function j(a){return a<0?Math.ceil(a):Math.floor(a)}function k(a,b){for(var c=a+"";c.length<b;)c="0"+c;return c}function l(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&da.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function m(a){return"[object Array]"===Object.prototype.toString.call(a)}function n(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function o(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;d<e;d++)(c&&a[d]!==b[d]||!c&&s(a[d])!==s(b[d]))&&g++;return g+f}function p(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=Ma[a]||Na[b]||b}return a}function q(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=p(c),b&&(d[b]=a[c]));return d}function r(a){var b,d;if(0===a.indexOf("week"))b=7,d="day";else{if(0!==a.indexOf("month"))return;b=12,d="month"}da[a]=function(e,f){var g,h,i=da.fn._lang[a],j=[];if("number"==typeof e&&(f=e,e=c),h=function(a){var b=da().utc().set(d,a);return i.call(da.fn._lang,b,e||"")},null!=f)return h(f);for(g=0;g<b;g++)j.push(h(g));return j}}function s(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function t(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function u(a){return v(a)?366:365}function v(a){return a%4===0&&a%100!==0||a%400===0}function w(a){var b;a._a&&a._pf.overflow===-2&&(b=a._a[ia]<0||a._a[ia]>11?ia:a._a[ja]<1||a._a[ja]>t(a._a[ha],a._a[ia])?ja:a._a[ka]<0||a._a[ka]>23?ka:a._a[la]<0||a._a[la]>59?la:a._a[ma]<0||a._a[ma]>59?ma:a._a[na]<0||a._a[na]>999?na:-1,a._pf._overflowDayOfYear&&(b<ha||b>ja)&&(b=ja),a._pf.overflow=b)}function x(a){a._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function y(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function z(a){return a?a.toLowerCase().replace("_","-"):a}function A(a,b){return b.abbr=a,oa[a]||(oa[a]=new f),oa[a].set(b),oa[a]}function B(a){delete oa[a]}function C(b){var c,d,e,f,g=0,h=function(b){if(!oa[b]&&pa)try{a("./lang/"+b)}catch(c){}return oa[b]};if(!b)return da.fn._lang;if(!m(b)){if(d=h(b))return d;b=[b]}for(;g<b.length;){for(f=z(b[g]).split("-"),c=f.length,e=z(b[g+1]),e=e?e.split("-"):null;c>0;){if(d=h(f.slice(0,c).join("-")))return d;if(e&&e.length>=c&&o(f,e,!0)>=c-1)break;c--}g++}return da.fn._lang}function D(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function E(a){var b,c,d=a.match(ta);for(b=0,c=d.length;b<c;b++)Ra[d[b]]?d[b]=Ra[d[b]]:d[b]=D(d[b]);return function(e){var f="";for(b=0;b<c;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function F(a,b){return a.isValid()?(b=G(b,a.lang()),Oa[b]||(Oa[b]=E(b)),Oa[b](a)):a.lang().invalidDate()}function G(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(ua.lastIndex=0;d>=0&&ua.test(a);)a=a.replace(ua,c),ua.lastIndex=0,d-=1;return a}function H(a,b){var c;switch(a){case"DDDD":return xa;case"YYYY":case"GGGG":case"gggg":return ya;case"YYYYY":case"GGGGG":case"ggggg":return za;case"S":case"SS":case"SSS":case"DDD":return wa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ba;case"a":case"A":return C(b._l)._meridiemParse;case"X":return Ea;case"Z":case"ZZ":return Ca;case"T":return Da;case"SSSS":return Aa;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"ww":case"W":case"WW":case"e":case"E":return va;default:return c=new RegExp(P(O(a.replace("\\","")),"i"))}}function I(a){var b=(Ca.exec(a)||[])[0],c=(b+"").match(Ja)||["-",0,0],d=+(60*c[1])+s(c[2]);return"+"===c[0]?-d:d}function J(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[ia]=s(b)-1);break;case"MMM":case"MMMM":d=C(c._l).monthsParse(b),null!=d?e[ia]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[ja]=s(b));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=s(b));break;case"YY":e[ha]=s(b)+(s(b)>68?1900:2e3);break;case"YYYY":case"YYYYY":e[ha]=s(b);break;case"a":case"A":c._isPm=C(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[ka]=s(b);break;case"m":case"mm":e[la]=s(b);break;case"s":case"ss":e[ma]=s(b);break;case"S":case"SS":case"SSS":case"SSSS":e[na]=s(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=I(b);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":a=a.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=b)}}function K(a){var b,c,d,e,f,g,h,i,j,k,l=[];if(!a._d){for(d=M(a),a._w&&null==a._a[ja]&&null==a._a[ia]&&(f=function(b){return b?b.length<3?parseInt(b,10)>68?"19"+b:"20"+b:b:null==a._a[ha]?da().weekYear():a._a[ha]},g=a._w,null!=g.GG||null!=g.W||null!=g.E?h=Z(f(g.GG),g.W||1,g.E,4,1):(i=C(a._l),j=null!=g.d?V(g.d,i):null!=g.e?parseInt(g.e,10)+i._week.dow:0,k=parseInt(g.w,10)||1,null!=g.d&&j<i._week.dow&&k++,h=Z(f(g.gg),k,j,i._week.doy,i._week.dow)),a._a[ha]=h.year,a._dayOfYear=h.dayOfYear),a._dayOfYear&&(e=null==a._a[ha]?d[ha]:a._a[ha],a._dayOfYear>u(e)&&(a._pf._overflowDayOfYear=!0),c=U(e,0,a._dayOfYear),a._a[ia]=c.getUTCMonth(),a._a[ja]=c.getUTCDate()),b=0;b<3&&null==a._a[b];++b)a._a[b]=l[b]=d[b];for(;b<7;b++)a._a[b]=l[b]=null==a._a[b]?2===b?1:0:a._a[b];l[ka]+=s((a._tzm||0)/60),l[la]+=s((a._tzm||0)%60),a._d=(a._useUTC?U:T).apply(null,l)}}function L(a){var b;a._d||(b=q(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],K(a))}function M(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function N(a){a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=C(a._l),h=""+a._i,i=h.length,j=0;for(d=G(a._f,g).match(ta)||[],b=0;b<d.length;b++)e=d[b],c=(H(e,a).exec(h)||[])[0],c&&(f=h.substr(0,h.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),h=h.slice(h.indexOf(c)+c.length),j+=c.length),Ra[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),J(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=i-j,h.length>0&&a._pf.unusedInput.push(h),a._isPm&&a._a[ka]<12&&(a._a[ka]+=12),a._isPm===!1&&12===a._a[ka]&&(a._a[ka]=0),K(a),w(a)}function O(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function P(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(a){var b,c,d,e,f;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=i({},a),x(b),b._f=a._f[e],N(b),y(b)&&(f+=b._pf.charsLeftOver,f+=10*b._pf.unusedTokens.length,b._pf.score=f,(null==d||f<d)&&(d=f,c=b));i(a,c||b)}function R(a){var b,c=a._i,d=Fa.exec(c);if(d){for(a._pf.iso=!0,b=4;b>0;b--)if(d[b]){a._f=Ha[b-1]+(d[6]||" ");break}for(b=0;b<4;b++)if(Ia[b][1].exec(c)){a._f+=Ia[b][0];break}Ca.exec(c)&&(a._f+="Z"),N(a)}else a._d=new Date(c)}function S(a){var b=a._i,d=qa.exec(b);b===c?a._d=new Date:d?a._d=new Date((+d[1])):"string"==typeof b?R(a):m(b)?(a._a=b.slice(0),K(a)):n(b)?a._d=new Date((+b)):"object"==typeof b?L(a):a._d=new Date(b)}function T(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return a<1970&&h.setFullYear(a),h}function U(a){var b=new Date(Date.UTC.apply(null,arguments));return a<1970&&b.setUTCFullYear(a),b}function V(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function W(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function X(a,b,c){var d=ga(Math.abs(a)/1e3),e=ga(d/60),f=ga(e/60),g=ga(f/24),h=ga(g/365),i=d<45&&["s",d]||1===e&&["m"]||e<45&&["mm",e]||1===f&&["h"]||f<22&&["hh",f]||1===g&&["d"]||g<=25&&["dd",g]||g<=45&&["M"]||g<345&&["MM",ga(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,W.apply({},i)}function Y(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),f<e-7&&(f+=7),d=da(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function Z(a,b,c,d,e){var f,g,h=new Date(Date.UTC(a,0)).getUTCDay();return c=null!=c?c:e,f=e-h+(h>d?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:u(a-1)+g}}function $(a){var b=a._i,c=a._f;return"undefined"==typeof a._pf&&x(a),null===b?da.invalid({nullInput:!0}):("string"==typeof b&&(a._i=b=C().preparse(b)),da.isMoment(b)?(a=i({},b),a._d=new Date((+b._d))):c?m(c)?Q(a):N(a):S(a),new g(a))}function _(a,b){da.fn[a]=da.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),da.updateOffset(this),this):this._d["get"+c+b]()}}function aa(a){da.duration.fn[a]=function(){return this._data[a]}}function ba(a,b){da.duration.fn["as"+a]=function(){return+this/b}}function ca(a){var b=!1,c=da;"undefined"==typeof ender&&(a?this.moment=function(){return!b&&console&&console.warn&&(b=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")),c.apply(null,arguments)}:this.moment=da)}for(var da,ea,fa="2.4.0",ga=Math.round,ha=0,ia=1,ja=2,ka=3,la=4,ma=5,na=6,oa={},pa="undefined"!=typeof b&&b.exports,qa=/^\/?Date\((\-?\d+)/i,ra=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,sa=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,ta=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,ua=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,va=/\d\d?/,wa=/\d{1,3}/,xa=/\d{3}/,ya=/\d{1,4}/,za=/[+\-]?\d{1,6}/,Aa=/\d+/,Ba=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ca=/Z|[\+\-]\d\d:?\d\d/i,Da=/T/i,Ea=/[\+\-]?\d+(\.\d{1,3})?/,Fa=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d:?\d\d|Z)?)?$/,Ga="YYYY-MM-DDTHH:mm:ssZ",Ha=["YYYY-MM-DD","GGGG-[W]WW","GGGG-[W]WW-E","YYYY-DDD"],Ia=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Ja=/([\+\-]|\d\d)/gi,Ka="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),La={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Ma={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Na={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Oa={},Pa="DDD w W M D d".split(" "),Qa="M D H h m s w W".split(" "),Ra={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return k(this.year()%100,2)},YYYY:function(){return k(this.year(),4)},YYYYY:function(){return k(this.year(),5)},gg:function(){return k(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return k(this.weekYear(),5)},GG:function(){return k(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return k(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return s(this.milliseconds()/100)},SS:function(){return k(s(this.milliseconds()/10),2)},SSS:function(){return k(this.milliseconds(),3)},SSSS:function(){return k(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return a<0&&(a=-a,b="-"),b+k(s(a/60),2)+":"+k(s(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return a<0&&(a=-a,b="-"),b+k(s(10*a/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}},Sa=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Pa.length;)ea=Pa.pop(),Ra[ea+"o"]=e(Ra[ea],ea);for(;Qa.length;)ea=Qa.pop(),Ra[ea+ea]=d(Ra[ea],2);for(Ra.DDDD=d(Ra.DDD,3),i(f.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;b<12;b++)if(this._monthsParse[b]||(c=da.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;b<7;b++)if(this._weekdaysParse[b]||(c=da([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return Y(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),da=function(a,b,d,e){return"boolean"==typeof d&&(e=d,d=c),$({_i:a,_f:b,_l:d,_strict:e,_isUTC:!1})},da.utc=function(a,b,d,e){var f;return"boolean"==typeof d&&(e=d,d=c),f=$({_useUTC:!0,_isUTC:!0,_l:d,_i:a,_f:b,_strict:e}).utc()},da.unix=function(a){return da(1e3*a)},da.duration=function(a,b){var c,d,e,f=da.isDuration(a),g="number"==typeof a,i=f?a._input:g?{}:a,j=null;return g?b?i[b]=a:i.milliseconds=a:(j=ra.exec(a))?(c="-"===j[1]?-1:1,i={y:0,d:s(j[ja])*c,h:s(j[ka])*c,m:s(j[la])*c,s:s(j[ma])*c,ms:s(j[na])*c}):(j=sa.exec(a))&&(c="-"===j[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},i={y:e(j[2]),M:e(j[3]),d:e(j[4]),h:e(j[5]),m:e(j[6]),s:e(j[7]),w:e(j[8])}),d=new h(i),f&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},da.version=fa,da.defaultFormat=Ga,da.updateOffset=function(){},da.lang=function(a,b){var c;return a?(b?A(z(a),b):null===b?(B(a),a="en"):oa[a]||C(a),c=da.duration.fn._lang=da.fn._lang=C(a),c._abbr):da.fn._lang._abbr},da.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),C(a)},da.isMoment=function(a){return a instanceof g},da.isDuration=function(a){return a instanceof h},ea=Sa.length-1;ea>=0;--ea)r(Sa[ea]);for(da.normalizeUnits=function(a){return p(a)},da.invalid=function(a){var b=da.utc(NaN);return null!=a?i(b._pf,a):b._pf.userInvalidated=!0,b},da.parseZone=function(a){return da(a).parseZone()},i(da.fn=g.prototype,{clone:function(){return da(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date((+this)):this._d},toISOString:function(){return F(da(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return y(this)},isDSTShifted:function(){return!!this._a&&(this.isValid()&&o(this._a,(this._isUTC?da.utc(this._a):da(this._a)).toArray())>0)},parsingFlags:function(){return i({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=F(this,a||da.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?da.duration(+b,a):da.duration(a,b),l(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?da.duration(+b,a):da.duration(a,b),l(this,c,-1),this},diff:function(a,b,c){var d,e,f=this._isUTC?da(a).zone(this._offset||0):da(a).local(),g=6e4*(this.zone()-f.zone());return b=p(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-da(this).startOf("month")-(f-da(f).startOf("month")))/d,e-=6e4*(this.zone()-da(this).startOf("month").zone()-(f.zone()-da(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:j(e)},from:function(a,b){return da.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(da(),a)},calendar:function(){var a=this.diff(da().zone(this.zone()).startOf("day"),"days",!0),b=a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(b,this))},isLeapYear:function(){return v(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=V(a,this.lang()),this.add({d:a-b})):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),da.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=p(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=p(a),this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+da(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+da(a).startOf(b)},isSame:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)===+da(a).startOf(b)},min:function(a){return a=da.apply(null,arguments),a<this?this:a},max:function(a){return a=da.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=I(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&l(this,da.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?da(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return t(this.year(),this.month())},dayOfYear:function(a){var b=ga((da(this).startOf("day")-da(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},weekYear:function(a){var b=Y(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=Y(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=Y(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=p(a),this[a]()},set:function(a,b){return a=p(a),"function"==typeof this[a]&&this[a](b),this},lang:function(a){return a===c?this._lang:(this._lang=C(a),this)}}),ea=0;ea<Ka.length;ea++)_(Ka[ea].toLowerCase().replace(/s$/,""),Ka[ea]);_("year","FullYear"),da.fn.days=da.fn.day,da.fn.months=da.fn.month,da.fn.weeks=da.fn.week,da.fn.isoWeeks=da.fn.isoWeek,da.fn.toJSON=da.fn.toISOString,i(da.duration.fn=h.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,h=this._data;h.milliseconds=e%1e3,a=j(e/1e3),h.seconds=a%60,b=j(a/60),h.minutes=b%60,c=j(b/60),h.hours=c%24,f+=j(c/24),h.days=f%30,g+=j(f/30),h.months=g%12,d=j(g/12),h.years=d},weeks:function(){return j(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*s(this._months/12)},humanize:function(a){var b=+this,c=X(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=da.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=da.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=p(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=p(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:da.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}});for(ea in La)La.hasOwnProperty(ea)&&(ba(ea,La[ea]),aa(ea.toLowerCase()));ba("Weeks",6048e5),da.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},da.lang("en",{ordinal:function(a){var b=a%10,c=1===s(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),pa?(b.exports=da,ca(!0)):"function"==typeof define&&define.amd?define("moment",function(a,b,d){return d.config().noGlobal!==!0&&ca(d.config().noGlobal===c),da}):ca()}).call(this)},{}],238:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?b.exports=d():"function"==typeof define&&define.amd?define(d):a.moment=d()}(this,function(){"use strict";function c(){return qd.apply(null,arguments)}function d(a){qd=a}function e(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function f(a){return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function g(a){var b;for(b in a)return!1;return!0}function h(a){return"number"==typeof a||"[object Number]"===Object.prototype.toString.call(a)}function i(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function j(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function k(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function l(a,b){for(var c in b)k(b,c)&&(a[c]=b[c]);return k(b,"toString")&&(a.toString=b.toString),k(b,"valueOf")&&(a.valueOf=b.valueOf),a}function m(a,b,c,d){return tb(a,b,c,d,!0).utc()}function n(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function o(a){return null==a._pf&&(a._pf=n()),a._pf}function p(a){if(null==a._isValid){var b=o(a),c=sd.call(b.parsedDateParts,function(a){return null!=a}),d=!isNaN(a._d.getTime())&&b.overflow<0&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c);if(a._strict&&(d=d&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour),null!=Object.isFrozen&&Object.isFrozen(a))return d;a._isValid=d}return a._isValid}function q(a){var b=m(NaN);return null!=a?l(o(b),a):o(b).userInvalidated=!0,b}function r(a){return void 0===a}function s(a,b){var c,d,e;if(r(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),r(b._i)||(a._i=b._i),r(b._f)||(a._f=b._f),r(b._l)||(a._l=b._l),r(b._strict)||(a._strict=b._strict),r(b._tzm)||(a._tzm=b._tzm),r(b._isUTC)||(a._isUTC=b._isUTC),r(b._offset)||(a._offset=b._offset),r(b._pf)||(a._pf=o(b)),r(b._locale)||(a._locale=b._locale),td.length>0)for(c in td)d=td[c],e=b[d],r(e)||(a[d]=e);return a}function t(a){s(this,a),this._d=new Date(null!=a._d?a._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),ud===!1&&(ud=!0,c.updateOffset(this),ud=!1)}function u(a){return a instanceof t||null!=a&&null!=a._isAMomentObject}function v(a){return a<0?Math.ceil(a)||0:Math.floor(a)}function w(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=v(b)),c}function x(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;d<e;d++)(c&&a[d]!==b[d]||!c&&w(a[d])!==w(b[d]))&&g++;return g+f}function y(a){c.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function z(a,b){var d=!0;return l(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,a),d){for(var e,f=[],g=0;g<arguments.length;g++){if(e="","object"==typeof arguments[g]){e+="\n["+g+"] ";for(var h in arguments[0])e+=h+": "+arguments[0][h]+", ";e=e.slice(0,-2)}else e=arguments[g];f.push(e)}y(a+"\nArguments: "+Array.prototype.slice.call(f).join("")+"\n"+(new Error).stack),d=!1}return b.apply(this,arguments)},b)}function A(a,b){null!=c.deprecationHandler&&c.deprecationHandler(a,b),vd[a]||(y(b),vd[a]=!0)}function B(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function C(a){var b,c;for(c in a)b=a[c],B(b)?this[c]=b:this["_"+c]=b;this._config=a,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function D(a,b){var c,d=l({},a);for(c in b)k(b,c)&&(f(a[c])&&f(b[c])?(d[c]={},l(d[c],a[c]),l(d[c],b[c])):null!=b[c]?d[c]=b[c]:delete d[c]);for(c in a)k(a,c)&&!k(b,c)&&f(a[c])&&(d[c]=l({},d[c]));return d}function E(a){null!=a&&this.set(a)}function F(a,b,c){var d=this._calendar[a]||this._calendar.sameElse;return B(d)?d.call(b,c):d}function G(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function H(){return this._invalidDate}function I(a){return this._ordinal.replace("%d",a)}function J(a,b,c,d){var e=this._relativeTime[c];return B(e)?e(a,b,c,d):e.replace(/%d/i,a)}function K(a,b){var c=this._relativeTime[a>0?"future":"past"];return B(c)?c(b):c.replace(/%s/i,b)}function L(a,b){var c=a.toLowerCase();Fd[c]=Fd[c+"s"]=Fd[b]=a}function M(a){return"string"==typeof a?Fd[a]||Fd[a.toLowerCase()]:void 0}function N(a){var b,c,d={};for(c in a)k(a,c)&&(b=M(c),b&&(d[b]=a[c]));return d}function O(a,b){Gd[a]=b}function P(a){var b=[];for(var c in a)b.push({unit:c,priority:Gd[c]});return b.sort(function(a,b){return a.priority-b.priority}),b}function Q(a,b){return function(d){return null!=d?(S(this,a,d),c.updateOffset(this,b),this):R(this,a)}}function R(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function S(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function T(a){return a=M(a),B(this[a])?this[a]():this}function U(a,b){if("object"==typeof a){a=N(a);for(var c=P(a),d=0;d<c.length;d++)this[c[d].unit](a[c[d].unit])}else if(a=M(a),B(this[a]))return this[a](b);return this}function V(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function W(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Kd[a]=e),b&&(Kd[b[0]]=function(){return V(e.apply(this,arguments),b[1],b[2])}),c&&(Kd[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function X(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function Y(a){var b,c,d=a.match(Hd);for(b=0,c=d.length;b<c;b++)Kd[d[b]]?d[b]=Kd[d[b]]:d[b]=X(d[b]);return function(b){var e,f="";for(e=0;e<c;e++)f+=d[e]instanceof Function?d[e].call(b,a):d[e];return f}}function Z(a,b){return a.isValid()?(b=$(b,a.localeData()),Jd[b]=Jd[b]||Y(b),Jd[b](a)):a.localeData().invalidDate()}function $(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Id.lastIndex=0;d>=0&&Id.test(a);)a=a.replace(Id,c),Id.lastIndex=0,d-=1;return a}function _(a,b,c){ae[a]=B(b)?b:function(a,d){return a&&c?c:b}}function aa(a,b){return k(ae,a)?ae[a](b._strict,b._locale):new RegExp(ba(a))}function ba(a){return ca(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function ca(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function da(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),h(b)&&(d=function(a,c){c[b]=w(a)}),c=0;c<a.length;c++)be[a[c]]=d}function ea(a,b){da(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function fa(a,b,c){null!=b&&k(be,a)&&be[a](b,c._a,c,a)}function ga(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ha(a,b){return a?e(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||me).test(b)?"format":"standalone"][a.month()]:this._months}function ia(a,b){return a?e(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[me.test(b)?"format":"standalone"][a.month()]:this._monthsShort}function ja(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],
this._longMonthsParse=[],this._shortMonthsParse=[],d=0;d<12;++d)f=m([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(f,"").toLocaleLowerCase();return c?"MMM"===b?(e=le.call(this._shortMonthsParse,g),e!==-1?e:null):(e=le.call(this._longMonthsParse,g),e!==-1?e:null):"MMM"===b?(e=le.call(this._shortMonthsParse,g),e!==-1?e:(e=le.call(this._longMonthsParse,g),e!==-1?e:null)):(e=le.call(this._longMonthsParse,g),e!==-1?e:(e=le.call(this._shortMonthsParse,g),e!==-1?e:null))}function ka(a,b,c){var d,e,f;if(this._monthsParseExact)return ja.call(this,a,b,c);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;d<12;d++){if(e=m([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function la(a,b){var c;if(!a.isValid())return a;if("string"==typeof b)if(/^\d+$/.test(b))b=w(b);else if(b=a.localeData().monthsParse(b),!h(b))return a;return c=Math.min(a.date(),ga(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ma(a){return null!=a?(la(this,a),c.updateOffset(this,!0),this):R(this,"Month")}function na(){return ga(this.year(),this.month())}function oa(a){return this._monthsParseExact?(k(this,"_monthsRegex")||qa.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):(k(this,"_monthsShortRegex")||(this._monthsShortRegex=pe),this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex)}function pa(a){return this._monthsParseExact?(k(this,"_monthsRegex")||qa.call(this),a?this._monthsStrictRegex:this._monthsRegex):(k(this,"_monthsRegex")||(this._monthsRegex=qe),this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex)}function qa(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;b<12;b++)c=m([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(d.sort(a),e.sort(a),f.sort(a),b=0;b<12;b++)d[b]=ca(d[b]),e[b]=ca(e[b]);for(b=0;b<24;b++)f[b]=ca(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function ra(a){return sa(a)?366:365}function sa(a){return a%4===0&&a%100!==0||a%400===0}function ta(){return sa(this.year())}function ua(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return a<100&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function va(a){var b=new Date(Date.UTC.apply(null,arguments));return a<100&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function wa(a,b,c){var d=7+b-c,e=(7+va(a,0,d).getUTCDay()-b)%7;return-e+d-1}function xa(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=wa(a,d,e),j=1+7*(b-1)+h+i;return j<=0?(f=a-1,g=ra(f)+j):j>ra(a)?(f=a+1,g=j-ra(a)):(f=a,g=j),{year:f,dayOfYear:g}}function ya(a,b,c){var d,e,f=wa(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return g<1?(e=a.year()-1,d=g+za(e,b,c)):g>za(a.year(),b,c)?(d=g-za(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function za(a,b,c){var d=wa(a,b,c),e=wa(a+1,b,c);return(ra(a)-d+e)/7}function Aa(a){return ya(a,this._week.dow,this._week.doy).week}function Ba(){return this._week.dow}function Ca(){return this._week.doy}function Da(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ea(a){var b=ya(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function Fa(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Ga(a,b){return"string"==typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Ha(a,b){return a?e(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:this._weekdays}function Ia(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort}function Ja(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin}function Ka(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d<7;++d)f=m([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=le.call(this._weekdaysParse,g),e!==-1?e:null):"ddd"===b?(e=le.call(this._shortWeekdaysParse,g),e!==-1?e:null):(e=le.call(this._minWeekdaysParse,g),e!==-1?e:null):"dddd"===b?(e=le.call(this._weekdaysParse,g),e!==-1?e:(e=le.call(this._shortWeekdaysParse,g),e!==-1?e:(e=le.call(this._minWeekdaysParse,g),e!==-1?e:null))):"ddd"===b?(e=le.call(this._shortWeekdaysParse,g),e!==-1?e:(e=le.call(this._weekdaysParse,g),e!==-1?e:(e=le.call(this._minWeekdaysParse,g),e!==-1?e:null))):(e=le.call(this._minWeekdaysParse,g),e!==-1?e:(e=le.call(this._weekdaysParse,g),e!==-1?e:(e=le.call(this._shortWeekdaysParse,g),e!==-1?e:null)))}function La(a,b,c){var d,e,f;if(this._weekdaysParseExact)return Ka.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;d<7;d++){if(e=m([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function Ma(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Fa(a,this.localeData()),this.add(a-b,"d")):b}function Na(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Oa(a){if(!this.isValid())return null!=a?this:NaN;if(null!=a){var b=Ga(a,this.localeData());return this.day(this.day()%7?b:b-7)}return this.day()||7}function Pa(a){return this._weekdaysParseExact?(k(this,"_weekdaysRegex")||Sa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(k(this,"_weekdaysRegex")||(this._weekdaysRegex=we),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function Qa(a){return this._weekdaysParseExact?(k(this,"_weekdaysRegex")||Sa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(k(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=xe),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ra(a){return this._weekdaysParseExact?(k(this,"_weekdaysRegex")||Sa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(k(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ye),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Sa(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],h=[],i=[],j=[];for(b=0;b<7;b++)c=m([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),h.push(e),i.push(f),j.push(d),j.push(e),j.push(f);for(g.sort(a),h.sort(a),i.sort(a),j.sort(a),b=0;b<7;b++)h[b]=ca(h[b]),i[b]=ca(i[b]),j[b]=ca(j[b]);this._weekdaysRegex=new RegExp("^("+j.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}function Ta(){return this.hours()%12||12}function Ua(){return this.hours()||24}function Va(a,b){W(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Wa(a,b){return b._meridiemParse}function Xa(a){return"p"===(a+"").toLowerCase().charAt(0)}function Ya(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Za(a){return a?a.toLowerCase().replace("_","-"):a}function $a(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Za(a[f]).split("-"),b=e.length,c=Za(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=_a(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&x(e,c,!0)>=b-1)break;b--}f++}return null}function _a(c){var d=null;if(!De[c]&&"undefined"!=typeof b&&b&&b.exports)try{d=ze._abbr,a("./locale/"+c),ab(d)}catch(e){}return De[c]}function ab(a,b){var c;return a&&(c=r(b)?db(a):bb(a,b),c&&(ze=c)),ze._abbr}function bb(a,b){if(null!==b){var c=Ce;if(b.abbr=a,null!=De[a])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=De[a]._config;else if(null!=b.parentLocale){if(null==De[b.parentLocale])return Ee[b.parentLocale]||(Ee[b.parentLocale]=[]),Ee[b.parentLocale].push({name:a,config:b}),null;c=De[b.parentLocale]._config}return De[a]=new E(D(c,b)),Ee[a]&&Ee[a].forEach(function(a){bb(a.name,a.config)}),ab(a),De[a]}return delete De[a],null}function cb(a,b){if(null!=b){var c,d=Ce;null!=De[a]&&(d=De[a]._config),b=D(d,b),c=new E(b),c.parentLocale=De[a],De[a]=c,ab(a)}else null!=De[a]&&(null!=De[a].parentLocale?De[a]=De[a].parentLocale:null!=De[a]&&delete De[a]);return De[a]}function db(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return ze;if(!e(a)){if(b=_a(a))return b;a=[a]}return $a(a)}function eb(){return yd(De)}function fb(a){var b,c=a._a;return c&&o(a).overflow===-2&&(b=c[de]<0||c[de]>11?de:c[ee]<1||c[ee]>ga(c[ce],c[de])?ee:c[fe]<0||c[fe]>24||24===c[fe]&&(0!==c[ge]||0!==c[he]||0!==c[ie])?fe:c[ge]<0||c[ge]>59?ge:c[he]<0||c[he]>59?he:c[ie]<0||c[ie]>999?ie:-1,o(a)._overflowDayOfYear&&(b<ce||b>ee)&&(b=ee),o(a)._overflowWeeks&&b===-1&&(b=je),o(a)._overflowWeekday&&b===-1&&(b=ke),o(a).overflow=b),a}function gb(a){var b,c,d,e,f,g,h=a._i,i=Fe.exec(h)||Ge.exec(h);if(i){for(o(a).iso=!0,b=0,c=Ie.length;b<c;b++)if(Ie[b][1].exec(i[1])){e=Ie[b][0],d=Ie[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Je.length;b<c;b++)if(Je[b][1].exec(i[3])){f=(i[2]||" ")+Je[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!He.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),mb(a)}else a._isValid=!1}function hb(a){var b=Ke.exec(a._i);return null!==b?void(a._d=new Date((+b[1]))):(gb(a),void(a._isValid===!1&&(delete a._isValid,c.createFromInputFallback(a))))}function ib(a,b,c){return null!=a?a:null!=b?b:c}function jb(a){var b=new Date(c.now());return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function kb(a){var b,c,d,e,f=[];if(!a._d){for(d=jb(a),a._w&&null==a._a[ee]&&null==a._a[de]&&lb(a),a._dayOfYear&&(e=ib(a._a[ce],d[ce]),a._dayOfYear>ra(e)&&(o(a)._overflowDayOfYear=!0),c=va(e,0,a._dayOfYear),a._a[de]=c.getUTCMonth(),a._a[ee]=c.getUTCDate()),b=0;b<3&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;b<7;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[fe]&&0===a._a[ge]&&0===a._a[he]&&0===a._a[ie]&&(a._nextDay=!0,a._a[fe]=0),a._d=(a._useUTC?va:ua).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[fe]=24)}}function lb(a){var b,c,d,e,f,g,h,i;if(b=a._w,null!=b.GG||null!=b.W||null!=b.E)f=1,g=4,c=ib(b.GG,a._a[ce],ya(ub(),1,4).year),d=ib(b.W,1),e=ib(b.E,1),(e<1||e>7)&&(i=!0);else{f=a._locale._week.dow,g=a._locale._week.doy;var j=ya(ub(),f,g);c=ib(b.gg,a._a[ce],j.year),d=ib(b.w,j.week),null!=b.d?(e=b.d,(e<0||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f}d<1||d>za(c,f,g)?o(a)._overflowWeeks=!0:null!=i?o(a)._overflowWeekday=!0:(h=xa(c,d,e,f,g),a._a[ce]=h.year,a._dayOfYear=h.dayOfYear)}function mb(a){if(a._f===c.ISO_8601)return void gb(a);a._a=[],o(a).empty=!0;var b,d,e,f,g,h=""+a._i,i=h.length,j=0;for(e=$(a._f,a._locale).match(Hd)||[],b=0;b<e.length;b++)f=e[b],d=(h.match(aa(f,a))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&o(a).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),Kd[f]?(d?o(a).empty=!1:o(a).unusedTokens.push(f),fa(f,d,a)):a._strict&&!d&&o(a).unusedTokens.push(f);o(a).charsLeftOver=i-j,h.length>0&&o(a).unusedInput.push(h),a._a[fe]<=12&&o(a).bigHour===!0&&a._a[fe]>0&&(o(a).bigHour=void 0),o(a).parsedDateParts=a._a.slice(0),o(a).meridiem=a._meridiem,a._a[fe]=nb(a._locale,a._a[fe],a._meridiem),kb(a),fb(a)}function nb(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&b<12&&(b+=12),d||12!==b||(b=0),b):b}function ob(a){var b,c,d,e,f;if(0===a._f.length)return o(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=s({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],mb(b),p(b)&&(f+=o(b).charsLeftOver,f+=10*o(b).unusedTokens.length,o(b).score=f,(null==d||f<d)&&(d=f,c=b));l(a,c||b)}function pb(a){if(!a._d){var b=N(a._i);a._a=j([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),kb(a)}}function qb(a){var b=new t(fb(rb(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function rb(a){var b=a._i,c=a._f;return a._locale=a._locale||db(a._l),null===b||void 0===c&&""===b?q({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),u(b)?new t(fb(b)):(i(b)?a._d=b:e(c)?ob(a):c?mb(a):sb(a),p(a)||(a._d=null),a))}function sb(a){var b=a._i;void 0===b?a._d=new Date(c.now()):i(b)?a._d=new Date(b.valueOf()):"string"==typeof b?hb(a):e(b)?(a._a=j(b.slice(0),function(a){return parseInt(a,10)}),kb(a)):"object"==typeof b?pb(a):h(b)?a._d=new Date(b):c.createFromInputFallback(a)}function tb(a,b,c,d,h){var i={};return c!==!0&&c!==!1||(d=c,c=void 0),(f(a)&&g(a)||e(a)&&0===a.length)&&(a=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=h,i._l=c,i._i=a,i._f=b,i._strict=d,qb(i)}function ub(a,b,c,d){return tb(a,b,c,d,!1)}function vb(a,b){var c,d;if(1===b.length&&e(b[0])&&(b=b[0]),!b.length)return ub();for(c=b[0],d=1;d<b.length;++d)b[d].isValid()&&!b[d][a](c)||(c=b[d]);return c}function wb(){var a=[].slice.call(arguments,0);return vb("isBefore",a)}function xb(){var a=[].slice.call(arguments,0);return vb("isAfter",a)}function yb(a){var b=N(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+1e3*h*60*60,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=db(),this._bubble()}function zb(a){return a instanceof yb}function Ab(a){return a<0?Math.round(-1*a)*-1:Math.round(a)}function Bb(a,b){W(a,0,0,function(){var a=this.utcOffset(),c="+";return a<0&&(a=-a,c="-"),c+V(~~(a/60),2)+b+V(~~a%60,2)})}function Cb(a,b){var c=(b||"").match(a);if(null===c)return null;var d=c[c.length-1]||[],e=(d+"").match(Oe)||["-",0,0],f=+(60*e[1])+w(e[2]);return 0===f?0:"+"===e[0]?f:-f}function Db(a,b){var d,e;return b._isUTC?(d=b.clone(),e=(u(a)||i(a)?a.valueOf():ub(a).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+e),c.updateOffset(d,!1),d):ub(a).local()}function Eb(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Fb(a,b){var d,e=this._offset||0;if(!this.isValid())return null!=a?this:NaN;if(null!=a){if("string"==typeof a){if(a=Cb(Zd,a),null===a)return this}else Math.abs(a)<16&&(a=60*a);return!this._isUTC&&b&&(d=Eb(this)),this._offset=a,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==a&&(!b||this._changeInProgress?Vb(this,Qb(a-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?e:Eb(this)}function Gb(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Hb(a){return this.utcOffset(0,a)}function Ib(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Eb(this),"m")),this}function Jb(){if(null!=this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var a=Cb(Yd,this._i);null!=a?this.utcOffset(a):this.utcOffset(0,!0)}return this}function Kb(a){return!!this.isValid()&&(a=a?ub(a).utcOffset():0,(this.utcOffset()-a)%60===0)}function Lb(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Mb(){if(!r(this._isDSTShifted))return this._isDSTShifted;var a={};if(s(a,this),a=rb(a),a._a){var b=a._isUTC?m(a._a):ub(a._a);this._isDSTShifted=this.isValid()&&x(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Nb(){return!!this.isValid()&&!this._isUTC}function Ob(){return!!this.isValid()&&this._isUTC}function Pb(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Qb(a,b){var c,d,e,f=a,g=null;return zb(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:h(a)?(f={},b?f[b]=a:f.milliseconds=a):(g=Pe.exec(a))?(c="-"===g[1]?-1:1,f={y:0,d:w(g[ee])*c,h:w(g[fe])*c,m:w(g[ge])*c,s:w(g[he])*c,ms:w(Ab(1e3*g[ie]))*c}):(g=Qe.exec(a))?(c="-"===g[1]?-1:1,f={y:Rb(g[2],c),M:Rb(g[3],c),w:Rb(g[4],c),d:Rb(g[5],c),h:Rb(g[6],c),m:Rb(g[7],c),s:Rb(g[8],c)}):null==f?f={}:"object"==typeof f&&("from"in f||"to"in f)&&(e=Tb(ub(f.from),ub(f.to)),f={},f.ms=e.milliseconds,f.M=e.months),d=new yb(f),zb(a)&&k(a,"_locale")&&(d._locale=a._locale),d}function Rb(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function Sb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Tb(a,b){var c;return a.isValid()&&b.isValid()?(b=Db(b,a),a.isBefore(b)?c=Sb(a,b):(c=Sb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function Ub(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(A(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Qb(c,d),Vb(this,e,a),this}}function Vb(a,b,d,e){var f=b._milliseconds,g=Ab(b._days),h=Ab(b._months);a.isValid()&&(e=null==e||e,f&&a._d.setTime(a._d.valueOf()+f*d),g&&S(a,"Date",R(a,"Date")+g*d),h&&la(a,R(a,"Month")+h*d),e&&c.updateOffset(a,g||h))}function Wb(a,b){var c=a.diff(b,"days",!0);return c<-6?"sameElse":c<-1?"lastWeek":c<0?"lastDay":c<1?"sameDay":c<2?"nextDay":c<7?"nextWeek":"sameElse"}function Xb(a,b){var d=a||ub(),e=Db(d,this).startOf("day"),f=c.calendarFormat(this,e)||"sameElse",g=b&&(B(b[f])?b[f].call(this,d):b[f]);return this.format(g||this.localeData().calendar(f,this,ub(d)))}function Yb(){return new t(this)}function Zb(a,b){var c=u(a)?a:ub(a);return!(!this.isValid()||!c.isValid())&&(b=M(r(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(b).valueOf())}function $b(a,b){var c=u(a)?a:ub(a);return!(!this.isValid()||!c.isValid())&&(b=M(r(b)?"millisecond":b),"millisecond"===b?this.valueOf()<c.valueOf():this.clone().endOf(b).valueOf()<c.valueOf())}function _b(a,b,c,d){return d=d||"()",("("===d[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===d[1]?this.isBefore(b,c):!this.isAfter(b,c))}function ac(a,b){var c,d=u(a)?a:ub(a);return!(!this.isValid()||!d.isValid())&&(b=M(b||"millisecond"),"millisecond"===b?this.valueOf()===d.valueOf():(c=d.valueOf(),this.clone().startOf(b).valueOf()<=c&&c<=this.clone().endOf(b).valueOf()))}function bc(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function cc(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function dc(a,b,c){var d,e,f,g;return this.isValid()?(d=Db(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=M(b),"year"===b||"month"===b||"quarter"===b?(g=ec(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:v(g)):NaN):NaN}function ec(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return b-f<0?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)||0}function fc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function gc(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?B(Date.prototype.toISOString)?this.toDate().toISOString():Z(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Z(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function hc(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",b="";this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",b="Z");var c="["+a+'("]',d=0<this.year()&&this.year()<=9999?"YYYY":"YYYYYY",e="-MM-DD[T]HH:mm:ss.SSS",f=b+'[")]';return this.format(c+d+e+f)}function ic(a){a||(a=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var b=Z(this,a);return this.localeData().postformat(b)}function jc(a,b){return this.isValid()&&(u(a)&&a.isValid()||ub(a).isValid())?Qb({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function kc(a){return this.from(ub(),a)}function lc(a,b){return this.isValid()&&(u(a)&&a.isValid()||ub(a).isValid())?Qb({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function mc(a){return this.to(ub(),a)}function nc(a){var b;return void 0===a?this._locale._abbr:(b=db(a),null!=b&&(this._locale=b),this)}function oc(){return this._locale}function pc(a){switch(a=M(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function qc(a){return a=M(a),void 0===a||"millisecond"===a?this:("date"===a&&(a="day"),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms"))}function rc(){return this._d.valueOf()-6e4*(this._offset||0)}function sc(){return Math.floor(this.valueOf()/1e3)}function tc(){return new Date(this.valueOf())}function uc(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function vc(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function wc(){return this.isValid()?this.toISOString():null}function xc(){return p(this)}function yc(){return l({},o(this))}function zc(){return o(this).overflow}function Ac(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Bc(a,b){W(0,[a,a.length],0,b)}function Cc(a){return Gc.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Dc(a){return Gc.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Ec(){return za(this.year(),1,4)}function Fc(){var a=this.localeData()._week;return za(this.year(),a.dow,a.doy)}function Gc(a,b,c,d,e){var f;return null==a?ya(this,d,e).year:(f=za(a,d,e),b>f&&(b=f),Hc.call(this,a,b,c,d,e))}function Hc(a,b,c,d,e){var f=xa(a,b,c,d,e),g=va(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Ic(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Jc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function Kc(a,b){b[ie]=w(1e3*("0."+a))}function Lc(){return this._isUTC?"UTC":""}function Mc(){return this._isUTC?"Coordinated Universal Time":""}function Nc(a){return ub(1e3*a)}function Oc(){return ub.apply(null,arguments).parseZone()}function Pc(a){return a}function Qc(a,b,c,d){var e=db(),f=m().set(d,b);return e[c](f,a)}function Rc(a,b,c){if(h(a)&&(b=a,a=void 0),a=a||"",null!=b)return Qc(a,b,c,"month");var d,e=[];for(d=0;d<12;d++)e[d]=Qc(a,d,c,"month");return e}function Sc(a,b,c,d){"boolean"==typeof a?(h(b)&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,h(b)&&(c=b,b=void 0),b=b||"");var e=db(),f=a?e._week.dow:0;if(null!=c)return Qc(b,(c+f)%7,d,"day");var g,i=[];for(g=0;g<7;g++)i[g]=Qc(b,(g+f)%7,d,"day");return i}function Tc(a,b){return Rc(a,b,"months")}function Uc(a,b){return Rc(a,b,"monthsShort")}function Vc(a,b,c){return Sc(a,b,c,"weekdays")}function Wc(a,b,c){return Sc(a,b,c,"weekdaysShort")}function Xc(a,b,c){return Sc(a,b,c,"weekdaysMin")}function Yc(){var a=this._data;return this._milliseconds=_e(this._milliseconds),this._days=_e(this._days),this._months=_e(this._months),a.milliseconds=_e(a.milliseconds),a.seconds=_e(a.seconds),a.minutes=_e(a.minutes),a.hours=_e(a.hours),a.months=_e(a.months),a.years=_e(a.years),this}function Zc(a,b,c,d){var e=Qb(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function $c(a,b){return Zc(this,a,b,1)}function _c(a,b){return Zc(this,a,b,-1)}function ad(a){return a<0?Math.floor(a):Math.ceil(a)}function bd(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||f<=0&&g<=0&&h<=0||(f+=864e5*ad(dd(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=v(f/1e3),i.seconds=a%60,b=v(a/60),i.minutes=b%60,c=v(b/60),i.hours=c%24,g+=v(c/24),e=v(cd(g)),h+=e,g-=ad(dd(e)),d=v(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function cd(a){return 4800*a/146097}function dd(a){return 146097*a/4800}function ed(a){var b,c,d=this._milliseconds;if(a=M(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+cd(b),"month"===a?c:c/12;switch(b=this._days+Math.round(dd(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function fd(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)}function gd(a){return function(){return this.as(a)}}function hd(a){return a=M(a),this[a+"s"]()}function id(a){return function(){return this._data[a]}}function jd(){return v(this.days()/7)}function kd(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ld(a,b,c){var d=Qb(a).abs(),e=qf(d.as("s")),f=qf(d.as("m")),g=qf(d.as("h")),h=qf(d.as("d")),i=qf(d.as("M")),j=qf(d.as("y")),k=e<rf.s&&["s",e]||f<=1&&["m"]||f<rf.m&&["mm",f]||g<=1&&["h"]||g<rf.h&&["hh",g]||h<=1&&["d"]||h<rf.d&&["dd",h]||i<=1&&["M"]||i<rf.M&&["MM",i]||j<=1&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,kd.apply(null,k)}function md(a){return void 0===a?qf:"function"==typeof a&&(qf=a,!0)}function nd(a,b){return void 0!==rf[a]&&(void 0===b?rf[a]:(rf[a]=b,!0))}function od(a){var b=this.localeData(),c=ld(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function pd(){var a,b,c,d=sf(this._milliseconds)/1e3,e=sf(this._days),f=sf(this._months);a=v(d/60),b=v(a/60),d%=60,a%=60,c=v(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(m<0?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var qd,rd;rd=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;d<c;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1};var sd=rd,td=c.momentProperties=[],ud=!1,vd={};c.suppressDeprecationWarnings=!1,c.deprecationHandler=null;var wd;wd=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)k(a,b)&&c.push(b);return c};var xd,yd=wd,zd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ad={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Bd="Invalid date",Cd="%d",Dd=/\d{1,2}/,Ed={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Fd={},Gd={},Hd=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Id=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Jd={},Kd={},Ld=/\d/,Md=/\d\d/,Nd=/\d{3}/,Od=/\d{4}/,Pd=/[+-]?\d{6}/,Qd=/\d\d?/,Rd=/\d\d\d\d?/,Sd=/\d\d\d\d\d\d?/,Td=/\d{1,3}/,Ud=/\d{1,4}/,Vd=/[+-]?\d{1,6}/,Wd=/\d+/,Xd=/[+-]?\d+/,Yd=/Z|[+-]\d\d:?\d\d/gi,Zd=/Z|[+-]\d\d(?::?\d\d)?/gi,$d=/[+-]?\d+(\.\d{1,3})?/,_d=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ae={},be={},ce=0,de=1,ee=2,fe=3,ge=4,he=5,ie=6,je=7,ke=8;xd=Array.prototype.indexOf?Array.prototype.indexOf:function(a){var b;for(b=0;b<this.length;++b)if(this[b]===a)return b;return-1};var le=xd;W("M",["MM",2],"Mo",function(){return this.month()+1}),W("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),W("MMMM",0,0,function(a){return this.localeData().months(this,a)}),L("month","M"),O("month",8),_("M",Qd),_("MM",Qd,Md),_("MMM",function(a,b){return b.monthsShortRegex(a)}),_("MMMM",function(a,b){return b.monthsRegex(a)}),da(["M","MM"],function(a,b){b[de]=w(a)-1}),da(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[de]=e:o(c).invalidMonth=a});var me=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ne="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),oe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),pe=_d,qe=_d;W("Y",0,0,function(){var a=this.year();return a<=9999?""+a:"+"+a}),W(0,["YY",2],0,function(){return this.year()%100}),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),L("year","y"),O("year",1),_("Y",Xd),_("YY",Qd,Md),_("YYYY",Ud,Od),_("YYYYY",Vd,Pd),_("YYYYYY",Vd,Pd),da(["YYYYY","YYYYYY"],ce),da("YYYY",function(a,b){b[ce]=2===a.length?c.parseTwoDigitYear(a):w(a)}),da("YY",function(a,b){b[ce]=c.parseTwoDigitYear(a)}),da("Y",function(a,b){b[ce]=parseInt(a,10)}),c.parseTwoDigitYear=function(a){return w(a)+(w(a)>68?1900:2e3)};var re=Q("FullYear",!0);W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),O("week",5),O("isoWeek",5),_("w",Qd),_("ww",Qd,Md),_("W",Qd),_("WW",Qd,Md),ea(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=w(a)});var se={dow:0,doy:6};W("d",0,"do","day"),W("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),W("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),W("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),O("day",11),O("weekday",11),O("isoWeekday",11),_("d",Qd),_("e",Qd),_("E",Qd),_("dd",function(a,b){return b.weekdaysMinRegex(a)}),_("ddd",function(a,b){return b.weekdaysShortRegex(a)}),_("dddd",function(a,b){return b.weekdaysRegex(a)}),ea(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:o(c).invalidWeekday=a}),ea(["d","e","E"],function(a,b,c,d){b[d]=w(a)});var te="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ue="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),we=_d,xe=_d,ye=_d;
W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Ta),W("k",["kk",2],0,Ua),W("hmm",0,0,function(){return""+Ta.apply(this)+V(this.minutes(),2)}),W("hmmss",0,0,function(){return""+Ta.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Va("a",!0),Va("A",!1),L("hour","h"),O("hour",13),_("a",Wa),_("A",Wa),_("H",Qd),_("h",Qd),_("HH",Qd,Md),_("hh",Qd,Md),_("hmm",Rd),_("hmmss",Sd),_("Hmm",Rd),_("Hmmss",Sd),da(["H","HH"],fe),da(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),da(["h","hh"],function(a,b,c){b[fe]=w(a),o(c).bigHour=!0}),da("hmm",function(a,b,c){var d=a.length-2;b[fe]=w(a.substr(0,d)),b[ge]=w(a.substr(d)),o(c).bigHour=!0}),da("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[fe]=w(a.substr(0,d)),b[ge]=w(a.substr(d,2)),b[he]=w(a.substr(e)),o(c).bigHour=!0}),da("Hmm",function(a,b,c){var d=a.length-2;b[fe]=w(a.substr(0,d)),b[ge]=w(a.substr(d))}),da("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[fe]=w(a.substr(0,d)),b[ge]=w(a.substr(d,2)),b[he]=w(a.substr(e))});var ze,Ae=/[ap]\.?m?\.?/i,Be=Q("Hours",!0),Ce={calendar:zd,longDateFormat:Ad,invalidDate:Bd,ordinal:Cd,ordinalParse:Dd,relativeTime:Ed,months:ne,monthsShort:oe,week:se,weekdays:te,weekdaysMin:ve,weekdaysShort:ue,meridiemParse:Ae},De={},Ee={},Fe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ge=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,He=/Z|[+-]\d\d(?::?\d\d)?/,Ie=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Je=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ke=/^\/?Date\((\-?\d+)/i;c.createFromInputFallback=z("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),c.ISO_8601=function(){};var Le=z("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=ub.apply(null,arguments);return this.isValid()&&a.isValid()?a<this?this:a:q()}),Me=z("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=ub.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:q()}),Ne=function(){return Date.now?Date.now():+new Date};Bb("Z",":"),Bb("ZZ",""),_("Z",Zd),_("ZZ",Zd),da(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Cb(Zd,a)});var Oe=/([\+\-]|\d\d)/gi;c.updateOffset=function(){};var Pe=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Qe=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Qb.fn=yb.prototype;var Re=Ub(1,"add"),Se=Ub(-1,"subtract");c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Te=z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Bc("gggg","weekYear"),Bc("ggggg","weekYear"),Bc("GGGG","isoWeekYear"),Bc("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),O("weekYear",1),O("isoWeekYear",1),_("G",Xd),_("g",Xd),_("GG",Qd,Md),_("gg",Qd,Md),_("GGGG",Ud,Od),_("gggg",Ud,Od),_("GGGGG",Vd,Pd),_("ggggg",Vd,Pd),ea(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=w(a)}),ea(["gg","GG"],function(a,b,d,e){b[e]=c.parseTwoDigitYear(a)}),W("Q",0,"Qo","quarter"),L("quarter","Q"),O("quarter",7),_("Q",Ld),da("Q",function(a,b){b[de]=3*(w(a)-1)}),W("D",["DD",2],"Do","date"),L("date","D"),O("date",9),_("D",Qd),_("DD",Qd,Md),_("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),da(["D","DD"],ee),da("Do",function(a,b){b[ee]=w(a.match(Qd)[0],10)});var Ue=Q("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),O("dayOfYear",4),_("DDD",Td),_("DDDD",Nd),da(["DDD","DDDD"],function(a,b,c){c._dayOfYear=w(a)}),W("m",["mm",2],0,"minute"),L("minute","m"),O("minute",14),_("m",Qd),_("mm",Qd,Md),da(["m","mm"],ge);var Ve=Q("Minutes",!1);W("s",["ss",2],0,"second"),L("second","s"),O("second",15),_("s",Qd),_("ss",Qd,Md),da(["s","ss"],he);var We=Q("Seconds",!1);W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),O("millisecond",16),_("S",Td,Ld),_("SS",Td,Md),_("SSS",Td,Nd);var Xe;for(Xe="SSSS";Xe.length<=9;Xe+="S")_(Xe,Wd);for(Xe="S";Xe.length<=9;Xe+="S")da(Xe,Kc);var Ye=Q("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var Ze=t.prototype;Ze.add=Re,Ze.calendar=Xb,Ze.clone=Yb,Ze.diff=dc,Ze.endOf=qc,Ze.format=ic,Ze.from=jc,Ze.fromNow=kc,Ze.to=lc,Ze.toNow=mc,Ze.get=T,Ze.invalidAt=zc,Ze.isAfter=Zb,Ze.isBefore=$b,Ze.isBetween=_b,Ze.isSame=ac,Ze.isSameOrAfter=bc,Ze.isSameOrBefore=cc,Ze.isValid=xc,Ze.lang=Te,Ze.locale=nc,Ze.localeData=oc,Ze.max=Me,Ze.min=Le,Ze.parsingFlags=yc,Ze.set=U,Ze.startOf=pc,Ze.subtract=Se,Ze.toArray=uc,Ze.toObject=vc,Ze.toDate=tc,Ze.toISOString=gc,Ze.inspect=hc,Ze.toJSON=wc,Ze.toString=fc,Ze.unix=sc,Ze.valueOf=rc,Ze.creationData=Ac,Ze.year=re,Ze.isLeapYear=ta,Ze.weekYear=Cc,Ze.isoWeekYear=Dc,Ze.quarter=Ze.quarters=Ic,Ze.month=ma,Ze.daysInMonth=na,Ze.week=Ze.weeks=Da,Ze.isoWeek=Ze.isoWeeks=Ea,Ze.weeksInYear=Fc,Ze.isoWeeksInYear=Ec,Ze.date=Ue,Ze.day=Ze.days=Ma,Ze.weekday=Na,Ze.isoWeekday=Oa,Ze.dayOfYear=Jc,Ze.hour=Ze.hours=Be,Ze.minute=Ze.minutes=Ve,Ze.second=Ze.seconds=We,Ze.millisecond=Ze.milliseconds=Ye,Ze.utcOffset=Fb,Ze.utc=Hb,Ze.local=Ib,Ze.parseZone=Jb,Ze.hasAlignedHourOffset=Kb,Ze.isDST=Lb,Ze.isLocal=Nb,Ze.isUtcOffset=Ob,Ze.isUtc=Pb,Ze.isUTC=Pb,Ze.zoneAbbr=Lc,Ze.zoneName=Mc,Ze.dates=z("dates accessor is deprecated. Use date instead.",Ue),Ze.months=z("months accessor is deprecated. Use month instead",ma),Ze.years=z("years accessor is deprecated. Use year instead",re),Ze.zone=z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Gb),Ze.isDSTShifted=z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Mb);var $e=E.prototype;$e.calendar=F,$e.longDateFormat=G,$e.invalidDate=H,$e.ordinal=I,$e.preparse=Pc,$e.postformat=Pc,$e.relativeTime=J,$e.pastFuture=K,$e.set=C,$e.months=ha,$e.monthsShort=ia,$e.monthsParse=ka,$e.monthsRegex=pa,$e.monthsShortRegex=oa,$e.week=Aa,$e.firstDayOfYear=Ca,$e.firstDayOfWeek=Ba,$e.weekdays=Ha,$e.weekdaysMin=Ja,$e.weekdaysShort=Ia,$e.weekdaysParse=La,$e.weekdaysRegex=Pa,$e.weekdaysShortRegex=Qa,$e.weekdaysMinRegex=Ra,$e.isPM=Xa,$e.meridiem=Ya,ab("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===w(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),c.lang=z("moment.lang is deprecated. Use moment.locale instead.",ab),c.langData=z("moment.langData is deprecated. Use moment.localeData instead.",db);var _e=Math.abs,af=gd("ms"),bf=gd("s"),cf=gd("m"),df=gd("h"),ef=gd("d"),ff=gd("w"),gf=gd("M"),hf=gd("y"),jf=id("milliseconds"),kf=id("seconds"),lf=id("minutes"),mf=id("hours"),nf=id("days"),of=id("months"),pf=id("years"),qf=Math.round,rf={s:45,m:45,h:22,d:26,M:11},sf=Math.abs,tf=yb.prototype;return tf.abs=Yc,tf.add=$c,tf.subtract=_c,tf.as=ed,tf.asMilliseconds=af,tf.asSeconds=bf,tf.asMinutes=cf,tf.asHours=df,tf.asDays=ef,tf.asWeeks=ff,tf.asMonths=gf,tf.asYears=hf,tf.valueOf=fd,tf._bubble=bd,tf.get=hd,tf.milliseconds=jf,tf.seconds=kf,tf.minutes=lf,tf.hours=mf,tf.days=nf,tf.weeks=jd,tf.months=of,tf.years=pf,tf.humanize=od,tf.toISOString=pd,tf.toString=pd,tf.toJSON=pd,tf.locale=nc,tf.localeData=oc,tf.toIsoString=z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",pd),tf.lang=Te,W("X",0,0,"unix"),W("x",0,0,"valueOf"),_("x",Xd),_("X",$d),da("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),da("x",function(a,b,c){c._d=new Date(w(a))}),c.version="2.17.1",d(ub),c.fn=Ze,c.min=wb,c.max=xb,c.now=Ne,c.utc=m,c.unix=Nc,c.months=Tc,c.isDate=i,c.locale=ab,c.invalid=q,c.duration=Qb,c.isMoment=u,c.weekdays=Vc,c.parseZone=Oc,c.localeData=db,c.isDuration=zb,c.monthsShort=Uc,c.weekdaysMin=Xc,c.defineLocale=bb,c.updateLocale=cb,c.locales=eb,c.weekdaysShort=Wc,c.normalizeUnits=M,c.relativeTimeRounding=md,c.relativeTimeThreshold=nd,c.calendarFormat=Wb,c.prototype=Ze,c})},{}],239:[function(a,b,c){(function(c){
//     MIT License - http://opensource.org/licenses/mit-license.php
!function(d){"use strict";function e(){var a=d.crypto||d.msCrypto;if(!k&&a&&a.getRandomValues)try{var b=new Uint8Array(16);n=k=function(){return a.getRandomValues(b),b},k()}catch(c){}if(!k){var e=new Array(16);l=k=function(){for(var a,b=0;b<16;b++)0===(3&b)&&(a=4294967296*Math.random()),e[b]=a>>>((3&b)<<3)&255;return e},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function f(){if("function"==typeof a)try{var b=a("crypto").randomBytes;m=k=b&&function(){return b(16)},k()}catch(c){}}function g(a,b,c){var d=b&&c||0,e=0;for(b=b||[],a.toLowerCase().replace(/[0-9a-f]{2}/g,function(a){e<16&&(b[d+e++]=r[a])});e<16;)b[d+e++]=0;return b}function h(a,b){var c=b||0,d=q;return d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]}function i(a,b,c){var d=b&&c||0,e=b||[];a=a||{};var f=null!=a.clockseq?a.clockseq:v,g=null!=a.msecs?a.msecs:(new Date).getTime(),i=null!=a.nsecs?a.nsecs:x+1,j=g-w+(i-x)/1e4;if(j<0&&null==a.clockseq&&(f=f+1&16383),(j<0||g>w)&&null==a.nsecs&&(i=0),i>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");w=g,x=i,v=f,g+=122192928e5;var k=(1e4*(268435455&g)+i)%4294967296;e[d++]=k>>>24&255,e[d++]=k>>>16&255,e[d++]=k>>>8&255,e[d++]=255&k;var l=g/4294967296*1e4&268435455;e[d++]=l>>>8&255,e[d++]=255&l,e[d++]=l>>>24&15|16,e[d++]=l>>>16&255,e[d++]=f>>>8|128,e[d++]=255&f;for(var m=a.node||u,n=0;n<6;n++)e[d+n]=m[n];return b?b:h(e)}function j(a,b,c){var d=b&&c||0;"string"==typeof a&&(b="binary"===a?new p(16):null,a=null),a=a||{};var e=a.random||(a.rng||k)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,b)for(var f=0;f<16;f++)b[d+f]=e[f];return b||h(e)}var k,l,m,n,o;d?e():f();for(var p="function"==typeof c?c:Array,q=[],r={},s=0;s<256;s++)q[s]=(s+256).toString(16).substr(1),r[q[s]]=s;var t=k(),u=[1|t[0],t[1],t[2],t[3],t[4],t[5]],v=16383&(t[6]<<8|t[7]),w=0,x=0,y=j;y.v1=i,y.v4=j,y.parse=g,y.unparse=h,y.BufferClass=p,y._rng=k,y._mathRNG=l,y._nodeRNG=m,y._whatwgRNG=n,"undefined"!=typeof b&&b.exports?b.exports=y:"function"==typeof define&&define.amd?define(function(){return y}):(o=d.uuid,y.noConflict=function(){return d.uuid=o,y},d.uuid=y)}("undefined"!=typeof window?window:null)}).call(this,a("buffer").Buffer)},{buffer:3,crypto:7}],240:[function(a,b,c){var d=[],e=[],f={},g={},h={},i=function(a){return"string"==typeof a?new RegExp("^"+a+"$"):a},j=function(a){return a===a.toUpperCase()?function(a){return a.toUpperCase()}:a[0]===a[0].toUpperCase()?function(a){return a[0].toUpperCase()+a.substr(1)}:function(a){return a.toLowerCase()}},k=function(a,b){if(!a.length||f[a])return a;for(var c=0;c<b.length;c++){var d=b[c];if(d[0].test(a))return a.replace(d[0],d[1])}return a},l=function(a,b,c){return function(d){var e=(""+d).trim().toLowerCase(),f=j(d);return f(b[e]?e:a[e]?a[e]:k(e,c))}},m=b.exports=function(a,b,c){var d=1===b?o(a):n(a);return(c?(0|b)+" ":"")+d},n=m.plural=l(h,g,e),o=m.singular=l(g,h,d);m.addPluralRule=function(a,b){e.unshift([i(a),b])},m.addSingularRule=function(a,b){d.unshift([i(a),b])},m.addUncountableRule=function(a){return"string"==typeof a?f[a.toLowerCase()]=!0:(m.addPluralRule(a,"$&"),void m.addSingularRule(a,"$&"))},m.addIrregularRule=function(a,b){g[b.toLowerCase()]=a.toLowerCase(),h[a.toLowerCase()]=b.toLowerCase()},m.addIrregularRule("I","we"),m.addIrregularRule("me","us"),m.addIrregularRule("he","they"),m.addIrregularRule("she","they"),m.addIrregularRule("them","them"),m.addIrregularRule("myself","ourselves"),m.addIrregularRule("yourself","yourselves"),m.addIrregularRule("itself","themselves"),m.addIrregularRule("herself","themselves"),m.addIrregularRule("himself","themselves"),m.addIrregularRule("themself","themselves"),m.addIrregularRule("canto","cantos"),m.addIrregularRule("hetero","heteros"),m.addIrregularRule("photo","photos"),m.addIrregularRule("zero","zeros"),m.addIrregularRule("piano","pianos"),m.addIrregularRule("portico","porticos"),m.addIrregularRule("pro","pros"),m.addIrregularRule("quarto","quartos"),m.addIrregularRule("kimono","kimonos"),m.addIrregularRule("genus","genera"),m.addIrregularRule("viscus","viscera"),m.addIrregularRule("stigma","stigmata"),m.addIrregularRule("stoma","stomata"),m.addIrregularRule("dogma","dogmata"),m.addIrregularRule("lemma","lemmata"),m.addIrregularRule("schema","schemata"),m.addIrregularRule("anathema","anathemata"),m.addIrregularRule("ox","oxen"),m.addIrregularRule("die","dice"),m.addIrregularRule("foot","feet"),m.addIrregularRule("goose","geese"),m.addIrregularRule("quiz","quizzes"),m.addIrregularRule("human","humans"),m.addIrregularRule("proof","proofs"),m.addIrregularRule("carve","carves"),m.addIrregularRule("valve","valves"),m.addIrregularRule("thief","thieves"),m.addIrregularRule("genie","genies"),m.addIrregularRule("groove","grooves"),m.addPluralRule(/$/,"s"),m.addPluralRule(/s$/,"s"),m.addPluralRule(/(ese)$/,"$1"),m.addPluralRule(/^(ax|test)is$/,"$1es"),m.addPluralRule(/([au]s)$/,"$1es"),m.addPluralRule(/(e[mn]u)s?$/,"$1s"),m.addPluralRule(/([^l]ias|[aeiou]las|[emjzr]as)$/,"$1"),m.addPluralRule(/(bu)s$/,"$1ses"),m.addPluralRule(/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc)(?:us|i)$/,"$1i"),m.addPluralRule(/^(alumn|alg|vertebr)(?:a|ae)$/,"$1ae"),m.addPluralRule(/([^aeiou])o$/,"$1oes"),m.addPluralRule(/^(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/,"$1a"),m.addPluralRule(/^(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|\w+hedr)(?:a|on)$/,"$1a"),m.addPluralRule(/sis$/,"ses"),m.addPluralRule(/(?:([^f])fe|(ar|l|[eo][ao])f)$/,"$1$2ves"),m.addPluralRule(/([^aeiouy]|qu)y$/,"$1ies"),m.addPluralRule(/(x|ch|ss|sh|zz)$/,"$1es"),m.addPluralRule(/(matr|cod|mur|sil|vert|ind)(?:ix|ex)$/,"$1ices"),m.addPluralRule(/^(m|l)(ice|ouse)$/,"$1ice"),m.addPluralRule(/(pe)(rson|ople)$/,"$1ople"),m.addPluralRule(/(child)(ren)?$/,"$1ren"),m.addPluralRule(/(eau)x?$/,"$1x"),m.addPluralRule(/m(a|e)n$/,"men"),m.addSingularRule(/s$/,""),m.addSingularRule(/(ss)$/,"$1"),m.addSingularRule(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(?:sis|ses)$/,"$1sis"),m.addSingularRule(/(^analy)(?:sis|ses)$/,"$1sis"),m.addSingularRule(/([^afor])ves$/,"$1fe"),m.addSingularRule(/(hive|tive|dr?ive)s$/,"$1"),m.addSingularRule(/(ar|l|[eo][ao])ves$/,"$1f"),m.addSingularRule(/([^aeiouy]|qu)ies$/,"$1y"),m.addSingularRule(/(^[pl]ie|tie|zombie)s$/,"$1"),m.addSingularRule(/(x|ch|ss|sh|zz)es$/,"$1"),m.addSingularRule(/^(m|l)ice$/,"$1ouse"),m.addSingularRule(/(bus|alias|[impst]us|atlas|gas)(?:es)?$/,"$1"),m.addSingularRule(/(e[mn]u)s?$/,"$1"),m.addSingularRule(/(o)es$/,"$1"),m.addSingularRule(/^(canoe)s$/,"$1"),m.addSingularRule(/(shoe|movie|move)s$/,"$1"),m.addSingularRule(/(cris|test|diagnos)(?:is|es)$/,"$1is"),m.addSingularRule(/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc)(?:us|i)$/,"$1us"),m.addSingularRule(/^(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)a$/,"$1um"),m.addSingularRule(/^(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|\w+hedr)a$/,"$1on"),m.addSingularRule(/^(alumn|alg|vertebr)ae$/,"$1a"),m.addSingularRule(/(cod|mur|sil|vert|ind)ices$/,"$1ex"),m.addSingularRule(/(matr)ices$/,"$1ix"),m.addSingularRule(/(pe)(rson|ople)$/,"$1rson"),m.addSingularRule(/(child)ren$/,"$1"),m.addSingularRule(/(eau)x$/,"$1"),m.addSingularRule(/men$/,"man"),["advice","agenda","bison","bream","buffalo","carp","chassis","cod","cooperation","corps","digestion","debris","diabetes","energy","equipment","elk","excretion","expertise","flounder","gallows","graffiti","headquarters","health","herpes","highjinks","homework","information","jeans","justice","labour","machinery","mackerel","media","mews","money","moose","news","pike","plankton","pliers","pollution","rain","rice","salmon","scissors","series","sewage","shrimp","species","staff","swine","trout","tuna","whiting","wildebeest"].forEach(m.addUncountableRule),m.addUncountableRule(/pox$/),m.addUncountableRule(/ois$/),m.addUncountableRule(/deer$/),m.addUncountableRule(/fish$/),m.addUncountableRule(/sheep$/),m.addUncountableRule(/measles$/),m.addUncountableRule(/[nrlm]ese$/)},{}],241:[function(a,b,c){(function(a){function d(a,b){if(a instanceof g)return a;if("string"!=typeof a)return null;if(a.length>X)return null;var c=b?Z[oa]:Z[la];if(!c.test(a))return null;try{return new g(a,b)}catch(d){return null}}function e(a,b){var c=d(a,b);return c?c.version:null}function f(a,b){var c=d(a.trim().replace(/^[=v]+/,""),b);return c?c.version:null}function g(a,b){if(a instanceof g){if(a.loose===b)return a;a=a.version}else if("string"!=typeof a)throw new TypeError("Invalid Version: "+a);if(a.length>X)throw new TypeError("version is longer than "+X+" characters");if(!(this instanceof g))return new g(a,b);W("SemVer",a,b),this.loose=b;var c=a.trim().match(b?Z[oa]:Z[la]);if(!c)throw new TypeError("Invalid Version: "+a);if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>Y||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Y||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Y||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(function(a){if(/^[0-9]+$/.test(a)){var b=+a;if(b>=0&&b<Y)return b}return a}):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}function h(a,b,c,d){"string"==typeof c&&(d=c,c=void 0);try{return new g(a,c).inc(b,d).version}catch(e){return null}}function i(a,b){if(v(a,b))return null;var c=d(a),e=d(b);if(c.prerelease.length||e.prerelease.length){for(var f in c)if(("major"===f||"minor"===f||"patch"===f)&&c[f]!==e[f])return"pre"+f;return"prerelease"}for(var f in c)if(("major"===f||"minor"===f||"patch"===f)&&c[f]!==e[f])return f}function j(a,b){var c=Oa.test(a),d=Oa.test(b);return c&&d&&(a=+a,b=+b),c&&!d?-1:d&&!c?1:a<b?-1:a>b?1:0}function k(a,b){return j(b,a)}function l(a,b){return new g(a,b).major}function m(a,b){return new g(a,b).minor}function n(a,b){return new g(a,b).patch}function o(a,b,c){return new g(a,c).compare(b)}function p(a,b){return o(a,b,!0)}function q(a,b,c){return o(b,a,c)}function r(a,b){return a.sort(function(a,d){return c.compare(a,d,b)})}function s(a,b){return a.sort(function(a,d){return c.rcompare(a,d,b)})}function t(a,b,c){return o(a,b,c)>0}function u(a,b,c){return o(a,b,c)<0}function v(a,b,c){return 0===o(a,b,c)}function w(a,b,c){return 0!==o(a,b,c)}function x(a,b,c){return o(a,b,c)>=0}function y(a,b,c){return o(a,b,c)<=0}function z(a,b,c,d){var e;switch(b){case"===":"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),e=a===c;break;case"!==":"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),e=a!==c;break;case"":case"=":case"==":e=v(a,c,d);break;case"!=":e=w(a,c,d);break;case">":e=t(a,c,d);break;case">=":e=x(a,c,d);break;case"<":e=u(a,c,d);break;case"<=":e=y(a,c,d);break;default:throw new TypeError("Invalid operator: "+b)}return e}function A(a,b){if(a instanceof A){if(a.loose===b)return a;a=a.value}return this instanceof A?(W("comparator",a,b),this.loose=b,this.parse(a),this.semver===Pa?this.value="":this.value=this.operator+this.semver.version,void W("comp",this)):new A(a,b)}function B(a,b){if(a instanceof B&&a.loose===b)return a;if(!(this instanceof B))return new B(a,b);if(this.loose=b,this.raw=a,this.set=a.split(/\s*\|\|\s*/).map(function(a){return this.parseRange(a.trim())},this).filter(function(a){return a.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+a);this.format()}function C(a,b){return new B(a,b).set.map(function(a){return a.map(function(a){return a.value}).join(" ").trim().split(" ")})}function D(a,b){return W("comp",a),a=H(a,b),W("caret",a),a=F(a,b),W("tildes",a),a=J(a,b),W("xrange",a),a=L(a,b),W("stars",a),a}function E(a){return!a||"x"===a.toLowerCase()||"*"===a}function F(a,b){return a.trim().split(/\s+/).map(function(a){return G(a,b)}).join(" ")}function G(a,b){var c=b?Z[Aa]:Z[za];return a.replace(c,function(b,c,d,e,f){W("tilde",a,b,c,d,e,f);var g;return E(c)?g="":E(d)?g=">="+c+".0.0 <"+(+c+1)+".0.0":E(e)?g=">="+c+"."+d+".0 <"+c+"."+(+d+1)+".0":f?(W("replaceTilde pr",f),"-"!==f.charAt(0)&&(f="-"+f),g=">="+c+"."+d+"."+e+f+" <"+c+"."+(+d+1)+".0"):g=">="+c+"."+d+"."+e+" <"+c+"."+(+d+1)+".0",W("tilde return",g),g})}function H(a,b){return a.trim().split(/\s+/).map(function(a){return I(a,b)}).join(" ")}function I(a,b){W("caret",a,b);var c=b?Z[Fa]:Z[Ea];return a.replace(c,function(b,c,d,e,f){W("caret",a,b,c,d,e,f);var g;return E(c)?g="":E(d)?g=">="+c+".0.0 <"+(+c+1)+".0.0":E(e)?g="0"===c?">="+c+"."+d+".0 <"+c+"."+(+d+1)+".0":">="+c+"."+d+".0 <"+(+c+1)+".0.0":f?(W("replaceCaret pr",f),"-"!==f.charAt(0)&&(f="-"+f),g="0"===c?"0"===d?">="+c+"."+d+"."+e+f+" <"+c+"."+d+"."+(+e+1):">="+c+"."+d+"."+e+f+" <"+c+"."+(+d+1)+".0":">="+c+"."+d+"."+e+f+" <"+(+c+1)+".0.0"):(W("no pr"),g="0"===c?"0"===d?">="+c+"."+d+"."+e+" <"+c+"."+d+"."+(+e+1):">="+c+"."+d+"."+e+" <"+c+"."+(+d+1)+".0":">="+c+"."+d+"."+e+" <"+(+c+1)+".0.0"),W("caret return",g),g})}function J(a,b){return W("replaceXRanges",a,b),a.split(/\s+/).map(function(a){return K(a,b)}).join(" ")}function K(a,b){a=a.trim();var c=b?Z[va]:Z[ua];return a.replace(c,function(b,c,d,e,f,g){W("xRange",a,b,c,d,e,f,g);var h=E(d),i=h||E(e),j=i||E(f),k=j;return"="===c&&k&&(c=""),h?b=">"===c||"<"===c?"<0.0.0":"*":c&&k?(i&&(e=0),j&&(f=0),">"===c?(c=">=",i?(d=+d+1,e=0,f=0):j&&(e=+e+1,f=0)):"<="===c&&(c="<",i?d=+d+1:e=+e+1),b=c+d+"."+e+"."+f):i?b=">="+d+".0.0 <"+(+d+1)+".0.0":j&&(b=">="+d+"."+e+".0 <"+d+"."+(+e+1)+".0"),W("xRange return",b),b})}function L(a,b){return W("replaceStars",a,b),a.trim().replace(Z[Ma],"")}function M(a,b,c,d,e,f,g,h,i,j,k,l,m){return b=E(c)?"":E(d)?">="+c+".0.0":E(e)?">="+c+"."+d+".0":">="+b,h=E(i)?"":E(j)?"<"+(+i+1)+".0.0":E(k)?"<"+i+"."+(+j+1)+".0":l?"<="+i+"."+j+"."+k+"-"+l:"<="+h,(b+" "+h).trim()}function N(a,b){for(var c=0;c<a.length;c++)if(!a[c].test(b))return!1;if(b.prerelease.length){for(var c=0;c<a.length;c++)if(W(a[c].semver),a[c].semver!==Pa&&a[c].semver.prerelease.length>0){var d=a[c].semver;if(d.major===b.major&&d.minor===b.minor&&d.patch===b.patch)return!0}return!1}return!0}function O(a,b,c){try{b=new B(b,c)}catch(d){return!1}return b.test(a)}function P(a,b,c){return a.filter(function(a){return O(a,b,c)}).sort(function(a,b){return q(a,b,c)})[0]||null}function Q(a,b,c){return a.filter(function(a){return O(a,b,c)}).sort(function(a,b){return o(a,b,c)})[0]||null}function R(a,b){try{return new B(a,b).range||"*"}catch(c){return null}}function S(a,b,c){return U(a,b,"<",c)}function T(a,b,c){return U(a,b,">",c)}function U(a,b,c,d){a=new g(a,d),b=new B(b,d);var e,f,h,i,j;switch(c){case">":e=t,f=y,h=u,i=">",j=">=";break;case"<":e=u,f=x,h=t,i="<",j="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(O(a,b,d))return!1;for(var k=0;k<b.set.length;++k){var l=b.set[k],m=null,n=null;if(l.forEach(function(a){a.semver===Pa&&(a=new A(">=0.0.0")),m=m||a,n=n||a,e(a.semver,m.semver,d)?m=a:h(a.semver,n.semver,d)&&(n=a)}),m.operator===i||m.operator===j)return!1;if((!n.operator||n.operator===i)&&f(a,n.semver))return!1;if(n.operator===j&&h(a,n.semver))return!1}return!0}function V(a,b){var c=d(a,b);return c&&c.prerelease.length?c.prerelease:null}c=b.exports=g;var W;W="object"==typeof a&&a.env&&a.env.NODE_DEBUG&&/\bsemver\b/i.test(a.env.NODE_DEBUG)?function(){var a=Array.prototype.slice.call(arguments,0);a.unshift("SEMVER"),console.log.apply(console,a)}:function(){},c.SEMVER_SPEC_VERSION="2.0.0";var X=256,Y=Number.MAX_SAFE_INTEGER||9007199254740991,Z=c.re=[],$=c.src=[],_=0,aa=_++;$[aa]="0|[1-9]\\d*";var ba=_++;$[ba]="[0-9]+";var ca=_++;$[ca]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var da=_++;$[da]="("+$[aa]+")\\.("+$[aa]+")\\.("+$[aa]+")";var ea=_++;$[ea]="("+$[ba]+")\\.("+$[ba]+")\\.("+$[ba]+")";var fa=_++;$[fa]="(?:"+$[aa]+"|"+$[ca]+")";var ga=_++;$[ga]="(?:"+$[ba]+"|"+$[ca]+")";var ha=_++;$[ha]="(?:-("+$[fa]+"(?:\\."+$[fa]+")*))";var ia=_++;$[ia]="(?:-?("+$[ga]+"(?:\\."+$[ga]+")*))";var ja=_++;$[ja]="[0-9A-Za-z-]+";var ka=_++;$[ka]="(?:\\+("+$[ja]+"(?:\\."+$[ja]+")*))";var la=_++,ma="v?"+$[da]+$[ha]+"?"+$[ka]+"?";$[la]="^"+ma+"$";var na="[v=\\s]*"+$[ea]+$[ia]+"?"+$[ka]+"?",oa=_++;$[oa]="^"+na+"$";var pa=_++;$[pa]="((?:<|>)?=?)";var qa=_++;$[qa]=$[ba]+"|x|X|\\*";var ra=_++;$[ra]=$[aa]+"|x|X|\\*";var sa=_++;$[sa]="[v=\\s]*("+$[ra]+")(?:\\.("+$[ra]+")(?:\\.("+$[ra]+")(?:"+$[ha]+")?"+$[ka]+"?)?)?";var ta=_++;$[ta]="[v=\\s]*("+$[qa]+")(?:\\.("+$[qa]+")(?:\\.("+$[qa]+")(?:"+$[ia]+")?"+$[ka]+"?)?)?";var ua=_++;$[ua]="^"+$[pa]+"\\s*"+$[sa]+"$";var va=_++;$[va]="^"+$[pa]+"\\s*"+$[ta]+"$";var wa=_++;$[wa]="(?:~>?)";var xa=_++;$[xa]="(\\s*)"+$[wa]+"\\s+",Z[xa]=new RegExp($[xa],"g");var ya="$1~",za=_++;$[za]="^"+$[wa]+$[sa]+"$";var Aa=_++;$[Aa]="^"+$[wa]+$[ta]+"$";var Ba=_++;$[Ba]="(?:\\^)";var Ca=_++;$[Ca]="(\\s*)"+$[Ba]+"\\s+",Z[Ca]=new RegExp($[Ca],"g");var Da="$1^",Ea=_++;$[Ea]="^"+$[Ba]+$[sa]+"$";var Fa=_++;$[Fa]="^"+$[Ba]+$[ta]+"$";var Ga=_++;$[Ga]="^"+$[pa]+"\\s*("+na+")$|^$";var Ha=_++;$[Ha]="^"+$[pa]+"\\s*("+ma+")$|^$";var Ia=_++;$[Ia]="(\\s*)"+$[pa]+"\\s*("+na+"|"+$[sa]+")",Z[Ia]=new RegExp($[Ia],"g");var Ja="$1$2$3",Ka=_++;$[Ka]="^\\s*("+$[sa]+")\\s+-\\s+("+$[sa]+")\\s*$";var La=_++;$[La]="^\\s*("+$[ta]+")\\s+-\\s+("+$[ta]+")\\s*$";var Ma=_++;$[Ma]="(<|>)?=?\\s*\\*";for(var Na=0;Na<_;Na++)W(Na,$[Na]),Z[Na]||(Z[Na]=new RegExp($[Na]));c.parse=d,c.valid=e,c.clean=f,c.SemVer=g,g.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},g.prototype.toString=function(){return this.version},g.prototype.compare=function(a){return W("SemVer.compare",this.version,this.loose,a),a instanceof g||(a=new g(a,this.loose)),this.compareMain(a)||this.comparePre(a)},g.prototype.compareMain=function(a){return a instanceof g||(a=new g(a,this.loose)),j(this.major,a.major)||j(this.minor,a.minor)||j(this.patch,a.patch)},g.prototype.comparePre=function(a){if(a instanceof g||(a=new g(a,this.loose)),this.prerelease.length&&!a.prerelease.length)return-1;if(!this.prerelease.length&&a.prerelease.length)return 1;if(!this.prerelease.length&&!a.prerelease.length)return 0;var b=0;do{var c=this.prerelease[b],d=a.prerelease[b];if(W("prerelease compare",b,c,d),void 0===c&&void 0===d)return 0;if(void 0===d)return 1;if(void 0===c)return-1;if(c!==d)return j(c,d)}while(++b)},g.prototype.inc=function(a,b){switch(a){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",b);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",b);break;case"prepatch":this.prerelease.length=0,this.inc("patch",b),this.inc("pre",b);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",b),this.inc("pre",b);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var c=this.prerelease.length;--c>=0;)"number"==typeof this.prerelease[c]&&(this.prerelease[c]++,c=-2);c===-1&&this.prerelease.push(0)}b&&(this.prerelease[0]===b?isNaN(this.prerelease[1])&&(this.prerelease=[b,0]):this.prerelease=[b,0]);break;default:throw new Error("invalid increment argument: "+a)}return this.format(),this.raw=this.version,this},c.inc=h,c.diff=i,c.compareIdentifiers=j;var Oa=/^[0-9]+$/;c.rcompareIdentifiers=k,c.major=l,c.minor=m,c.patch=n,c.compare=o,c.compareLoose=p,c.rcompare=q,c.sort=r,c.rsort=s,c.gt=t,c.lt=u,c.eq=v,c.neq=w,c.gte=x,c.lte=y,c.cmp=z,c.Comparator=A;var Pa={};A.prototype.parse=function(a){var b=this.loose?Z[Ga]:Z[Ha],c=a.match(b);if(!c)throw new TypeError("Invalid comparator: "+a);this.operator=c[1],"="===this.operator&&(this.operator=""),c[2]?this.semver=new g(c[2],this.loose):this.semver=Pa},A.prototype.toString=function(){return this.value},A.prototype.test=function(a){return W("Comparator.test",a,this.loose),this.semver===Pa||("string"==typeof a&&(a=new g(a,this.loose)),z(a,this.operator,this.semver,this.loose))},c.Range=B,B.prototype.format=function(){return this.range=this.set.map(function(a){return a.join(" ").trim()}).join("||").trim(),this.range},B.prototype.toString=function(){return this.range},B.prototype.parseRange=function(a){var b=this.loose;a=a.trim(),W("range",a,b);var c=b?Z[La]:Z[Ka];a=a.replace(c,M),W("hyphen replace",a),a=a.replace(Z[Ia],Ja),W("comparator trim",a,Z[Ia]),a=a.replace(Z[xa],ya),a=a.replace(Z[Ca],Da),a=a.split(/\s+/).join(" ");var d=b?Z[Ga]:Z[Ha],e=a.split(" ").map(function(a){return D(a,b)}).join(" ").split(/\s+/);return this.loose&&(e=e.filter(function(a){return!!a.match(d)})),e=e.map(function(a){return new A(a,b)})},c.toComparators=C,B.prototype.test=function(a){if(!a)return!1;"string"==typeof a&&(a=new g(a,this.loose));for(var b=0;b<this.set.length;b++)if(N(this.set[b],a))return!0;return!1},c.satisfies=O,c.maxSatisfying=P,c.minSatisfying=Q,c.validRange=R,c.ltr=S,c.gtr=T,c.outside=U,c.prerelease=V}).call(this,a("_process"))},{_process:209}],242:[function(a,b,c){/*!
 * XRegExp v2.0.0
 * (c) 2007-2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 */
var d;d=d||function(a){"use strict";function b(a,b,c){var d;for(d in l.prototype)l.prototype.hasOwnProperty(d)&&(a[d]=l.prototype[d]);return a.xregexp={captureNames:b,isNative:!!c},a}function d(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function e(a,c,e){if(!l.isRegExp(a))throw new TypeError("type RegExp expected");var f=p.replace.call(d(a)+(c||""),x,"");return e&&(f=p.replace.call(f,new RegExp("["+e+"]+","g"),"")),a=a.xregexp&&!a.xregexp.isNative?b(l(a.source,f),a.xregexp.captureNames?a.xregexp.captureNames.slice(0):null):b(new RegExp(a.source,f),null,!0)}function f(a,b){var c=a.length;if(Array.prototype.lastIndexOf)return a.lastIndexOf(b);for(;c--;)if(a[c]===b)return c;return-1}function g(a,b){return Object.prototype.toString.call(a).toLowerCase()==="[object "+b+"]"}function h(a){return a=a||{},"all"===a||a.all?a={natives:!0,extensibility:!0}:g(a,"string")&&(a=l.forEach(a,/[^\s,]+/,function(a){this[a]=!0},{})),a}function i(a,b,c,d){var e,f,g=s.length,h=null;B=!0;try{for(;g--;)if(f=s[g],("all"===f.scope||f.scope===c)&&(!f.trigger||f.trigger.call(d))&&(f.pattern.lastIndex=b,e=q.exec.call(f.pattern,a),e&&e.index===b)){h={output:f.handler.call(d,e,c),match:e};break}}catch(i){throw i}finally{B=!1}return h}function j(a){l.addToken=m[a?"on":"off"],o.extensibility=a}function k(a){RegExp.prototype.exec=(a?q:p).exec,RegExp.prototype.test=(a?q:p).test,String.prototype.match=(a?q:p).match,String.prototype.replace=(a?q:p).replace,String.prototype.split=(a?q:p).split,o.natives=a}var l,m,n,o={natives:!1,extensibility:!1},p={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},q={},r={},s=[],t="default",u="class",v={"default":/^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/,"class":/^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/},w=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,x=/([\s\S])(?=[\s\S]*\1)/g,y=/^(?:[?*+]|{\d+(?:,\d*)?})\??/,z=p.exec.call(/()??/,"")[1]===a,A=RegExp.prototype.sticky!==a,B=!1,C="gim"+(A?"y":"");return l=function(c,d){if(l.isRegExp(c)){if(d!==a)throw new TypeError("can't supply flags when constructing one RegExp from another");return e(c)}if(B)throw new Error("can't call the XRegExp constructor within token definition functions");var f,g,h,j=[],k=t,m={hasNamedCapture:!1,captureNames:[],hasFlag:function(a){return d.indexOf(a)>-1}},n=0;if(c=c===a?"":String(c),d=d===a?"":String(d),p.match.call(d,x))throw new SyntaxError("invalid duplicate regular expression flag");for(c=p.replace.call(c,/^\(\?([\w$]+)\)/,function(a,b){if(p.test.call(/[gy]/,b))throw new SyntaxError("can't use flag g or y in mode modifier");return d=p.replace.call(d+b,x,""),""}),l.forEach(d,/[\s\S]/,function(a){if(C.indexOf(a[0])<0)throw new SyntaxError("invalid regular expression flag "+a[0])});n<c.length;)f=i(c,n,k,m),f?(j.push(f.output),n+=f.match[0].length||1):(g=p.exec.call(v[k],c.slice(n)),g?(j.push(g[0]),n+=g[0].length):(h=c.charAt(n),"["===h?k=u:"]"===h&&(k=t),j.push(h),++n));return b(new RegExp(j.join(""),p.replace.call(d,/[^gimy]+/g,"")),m.hasNamedCapture?m.captureNames:null)},m={on:function(a,b,c){c=c||{},a&&s.push({pattern:e(a,"g"+(A?"y":"")),handler:b,scope:c.scope||t,trigger:c.trigger||null}),c.customFlags&&(C=p.replace.call(C+c.customFlags,x,""))},off:function(){throw new Error("extensibility must be installed before using addToken")}},l.addToken=m.off,l.cache=function(a,b){var c=a+"/"+(b||"");return r[c]||(r[c]=l(a,b))},l.escape=function(a){return p.replace.call(a,/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},l.exec=function(a,b,c,d){var f,g=e(b,"g"+(d&&A?"y":""),d===!1?"y":"");return g.lastIndex=c=c||0,f=q.exec.call(g,a),d&&f&&f.index!==c&&(f=null),b.global&&(b.lastIndex=f?g.lastIndex:0),f},l.forEach=function(a,b,c,d){for(var e,f=0,g=-1;e=l.exec(a,b,f);)c.call(d,e,++g,a,b),f=e.index+(e[0].length||1);return d},l.globalize=function(a){return e(a,"g")},l.install=function(a){a=h(a),!o.natives&&a.natives&&k(!0),!o.extensibility&&a.extensibility&&j(!0)},l.isInstalled=function(a){return!!o[a]},l.isRegExp=function(a){return g(a,"regexp")},l.matchChain=function(a,b){return function c(a,d){var e,f=b[d].regex?b[d]:{regex:b[d]},g=[],h=function(a){g.push(f.backref?a[f.backref]||"":a[0])};for(e=0;e<a.length;++e)l.forEach(a[e],f.regex,h);return d!==b.length-1&&g.length?c(g,d+1):g}([a],0)},l.replace=function(b,c,d,f){var g,h=l.isRegExp(c),i=c;return h?(f===a&&c.global&&(f="all"),i=e(c,"all"===f?"g":"","all"===f?"":"g")):"all"===f&&(i=new RegExp(l.escape(String(c)),"g")),g=q.replace.call(String(b),i,d),h&&c.global&&(c.lastIndex=0),g},l.split=function(a,b,c){return q.split.call(a,b,c)},l.test=function(a,b,c,d){return!!l.exec(a,b,c,d)},l.uninstall=function(a){a=h(a),o.natives&&a.natives&&k(!1),o.extensibility&&a.extensibility&&j(!1)},l.union=function(a,b){var c,d,e,f,h=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,i=0,j=function(a,b,e){var f=d[i-c];if(b){if(++i,f)return"(?<"+f+">"}else if(e)return"\\"+(+e+c);return a},k=[];if(!g(a,"array")||!a.length)throw new TypeError("patterns must be a nonempty array");for(f=0;f<a.length;++f)e=a[f],l.isRegExp(e)?(c=i,d=e.xregexp&&e.xregexp.captureNames||[],k.push(l(e.source).source.replace(h,j))):k.push(l.escape(e));return l(k.join("|"),b)},l.version="2.0.0",q.exec=function(b){var c,e,g,h,i;if(this.global||(h=this.lastIndex),c=p.exec.apply(this,arguments)){if(!z&&c.length>1&&f(c,"")>-1&&(g=new RegExp(this.source,p.replace.call(d(this),"g","")),p.replace.call(String(b).slice(c.index),g,function(){var b;for(b=1;b<arguments.length-2;++b)arguments[b]===a&&(c[b]=a)})),this.xregexp&&this.xregexp.captureNames)for(i=1;i<c.length;++i)e=this.xregexp.captureNames[i-1],e&&(c[e]=c[i]);this.global&&!c[0].length&&this.lastIndex>c.index&&(this.lastIndex=c.index)}return this.global||(this.lastIndex=h),c},q.test=function(a){return!!q.exec.call(this,a)},q.match=function(a){if(l.isRegExp(a)){if(a.global){var b=p.match.apply(this,arguments);return a.lastIndex=0,b}}else a=new RegExp(a);return q.exec.call(a,this)},q.replace=function(a,b){var c,d,e,h,i=l.isRegExp(a);return i?(a.xregexp&&(c=a.xregexp.captureNames),a.global||(h=a.lastIndex)):a+="",g(b,"function")?d=p.replace.call(String(this),a,function(){var d,e=arguments;if(c)for(e[0]=new String(e[0]),d=0;d<c.length;++d)c[d]&&(e[0][c[d]]=e[d+1]);return i&&a.global&&(a.lastIndex=e[e.length-2]+e[0].length),b.apply(null,e)}):(e=String(this),d=p.replace.call(e,a,function(){var a=arguments;return p.replace.call(String(b),w,function(b,d,e){var g;if(d){if(g=+d,g<=a.length-3)return a[g]||"";if(g=c?f(c,d):-1,g<0)throw new SyntaxError("backreference to undefined group "+b);return a[g+1]||""}if("$"===e)return"$";if("&"===e||0===+e)return a[0];if("`"===e)return a[a.length-1].slice(0,a[a.length-2]);if("'"===e)return a[a.length-1].slice(a[a.length-2]+a[0].length);if(e=+e,!isNaN(e)){if(e>a.length-3)throw new SyntaxError("backreference to undefined group "+b);return a[e]||""}throw new SyntaxError("invalid token "+b)})})),i&&(a.global?a.lastIndex=0:a.lastIndex=h),d},q.split=function(b,c){if(!l.isRegExp(b))return p.split.apply(this,arguments);var d,e=String(this),f=b.lastIndex,g=[],h=0;return c=(c===a?-1:c)>>>0,l.forEach(e,b,function(a){a.index+a[0].length>h&&(g.push(e.slice(h,a.index)),a.length>1&&a.index<e.length&&Array.prototype.push.apply(g,a.slice(1)),d=a[0].length,h=a.index+d)}),h===e.length?p.test.call(b,"")&&!d||g.push(""):g.push(e.slice(h)),b.lastIndex=f,g.length>c?g.slice(0,c):g},n=m.on,n(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(a,b){if("B"===a[1]&&b===t)return a[0];throw new SyntaxError("invalid escape "+a[0])},{scope:"all"}),n(/\[(\^?)]/,function(a){return a[1]?"[\\s\\S]":"\\b\\B"}),n(/(?:\(\?#[^)]*\))+/,function(a){return p.test.call(y,a.input.slice(a.index+a[0].length))?"":"(?:)"}),n(/\\k<([\w$]+)>/,function(a){var b=isNaN(a[1])?f(this.captureNames,a[1])+1:+a[1],c=a.index+a[0].length;if(!b||b>this.captureNames.length)throw new SyntaxError("backreference to undefined group "+a[0]);return"\\"+b+(c===a.input.length||isNaN(a.input.charAt(c))?"":"(?:)")}),n(/(?:\s+|#.*)+/,function(a){return p.test.call(y,a.input.slice(a.index+a[0].length))?"":"(?:)"},{trigger:function(){return this.hasFlag("x")},customFlags:"x"}),n(/\./,function(){return"[\\s\\S]"},{trigger:function(){return this.hasFlag("s")},customFlags:"s"}),n(/\(\?P?<([\w$]+)>/,function(a){if(!isNaN(a[1]))throw new SyntaxError("can't use integer as capture name "+a[0]);return this.captureNames.push(a[1]),this.hasNamedCapture=!0,"("}),n(/\\(\d+)/,function(a,b){if(!(b===t&&/^[1-9]/.test(a[1])&&+a[1]<=this.captureNames.length)&&"0"!==a[1])throw new SyntaxError("can't use octal escape or backreference to undefined group "+a[0]);return a[0]},{scope:"all"}),n(/\((?!\?)/,function(){return this.hasFlag("n")?"(?:":(this.captureNames.push(null),"(")},{customFlags:"n"}),"undefined"!=typeof c&&(c.XRegExp=l),l}(),/*!
 * XRegExp Unicode Base v1.0.0
 * (c) 2008-2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 * Uses Unicode 6.1 <http://unicode.org/>
 */
function(a){"use strict";function b(a){return a.replace(/[- _]+/g,"").toLowerCase()}function c(a){return a.replace(/\w{4}/g,"\\u$&")}function d(a){for(;a.length<4;)a="0"+a;return a}function e(a){return parseInt(a,16)}function f(a){return parseInt(a,10).toString(16)}function g(b){var c,g=[],h=-1;return a.forEach(b,/\\u(\w{4})(?:-\\u(\w{4}))?/,function(a){c=e(a[1]),c>h+1&&(g.push("\\u"+d(f(h+1))),c>h+2&&g.push("-\\u"+d(f(c-1)))),h=e(a[2]||a[1])}),h<65535&&(g.push("\\u"+d(f(h+1))),h<65534&&g.push("-\\uFFFF")),g.join("")}function h(a){return i["^"+a]||(i["^"+a]=g(i[a]))}var i={};a.install("extensibility"),a.addUnicodePackage=function(d,e){var f;if(!a.isInstalled("extensibility"))throw new Error("extensibility must be installed before adding Unicode packages");if(d)for(f in d)d.hasOwnProperty(f)&&(i[b(f)]=c(d[f]));if(e)for(f in e)e.hasOwnProperty(f)&&(i[b(e[f])]=i[b(f)])},a.addUnicodePackage({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05270531-055605590561-058705D0-05EA05F0-05F20620-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280840-085808A008A2-08AC0904-0939093D09500958-09610971-09770979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10CF10CF20D05-0D0C0D0E-0D100D12-0D3A0D3D0D4E0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC-0EDF0F000F40-0F470F49-0F6C0F88-0F8C1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510C710CD10D0-10FA10FC-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1BBA-1BE51C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11CF51CF61D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209C21022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2CF22CF32D00-2D252D272D2D2D30-2D672D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78B-A78EA790-A793A7A0-A7AAA7F8-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDAAE0-AAEAAAF2-AAF4AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC"},{L:"Letter"}),a.addToken(/\\([pP]){(\^?)([^}]*)}/,function(a,c){var d="P"===a[1]||a[2]?"^":"",e=b(a[3]);if("P"===a[1]&&a[2])throw new SyntaxError("invalid double negation \\P{^");if(!i.hasOwnProperty(e))throw new SyntaxError("invalid or unknown Unicode property "+a[0]);return"class"===c?d?h(e):i[e]:"["+d+i[e]+"]"},{scope:"all"})}(d),/*!
 * XRegExp Unicode Categories v1.2.0
 * (c) 2010-2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 * Uses Unicode 6.1 <http://unicode.org/>
 */
function(a){"use strict";if(!a.addUnicodePackage)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");a.install("extensibility"),a.addUnicodePackage({Ll:"0061-007A00B500DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F05210523052505270561-05871D00-1D2B1D6B-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7B2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2CF32D00-2D252D272D2DA641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA661A663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CA78EA791A793A7A1A7A3A7A5A7A7A7A9A7FAFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E05200522052405260531-055610A0-10C510C710CD1E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CED2CF2A640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA660A662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BA78DA790A792A7A0A7A2A7A4A7A6A7A8A7AAFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D6A1D781D9B-1DBF2071207F2090-209C2C7C2C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A7F8A7F9A9CFAA70AADDAAF3AAF4FF70FF9EFF9F",Lo:"00AA00BA01BB01C0-01C3029405D0-05EA05F0-05F20620-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150840-085808A008A2-08AC0904-0939093D09500958-09610972-09770979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10CF10CF20D05-0D0C0D0E-0D100D12-0D3A0D3D0D4E0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC-0EDF0F000F40-0F470F49-0F6C0F88-0F8C1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA10FD-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1BBA-1BE51C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF11CF51CF62135-21382D30-2D672D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCAAE0-AAEAAAF2AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065F067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0859-085B08E4-08FE0900-0903093A-093C093E-094F0951-0957096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F8D-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135D-135F1712-17141732-1734175217531772177317B4-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAD1BE6-1BF31C24-1C371CD0-1CD21CD4-1CE81CED1CF2-1CF41DC0-1DE61DFC-1DFF20D0-20F02CEF-2CF12D7F2DE0-2DFF302A-302F3099309AA66F-A672A674-A67DA69FA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1AAEB-AAEFAAF5AAF6ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065F067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0859-085B08E4-08FE0900-0902093A093C0941-0948094D0951-095709620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F8D-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135D-135F1712-17141732-1734175217531772177317B417B517B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91BAB1BE61BE81BE91BED1BEF-1BF11C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1CF41DC0-1DE61DFC-1DFF20D0-20DC20E120E5-20F02CEF-2CF12D7F2DE0-2DFF302A-302D3099309AA66FA674-A67DA69FA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1AAECAAEDAAF6ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093B093E-09400949-094C094E094F0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1BAC1BAD1BE71BEA-1BEC1BEE1BF21BF31C24-1C2B1C341C351CE11CF21CF3302E302FA823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BAAEBAAEEAAEFAAF5ABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048920DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0B72-0B770BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293248-324F3251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19D91A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90B72-0B770BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F919DA20702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293248-324F3251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100A700AB00B600B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E085E0964096509700AF00DF40E4F0E5A0E5B0F04-0F120F140F3A-0F3D0F850FD0-0FD40FD90FDA104A-104F10FB1360-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A194419451A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601BFC-1BFF1C3B-1C3F1C7E1C7F1CC0-1CC71CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2D702E00-2E2E2E30-2E3B3001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFAAF0AAF1ABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A2E3A2E3B301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100A700B600B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E085E0964096509700AF00DF40E4F0E5A0E5B0F04-0F120F140F850FD0-0FD40FD90FDA104A-104F10FB1360-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A194419451A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601BFC-1BFF1C3B-1C3F1C7E1C7F1CC0-1CC71CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2D702E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E30-2E393001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFAAF0AAF1ABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A600A800A900AC00AE-00B100B400B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F60482058F0606-0608060B060E060F06DE06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0D790E3F0F01-0F030F130F15-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F1390-139917DB194019DE-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B9210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23F32400-24262440-244A249C-24E92500-26FF2701-27672794-27C427C7-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-324732503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FBB2-FBC1FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C21182140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5058F060B09F209F309FB0AF10BF90E3F17DB20A0-20B9A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFBB2-FBC1FF3EFF40FFE3",So:"00A600A900AE00B00482060E060F06DE06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0D790F01-0F030F130F15-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F1390-1399194019DE-19FF1B61-1B6A1B74-1B7C210021012103-210621082109211421162117211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23F32400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26FF2701-27672794-27BF2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-324732503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20528-05300557055805600588058B-058E059005C8-05CF05EB-05EF05F5-0605061C061D06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F085C085D085F-089F08A108AD-08E308FF097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B78-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D3B0D3C0D450D490D4F-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EE0-0EFF0F480F6D-0F700F980FBD0FCD0FDB-0FFF10C610C8-10CC10CE10CF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B135C137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BF4-1BFB1C38-1C3A1C4A-1C4C1C80-1CBF1CC8-1CCF1CF7-1CFF1DE7-1DFB1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F209D-209F20BA-20CF20F1-20FF218A-218F23F4-23FF2427-243F244B-245F27002B4D-2B4F2B5A-2BFF2C2F2C5F2CF4-2CF82D262D28-2D2C2D2E2D2F2D68-2D6E2D71-2D7E2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E3C-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31BB-31BF31E4-31EF321F32FF4DB6-4DBF9FCD-9FFFA48D-A48FA4C7-A4CFA62C-A63FA698-A69EA6F8-A6FFA78FA794-A79FA7AB-A7F7A82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAF7-AB00AB07AB08AB0FAB10AB17-AB1FAB27AB2F-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBC2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060406DD070F200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20528-05300557055805600588058B-058E059005C8-05CF05EB-05EF05F5-05FF0605061C061D070E074B074C07B2-07BF07FB-07FF082E082F083F085C085D085F-089F08A108AD-08E308FF097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B78-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D3B0D3C0D450D490D4F-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EE0-0EFF0F480F6D-0F700F980FBD0FCD0FDB-0FFF10C610C8-10CC10CE10CF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B135C137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BF4-1BFB1C38-1C3A1C4A-1C4C1C80-1CBF1CC8-1CCF1CF7-1CFF1DE7-1DFB1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F209D-209F20BA-20CF20F1-20FF218A-218F23F4-23FF2427-243F244B-245F27002B4D-2B4F2B5A-2BFF2C2F2C5F2CF4-2CF82D262D28-2D2C2D2E2D2F2D68-2D6E2D71-2D7E2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E3C-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31BB-31BF31E4-31EF321F32FF4DB6-4DBF9FCD-9FFFA48D-A48FA4C7-A4CFA62C-A63FA698-A69EA6F8-A6FFA78FA794-A79FA7AB-A7F7A82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAF7-AB00AB07AB08AB0FAB10AB17-AB1FAB27AB2F-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBC2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"},{Ll:"Lowercase_Letter",Lu:"Uppercase_Letter",Lt:"Titlecase_Letter",Lm:"Modifier_Letter",Lo:"Other_Letter",M:"Mark",Mn:"Nonspacing_Mark",Mc:"Spacing_Mark",Me:"Enclosing_Mark",N:"Number",Nd:"Decimal_Number",Nl:"Letter_Number",No:"Other_Number",P:"Punctuation",Pd:"Dash_Punctuation",Ps:"Open_Punctuation",Pe:"Close_Punctuation",Pi:"Initial_Punctuation",Pf:"Final_Punctuation",Pc:"Connector_Punctuation",Po:"Other_Punctuation",S:"Symbol",Sm:"Math_Symbol",Sc:"Currency_Symbol",Sk:"Modifier_Symbol",So:"Other_Symbol",Z:"Separator",Zs:"Space_Separator",Zl:"Line_Separator",Zp:"Paragraph_Separator",C:"Other",Cc:"Control",Cf:"Format",Co:"Private_Use",Cs:"Surrogate",Cn:"Unassigned"})}(d),/*!
 * XRegExp Unicode Scripts v1.2.0
 * (c) 2010-2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 * Uses Unicode 6.1 <http://unicode.org/>
 */
function(a){"use strict";if(!a.addUnicodePackage)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");a.install("extensibility"),a.addUnicodePackage({Arabic:"0600-06040606-060B060D-061A061E0620-063F0641-064A0656-065E066A-066F0671-06DC06DE-06FF0750-077F08A008A2-08AC08E4-08FEFB50-FBC1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFCFE70-FE74FE76-FEFC",Armenian:"0531-05560559-055F0561-0587058A058FFB13-FB17",Balinese:"1B00-1B4B1B50-1B7C",Bamum:"A6A0-A6F7",Batak:"1BC0-1BF31BFC-1BFF",Bengali:"0981-09830985-098C098F09900993-09A809AA-09B009B209B6-09B909BC-09C409C709C809CB-09CE09D709DC09DD09DF-09E309E6-09FB",Bopomofo:"02EA02EB3105-312D31A0-31BA",Braille:"2800-28FF",Buginese:"1A00-1A1B1A1E1A1F",Buhid:"1740-1753",Canadian_Aboriginal:"1400-167F18B0-18F5",Cham:"AA00-AA36AA40-AA4DAA50-AA59AA5C-AA5F",Cherokee:"13A0-13F4",Common:"0000-0040005B-0060007B-00A900AB-00B900BB-00BF00D700F702B9-02DF02E5-02E902EC-02FF0374037E038503870589060C061B061F06400660-066906DD096409650E3F0FD5-0FD810FB16EB-16ED173517361802180318051CD31CE11CE9-1CEC1CEE-1CF31CF51CF62000-200B200E-2064206A-20702074-207E2080-208E20A0-20B92100-21252127-2129212C-21312133-214D214F-215F21892190-23F32400-24262440-244A2460-26FF2701-27FF2900-2B4C2B50-2B592E00-2E3B2FF0-2FFB3000-300430063008-30203030-3037303C-303F309B309C30A030FB30FC3190-319F31C0-31E33220-325F327F-32CF3358-33FF4DC0-4DFFA700-A721A788-A78AA830-A839FD3EFD3FFDFDFE10-FE19FE30-FE52FE54-FE66FE68-FE6BFEFFFF01-FF20FF3B-FF40FF5B-FF65FF70FF9EFF9FFFE0-FFE6FFE8-FFEEFFF9-FFFD",Coptic:"03E2-03EF2C80-2CF32CF9-2CFF",Cyrillic:"0400-04840487-05271D2B1D782DE0-2DFFA640-A697A69F",Devanagari:"0900-09500953-09630966-09770979-097FA8E0-A8FB",Ethiopic:"1200-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A135D-137C1380-13992D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDEAB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2E",Georgian:"10A0-10C510C710CD10D0-10FA10FC-10FF2D00-2D252D272D2D",Glagolitic:"2C00-2C2E2C30-2C5E",Greek:"0370-03730375-0377037A-037D038403860388-038A038C038E-03A103A3-03E103F0-03FF1D26-1D2A1D5D-1D611D66-1D6A1DBF1F00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FC41FC6-1FD31FD6-1FDB1FDD-1FEF1FF2-1FF41FF6-1FFE2126",Gujarati:"0A81-0A830A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABC-0AC50AC7-0AC90ACB-0ACD0AD00AE0-0AE30AE6-0AF1",Gurmukhi:"0A01-0A030A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A3C0A3E-0A420A470A480A4B-0A4D0A510A59-0A5C0A5E0A66-0A75",Han:"2E80-2E992E9B-2EF32F00-2FD5300530073021-30293038-303B3400-4DB54E00-9FCCF900-FA6DFA70-FAD9",Hangul:"1100-11FF302E302F3131-318E3200-321E3260-327EA960-A97CAC00-D7A3D7B0-D7C6D7CB-D7FBFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Hanunoo:"1720-1734",Hebrew:"0591-05C705D0-05EA05F0-05F4FB1D-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FB4F",Hiragana:"3041-3096309D-309F",Inherited:"0300-036F04850486064B-0655065F0670095109521CD0-1CD21CD4-1CE01CE2-1CE81CED1CF41DC0-1DE61DFC-1DFF200C200D20D0-20F0302A-302D3099309AFE00-FE0FFE20-FE26",Javanese:"A980-A9CDA9CF-A9D9A9DEA9DF",Kannada:"0C820C830C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBC-0CC40CC6-0CC80CCA-0CCD0CD50CD60CDE0CE0-0CE30CE6-0CEF0CF10CF2",Katakana:"30A1-30FA30FD-30FF31F0-31FF32D0-32FE3300-3357FF66-FF6FFF71-FF9D",Kayah_Li:"A900-A92F",Khmer:"1780-17DD17E0-17E917F0-17F919E0-19FF",Lao:"0E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB90EBB-0EBD0EC0-0EC40EC60EC8-0ECD0ED0-0ED90EDC-0EDF",Latin:"0041-005A0061-007A00AA00BA00C0-00D600D8-00F600F8-02B802E0-02E41D00-1D251D2C-1D5C1D62-1D651D6B-1D771D79-1DBE1E00-1EFF2071207F2090-209C212A212B2132214E2160-21882C60-2C7FA722-A787A78B-A78EA790-A793A7A0-A7AAA7F8-A7FFFB00-FB06FF21-FF3AFF41-FF5A",Lepcha:"1C00-1C371C3B-1C491C4D-1C4F",Limbu:"1900-191C1920-192B1930-193B19401944-194F",Lisu:"A4D0-A4FF",Malayalam:"0D020D030D05-0D0C0D0E-0D100D12-0D3A0D3D-0D440D46-0D480D4A-0D4E0D570D60-0D630D66-0D750D79-0D7F",Mandaic:"0840-085B085E",Meetei_Mayek:"AAE0-AAF6ABC0-ABEDABF0-ABF9",Mongolian:"1800180118041806-180E1810-18191820-18771880-18AA",Myanmar:"1000-109FAA60-AA7B",New_Tai_Lue:"1980-19AB19B0-19C919D0-19DA19DE19DF",Nko:"07C0-07FA",Ogham:"1680-169C",Ol_Chiki:"1C50-1C7F",Oriya:"0B01-0B030B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3C-0B440B470B480B4B-0B4D0B560B570B5C0B5D0B5F-0B630B66-0B77",Phags_Pa:"A840-A877",Rejang:"A930-A953A95F",Runic:"16A0-16EA16EE-16F0",Samaritan:"0800-082D0830-083E",Saurashtra:"A880-A8C4A8CE-A8D9",Sinhala:"0D820D830D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60DCA0DCF-0DD40DD60DD8-0DDF0DF2-0DF4",Sundanese:"1B80-1BBF1CC0-1CC7",Syloti_Nagri:"A800-A82B",Syriac:"0700-070D070F-074A074D-074F",Tagalog:"1700-170C170E-1714",Tagbanwa:"1760-176C176E-177017721773",Tai_Le:"1950-196D1970-1974",Tai_Tham:"1A20-1A5E1A60-1A7C1A7F-1A891A90-1A991AA0-1AAD",Tai_Viet:"AA80-AAC2AADB-AADF",Tamil:"0B820B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BBE-0BC20BC6-0BC80BCA-0BCD0BD00BD70BE6-0BFA",Telugu:"0C01-0C030C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D-0C440C46-0C480C4A-0C4D0C550C560C580C590C60-0C630C66-0C6F0C78-0C7F",Thaana:"0780-07B1",Thai:"0E01-0E3A0E40-0E5B",Tibetan:"0F00-0F470F49-0F6C0F71-0F970F99-0FBC0FBE-0FCC0FCE-0FD40FD90FDA",Tifinagh:"2D30-2D672D6F2D702D7F",Vai:"A500-A62B",Yi:"A000-A48CA490-A4C6"})}(d),/*!
 * XRegExp Unicode Blocks v1.2.0
 * (c) 2010-2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 * Uses Unicode 6.1 <http://unicode.org/>
 */
function(a){"use strict";if(!a.addUnicodePackage)throw new ReferenceError("Unicode Base must be loaded before Unicode Blocks");a.install("extensibility"),a.addUnicodePackage({InBasic_Latin:"0000-007F",InLatin_1_Supplement:"0080-00FF",InLatin_Extended_A:"0100-017F",InLatin_Extended_B:"0180-024F",InIPA_Extensions:"0250-02AF",InSpacing_Modifier_Letters:"02B0-02FF",InCombining_Diacritical_Marks:"0300-036F",InGreek_and_Coptic:"0370-03FF",InCyrillic:"0400-04FF",InCyrillic_Supplement:"0500-052F",InArmenian:"0530-058F",InHebrew:"0590-05FF",InArabic:"0600-06FF",InSyriac:"0700-074F",InArabic_Supplement:"0750-077F",InThaana:"0780-07BF",InNKo:"07C0-07FF",InSamaritan:"0800-083F",InMandaic:"0840-085F",InArabic_Extended_A:"08A0-08FF",InDevanagari:"0900-097F",InBengali:"0980-09FF",InGurmukhi:"0A00-0A7F",InGujarati:"0A80-0AFF",InOriya:"0B00-0B7F",InTamil:"0B80-0BFF",InTelugu:"0C00-0C7F",InKannada:"0C80-0CFF",InMalayalam:"0D00-0D7F",InSinhala:"0D80-0DFF",InThai:"0E00-0E7F",InLao:"0E80-0EFF",InTibetan:"0F00-0FFF",InMyanmar:"1000-109F",InGeorgian:"10A0-10FF",InHangul_Jamo:"1100-11FF",InEthiopic:"1200-137F",InEthiopic_Supplement:"1380-139F",InCherokee:"13A0-13FF",InUnified_Canadian_Aboriginal_Syllabics:"1400-167F",InOgham:"1680-169F",InRunic:"16A0-16FF",InTagalog:"1700-171F",InHanunoo:"1720-173F",InBuhid:"1740-175F",InTagbanwa:"1760-177F",InKhmer:"1780-17FF",InMongolian:"1800-18AF",InUnified_Canadian_Aboriginal_Syllabics_Extended:"18B0-18FF",InLimbu:"1900-194F",InTai_Le:"1950-197F",InNew_Tai_Lue:"1980-19DF",InKhmer_Symbols:"19E0-19FF",InBuginese:"1A00-1A1F",InTai_Tham:"1A20-1AAF",InBalinese:"1B00-1B7F",InSundanese:"1B80-1BBF",InBatak:"1BC0-1BFF",InLepcha:"1C00-1C4F",InOl_Chiki:"1C50-1C7F",InSundanese_Supplement:"1CC0-1CCF",InVedic_Extensions:"1CD0-1CFF",InPhonetic_Extensions:"1D00-1D7F",InPhonetic_Extensions_Supplement:"1D80-1DBF",InCombining_Diacritical_Marks_Supplement:"1DC0-1DFF",InLatin_Extended_Additional:"1E00-1EFF",InGreek_Extended:"1F00-1FFF",InGeneral_Punctuation:"2000-206F",InSuperscripts_and_Subscripts:"2070-209F",InCurrency_Symbols:"20A0-20CF",InCombining_Diacritical_Marks_for_Symbols:"20D0-20FF",InLetterlike_Symbols:"2100-214F",InNumber_Forms:"2150-218F",InArrows:"2190-21FF",InMathematical_Operators:"2200-22FF",InMiscellaneous_Technical:"2300-23FF",InControl_Pictures:"2400-243F",InOptical_Character_Recognition:"2440-245F",InEnclosed_Alphanumerics:"2460-24FF",InBox_Drawing:"2500-257F",InBlock_Elements:"2580-259F",InGeometric_Shapes:"25A0-25FF",InMiscellaneous_Symbols:"2600-26FF",InDingbats:"2700-27BF",InMiscellaneous_Mathematical_Symbols_A:"27C0-27EF",InSupplemental_Arrows_A:"27F0-27FF",InBraille_Patterns:"2800-28FF",InSupplemental_Arrows_B:"2900-297F",InMiscellaneous_Mathematical_Symbols_B:"2980-29FF",InSupplemental_Mathematical_Operators:"2A00-2AFF",InMiscellaneous_Symbols_and_Arrows:"2B00-2BFF",InGlagolitic:"2C00-2C5F",InLatin_Extended_C:"2C60-2C7F",InCoptic:"2C80-2CFF",InGeorgian_Supplement:"2D00-2D2F",InTifinagh:"2D30-2D7F",InEthiopic_Extended:"2D80-2DDF",InCyrillic_Extended_A:"2DE0-2DFF",InSupplemental_Punctuation:"2E00-2E7F",InCJK_Radicals_Supplement:"2E80-2EFF",InKangxi_Radicals:"2F00-2FDF",InIdeographic_Description_Characters:"2FF0-2FFF",InCJK_Symbols_and_Punctuation:"3000-303F",InHiragana:"3040-309F",InKatakana:"30A0-30FF",InBopomofo:"3100-312F",InHangul_Compatibility_Jamo:"3130-318F",InKanbun:"3190-319F",InBopomofo_Extended:"31A0-31BF",InCJK_Strokes:"31C0-31EF",InKatakana_Phonetic_Extensions:"31F0-31FF",InEnclosed_CJK_Letters_and_Months:"3200-32FF",InCJK_Compatibility:"3300-33FF",InCJK_Unified_Ideographs_Extension_A:"3400-4DBF",InYijing_Hexagram_Symbols:"4DC0-4DFF",InCJK_Unified_Ideographs:"4E00-9FFF",InYi_Syllables:"A000-A48F",InYi_Radicals:"A490-A4CF",InLisu:"A4D0-A4FF",InVai:"A500-A63F",InCyrillic_Extended_B:"A640-A69F",InBamum:"A6A0-A6FF",InModifier_Tone_Letters:"A700-A71F",InLatin_Extended_D:"A720-A7FF",InSyloti_Nagri:"A800-A82F",InCommon_Indic_Number_Forms:"A830-A83F",InPhags_pa:"A840-A87F",InSaurashtra:"A880-A8DF",InDevanagari_Extended:"A8E0-A8FF",InKayah_Li:"A900-A92F",InRejang:"A930-A95F",InHangul_Jamo_Extended_A:"A960-A97F",InJavanese:"A980-A9DF",InCham:"AA00-AA5F",InMyanmar_Extended_A:"AA60-AA7F",InTai_Viet:"AA80-AADF",InMeetei_Mayek_Extensions:"AAE0-AAFF",InEthiopic_Extended_A:"AB00-AB2F",InMeetei_Mayek:"ABC0-ABFF",InHangul_Syllables:"AC00-D7AF",InHangul_Jamo_Extended_B:"D7B0-D7FF",InHigh_Surrogates:"D800-DB7F",InHigh_Private_Use_Surrogates:"DB80-DBFF",InLow_Surrogates:"DC00-DFFF",InPrivate_Use_Area:"E000-F8FF",InCJK_Compatibility_Ideographs:"F900-FAFF",InAlphabetic_Presentation_Forms:"FB00-FB4F",InArabic_Presentation_Forms_A:"FB50-FDFF",InVariation_Selectors:"FE00-FE0F",InVertical_Forms:"FE10-FE1F",InCombining_Half_Marks:"FE20-FE2F",InCJK_Compatibility_Forms:"FE30-FE4F",InSmall_Form_Variants:"FE50-FE6F",InArabic_Presentation_Forms_B:"FE70-FEFF",InHalfwidth_and_Fullwidth_Forms:"FF00-FFEF",InSpecials:"FFF0-FFFF"})}(d),/*!
 * XRegExp Unicode Properties v1.0.0
 * (c) 2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 * Uses Unicode 6.1 <http://unicode.org/>
 */
function(a){"use strict";if(!a.addUnicodePackage)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");a.install("extensibility"),a.addUnicodePackage({Alphabetic:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE03450370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05270531-055605590561-058705B0-05BD05BF05C105C205C405C505C705D0-05EA05F0-05F20610-061A0620-06570659-065F066E-06D306D5-06DC06E1-06E806ED-06EF06FA-06FC06FF0710-073F074D-07B107CA-07EA07F407F507FA0800-0817081A-082C0840-085808A008A2-08AC08E4-08E908F0-08FE0900-093B093D-094C094E-09500955-09630971-09770979-097F0981-09830985-098C098F09900993-09A809AA-09B009B209B6-09B909BD-09C409C709C809CB09CC09CE09D709DC09DD09DF-09E309F009F10A01-0A030A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A3E-0A420A470A480A4B0A4C0A510A59-0A5C0A5E0A70-0A750A81-0A830A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD-0AC50AC7-0AC90ACB0ACC0AD00AE0-0AE30B01-0B030B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D-0B440B470B480B4B0B4C0B560B570B5C0B5D0B5F-0B630B710B820B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BBE-0BC20BC6-0BC80BCA-0BCC0BD00BD70C01-0C030C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D-0C440C46-0C480C4A-0C4C0C550C560C580C590C60-0C630C820C830C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD-0CC40CC6-0CC80CCA-0CCC0CD50CD60CDE0CE0-0CE30CF10CF20D020D030D05-0D0C0D0E-0D100D12-0D3A0D3D-0D440D46-0D480D4A-0D4C0D4E0D570D60-0D630D7A-0D7F0D820D830D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60DCF-0DD40DD60DD8-0DDF0DF20DF30E01-0E3A0E40-0E460E4D0E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB90EBB-0EBD0EC0-0EC40EC60ECD0EDC-0EDF0F000F40-0F470F49-0F6C0F71-0F810F88-0F970F99-0FBC1000-10361038103B-103F1050-10621065-1068106E-1086108E109C109D10A0-10C510C710CD10D0-10FA10FC-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A135F1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA16EE-16F01700-170C170E-17131720-17331740-17531760-176C176E-1770177217731780-17B317B6-17C817D717DC1820-18771880-18AA18B0-18F51900-191C1920-192B1930-19381950-196D1970-19741980-19AB19B0-19C91A00-1A1B1A20-1A5E1A61-1A741AA71B00-1B331B35-1B431B45-1B4B1B80-1BA91BAC-1BAF1BBA-1BE51BE7-1BF11C00-1C351C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF31CF51CF61D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209C21022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E2160-218824B6-24E92C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2CF22CF32D00-2D252D272D2D2D30-2D672D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2DE0-2DFF2E2F3005-30073021-30293031-30353038-303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A66EA674-A67BA67F-A697A69F-A6EFA717-A71FA722-A788A78B-A78EA790-A793A7A0-A7AAA7F8-A801A803-A805A807-A80AA80C-A827A840-A873A880-A8C3A8F2-A8F7A8FBA90A-A92AA930-A952A960-A97CA980-A9B2A9B4-A9BFA9CFAA00-AA36AA40-AA4DAA60-AA76AA7AAA80-AABEAAC0AAC2AADB-AADDAAE0-AAEFAAF2-AAF5AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABEAAC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1D-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Uppercase:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E05200522052405260531-055610A0-10C510C710CD1E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F21452160-216F218324B6-24CF2C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CED2CF2A640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA660A662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BA78DA790A792A7A0A7A2A7A4A7A6A7A8A7AAFF21-FF3A",Lowercase:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02B802C002C102E0-02E40345037103730377037A-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F05210523052505270561-05871D00-1DBF1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF72071207F2090-209C210A210E210F2113212F21342139213C213D2146-2149214E2170-217F218424D0-24E92C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7D2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2CF32D00-2D252D272D2DA641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA661A663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76F-A778A77AA77CA77FA781A783A785A787A78CA78EA791A793A7A1A7A3A7A5A7A7A7A9A7F8-A7FAFB00-FB06FB13-FB17FF41-FF5A",White_Space:"0009-000D0020008500A01680180E2000-200A20282029202F205F3000",Noncharacter_Code_Point:"FDD0-FDEFFFFEFFFF",Default_Ignorable_Code_Point:"00AD034F115F116017B417B5180B-180D200B-200F202A-202E2060-206F3164FE00-FE0FFEFFFFA0FFF0-FFF8",Any:"0000-FFFF",Ascii:"0000-007F",Assigned:"0000-0377037A-037E0384-038A038C038E-03A103A3-05270531-05560559-055F0561-05870589058A058F0591-05C705D0-05EA05F0-05F40600-06040606-061B061E-070D070F-074A074D-07B107C0-07FA0800-082D0830-083E0840-085B085E08A008A2-08AC08E4-08FE0900-09770979-097F0981-09830985-098C098F09900993-09A809AA-09B009B209B6-09B909BC-09C409C709C809CB-09CE09D709DC09DD09DF-09E309E6-09FB0A01-0A030A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A3C0A3E-0A420A470A480A4B-0A4D0A510A59-0A5C0A5E0A66-0A750A81-0A830A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABC-0AC50AC7-0AC90ACB-0ACD0AD00AE0-0AE30AE6-0AF10B01-0B030B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3C-0B440B470B480B4B-0B4D0B560B570B5C0B5D0B5F-0B630B66-0B770B820B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BBE-0BC20BC6-0BC80BCA-0BCD0BD00BD70BE6-0BFA0C01-0C030C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D-0C440C46-0C480C4A-0C4D0C550C560C580C590C60-0C630C66-0C6F0C78-0C7F0C820C830C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBC-0CC40CC6-0CC80CCA-0CCD0CD50CD60CDE0CE0-0CE30CE6-0CEF0CF10CF20D020D030D05-0D0C0D0E-0D100D12-0D3A0D3D-0D440D46-0D480D4A-0D4E0D570D60-0D630D66-0D750D79-0D7F0D820D830D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60DCA0DCF-0DD40DD60DD8-0DDF0DF2-0DF40E01-0E3A0E3F-0E5B0E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB90EBB-0EBD0EC0-0EC40EC60EC8-0ECD0ED0-0ED90EDC-0EDF0F00-0F470F49-0F6C0F71-0F970F99-0FBC0FBE-0FCC0FCE-0FDA1000-10C510C710CD10D0-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A135D-137C1380-139913A0-13F41400-169C16A0-16F01700-170C170E-17141720-17361740-17531760-176C176E-1770177217731780-17DD17E0-17E917F0-17F91800-180E1810-18191820-18771880-18AA18B0-18F51900-191C1920-192B1930-193B19401944-196D1970-19741980-19AB19B0-19C919D0-19DA19DE-1A1B1A1E-1A5E1A60-1A7C1A7F-1A891A90-1A991AA0-1AAD1B00-1B4B1B50-1B7C1B80-1BF31BFC-1C371C3B-1C491C4D-1C7F1CC0-1CC71CD0-1CF61D00-1DE61DFC-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FC41FC6-1FD31FD6-1FDB1FDD-1FEF1FF2-1FF41FF6-1FFE2000-2064206A-20712074-208E2090-209C20A0-20B920D0-20F02100-21892190-23F32400-24262440-244A2460-26FF2701-2B4C2B50-2B592C00-2C2E2C30-2C5E2C60-2CF32CF9-2D252D272D2D2D30-2D672D6F2D702D7F-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2DE0-2E3B2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB3000-303F3041-30963099-30FF3105-312D3131-318E3190-31BA31C0-31E331F0-321E3220-32FE3300-4DB54DC0-9FCCA000-A48CA490-A4C6A4D0-A62BA640-A697A69F-A6F7A700-A78EA790-A793A7A0-A7AAA7F8-A82BA830-A839A840-A877A880-A8C4A8CE-A8D9A8E0-A8FBA900-A953A95F-A97CA980-A9CDA9CF-A9D9A9DEA9DFAA00-AA36AA40-AA4DAA50-AA59AA5C-AA7BAA80-AAC2AADB-AAF6AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABEDABF0-ABF9AC00-D7A3D7B0-D7C6D7CB-D7FBD800-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1D-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBC1FBD3-FD3FFD50-FD8FFD92-FDC7FDF0-FDFDFE00-FE19FE20-FE26FE30-FE52FE54-FE66FE68-FE6BFE70-FE74FE76-FEFCFEFFFF01-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDCFFE0-FFE6FFE8-FFEEFFF9-FFFD"})}(d),/*!
 * XRegExp.matchRecursive v0.2.0
 * (c) 2009-2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 */
function(a){"use strict";function b(a,b,c,d){return{value:a,name:b,start:c,end:d}}a.matchRecursive=function(c,d,e,f,g){f=f||"",g=g||{};var h,i,j,k,l,m=f.indexOf("g")>-1,n=f.indexOf("y")>-1,o=f.replace(/y/g,""),p=g.escapeChar,q=g.valueNames,r=[],s=0,t=0,u=0,v=0;if(d=a(d,o),e=a(e,o),p){if(p.length>1)throw new SyntaxError("can't use more than one escape character");p=a.escape(p),l=new RegExp("(?:"+p+"[\\S\\s]|(?:(?!"+a.union([d,e]).source+")[^"+p+"])+)+",f.replace(/[^im]+/g,""))}for(;;){if(p&&(u+=(a.exec(c,l,u,"sticky")||[""])[0].length),j=a.exec(c,d,u),k=a.exec(c,e,u),j&&k&&(j.index<=k.index?k=null:j=null),j||k)t=(j||k).index,u=t+(j||k)[0].length;else if(!s)break;if(n&&!s&&t>v)break;if(j)s||(h=t,i=u),++s;else{if(!k||!s)throw new Error("string contains unbalanced delimiters");if(!--s&&(q?(q[0]&&h>v&&r.push(b(q[0],c.slice(v,h),v,h)),q[1]&&r.push(b(q[1],c.slice(h,i),h,i)),q[2]&&r.push(b(q[2],c.slice(i,t),i,t)),q[3]&&r.push(b(q[3],c.slice(t,u),t,u))):r.push(c.slice(i,t)),v=u,!m))break}t===u&&++u}return m&&!n&&q&&q[0]&&c.length>v&&r.push(b(q[0],c.slice(v),v,c.length)),r}}(d),/*!
 * XRegExp.build v0.1.0
 * (c) 2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 * Inspired by RegExp.create by Lea Verou <http://lea.verou.me/>
 */
function(a){"use strict";function b(a){var b=/^(?:\(\?:\))?\^/,c=/\$(?:\(\?:\))?$/;return c.test(a.replace(/\\[\s\S]/g,""))?a.replace(b,"").replace(c,""):a}function c(b){return a.isRegExp(b)?b.xregexp&&!b.xregexp.isNative?b:a(b.source):a(b)}var d=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,e=a.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,d],"g");a.build=function(f,g,h){var i,j,k,l,m=/^\(\?([\w$]+)\)/.exec(f),n={},o=0,p=0,q=[0];m&&(h=h||"",m[1].replace(/./g,function(a){h+=h.indexOf(a)>-1?"":a}));for(l in g)g.hasOwnProperty(l)&&(k=c(g[l]),n[l]={pattern:b(k.source),names:k.xregexp.captureNames||[]});return f=c(f),j=f.xregexp.captureNames||[],f=f.source.replace(e,function(a,b,c,e,f){var g,h,k=b||c;if(k){if(!n.hasOwnProperty(k))throw new ReferenceError("undefined property "+a);return b?(g=j[p],q[++p]=++o,h="(?<"+(g||k)+">"):h="(?:",i=o,h+n[k].pattern.replace(d,function(a,b,c){if(b){if(g=n[k].names[o-i],++o,g)return"(?<"+g+">"}else if(c)return"\\"+(+c+i);return a})+")"}if(e){if(g=j[p],q[++p]=++o,g)return"(?<"+g+">"}else if(f)return"\\"+q[+f];return a}),a(f,h)}}(d),/*!
 * XRegExp Prototype Methods v1.0.0
 * (c) 2012 Steven Levithan <http://xregexp.com/>
 * MIT License
 */
function(a){"use strict";function b(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}b(a.prototype,{apply:function(a,b){return this.test(b[0])},call:function(a,b){return this.test(b)},forEach:function(b,c,d){return a.forEach(b,this,c,d)},globalize:function(){return a.globalize(this)},xexec:function(b,c,d){return a.exec(b,this,c,d)},xtest:function(b,c,d){return a.test(b,this,c,d)}})}(d)},{}],243:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiAccordionGroupState",["propertyPanel",function(a){return{require:["^accordionGroup"],link:function(b,c,d){b.$watch(function(){if(b.model)return a.getItemState(b.model,"activeAccordionGroup")},function(c){c===d.unifiAccordionGroupStateId&&(b.$parent.isOpen=!0,a.unsetItemState(b.model,"activeAccordionGroup",!1))})}}}])},{}],244:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.$q=a,this.$stateParams=b,this.$translate=c,this.heyToasts=d,this.admins=g,this.preferences=h,this.settings=i,this.roleOptions=[{id:"superadmin",translationKey:"SETTINGS_ADMIN_VALUES_ROLE_SUPER_ADMIN",visible:!0},{id:"admin",translationKey:"SETTINGS_ADMIN_VALUES_ROLE_ADMIN",visible:!0},{id:"readonly",translationKey:"SETTINGS_ADMIN_VALUES_ROLE_READ_ONLY",visible:!0}],this.addAction="invite",this.onAddActionChange(),this.patterns={accountName:k.ACCOUNT_NAME},this.isSuperAdmin=f.isSuperAdmin.bind(f),e.call(this,j)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getAdminsCollection=function(){return this.admins.repository.collection},d.prototype.updateModel=function(a){a.attributes.for_sso=this.settings.getSettingFromKey("super_sdn")&&this.settings.getSettingFromKey("super_sdn").get("enabled"),e.prototype.updateModel.call(this,a)},d.prototype.isCreateState=function(){return"add"===this.$stateParams.action&&"create"===this.addAction},d.prototype.isInviteState=function(){return"add"===this.$stateParams.action&&"invite"===this.addAction},d.prototype.isEditState=function(){return"edit"===this.$stateParams.action},d.prototype.getCurrentState=function(){return this.isEditState()?"edit":this.isCreateState()?"create":this.isInviteState()?"invite":void 0},d.prototype.adminDataHasBeenChanged=function(){var a=this.model.deepAttributes(),b=this.modelCopy.deepAttributes();return delete a.role,delete b.role,delete a.is_super,delete b.is_super,!angular.equals(a,b)},d.prototype.adminRoleHasBeenChanged=function(){return this.model.get("role")!==this.modelCopy.get("role")},d.prototype.adminSuperRoleHasBeenChanged=function(){return this.model.get("is_super")!==this.modelCopy.get("is_super")},d.prototype._executeSave=function(a,b){var c=[];if(this.isCreateState()){var d=this.admins.createAdmin(a,b);if(c.push(d),b.is_super){var e=this.$q.defer();c.push(e.promise),d.then(function(){e.resolve(this.admins.grantSuperAdmin(a,b))}.bind(this))}}else this.isInviteState()?c.push(this.admins.inviteAdmin(a,b)):this.isEditState()&&(this.adminDataHasBeenChanged()&&c.push(this.admins.editAdmin(a,b)),this.adminRoleHasBeenChanged()&&c.push(this.admins.grantAdmin(a,b)),this.adminSuperRoleHasBeenChanged()&&(b.is_super?c.push(this.admins.grantSuperAdmin(a,b)):c.push(this.admins.revokeSuperAdmin(a,b))));return c},d.prototype.save=function(){this.isSubmitting=!0;var a=this._executeSave(this.model,this.modelCopy.attributes);return a.forEach(function(a){a.then(this.heyToasts.pushSuccess.bind(this.heyToasts))["catch"](this.heyToasts.pushError.bind(this.heyToasts))}.bind(this)),this.$q.all(a).then(function(){return!0})["catch"](function(){return!1})["finally"](function(){this.getAdminsCollection().fetch(),this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";if(this["model"+b]){var c=this["model"+b].attributes;c.requires_new_password=!this.model||this.model.get("requires_new_password")!==!1,c.email_alert_enabled=this.model&&this.model.get("email_alert_enabled")||!1,c.email_alert_grouping_enabled=this.model&&this.model.get("email_alert_grouping_enabled")||!1,c.email_alert_grouping_delay=this.model&&angular.copy(this.model.get("email_alert_grouping_delay"))||60,c.role=this.model&&this.model.get("role")||"readonly",c.is_super=this.model&&this.model.get("is_super")||!1,this.attrRole=c.is_super?"superadmin":c.role}},d.prototype.onAddActionChange=function(){this.roleOptions[0].visible=!this.isInviteState(),"superadmin"===this.attrRole&&(this.attrRole="admin",this.onRoleChange(),this.heyToasts.pushWarning(this.$translate.instant("ADMIN_ACTIONS_ROLE_WAS_AUTO_CHANGED",{roleType:this.$translate.instant("SETTINGS_ADMIN_VALUES_ROLE_ADMIN")})))},d.prototype.onRoleChange=function(){"superadmin"===this.attrRole?this.modelCopy.attributes.is_super=!0:(this.modelCopy.attributes.is_super=!1,this.modelCopy.attributes.role=this.attrRole)},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$q","$stateParams","$translate","heyToasts","account","admins","preferences","settings","modelDivergence","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("AdminFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],245:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="adminFormCtrl.form" ng-class="{    \'appForm--dark\': adminFormCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': adminFormCtrl.showValidation,    \'is-validation-hidden\': !adminFormCtrl.showValidation  }" ng-submit="adminFormCtrl.form.$valid &amp;&amp; adminFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="adminFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="adminFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="adminFormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="adminFormCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate="{{\'SETTINGS_ADMIN_SECTION_\' + adminFormCtrl.getCurrentState() | toTranslationKey}}" translate-values="{adminName: adminFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_ADMIN_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="adminName" ng-model="adminFormCtrl.modelCopy.attributes.name" ng-model-master="adminFormCtrl.model.attributes.name" ng-pattern="adminFormCtrl.patterns.accountName" required class="input--full"><div ng-show="adminFormCtrl.form.adminName.$error.pattern" translate="VALIDATION_HINT_ADMIN_NAME" class="appInputFeedback appInputFeedback--danger"></div></div></div><div ng-if="adminFormCtrl.isSuperAdmin() &amp;&amp; !adminFormCtrl.isEditState()" class="row"><div class="col--sm3"><label translate="SETTINGS_ADMIN_LABEL_INVITE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div ng-repeat="addAction in [\'invite\', \'create\']" class="appInputGroup appInputGroup--cozy"><input type="radio" name="addAction" id="addAction_{{addAction}}" ng-model="adminFormCtrl.addAction" ng-value="addAction" ng-change="adminFormCtrl.onAddActionChange()"><label for="addAction_{{addAction}}" translate="{{\'SETTINGS_ADMIN_VALUES_ADD_BY_\' + addAction | toTranslationKey}}"></label></div></div></div><div ng-show="adminFormCtrl.isCreateState() || adminFormCtrl.isEditState()" class="row"><div class="col--sm3"><label translate="SETTINGS_ADMIN_LABEL_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="password" name="adminPassword" ng-model="adminFormCtrl.modelCopy.attributes.x_password" ng-model-master="adminFormCtrl.model.attributes.x_password" ng-required="adminFormCtrl.isCreateState()" class="input--full"></div><div ng-show="adminFormCtrl.isCreateState()" class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="adminRequiresNewPassword" id="adminRequiresNewPassword" ng-model="adminFormCtrl.modelCopy.attributes.requires_new_password" ng-model-master="adminFormCtrl.model.attributes.requires_new_password"><label for="adminRequiresNewPassword" translate="SETTINGS_ADMIN_LABEL_PASSWORD_REQUIRES_NEW"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_ADMIN_LABEL_EMAIL" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="email" name="adminEmail" ng-model="adminFormCtrl.modelCopy.attributes.email" ng-model-master="adminFormCtrl.model.attributes.email" ng-required="adminFormCtrl.isInviteState() || adminFormCtrl.model.attributes.email" class="input--full"></div></div><div ng-show="adminFormCtrl.isInviteState()" class="row"><div class="col--sm3"><label translate="SETTINGS_ADMIN_LABEL_SDN" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="inviteToSdn" id="inviteToSdn" ng-model="adminFormCtrl.modelCopy.attributes.for_sso" ng-model-master="adminFormCtrl.model.attributes.for_sso"><label for="inviteToSdn" translate="SETTINGS_ADMIN_VALUES_SDN"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable horizontalRhythmLeft--cozy"><div ng-class="{\'appTooltip--dark\': adminFormCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_ADMIN_TOOLTIP_SDN" class="appTooltip"></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_ADMIN_LABEL_ROLE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="adminRole" ng-model="adminFormCtrl.attrRole" ng-options="opt.id as opt.translationKey | translate for opt in adminFormCtrl.roleOptions | filter:{visible: true}" ng-change="adminFormCtrl.onRoleChange()" class="select--full"></select></div><div ng-if="adminFormCtrl.model.attributes.is_super &amp;&amp; !adminFormCtrl.modelCopy.attributes.is_super" ng-class="{\'appInfoBox--dark\': adminFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div translate="SETTINGS_ADMIN_HELP_ROLE_REVOKE_SUPER_ADMIN" translate-values="{adminName: adminFormCtrl.model.attributes.name}" class="appInfoBox__body"></div></div></div><div ng-if="!adminFormCtrl.model.attributes.is_super &amp;&amp; adminFormCtrl.modelCopy.attributes.is_super" ng-class="{\'appInfoBox--dark\': adminFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div translate="SETTINGS_ADMIN_HELP_ROLE_GRANT_SUPER_ADMIN" class="appInfoBox__body"></div></div></div></div></div><div ng-if="adminFormCtrl.isEditState()" class="row"><div class="col--sm3"><label translate="SETTINGS_ADMIN_LABEL_EMAIL_ALERT" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="emailAlertEnabled" ng-model="adminFormCtrl.modelCopy.attributes.email_alert_enabled" ng-model-master="adminFormCtrl.model.attributes.email_alert_enabled"><label for="emailAlertEnabled" translate="SETTINGS_ADMIN_VALUES_EMAIL_ALERT_ENABLED"></label></div><div ng-if="adminFormCtrl.isEditState()" ng-show="adminFormCtrl.modelCopy.attributes.email_alert_enabled" class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="emailAlertGroupingEnabled" ng-model="adminFormCtrl.modelCopy.attributes.email_alert_grouping_enabled" ng-model-master="adminFormCtrl.model.attributes.email_alert_grouping_enabled"><label for="emailAlertGroupingEnabled"><span translate="SETTINGS_ADMIN_VALUES_EMAIL_ALERT_GROUPING_ENABLED_1"></span><input type="number" min="1" max="3600" id="emailAlertGroupingDelay" ng-model="adminFormCtrl.modelCopy.attributes.email_alert_grouping_delay" ng-model-master="adminFormCtrl.model.attributes.email_alert_grouping_delay" required class="input--smallNumber input--inSentence"><span translate="SETTINGS_ADMIN_VALUES_EMAIL_ALERT_GROUPING_ENABLED_2_IN_SECONDS"></span><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable horizontalRhythmLeft--condensed"><div ng-class="{\'appTooltip--dark\': adminFormCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_ADMIN_VALUES_EMAIL_ALERT_GROUPING_ENABLED_TOOLTIP" class="appTooltip"></div></div></label></div></div></div></div></fieldset><div ng-class="{\'appFormFooter--dark\': adminFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="adminFormCtrl.showValidation = true" busy-toggle="adminFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveAdmin"><span>{{\'SETTINGS_ADMIN_ACTIONS_\' + adminFormCtrl.getCurrentState() | toTranslationKey | translate}}</span></button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="adminFormCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],246:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiAdminForm",["SimpleFormDirective",function(b){return new b("admin",a("./adminForm.jade")())}])},{"./adminForm.jade":245}],247:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.$state=a,this.$translate=b,this.heyToasts=d,this.frame=f,this.admins=h,this.account=i,this.preferences=j,this.editAccount=k,this.userId=i.repository.model.id,this.defaultSortBy="name",this.isRemoving={},e.call(this,c,g)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.admins.repository.collection},d.prototype.isSuperAdmin=function(){return this.account.isSuperAdmin()},d.prototype.editSelf=function(){this.editAccount.editAccount()},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_ADMIN_DELETE_CONFIRM_TITLE",{adminName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_ADMIN_DELETE_CONFIRM_MESSAGE",{adminName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,this.admins.revokeAdmin(a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(b){return this.heyToasts.pushError(b),this.isRemoving[a.id]=!1,!1}.bind(this))}.bind(this))},d.prototype.invite=function(a){return this.isInviting=a.id,this.admins.inviteAdmin(a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),this.isInviting=!1,!1}.bind(this))},d.$inject=["$state","$translate","$q","heyToasts","frame","CollectionView","admins","account","preferences","editAccount"],angular.module("app-unifi-manage").controller("AdminListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],248:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="adminsTable" collection-view-sort="adminListCtrl.view" ng-class="{      \'appTable--dark\': adminListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="adminName"><span translate="SETTINGS_ADMIN_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="email" class="adminEmail"><span translate="SETTINGS_ADMIN_TABLE_HEADER_EMAIL"></span></th><th collection-view-sort-by="role" class="adminRole"><span translate="SETTINGS_ADMIN_TABLE_HEADER_ROLE"></span></th><th collection-view-sort-by="is_verified" class="adminVerified"><span translate="SETTINGS_ADMIN_TABLE_HEADER_VERIFIED"></span></th><th class="adminActions"><span translate="SETTINGS_ADMIN_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in adminListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="adminName">{{::model.get(\'name\') || (\'SETTINGS_ADMIN_TABLE_FLAGS_UNCONFIGURED\' | translate)}}</td><td class="adminEmail">{{::model.get(\'email\')}}</td><td class="adminRole">{{::model.get(\'is_super\') ? \'SETTINGS_ADMIN_VALUES_ROLE_SUPER_ADMIN\' : model.get(\'role\') === \'admin\' ? \'SETTINGS_ADMIN_VALUES_ROLE_ADMIN\' : \'SETTINGS_ADMIN_VALUES_ROLE_READ_ONLY\' | translate}}</td><td ng-bind-html="model.get(\'is_verified\') | enabledIcon" class="adminVerified"></td><td class="adminActions appTableCell--actions"><button unifi-feature-flag-enable="enableSettingsAdminsEdit" unifi-feature-flag-and="adminListCtrl.isSuperAdmin() &amp;&amp; adminListCtrl.userId !== model.id" ng-disabled="!model.get(\'is_verified\')" ng-click="adminListCtrl.edit(model)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button ng-if="adminListCtrl.userId === model.id" ng-click="adminListCtrl.editSelf()" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button ng-if="adminListCtrl.userId !== model.id &amp;&amp; !model.get(\'is_super\')" ng-click="adminListCtrl.remove(model)" ng-disabled="adminListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--lock"></span><span translate="SETTINGS_ADMIN_ACTIONS_REVOKE"></span></button><button ng-if="adminListCtrl.userId !== model.id &amp;&amp; !model.get(\'is_super\') &amp;&amp; !model.get(\'is_verified\') &amp;&amp; model.get(\'role\') !== \'hotspot\'" ng-click="adminListCtrl.invite(model)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--email2"></span><span translate="SETTINGS_ADMIN_ACTIONS_REINVITE"></span></button></td></tr></tbody></table><div ng-if="!adminListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': adminListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_ADMIN_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],249:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiAdminList",["ListDirective",function(b){return new b("admin",a("./adminList.jade")(),{onEdit:"&unifiAdminListOnEdit"})}])},{"./adminList.jade":248}],250:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.alerts=b,this.alertUtils=c,this.comparator=d,this.defaultSortBy="datetime",this.defaultSortDesc=!0,this.filter=new h,this.isArchiving={},this.isArchivingAll=!1,this.showArchived=b.repositories.alerts.collection.getWithArchived(),e.call(this,a,f,g)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){this.isFiltered=this.filter.isFiltered.bind(this.filter)},d.prototype.getCollection=function(){return this.alerts.repositories.alerts.collection},d.prototype.archiveAllAlerts=function(){this.isArchivingAll=!0,this.alertUtils.archiveAllAlerts()["finally"](function(){this.isArchivingAll=!1}.bind(this))},d.prototype.archiveAlert=function(a){this.isArchiving[a.id]=!0,this.alertUtils.archiveAlert(a)["finally"](function(){this.isArchiving[a.id]=!1}.bind(this))},d.prototype.toggleArchived=function(){return this.alerts.repositories.alerts.collection.setWithArchived(this.showArchived),this.alerts.repositories.alerts.refresh({reset:!0})},d.prototype.showMoreAlerts=function(){return this.isFetchingMore=!0,this.alerts.repositories.alerts.fetchMore()["finally"](function(){this.isFetchingMore=!1}.bind(this))},d.prototype.hasMoreAlerts=function(){return this.getCollection().length<this.getTotalRows()},d.prototype.getTotalRows=function(){return this.alerts.repositories.alerts.collection.getTotalAlerts()},d.prototype.isAlertsLoading=function(){return!!(this.getCollection().isLoading||this.view&&this.view.isRefreshing())},d.$inject=["$injector","alerts","alertUtils","alertsComparator","CollectionView","preferences","AlertFilter"],angular.module("app-unifi-manage").controller("AlertListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],251:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--dark appActionBar--transparent noHorizontalPadding"><div class="appActionBar__inner"><div class="appActionBar__left"><form class="appForm appForm--cozy appForm--dark"><div class="appInputGroup"><input type="checkbox" name="alertsShowArchived" id="alertsShowArchived" ng-model="alertListCtrl.showArchived" ng-change="alertListCtrl.toggleArchived()"><label for="alertsShowArchived" class="appLabel--boxInline">{{ \'ALERT_TABLE_SHOW_ARCHIVED_ALERTS\' | translate }}</label><button unifi-if-role-admin ng-click="alertListCtrl.archiveAllAlerts()" class="appMainButton appMainButton--transparent appMainButton--cozy">{{ \'ALERT_ACTIONS_ARCHIVE_ALL\' | translate }}</button></div></form></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="alertListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-dark="true" unifi-search-is-busy="alertListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><table id="alertsTable" unifi-condensed="appTable--condensed" unifi-condensed-off="appTable--cozy" class="unifiEventsTable noMarginBottom table--scrollable appTable appTable--dark appTable--flexible appTable--fullScrollable"><thead><tr><th class="unifiEventsTable__eventIcon noPadding visible--smUp">&nbsp;</th><th class="unifiEventsTable__details"><span translate="ALERT_TABLE_HEADER_EVENT"></span></th><th class="unifiEventsTable__date visible--smUp"><span translate="ALERT_TABLE_HEADER_TIME"></span></th><th class="unifiEventsTable__time visible--smUp">&nbsp;</th><th unifi-if-role-admin class="unifiEventsTable__actionIcon noPadding">&nbsp;</th></tr></thead><tbody><tr collection-view-repeat="model in alertListCtrl.view.getModels(),          startFrom (alertListCtrl.currentPage - 1) * alertListCtrl.rowsPerPage,          limitTo alertListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-class="{          \'is-row-muted\': model.get(\'archived\')        }" class="unifiEventsTable__row"><td class="unifiEventsTable__eventIcon noPadding visible--smUp"><div unifi-event-icon="{{::model.get(\'key\')}}" class="appAlertIcon--condensed"></div></td><td class="unifiEventsTable__details"><span unifi-event-message="model"></span><div class="visible--xs">{{::model.get(\'datetime\') | moment: \'format\': \'datetime\'}}</div></td><td class="unifiEventsTable__date visible--smUp">{{::model.get(\'datetime\') | moment: \'calendar\'}}</td><td class="unifiEventsTable__time visible--smUp">{{::model.get(\'datetime\') | moment: \'format\': \'time\'}}</td><td unifi-if-role-admin class="unifiEventsTable__actionIcon noPadding"><button ng-if="!model.get(\'archived\')" ng-click="alertListCtrl.archiveAlert(model)" busy-toggle="alertListCtrl.isArchivingAll || alertListCtrl.isArchiving[model.id]" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" title="{{\'ALERT_ACTIONS_ARCHIVE\' | translate}}" class="appMainButton appMainButton--cozy appMainButton--transparent appMainButton--iconOnly"><span class="icon ubnt-icon--box-archive"></span></button></td></tr><tr ng-if="!alertListCtrl.isAlertsLoading() &amp;&amp; !alertListCtrl.view.getModels().length"><td colspan="5"><div class="appInfoBox appInfoBox--cozy appInfoBox--dark appInfoBox--noBorder verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="ALERT_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!alertListCtrl.isFiltered()" translate="ALERT_TABLE_EMPTY_NO_ALERTS" class="noMarginBottom"></p><p ng-if="alertListCtrl.isFiltered()" translate="ALERT_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></td></tr><tr ng-if="alertListCtrl.isAlertsLoading() &amp;&amp; !alertListCtrl.isFetchingMore" class="unifiEventsTable__busy"><td colspan="5"><div class="appSpinner appSpinner--light appSpinner--small"></div></td></tr></tbody><tfoot><tr><td colspan="5"><unifi-list-pagination unifi-list-pagination-current-page="alertListCtrl.currentPage" unifi-list-pagination-rows-per-page="alertListCtrl.rowsPerPage" unifi-list-pagination-total-rows="alertListCtrl.view.getModels().length" unifi-list-pagination-total-links="5" unifi-list-pagination-is-dark="true"></unifi-list-pagination></td></tr><tr ng-if="alertListCtrl.hasMoreAlerts()"><td colspan="5" class="unifiEventsTable__showMore"><span>{{\'ALERT_TABLE_LIMITED\' | translate: \'{currentLength:\' + alertListCtrl.getCollection().length + \', totalLength: \' + alertListCtrl.getTotalRows() + \'}\'}}\n&nbsp;</span><button ng-click="alertListCtrl.showMoreAlerts()" busy-toggle="alertListCtrl.isFetchingMore" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appTextButton">{{\'ALERT_TABLE_FETCH_MORE\' | translate}}</button></td></tr></tfoot></table></div>'),b.join("")}},{"jade/runtime":232}],252:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiAlertList",["PaginatedListDirective",function(b){return new b("alert",a("./alertList.jade")())}])},{"./alertList.jade":251}],253:[function(a,b,c){"use strict";function d(a,b){e.call(this,a,b)}var e=a("../../controllers/AlertsLinkController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["alerts","alertFrameUtils"],angular.module("app-unifi-manage").controller("AlertsSideNavController",d)},{"../../controllers/AlertsLinkController":993}],254:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="alertsLink" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div ng-click="alertsSideNavCtrl.toggleAlerts()" class="appGlobalSideNav__itemTrigger"></div><div class="appGlobalSideNav__itemIcon icon ubnt-icon--bell"></div><div ng-if="!alertsSideNavCtrl.isAlertsOpen()" translate="COMMON_NAV_ALERTS" class="appGlobalSideNavTooltip"></div><div side-nav-popover-layout="alertsLayout" ng-init="alertsFullScreen = false" ng-class="{\'appGlobalSideNavPopover--fullscreen\': alertsFullScreen}" class="appGlobalSideNavPopover appGlobalSideNavPopover--withLayerShadow"><div ng-click="alertsFullScreen = !alertsFullScreen" class="appGlobalSideNavPopover__fullscreenIcon visible--mdUp"><div class="icon ubnt-icon--fullscreen"></div></div><div class="appGlobalSideNavPopover__inner"><div side-nav-popover-content class="appGlobalSideNavPopoverList"></div><div side-nav-popover-placeholder></div></div></div><unifi-unread-alerts></unifi-unread-alerts></div>'),b.join("")}},{"jade/runtime":232}],255:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiAlertsSideNav",[function(){return{controller:"AlertsSideNavController",controllerAs:"alertsSideNavCtrl",replace:!0,restrict:"E",template:a("./alertsSideNav.jade")()}}])},{"./alertsSideNav.jade":254}],256:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){this.deviceFeatureUtils=f,this.deviceFeatureUtils=f,this.deviceRadioUtils=g,this.devices=h,this.deviceStateUtils=i,this.deviceUplinkUtils=j,this.featureFlag=k,this.networks=m,this.rfEnvironment=o,this.system=p,this.tags=q,this.wirelessNetworkGroups=r,this.wirelessNetworks=s,this.DEVICE_STATES=t,this.isSaveQueued=!0,this.accordions={details:{overview:!0},configure:{general:!0}},this.validators={warnings:void 0},e.call(this,a,b,c,n,d,l)}var e=a("../../controllers/BasePropertiesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.resolve=function(){var a=[this.system.repository.register().fetch(),this.networks.repository.register().fetch(),this.wirelessNetworkGroups.repository.register().fetch(),this.wirelessNetworks.repository.register().fetch()];return this.featureFlag.isEnabled("enableApTagging")&&a.push(this.tags.repository.register().fetch()),this.$q.all(a)},d.prototype.destroy=function(){this.system.repository.unregister(),this.networks.repository.unregister(),this.wirelessNetworkGroups.repository.unregister(),this.wirelessNetworks.repository.unregister(),this.featureFlag.isEnabled("enableApTagging")&&this.tags.repository.unregister()},d.prototype.reset=function(){this.deviceState=void 0,this.deviceStatus=void 0,this.uplink=void 0,this.uplinkAttrs={},this.uplinkName="",this.showUsersTab=!1,this.showGuestsTab=!1,this.showConfigureTab=!1,this.showAdoptTab=!1,this.showBandSteeringAccordion=!1,this.showRadioAccordion=!1,this.showUplinksAccordion=!1,this.showTerminalAccordion=!1,this.showRfEnvironmentAccordion=!1},d.prototype.onModelChange=function(){this.persistAdoptTab=this.showAdoptTab&&this.deviceStateUtils.getRawDeviceState(this.model)===this.DEVICE_STATES.ADOPTING,this.reset(),this.model&&(this.deviceState=this.deviceStateUtils.getDeviceState(this.model),this.deviceStatus=this.deviceStateUtils.getDeviceStatus(this.model),(this.uplinkAttrs=this.deviceUplinkUtils.getUplinkAttrs(this.model))&&(this.uplink=this.deviceUplinkUtils.getUplink(this.model),this.uplinkName=this.deviceUplinkUtils.getUplinkDisplayName(this.model)),this.showUsersTab="success"===this.deviceStatus,this.showGuestsTab="success"===this.deviceStatus,this.showConfigureTab=this.model.get("adopted"),this.showAdoptTab=this.persistAdoptTab||this.deviceState===this.DEVICE_STATES.ADOPTION_FAILED||this.deviceState===this.DEVICE_STATES.MANAGED_BY_OTHER,this.showBandSteeringAccordion=this.deviceRadioUtils.hasRadioType(this.model,"na")&&this.deviceRadioUtils.hasRadioType(this.model,"ng"),this.showRadioAccordion="success"===this.deviceStatus,this.showUplinksAccordion=this.deviceUplinkUtils.isWirelessUplinkAvailable(this.model),
this.showTerminalAccordion=this.deviceFeatureUtils.isTerminalSupported(this.model)&&(this.deviceState===this.DEVICE_STATES.CONNECTED||this.deviceState===this.DEVICE_STATES.PROVISIONING),this.showRfEnvironmentAccordion=this.rfEnvironment.isAvailable(this.model))},d.$inject=["$q","$timeout","$translate","account","deviceFeatureUtils","deviceRadioUtils","devices","deviceStateUtils","deviceUplinkUtils","featureFlag","frame","networks","propertyPanel","rfEnvironment","system","tags","wirelessNetworkGroups","wirelessNetworks","DEVICE_STATES"],angular.module("app-unifi-manage").controller("ApPropertiesController",d)},{"../../controllers/BasePropertiesController":1001}],257:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-collapsed\': apPropertiesCtrl.isCollapsed()}" ng-if="apPropertiesCtrl.model" class="unifiPanelItem apProperties"><unifi-loading-status unifi-loading-status-is-loading="apPropertiesCtrl.isLoading" unifi-loading-status-failed="apPropertiesCtrl.failedToLoad" unifi-loading-status-retry="apPropertiesCtrl.init()"></unifi-loading-status><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__collapseToggle"><div ng-click="apPropertiesCtrl.toggleCollapsed()" class="appActionIcon"><span ng-class="{            \'unifi-icon--default-collapse\': !apPropertiesCtrl.isCollapsed(),            \'unifi-icon--default-expand\': apPropertiesCtrl.isCollapsed()          }" class="button__icon icon"></span></div></div><div class="unifiPanelItemHeader__avatar"><div unifi-device-icon="::apPropertiesCtrl.model"></div></div><div class="unifiPanelItemHeader__title"><span unifi-device-status="::apPropertiesCtrl.model" unifi-device-status-is-cozy="true" unifi-device-status-is-truncated="true" unifi-device-status-with-icons="true" unifi-device-status-label="::apPropertiesCtrl.model.getDisplayName()"></span><div class="unifiPanelItemHeader__status"><span unifi-device-status-badge="::apPropertiesCtrl.model"></span></div></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div unifi-device-button-adopt="::apPropertiesCtrl.model" unifi-device-button-adopt-collection="::apPropertiesCtrl.devices.repository.collection" unifi-device-button-adopt-is-reverse="true" class="appActionIcon appActionIcon--primary appActionIcon--reverse appActionIcon--round"></div><div unifi-device-button-restart="::apPropertiesCtrl.model" class="appActionIcon"></div><div unifi-device-button-locate="::apPropertiesCtrl.model" unifi-device-button-locate-with-map="true" class="appActionIcon"></div><div unifi-device-button-upgrade="::apPropertiesCtrl.model" class="appActionIcon"></div><div ng-click="apPropertiesCtrl.toggleUndocked()" title="{{apPropertiesCtrl.isUndocked() ? \'COMMON_PROPERTY_PANEL_ITEM_DOCK\' : \'COMMON_PROPERTY_PANEL_ITEM_UNDOCK\' | translate}}" class="appActionIcon visible--mdUp"><span ng-class="{              \'ubnt-icon--header-maximize\': !apPropertiesCtrl.isUndocked(),              \'ubnt-icon--header-minimize\': apPropertiesCtrl.isUndocked()            }" class="button__icon icon"></span></div><div ng-click="apPropertiesCtrl.removePanel()" title="{{\'COMMON_PROPERTY_PANEL_ITEM_REMOVE\' | translate}}" class="appActionIcon removePanelItem"><span class="button__icon icon unifi-icon--default-close"></span></div></div></div></div><div class="unifiPanelItemBody"><div class="unifiPanelItemBodySection"><div unifi-device-properties-license-warning="::apPropertiesCtrl.model" class="unifiDevicePropertiesLicenseWarning"></div></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><ul class="appTabs appTabs--compressed appTabs--alignLeft"><li ng-click="apPropertiesCtrl.setActiveTab(\'details\')" ng-class="{            \'is-tab-selected\': apPropertiesCtrl.getActiveTab() === \'details\',            \'is-tab-loading\': apPropertiesCtrl.loadingTab === \'details\'          }" translate="DEVICE_PROPERTIES_TAB_DETAILS" class="tabs__item details"></li><li ng-if="apPropertiesCtrl.showUsersTab" ng-click="apPropertiesCtrl.setActiveTab(\'users\')" ng-class="{            \'is-tab-selected\': apPropertiesCtrl.getActiveTab() === \'users\',            \'is-tab-loading\': apPropertiesCtrl.loadingTab === \'users\'          }" translate="DEVICE_PROPERTIES_TAB_USERS" class="tabs__item users"></li><li ng-if="apPropertiesCtrl.showGuestsTab" ng-click="apPropertiesCtrl.setActiveTab(\'guests\')" ng-class="{            \'is-tab-selected\': apPropertiesCtrl.getActiveTab() === \'guests\',            \'is-tab-loading\': apPropertiesCtrl.loadingTab === \'guests\'          }" translate="DEVICE_PROPERTIES_TAB_GUESTS" class="tabs__item guests"></li><li ng-if="apPropertiesCtrl.showConfigureTab" ng-click="apPropertiesCtrl.setActiveTab(\'configure\')" ng-class="{            \'is-tab-selected\': apPropertiesCtrl.getActiveTab() === \'configure\',            \'is-tab-loading\': apPropertiesCtrl.loadingTab === \'configure\'          }" translate="DEVICE_PROPERTIES_TAB_CONFIGURATION" class="tabs__item configure"></li><li unifi-if-role-admin unifi-if-role-admin-and="apPropertiesCtrl.showAdoptTab" ng-click="apPropertiesCtrl.setActiveTab(\'adopt\')" ng-class="{            \'is-tab-selected\': apPropertiesCtrl.getActiveTab() === \'adopt\',            \'is-tab-loading\': apPropertiesCtrl.loadingTab === \'adopt\'          }" translate="DEVICE_PROPERTIES_TAB_ADOPT" class="tabs__item adopt"></li></ul></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div class="unifiPanelItemContent"><div ng-if="apPropertiesCtrl.isTabAvailable(\'details\') &amp;&amp; apPropertiesCtrl.getActiveTab() === \'details\'" unifi-ap-properties-details class="apPropertiesDetails"></div><div ng-if="apPropertiesCtrl.showUsersTab &amp;&amp; apPropertiesCtrl.isTabAvailable(\'users\') &amp;&amp; apPropertiesCtrl.getActiveTab() === \'users\'" class="apPropertiesUsers"><unifi-device-properties-client-list unifi-device-properties-client-list-local-state="true" unifi-device-properties-client-list-local-state-key="::apPropertiesCtrl.model.get(\'mac\') + \'|users\'" unifi-device-properties-client-list-device="::apPropertiesCtrl.model" unifi-device-properties-client-list-is-guest="false"></unifi-device-properties-client-list></div><div ng-if="apPropertiesCtrl.showGuestsTab &amp;&amp; apPropertiesCtrl.isTabAvailable(\'guests\') &amp;&amp; apPropertiesCtrl.getActiveTab() === \'guests\'" class="apPropertiesGuests"><unifi-device-properties-client-list unifi-device-properties-client-list-local-state="true" unifi-device-properties-client-list-local-state-key="::apPropertiesCtrl.model.get(\'mac\') + \'|guests\'" unifi-device-properties-client-list-device="::apPropertiesCtrl.model" unifi-device-properties-client-list-is-guest="true"></unifi-device-properties-client-list></div><div ng-if="apPropertiesCtrl.showConfigureTab &amp;&amp; apPropertiesCtrl.isTabAvailable(\'configure\')" ng-show="apPropertiesCtrl.getActiveTab() === \'configure\'" unifi-ap-properties-configure class="apPropertiesConfigure"></div><div unifi-if-role-admin unifi-if-role-admin-and="apPropertiesCtrl.showAdoptTab &amp;&amp; apPropertiesCtrl.isTabAvailable(\'adopt\')" ng-show="apPropertiesCtrl.getActiveTab() === \'adopt\'" unifi-device-properties-adopt="::apPropertiesCtrl.model" class="apPropertiesAdopt"></div></div></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static unifiPanelItemBodySection--pending"><unifi-pending-changes-list unifi-pending-changes-list-model="::apPropertiesCtrl.model" unifi-pending-changes-list-save="applyPendingChanges(model)"></unifi-pending-changes-list></div></div></div>'),b.join("")}},{"jade/runtime":232}],258:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApProperties",["updateModelDirectiveMixin","devicePropertiesPendingActionsDirectiveMixin",function(b,c){return{scope:{model:"=unifiApProperties"},controller:"ApPropertiesController",controllerAs:"apPropertiesCtrl",template:a("./apProperties.jade")(),link:function(a,d,e,f){a.$on("$destroy",function(){f.destroy(),f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./apProperties.jade":257}],259:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.$translate=c,this.propertyPanel=d,this.frame=f,this.isSaveQueued=!0,this.accordions={},e.call(this,a,b,d)}var e=a("../../../base-unifi/controllers/BasePanelItemController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateBatchModel=function(a){this.batchModel=a,this.updateModel(a?a.get("model"):void 0)},d.prototype.updateModel=function(a){this.initModelDefaults(a),e.prototype.updateModel.call(this,a)},d.prototype.initModelDefaults=function(a){a&&a.set(a.parse(angular.extend(a.toJSON(),{type:"uap",radio_table:[{radio:"na"},{radio:"ng"}]})))},d.prototype.getPanelModel=function(){return this.batchModel},d.prototype.getDeviceCount=function(){return this.batchModel?this.batchModel.get("collection").length:0},d.prototype.getErrorCount=function(){return this.batchModel?(this.batchModel.get("error")||[]).length:0},d.prototype.removePanel=function(){var a=this.getPanelModel();if(!a)return this.$q.reject();var b;return b=this.isSaveQueued&&this.model.hasPendingChanges()?this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_PROPERTIES_PENDING_CHANGES_FORGET_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_PROPERTIES_PENDING_CHANGES_FORGET_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.model.clearPendingChanges(),this.model.unset("success"),this.model.unset("error"),this.$q.when()}.bind(this)):this.$q.when(),b.then(function(){this.propertyPanel.removeItem(a)}.bind(this))},d.$inject=["$q","$timeout","$translate","propertyPanel","frame"],angular.module("app-unifi-manage").controller("ApPropertiesBatchController",d)},{"../../../base-unifi/controllers/BasePanelItemController":1667}],260:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-collapsed\': apPropertiesBatchCtrl.isCollapsed()}" class="unifiPanelItem apPropertiesBatch"><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__collapseToggle"><div ng-click="apPropertiesBatchCtrl.toggleCollapsed()" class="appActionIcon"><span ng-class="{            \'unifi-icon--default-collapse\': !apPropertiesBatchCtrl.isCollapsed(),            \'unifi-icon--default-expand\': apPropertiesBatchCtrl.isCollapsed()          }" class="button__icon icon"></span></div></div><div class="unifiPanelItemHeader__avatar"><div unifi-batch-device-icon="apPropertiesBatchCtrl.batchModel"></div></div><div class="unifiPanelItemHeader__title"><div class="horizontalRhythmLeft--cozy">{{apPropertiesBatchCtrl.batchModel.getDisplayName()}}</div></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div ng-click="apPropertiesBatchCtrl.toggleUndocked()" title="{{apPropertiesBatchCtrl.isUndocked() ? \'COMMON_PROPERTY_PANEL_ITEM_DOCK\' : \'COMMON_PROPERTY_PANEL_ITEM_UNDOCK\' | translate}}" class="appActionIcon visible--mdUp"><span ng-class="{              \'ubnt-icon--header-maximize\': !apPropertiesBatchCtrl.isUndocked(),              \'ubnt-icon--header-minimize\': apPropertiesBatchCtrl.isUndocked()            }" class="button__icon icon"></span></div><div ng-click="apPropertiesBatchCtrl.removePanel()" title="{{\'COMMON_PROPERTY_PANEL_ITEM_REMOVE\' | translate}}" class="appActionIcon removePanelItem"><span class="button__icon icon unifi-icon--default-close"></span></div></div></div></div><div ng-if="showErrors" unifi-device-properties-batch-error="apPropertiesBatchCtrl.batchModel" class="unifiPanelItemBody"></div><div ng-hide="showErrors" class="unifiPanelItemBody"><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><ul class="appTabs appTabs--compressed appTabs--alignLeft"><li ng-click="apPropertiesBatchCtrl.setActiveTab(\'batch\')" ng-class="{            \'is-tab-selected\': apPropertiesBatchCtrl.getActiveTab() === \'batch\',            \'is-tab-loading\': apPropertiesBatchCtrl.loadingTab === \'batch\'          }" translate="DEVICE_PROPERTIES_TAB_DEVICES" class="tabs__item batch"></li><li ng-if="apPropertiesBatchCtrl.getDeviceCount() &gt; 0" ng-click="apPropertiesBatchCtrl.setActiveTab(\'configure\')" ng-class="{            \'is-tab-selected\': apPropertiesBatchCtrl.getActiveTab() === \'configure\',            \'is-tab-loading\': apPropertiesBatchCtrl.loadingTab === \'configure\'          }" translate="DEVICE_PROPERTIES_TAB_CONFIGURATION" class="tabs__item configure"></li><li ng-if="apPropertiesBatchCtrl.showWarningsTab" ng-click="apPropertiesBatchCtrl.setActiveTab(\'warnings\')" ng-class="{            \'is-tab-selected\': apPropertiesBatchCtrl.getActiveTab() === \'warnings\'          }" translate="DEVICE_PROPERTIES_TAB_WARNINGS" class="tabs__item warnings"></li></ul></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div ng-if="apPropertiesBatchCtrl.showWarningsTab" ng-class="{\'is-app-info-box-collapsed\': !isInfoBoxExpanded}" class="appInfoBox appInfoBox--cozy appInfoBox--collapsible appInfoBox--warning verticalRhythm--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert-fill"></div><div class="appInfoBox__content"><div class="appInfoBox__header">{{\'DEVICE_PROPERTIES_NOTICE_UNSUPPORTED_BATCH_HEADER\' | translate}}<div ng-click="isInfoBoxExpanded = !isInfoBoxExpanded" ng-class="isInfoBoxExpanded ? \'ubnt-icon--minus\' : \'ubnt-icon--plus\'" class="appInfoBox__toggle icon"></div></div><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_NOTICE_UNSUPPORTED_BATCH_BODY"></p><p translate="DEVICE_PROPERTIES_NOTICE_UNSUPPORTED_BATCH_SEE_WARNINGS" class="noMarginBottom"></p></div></div></div><div class="unifiPanelItemContent"><div ng-if="apPropertiesBatchCtrl.isTabAvailable(\'batch\') &amp;&amp; apPropertiesBatchCtrl.getActiveTab() === \'batch\'" class="batchPropertiesBatch"><unifi-ap-properties-batch-list unifi-ap-properties-batch-list-model="apPropertiesBatchCtrl.batchModel"></unifi-ap-properties-batch-list></div><div ng-if="apPropertiesBatchCtrl.isTabAvailable(\'configure\')" ng-show="apPropertiesBatchCtrl.getActiveTab() === \'configure\' &amp;&amp; apPropertiesBatchCtrl.getDeviceCount() &gt; 0" unifi-ap-properties-batch-configure class="batchPropertiesConfigure"></div><div ng-show="apPropertiesBatchCtrl.showWarningsTab &amp;&amp; apPropertiesBatchCtrl.getActiveTab() === \'warnings\'" unifi-ap-properties-batch-warnings="apPropertiesBatchCtrl.batchModel" unifi-ap-properties-batch-warnings-has-warnings="apPropertiesBatchCtrl.showWarningsTab" class="batchPropertiesWarnings"></div></div></div><div ng-if="apPropertiesBatchCtrl.getDeviceCount() &gt; 0" class="unifiPanelItemBodySection unifiPanelItemBodySection--static unifiPanelItemBodySection--pending"><unifi-pending-changes-list unifi-pending-changes-list-model="apPropertiesBatchCtrl.model" unifi-pending-changes-list-save="applyPendingChanges(model)"></unifi-pending-changes-list></div></div></div>'),b.join("")}},{"jade/runtime":232}],261:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesBatch",["devicePropertiesPendingActionsDirectiveMixin","deviceBatchUtils","heyToasts",function(b,c,d){return{scope:{batchModel:"=unifiApPropertiesBatch"},controller:"ApPropertiesBatchController",controllerAs:"apPropertiesBatchCtrl",template:a("./apPropertiesBatch.jade")(),link:function(a,e,f,g){a.$watch("batchModel",function(a){g.updateBatchModel(a)}),a.$watch(function(){return g.getDeviceCount()},function(a){0===a&&g.setActiveTab("batch")}),a.$watch(function(){return g.showWarningsTab},function(a){a||"warnings"!==g.getActiveTab()||g.setActiveTab("batch")}),a.$watch(function(){return g.getErrorCount()},function(b){a.showErrors=b>0}),a.$on("$destroy",function(){g.removeEventHandlers()}),b.init(a,e,f,g),a.applyPendingChanges=function(){return c.savePendingChanges(a.batchModel,{wait:!0}).then(function(b){(a.batchModel.get("error")||[]).length?d.pushWarning(b):d.pushSuccess(b)})["catch"](function(a){d.pushError(a)})}}}}])},{"./apPropertiesBatch.jade":260}],262:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="apPropertiesBatchCtrl.accordions.configure.general" class="unifiPanelItemContent__section general"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesBatchCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesBatchCtrl.accordions.configure.general" unifi-pause-children-watchers="!apPropertiesBatchCtrl.accordions.configure.general" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-general="::apPropertiesBatchCtrl.model" unifi-device-properties-configure-general-with-batch="apPropertiesBatchCtrl.batchModel" unifi-device-properties-configure-general-is-open="apPropertiesBatchCtrl.accordions.configure.general" unifi-device-properties-configure-general-is-save-queued="apPropertiesBatchCtrl.isSaveQueued" unifi-device-properties-configure-general-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="apPropertiesBatchConfigureGeneral"></div></div></accordion-group><accordion-group is-open="apPropertiesBatchCtrl.accordions.configure.radios" class="unifiPanelItemContent__section radios"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesBatchCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesBatchCtrl.accordions.configure.radios" unifi-pause-children-watchers="!apPropertiesBatchCtrl.accordions.configure.radios" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-radios="::apPropertiesBatchCtrl.model" unifi-ap-properties-configure-radios-with-batch="apPropertiesBatchCtrl.batchModel" unifi-ap-properties-configure-radios-is-open="apPropertiesBatchCtrl.accordions.configure.radios" unifi-ap-properties-configure-radios-is-save-queued="apPropertiesBatchCtrl.isSaveQueued" unifi-ap-properties-configure-radios-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS" class="apPropertiesBatchConfigureRadios"></div></div></accordion-group><accordion-group is-open="apPropertiesBatchCtrl.accordions.configure.wlans" class="unifiPanelItemContent__section wlans"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesBatchCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesBatchCtrl.accordions.configure.wlans" unifi-pause-children-watchers="!apPropertiesBatchCtrl.accordions.configure.wlans" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-wlans="::apPropertiesBatchCtrl.model" unifi-ap-properties-configure-wlans-with-batch="apPropertiesBatchCtrl.batchModel" unifi-ap-properties-configure-wlans-is-open="apPropertiesBatchCtrl.accordions.configure.wlans" unifi-ap-properties-configure-wlans-is-save-queued="apPropertiesBatchCtrl.isSaveQueued" unifi-ap-properties-configure-wlans-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS" class="apPropertiesBatchConfigureWlans"></div></div></accordion-group><accordion-group unifi-if-advanced-features is-open="apPropertiesBatchCtrl.accordions.configure.bandSteering" class="unifiPanelItemContent__section bandSteering"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesBatchCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesBatchCtrl.accordions.configure.bandSteering" unifi-pause-children-watchers="!apPropertiesBatchCtrl.accordions.configure.bandSteering" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-band-steering="::apPropertiesBatchCtrl.model" unifi-ap-properties-configure-band-steering-with-batch="apPropertiesBatchCtrl.batchModel" unifi-ap-properties-configure-band-steering-is-open="apPropertiesBatchCtrl.accordions.configure.bandSteering" unifi-ap-properties-configure-band-steering-is-save-queued="apPropertiesBatchCtrl.isSaveQueued" unifi-ap-properties-configure-band-steering-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING" class="apPropertiesBatchConfigureBandSteering"></div></div></accordion-group><accordion-group unifi-if-advanced-features is-open="apPropertiesBatchCtrl.accordions.configure.airtimeFairness" class="unifiPanelItemContent__section airtimeFairness"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesBatchCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesBatchCtrl.accordions.configure.airtimeFairness" unifi-pause-children-watchers="!apPropertiesBatchCtrl.accordions.configure.airtimeFairness" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-airtime-fairness="::apPropertiesBatchCtrl.model" unifi-ap-properties-configure-airtime-fairness-with-batch="apPropertiesBatchCtrl.batchModel" unifi-ap-properties-configure-airtime-fairness-is-open="apPropertiesBatchCtrl.accordions.configure.airtimeFairness" unifi-ap-properties-configure-airtime-fairness-is-save-queued="apPropertiesBatchCtrl.isSaveQueued" unifi-ap-properties-configure-airtime-fairness-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS" class="apPropertiesBatchConfigureAirtimeFairness"></div></div></accordion-group><accordion-group unifi-feature-flag-enable="enableApDisable" is-open="apPropertiesBatchCtrl.accordions.configure.manage" class="unifiPanelItemContent__section manage"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_MANAGE_DEVICE_BATCH\' | translate}}</accordion-heading><div unifi-initialize-when="apPropertiesBatchCtrl.accordions.configure.manage" unifi-pause-children-watchers="!apPropertiesBatchCtrl.accordions.configure.manage" unifi-pause-children-watchers-and-create-scope><div unifi-feature-flag-enable="enableDevicesBatchUpgrade" class="unifiPanelItemContentSection__subsection upgrade"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_CUSTOM_UPGRADE\' | translate}}</div></div></div><div unifi-device-properties-configure-custom-upgrade="::apPropertiesBatchCtrl.model" unifi-device-properties-configure-custom-upgrade-with-batch="apPropertiesBatchCtrl.batchModel" unifi-device-properties-configure-custom-upgrade-is-open="apPropertiesBatchCtrl.accordions.configure.manage" class="apPropertiesConfigureCustomUpgrade"></div></div><div unifi-feature-flag-enable="enableApDisable" unifi-feature-flag-and="apPropertiesBatchCtrl.batchModel.hasCollectionAttrValue(\'disabled\', true)" class="unifiPanelItemContentSection__subsection disable"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_ENABLE_BATCH\' | translate}}</div></div></div><div unifi-device-properties-configure-disable="::apPropertiesBatchCtrl.model" unifi-device-properties-configure-disable-with-batch="apPropertiesBatchCtrl.batchModel" unifi-device-properties-configure-disable-force-to-enable="true" unifi-device-properties-configure-disable-is-open="apPropertiesBatchCtrl.accordions.configure.manage" class="apPropertiesConfigureDisable"></div></div><div unifi-feature-flag-enable="enableApDisable" unifi-feature-flag-and="apPropertiesBatchCtrl.batchModel.hasCollectionAttrValue(\'disabled\', false, true)" class="unifiPanelItemContentSection__subsection disable"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_DISABLE_BATCH\' | translate}}</div></div></div><div unifi-device-properties-configure-disable="::apPropertiesBatchCtrl.model" unifi-device-properties-configure-disable-with-batch="apPropertiesBatchCtrl.batchModel" unifi-device-properties-configure-disable-force-to-disable="true" unifi-device-properties-configure-disable-is-open="apPropertiesBatchCtrl.accordions.configure.manage" class="apPropertiesConfigureDisable"></div></div><div unifi-feature-flag-enable="enableDevicesBatchForget" class="unifiPanelItemContentSection__subsection forget"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_FORGET_BATCH\' | translate}}</div></div></div><div unifi-device-properties-configure-forget="::apPropertiesBatchCtrl.model" unifi-device-properties-configure-forget-with-batch="apPropertiesBatchCtrl.batchModel" unifi-device-properties-configure-forget-is-open="apPropertiesBatchCtrl.accordions.configure.manage" class="apPropertiesConfigureForget"></div></div></div></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],263:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesBatchConfigure",[function(){return{scope:!0,require:"^unifiApPropertiesBatch",template:a("./apPropertiesBatchConfigure.jade")()}}])},{"./apPropertiesBatchConfigure.jade":262}],264:[function(a,b,c){"use strict";function d(a,b,c,d){this.defaultSortBy="name",this.comparator=b,this.getDeviceModel=c.getDeviceModel.bind(c),e.call(this,a,d)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateModel=function(a){this.model=a,this.updateCollection(a?a.get("collection"):void 0)},d.prototype.updateCollection=function(a){this.destroyView(),this.collection=a,this.initFilters(),this.initView()},d.prototype.getCollection=function(){return this.collection},d.prototype.removeItem=function(a){this.getCollection().remove(a)},d.$inject=["$q","manageDevicesComparator","deviceStateUtils","CollectionView"],angular.module("app-unifi-manage").controller("ApPropertiesBatchListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],265:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiPanelItemContent__section appScrollable flexFlag__body fullWidth"><table class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent appForm appForm--cozy"><thead><tr><th class="alignCenter deviceStateIcon"></th><th class="deviceName"><span translate="DEVICE_TABLE_HEADER_NAME"></span></th><th class="deviceModel"><span translate="DEVICE_TABLE_HEADER_MODEL"></span></th><th class="deviceActions"></th></tr></thead><tbody><tr collection-view-repeat="model in apPropertiesBatchListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="deviceStateIcon unifiDevicesTable__statusBall"><span unifi-device-status="::model" unifi-device-status-with-icons="true"></span></td><td ng-attr-title="{{::model.get(\'mac\')}}" class="deviceName">{{::model.getDisplayName()}}</td><td class="deviceModel">{{::apPropertiesBatchListCtrl.getDeviceModel(model)}}</td><td class="deviceActions appTableCell--actions"><button unifi-open-panel="model" unifi-open-panel-active-tab="\'details\'" title="{{\'COMMON_PROPERTY_PANEL_OPEN\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--panels"></span></button><button ng-click="apPropertiesBatchListCtrl.removeItem(model)" title="{{\'COMMON_ACTIONS_REMOVE\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed noMarginLeft"><span class="button__icon icon ubnt-icon--x-circle"></span></button></td></tr></tbody></table><div ng-if="!apPropertiesBatchListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_AP_BATCH_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],266:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesBatchList",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiApPropertiesBatchListModel"},controller:"ApPropertiesBatchListController",controllerAs:"apPropertiesBatchListCtrl",template:a("./apPropertiesBatchList.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.destroyView()}),b.init(a,c,d,e,!0)}}}])},{"./apPropertiesBatchList.jade":265}],267:[function(a,b,c){"use strict";function d(a){this.deviceModelFeatureValidator=a,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.generateWarnings()},d.prototype.generateWarnings=function(){if(this.hasWarnings=!1,this.invalid=void 0,this.model){var a=this.model.get("model").getPendingAttributes();this.invalid=this.model.get("collection").map(function(b){var c=this.deviceModelFeatureValidator.validate(b,a);if(!c.isValid)return{model:b,invalid:c.invalid}}.bind(this)).filter(function(a){return a}),this.invalid.length&&(this.hasWarnings=!0)}},d.$inject=["deviceModelFeatureValidator"],angular.module("app-unifi-manage").controller("ApPropertiesBatchWarningsController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],268:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-repeat="group in apPropertiesBatchWarningsCtrl.invalid" class="unifiPanelItemContent__section noPadding"><div class="unifiPanelItemContentSection__header"><div class="iconText appIconText unifiDeviceIconText"><div unifi-device-icon="group.model" class="iconText__icon"></div><div class="iconText__text"><div>{{group.model.getDisplayName()}}</div></div></div><div unifi-open-panel="group.model" unifi-open-panel-active-tab="\'configure\'" title="{{\'COMMON_PROPERTY_PANEL_OPEN\' | translate}}" class="unifiPanelItemContentSection__titleIcon icon ubnt-icon--panels"></div></div><div class="unifiPanelItemContentSection__content"><ul class="appMenu appMenu--cozy appMenu--transparent noMinWidth is-device-icon-text-aligned"><li ng-repeat="attr in group.invalid" class="appMenu__item noHorizontalPadding">{{attr.translationKey | translate: attr.translationValues}}</li></ul></div></div>'),b.join("")}},{"jade/runtime":232}],269:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesBatchWarnings",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiApPropertiesBatchWarnings",hasWarnings:"=unifiApPropertiesBatchWarningsHasWarnings"},controller:"ApPropertiesBatchWarningsController",controllerAs:"apPropertiesBatchWarningsCtrl",template:a("./apPropertiesBatchWarnings.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),a.$watch(function(){return e.hasWarnings},function(b){a.hasWarnings=b}),b.init(a,c,d,e,!0)}}}])},{"./apPropertiesBatchWarnings.jade":268}],270:[function(a,b,c){
a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><div unifi-initialize-when="!apPropertiesCtrl.isLoading" unifi-device-properties-configure-warnings="::apPropertiesCtrl.model" unifi-device-properties-configure-warnings-validator="apPropertiesCtrl.validators.warnings" class="apPropertiesConfigureWarnings"></div><accordion-group is-open="apPropertiesCtrl.accordions.configure.general" class="unifiPanelItemContent__section general"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers-and-create-scope><div class="apPropertiesConfigureGeneral"><div unifi-device-properties-configure-general="::apPropertiesCtrl.model" unifi-device-properties-configure-general-is-open="apPropertiesCtrl.accordions.configure.general" unifi-device-properties-configure-general-is-read-only="!apPropertiesCtrl.isAdmin()" unifi-device-properties-configure-general-is-save-queued="false" unifi-device-properties-configure-general-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="unifiPanelItemContentSection__subsection general"></div><div unifi-feature-flag-enable="enableApTagging" unifi-block-pause-children-watchers class="unifiPanelItemContentSection__subsection tags"><div class="panelHeading"><div class="panelTitle verticalRhythm--condensed"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_TAGS\' | translate}}</div></div></div><div unifi-device-properties-tags="apPropertiesCtrl.model" class="apPropertiesConfigureTags"></div></div></div></div></accordion-group><accordion-group is-open="apPropertiesCtrl.accordions.configure.radios" class="unifiPanelItemContent__section radios"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.radios" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.radios" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-radios="::apPropertiesCtrl.model" unifi-ap-properties-configure-radios-is-open="apPropertiesCtrl.accordions.configure.radios" unifi-ap-properties-configure-radios-is-read-only="!apPropertiesCtrl.isAdmin()" unifi-ap-properties-configure-radios-is-save-queued="apPropertiesCtrl.isSaveQueued" unifi-ap-properties-configure-radios-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS" class="apPropertiesConfigureRadios"></div></div></accordion-group><accordion-group is-open="apPropertiesCtrl.accordions.configure.wlans" class="unifiPanelItemContent__section wlans"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.wlans" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.wlans" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-wlans="::apPropertiesCtrl.model" unifi-ap-properties-configure-wlans-is-open="apPropertiesCtrl.accordions.configure.wlans" unifi-ap-properties-configure-wlans-is-read-only="!apPropertiesCtrl.isAdmin()" unifi-ap-properties-configure-wlans-is-save-queued="apPropertiesCtrl.isSaveQueued" unifi-ap-properties-configure-wlans-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS" class="apPropertiesConfigureWlans"></div></div></accordion-group><accordion-group is-open="apPropertiesCtrl.accordions.configure.network" class="unifiPanelItemContent__section network"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.network" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.network" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-network="::apPropertiesCtrl.model" unifi-device-properties-configure-network-is-open="apPropertiesCtrl.accordions.configure.network" unifi-device-properties-configure-network-is-read-only="!apPropertiesCtrl.isAdmin()" unifi-device-properties-configure-network-is-save-queued="apPropertiesCtrl.isSaveQueued" unifi-device-properties-configure-network-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK" unifi-device-properties-configure-network-validator="apPropertiesCtrl.validators.warnings" class="apPropertiesConfigureNetwork"></div></div></accordion-group><accordion-group unifi-if-advanced-features unifi-if-advanced-features-and="apPropertiesCtrl.showBandSteeringAccordion" is-open="apPropertiesCtrl.accordions.configure.bandSteering" class="unifiPanelItemContent__section bandSteering"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.bandSteering" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.bandSteering" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-band-steering="::apPropertiesCtrl.model" unifi-ap-properties-configure-band-steering-is-open="apPropertiesCtrl.accordions.configure.bandSteering" unifi-ap-properties-configure-band-steering-is-read-only="!apPropertiesCtrl.isAdmin()" unifi-ap-properties-configure-band-steering-is-save-queued="apPropertiesCtrl.isSaveQueued" unifi-ap-properties-configure-band-steering-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING" class="apPropertiesConfigureBandSteering"></div></div></accordion-group><accordion-group unifi-if-advanced-features is-open="apPropertiesCtrl.accordions.configure.airtimeFairness" class="unifiPanelItemContent__section airtimeFairness"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.airtimeFairness" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.airtimeFairness" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-airtime-fairness="::apPropertiesCtrl.model" unifi-ap-properties-configure-airtime-fairness-is-open="apPropertiesCtrl.accordions.configure.airtimeFairness" unifi-ap-properties-configure-airtime-fairness-is-read-only="!apPropertiesCtrl.isAdmin()" unifi-ap-properties-configure-airtime-fairness-is-save-queued="apPropertiesCtrl.isSaveQueued" unifi-ap-properties-configure-airtime-fairness-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS" class="apPropertiesConfigureAirtimeFairness"></div></div></accordion-group><accordion-group ng-if="apPropertiesCtrl.showUplinksAccordion" is-open="apPropertiesCtrl.accordions.configure.wirelessUplinks" class="unifiPanelItemContent__section wirelessUplinks"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_WIRELESS_UPLINKS\' | translate}}</accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.wirelessUplinks" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.wirelessUplinks" unifi-pause-children-watchers-and-create-scope><unifi-ap-properties-uplink-list unifi-ap-properties-uplink-list-local-state="true" unifi-ap-properties-uplink-list-local-state-key="::apPropertiesCtrl.model.get(\'mac\') + \'|uplinks\'" unifi-ap-properties-uplink-list-uplinks="apPropertiesCtrl.model.get(\'uplink_table\')" unifi-ap-properties-uplink-list-downlink="::apPropertiesCtrl.model" unifi-ap-properties-uplink-list-is-open="apPropertiesCtrl.accordions.configure.wirelessUplinks"></unifi-ap-properties-uplink-list></div></accordion-group><accordion-group ng-if="apPropertiesCtrl.isAdmin()" is-open="apPropertiesCtrl.accordions.configure.manage" class="unifiPanelItemContent__section manage"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_MANAGE_DEVICE\' | translate}}</accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.manage" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.manage" unifi-pause-children-watchers-and-create-scope><div unifi-feature-flag-enable="enableApCopyConfig" class="unifiPanelItemContentSection__subsection copy"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_COPY\' | translate}}</div></div></div><div unifi-ap-properties-copy-configuration="::apPropertiesCtrl.model" unifi-ap-properties-copy-configuration-is-open="apPropertiesCtrl.accordions.configure.manage" class="apPropertiesConfigureCopy"></div></div><div class="unifiPanelItemContentSection__subsection upgrade"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_CUSTOM_UPGRADE\' | translate}}</div></div></div><div unifi-device-properties-configure-custom-upgrade="::apPropertiesCtrl.model" unifi-device-properties-configure-custom-upgrade-is-open="apPropertiesCtrl.accordions.configure.manage" class="apPropertiesConfigureCustomUpgrade"></div></div><div unifi-feature-flag-enable="enableApDisable" class="unifiPanelItemContentSection__subsection disable"><div class="panelHeading"><div class="panelTitle"><div>{{apPropertiesCtrl.model.get(\'disabled\') ? \'DEVICE_PROPERTIES_SECTION_CONFIGURE_ENABLE\' : \'DEVICE_PROPERTIES_SECTION_CONFIGURE_DISABLE\' | translate}}</div></div></div><div unifi-device-properties-configure-disable="::apPropertiesCtrl.model" unifi-device-properties-configure-disable-is-open="apPropertiesCtrl.accordions.configure.manage" class="apPropertiesConfigureDisable"></div></div><div class="unifiPanelItemContentSection__subsection forget"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_FORGET\' | translate}}</div></div></div><div unifi-device-properties-configure-forget="::apPropertiesCtrl.model" unifi-device-properties-configure-forget-is-open="apPropertiesCtrl.accordions.configure.manage" class="apPropertiesConfigureForget"></div></div></div></accordion-group><accordion-group ng-if="apPropertiesCtrl.isAdmin() &amp;&amp; apPropertiesCtrl.showTerminalAccordion" is-open="apPropertiesCtrl.accordions.configure.terminal" class="unifiPanelItemContent__section debugTerminal visible--desktop"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_DEBUG_TERMINAL\' | translate}}</accordion-heading><div unifi-initialize-when="apPropertiesCtrl.accordions.configure.terminal" unifi-pause-children-watchers="!apPropertiesCtrl.accordions.configure.terminal" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-debug-terminal="::apPropertiesCtrl.model" unifi-device-properties-configure-debug-terminal-is-open="apPropertiesCtrl.accordions.configure.terminal" class="apPropertiesConfigureDebugTerminal"></div></div></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],271:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesConfigure",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiApProperties",template:a("./apPropertiesConfigure.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"configure")}}}])},{"./apPropertiesConfigure.jade":270}],272:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.deviceUtils=b,this.deviceFeatureUtils=c,this.heyToasts=d,this.apiResults=g,this.DEVICE_MODELS=h,this.airtimeFairnessOptions=[{value:void 0,translationKey:"DEVICE_PROPERTIES_VALUES_KEEP_EXISTING",isAvailable:!1,isDisabled:!1,isBatch:!0},{value:!0,translationKey:"COMMON_TOGGLE_ON",isAvailable:!0,isDisabled:!1},{value:!1,translationKey:"COMMON_TOGGLE_OFF",isAvailable:!0,isDisabled:!1}],e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initBatchEdit=function(){this.isBatchEdit=!0,this.airtimeFairnessOptions.forEach(function(a){a.isBatch&&(a.isAvailable=!0)})},d.prototype.isSaveDisabled=function(){return this.areOptionsDisabled||this.isBatchEdit&&void 0===this.modelCopy.attributes.atf_enabled},d.prototype.save=function(){this.isSubmitting=!0;var a={atf_enabled:this.modelCopy.get("atf_enabled")},b=this.isSaveQueued?"pending":void 0;return this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:b,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.updateAirtimeFairnessAvailability=function(){var a=this.deviceFeatureUtils.isAirtimeFairnessConfigSupported(this.model)||this.isBatchEdit;this.areOptionsDisabled=!a,angular.forEach(this.airtimeFairnessOptions,function(a){a.isDisabled=this.areOptionsDisabled}.bind(this))},d.prototype.setDefaultAttrs=function(a,b){var c=a?"":"Copy";if(this.masterWithDefaults=this.masterWithDefaults||{},this["model"+c]){var d=a||!this.isSaveQueued?void 0:{delegateTo:"pending"},e={};b&&b.indexOf("atf_enabled")===-1||void 0!==(e.atf_enabled=this.model?this.model.get("atf_enabled",d):void 0)||this.isBatchEdit||(e.atf_enabled=this.deviceFeatureUtils.isAtfEnabled(this.model)),angular.extend(a?this.masterWithDefaults:this.modelCopy.attributes,e)}},d.prototype.onModelChange=function(){this.updateAirtimeFairnessAvailability(),this.setDefaultAttrs(!0)},d.prototype.resetModelCopyAttrs=function(a){e.prototype.resetModelCopyAttrs.call(this,a),this.setDefaultAttrs(!1,a)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","deviceUtils","deviceFeatureUtils","heyToasts","modelDivergence","apiResults","DEVICE_MODELS"],angular.module("app-unifi-manage").controller("ApPropertiesConfigureAirtimeFairnessController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],273:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="apPropertiesConfigureAirtimeFairnessCtrl.form" ng-class="{    \'is-form-validation-visible\': apPropertiesConfigureAirtimeFairnessCtrl.showValidation,    \'is-validation-hidden\': !apPropertiesConfigureAirtimeFairnessCtrl.showValidation  }" ng-submit="apPropertiesConfigureAirtimeFairnessCtrl.form.$valid &amp;&amp; apPropertiesConfigureAirtimeFairnessCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="apPropertiesConfigureAirtimeFairnessCtrl.resolveDivergence()" unifi-config-changed-on-ignore="apPropertiesConfigureAirtimeFairnessCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; apPropertiesConfigureAirtimeFairnessCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div ng-repeat="option in apPropertiesConfigureAirtimeFairnessCtrl.airtimeFairnessOptions" ng-if="option.isAvailable" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="airtimeFairness" id="airtimeFairness{{option.value + \'-\' + directiveId}}" ng-model="apPropertiesConfigureAirtimeFairnessCtrl.modelCopy.attributes.atf_enabled" ng-model-master="apPropertiesConfigureAirtimeFairnessCtrl.masterWithDefaults.atf_enabled" ng-value="option.value" ng-disabled="option.isDisabled"><label for="airtimeFairness{{option.value + \'-\' + directiveId}}" translate="{{option.translationKey}}"></label></div></div></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="apPropertiesConfigureAirtimeFairnessCtrl.showValidation = true" busy-toggle="apPropertiesConfigureAirtimeFairnessCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="apPropertiesConfigureAirtimeFairnessCtrl.isSaveDisabled()" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{apPropertiesConfigureAirtimeFairnessCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="apPropertiesConfigureAirtimeFairnessCtrl.reset()" ng-disabled="apPropertiesConfigureAirtimeFairnessCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],274:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesConfigureAirtimeFairness",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin","devicePropertiesConfigureBatchDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiApPropertiesConfigureAirtimeFairness",withBatch:"=unifiApPropertiesConfigureAirtimeFairnessWithBatch",isOpen:"=unifiApPropertiesConfigureAirtimeFairnessIsOpen",isReadOnly:"=unifiApPropertiesConfigureAirtimeFairnessIsReadOnly",isSaveQueued:"=unifiApPropertiesConfigureAirtimeFairnessIsSaveQueued",group:"@unifiApPropertiesConfigureAirtimeFairnessGroup"},controller:"ApPropertiesConfigureAirtimeFairnessController",controllerAs:"apPropertiesConfigureAirtimeFairnessCtrl",template:a("./apPropertiesConfigureAirtimeFairness.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.$on("$destroy",function(){g.removeEventHandlers()}),b.init(a,e,f,g,!0),c.init(a,e,f,g),d.init(a,e,f,g)}}}])},{"./apPropertiesConfigureAirtimeFairness.jade":273}],275:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.deviceUtils=b,this.deviceFeatureUtils=c,this.heyToasts=d,this.apiResults=g,this.DEVICE_MODELS=h,this.bandSteeringOptions=[{value:void 0,translationKey:"DEVICE_PROPERTIES_VALUES_KEEP_EXISTING",isAvailable:!1,isDisabled:!1,isBatch:!0},{value:"prefer_5g",translationKey:"DEVICE_PROPERTIES_VALUES_BAND_STEERING_PREFER_5G",isAvailable:!0,isDisabled:!1},{value:"equal",translationKey:"DEVICE_PROPERTIES_VALUES_BAND_STEERING_BALANCED",isAvailable:!0,isDisabled:!1},{value:"off",translationKey:"DEVICE_PROPERTIES_VALUES_BAND_STEERING_OFF",isAvailable:!0,isDisabled:!1}],e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initBatchEdit=function(){this.isBatchEdit=!0,this.bandSteeringOptions.forEach(function(a){a.isBatch&&(a.isAvailable=!0)})},d.prototype.isSaveDisabled=function(){return this.areOptionsDisabled||this.isBatchEdit&&void 0===this.modelCopy.attributes.bandsteering_mode},d.prototype.save=function(){this.isSubmitting=!0;var a={bandsteering_mode:this.modelCopy.get("bandsteering_mode")},b=this.isSaveQueued?"pending":void 0;return this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:b,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.updateBandSteeringAvailability=function(){var a=this.deviceFeatureUtils.isBandSteeringSupported(this.model)||this.isBatchEdit;this.areOptionsDisabled=!a,angular.forEach(this.bandSteeringOptions,function(b){b.isDisabled=!a,b.isBatch||("equal"!==b.value||this.deviceFeatureUtils.isGen2(this.model)||this.isBatchEdit?b.isAvailable=!0:b.isAvailable=!1)}.bind(this))},d.prototype.setDefaultAttrs=function(a,b){var c=a?"":"Copy";if(this.masterWithDefaults=this.masterWithDefaults||{},this["model"+c]){var d=a||!this.isSaveQueued?void 0:{delegateTo:"pending"},e={};b&&b.indexOf("bandsteering_mode")===-1||(e.bandsteering_mode=(this.model?this.model.get("bandsteering_mode",d):void 0)||(this.isBatchEdit?void 0:"off")),angular.extend(a?this.masterWithDefaults:this.modelCopy.attributes,e)}},d.prototype.onModelChange=function(){this.updateBandSteeringAvailability(),this.setDefaultAttrs(!0)},d.prototype.resetModelCopyAttrs=function(a){e.prototype.resetModelCopyAttrs.call(this,a),this.setDefaultAttrs(!1,a)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","deviceUtils","deviceFeatureUtils","heyToasts","modelDivergence","apiResults","DEVICE_MODELS"],angular.module("app-unifi-manage").controller("ApPropertiesConfigureBandSteeringController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],276:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="apPropertiesConfigureBandSteeringCtrl.form" ng-class="{    \'is-form-validation-visible\': apPropertiesConfigureBandSteeringCtrl.showValidation,    \'is-validation-hidden\': !apPropertiesConfigureBandSteeringCtrl.showValidation  }" ng-submit="apPropertiesConfigureBandSteeringCtrl.form.$valid &amp;&amp; apPropertiesConfigureBandSteeringCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="apPropertiesConfigureBandSteeringCtrl.resolveDivergence()" unifi-config-changed-on-ignore="apPropertiesConfigureBandSteeringCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; apPropertiesConfigureBandSteeringCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div ng-repeat="option in apPropertiesConfigureBandSteeringCtrl.bandSteeringOptions" ng-if="option.isAvailable" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="bandSteering" id="bandSteering{{option.value + \'-\' + directiveId}}" ng-model="apPropertiesConfigureBandSteeringCtrl.modelCopy.attributes.bandsteering_mode" ng-model-master="apPropertiesConfigureBandSteeringCtrl.masterWithDefaults.bandsteering_mode" ng-value="option.value" ng-disabled="option.isDisabled"><label for="bandSteering{{option.value + \'-\' + directiveId}}" translate="{{option.translationKey}}"></label></div></div></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="apPropertiesConfigureBandSteeringCtrl.showValidation = true" busy-toggle="apPropertiesConfigureBandSteeringCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="apPropertiesConfigureBandSteeringCtrl.isSaveDisabled()" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{apPropertiesConfigureBandSteeringCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="apPropertiesConfigureBandSteeringCtrl.reset()" ng-disabled="apPropertiesConfigureBandSteeringCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],277:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesConfigureBandSteering",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin","devicePropertiesConfigureBatchDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiApPropertiesConfigureBandSteering",withBatch:"=unifiApPropertiesConfigureBandSteeringWithBatch",isOpen:"=unifiApPropertiesConfigureBandSteeringIsOpen",isReadOnly:"=unifiApPropertiesConfigureBandSteeringIsReadOnly",isSaveQueued:"=unifiApPropertiesConfigureBandSteeringIsSaveQueued",group:"@unifiApPropertiesConfigureBandSteeringGroup"},controller:"ApPropertiesConfigureBandSteeringController",controllerAs:"apPropertiesConfigureBandSteeringCtrl",template:a("./apPropertiesConfigureBandSteering.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.$on("$destroy",function(){g.removeEventHandlers()}),b.init(a,e,f,g,!0),c.init(a,e,f,g),d.init(a,e,f,g)}}}])},{"./apPropertiesConfigureBandSteering.jade":276}],278:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.$q=a,this.$translate=b,this.deviceUtils=c,this.countryChannels=d,this.wirelessNetworkGroups=f,this.wirelessNetworks=g,this.deviceRadioUtils=h,this.frame=i,this.heyToasts=j,this.apiResults=l,this.DEFAULT_HT=m,this.customAttrs={},this.minRssiMin=-94,this.minRssiMax=-1,this.minRssiWarn=-67,this.antennaGainMin=-99,this.antennaGainMax=99,this.isAdvancedExpanded={},this.radioPowerOptions=[{value:"auto",translationKey:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_AUTO"},{value:"high",translationKey:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_HIGH"},{value:"medium",translationKey:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_MEDIUM"},{value:"low",translationKey:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_LOW"},{value:"custom",translationKey:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_CUSTOM"}],e.call(this,k),this.setChangeEvent("change change:radio_table[*]")}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initBatchEdit=function(){this.isBatchEdit=!0},d.prototype.isSaveDisabled=function(){if(this.isBatchEdit)return!this.radioTypes.reduce(function(a,b){return a||["ht","channel","tx_power_mode","tx_power","min_rssi_enabled","hard_noise_floor_enabled"].reduce(function(a,c){return a||void 0!==this.customAttrs[b][c]}.bind(this),!1)}.bind(this),!1)},d.prototype.save=function(){this.showMinRssiWarning=!1;var a={radio_table:[]};angular.forEach(this.radioTypes,function(b){a.radio_table.push(function(a){var c={radio:b,ht:a.ht,channel:a.channel||(this.isBatchEdit?void 0:"auto"),tx_power_mode:a.tx_power_mode,tx_power:a.tx_power,antenna_gain:a.antenna_gain,min_rssi_enabled:a.min_rssi_enabled,min_rssi:a.min_rssi,hard_noise_floor_enabled:a.hard_noise_floor_enabled};return this.isBatchEdit&&delete c.antenna_gain,"custom"!==c.tx_power_mode&&delete c.tx_power,this.isMinRssiStrictModeSupported(b)||delete c.hard_noise_floor_enabled,c.min_rssi_enabled||(delete c.min_rssi,this.isBatchEdit&&c.min_rssi_enabled===!1&&delete c.hard_noise_floor_enabled),c.min_rssi&&c.min_rssi>this.minRssiWarn&&(this.showMinRssiWarning=!0),c}.bind(this)(this.customAttrs[b]))}.bind(this));var b;b=this.showMinRssiWarning?this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_AP_MIN_RSSI_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_AP_MIN_RSSI_CONFIRM_MESSAGE",{minRssi:this.minRssiWarn})}.bind(this),options:function(){return{defaultCancel:!0}}}).then(function(){this.showMinRssiWarning=!1}.bind(this))["catch"](function(){return this.$q.reject()}.bind(this)):this.$q.when();var c=this.isSaveQueued?"pending":void 0;return b.then(function(){this.isSubmitting=!0,this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:c,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))}.bind(this))},d.prototype.addEventHandlers=function(){e.prototype.addEventHandlers.call(this),this.collectionListeners={wirelessNetworkGroups:this.wirelessNetworkGroups.repository.collection.onEvent("add remove change reset",this.updateRoaming.bind(this))},this.countryChannels.repository.model.on("change:code",this.updateChannelOptions,this),this.countryChannels.repository.model.on("change:code",this.updateHtOptions,this)},d.prototype.removeEventHandlers=function(){e.prototype.removeEventHandlers.call(this),this.collectionListeners&&(Object.keys(this.collectionListeners).forEach(function(a){this.collectionListeners[a].stopListening()}.bind(this)),this.countryChannels.repository.model.off("change:code",this.updateChannelOptions,this),this.countryChannels.repository.model.off("change:code",this.updateHtOptions,this))},d.prototype.isMinRssiStrictModeSupported=function(a){return this.isBatchEdit?this.deviceRadioUtils.isMinRssiStrictModeSupported(void 0,a):this.deviceRadioUtils.isMinRssiStrictModeSupported(this.model,a)},d.prototype.setDefaultAttrs=function(a){var b=a?"Master":"",c=a||!this.isSaveQueued?void 0:{delegateTo:"pending"};angular.forEach(this.radioTypes,function(a){var d=angular.extend({},this.model?(this.deviceRadioUtils.getRadioByType(this.model,a,c)||{}).attributes:{});d.ht=d.ht||(this.isBatchEdit?void 0:this.DEFAULT_HT[a]),d.channel=(isFinite(d.channel)?parseInt(d.channel,10):d.channel)||(this.isBatchEdit?void 0:"auto"),d.tx_power_mode=d.tx_power_mode||(this.isBatchEdit?void 0:"auto"),d.tx_power=isFinite(d.tx_power)?parseInt(d.tx_power,10):void 0,d.antenna_gain=d.antenna_gain?parseInt(d.antenna_gain,10):6,d.min_rssi_enabled="boolean"==typeof d.min_rssi_enabled?d.min_rssi_enabled:!!this.isBatchEdit&&void 0,d.min_rssi=d.min_rssi?parseInt(d.min_rssi,10):this.minRssiMin,d.hard_noise_floor_enabled="boolean"==typeof d.hard_noise_floor_enabled?d.hard_noise_floor_enabled:!!this.isBatchEdit&&void 0,this.customAttrs[a+b]=d}.bind(this)),this.updateChannelOptions()},d.prototype.setAdvancedExpanded=function(){
this.customAttrs&&angular.forEach(this.radioTypes,function(a){(this.customAttrs[a+"Master"]||{}).min_rssi_enabled&&(this.isAdvancedExpanded[a]=!0)}.bind(this))},d.prototype.updateChannelOptions=function(a){this.radioChannelOptions=this.radioChannelOptions||{},this.model&&angular.forEach(this.radioTypes,function(b){!this.customAttrs[b]||b!==a&&angular.isString(a)||(this.radioChannelOptions[b]=this.isBatchEdit?this.deviceRadioUtils.getUnfilteredChannelOptions(b,this.customAttrs[b].ht):this.deviceRadioUtils.getChannelOptions(this.model,b,this.customAttrs[b].ht),this.radioChannelOptions[b].unshift({channel:"auto",label:this.$translate.instant("COMMON_VALUE_AUTO")}),isFinite(this.customAttrs[b].channel)&&(this.radioChannelOptions[b].find(function(a){return a.channel===this.customAttrs[b].channel}.bind(this))||(this.customAttrs[b].channel="auto")))}.bind(this))},d.prototype.updateRadioTypes=function(){if(this.model){var a=this.model.get("radio_table");a&&(this.radioTypes=a.pluck("radio").sort().reverse()),this.isAcModel=this.deviceRadioUtils.isAcModel(this.model)}else this.radioTypes=[]},d.prototype.updateHtOptions=function(){if(this.model){var a=this.isAcModel?"VHT":"HT";this.radioHtOptions={ng:[{value:"20",label:"HT20"}],na:[{value:"20",label:a+"20"}]},(this.isBatchEdit||this.deviceRadioUtils.isHt40Supported(this.model,"ng"))&&this.radioHtOptions.ng.push({value:"40",label:"HT40"}),(this.isBatchEdit||this.deviceRadioUtils.isHt40Supported(this.model,"na"))&&this.radioHtOptions.na.push({value:"40",label:a+"40"}),(this.isBatchEdit||this.deviceRadioUtils.isHt80Supported(this.model))&&this.radioHtOptions.na.push({value:"80",label:a+"80"})}else this.radioHtOptions={}},d.prototype.updateRoaming=function(){this.isRoamingEnabled={},this.roamingOverrides={},this.model&&angular.forEach(this.radioTypes,function(a){var b=this.model.get("wlangroup_id_"+a),c=this.wirelessNetworkGroups.repository.collection.get(b);c&&c.get("roam_enabled")&&(this.isRoamingEnabled[a]=!0,this.roamingOverrides[a]={wlanGroup:c.get("name"),channel:c.get("roam_channel_"+a),ht:20})}.bind(this))},d.prototype.onModelChange=function(){this.updateRadioTypes(),this.updateHtOptions(),this.updateRoaming(),this.setDefaultAttrs(!0),this.setAdvancedExpanded()},d.prototype.resetModelCopyAttrs=function(a){e.prototype.resetModelCopyAttrs.call(this,a),this.setDefaultAttrs(!1,a)},d.prototype.reset=function(){e.prototype.reset.call(this),this.updateRoaming(),this.setDefaultAttrs(!1)},d.$inject=["$q","$translate","deviceUtils","countryChannels","wirelessNetworkGroups","wirelessNetworks","deviceRadioUtils","frame","heyToasts","modelDivergence","apiResults","DEFAULT_HT"],angular.module("app-unifi-manage").controller("ApPropertiesConfigureRadiosController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],279:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="apPropertiesConfigureRadiosCtrl.form" ng-class="{    \'is-form-validation-visible\': apPropertiesConfigureRadiosCtrl.showValidation,    \'is-validation-hidden\': !apPropertiesConfigureRadiosCtrl.showValidation  }" ng-submit="apPropertiesConfigureRadiosCtrl.form.$valid &amp;&amp; apPropertiesConfigureRadiosCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="apPropertiesConfigureRadiosCtrl.resolveDivergence()" unifi-config-changed-on-ignore="apPropertiesConfigureRadiosCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; apPropertiesConfigureRadiosCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-repeat="radioType in apPropertiesConfigureRadiosCtrl.radioTypes" ng-disabled="isReadOnly" ng-class="{      \'verticalRhythmTop\': $index &gt; 0    }" class="appFieldset appFieldset--quiet"><div class="appSubHeading verticalRhythm--condensed">{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS_SUBSECTION_\' + radioType.toUpperCase() + (apPropertiesConfigureRadiosCtrl.isAcModel && radioType === \'na\' ? \'_AC\' : \'\') | translate}}</div><div ng-show="apPropertiesConfigureRadiosCtrl.isRoamingEnabled[radioType]" class="appFormGroup appFormGroup--cozy"><label translate="DEVICE_PROPERTIES_AP_RADIO_WLAN_GROUP_OVERRIDE" class="appLabel--primary verticalRhythm--cozy"></label><div class="appDescriptionList appDescriptionList--stacked appDescriptionList--divider"><div class="flexRow noMarginBottom"><div class="flexCol--4"><dt>{{\'DEVICE_PROPERTIES_LABEL_WLAN_GROUP\' | translate}}</dt><dd>{{apPropertiesConfigureRadiosCtrl.roamingOverrides[radioType].wlanGroup}}</dd></div><div class="flexCol--4"><dt>{{\'DEVICE_PROPERTIES_LABEL_CHANNEL\' | translate}}</dt><dd>{{apPropertiesConfigureRadiosCtrl.roamingOverrides[radioType].channel}}</dd></div><div class="flexCol--4"><dt>{{\'DEVICE_PROPERTIES_LABEL_HT\' | translate}}</dt><dd>{{apPropertiesConfigureRadiosCtrl.roamingOverrides[radioType].ht}}</dd></div></div></div></div><div ng-show="!apPropertiesConfigureRadiosCtrl.isRoamingEnabled[radioType]" class="appFormGroup appFormGroup--condensed"><div class="flexRow noMarginBottom"><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_CHANNEL_WIDTH" class="appLabel--primary"></label><select name="radioHt{{radioType}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].ht" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].ht" ng-options="ht.value as ht.label for ht in apPropertiesConfigureRadiosCtrl.radioHtOptions[radioType]" ng-required="!apPropertiesConfigureRadiosCtrl.isBatchEdit" class="select--full"><option ng-if="apPropertiesConfigureRadiosCtrl.isBatchEdit" ng-value="undefined" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></option></select></div><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_CHANNEL" class="appLabel--primary"></label><select name="radioChannel{{radioType}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].channel" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].channel" ng-options="channel.channel as channel.label for channel in apPropertiesConfigureRadiosCtrl.radioChannelOptions[radioType]" ng-disabled="!apPropertiesConfigureRadiosCtrl.customAttrs[radioType].ht" class="select--full"><option ng-if="apPropertiesConfigureRadiosCtrl.isBatchEdit" ng-value="undefined" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></option></select></div></div></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_TRANSMIT_POWER" class="appLabel--primary"></label><div class="flexRow noMarginBottom"><div class="flexCol--6"><select name="radioTxPower{{radioType}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].tx_power_mode" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].tx_power_mode" ng-options="power.value as power.translationKey | translate for power in apPropertiesConfigureRadiosCtrl.radioPowerOptions" class="select--full"><option ng-if="apPropertiesConfigureRadiosCtrl.isBatchEdit" ng-value="undefined" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></option></select></div><div ng-show="apPropertiesConfigureRadiosCtrl.setVisibility(\'customTxPower\' + radioType, apPropertiesConfigureRadiosCtrl.customAttrs[radioType].tx_power_mode === \'custom\')" class="flexCol--6"><div class="appInputGroup noMarginBottom"><input type="number" name="radioTxPowerCustom{{radioType}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].tx_power" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].tx_power" ng-required="apPropertiesConfigureRadiosCtrl.getVisibility(\'customTxPower\' + radioType)" min="{{apPropertiesConfigureRadiosCtrl.getVisibility(\'customTxPower\' + radioType) ? apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_txpower : \'\'}}" max="{{apPropertiesConfigureRadiosCtrl.getVisibility(\'customTxPower\' + radioType) ? apPropertiesConfigureRadiosCtrl.customAttrs[radioType].max_txpower : \'\'}}" class="input--half"><label translate="DEVICE_RADIO_TRANSMIT_POWER_DBM"></label></div><div ng-if="apPropertiesConfigureRadiosCtrl.form[\'radioTxPowerCustom\' + radioType].$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_txpower, max: apPropertiesConfigureRadiosCtrl.customAttrs[radioType].max_txpower}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div ng-if="!apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].builtin_antenna &amp;&amp; !apPropertiesConfigureRadiosCtrl.isBatchEdit" class="appFormGroup appFormGroup--condensed"><div class="flexRow noMarginBottom"><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN" class="appLabel--primary"></label><div class="appInputGroup noMarginBottom"><input type="number" name="radioAntennaGain{{radioType}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].antenna_gain" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].antenna_gain" min="{{apPropertiesConfigureRadiosCtrl.antennaGainMin}}" max="{{apPropertiesConfigureRadiosCtrl.antennaGainMax}}" class="input--half"><label translate="DEVICE_RADIO_TRANSMIT_POWER_DBI"></label></div><div ng-if="apPropertiesConfigureRadiosCtrl.form[\'radioAntennaGain\' + radioType].$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: apPropertiesConfigureRadiosCtrl.antennaGainMin, max: apPropertiesConfigureRadiosCtrl.antennaGainMax}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><fieldset unifi-if-advanced-features ng-class="{\'appFieldset--collapsed\': !apPropertiesConfigureRadiosCtrl.isAdvancedExpanded[radioType]}" class="appFieldset appFieldset--quiet verticalRhythmTop--cozy"><h4 ng-class="apPropertiesConfigureRadiosCtrl.isAdvancedExpanded[radioType] ? \'verticalRhythm--condensed\' : \'noMarginBottom\'" class="panelTitle"><div ng-click="apPropertiesConfigureRadiosCtrl.isAdvancedExpanded[radioType] = !apPropertiesConfigureRadiosCtrl.isAdvancedExpanded[radioType]" ng-class="apPropertiesConfigureRadiosCtrl.isAdvancedExpanded[radioType] ? \'appCollapserType\' : \'appExpanderType\'" translate="COMMON_SECTION_ADVANCED_OPTIONS"></div></h4><div ng-show="!apPropertiesConfigureRadiosCtrl.isRoamingEnabled[radioType]" class="appFormGroup appFormGroup--condensed"><div ng-if="!apPropertiesConfigureRadiosCtrl.isBatchEdit" class="flexRow noMarginBottom"><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_MINIMUM_RSSI" class="appLabel--primary"></label><div class="appInputGroup noMarginBottom"><input type="checkbox" name="radioMinRssiEnabled{{radioType}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].min_rssi_enabled"><input type="number" name="radioMinRssi{{radioType}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].min_rssi" ng-disabled="!apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" ng-required="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" ng-class="{\'is-input-warning\': apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled &amp;&amp;                   apPropertiesConfigureRadiosCtrl.showMinRssiWarning &amp;&amp;                   apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi &gt; apPropertiesConfigureRadiosCtrl.minRssiWarn}" min="{{apPropertiesConfigureRadiosCtrl.minRssiMin}}" max="{{apPropertiesConfigureRadiosCtrl.minRssiMax}}" class="input--smallNumber"><label translate="DEVICE_RADIO_TRANSMIT_POWER_DBM" ng-class="{\'is-label-disabled\': !apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled}"></label></div></div><div ng-if="apPropertiesConfigureRadiosCtrl.isMinRssiStrictModeSupported(radioType)" ng-show="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_MIN_RSSI_STRICT_MODE" class="appLabel--primary"></label><div class="appInputGroup noMarginBottom"><input type="checkbox" name="radioMinRssiStrictMode{{radioType}}" id="radioMinRssiStrictMode{{radioType + \'-\' + directiveId}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].hard_noise_floor_enabled" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].hard_noise_floor_enabled"><label for="radioMinRssiStrictMode{{radioType + \'-\' + directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_MIN_RSSI_STRICT_MODE" ng-class="{\'is-label-disabled\': !apPropertiesConfigureRadiosCtrl.customAttrs[radioType].hard_noise_floor_enabled}"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="DEVICE_PROPERTIES_TOOLTIP_MIN_RSSI_STRICT_MODE" class="appTooltip appTooltip--left"></div></div></div></div></div><div ng-if="apPropertiesConfigureRadiosCtrl.isBatchEdit" class="flexRow noMarginBottom"><div class="flexCol--12"><div class="appInputGroup noMarginBottom"><label translate="DEVICE_PROPERTIES_LABEL_MINIMUM_RSSI" class="appLabel--primary"></label><div class="appInputGroup noMarginBottom"><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="minRssiEnabled{{radioType}}" id="minRssiKeepExisting{{radioType + \'-\' + directiveId}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].min_rssi_enabled" ng-value="undefined"><label for="minRssiKeepExisting{{radioType + \'-\' + directiveId}}" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="minRssiEnabled{{radioType}}" id="minRssiDisabled{{radioType + \'-\' + directiveId}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].min_rssi_enabled" ng-value="false"><label for="minRssiDisabled{{radioType + \'-\' + directiveId}}" translate="DEVICE_PROPERTIES_VALUES_DISABLE_MIN_RSSI"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="minRssiEnabled{{radioType}}" id="minRssiEnabled{{radioType + \'-\' + directiveId}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].min_rssi_enabled" ng-value="true"><label for="minRssiEnabled{{radioType + \'-\' + directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_MIN_RSSI"></label><input type="number" name="radioMinRssi{{radioType}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].min_rssi" ng-disabled="!apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" ng-required="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled" min="{{apPropertiesConfigureRadiosCtrl.minRssiMin}}" max="{{apPropertiesConfigureRadiosCtrl.minRssiMax}}" class="input--smallNumber"><label translate="DEVICE_RADIO_TRANSMIT_POWER_DBM" ng-class="{\'is-label-disabled\': !apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled}"></label></div></div><div ng-if="apPropertiesConfigureRadiosCtrl.form[\'radioMinRssi\' + radioType].$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: apPropertiesConfigureRadiosCtrl.minRssiMin, max: apPropertiesConfigureRadiosCtrl.minRssiMax}" class="appInputFeedback appInputFeedback--danger"></div></div><div ng-if="apPropertiesConfigureRadiosCtrl.isMinRssiStrictModeSupported(radioType)" ng-show="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].min_rssi_enabled !== false" class="appInputGroup noMarginBottom"><label translate="DEVICE_PROPERTIES_LABEL_MIN_RSSI_STRICT_MODE" class="appLabel--primary"></label><div class="appInputGroup noMarginBottom"><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="minRssiStrictModeEnabled{{radioType}}" id="minRssiStrictModeKeepExisting{{radioType + \'-\' + directiveId}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].hard_noise_floor_enabled" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].hard_noise_floor_enabled" ng-value="undefined"><label for="minRssiStrictModeKeepExisting{{radioType + \'-\' + directiveId}}" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="minRssiStrictModeEnabled{{radioType}}" id="minRssiStrictModeDisabled{{radioType + \'-\' + directiveId}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].hard_noise_floor_enabled" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].hard_noise_floor_enabled" ng-value="false"><label for="minRssiStrictModeDisabled{{radioType + \'-\' + directiveId}}" translate="DEVICE_PROPERTIES_VALUES_DISABLE_MIN_RSSI_STRICT_MODE"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="minRssiStrictModeEnabled{{radioType}}" id="minRssiStrictModeEnabled{{radioType + \'-\' + directiveId}}" ng-model="apPropertiesConfigureRadiosCtrl.customAttrs[radioType].hard_noise_floor_enabled" ng-model-master="apPropertiesConfigureRadiosCtrl.customAttrs[radioType + \'Master\'].hard_noise_floor_enabled" ng-value="true"><label for="minRssiStrictModeEnabled{{radioType + \'-\' + directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_MIN_RSSI_STRICT_MODE"></label></div></div></div></div></div></div></fieldset></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent verticalRhythmTop--cozy"><div class="appFormFooter__left"><button ng-click="apPropertiesConfigureRadiosCtrl.showValidation = true" busy-toggle="apPropertiesConfigureRadiosCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="apPropertiesConfigureRadiosCtrl.isSaveDisabled()" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{apPropertiesConfigureRadiosCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="apPropertiesConfigureRadiosCtrl.reset()" ng-disabled="apPropertiesConfigureRadiosCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],280:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesConfigureRadios",["$timeout","updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin","devicePropertiesConfigureBatchDirectiveMixin",function(b,c,d,e){return{scope:{model:"=unifiApPropertiesConfigureRadios",withBatch:"=unifiApPropertiesConfigureRadiosWithBatch",isOpen:"=unifiApPropertiesConfigureRadiosIsOpen",isReadOnly:"=unifiApPropertiesConfigureRadiosIsReadOnly",isSaveQueued:"=unifiApPropertiesConfigureRadiosIsSaveQueued",group:"@unifiApPropertiesConfigureRadiosGroup"},controller:"ApPropertiesConfigureRadiosController",controllerAs:"apPropertiesConfigureRadiosCtrl",template:a("./apPropertiesConfigureRadios.jade")(),link:function(a,f,g,h){a.directiveId=a.$id,b(function(){angular.forEach(["ng","na"],function(b){a.$watch(function(){if(h.customAttrs&&h.customAttrs[b])return h.customAttrs[b].ht},function(a){a&&h.updateChannelOptions(b)})})},0,!1),a.$on("$destroy",function(){h.removeEventHandlers()}),c.init(a,f,g,h,!0),d.init(a,f,g,h),e.init(a,f,g,h)}}}])},{"./apPropertiesConfigureRadios.jade":279}],281:[function(a,b,c){"use strict";function d(a,b,c){this.$q=a,this.patterns={name:c.NAME,vlan:c.VLAN,password:c.PASSWORD},this.overridableAttrs=["enabled","name","vlan","vlan_enabled","x_passphrase"],e.call(this,b)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateDefaults=function(a){this.defaults=a},d.prototype.save=function(){var a=!0;return angular.forEach(this.overridableAttrs,function(b){this.compoundAttrs[b]===this.defaults.get(b)?this.model.unset(b):(a=!1,this.model.set(b,this.compoundAttrs[b]))}.bind(this)),this.$q.when(a)},d.prototype.restore=function(){this.setDefaultAttrs(!1,!0)},d.prototype.setDefaultAttrs=function(a,b){var c=a?"Master":"",d={enabled:!0};this["compoundAttrs"+c]=angular.extend(d,(this.defaults||{}).attributes,b?{}:(this.model||{}).attributes)},d.prototype.isDefault=function(){var a=this.overridableAttrs.filter(function(a){return this.compoundAttrs[a]!==this.defaults.get(a)}.bind(this));return 0===a.length},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$q","modelDivergence","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("ApPropertiesConfigureWlanFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],282:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="apPropertiesConfigureWlanFormCtrl.form" ng-class="{    \'is-form-validation-visible\': apPropertiesConfigureWlanFormCtrl.showValidation,    \'is-validation-hidden\': !apPropertiesConfigureWlanFormCtrl.showValidation  }" ng-submit="apPropertiesConfigureWlanFormCtrl.form.$valid &amp;&amp; apPropertiesConfigureWlanFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="apPropertiesConfigureWlanFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="apPropertiesConfigureWlanFormCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; apPropertiesConfigureWlanFormCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appSubHeading verticalRhythm--condensed">{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS_SUBSECTION_OVERRIDE_\' + radioType.toUpperCase() + (isAcModel && radioType === \'na\' ? \'_AC\' : \'\') | translate:\'{name: "\' + apPropertiesConfigureWlanFormCtrl.defaults.get(\'name\') + \'"}\'}}</div><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wlanOverrideEnable" id="wlanOverrideEnable{{::directiveId}}" ng-model="apPropertiesConfigureWlanFormCtrl.compoundAttrs.enabled" ng-model-master="apPropertiesConfigureWlanFormCtrl.compoundAttrsMaster.enabled"><label for="wlanOverrideEnable{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_ON_AP"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wlanOverrideEnableVlan" id="wlanOverrideEnableVlan{{::directiveId}}" ng-model="apPropertiesConfigureWlanFormCtrl.compoundAttrs.vlan_enabled" ng-model-master="apPropertiesConfigureWlanFormCtrl.compoundAttrsMaster.vlan_enabled"><label for="wlanOverrideEnableVlan{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_USE_VLAN"></label><label for="wlanOverrideEnableVlanId{{::directiveId}}" translate="DEVICE_PROPERTIES_LABEL_VLAN_ID" ng-class="{\'is-label-disabled\': !apPropertiesConfigureWlanFormCtrl.compoundAttrs.vlan_enabled}"></label><input type="text" name="wlanOverrideVlanId" id="wlanOverrideEnableVlanId{{::directiveId}}" ng-model="apPropertiesConfigureWlanFormCtrl.compoundAttrs.vlan" ng-model-master="apPropertiesConfigureWlanFormCtrl.compoundAttrsMaster.vlan" ng-disabled="!apPropertiesConfigureWlanFormCtrl.compoundAttrs.vlan_enabled" ng-required="apPropertiesConfigureWlanFormCtrl.compoundAttrs.vlan_enabled" ng-pattern="apPropertiesConfigureWlanFormCtrl.patterns.vlan" class="input--smallNumber"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_SSID" class="appLabel--primary"></label><input type="text" name="wlanOverrideName" ng-model="apPropertiesConfigureWlanFormCtrl.compoundAttrs.name" ng-model-master="apPropertiesConfigureWlanFormCtrl.compoundAttrsMaster.name" autofocus class="input--full"></div><div ng-show="apPropertiesConfigureWlanFormCtrl.setVisibility(\'passphrase\', apPropertiesConfigureWlanFormCtrl.compoundAttrs.security === \'wpapsk\')" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_SECURITY_KEY" class="appLabel--primary"></label><input type="password" name="wlanOverrideWpaPskKey" ng-model="apPropertiesConfigureWlanFormCtrl.compoundAttrs.x_passphrase" ng-model-master="apPropertiesConfigureWlanFormCtrl.compoundAttrsMaster.x_passphrase" ng-pattern="apPropertiesConfigureWlanFormCtrl.patterns.password" ng-required="apPropertiesConfigureWlanFormCtrl.getVisibility(\'passphrase\')" unifi-password-reveal class="input--full"><div ng-if="apPropertiesConfigureWlanFormCtrl.form.wlanOverrideWpaPskKey.$error.pattern" translate="VALIDATION_HINT_WPA_PSK" class="appInputFeedback appInputFeedback--danger"></div></div></fieldset><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="apPropertiesConfigureWlanFormCtrl.showValidation = true" class="appMainButton appMainButton--primary appMainButton--condensed saveWlanOverride">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="apPropertiesConfigureWlanFormCtrl.restore()" ng-disabled="apPropertiesConfigureWlanFormCtrl.isDefault()" class="appMainButton appMainButton--primary appMainButton--condensed restoreWlanOverride">{{\'COMMON_ACTIONS_RESET_TO_DEFAULTS\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--transparent appMainButton--condensed cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary appMainButton--condensed cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],283:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesConfigureWlanForm",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiApPropertiesConfigureWlanForm",defaults:"=unifiApPropertiesConfigureWlanFormDefaults",radioType:"=unifiApPropertiesConfigureWlanFormRadioType",isAcModel:"=unifiApPropertiesConfigureWlanFormIsAcModel",onSave:"&unifiApPropertiesConfigureWlanFormOnSave",onCancel:"&unifiApPropertiesConfigureWlanFormOnCancel",isReadOnly:"=unifiApPropertiesConfigureWlanFormIsReadOnly",isOpen:"=unifiApPropertiesConfigureWlanFormIsOpen"},controller:"ApPropertiesConfigureWlanFormController",controllerAs:"apPropertiesConfigureWlanFormCtrl",template:a("./apPropertiesConfigureWlanForm.jade")(),link:function(a,c,d,e){a.onSubmit=function(b){a.onSave({model:a.model,isDefault:b})},a.$watch("defaults",function(a){e.updateDefaults(a)}),a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./apPropertiesConfigureWlanForm.jade":282}],284:[function(a,b,c){"use strict";function d(a,b,c){this.defaultSortBy="name",this.filter=new b,e.call(this,a,c)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.setWlanGroupIdFilter=function(a){this.beginStateChange(),this.filter.setWlanGroupIdFilter(a),this.commitStateChange()},d.prototype.getCollection=function(){return this.wlans},d.prototype.getOverrideModel=function(a,b,c){var d={wlan_id:a.id,radio:this.radioType},e=b?this.currentOverrides:this.overrides,f=e.model;return e.findWhere(d)||!c&&new f(d)},d.prototype.updateOverrides=function(a){this.overrides&&this.overrides.off("add remove change reset",this.refresh,this),this.overrides=a,this.overrides&&this.overrides.on("add remove change reset",this.refresh,this),this.refresh()},d.prototype.hasPendingChanges=function(a){var b=this.getOverrideModel(a,!0),c=this.getOverrideModel(a,!1);return!angular.equals(b.attributes,c.attributes)},d.prototype.removePendingChanges=function(a){var b=this.getOverrideModel(a,!0,!0),c=this.getOverrideModel(a,!1,!0);c&&this.overrides.remove(c),b&&this.overrides.add(b.deepCopy())},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({radioType:this.radioType,defaults:a,overrides:this.getOverrideModel(a)})},d.$inject=["$q","WirelessNetworkFilter","CollectionView"],angular.module("app-unifi-manage").controller("ApPropertiesConfigureWlanListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],285:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<table ng-show="apPropertiesConfigureWlanListCtrl.view.getModels().length" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th class="wlanName"><span translate="DEVICE_PROPERTIES_AP_WLAN_TABLE_HEADER_NAME"></span></th><th class="wlanOverrides"><span translate="DEVICE_PROPERTIES_AP_WLAN_TABLE_HEADER_OVERRIDES"></span></th><th unifi-if-role-admin class="wlanActions"><span translate="DEVICE_PROPERTIES_AP_WLAN_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in apPropertiesConfigureWlanListCtrl.view.getModels()" data-id="{{::model.id}}" class="clickable"><td class="wlanName">{{::model.get(\'name\')}}</td><td class="wlanOverrides">{{::apPropertiesConfigureWlanListCtrl.getOverrideModel(model, false, true) | wlanOverride: model}}</td><td unifi-if-role-admin class="wlanActions appTableCell--actions"><button type="button" ng-if="!apPropertiesConfigureWlanListCtrl.wlanGroup.get(\'roam_enabled\')" ng-click="apPropertiesConfigureWlanListCtrl.edit(model)" title="{{\'COMMON_ACTIONS_OVERRIDE\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span></button><button type="button" ng-if="apPropertiesConfigureWlanListCtrl.hasPendingChanges(model)" ng-click="apPropertiesConfigureWlanListCtrl.removePendingChanges(model)" title="{{\'COMMON_ACTIONS_UNDO\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--reset"></span></button></td></tr></tbody></table>'),b.join("")}},{"jade/runtime":232}],286:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesConfigureWlanList",[function(){return{scope:{_overrides:"=unifiApPropertiesConfigureWlanListOverrides",currentOverrides:"=unifiApPropertiesConfigureWlanListCurrentOverrides",wlans:"=unifiApPropertiesConfigureWlanListCollection",radioType:"=unifiApPropertiesConfigureWlanListRadioType",wlanGroup:"=unifiApPropertiesConfigureWlanListWlanGroup",onEdit:"&unifiApPropertiesConfigureWlanListOnEdit",isOpen:"=unifiApPropertiesConfigureWlanListIsOpen"},controller:"ApPropertiesConfigureWlanListController",controllerAs:"apPropertiesConfigureWlanListCtrl",bindToController:!0,restrict:"E",replace:!0,template:a("./apPropertiesConfigureWlanList.jade")(),link:function(a,b,c,d){a.$watch(function(){return d.wlanGroup},function(a){d.setWlanGroupIdFilter(a?a.id:void 0)}),
a.$watch(function(){return d._overrides},function(a){d.updateOverrides(a)}),a.$on("$destroy",function(){d.destroyView()})}}}])},{"./apPropertiesConfigureWlanList.jade":285}],287:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.modelChangeEvent="change change:radio_table[*]",this.$translate=a,this.deviceUtils=b,this.system=c,this.wirelessNetworkGroups=d,this.wirelessNetworks=f,this.deviceRadioUtils=g,this.deviceFeatureUtils=h,this.heyToasts=i,this.apiResults=k,this.customAttrs={},e.call(this,j)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initBatchEdit=function(){this.isBatchEdit=!0},d.prototype.isSaveDisabled=function(){if(this.isBatchEdit)return!this.radioTypes.reduce(function(a,b){return this.customAttrs[b].wlanGroupId&&a++,a}.bind(this),0)},d.prototype.save=function(){this.isSubmitting=!0;var a={};angular.forEach(this.radioTypes,function(b){a["wlangroup_id_"+b]=this.customAttrs[b].wlanGroupId}.bind(this)),a.wlan_overrides=this.pendingOverrides.toJSON().filter(function(b){var c=this.wirelessNetworks.repository.collection.get(b.wlan_id);return c&&c.get("wlangroup_id")===a["wlangroup_id_"+b.radio]}.bind(this));var b=this.isSaveQueued?"pending":void 0;return this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:b,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"Master":"",c=a||!this.isSaveQueued?void 0:{delegateTo:"pending"};angular.forEach(this.radioTypes,function(a){var d=this.customAttrs[a+b]={};d.wlanGroupId=(this.model?this.model.get("wlangroup_id_"+a,c):void 0)||(this.isBatchEdit?void 0:(this.defaultWlanGroup||{}).id)}.bind(this))},d.prototype.addEventHandlers=function(){e.prototype.addEventHandlers.call(this),this.wirelessNetworkGroups.repository.collection.on("add remove change reset",this.updateWlanGroupOptions,this)},d.prototype.removeEventHandlers=function(){e.prototype.removeEventHandlers.call(this),this.wirelessNetworkGroups.repository.collection.off("add remove change reset",this.updateWlanGroupOptions,this)},d.prototype.updateRadioTypes=function(){if(this.model){var a=this.model.get("radio_table");a&&(this.radioTypes=a.pluck("radio").sort().reverse()),this.isAcModel=this.deviceRadioUtils.isAcModel(this.model)}else this.radioTypes=[]},d.prototype.updateWlanGroupOptions=function(){if(this.wlanGroupOptions=this.wlanGroupOptions||{},this.defaultWlanGroup=this.wirelessNetworkGroups.repository.collection.getDefault(),this.model){var a=!this.deviceFeatureUtils.isZeroHandoffSupported(this.model),b="wireless"===this.model.getNested("uplink.type");angular.forEach(this.radioTypes,function(c){this.wlanGroupOptions[c]=[],this.wirelessNetworkGroups.repository.collection.each(function(d){d.get("roam_enabled")&&(c!==d.get("roam_radio")||b||a)||this.wlanGroupOptions[c].push(d)}.bind(this))}.bind(this))}},d.prototype.updatePendingOverrides=function(){this.pendingOverrides=this.model?this.model.get("wlan_overrides",{delegateTo:"pending"}).deepCopy():void 0},d.prototype.hasPendingOverrides=function(){return!(!this.model||!this.pendingOverrides)&&(!this.model.get("wlan_overrides")||!angular.equals(this.model.get("wlan_overrides").toJSON(),this.pendingOverrides.toJSON()))},d.prototype.cancelEdit=function(){this.showEditForm=!1,delete this.editAttrs},d.prototype.editOverride=function(a,b,c){this.showEditForm=!0,this.editAttrs={defaults:b,isAcModel:this.deviceRadioUtils.isAcModel(this.model),model:c,radioType:a}},d.prototype.onSaveOverride=function(a,b){this.pendingOverrides.remove(this.pendingOverrides.where({wlan_id:a.get("wlan_id"),radio:a.get("radio")})),b||this.pendingOverrides.add(a),this.cancelEdit()},d.prototype.onModelChange=function(){this.updateRadioTypes(),this.updateWlanGroupOptions(),this.setDefaultAttrs(!0)},d.prototype.resetModelCopyAttrs=function(a){e.prototype.resetModelCopyAttrs.call(this,a),this.setDefaultAttrs(!1,a),this.updatePendingOverrides()},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1),this.updatePendingOverrides()},d.$inject=["$translate","deviceUtils","system","wirelessNetworkGroups","wirelessNetworks","deviceRadioUtils","deviceFeatureUtils","heyToasts","modelDivergence","apiResults"],angular.module("app-unifi-manage").controller("ApPropertiesConfigureWlansController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],288:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><form novalidate autocomplete="off" name="apPropertiesConfigureWlansCtrl.form" ng-show="!apPropertiesConfigureWlansCtrl.showEditForm" ng-class="{      \'is-form-validation-visible\': apPropertiesConfigureWlansCtrl.showValidation,      \'is-validation-hidden\': !apPropertiesConfigureWlansCtrl.showValidation    }" ng-submit="apPropertiesConfigureWlansCtrl.form.$valid &amp;&amp; apPropertiesConfigureWlansCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="apPropertiesConfigureWlansCtrl.resolveDivergence()" unifi-config-changed-on-ignore="apPropertiesConfigureWlansCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; apPropertiesConfigureWlansCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-repeat="radioType in apPropertiesConfigureWlansCtrl.radioTypes" ng-disabled="isReadOnly" ng-class="{        \'verticalRhythmTop\': $index &gt; 0      }" class="appFieldset appFieldset--quiet"><div class="appSubHeading verticalRhythm--condensed">{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS_SUBSECTION_\' + radioType.toUpperCase() + (apPropertiesConfigureWlansCtrl.isAcModel && radioType === \'na\' ? \'_AC\' : \'\') | translate}}</div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_WLAN_GROUP" class="appLabel--primary"></label><div class="appInputGroup noMarginBottom"><select name="wlanGroup{{radioType}}" ng-model="apPropertiesConfigureWlansCtrl.customAttrs[radioType].wlanGroupId" ng-model-master="apPropertiesConfigureWlansCtrl.customAttrs[radioType + \'Master\'].wlanGroupId" ng-options="wlanGroup.id as wlanGroup | roaming: true for wlanGroup in apPropertiesConfigureWlansCtrl.wlanGroupOptions[radioType]" class="select--full"><option ng-if="apPropertiesConfigureWlansCtrl.isBatchEdit" ng-value="undefined" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></option></select></div></div><unifi-ap-properties-configure-wlan-list ng-if="apPropertiesConfigureWlansCtrl.customAttrs[radioType].wlanGroupId" unifi-ap-properties-configure-wlan-list-overrides="apPropertiesConfigureWlansCtrl.pendingOverrides" unifi-ap-properties-configure-wlan-list-current-overrides="apPropertiesConfigureWlansCtrl.model.get(\'wlan_overrides\')" unifi-ap-properties-configure-wlan-list-collection="apPropertiesConfigureWlansCtrl.wirelessNetworks.repository.collection" unifi-ap-properties-configure-wlan-list-radio-type="radioType" unifi-ap-properties-configure-wlan-list-wlan-group="apPropertiesConfigureWlansCtrl.wirelessNetworkGroups.repository.collection.get(apPropertiesConfigureWlansCtrl.customAttrs[radioType].wlanGroupId)" unifi-ap-properties-configure-wlan-list-on-edit="apPropertiesConfigureWlansCtrl.editOverride(radioType, defaults, overrides)" unifi-ap-properties-configure-wlan-list-is-open="isOpen"></unifi-ap-properties-configure-wlan-list></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent verticalRhythmTop--cozy"><div class="appFormFooter__left"><button ng-click="apPropertiesConfigureWlansCtrl.showValidation = true" busy-toggle="apPropertiesConfigureWlansCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="apPropertiesConfigureWlansCtrl.isSaveDisabled()" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{apPropertiesConfigureWlansCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="apPropertiesConfigureWlansCtrl.reset()" ng-disabled="apPropertiesConfigureWlansCtrl.form.$pristine &amp;&amp; !apPropertiesConfigureWlansCtrl.hasPendingOverrides()" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form><div ng-if="apPropertiesConfigureWlansCtrl.showEditForm" unifi-ap-properties-configure-wlan-form="apPropertiesConfigureWlansCtrl.editAttrs.model" unifi-ap-properties-configure-wlan-form-defaults="apPropertiesConfigureWlansCtrl.editAttrs.defaults" unifi-ap-properties-configure-wlan-form-radio-type="apPropertiesConfigureWlansCtrl.editAttrs.radioType" unifi-ap-properties-configure-wlan-form-is-ac-model="apPropertiesConfigureWlansCtrl.editAttrs.isAcModel" unifi-ap-properties-configure-wlan-form-on-save="apPropertiesConfigureWlansCtrl.onSaveOverride(model, isDefault)" unifi-ap-properties-configure-wlan-form-on-cancel="apPropertiesConfigureWlansCtrl.cancelEdit()" unifi-ap-properties-configure-wlan-form-is-open="isOpen" unifi-ap-properties-configure-wlan-form-is-read-only="isReadOnly"></div></div>'),b.join("")}},{"jade/runtime":232}],289:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesConfigureWlans",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin","devicePropertiesConfigureBatchDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiApPropertiesConfigureWlans",withBatch:"=unifiApPropertiesConfigureWlansWithBatch",isOpen:"=unifiApPropertiesConfigureWlansIsOpen",isReadOnly:"=unifiApPropertiesConfigureWlansIsReadOnly",isSaveQueued:"=unifiApPropertiesConfigureWlansIsSaveQueued",group:"@unifiApPropertiesConfigureWlansGroup"},controller:"ApPropertiesConfigureWlansController",controllerAs:"apPropertiesConfigureWlansCtrl",template:a("./apPropertiesConfigureWlans.jade")(),link:function(a,e,f,g){a.$on("$destroy",function(){g.removeEventHandlers()}),b.init(a,e,f,g,!0),c.init(a,e,f,g),d.init(a,e,f,g)}}}])},{"./apPropertiesConfigureWlans.jade":288}],290:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.devices=a,this.deviceUtils=b,this.frame=c,this.$q=d,this.$translate=f,this.heyToasts=g,this.sourceFilter=this.sourceFilter.bind(this),e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.copy=function(){return this.sourceModel?this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_COPY_CONFIRM_TITLE",{deviceName:this.sourceModel.getDisplayName()})}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_COPY_CONFIRM_MESSAGE",{deviceName:this.sourceModel.getDisplayName()})}.bind(this),options:angular.noop}).then(function(){return this.deviceUtils.copyConfig(this.model,this.sourceModel).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))}.bind(this)):this.$q.reject()},d.prototype.sourceFilter=function(a){return a.get("mac")!==this.model.get("mac")&&a.get("model")===this.model.get("model")&&a.get("adopted")},d.prototype.onModelChange=function(){},d.$inject=["devices","deviceUtils","frame","$q","$translate","heyToasts"],angular.module("app-unifi-manage").controller("ApPropertiesCopyConfigurationController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],291:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="apPropertiesCopyConfigurationCtrl.form" ng-class="{    \'is-form-validation-visible\': apPropertiesCopyConfigurationCtrl.showValidation,    \'is-validation-hidden\': !apPropertiesCopyConfigurationCtrl.showValidation  }" ng-submit="apPropertiesCopyConfigurationCtrl.form.$valid &amp;&amp; apPropertiesCopyConfigurationCtrl.copy()" class="appForm unifiPanelItemForm"><fieldset class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><unifi-select-device-dropdown-list unifi-select-device-dropdown-list-selected-model="apPropertiesCopyConfigurationCtrl.sourceModel" unifi-select-device-dropdown-list-is-required="true" unifi-select-device-dropdown-list-device-filter="apPropertiesCopyConfigurationCtrl.sourceFilter(model)" unifi-select-device-dropdown-list-local-state="true" unifi-select-device-dropdown-list-local-state-key="::apPropertiesCopyConfigurationCtrl.model.get(\'mac\') + \'|copy-config\'" unifi-select-device-dropdown-list-local-state-is-temporary="true" unifi-select-device-dropdown-list-is-cozy="true" unifi-select-device-dropdown-list-no-clear="true"></unifi-select-device-dropdown-list></div></fieldset><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="apPropertiesCopyConfigurationCtrl.showValidation = true" busy-toggle="apPropertiesCopyConfigurationCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="apPropertiesCopyConfigurationCtrl.isSaveDisabled()" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],292:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesCopyConfiguration",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiApPropertiesCopyConfiguration",isOpen:"=unifiApPropertiesCopyConfigurationIsOpen"},controller:"ApPropertiesCopyConfigurationController",controllerAs:"apPropertiesCopyConfigurationCtrl",template:a("./apPropertiesCopyConfiguration.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./apPropertiesCopyConfiguration.jade":291}],293:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="apPropertiesCtrl.accordions.details.overview" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_OVERVIEW\' | translate}}</accordion-heading><div ng-if="apPropertiesCtrl.accordions.details.overview"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow macAddress"><dt>{{\'DEVICE_PROPERTIES_LABEL_MAC_ADDRESS\' | translate}}</dt><dd>{{apPropertiesCtrl.model.get(\'mac\')}}</dd></div><div class="appDescriptionListRow modelName"><dt>{{\'DEVICE_PROPERTIES_LABEL_MODEL\' | translate}}</dt><dd>{{apPropertiesCtrl.deviceStateUtils.getDeviceModel(apPropertiesCtrl.model)}}</dd></div><div class="appDescriptionListRow version"><dt>{{\'DEVICE_PROPERTIES_LABEL_VERSION\' | translate}}</dt><dd><span ng-if="apPropertiesCtrl.model.get(\'version\')">{{apPropertiesCtrl.model.get(\'version\')}}</span><span ng-if="!apPropertiesCtrl.model.get(\'version\')" translate="DEVICE_PROPERTIES_VALUES_VERSION_NOT_AVAILABLE"></span></dd></div></div><div ng-if="apPropertiesCtrl.deviceStatus === \'success\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow ipAddress"><dt>{{\'DEVICE_PROPERTIES_LABEL_IP_ADDRESS\' | translate}}</dt><dd>{{apPropertiesCtrl.model.get(\'ip\')}}</dd></div><div class="appDescriptionListRow uptime"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPTIME\' | translate}}</dt><dd>{{apPropertiesCtrl.model.get(\'uptime\') | seconds}}</dd></div><div ng-if="apPropertiesCtrl.model.getNested(\'sys_stats.mem_total\')" class="appDescriptionListRow memory"><dt>{{\'DEVICE_PROPERTIES_LABEL_MEMORY_USAGE\' | translate}}</dt><dd>{{apPropertiesCtrl.model.getNested(\'sys_stats.mem_used\') | percent: apPropertiesCtrl.model.getNested(\'sys_stats.mem_total\')}}</dd></div><div ng-if="apPropertiesCtrl.model.getNested(\'sys_stats.loadavg_1\')" class="appDescriptionListRow load"><dt>{{\'DEVICE_PROPERTIES_LABEL_LOAD_AVERAGE\' | translate}}</dt><dd>{{apPropertiesCtrl.model.get(\'sys_stats\') | loadAvg}}<div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable horizontalRhythmLeft--cozy"><div translate="DEVICE_PROPERTIES_TOOLTIP_LOAD_AVERAGE" class="appTooltip appTooltip--left"></div></div></dd></div></div><div ng-if="apPropertiesCtrl.deviceStatus === \'success\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow numUsers"><dt>{{\'DEVICE_PROPERTIES_LABEL_NUM_USERS\' | translate}}</dt><dd>{{apPropertiesCtrl.model.get(\'user-num_sta\')}}</dd></div><div class="appDescriptionListRow numGuests"><dt>{{\'DEVICE_PROPERTIES_LABEL_NUM_GUESTS\' | translate}}</dt><dd>{{apPropertiesCtrl.model.get(\'guest-num_sta\')}}</dd></div></div><div ng-if="apPropertiesCtrl.deviceStatus !== \'success\'" class="appDescriptionList appDescriptionList--inline"><div class="appDescriptionListRow lastSeen"><dt>{{\'DEVICE_PROPERTIES_LABEL_LAST_SEEN\' | translate}}</dt><dd><span ng-if="apPropertiesCtrl.model.get(\'last_seen\')">{{apPropertiesCtrl.model.get(\'last_seen\') * 1000 | moment: \'fromNow\'}}</span><span ng-if="!apPropertiesCtrl.model.get(\'last_seen\')" translate="DEVICE_PROPERTIES_VALUES_LAST_SEEN_NEVER"></span></dd></div></div></div></accordion-group><accordion-group ng-if="apPropertiesCtrl.uplinkAttrs.type" is-open="apPropertiesCtrl.accordions.details.uplink" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_UPLINK\' | translate}}<span ng-if="apPropertiesCtrl.uplinkAttrs.type === \'wire\'">&nbsp;({{\'DEVICE_PROPERTIES_SECTION_DETAILS_UPLINK_TYPE_WIRED\' | translate}})</span><span ng-if="apPropertiesCtrl.uplinkAttrs.type === \'wireless\'">&nbsp;({{\'DEVICE_PROPERTIES_SECTION_DETAILS_UPLINK_TYPE_WIRELESS\' | translate}})</span></accordion-heading><div ng-if="apPropertiesCtrl.accordions.details.uplink"><div ng-if="apPropertiesCtrl.uplinkAttrs.type === \'wire\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div ng-if="apPropertiesCtrl.uplinkName" class="appDescriptionListRow uplinkName"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPLINK\' | translate}}</dt><dd><a unifi-open-panel="apPropertiesCtrl.uplink" unifi-open-panel-active-tab="apPropertiesCtrl.uplinkAttrs.uplink_remote_port ? \'ports\' : \'details\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="[{ state: \'port\', value: apPropertiesCtrl.uplinkAttrs.uplink_remote_port, overwrite: true }]">{{apPropertiesCtrl.uplinkName}}</a></dd></div><div class="appDescriptionListRow uplinkSpeed"><dt>{{\'DEVICE_PROPERTIES_LABEL_SPEED\' | translate}}</dt><dd>{{apPropertiesCtrl.uplinkAttrs.speed || (\'DEVICE_PROPERTIES_VALUES_SPEED_UNKNOWN\' | translate)}}</dd></div><div class="appDescriptionListRow uplinkDuplex"><dt>{{\'DEVICE_PROPERTIES_LABEL_DUPLEX\' | translate}}</dt><dd>{{(apPropertiesCtrl.uplinkAttrs.full_duplex ? \'DEVICE_PROPERTIES_VALUES_DUPLEX_FULL\' : \'DEVICE_PROPERTIES_VALUES_DUPLEX_HALF\') | translate}}</dd></div></div><div ng-if="apPropertiesCtrl.uplinkAttrs.type === \'wireless\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow uplinkAp"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPLINK_AP\' | translate}}</dt><dd><a unifi-open-panel="apPropertiesCtrl.uplink" unifi-open-panel-active-tab="\'details\'">{{apPropertiesCtrl.uplinkName}}</a></dd></div></div><div ng-if="apPropertiesCtrl.uplinkAttrs.type === \'wireless\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow uplinkRssi"><dt>{{\'DEVICE_PROPERTIES_LABEL_SIGNAL\' | translate}}</dt><dd>{{apPropertiesCtrl.uplinkAttrs.rssi | rssi}} ({{apPropertiesCtrl.uplinkAttrs.rssi | rssiToDbm}})</dd></div><div class="appDescriptionListRow uplinkTxRate"><dt>{{\'DEVICE_PROPERTIES_LABEL_TX_RATE\' | translate}}</dt><dd>{{apPropertiesCtrl.uplinkAttrs.tx_rate | rxtx}}</dd></div><div class="appDescriptionListRow uplinkRxRate"><dt>{{\'DEVICE_PROPERTIES_LABEL_RX_RATE\' | translate}}</dt><dd>{{apPropertiesCtrl.uplinkAttrs.rx_rate | rxtx}}</dd></div></div><div class="appDescriptionList appDescriptionList--inline"><div class="appDescriptionListRow uplinkDownPktsBytes"><dt>{{\'DEVICE_PROPERTIES_LABEL_DOWN_PKTS_BYTES\' | translate}}</dt><dd>{{apPropertiesCtrl.uplinkAttrs.rx_packets && apPropertiesCtrl.uplinkAttrs.rx_bytes ? (apPropertiesCtrl.uplinkAttrs.rx_packets | numberToString) + \' / \' + (apPropertiesCtrl.uplinkAttrs.rx_bytes | bytes) : \'0.00 / 0.00\'}}</dd></div><div class="appDescriptionListRow uplinkUpPktsBytes"><dt>{{\'DEVICE_PROPERTIES_LABEL_UP_PKTS_BYTES\' | translate}}</dt><dd>{{apPropertiesCtrl.uplinkAttrs.tx_packets && apPropertiesCtrl.uplinkAttrs.tx_bytes ? (apPropertiesCtrl.uplinkAttrs.tx_packets | numberToString) + \' / \' + (apPropertiesCtrl.uplinkAttrs.tx_bytes | bytes) : \'0.00 / 0.00\'}}</dd></div><div class="appDescriptionListRow uplinkActivity"><dt>{{\'DEVICE_PROPERTIES_LABEL_ACTIVITY\' | translate}}</dt><dd>{{(apPropertiesCtrl.uplinkAttrs[\'rx_bytes-r\'] || 0) + (apPropertiesCtrl.uplinkAttrs[\'tx_bytes-r\'] || 0) | bps}}</dd></div></div></div></accordion-group><accordion-group ng-if="apPropertiesCtrl.model.get(\'downlink_table\').length" is-open="apPropertiesCtrl.accordions.details.downlinks" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_DOWNLINKS\' | translate}}</accordion-heading><unifi-ap-properties-downlink-list ng-if="apPropertiesCtrl.accordions.details.downlinks" unifi-ap-properties-downlink-list-local-state="true" unifi-ap-properties-downlink-list-local-state-key="::apPropertiesCtrl.model.get(\'mac\') + \'|downlinks\'" unifi-ap-properties-downlink-list-uplink="::apPropertiesCtrl.model" unifi-ap-properties-downlink-list-downlinks="apPropertiesCtrl.model.get(\'downlink_table\')"></unifi-ap-properties-downlink-list></accordion-group><accordion-group ng-if="apPropertiesCtrl.deviceRadioUtils.hasRadioType(apPropertiesCtrl.model, \'ng\') &amp;&amp; apPropertiesCtrl.showRadioAccordion" is-open="apPropertiesCtrl.accordions.details.radioNg" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_RADIO_NG\' | translate}}</accordion-heading><unifi-ap-properties-details-radio ng-if="apPropertiesCtrl.accordions.details.radioNg" unifi-ap-properties-details-radio-model="::apPropertiesCtrl.model" unifi-ap-properties-details-radio-type="ng"></unifi-ap-properties-details-radio></accordion-group><accordion-group ng-if="apPropertiesCtrl.deviceRadioUtils.hasRadioType(apPropertiesCtrl.model, \'na\') &amp;&amp; apPropertiesCtrl.showRadioAccordion" is-open="apPropertiesCtrl.accordions.details.radioNa" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_RADIO_NA\' + (apPropertiesCtrl.deviceRadioUtils.isAcModel(apPropertiesCtrl.model) ? \'_AC\' : \'\') | translate}}</accordion-heading><unifi-ap-properties-details-radio ng-if="apPropertiesCtrl.accordions.details.radioNa" unifi-ap-properties-details-radio-model="::apPropertiesCtrl.model" unifi-ap-properties-details-radio-type="na"></unifi-ap-properties-details-radio></accordion-group><accordion-group ng-if="apPropertiesCtrl.showRfEnvironmentAccordion" is-open="apPropertiesCtrl.accordions.details.rfEnvironment" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_RF_ENVIRONMENT\' | translate}}</accordion-heading><unifi-ap-properties-rf-environment unifi-initialize-when="apPropertiesCtrl.accordions.details.rfEnvironment" unifi-ap-properties-rf-environment-model="::apPropertiesCtrl.model"></unifi-ap-properties-rf-environment></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],294:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesDetails",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiApProperties",template:a("./apPropertiesDetails.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"details")}}}])},{"./apPropertiesDetails.jade":293}],295:[function(a,b,c){"use strict";function d(a){this.deviceRadioUtils=a}d.$inject=["deviceRadioUtils"],angular.module("app-unifi-manage").controller("ApPropertiesDetailsRadioController",d)},{}],296:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div><div class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow radioChannel\"><dt>{{'DEVICE_PROPERTIES_LABEL_CHANNEL' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.deviceRadioUtils.getChannelStateString(apPropertiesDetailsRadioCtrl.model, apPropertiesDetailsRadioCtrl.type)}}</dd></div><div class=\"appDescriptionListRow radioPower\"><dt>{{'DEVICE_PROPERTIES_LABEL_TRANSMIT_POWER' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.deviceRadioUtils.getTransmitPowerString(apPropertiesDetailsRadioCtrl.model, apPropertiesDetailsRadioCtrl.type)}}</dd></div><div class=\"appDescriptionListRow radioTxPktsBytes\"><dt>{{'DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.deviceRadioUtils.getPacketsPerBytes(apPropertiesDetailsRadioCtrl.model, apPropertiesDetailsRadioCtrl.type, 'tx')}}</dd></div><div class=\"appDescriptionListRow radioRxPktsBytes\"><dt>{{'DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.deviceRadioUtils.getPacketsPerBytes(apPropertiesDetailsRadioCtrl.model, apPropertiesDetailsRadioCtrl.type, 'rx')}}</dd></div><div class=\"appDescriptionListRow radioTxRetryDropped\"><dt>{{'DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.deviceRadioUtils.getRetryDroppedPercentage(apPropertiesDetailsRadioCtrl.model, apPropertiesDetailsRadioCtrl.type, 'tx')}}</dd></div><div class=\"appDescriptionListRow radioRxRetryDropped\"><dt>{{'DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.deviceRadioUtils.getRetryDroppedPercentage(apPropertiesDetailsRadioCtrl.model, apPropertiesDetailsRadioCtrl.type, 'rx')}}</dd></div><div ng-if=\"apPropertiesDetailsRadioCtrl.model.get(apPropertiesDetailsRadioCtrl.type + '_cu_total')\" class=\"appDescriptionListRow radioChannelUtilization\"><dt>{{'DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.model | channelUtilization: apPropertiesDetailsRadioCtrl.type}}</dd></div></div><div class=\"appDescriptionList appDescriptionList--inline\"><div class=\"appDescriptionListRow radioNumUsers\"><dt>{{'DEVICE_PROPERTIES_LABEL_NUM_USERS' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.model.get(apPropertiesDetailsRadioCtrl.type + '-user-num_sta')}}</dd></div><div class=\"appDescriptionListRow radioNumGuests\"><dt>{{'DEVICE_PROPERTIES_LABEL_NUM_GUESTS' | translate}}</dt><dd>{{apPropertiesDetailsRadioCtrl.model.get(apPropertiesDetailsRadioCtrl.type + '-guest-num_sta')}}</dd></div></div></div>"),b.join("")}},{"jade/runtime":232}],297:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesDetailsRadio",[function(){return{scope:{model:"=unifiApPropertiesDetailsRadioModel",type:"@unifiApPropertiesDetailsRadioType"},controller:"ApPropertiesDetailsRadioController",controllerAs:"apPropertiesDetailsRadioCtrl",bindToController:!0,template:a("./apPropertiesDetailsRadio.jade")()}}])},{"./apPropertiesDetailsRadio.jade":296}],298:[function(a,b,c){"use strict";function d(a,b,c,d){this.devices=b,this.rowsPerPage=d.model.getRowsPerPropertyPanel(),e.call(this,a,c,d)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.downlinks},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","devices","CollectionView","preferences"],angular.module("app-unifi-manage").controller("ApPropertiesDownlinkListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],299:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appScrollable flexFlag__body fullWidth"><table class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th class="downlinkAp"><span translate="DEVICE_PROPERTIES_AP_DOWNLINKS_TABLE_HEADER_AP"></span></th><th class="downlinkSignal"><span translate="DEVICE_PROPERTIES_AP_DOWNLINKS_TABLE_HEADER_SIGNAL"></span></th><th unifi-if-role-admin class="downlinkActions"><span translate="DEVICE_PROPERTIES_AP_DOWNLINKS_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tfoot ng-if="apPropertiesDownlinkListCtrl.view.getModels().length"><tr><td colspan="3"><unifi-micro-pagination unifi-micro-pagination-current-page="apPropertiesDownlinkListCtrl.currentPage" unifi-micro-pagination-rows-per-page="apPropertiesDownlinkListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="apPropertiesDownlinkListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in apPropertiesDownlinkListCtrl.view.getModels(),          startFrom (apPropertiesDownlinkListCtrl.currentPage - 1) * apPropertiesDownlinkListCtrl.rowsPerPage,          limitTo apPropertiesDownlinkListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-init="device = apPropertiesDownlinkListCtrl.devices.repository.collection.get(model.get(\'ap_mac\'))"><td class="downlinkAp"><a unifi-open-panel="device" unifi-open-panel-active-tab="\'details\'">{{::device.getDisplayName()}}</a></td><td class="downlinkSignal">{{::model.get(\'rssi\') | rssi}} ({{::model.get(\'rssi\') | rssiToDbm}})</td><td unifi-if-role-admin class="downlinkActions appTableCell--actions"><button unifi-device-button-unlink unifi-device-button-unlink-uplink="::apPropertiesDownlinkListCtrl.uplink" unifi-device-button-unlink-downlink="::device" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"></button></td></tr></tbody></table><div ng-if="!apPropertiesDownlinkListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_DOWNLINKS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],300:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesDownlinkList",["PaginatedListDirective",function(b){return new b("apPropertiesDownlink",a("./apPropertiesDownlinkList.jade")(),{uplink:"=unifiApPropertiesDownlinkListUplink",downlinks:"=unifiApPropertiesDownlinkListDownlinks"})}])},{"./apPropertiesDownlinkList.jade":299}],301:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h){this.$q=a,this.$translate=b,this.API_STRINGS=g,this.apiResults=c,this.frame=d,this.heyToasts=e,this.RF_ENVIRONMENT_SETTINGS=h,this.rfEnvironment=f,this.spectrumScan=f.getSpectrumScan(this.model.get("mac")),
this.spectrumScan.resolve().then(function(){this.isScanning()&&this.refreshSpectrumScanResult()}.bind(this))}d.prototype._executeScanning=function(){var a=this.model.getDisplayName();return this.rfEnvironment.startSpectrumScan(this.model).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DEVICE_PROPERTIES_RF_ENVIRONMENT_START_SCAN_SUCCESS",{deviceName:a}))}.bind(this))["catch"](function(b){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("DEVICE_PROPERTIES_RF_ENVIRONMENT_START_SCAN_FAILURE",{deviceName:a}),b)),this.$q.reject()}.bind(this)).then(function(){this.refreshSpectrumScanResult()}.bind(this))},d.prototype.refreshSpectrumScanResult=function(){var a=this.model.getDisplayName();return this.rfEnvironment.refreshSpectrumScanResults(this.spectrumScan).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DEVICE_PROPERTIES_RF_ENVIRONMENT_REFRESH_SCAN_SUCCESS",{deviceName:a}),this.RF_ENVIRONMENT_SETTINGS.DEVICE_FETCH.HEY_TOAST_DELAY)}.bind(this))},d.prototype.startScanning=function(){return this.frame.show("confirm",{title:this.$translate.instant.bind(this,"DEVICE_PROPERTIES_RF_ENVIRONMENT_START_SCAN_CONFIRM_TITLE"),message:this.$translate.instant.bind(this,"DEVICE_PROPERTIES_RF_ENVIRONMENT_START_SCAN_CONFIRM_MESSAGE"),options:angular.noop}).then(function(){return this._executeScanning()}.bind(this))},d.prototype.stopRefreshingSpectrumScanResult=function(){this.rfEnvironment.stopRefreshingSpectrumScanResults(this.spectrumScan)},d.prototype.isScanning=function(){return this.rfEnvironment.isScanning(this.spectrumScan)},d.prototype.isBusy=function(){return this.isScanning()||this.spectrumScan.isLoading},d.prototype.getLastScanningTime=function(a){return this.rfEnvironment.getLastScanningTime(this.spectrumScan,a)},d.$inject=["$q","$translate","apiResults","frame","heyToasts","rfEnvironment","API_STRINGS","RF_ENVIRONMENT_SETTINGS"],angular.module("app-unifi-manage").controller("ApPropertiesRfEnvironmentController",d)},{}],302:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiRfEnvironmentProperties"><div class="container"><div class="row row--comfy"><div class="col--xs4"><ul ng-init="activeRadioType=\'ng\'" class="buttonGroup buttonGroup--shrink appMainButtonGroup noMarginBottom"><li ng-class="{\'is-button-selected\': activeRadioType === \'ng\'}" ng-click="activeRadioType = \'ng\'" class="button appMainButton appMainButton--cozy">{{ \'DEVICE_PROPERTIES_RF_ENVIRONMENT_LABEL_2G\' | translate }}</li><li ng-class="{\'is-button-selected\': activeRadioType === \'na\'}" ng-click="activeRadioType = \'na\'" class="button appMainButton appMainButton--cozy">{{ \'DEVICE_PROPERTIES_RF_ENVIRONMENT_LABEL_5G\' | translate }}</li></ul></div><div class="col--xs8 alignRight"><unifi-rf-environment-legend></unifi-rf-environment-legend></div></div></div><unifi-rf-environment-tooltip ng-if="rfTooltipVisible" unifi-rf-environment-tooltip-content="rfTooltipContent" unifi-rf-environment-tooltip-offset="rfTooltipOffset"></unifi-rf-environment-tooltip><unifi-rf-environment-chart unifi-rf-environment-chart-handlers="rfTooltipHandlers" unifi-rf-environment-chart-device="apPropertiesRfEnvironmentCtrl.model" unifi-rf-environment-chart-spectrum-scan="apPropertiesRfEnvironmentCtrl.spectrumScan" unifi-rf-environment-chart-radio-type="activeRadioType"></unifi-rf-environment-chart><div class="container"><div class="row row--comfy"><div class="col--xs8 unifiRfEnvironmentProperties__lastScan"><div ng-hide="apPropertiesRfEnvironmentCtrl.isBusy()"><span>{{ \'DEVICE_PROPERTIES_RF_ENVIRONMENT_SCAN_STATUS_LAST_SCAN\' | translate }}&nbsp;</span><span ng-show="apPropertiesRfEnvironmentCtrl.getLastScanningTime(activeRadioType)">{{ apPropertiesRfEnvironmentCtrl.getLastScanningTime(activeRadioType) | moment: \'fromNow\' }}</span><span ng-hide="apPropertiesRfEnvironmentCtrl.getLastScanningTime(activeRadioType)">{{ \'DEVICE_PROPERTIES_RF_ENVIRONMENT_SCAN_STATUS_NEVER_SCANNED\' | translate }}</span></div></div><div unifi-if-role-admin class="col--xs4 unifiRfEnvironmentProperties__runScan alignRight"><button busy-toggle="apPropertiesRfEnvironmentCtrl.isBusy()" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="apPropertiesRfEnvironmentCtrl.isBusy()" ng-click="apPropertiesRfEnvironmentCtrl.startScanning()" class="appMainButton appMainButton--primary appMainButton--cozy"><span class="button__icon icon ubnt-icon--sync"></span><span>{{ \'DEVICE_PROPERTIES_RF_ENVIRONMENT_ACTION_START_SCAN\' | translate }}</span></button></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],303:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesRfEnvironment",["d3BBox",function(b){var c=3,d=125,e=345;return{bindToController:!0,controller:"ApPropertiesRfEnvironmentController",controllerAs:"apPropertiesRfEnvironmentCtrl",replace:!0,scope:{model:"=unifiApPropertiesRfEnvironmentModel"},template:a("./apPropertiesRfEnvironment.jade")(),link:function(a,f,g,h){a.rfTooltipVisible=!1,a.getParentWidth=function(a){return a.offsetParent.offsetWidth},a.getChartWidth=function(a){return a.offsetWidth},a.rfTooltipHandlers={mouseover:function(g,h){a.$apply(function(){a.rfTooltipVisible=!0,a.rfTooltipContent=h;var i,j,k,l=b.getRelativeBBox(g.target,f[0]),m=a.getParentWidth(f[0]),n=m-a.getChartWidth(f[0]);m>e?(k=Math.ceil(l.left+l.width/2+n/2),j=Math.ceil(-l.right+l.width/2+n/2),i=k<=d&&"right"||j<=d&&"left"||"center"):(k=j=Math.round(m/2),i="standalone"),a.rfTooltipOffset={left:k+"px",right:j+"px",bottom:Math.ceil(-l.bottom+l.height+c)+"px",align:i}})},mouseout:function(){a.$apply(function(){a.rfTooltipVisible=!1})}},a.$on("$destroy",function(){h.stopRefreshingSpectrumScanResult()})}}}])},{"./apPropertiesRfEnvironment.jade":302}],304:[function(a,b,c){"use strict";function d(a,b,c,d){this.getUplinkDevice=b.repository.collection.get.bind(b.repository.collection),this.devices=b,this.rowsPerPage=d.model.getRowsPerPropertyPanel(),this.defaultSortBy="rssi",this.defaultSortDesc=!0,e.call(this,a,c,d)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.uplinks},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","devices","CollectionView","preferences"],angular.module("app-unifi-manage").controller("ApPropertiesUplinkListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],305:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table collection-view-sort="apPropertiesUplinkListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="name" class="uplinkAp"><span translate="DEVICE_PROPERTIES_AP_UPLINKS_TABLE_HEADER_AP"></span></th><th collection-view-sort-by="channel" class="uplinkChannel"><span translate="DEVICE_PROPERTIES_AP_UPLINKS_TABLE_HEADER_CHANNEL"></span></th><th collection-view-sort-by="rssi" class="uplinkSignal"><span translate="DEVICE_PROPERTIES_AP_UPLINKS_TABLE_HEADER_SIGNAL"></span></th><th unifi-if-role-admin class="uplinkActions"><span translate="DEVICE_PROPERTIES_AP_UPLINKS_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tfoot ng-if="apPropertiesUplinkListCtrl.view.getModels().length"><tr><td colspan="4"><unifi-micro-pagination unifi-micro-pagination-current-page="apPropertiesUplinkListCtrl.currentPage" unifi-micro-pagination-rows-per-page="apPropertiesUplinkListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="apPropertiesUplinkListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in apPropertiesUplinkListCtrl.view.getModels(),          startFrom (apPropertiesUplinkListCtrl.currentPage - 1) * apPropertiesUplinkListCtrl.rowsPerPage,          limitTo apPropertiesUplinkListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-init="device = apPropertiesUplinkListCtrl.getUplinkDevice(model.get(\'mac\'))" class="clickable"><td class="uplinkAp"><a unifi-open-panel="device" unifi-open-panel-active-tab="\'details\'">{{::device.getDisplayName()}}</a></td><td class="uplinkChannel">{{::model.get(\'channel\')}}</td><td class="uplinkSignal">{{::model.get(\'rssi\') | rssi}} ({{::model.get(\'rssi\') | rssiToDbm}})</td><td unifi-if-role-admin class="uplinkActions appTableCell--actions"><button ng-if="model.get(\'configured\')" unifi-device-button-unlink unifi-device-button-unlink-uplink="::device" unifi-device-button-unlink-downlink="::apPropertiesUplinkListCtrl.downlink" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"></button><button ng-if="!model.get(\'configured\')" unifi-device-button-link unifi-device-button-link-uplink="::device" unifi-device-button-link-downlink="::apPropertiesUplinkListCtrl.downlink" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"></button></td></tr></tbody></table><div ng-if="!apPropertiesUplinkListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_AP_UPLINKS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],306:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApPropertiesUplinkList",["PaginatedListDirective",function(b){return new b("apPropertiesUplink",a("./apPropertiesUplinkList.jade")(),{uplinks:"=unifiApPropertiesUplinkListUplinks",downlink:"=unifiApPropertiesUplinkListDownlink"})}])},{"./apPropertiesUplinkList.jade":305}],307:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){f(this),this.$timeout=b,this.deviceRadioUtils=g,this.devices=h,this.deviceStateUtils=i,this.deviceUplinkUtils=j,this.featureFlag=k,this.networks=m,this.rfEnvironment=o,this.switches=p,this.switchUtils=q,this.system=r,this.tags=s,this.wirelessNetworkGroups=t,this.wirelessNetworks=u,this.DEVICE_STATES=v,this.isSaveQueued=!0,this.modelChangeEvent="change change:port_table[*]",this.accordions={details:{overview:!0},configure:{general:!0}},this.validators={warnings:void 0},e.call(this,a,b,c,n,d,l)}var e=a("../../controllers/BasePropertiesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.resolve=function(){var a=[this.networks.repository.register().fetch(),this.switches.repository.register().fetch(),this.system.repository.register().fetch(),this.wirelessNetworkGroups.repository.register().fetch(),this.wirelessNetworks.repository.register().fetch()];return this.featureFlag.isEnabled("enableApTagging")&&a.push(this.tags.repository.register().fetch()),this.$q.all(a)},d.prototype.destroy=function(){this.networks.repository.unregister(),this.switches.repository.unregister(),this.system.repository.unregister(),this.wirelessNetworkGroups.repository.unregister(),this.wirelessNetworks.repository.unregister(),this.featureFlag.isEnabled("enableApTagging")&&this.tags.repository.unregister()},d.prototype.reset=function(){this.deviceState=void 0,this.deviceStatus=void 0,this.uplink=void 0,this.uplinkAttrs={},this.uplinkName="",this.totalPower=0,this.hasUplink=!1,this.hasDownlinks=!1,this.showPortsTab=!1,this.showUsersTab=!1,this.showGuestsTab=!1,this.showConfigureTab=!1,this.showAdoptTab=!1,this.showBandSteeringAccordion=!1,this.showRadioAccordion=!1,this.showUplinksAccordion=!1,this.showDownlinksAccordion=!1,this.showRfEnvironmentAccordion=!1},d.prototype.onModelChange=function(){this.persistAdoptTab=this.showAdoptTab&&this.deviceStateUtils.getRawDeviceState(this.model)===this.DEVICE_STATES.ADOPTING,this.reset(),this.model&&(this.deviceState=this.deviceStateUtils.getDeviceState(this.model),this.deviceStatus=this.deviceStateUtils.getDeviceStatus(this.model),(this.uplinkAttrs=this.deviceUplinkUtils.getUplinkAttrs(this.model))&&(this.uplink=this.deviceUplinkUtils.getUplink(this.model),this.uplinkName=this.deviceUplinkUtils.getUplinkDisplayName(this.model)),this.totalPower=this.switchUtils.getTotalPower(this.model),this.hasUplink=angular.isObject(this.model.get("uplink"))&&!angular.equals({},this.model.get("uplink")),this.hasDownlinks=this.model.get("downlink_table")&&this.model.get("downlink_table").length>0,this.showPortsTab="success"===this.deviceStatus&&this.model.get("switch_vlan_enabled"),this.showUsersTab="success"===this.deviceStatus,this.showGuestsTab="success"===this.deviceStatus,this.showConfigureTab=this.model.get("adopted"),this.showAdoptTab=this.persistAdoptTab||this.deviceState===this.DEVICE_STATES.ADOPTION_FAILED||this.deviceState===this.DEVICE_STATES.MANAGED_BY_OTHER,this.showBandSteeringAccordion=this.deviceRadioUtils.hasRadioType(this.model,"na")&&this.deviceRadioUtils.hasRadioType(this.model,"ng"),this.showRadioAccordion="success"===this.deviceStatus,this.showUplinksAccordion=this.deviceUplinkUtils.isWirelessUplinkAvailable(this.model),this.showDownlinksAccordion="success"===this.deviceStatus,this.showRfEnvironmentAccordion=this.rfEnvironment.isAvailable(this.model))},d.$inject=["$q","$timeout","$translate","account","devicePropertiesPortsControllerMixin","deviceRadioUtils","devices","deviceStateUtils","deviceUplinkUtils","featureFlag","frame","networks","propertyPanel","rfEnvironment","switches","switchUtils","system","tags","wirelessNetworkGroups","wirelessNetworks","DEVICE_STATES"],angular.module("app-unifi-manage").controller("ApSwitchPropertiesController",d)},{"../../controllers/BasePropertiesController":1001}],308:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-collapsed\': apSwitchPropertiesCtrl.isCollapsed()}" ng-if="apSwitchPropertiesCtrl.model" class="unifiPanelItem apSwitchProperties"><unifi-loading-status unifi-loading-status-is-loading="apSwitchPropertiesCtrl.isLoading" unifi-loading-status-failed="apSwitchPropertiesCtrl.failedToLoad" unifi-loading-status-retry="apSwitchPropertiesCtrl.init()"></unifi-loading-status><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__collapseToggle"><div ng-click="apSwitchPropertiesCtrl.toggleCollapsed()" class="appActionIcon"><span ng-class="{            \'unifi-icon--default-collapse\': !apSwitchPropertiesCtrl.isCollapsed(),            \'unifi-icon--default-expand\': apSwitchPropertiesCtrl.isCollapsed()          }" class="button__icon icon"></span></div></div><div class="unifiPanelItemHeader__avatar"><div unifi-device-icon="::apSwitchPropertiesCtrl.model"></div></div><div class="unifiPanelItemHeader__title"><span unifi-device-status="::apSwitchPropertiesCtrl.model" unifi-device-status-is-cozy="true" unifi-device-status-is-truncated="true" unifi-device-status-with-icons="true" unifi-device-status-label="apSwitchPropertiesCtrl.model.getDisplayName()"></span><div class="unifiPanelItemHeader__status"><span unifi-device-status-badge="::apSwitchPropertiesCtrl.model"></span></div></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div unifi-device-button-adopt="::apSwitchPropertiesCtrl.model" unifi-device-button-adopt-collection="::apSwitchPropertiesCtrl.devices.repository.collection" unifi-device-button-adopt-is-reverse="true" class="appActionIcon appActionIcon--primary appActionIcon--reverse appActionIcon--round"></div><div unifi-device-button-restart="::apSwitchPropertiesCtrl.model" class="appActionIcon"></div><div unifi-device-button-locate="::apSwitchPropertiesCtrl.model" unifi-device-button-locate-with-map="true" class="appActionIcon"></div><div unifi-device-button-upgrade="::apSwitchPropertiesCtrl.model" class="appActionIcon"></div><div ng-click="apSwitchPropertiesCtrl.toggleUndocked()" title="{{apSwitchPropertiesCtrl.isUndocked() ? \'COMMON_PROPERTY_PANEL_ITEM_DOCK\' : \'COMMON_PROPERTY_PANEL_ITEM_UNDOCK\' | translate}}" class="appActionIcon visible--mdUp"><span ng-class="{              \'ubnt-icon--header-maximize\': !apSwitchPropertiesCtrl.isUndocked(),              \'ubnt-icon--header-minimize\': apSwitchPropertiesCtrl.isUndocked()            }" class="button__icon icon"></span></div><div ng-click="apSwitchPropertiesCtrl.removePanel()" title="{{\'COMMON_PROPERTY_PANEL_ITEM_REMOVE\' | translate}}" class="appActionIcon removePanelItem"><span class="button__icon icon unifi-icon--default-close"></span></div></div></div></div><div class="unifiPanelItemBody"><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><ul class="appTabs appTabs--compressed appTabs--alignLeft"><li ng-click="apSwitchPropertiesCtrl.setActiveTab(\'details\')" ng-class="{            \'is-tab-selected\': apSwitchPropertiesCtrl.getActiveTab() === \'details\',            \'is-tab-loading\': apSwitchPropertiesCtrl.loadingTab === \'details\'          }" translate="DEVICE_PROPERTIES_TAB_DETAILS" class="tabs__item details"></li><li ng-if="apSwitchPropertiesCtrl.showPortsTab" ng-click="apSwitchPropertiesCtrl.setActiveTab(\'ports\')" ng-class="{            \'is-tab-selected\': apSwitchPropertiesCtrl.getActiveTab() === \'ports\',            \'is-tab-loading\': apSwitchPropertiesCtrl.loadingTab === \'ports\'          }" translate="DEVICE_PROPERTIES_TAB_PORTS" class="tabs__item ports"></li><li ng-if="apSwitchPropertiesCtrl.showUsersTab" ng-click="apSwitchPropertiesCtrl.setActiveTab(\'users\')" ng-class="{            \'is-tab-selected\': apSwitchPropertiesCtrl.getActiveTab() === \'users\',            \'is-tab-loading\': apSwitchPropertiesCtrl.loadingTab === \'users\'          }" translate="DEVICE_PROPERTIES_TAB_USERS" class="tabs__item users"></li><li ng-if="apSwitchPropertiesCtrl.showGuestsTab" ng-click="apSwitchPropertiesCtrl.setActiveTab(\'guests\')" ng-class="{            \'is-tab-selected\': apSwitchPropertiesCtrl.getActiveTab() === \'guests\',            \'is-tab-loading\': apSwitchPropertiesCtrl.loadingTab === \'guests\'          }" translate="DEVICE_PROPERTIES_TAB_GUESTS" class="tabs__item guests"></li><li ng-if="apSwitchPropertiesCtrl.showConfigureTab" ng-click="apSwitchPropertiesCtrl.setActiveTab(\'configure\')" ng-class="{            \'is-tab-selected\': apSwitchPropertiesCtrl.getActiveTab() === \'configure\',            \'is-tab-loading\': apSwitchPropertiesCtrl.loadingTab === \'configure\'          }" translate="DEVICE_PROPERTIES_TAB_CONFIGURATION" class="tabs__item configure"></li><li unifi-if-role-admin unifi-if-role-admin-and="apSwitchPropertiesCtrl.showAdoptTab" ng-click="apSwitchPropertiesCtrl.setActiveTab(\'adopt\')" ng-class="{            \'is-tab-selected\': apSwitchPropertiesCtrl.getActiveTab() === \'adopt\',            \'is-tab-loading\': apSwitchPropertiesCtrl.loadingTab === \'adopt\'          }" translate="DEVICE_PROPERTIES_TAB_ADOPT" class="tabs__item adopt"></li></ul></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div class="unifiPanelItemContent"><div ng-if="apSwitchPropertiesCtrl.isTabAvailable(\'details\') &amp;&amp; apSwitchPropertiesCtrl.getActiveTab() === \'details\'" unifi-ap-switch-properties-details class="apSwitchPropertiesDetails"></div><div ng-if="apSwitchPropertiesCtrl.showPortsTab &amp;&amp; apSwitchPropertiesCtrl.isTabAvailable(\'ports\')" ng-show="apSwitchPropertiesCtrl.getActiveTab() === \'ports\'" class="apSwitchPropertiesPorts"><unifi-switch-properties-port-list unifi-switch-properties-port-list-model="::apSwitchPropertiesCtrl.model" unifi-switch-properties-port-list-collection="apSwitchPropertiesCtrl.model.get(\'port_table\')" unifi-switch-properties-port-list-toggle-port-selection="apSwitchPropertiesCtrl.togglePortSelection(model, isSelected)" unifi-switch-properties-port-list-is-port-selectable="apSwitchPropertiesCtrl.isPortSelectable(model)" unifi-switch-properties-port-list-is-port-selected="apSwitchPropertiesCtrl.isPortSelected(model)" unifi-switch-properties-port-list-highlighted-port="apSwitchPropertiesCtrl.highlightedPort" unifi-switch-properties-port-list-edited-port="apSwitchPropertiesCtrl.editedPort" unifi-switch-properties-port-list-with-state-icon="true" unifi-switch-properties-port-list-is-open="true"></unifi-switch-properties-port-list></div><div ng-if="apSwitchPropertiesCtrl.showUsersTab &amp;&amp; apSwitchPropertiesCtrl.isTabAvailable(\'users\') &amp;&amp; apSwitchPropertiesCtrl.getActiveTab() === \'users\'" class="apSwitchPropertiesUsers"><unifi-device-properties-client-list unifi-device-properties-client-list-local-state="true" unifi-device-properties-client-list-local-state-key="::apSwitchPropertiesCtrl.model.get(\'mac\') + \'|users\'" unifi-device-properties-client-list-device="::apSwitchPropertiesCtrl.model" unifi-device-properties-client-list-is-guest="false"></unifi-device-properties-client-list></div><div ng-if="apSwitchPropertiesCtrl.showGuestsTab &amp;&amp; apSwitchPropertiesCtrl.isTabAvailable(\'guests\') &amp;&amp; apSwitchPropertiesCtrl.getActiveTab() === \'guests\'" class="apSwitchPropertiesGuests"><unifi-device-properties-client-list unifi-device-properties-client-list-local-state="true" unifi-device-properties-client-list-local-state-key="::apSwitchPropertiesCtrl.model.get(\'mac\') + \'|guests\'" unifi-device-properties-client-list-device="::apSwitchPropertiesCtrl.model" unifi-device-properties-client-list-is-guest="true"></unifi-device-properties-client-list></div><div ng-if="apSwitchPropertiesCtrl.showConfigureTab &amp;&amp; apSwitchPropertiesCtrl.isTabAvailable(\'configure\')" ng-show="apSwitchPropertiesCtrl.getActiveTab() === \'configure\'" unifi-ap-switch-properties-configure class="apSwitchPropertiesConfigure"></div><div unifi-if-role-admin unifi-if-role-admin-and="apSwitchPropertiesCtrl.showAdoptTab &amp;&amp; apSwitchPropertiesCtrl.isTabAvailable(\'adopt\')" ng-show="apSwitchPropertiesCtrl.getActiveTab() === \'adopt\'" unifi-device-properties-adopt="::apSwitchPropertiesCtrl.model" class="apSwitchPropertiesAdopt"></div></div></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static unifiPanelItemBodySection--pending"><unifi-pending-changes-list unifi-pending-changes-list-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-list-save="applyPendingChanges(model)"></unifi-pending-changes-list></div></div></div>'),b.join("")}},{"jade/runtime":232}],309:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApSwitchProperties",["updateModelDirectiveMixin","devicePropertiesPortsDirectiveMixin","devicePropertiesPendingActionsDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiApSwitchProperties"},controller:"ApSwitchPropertiesController",controllerAs:"apSwitchPropertiesCtrl",template:a("./apSwitchProperties.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.$on("$destroy",function(){g.destroy(),g.removeEventHandlers()}),b.init(a,e,f,g,!0),c.init(a,e,f,g),d.init(a,e,f,g)}}}])},{"./apSwitchProperties.jade":308}],310:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><div unifi-initialize-when="!apSwitchPropertiesCtrl.isLoading" unifi-device-properties-configure-warnings="::apSwitchPropertiesCtrl.model" unifi-device-properties-configure-warnings-validator="apSwitchPropertiesCtrl.validators.warnings" class="apSwitchPropertiesConfigureWarnings"></div><accordion-group is-open="apSwitchPropertiesCtrl.accordions.configure.general" class="unifiPanelItemContent__section general"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers-and-create-scope><div class="apSwitchPropertiesConfigureGeneral"><div unifi-device-properties-configure-general="::apSwitchPropertiesCtrl.model" unifi-device-properties-configure-general-is-open="apSwitchPropertiesCtrl.accordions.configure.general" unifi-device-properties-configure-general-is-read-only="!apSwitchPropertiesCtrl.isAdmin()" unifi-device-properties-configure-general-is-save-queued="false" unifi-device-properties-configure-general-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="unifiPanelItemContentSection__subsection general"></div><div unifi-feature-flag-enable="enableApTagging" unifi-block-pause-children-watchers class="unifiPanelItemContentSection__subsection tags"><div class="panelHeading"><div class="panelTitle verticalRhythm--condensed"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_TAGS\' | translate}}</div></div></div><div unifi-device-properties-tags="apSwitchPropertiesCtrl.model" class="apPropertiesConfigureTags"></div></div></div></div></accordion-group><accordion-group is-open="apSwitchPropertiesCtrl.accordions.configure.radios" class="unifiPanelItemContent__section radios"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.radios" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.radios" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-radios="::apSwitchPropertiesCtrl.model" unifi-ap-properties-configure-radios-is-open="apSwitchPropertiesCtrl.accordions.configure.radios" unifi-ap-properties-configure-radios-is-read-only="!apSwitchPropertiesCtrl.isAdmin()" unifi-ap-properties-configure-radios-is-save-queued="apSwitchPropertiesCtrl.isSaveQueued" unifi-ap-properties-configure-radios-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS" class="apSwitchPropertiesConfigureRadios"></div></div></accordion-group><accordion-group is-open="apSwitchPropertiesCtrl.accordions.configure.wlans" class="unifiPanelItemContent__section wlans"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.wlans" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.wlans" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-wlans="::apSwitchPropertiesCtrl.model" unifi-ap-properties-configure-wlans-is-open="apSwitchPropertiesCtrl.accordions.configure.wlans" unifi-ap-properties-configure-wlans-is-read-only="!apSwitchPropertiesCtrl.isAdmin()" unifi-ap-properties-configure-wlans-is-save-queued="apSwitchPropertiesCtrl.isSaveQueued" unifi-ap-properties-configure-wlans-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WLANS" class="apSwitchPropertiesConfigureWlans"></div></div></accordion-group><accordion-group is-open="apSwitchPropertiesCtrl.accordions.configure.services" class="unifiPanelItemContent__section services"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_SERVICES\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_SERVICES" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.services" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.services" unifi-pause-children-watchers-and-create-scope><div unifi-ap-switch-properties-configure-services="::apSwitchPropertiesCtrl.model" unifi-ap-switch-properties-configure-services-is-open="apSwitchPropertiesCtrl.accordions.configure.services" unifi-ap-switch-properties-configure-services-is-read-only="!apSwitchPropertiesCtrl.isAdmin()" unifi-ap-switch-properties-configure-services-is-save-queued="apSwitchPropertiesCtrl.isSaveQueued" unifi-ap-switch-properties-configure-services-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_SERVICES" class="apSwitchPropertiesConfigureServices"></div></div></accordion-group><accordion-group is-open="apSwitchPropertiesCtrl.accordions.configure.network" class="unifiPanelItemContent__section network"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.network" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.network" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-network="::apSwitchPropertiesCtrl.model" unifi-device-properties-configure-network-is-open="apSwitchPropertiesCtrl.accordions.configure.network" unifi-device-properties-configure-network-is-read-only="!apSwitchPropertiesCtrl.isAdmin()" unifi-device-properties-configure-network-is-save-queued="apSwitchPropertiesCtrl.isSaveQueued" unifi-device-properties-configure-network-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK" unifi-device-properties-configure-network-validator="apSwitchPropertiesCtrl.validators.warnings" class="apSwitchPropertiesConfigureNetwork"></div></div></accordion-group><accordion-group unifi-if-advanced-features unifi-if-advanced-features-and="apSwitchPropertiesCtrl.showBandSteeringAccordion" is-open="apSwitchPropertiesCtrl.accordions.configure.bandSteering" class="unifiPanelItemContent__section bandSteering"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.bandSteering" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.bandSteering" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-band-steering="::apSwitchPropertiesCtrl.model" unifi-ap-properties-configure-band-steering-is-open="apSwitchPropertiesCtrl.accordions.configure.bandSteering" unifi-ap-properties-configure-band-steering-is-read-only="!apSwitchPropertiesCtrl.isAdmin()" unifi-ap-properties-configure-band-steering-is-save-queued="apSwitchPropertiesCtrl.isSaveQueued" unifi-ap-properties-configure-band-steering-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_BAND_STEERING" class="apSwitchPropertiesConfigureBandSteering"></div></div></accordion-group><accordion-group unifi-if-advanced-features is-open="apSwitchPropertiesCtrl.accordions.configure.airtimeFairness" class="unifiPanelItemContent__section airtimeFairness"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.airtimeFairness" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.airtimeFairness" unifi-pause-children-watchers-and-create-scope><div unifi-ap-properties-configure-airtime-fairness="::apSwitchPropertiesCtrl.model" unifi-ap-properties-configure-airtime-fairness-is-open="apSwitchPropertiesCtrl.accordions.configure.airtimeFairness" unifi-ap-properties-configure-airtime-fairness-is-read-only="!apSwitchPropertiesCtrl.isAdmin()" unifi-ap-properties-configure-airtime-fairness-is-save-queued="apSwitchPropertiesCtrl.isSaveQueued" unifi-ap-properties-configure-airtime-fairness-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_AIRTIME_FAIRNESS" class="apSwitchPropertiesConfigureAirtimeFairness"></div></div></accordion-group><accordion-group ng-if="apSwitchPropertiesCtrl.showUplinksAccordion" is-open="apSwitchPropertiesCtrl.accordions.configure.wirelessUplinks" class="unifiPanelItemContent__section wirelessUplinks"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_WIRELESS_UPLINKS\' | translate}}</accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.wirelessUplinks" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.wirelessUplinks" unifi-pause-children-watchers-and-create-scope><unifi-ap-properties-uplink-list unifi-ap-properties-uplink-list-local-state="true" unifi-ap-properties-uplink-list-local-state-key="::apSwitchPropertiesCtrl.model.get(\'mac\') + \'|uplinks\'" unifi-ap-properties-uplink-list-uplinks="apSwitchPropertiesCtrl.model.get(\'uplink_table\')" unifi-ap-properties-uplink-list-downlink="::apSwitchPropertiesCtrl.model" unifi-ap-properties-uplink-list-is-open="apSwitchPropertiesCtrl.accordions.configure.wirelessUplinks"></unifi-ap-properties-uplink-list></div></accordion-group><accordion-group is-open="apSwitchPropertiesCtrl.accordions.configure.resetButton" class="unifiPanelItemContent__section resetButton"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_RESET_BUTTON\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::apSwitchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_RESET_BUTTON" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.resetButton" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.resetButton" unifi-pause-children-watchers-and-create-scope><div unifi-ap-switch-properties-configure-reset-button="::apSwitchPropertiesCtrl.model" unifi-ap-switch-properties-configure-reset-button-is-open="apSwitchPropertiesCtrl.accordions.configure.resetButton" unifi-ap-switch-properties-configure-reset-button-is-read-only="!apSwitchPropertiesCtrl.isAdmin()" unifi-ap-switch-properties-configure-reset-button-is-save-queued="apSwitchPropertiesCtrl.isSaveQueued" unifi-ap-switch-properties-configure-reset-button-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_RESET_BUTTON" class="apSwitchPropertiesConfigureResetButton"></div></div></accordion-group><accordion-group ng-if="apSwitchPropertiesCtrl.isAdmin()" is-open="apSwitchPropertiesCtrl.accordions.configure.manage" class="unifiPanelItemContent__section manage"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_MANAGE_DEVICE\' | translate}}</accordion-heading><div unifi-initialize-when="apSwitchPropertiesCtrl.accordions.configure.manage" unifi-pause-children-watchers="!apSwitchPropertiesCtrl.accordions.configure.manage" unifi-pause-children-watchers-and-create-scope><div unifi-feature-flag-enable="enableApCopyConfig" class="unifiPanelItemContentSection__subsection copy"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_COPY\' | translate}}</div></div></div><div unifi-ap-properties-copy-configuration="::apSwitchPropertiesCtrl.model" unifi-ap-properties-copy-configuration-is-open="apSwitchPropertiesCtrl.accordions.configure.manage" class="apPropertiesConfigureCopy"></div></div><div class="unifiPanelItemContentSection__subsection upgrade"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_CUSTOM_UPGRADE\' | translate}}</div></div></div><div unifi-device-properties-configure-custom-upgrade="::apSwitchPropertiesCtrl.model" unifi-device-properties-configure-custom-upgrade-is-open="apSwitchPropertiesCtrl.accordions.configure.manage" class="apPropertiesConfigureCustomUpgrade"></div></div><div unifi-feature-flag-enable="enableApDisable" class="unifiPanelItemContentSection__subsection disable"><div class="panelHeading"><div class="panelTitle"><div>{{apSwitchPropertiesCtrl.model.get(\'disabled\') ? \'DEVICE_PROPERTIES_SECTION_CONFIGURE_ENABLE\' : \'DEVICE_PROPERTIES_SECTION_CONFIGURE_DISABLE\' | translate}}</div></div></div><div unifi-device-properties-configure-disable="::apSwitchPropertiesCtrl.model" unifi-device-properties-configure-disable-is-open="apSwitchPropertiesCtrl.accordions.configure.manage" class="apPropertiesConfigureDisable"></div></div><div class="unifiPanelItemContentSection__subsection forget"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_FORGET\' | translate}}</div></div></div><div unifi-device-properties-configure-forget="::apSwitchPropertiesCtrl.model" unifi-device-properties-configure-forget-is-open="apSwitchPropertiesCtrl.accordions.configure.manage" class="apPropertiesConfigureForget"></div></div></div></accordion-group></accordion>'),
b.join("")}},{"jade/runtime":232}],311:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApSwitchPropertiesConfigure",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiApSwitchProperties",template:a("./apSwitchPropertiesConfigure.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"configure")}}}])},{"./apSwitchPropertiesConfigure.jade":310}],312:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.$translate=a,this.deviceUtils=b,this.heyToasts=c,this.apiResults=f,this.resetButtonOptions=[{value:"on",translationKey:"COMMON_TOGGLE_ON"},{value:"off",translationKey:"COMMON_TOGGLE_OFF"}],e.call(this,d)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a={resetbtn_enabled:this.modelCopy.get("resetbtn_enabled")},b=this.isSaveQueued?"pending":void 0;return this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:b,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_RESET_BUTTON").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_RESET_BUTTON").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a,b){var c=a?"":"Copy";if(this.masterWithDefaults=this.masterWithDefaults||{},this["model"+c]){var d=a||!this.isSaveQueued?void 0:{delegateTo:"pending"},e={};b&&b.indexOf("resetbtn_enabled")===-1||(e.resetbtn_enabled=(this.model?this.model.get("resetbtn_enabled",d):void 0)||"on"),angular.extend(a?this.masterWithDefaults:this.modelCopy.attributes,e)}},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.resetModelCopyAttrs=function(a){e.prototype.resetModelCopyAttrs.call(this,a),this.setDefaultAttrs(!1,a)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","deviceUtils","heyToasts","modelDivergence","apiResults"],angular.module("app-unifi-manage").controller("ApSwitchPropertiesConfigureResetButtonController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],313:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="apSwitchPropertiesConfigureResetButtonCtrl.form" ng-class="{    \'is-form-validation-visible\': apSwitchPropertiesConfigureResetButtonCtrl.showValidation,    \'is-validation-hidden\': !apSwitchPropertiesConfigureResetButtonCtrl.showValidation  }" ng-submit="apSwitchPropertiesConfigureResetButtonCtrl.form.$valid &amp;&amp; apSwitchPropertiesConfigureResetButtonCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="apSwitchPropertiesConfigureResetButtonCtrl.resolveDivergence()" unifi-config-changed-on-ignore="apSwitchPropertiesConfigureResetButtonCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; apSwitchPropertiesConfigureResetButtonCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div ng-repeat="option in apSwitchPropertiesConfigureResetButtonCtrl.resetButtonOptions" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="resetButton" id="resetButton{{option.value + \'-\' + directiveId}}" ng-model="apSwitchPropertiesConfigureResetButtonCtrl.modelCopy.attributes.resetbtn_enabled" ng-model-master="apSwitchPropertiesConfigureResetButtonCtrl.masterWithDefaults.resetbtn_enabled" ng-value="option.value"><label for="resetButton{{option.value + \'-\' + directiveId}}" translate="{{option.translationKey}}"></label></div></div></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="apSwitchPropertiesConfigureResetButtonCtrl.showValidation = true" busy-toggle="apSwitchPropertiesConfigureResetButtonCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{apSwitchPropertiesConfigureResetButtonCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="apSwitchPropertiesConfigureResetButtonCtrl.reset()" ng-disabled="apSwitchPropertiesConfigureResetButtonCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],314:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApSwitchPropertiesConfigureResetButton",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin",function(b,c){return{scope:{model:"=unifiApSwitchPropertiesConfigureResetButton",isOpen:"=unifiApSwitchPropertiesConfigureResetButtonIsOpen",isReadOnly:"=unifiApSwitchPropertiesConfigureResetButtonIsReadOnly",isSaveQueued:"=unifiApSwitchPropertiesConfigureResetButtonIsSaveQueued",group:"@unifiApSwitchPropertiesConfigureResetButtonGroup"},controller:"ApSwitchPropertiesConfigureResetButtonController",controllerAs:"apSwitchPropertiesConfigureResetButtonCtrl",template:a("./apSwitchPropertiesConfigureResetButton.jade")(),link:function(a,d,e,f){a.directiveId=a.$id,a.$on("$destroy",function(){f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./apSwitchPropertiesConfigureResetButton.jade":313}],315:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){e.call(this,a,b,c,d,f,g,h)}var e=a("../../controllers/BaseConfigureServicesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getAttrsToSave=function(){var a={switch_vlan_enabled:this.modelCopy.attributes.switch_vlan_enabled};return this.modelCopy.attributes.switch_vlan_enabled&&(a.mgmt_network_id=this.mgmtNetworkId),a},d.$inject=["$translate","deviceUtils","heyToasts","networks","networkUtils","modelDivergence","apiResults"],angular.module("app-unifi-manage").controller("ApSwitchPropertiesConfigureServicesController",d)},{"../../controllers/BaseConfigureServicesController":998}],316:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="apSwitchPropertiesConfigureServicesCtrl.form" ng-class="{    \'is-form-validation-visible\': apSwitchPropertiesConfigureServicesCtrl.showValidation,    \'is-validation-hidden\': !apSwitchPropertiesConfigureServicesCtrl.showValidation  }" ng-submit="apSwitchPropertiesConfigureServicesCtrl.form.$valid &amp;&amp; apSwitchPropertiesConfigureServicesCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="apSwitchPropertiesConfigureServicesCtrl.resolveDivergence()" unifi-config-changed-on-ignore="apSwitchPropertiesConfigureServicesCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; apSwitchPropertiesConfigureServicesCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appInputGroup appInputGroup--comfy"><input type="checkbox" name="vlanEnabled" id="vlanEnabled{{::directiveId}}" ng-model="apSwitchPropertiesConfigureServicesCtrl.modelCopy.attributes.switch_vlan_enabled" ng-model-master="apSwitchPropertiesConfigureServicesCtrl.model.attributes.switch_vlan_enabled"><label for="vlanEnabled{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_PORT_VLAN"></label></div><div ng-show="apSwitchPropertiesConfigureServicesCtrl.modelCopy.attributes.switch_vlan_enabled" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_MGMT_VLAN" class="appLabel--primary"></label><select name="networkVlanNativeNetwork" ng-model="apSwitchPropertiesConfigureServicesCtrl.mgmtNetworkId" ng-model-master="apSwitchPropertiesConfigureServicesCtrl.mgmtNetworkIdMaster" ng-options="network.id as network.get(\'name\') for network in apSwitchPropertiesConfigureServicesCtrl.nativeNetworks" class="select--full"></select></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="apSwitchPropertiesConfigureServicesCtrl.showValidation = true" busy-toggle="apSwitchPropertiesConfigureServicesCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{apSwitchPropertiesConfigureServicesCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="apSwitchPropertiesConfigureServicesCtrl.reset()" ng-disabled="apSwitchPropertiesConfigureServicesCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],317:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApSwitchPropertiesConfigureServices",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin",function(b,c){return{scope:{model:"=unifiApSwitchPropertiesConfigureServices",isOpen:"=unifiApSwitchPropertiesConfigureServicesIsOpen",isReadOnly:"=unifiApSwitchPropertiesConfigureServicesIsReadOnly",isSaveQueued:"=unifiApSwitchPropertiesConfigureServicesIsSaveQueued",group:"@unifiApSwitchPropertiesConfigureServicesGroup"},controller:"ApSwitchPropertiesConfigureServicesController",controllerAs:"apSwitchPropertiesConfigureServicesCtrl",template:a("./apSwitchPropertiesConfigureServices.jade")(),link:function(a,d,e,f){a.directiveId=a.$id,a.$on("$destroy",function(){f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./apSwitchPropertiesConfigureServices.jade":316}],318:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="apSwitchPropertiesCtrl.accordions.details.overview" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_OVERVIEW\' | translate}}</accordion-heading><div ng-if="apSwitchPropertiesCtrl.accordions.details.overview"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow macAddress"><dt>{{\'DEVICE_PROPERTIES_LABEL_MAC_ADDRESS\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.model.get(\'mac\')}}</dd></div><div class="appDescriptionListRow modelName"><dt>{{\'DEVICE_PROPERTIES_LABEL_MODEL\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.deviceStateUtils.getDeviceModel(apSwitchPropertiesCtrl.model)}}</dd></div><div class="appDescriptionListRow version"><dt>{{\'DEVICE_PROPERTIES_LABEL_VERSION\' | translate}}</dt><dd><span ng-if="apSwitchPropertiesCtrl.model.get(\'version\')">{{apSwitchPropertiesCtrl.model.get(\'version\')}}</span><span ng-if="!apSwitchPropertiesCtrl.model.get(\'version\')" translate="DEVICE_PROPERTIES_VALUES_VERSION_NOT_AVAILABLE"></span></dd></div></div><div ng-if="apSwitchPropertiesCtrl.deviceStatus === \'success\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow ipAddress"><dt>{{\'DEVICE_PROPERTIES_LABEL_IP_ADDRESS\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.model.get(\'ip\')}}</dd></div><div class="appDescriptionListRow uptime"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPTIME\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.model.get(\'uptime\') | seconds}}</dd></div></div><div ng-if="apSwitchPropertiesCtrl.deviceStatus === \'success\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow numUsers"><dt>{{\'DEVICE_PROPERTIES_LABEL_NUM_USERS\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.model.get(\'num_sta\')}}</dd></div><div class="appDescriptionListRow numGuests"><dt>{{\'DEVICE_PROPERTIES_LABEL_NUM_GUESTS\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.model.get(\'guest-num_sta\')}}</dd></div></div><div ng-if="apSwitchPropertiesCtrl.deviceStatus !== \'success\'" class="appDescriptionList appDescriptionList--inline"><div class="appDescriptionListRow lastSeen"><dt>{{\'DEVICE_PROPERTIES_LABEL_LAST_SEEN\' | translate}}</dt><dd><span ng-if="apSwitchPropertiesCtrl.model.get(\'last_seen\')">{{apSwitchPropertiesCtrl.model.get(\'last_seen\') * 1000 | moment: \'fromNow\'}}</span><span ng-if="!apSwitchPropertiesCtrl.model.get(\'last_seen\')" translate="DEVICE_PROPERTIES_VALUES_LAST_SEEN_NEVER"></span></dd></div></div></div></accordion-group><accordion-group ng-if="apSwitchPropertiesCtrl.uplinkAttrs.type" is-open="apSwitchPropertiesCtrl.accordions.details.uplink" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_UPLINK\' | translate}}<span ng-if="apSwitchPropertiesCtrl.uplinkAttrs.type === \'wire\'">&nbsp;({{\'DEVICE_PROPERTIES_SECTION_DETAILS_UPLINK_TYPE_WIRED\' | translate}})</span><span ng-if="apSwitchPropertiesCtrl.uplinkAttrs.type === \'wireless\'">&nbsp;({{\'DEVICE_PROPERTIES_SECTION_DETAILS_UPLINK_TYPE_WIRELESS\' | translate}})</span></accordion-heading><div ng-if="apSwitchPropertiesCtrl.accordions.details.uplink"><div ng-if="apSwitchPropertiesCtrl.uplinkAttrs.type === \'wire\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div ng-if="apSwitchPropertiesCtrl.uplinkName" class="appDescriptionListRow uplinkName"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPLINK\' | translate}}</dt><dd><a unifi-open-panel="apSwitchPropertiesCtrl.uplink" unifi-open-panel-active-tab="apSwitchPropertiesCtrl.uplinkAttrs.uplink_remote_port ? \'ports\' : \'details\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="[{ state: \'port\', value: apSwitchPropertiesCtrl.uplinkAttrs.uplink_remote_port, overwrite: true }]">{{apSwitchPropertiesCtrl.uplinkName}}</a></dd></div><div class="appDescriptionListRow uplinkSpeed"><dt>{{\'DEVICE_PROPERTIES_LABEL_SPEED\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.uplinkAttrs.speed || (\'DEVICE_PROPERTIES_VALUES_SPEED_UNKNOWN\' | translate)}}</dd></div><div class="appDescriptionListRow uplinkDuplex"><dt>{{\'DEVICE_PROPERTIES_LABEL_DUPLEX\' | translate}}</dt><dd>{{(apSwitchPropertiesCtrl.uplinkAttrs.full_duplex ? \'DEVICE_PROPERTIES_VALUES_DUPLEX_FULL\' : \'DEVICE_PROPERTIES_VALUES_DUPLEX_HALF\') | translate}}</dd></div></div><div ng-if="apSwitchPropertiesCtrl.uplinkAttrs.type === \'wireless\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow uplinkAp"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPLINK_AP\' | translate}}</dt><dd><a unifi-open-panel="apSwitchPropertiesCtrl.uplink" unifi-open-panel-active-tab="\'details\'">{{apSwitchPropertiesCtrl.uplinkName}}</a></dd></div></div><div ng-if="apSwitchPropertiesCtrl.uplinkAttrs.type === \'wireless\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow uplinkRssi"><dt>{{\'DEVICE_PROPERTIES_LABEL_SIGNAL\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.uplinkAttrs.rssi | rssi}} ({{apSwitchPropertiesCtrl.uplinkAttrs.rssi | rssiToDbm}})</dd></div><div class="appDescriptionListRow uplinkTxRate"><dt>{{\'DEVICE_PROPERTIES_LABEL_TX_RATE\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.uplinkAttrs.tx_rate | rxtx}}</dd></div><div class="appDescriptionListRow uplinkRxRate"><dt>{{\'DEVICE_PROPERTIES_LABEL_RX_RATE\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.uplinkAttrs.rx_rate | rxtx}}</dd></div></div><div class="appDescriptionList appDescriptionList--inline"><div class="appDescriptionListRow uplinkDownPktsBytes"><dt>{{\'DEVICE_PROPERTIES_LABEL_DOWN_PKTS_BYTES\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.uplinkAttrs.rx_packets && apSwitchPropertiesCtrl.uplinkAttrs.rx_bytes ? (apSwitchPropertiesCtrl.uplinkAttrs.rx_packets | numberToString) + \' / \' + (apSwitchPropertiesCtrl.uplinkAttrs.rx_bytes | bytes) : \'0.00 / 0.00\'}}</dd></div><div class="appDescriptionListRow uplinkUpPktsBytes"><dt>{{\'DEVICE_PROPERTIES_LABEL_UP_PKTS_BYTES\' | translate}}</dt><dd>{{apSwitchPropertiesCtrl.uplinkAttrs.tx_packets && apSwitchPropertiesCtrl.uplinkAttrs.tx_bytes ? (apSwitchPropertiesCtrl.uplinkAttrs.tx_packets | numberToString) + \' / \' + (apSwitchPropertiesCtrl.uplinkAttrs.tx_bytes | bytes) : \'0.00 / 0.00\'}}</dd></div><div class="appDescriptionListRow uplinkActivity"><dt>{{\'DEVICE_PROPERTIES_LABEL_ACTIVITY\' | translate}}</dt><dd>{{(apSwitchPropertiesCtrl.uplinkAttrs[\'rx_bytes-r\'] || 0) + (apSwitchPropertiesCtrl.uplinkAttrs[\'tx_bytes-r\'] || 0) | bps}}</dd></div></div></div></accordion-group><accordion-group ng-if="apSwitchPropertiesCtrl.model.get(\'downlink_table\').length" is-open="apSwitchPropertiesCtrl.accordions.details.downlinks" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_DOWNLINKS\' | translate}}</accordion-heading><unifi-ap-properties-downlink-list ng-if="apSwitchPropertiesCtrl.accordions.details.downlinks" unifi-ap-properties-downlink-list-local-state="true" unifi-ap-properties-downlink-list-local-state-key="::apSwitchPropertiesCtrl.model.get(\'mac\') + \'|downlinks\'" unifi-ap-properties-downlink-list-uplink="::apSwitchPropertiesCtrl.model" unifi-ap-properties-downlink-list-downlinks="apSwitchPropertiesCtrl.model.get(\'downlink_table\')"></unifi-ap-properties-downlink-list></accordion-group><accordion-group ng-if="apSwitchPropertiesCtrl.deviceRadioUtils.hasRadioType(apSwitchPropertiesCtrl.model, \'ng\') &amp;&amp; apSwitchPropertiesCtrl.showRadioAccordion" is-open="apSwitchPropertiesCtrl.accordions.details.radioNg" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_RADIO_NG\' | translate}}</accordion-heading><unifi-ap-properties-details-radio ng-if="apSwitchPropertiesCtrl.accordions.details.radioNg" unifi-ap-properties-details-radio-model="::apSwitchPropertiesCtrl.model" unifi-ap-properties-details-radio-type="ng"></unifi-ap-properties-details-radio></accordion-group><accordion-group ng-if="apSwitchPropertiesCtrl.deviceRadioUtils.hasRadioType(apSwitchPropertiesCtrl.model, \'na\') &amp;&amp; apSwitchPropertiesCtrl.showRadioAccordion" is-open="apSwitchPropertiesCtrl.accordions.details.radioNa" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_RADIO_NA\' + (apSwitchPropertiesCtrl.deviceRadioUtils.isAcModel(apSwitchPropertiesCtrl.model) ? \'_AC\' : \'\') | translate}}</accordion-heading><unifi-ap-properties-details-radio ng-if="apSwitchPropertiesCtrl.accordions.details.radioNa" unifi-ap-properties-details-radio-model="::apSwitchPropertiesCtrl.model" unifi-ap-properties-details-radio-type="na"></unifi-ap-properties-details-radio></accordion-group><accordion-group ng-if="apSwitchPropertiesCtrl.showRfEnvironmentAccordion" is-open="apSwitchPropertiesCtrl.accordions.details.rfEnvironment" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_RF_ENVIRONMENT\' | translate}}</accordion-heading><unifi-ap-properties-rf-environment unifi-ap-properties-rf-environment-model="::apSwitchPropertiesCtrl.model"></unifi-ap-properties-rf-environment></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],319:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiApSwitchPropertiesDetails",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiApSwitchProperties",template:a("./apSwitchPropertiesDetails.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"details")}}}])},{"./apSwitchPropertiesDetails.jade":318}],320:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h){this._=a,this.$q=b,this.$timeout=c,this.HeatmapOverlay=d,this.atlasCoverageCalculator=e,this.devices=f,this.mapFeatures=g,this.mapUtils=h,this._googleMapDeferred=b.defer(),this._heatmapOverlay=null,this._heatmapEnabled=!1,this._radioType=void 0,this._receiverSensitivity=void 0,this.dataSetMax=10,this.dataSetMin=0,this.markerHeatmapCount=9,this.heatmapOptions={radius:200,maxOpacity:.7,useLocalExtrema:!0,latField:"lat",lngField:"lng",gradient:{0:"rgba(000,000,255,0)",.2:"rgba(000,000,255,1)",.4:"rgba(000,255,255,1)",.6:"rgba(000,255,000,1)",.8:"rgba(255,255,000,1)",1:"rgba(255,000,000,1)"}},this.mapEvents=["change:zoom","change:lng","change:lat","change:upp","change:unit"].join(" "),this.devicesCollectionEvents=["add","remove","change:map_id","change:x","change:y","change:ng-tx_power","change:ng-gain","change:ng-eirp","change:na-tx_power","change:na-gain","change:na-eirp"].join(" "),this._debouncedRenderHeatmap=a.debounce(function(){this._renderHeatmap()}.bind(this),100)}d.prototype.setGoogleMap=function(a){this._googleMapDeferred.resolve(a)},d.prototype.getGoogleMap=function(){return this._googleMapDeferred.promise},d.prototype.enableCoverage=function(){this._heatmapEnabled=!0,this._debouncedRenderHeatmap()},d.prototype.disableCoverage=function(){this._heatmapEnabled=!1,this._debouncedRenderHeatmap()},d.prototype.isCoverageEnabled=function(){return this._heatmapEnabled},d.prototype.changeRadioType=function(a){this._radioType=a,this._debouncedRenderHeatmap()},d.prototype.changeReceiverSensitivity=function(a){this._receiverSensitivity=a,this._debouncedRenderHeatmap()},d.prototype.getRadioType=function(){return this._radioType},d.prototype.getReceiverSensitivity=function(){return this._receiverSensitivity},d.prototype._renderHeatmap=function(){var a=[this.HeatmapOverlay,this.getGoogleMap(),this.mapUtils.getCoordinatesAssistantForSelectedMap()];this.$q.all(a).then(function(a){var b=a[0],c=a[1],d=a[2];if(this._removeHeatmap(),this._heatmapEnabled){var e=this.mapUtils.getPlacedDevicesForSelectedMap().filter(this.mapFeatures.filterDevice),f=this._calculateHeatmapData(c,e,d),g=f.length>0;g&&(this._heatmapOverlay=new b(c,this.heatmapOptions)),this.$timeout(function(){g?this._heatmapOverlay.setData({max:this.dataSetMax,min:this.dataSetMin,data:f}):this._heatmapOverlay&&this._heatmapOverlay.heatmap&&this._heatmapOverlay.heatmap.setData({data:[]})}.bind(this),0)}}.bind(this))},d.prototype._removeHeatmap=function(){null!==this._heatmapOverlay&&(this._heatmapOverlay.onRemove(),this._heatmapOverlay=null)},d.prototype._calculateHeatmapData=function(a,b,c){var d=[];return b.forEach(function(b){var e=this.atlasCoverageCalculator.calculateRadius(b,a,this._radioType,this._receiverSensitivity);if(e>=0){var f=c.coordsToLatLng(b.getCoords());d.push({lat:f.lat(),lng:f.lng(),value:this.markerHeatmapCount,radius:e})}}.bind(this)),d},d.prototype.registerListeners=function(){this.devices.repository.collection.on(this.devicesCollectionEvents,this._debouncedRenderHeatmap);var a=this.mapUtils.getSelectedMap();a&&a.on(this.mapEvents,this._debouncedRenderHeatmap)},d.prototype.unregisterListeners=function(){this.devices.repository.collection.off(this.devicesCollectionEvents,this._debouncedRenderHeatmap);var a=this.mapUtils.getSelectedMap();a&&a.off(this.mapEvents,this._debouncedRenderHeatmap)},d.$inject=["_","$q","$timeout","HeatmapOverlay","atlasCoverageCalculator","devices","mapFeatures","mapUtils"],angular.module("app-unifi-manage").controller("AtlasCoverageController",d)},{}],321:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiAtlasCoverage",[function(){return{restrict:"A",require:["^atlasMap","unifiAtlasCoverage"],controller:"AtlasCoverageController",scope:{enabled:"=unifiAtlasCoverageEnabled",radioType:"=unifiAtlasCoverageRadioType",receiverSensitivity:"=unifiAtlasCoverageReceiverSensitivity"},link:function(a,b,c,d){var e=d[0],f=d[1];e.getMap().then(function(a){f.setGoogleMap(a)}),f.registerListeners(),a.$watch("enabled",function(a){a?f.enableCoverage():f.disableCoverage()}),a.$watch("radioType",function(a){f.changeRadioType(a)}),a.$watch("receiverSensitivity",function(a){f.changeReceiverSensitivity(a)}),a.$on("$destroy",f.unregisterListeners.bind(f))}}}])},{}],322:[function(a,b,c){"use strict";angular.module("atlas").directive("atlasMarkerMousedown",["$window",function(a){return{require:"atlasMarker",link:function(b,c,d,e){e.addEvent("mousedown",d.atlasMarkerMousedown).then(function(c){b.$on("$destroy",function(){a.google.maps.event.removeListener(c)})})}}}])},{}],323:[function(a,b,c){"use strict";angular.module("atlas").directive("atlasMarkerMouseup",["$window",function(a){return{require:"atlasMarker",link:function(b,c,d,e){e.addEvent("mouseup",d.atlasMarkerMouseup).then(function(c){b.$on("$destroy",function(){a.google.maps.event.removeListener(c)})})}}}])},{}],324:[function(a,b,c){"use strict";function d(){this.showHints=!1,this.selectedIndex=-1}d.prototype.openList=function(){this.showHints=!0,this.selectedIndex=-1},d.prototype.closeList=function(){this.showHints=!1,this.selectedIndex=-1},d.prototype.toggleList=function(){this.showHints=!this.showHints},d.prototype.listVisible=function(){return this.showHints&&this.filteredHints.length>0},d.prototype.getFilter=function(){var a={};return a[this.nameProperty]=this.search,a},d.prototype.select=function(a){this.search=a[this.nameProperty],this.onSelect&&(this.onSelect(a),this.search=""),this.closeList()},d.prototype.onKeyDown=function(a){var b={up:38,right:39,down:40,enter:13,esc:27,tab:9};if(this.showHints)switch(a.keyCode){case b.up:this.selectedIndex===-1?this.selectedIndex=this.filteredHints.length-1:this.selectedIndex=(this.filteredHints.length+this.selectedIndex-1)%this.filteredHints.length;break;case b.down:this.selectedIndex=(this.filteredHints.length+this.selectedIndex+1)%this.filteredHints.length;break;case b.right:case b.tab:this.selectedIndex!==-1&&this.select(this.filteredHints[this.selectedIndex]);break;case b.enter:this.selectedIndex!==-1?this.select(this.filteredHints[this.selectedIndex]):this.hints.indexOf(this.search)!==-1&&this.select(this.search),a.preventDefault();break;case b.esc:this.closeList(),a.preventDefault()}},d.$inject=[],angular.module("app-unifi-manage").controller("AutocompleteController",d)},{}],325:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div on-outside-element-click="autocompleteCtrl.closeList()" class="unifiAutocomplete"><div class="unifiAutocomplete__dropdown"><div class="appIconInput appIconInput--right appIconInput--comfy input--full"><div ng-click="autocompleteCtrl.toggleList()" class="appIconInput__icon icon ubnt-icon--pointer-down"></div><input type="text" ng-model="autocompleteCtrl.search" ng-keydown="autocompleteCtrl.onKeyDown($event)" ng-change="autocompleteCtrl.openList()" placeholder="{{autocompleteCtrl.placeholder}}" class="appIconInput__input input--full"></div><ul ng-class="{\'is-dropdown-visible\': autocompleteCtrl.listVisible()}" class="appDropdown"><li ng-mouseenter="autocompleteCtrl.setIndex($index);" ng-repeat="suggestion in (autocompleteCtrl.filteredHints = (autocompleteCtrl.hints | filter: autocompleteCtrl.getFilter() | orderBy:autocompleteCtrl.nameProperty)) track by $index" ng-class="{ \'unifiAutocompleteItem--selected\': ($index === autocompleteCtrl.selectedIndex) }" ng-click="autocompleteCtrl.select(suggestion)" class="appDropdown__item">{{suggestion[autocompleteCtrl.nameProperty]}}</li></ul></div></div>'),b.join("")}},{"jade/runtime":232}],326:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiAutocomplete",[function(){return{restrict:"E",scope:{search:"=?ngModel",hints:"=unifiAutocompleteHints",onSelect:"=unifiAutocompleteOnSelect",placeholder:"@unifiAutocompletePlaceholder",nameProperty:"=unifiAutocompleteHintNameProperty"},bindToController:!0,controller:"AutocompleteController",controllerAs:"autocompleteCtrl",template:a("./autocomplete.jade")()}}])},{"./autocomplete.jade":325}],327:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiBatchDeviceIcon"><div unifi-device-icon class="unifiDeviceIcon--uap"></div><div class="count count--round appCount"><div class="count__value">{{getDeviceCount() || 0}}</div></div></div>'),b.join("")}},{"jade/runtime":232}],328:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiBatchDeviceIcon",[function(){return{scope:{batchModel:"=unifiBatchDeviceIcon"},replace:!0,template:a("./batchDeviceIcon.jade")(),link:function(a){a.getDeviceCount=function(){return a.batchModel?(a.batchModel.get("collection")||{}).length:void 0}}}}])},{"./batchDeviceIcon.jade":327}],329:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appCompoundInput"><input type="number" ng-model="model.value" ng-disabled="disabled" ng-required="required" min="1" max="999999"><select ng-model="model.prefix" ng-options="key as key + suffix for key in prefixes | filter:keyAllowed(key)" ng-disabled="disabled" ng-required="required"></select></div>'),b.join("")}},{"jade/runtime":232}],330:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiBinaryInput",["binaryPrefix",function(b){return{template:a("./binaryInput.jade")(),replace:!0,scope:{suffix:"=?unifiBinaryInputSuffix",basePrefix:"=?unifiBinaryInputBasePrefix",standard:"=?unifiBinaryInputStandard",disabled:"=?ngDisabled",required:"=?ngRequired"},require:"ngModel",link:function(a,c,d,e){var f=a.standard||"IEC";a.model={value:0,prefix:a.basePrefix||""},a.prefixes=Object.keys(b.getPrefixes(f)),e.$formatters.push(function(c){if(void 0===c)return{value:void 0,prefix:a.basePrefix||""};if(void 0!==a.basePrefix){var d=c*b.getPrefixes(f)[a.basePrefix];return 0===d?{value:0,prefix:a.basePrefix}:b.getBestMatch(d,f)}return b.getBestMatch(c,f)}),e.$render=function(){a.model=e.$viewValue},a.$watch("model",function(){e.$setViewValue(angular.copy(a.model))},!0),e.$parsers.push(function(c){var d=c.value*b.getPrefixes(f)[c.prefix];return a.basePrefix&&(d/=b.getPrefixes(f)[a.basePrefix]),Math.round(d)}),a.keyAllowed=function(){return function(c){return void 0===a.basePrefix||b.getPrefixes(f)[c]>=b.getPrefixes(f)[a.basePrefix]}}}}}])},{"./binaryInput.jade":329}],331:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){this.$cookies=a,this.$q=b,this.$translate=c,this.account=d,this.system=e,this.CHAT_LEVELS=g,this.CHAT_DEPARTMENTS=f}d.prototype.resolve=function(){return this.$q.all([this.account.repository.fetch(),this.system.repository.register().fetch()])},d.prototype.destroy=function(){this.system.repository.unregister()},d.prototype.addEventHandlers=function(){this.system.repository.model.on("change:live_chat",this.onModelChange,this),this.account.repository.model.on("change:is_super",this.onModelChange,this),this.onModelChange()},d.prototype.removeEventHandlers=function(){this.system.repository.model.off("change:live_chat",this.onModelChange,this),this.account.repository.model.off("change:is_super",this.onModelChange,this)},d.prototype.onModelChange=function(){var a=this.system.getLiveChatLevel();if(this.isChatAvailable=(a===this.CHAT_LEVELS.SUPER_ONLY||void 0===a)&&this.account.isSuperAdmin()||a===this.CHAT_LEVELS.EVERYONE,this.system.isDemoMode()){this.zopimConfig={department:this.CHAT_DEPARTMENTS.PRE_SALES,greetings:this.$translate.instant("ZOPIM_PRE_SALES_GREETINGS")
};var b=this.$cookies.get("lastVisited");b||(this.zopimConfig.initializeOnStart=5e3,this.$cookies.put("lastVisited",(new Date).toJSON()))}else this.system.isUnifiGo()?this.zopimConfig={department:this.CHAT_DEPARTMENTS.UNIFI_CONTROLLER,tags:["chat_elite"]}:this.zopimConfig={department:this.CHAT_DEPARTMENTS.UNIFI_CONTROLLER}},d.$inject=["$cookies","$q","$translate","account","system","CHAT_DEPARTMENTS","CHAT_LEVELS"],angular.module("app-unifi-manage").controller("ChatSideNavController",d)},{}],332:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<zopim-side-nav ng-if="chatSideNavCtrl.isChatAvailable" zopim-side-nav-label="\'COMMON_NAV_ZOPIM\' | translate" zopim-side-nav-config="chatSideNavCtrl.zopimConfig" zopim-side-nav-unifi-style="true"></zopim-side-nav>'),b.join("")}},{"jade/runtime":232}],333:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiChatSideNav",["eventHandlersDirectiveMixin",function(b){return{controller:"ChatSideNavController",controllerAs:"chatSideNavCtrl",template:a("./chatSideNav.jade")(),link:function(a,c,d,e){e.resolve().then(function(){b.init(a,c,d,e)}),a.$on("$destroy",function(){e.destroy()})}}}])},{"./chatSideNav.jade":332}],334:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="statusBar appStatusBar appStatusBar--small appStatusBar--high"><div ng-style="{\'width\': percentage + \'%\'}" class="statusBar__inner"></div></div>'),b.join("")}},{"jade/runtime":232}],335:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientActivityStatus",[function(){return{scope:{activity:"=unifiClientActivityStatus"},replace:!0,restrict:"A",template:a("./clientActivityStatus.jade")(),link:function(a){a.setStatusLevel=function(b){var c=0;angular.forEach(b,function(a,b){this.activity>=a&&(c=b)},a),a.percentage=Math.ceil(c*(100/(b.length-1)))},a.$watch("activity",function(){a.setStatusLevel([0,500,8e3,64e3,512e3,2048e3])})}}}])},{"./clientActivityStatus.jade":334}],336:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.$translate=a,this.clientUtils=b,this.clientStateUtils=c,this.heyToasts=d,e.call(this,f),this.isAuthorized=!1}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.isApplicable=!!(this.model&&this.clientStateUtils.isClientAuthorizable(this.model)&&this.clientStateUtils.isClientConnected(this.model)),this.isAuthorized=!!(this.model&&this.isApplicable&&this.model.get("authorized"))},d.prototype.toggle=function(a){return a.preventDefault(),a.stopPropagation(),this.isPending=!0,this.clientUtils[this.isAuthorized?"unauthorizeGuest":"authorizeGuest"](this.model).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isPending=!1}.bind(this))},d.$inject=["$translate","clientUtils","clientStateUtils","heyToasts","account"],angular.module("app-unifi-manage").controller("ClientButtonAuthorizeController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],337:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-show=\"clientButtonAuthorizeCtrl.showButton()\" ng-click=\"clientButtonAuthorizeCtrl.toggle($event, model)\" ng-class=\"{'is-responsive': isResponsive}\" title=\"{{clientButtonAuthorizeCtrl.isAuthorized ? 'CLIENT_ACTIONS_UNAUTHORIZE' : 'CLIENT_ACTIONS_AUTHORIZE' | translate}}\"><span ng-class=\"{      'ubnt-icon--plus-circle': !clientButtonAuthorizeCtrl.isAuthorized,      'ubnt-icon--minus-circle': clientButtonAuthorizeCtrl.isAuthorized,      'ubnt-icon--clock-2': clientButtonAuthorizeCtrl.isPending    }\" class=\"button__icon icon\"></span><span ng-if=\"::isLabeled\" translate class=\"button__label\">{{clientButtonAuthorizeCtrl.isAuthorized ? 'CLIENT_ACTIONS_UNAUTHORIZE' : 'CLIENT_ACTIONS_AUTHORIZE'}}</span></div>"),b.join("")}},{"jade/runtime":232}],338:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientButtonAuthorize",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiClientButtonAuthorize",isLabeled:"=unifiClientButtonAuthorizeIsLabeled",isResponsive:"=unifiClientButtonAuthorizeIsResponsive"},controller:"ClientButtonAuthorizeController",controllerAs:"clientButtonAuthorizeCtrl",replace:!0,template:a("./clientButtonAuthorize.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./clientButtonAuthorize.jade":337}],339:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j){this.$translate=a,this.$q=b,this.clientUtils=c,this.devices=d,this.deviceUtils=f,this.frame=g,this.heyToasts=h,this.preferences=j,e.call(this,i),this.isBlocked=!1,this.isApplicable=!0}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.isBlocked=!(!this.model||!this.model.get("blocked"))},d.prototype.toggle=function(a){a.preventDefault(),a.stopPropagation();var b,c=this.model.get("ip")&&this.model.get("ip")===this.deviceUtils.getInformIp(this.devices.repository.collection),d=c||this.preferences.model.get("bypassConfirmBlock")!==!0;return b=d&&!this.isBlocked?this.frame.show("confirm",{title:function(){return this.$translate.instant(c?"CLIENT_ACTIONS_BLOCK_CONTROLLER_CONFIRM_TITLE":"CLIENT_ACTIONS_BLOCK_CONFIRM_TITLE",{clientName:this.model.getDisplayName()})}.bind(this),message:function(){return this.$translate.instant(c?"CLIENT_ACTIONS_BLOCK_CONTROLLER_CONFIRM_MESSAGE":"CLIENT_ACTIONS_BLOCK_CONFIRM_MESSAGE",{clientName:this.model.getDisplayName()})}.bind(this),options:function(){return{bypassFlag:c?void 0:"bypassConfirmBlock"}}}):this.$q.when(),b.then(function(){return this.isPending=!0,this.clientUtils[this.isBlocked?"unblockClient":"blockClient"](this.model).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isPending=!1}.bind(this))}.bind(this))},d.$inject=["$translate","$q","clientUtils","devices","deviceUtils","frame","heyToasts","account","preferences"],angular.module("app-unifi-manage").controller("ClientButtonBlockController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],340:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-show=\"clientButtonBlockCtrl.showButton()\" ng-click=\"clientButtonBlockCtrl.toggle($event)\" ng-class=\"{'is-responsive': isResponsive}\" title=\"{{clientButtonBlockCtrl.isBlocked ? 'CLIENT_ACTIONS_UNBLOCK' : 'CLIENT_ACTIONS_BLOCK' | translate}}\"><span ng-class=\"{      'ubnt-icon--block': !clientButtonBlockCtrl.isBlocked,      'ubnt-icon--check-circle2': clientButtonBlockCtrl.isBlocked,      'ubnt-icon--clock-2': clientButtonBlockCtrl.isPending    }\" class=\"button__icon icon\"></span><span ng-if=\"::isLabeled\" translate class=\"button__label\">{{clientButtonBlockCtrl.isBlocked ? 'CLIENT_ACTIONS_UNBLOCK' : 'CLIENT_ACTIONS_BLOCK'}}</span></div>"),b.join("")}},{"jade/runtime":232}],341:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientButtonBlock",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiClientButtonBlock",isLabeled:"=unifiClientButtonBlockIsLabeled",isResponsive:"=unifiClientButtonBlockIsResponsive"},controller:"ClientButtonBlockController",controllerAs:"clientButtonBlockCtrl",replace:!0,template:a("./clientButtonBlock.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./clientButtonBlock.jade":340}],342:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.$translate=a,this.clientUtils=b,this.clientStateUtils=c,this.heyToasts=d,e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.isApplicable=!(!this.model||this.model.get("is_wired")||this.model.get("blocked")||!this.clientStateUtils.isClientConnected(this.model))},d.prototype.reconnect=function(a){return a.preventDefault(),a.stopPropagation(),this.isPending=!0,this.clientUtils.reconnectClient(this.model).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isPending=!1}.bind(this))},d.$inject=["$translate","clientUtils","clientStateUtils","heyToasts","account"],angular.module("app-unifi-manage").controller("ClientButtonReconnectController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],343:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="clientButtonReconnectCtrl.showButton()" ng-click="clientButtonReconnectCtrl.reconnect($event)" ng-class="{\'is-responsive\': isResponsive}" title="{{\'CLIENT_ACTIONS_RECONNECT\' | translate}}"><span ng-class="clientButtonReconnectCtrl.isPending &amp;&amp; isLabeled ? \'ubnt-icon--clock-2\' : \'ubnt-icon--refresh-2\'" class="button__icon icon"></span><span ng-if="::isLabeled" translate="CLIENT_ACTIONS_RECONNECT" class="button__label"></span></div>'),b.join("")}},{"jade/runtime":232}],344:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientButtonReconnect",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiClientButtonReconnect",isLabeled:"=unifiClientButtonReconnectIsLabeled",isResponsive:"=unifiClientButtonReconnectIsResponsive"},controller:"ClientButtonReconnectController",controllerAs:"clientButtonReconnectCtrl",replace:!0,template:a("./clientButtonReconnect.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./clientButtonReconnect.jade":343}],345:[function(a,b,c){"use strict";function d(a){this.clientUtils=a,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.className=this.clientUtils.getIconClassName(this.model)},d.prototype.getClassName=function(){return this.className},d.$inject=["clientUtils"],angular.module("app-unifi-manage").controller("ClientIconController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],346:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<span class="unifiClientIcon {{clientIconCtrl.getClassName()}}"></span>'),b.join("")}},{"jade/runtime":232}],347:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientIcon",[function(){return{scope:{client:"=unifiClientIcon"},controller:"ClientIconController",controllerAs:"clientIconCtrl",replace:!0,restrict:"A",template:a("./clientIcon.jade")(),link:function(a,b,c,d){a.$watch("client",function(a){d.updateModel(a)}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./clientIcon.jade":346}],348:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.clients=b,this.devices=c,this.networks=d,this.userGroups=f,this.comparator=i,this.columnStore=j,this.filter=new h,this.defaultSortBy="state",this.collapsibleColumnKeyActions="collapse:client:actions",this.getUplink=g.getUplink.bind(g),this.getUplinkDisplayName=g.getUplinkDisplayName.bind(g),this.getUplinkPropertyPanelState=g.getUplinkPropertyPanelState.bind(g),this.isColumnVisible=this.columnStore.isColumnVisible.bind(this.columnStore),this.listeners={},e.call(this,a,k,l),m(this)}var e=a("../../controllers/BaseClientListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initView=function(){e.prototype.initView.call(this),this.listeners.clients=this.clients.repository.collection.onUpdate(this.setFilterCounts.bind(this)),this.listeners.devices=this.devices.repository.collection.onUpdate(this.setApFilterCollection.bind(this)),this.setFilterCounts(),this.setViewFilterCounts(),this.setApFilterCollection()},d.prototype.destroyView=function(){e.prototype.destroyView.call(this),Object.keys(this.listeners).forEach(function(a){this.listeners[a].stopListening()}.bind(this))},d.prototype.initFilters=function(){e.prototype.initFilters.call(this);var a=this.listState.getFilter("radio");this.filter.setRadioTypeFilter(a&&"all"!==a?a:void 0),this.getRadioTypeFilter=this.filter.getRadioTypeFilter.bind(this.filter),this.hasRadioTypeFilter=this.filter.hasRadioTypeFilter.bind(this.filter),this.initFilterView(),this.refreshColumns()},d.prototype.initFilterView=function(){this.filterViewGroups=[],this.filterViewGroups.push({id:"clientWired",translationKey:"CLIENT_FILTER_TITLE_WIRED",items:[{id:"all",translationKey:"CLIENT_WIRED_FILTER_ALL",excludeFromSummary:!0,getCount:function(){return this.counts.sum.all}.bind(this),isSelected:function(){return!this.hasWiredFilter()}.bind(this),onSelect:function(){return this.clearWiredFilter()}.bind(this)},{id:"wireless",translationKey:"CLIENT_WIRED_FILTER_FALSE",getCount:function(){return this.counts.wireless.sum.all}.bind(this),isSelected:function(){return this.getWiredFilter()===!1}.bind(this),onSelect:function(){return this.setWiredFilter(!1)}.bind(this)},{id:"wired",translationKey:"CLIENT_WIRED_FILTER_TRUE",getCount:function(){return this.counts.wired.all}.bind(this),isSelected:function(){return this.getWiredFilter()===!0}.bind(this),onSelect:function(){return this.setWiredFilter(!0)}.bind(this)}]}),this.filterViewGroups.push({id:"clientRadio",translationKey:"CLIENT_FILTER_TITLE_RADIO",isVisible:function(){return this.getWiredFilter()===!1}.bind(this),items:[{id:"all",translationKey:"CLIENT_RADIO_TYPE_FILTER_ALL",excludeFromSummary:!0,getCount:function(){return this.counts.wireless.sum.all}.bind(this),isSelected:function(){return!this.hasRadioTypeFilter()}.bind(this),onSelect:function(){return this.clearRadioTypeFilter()}.bind(this)},{id:"ng",translationKey:"CLIENT_RADIO_TYPE_FILTER_NG",getCount:function(){return this.counts.wireless.ng.all}.bind(this),isSelected:function(){return"ng"===this.getRadioTypeFilter()}.bind(this),onSelect:function(){return this.setRadioTypeFilter("ng")}.bind(this)},{id:"na",translationKey:"CLIENT_RADIO_TYPE_FILTER_NA",getCount:function(){return this.counts.wireless.na.all}.bind(this),isSelected:function(){return"na"===this.getRadioTypeFilter()}.bind(this),onSelect:function(){return this.setRadioTypeFilter("na")}.bind(this)}]}),this.filterViewGroups.push({id:"clientGuest",translationKey:"CLIENT_FILTER_TITLE_GUEST",items:[{id:"all",translationKey:"CLIENT_GUEST_FILTER_ALL",excludeFromSummary:!0,getCount:function(){return this.viewCounts.clients.all}.bind(this),isSelected:function(){return!this.hasGuestFilter()}.bind(this),onSelect:function(){return this.clearGuestFilter()}.bind(this)},{id:"user",translationKey:"CLIENT_GUEST_FILTER_FALSE",getCount:function(){return this.viewCounts.clients.users}.bind(this),isSelected:function(){return this.getGuestFilter()===!1}.bind(this),onSelect:function(){return this.setGuestFilter(!1)}.bind(this)},{id:"guest",translationKey:"CLIENT_GUEST_FILTER_TRUE",getCount:function(){return this.viewCounts.clients.guests}.bind(this),isSelected:function(){return this.getGuestFilter()===!0}.bind(this),onSelect:function(){return this.setGuestFilter(!0)}.bind(this)}]})},d.prototype.setFilterCounts=function(){this.counts={wired:{users:0,guests:0},wireless:{ng:{users:0,guests:0},na:{users:0,guests:0},unknown:{users:0,guests:0}}},this.clients.repository.collection.each(function(a){var b;a.get("is_wired")?a.get("is_guest")?this.counts.wired.guests++:this.counts.wired.users++:(b=a.get("radio")||"unknown",a.get("is_guest")?this.counts.wireless[b].guests++:this.counts.wireless[b].users++)}.bind(this)),this.counts.wireless.ng.all=this.counts.wireless.ng.users+this.counts.wireless.ng.guests,this.counts.wireless.na.all=this.counts.wireless.na.users+this.counts.wireless.na.guests,this.counts.wireless.unknown.all=this.counts.wireless.unknown.users+this.counts.wireless.unknown.guests,this.counts.wireless.sum={},this.counts.wireless.sum.users=["ng","na","unknown"].reduce(function(a,b){return a+this.counts.wireless[b].users}.bind(this),0),this.counts.wireless.sum.guests=["ng","na","unknown"].reduce(function(a,b){return a+this.counts.wireless[b].guests}.bind(this),0),this.counts.wireless.sum.all=this.counts.wireless.sum.users+this.counts.wireless.sum.guests,this.counts.wired.all=this.counts.wired.users+this.counts.wired.guests,this.counts.sum={},this.counts.sum.users=this.counts.wired.users+this.counts.wireless.sum.users,this.counts.sum.guests=this.counts.wired.guests+this.counts.wireless.sum.guests,this.counts.sum.all=this.counts.sum.users+this.counts.sum.guests},d.prototype.setViewFilterCounts=function(){this.viewCounts={clients:{},networks:{}},this.hasWiredFilter()?this.getWiredFilter()?this.viewCounts.clients=this.counts.wired:this.hasRadioTypeFilter()?this.viewCounts.clients=this.counts.wireless[this.getRadioTypeFilter()]:this.viewCounts.clients=this.counts.wireless.sum:this.viewCounts.clients=this.counts.sum,this.getWiredFilter()===!0&&angular.forEach(this.view.getModels(),function(a){a.get("network_id")&&(this.viewCounts.networks[a.get("network_id")]=(this.viewCounts.networks[a.get("network_id")]||0)+1)}.bind(this))},d.prototype.setWiredFilter=function(a){this.beginStateChange(),e.prototype.setWiredFilter.call(this,a),this.clearRadioTypeFilter(),this.clearApFilter(),this.clearNetworkFilter(),this.commitStateChange()},d.prototype.clearWiredFilter=function(){this.beginStateChange(),e.prototype.clearWiredFilter.call(this),this.clearRadioTypeFilter(),this.clearApFilter(),this.clearNetworkFilter(),this.commitStateChange()},d.prototype.setRadioTypeFilter=function(a){this.beginStateChange(),this.listState.addFilter("radio",a),this.filter.setRadioTypeFilter(a),this.commitStateChange()},d.prototype.clearRadioTypeFilter=function(){this.beginStateChange(),this.listState.removeFilter("radio"),this.filter.clearRadioTypeFilter(),this.commitStateChange()},d.prototype.setApFilter=function(a){this.beginStateChange(),this.filter.setMacFilter(a?a.get("mac"):void 0),this.commitStateChange()},d.prototype.clearApFilter=function(){this.beginStateChange(),this.filter.clearMacFilter(),this.commitStateChange()},d.prototype.setNetworkFilter=function(a){this.beginStateChange(),this.filter.setNetworkFilter(a?a.id:void 0),this.commitStateChange()},d.prototype.clearNetworkFilter=function(){this.beginStateChange(),this.filter.clearNetworkFilter(),this.commitStateChange()},d.prototype.setApFilterCollection=function(){this.apFilterCollection=new this.devices.repository.collection.constructor(this.devices.repository.collection.filter(function(a){return"uap"===a.get("type")&&a.get("num_sta")>0}))},d.prototype.getApFilterTitle=function(a){var b="num_sta";return this.hasGuestFilter()&&(b=(this.getGuestFilter()?"guest-":"user-")+b),this.hasRadioTypeFilter()&&(b=this.getRadioTypeFilter()+"-"+b),a.getDisplayName()+" ("+(a.get(b)||0)+")"},d.prototype.getNetworkFilterTitle=function(a){return a.get("name")+" ("+(this.viewCounts.networks[a.id]||0)+")"},d.prototype.getUserGroupName=function(a){if(a.get("usergroup_id")){var b=this.userGroups.repository.collection.get(a.get("usergroup_id"));return b&&b.get("name")}},d.prototype.refreshColumns=function(){this.isStateChanging()||(this.columnStore.setWiredFilter(this.getWiredFilter()),this.columnStore.setGuestFilter(this.getGuestFilter()),this.columnStore.setColumns())},d.prototype.refresh=function(a){return this.refreshColumns(),e.prototype.refresh.call(this,a)},d.prototype.commitStateChange=function(){e.prototype.commitStateChange.call(this).then(function(){this.setViewFilterCounts()}.bind(this))},d.prototype.getCollection=function(){return this.clients.repository.collection},d.$inject=["$injector","clients","devices","networks","userGroups","clientUplinkUtils","ClientFilter","clientsComparator","clientListColumnStore","CollectionView","preferences","listCollapsibleColumnControllerMixin"],angular.module("app-unifi-manage").controller("ClientListController",d)},{"../../controllers/BaseClientListController":996}],349:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters visible--lgUp"><unifi-ui-list-filter-buttons unifi-ui-list-filter-buttons-config="clientListCtrl.filterViewGroups"></unifi-ui-list-filter-buttons><div ng-if="clientListCtrl.getWiredFilter() === false" class="appActionBarFilter"><unifi-collection-button-dropdown unifi-collection-button-dropdown-collection="clientListCtrl.apFilterCollection" unifi-collection-button-dropdown-default-label="{{\'COMMON_LABEL_ALL\' | translate}}" unifi-collection-button-dropdown-label-prefix="{{\'CLIENT_WIRELESS_AP_FILTER_LABEL\' | translate}}" unifi-collection-button-dropdown-label-icon="ubnt-icon--ap2" unifi-collection-button-dropdown-title-function="clientListCtrl.getApFilterTitle(model)" unifi-collection-button-dropdown-on-item-select="clientListCtrl.setApFilter(model)" unifi-collection-button-dropdown-requires-sorting="true"></unifi-collection-button-dropdown></div><div ng-if="clientListCtrl.getWiredFilter() === true" class="appActionBarFilter"><unifi-collection-button-dropdown unifi-collection-button-dropdown-collection="clientListCtrl.networks.repository.collection" unifi-collection-button-dropdown-default-label="{{\'COMMON_LABEL_ALL\' | translate}}" unifi-collection-button-dropdown-label-prefix="{{\'CLIENT_WIRED_NETWORK_FILTER_LABEL\' | translate}}" unifi-collection-button-dropdown-label-icon="ubnt-icon--network" unifi-collection-button-dropdown-title-function="clientListCtrl.getNetworkFilterTitle(model)" unifi-collection-button-dropdown-on-item-select="clientListCtrl.setNetworkFilter(model)" unifi-collection-button-dropdown-requires-sorting="true"></unifi-collection-button-dropdown></div></div><div class="appActionBarFilters visible--mdDown"><unifi-ui-list-filter-dropdown unifi-ui-list-filter-dropdown-config="clientListCtrl.filterViewGroups" unifi-ui-list-filter-dropdown-filter-by-label="{{\'COMMON_LABEL_FILTER_BY\' | translate}}" unifi-ui-list-filter-dropdown-filter-by-all-label="{{\'COMMON_LABEL_FILTER_ALL\' | translate}}"></unifi-ui-list-filter-dropdown><div ng-if="clientListCtrl.getWiredFilter() === false" class="appActionBarFilter"><unifi-collection-button-dropdown unifi-collection-button-dropdown-collection="clientListCtrl.apFilterCollection" unifi-collection-button-dropdown-default-label="{{\'COMMON_LABEL_ALL\' | translate}}" unifi-collection-button-dropdown-label-prefix="{{\'CLIENT_WIRELESS_AP_FILTER_LABEL\' | translate}}" unifi-collection-button-dropdown-label-icon="ubnt-icon--ap2" unifi-collection-button-dropdown-title-function="clientListCtrl.getApFilterTitle(model)" unifi-collection-button-dropdown-on-item-select="clientListCtrl.setApFilter(model)" unifi-collection-button-dropdown-requires-sorting="true"></unifi-collection-button-dropdown></div><div ng-if="clientListCtrl.getWiredFilter() === true" class="appActionBarFilter"><unifi-collection-button-dropdown unifi-collection-button-dropdown-collection="clientListCtrl.networks.repository.collection" unifi-collection-button-dropdown-default-label="{{\'COMMON_LABEL_ALL\' | translate}}" unifi-collection-button-dropdown-label-prefix="{{\'CLIENT_WIRED_NETWORK_FILTER_LABEL\' | translate}}" unifi-collection-button-dropdown-label-icon="ubnt-icon--network" unifi-collection-button-dropdown-title-function="clientListCtrl.getNetworkFilterTitle(model)" unifi-collection-button-dropdown-on-item-select="clientListCtrl.setNetworkFilter(model)" unifi-collection-button-dropdown-requires-sorting="true"></unifi-collection-button-dropdown></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="clientListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="clientListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><table id="clientsTable" collection-view-sort="clientListCtrl.view" ng-class="{          \'is-not-responsive\': clientListCtrl.columnStore.getCustomized() || !clientListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="state" class="alignCenter clientStateIcon visible--smUp"></th><th ng-if="clientListCtrl.isColumnVisible(\'name\')" collection-view-sort-by="name" class="clientName"><span translate="CLIENT_TABLE_HEADER_NAME"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'hostname\')" collection-view-sort-by="hostname" class="clientHostname visible--lgUp"><span translate="CLIENT_TABLE_HEADER_HOSTNAME"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'mac\')" collection-view-sort-by="mac" class="clientMacAddress visible--lgUp"><span translate="CLIENT_TABLE_HEADER_MAC_ADDRESS"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'ip\')" collection-view-sort-by="ip" class="clientIp"><span translate="CLIENT_TABLE_HEADER_IP"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'1x_identity\')" collection-view-sort-by="1x_identity" class="client8021xIdentity"><span translate="CLIENT_TABLE_HEADER_8021X_IDENTITY"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'vlan\')" collection-view-sort-by="vlan" class="client8021xVlan"><span translate="CLIENT_TABLE_HEADER_8021X_VLAN"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'status\')" collection-view-sort-by="status" class="clientStatus"><span translate="CLIENT_TABLE_HEADER_STATUS"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'usergroup_id\')" collection-view-sort-by="usergroup_id" class="clientUserGroup"><span translate="CLIENT_TABLE_HEADER_USER_GROUP"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'connection\')" collection-view-sort-by="connection" class="clientConnection visible--smUp"><span translate="CLIENT_TABLE_HEADER_CONNECTION{{clientListCtrl.hasWiredFilter() ? (clientListCtrl.getWiredFilter() ? \'_WIRED\' : \'_WIRELESS\') : \'\'}}"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'uplink\')" collection-view-sort-by="uplink" class="clientApPort"><span translate="CLIENT_TABLE_HEADER_AP_PORT"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'channel\')" collection-view-sort-by="channel" class="clientChannel visible--lgUp"><span translate="CLIENT_TABLE_HEADER_CHANNEL"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'phy_mode\')" collection-view-sort-by="phy_mode" class="clientPhyMode visible--lgUp"><span translate="CLIENT_TABLE_HEADER_PHY_MODE"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'signal\')" collection-view-sort-by="rssi" class="clientSignal visible--mdUp"><span translate="CLIENT_TABLE_HEADER_SIGNAL"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'tx_rate\')" collection-view-sort-by="tx_rate" class="clientTxRate visible--lgUp"><span translate="CLIENT_TABLE_HEADER_TX_RATE"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'rx_rate\')" collection-view-sort-by="rx_rate" class="clientRxRate visible--lgUp"><span translate="CLIENT_TABLE_HEADER_RX_RATE"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'activity\')" collection-view-sort-by="bytes-r" class="clientActivity visible--mdUp"><span translate="CLIENT_TABLE_HEADER_ACTIVITY"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'down\')" collection-view-sort-by="tx_bytes" class="clientDown visible--mdUp"><span translate="CLIENT_TABLE_HEADER_DOWN"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'up\')" collection-view-sort-by="rx_bytes" class="clientUp visible--mdUp"><span translate="CLIENT_TABLE_HEADER_UP"></span></th><th ng-if="clientListCtrl.isColumnVisible(\'uptime\')" collection-view-sort-by="uptime" class="clientUptime visible--mdUp"><span translate="CLIENT_TABLE_HEADER_UPTIME"></span></th><th unifi-if-role-admin class="clientActions appTableCell--withAction"><span translate="CLIENT_TABLE_HEADER_ACTIONS"></span><span unifi-collapsible-table-icon="clientListCtrl.collapsibleColumnKeyActions"></span><unifi-list-column-selector unifi-list-column-selector-column-store="clientListCtrl.columnStore"></unifi-list-column-selector></th><th unifi-if-role-admin="false" class="clientActions appTableCell--isActionOnly"><unifi-list-column-selector unifi-list-column-selector-column-store="clientListCtrl.columnStore"></unifi-list-column-selector></th></tr></thead><tfoot ng-if="clientListCtrl.view.getModels().length"><tr><td colspan="{{clientListCtrl.columnStore.getColumns().length + 1}}"><unifi-list-pagination unifi-list-pagination-current-page="clientListCtrl.currentPage" unifi-list-pagination-rows-per-page="clientListCtrl.rowsPerPage" unifi-list-pagination-total-rows="clientListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in clientListCtrl.view.getModels(),              startFrom (clientListCtrl.currentPage - 1) * clientListCtrl.rowsPerPage,              limitTo clientListCtrl.rowsPerPage" collection-view-repeat-watch-all="clientListCtrl.columnStore.getColumns(); clientListCtrl.isResponsive(); clientListCtrl.isColumnCollapsed(clientListCtrl.collapsibleColumnKeyActions)" data-id="{{::model.id}}" data-is-wired="{{::model.get(\'is_wired\')}}" data-is-guest="{{::model.get(\'is_guest\')}}" ng-class="{\'is-row-disabled\': model.get(\'blocked\')}" unifi-open-panel="model" unifi-open-panel-active-tab="\'details\'" class="clickable"><td class="clientStateIcon unifiClientsTable__clientIcon visible--smUp"><span unifi-client-icon="::model"></span></td><td ng-attr-title="{{::model.get(\'mac\')}}" ng-if="::clientListCtrl.isColumnVisible(\'name\')" class="clientName">{{::model.getDisplayName()}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'hostname\')" class="clientHostname visible--lgUp">{{::model.get(\'hostname\')}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'mac\')" class="clientMacAddress visible--lgUp">{{::model.get(\'mac\')}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'ip\')" class="clientIp">{{::model.get(\'ip\')}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'1x_identity\')" class="client8021xIdentity">{{::model.get(\'1x_identity\')}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'vlan\')" class="client8021xVlan">{{::model.get(\'vlan\') > 0 ? model.get(\'vlan\') : \'\'}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'status\')" class="clientStatus"><span ng-if="::model.get(\'authorized\') || !model.get(\'is_guest\')" translate="CLIENT_TABLE_STATUS_AUTHORIZED"></span><span ng-if="::!model.get(\'authorized\') &amp;&amp; model.get(\'is_guest\')" translate="CLIENT_TABLE_STATUS_PENDING"></span></td><td ng-if="::clientListCtrl.isColumnVisible(\'usergroup_id\')" class="clientUserGroup">{{::clientListCtrl.getUserGroupName(model)}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'connection\')" class="clientConnection visible--smUp">{{::model.getConnection()}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'uplink\')" class="clientApPort"><a ng-init="uplink = clientListCtrl.getUplink(model); states = clientListCtrl.getUplinkPropertyPanelState(model, uplink)" unifi-open-panel="uplink" unifi-open-panel-active-tab="uplink.get(\'type\') === \'usw\' ? \'ports\' : \'details\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="states">{{::clientListCtrl.getUplinkDisplayName(model)}}</a></td><td ng-if="::clientListCtrl.isColumnVisible(\'channel\')" class="clientChannel visible--lgUp"><span ng-if="::!model.get(\'is_wired\')">{{::model.get(\'channel\')}}</span></td><td ng-if="::clientListCtrl.isColumnVisible(\'phy_mode\')" class="clientPhyMode visible--lgUp">{{::model | clientRadio}}<span ng-if="::!model.get(\'is_wired\')" unifi-power-save-icon="::model.get(\'powersave_enabled\')"></span></td><td ng-if="::clientListCtrl.isColumnVisible(\'signal\')" class="clientSignal visible--mdUp"><span ng-if="::!model.get(\'is_wired\')">{{::model.get(\'rssi\') | rssi}} ({{::model.get(\'rssi\') | rssiToDbm}})</span></td><td ng-if="::clientListCtrl.isColumnVisible(\'tx_rate\')" class="clientTxRate visible--lgUp">{{::model.get(\'tx_rate\') | rxtx}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'rx_rate\')" class="clientRxRate visible--lgUp">{{::model.get(\'rx_rate\') | rxtx}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'activity\')" class="clientActivity visible--mdUp"><span unifi-client-activity-status="::model.get(\'bytes-r\')"></span></td><td ng-if="::clientListCtrl.isColumnVisible(\'down\')" class="clientDown visible--mdUp">{{::model.get(\'tx_bytes\') | bytes}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'up\')" class="clientUp visible--mdUp">{{::model.get(\'rx_bytes\') | bytes}}</td><td ng-if="::clientListCtrl.isColumnVisible(\'uptime\')" class="clientUptime visible--mdUp">{{::model.get(\'uptime\') | seconds}}</td><td unifi-if-role-admin unifi-collapsible-table-cell="clientListCtrl.collapsibleColumnKeyActions" unifi-collapsible-table-cell-bind-once="true" class="clientActions appTableCell--actions"><button unifi-client-button-block="::model" unifi-client-button-block-is-labeled="true" unifi-client-button-block-is-responsive="::clientListCtrl.isResponsive()" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button><button unifi-client-button-reconnect="::model" unifi-client-button-reconnect-is-labeled="true" unifi-client-button-reconnect-is-responsive="::clientListCtrl.isResponsive()" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button><button unifi-client-button-authorize="::model" unifi-client-button-authorize-is-labeled="true" unifi-client-button-authorize-is-responsive="::clientListCtrl.isResponsive()" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button></td><td unifi-if-role-admin="false" class="clientActions appTableCell--actions"></td></tr></tbody></table><div ng-if="!clientListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="CLIENT_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!clientListCtrl.isFiltered()" translate="CLIENT_TABLE_EMPTY_NO_CLIENTS" class="noMarginBottom"></p><p ng-if="clientListCtrl.isFiltered()" translate="CLIENT_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],350:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientList",["PaginatedListDirective",function(b){return new b("client",a("./clientList.jade")())}])},{"./clientList.jade":349}],351:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q){this.$interval=b,this.clientStateUtils=h,this.clientUplinkUtils=i,this.clientUtils=j,this.knownClientsCache=l,this.networks=m,this.userGroups=o,this.EVENTS=p,this.STATS_DEFAULTS=q,this.accordions={details:{overview:!0},configure:{general:!0}},this.queryDpiStatsDebounced=a.throttle(function(){this.clientUtils.queryDpiStats(this.model)}.bind(this),this.STATS_DEFAULTS.DPI.QUERY_DPI_STATS_INTERVAL,!0),e.call(this,c,d,f,n,g,k)}var e=a("../../controllers/BasePropertiesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.resolve=function(){return this.$q.all([this.userGroups.repository.register().fetch(),this.networks.repository.register().fetch()])},d.prototype.destroy=function(){this.userGroups.repository.unregister(),this.networks.repository.unregister()},d.prototype.reset=function(){this.isClientConnected=void 0,this.isClientWired=void 0,this.isClientGuest=void 0,this.uplink=void 0,this.uplinkName="",this.uplinkPropertyPanelState=void 0,this.showStatisticsTab=!1},d.prototype.addEventHandlers=function(){this.model&&"knownclient"===this.model.modelType&&this.knownClientsCache.repository.registerItem(this.model.id).fetchItem(this.model.id),this.queryDpiStatsInterval=this.$interval(this.queryDpiStatsDebounced,this.STATS_DEFAULTS.DPI.QUERY_DPI_STATS_INTERVAL),e.prototype.addEventHandlers.call(this)},d.prototype.removeEventHandlers=function(){this.model&&"knownclient"===this.model.modelType&&this.knownClientsCache.repository.unregisterItem(this.model.id),this.$interval.cancel(this.queryDpiStatsInterval),e.prototype.removeEventHandlers.call(this)},d.prototype.onModelChange=function(){this.reset(),this.model&&(this.queryDpiStatsDebounced(),this.isClientConnected=this.clientStateUtils.isClientConnected(this.model),this.isClientWired=this.model.get("is_wired"),this.isClientGuest=this.model.get("is_guest"),(this.uplink=this.clientUplinkUtils.getUplink(this.model))&&(this.uplinkName=this.clientUplinkUtils.getUplinkDisplayName(this.model),this.uplinkPropertyPanelState=this.clientUplinkUtils.getUplinkPropertyPanelState(this.model,this.uplink)),this.showStatisticsTab=this.isClientConnected)},d.$inject=["_","$interval","$q","$timeout","$translate","account","clientStateUtils","clientUplinkUtils","clientUtils","frame","knownClientsCache","networks","propertyPanel","userGroups","EVENTS","STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("ClientPropertiesController",d)},{"../../controllers/BasePropertiesController":1001}],352:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-collapsed\': clientPropertiesCtrl.isCollapsed()}" ng-if="clientPropertiesCtrl.model" class="unifiPanelItem clientProperties"><unifi-loading-status unifi-loading-status-is-loading="clientPropertiesCtrl.isLoading" unifi-loading-status-failed="clientPropertiesCtrl.failedToLoad" unifi-loading-status-retry="clientPropertiesCtrl.init()"></unifi-loading-status><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__collapseToggle"><div ng-click="clientPropertiesCtrl.toggleCollapsed()" class="appActionIcon"><span ng-class="{            \'unifi-icon--default-collapse\': !clientPropertiesCtrl.isCollapsed(),            \'unifi-icon--default-expand\': clientPropertiesCtrl.isCollapsed()          }" class="button__icon icon"></span></div></div><div class="unifiPanelItemHeader__avatar"><div unifi-client-icon="::clientPropertiesCtrl.model"></div></div><div class="unifiPanelItemHeader__title truncate"><span>{{clientPropertiesCtrl.model.getDisplayName()}}</span></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div unifi-client-button-block="::clientPropertiesCtrl.model" class="appActionIcon"></div><div unifi-client-button-reconnect="::clientPropertiesCtrl.model" class="appActionIcon"></div><div unifi-client-button-authorize="::clientPropertiesCtrl.model" class="appActionIcon"></div><div ng-click="clientPropertiesCtrl.toggleUndocked()" title="{{clientPropertiesCtrl.isUndocked() ? \'COMMON_PROPERTY_PANEL_ITEM_DOCK\' : \'COMMON_PROPERTY_PANEL_ITEM_UNDOCK\' | translate}}" class="appActionIcon visible--mdUp"><span ng-class="{              \'ubnt-icon--header-maximize\': !clientPropertiesCtrl.isUndocked(),              \'ubnt-icon--header-minimize\': clientPropertiesCtrl.isUndocked()            }" class="button__icon icon"></span></div><div ng-click="clientPropertiesCtrl.removePanel()" title="{{\'COMMON_PROPERTY_PANEL_ITEM_REMOVE\' | translate}}" class="appActionIcon removePanelItem"><span class="button__icon icon unifi-icon--default-close"></span></div></div></div></div><div class="unifiPanelItemBody"><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><ul class="appTabs appTabs--compressed appTabs--alignLeft"><li ng-click="clientPropertiesCtrl.setActiveTab(\'details\')" ng-class="{            \'is-tab-selected\': clientPropertiesCtrl.getActiveTab() === \'details\',            \'is-tab-loading\': clientPropertiesCtrl.loadingTab === \'details\'          }" translate="CLIENT_PROPERTIES_TAB_DETAILS" class="tabs__item"></li><li ng-click="clientPropertiesCtrl.setActiveTab(\'history\')" ng-class="{            \'is-tab-selected\': clientPropertiesCtrl.getActiveTab() === \'history\',            \'is-tab-loading\': clientPropertiesCtrl.loadingTab === \'history\'          }" translate="CLIENT_PROPERTIES_TAB_HISTORY" class="tabs__item"></li><li ng-click="clientPropertiesCtrl.setActiveTab(\'configure\')" ng-class="{            \'is-tab-selected\': clientPropertiesCtrl.getActiveTab() === \'configure\',            \'is-tab-loading\': clientPropertiesCtrl.loadingTab === \'configure\'          }" translate="CLIENT_PROPERTIES_TAB_CONFIGURE" class="tabs__item"></li></ul></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div class="unifiPanelItemContent"><div ng-if="clientPropertiesCtrl.isTabAvailable(\'details\') &amp;&amp; clientPropertiesCtrl.getActiveTab() === \'details\'" unifi-client-properties-details class="clientPropertiesDetails"></div><div ng-if="clientPropertiesCtrl.isTabAvailable(\'history\') &amp;&amp; clientPropertiesCtrl.getActiveTab() === \'history\'" class="clientPropertiesHistory"><unifi-client-properties-history-list unifi-client-properties-history-list-model="::clientPropertiesCtrl.model"></unifi-client-properties-history-list></div><div ng-if="clientPropertiesCtrl.isTabAvailable(\'configure\')" ng-show="clientPropertiesCtrl.getActiveTab() === \'configure\'" unifi-client-properties-configure class="clientPropertiesConfigure"></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],353:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientProperties",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiClientProperties"},controller:"ClientPropertiesController",controllerAs:"clientPropertiesCtrl",template:a("./clientProperties.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.destroy(),e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./clientProperties.jade":352}],354:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="clientPropertiesCtrl.accordions.configure.general" class="unifiPanelItemContent__section general"><accordion-heading>{{\'CLIENT_PROPERTIES_SECTION_CONFIGURE_GENERAL\' | translate}}</accordion-heading><div unifi-initialize-when="clientPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers="!clientPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers-and-create-scope><div unifi-client-properties-configure-general="::clientPropertiesCtrl.model" unifi-client-properties-configure-general-is-open="clientPropertiesCtrl.accordions.configure.general" unifi-client-properties-configure-general-is-read-only="!clientPropertiesCtrl.isAdmin()" class="clientPropertiesConfigureGeneral"></div></div></accordion-group><accordion-group is-open="clientPropertiesCtrl.accordions.configure.network" class="unifiPanelItemContent__section network"><accordion-heading>{{\'CLIENT_PROPERTIES_SECTION_CONFIGURE_NETWORK\' | translate}}</accordion-heading><div unifi-initialize-when="clientPropertiesCtrl.accordions.configure.network" unifi-pause-children-watchers="!clientPropertiesCtrl.accordions.configure.network" unifi-pause-children-watchers-and-create-scope><div unifi-client-properties-configure-network="::clientPropertiesCtrl.model" unifi-client-properties-configure-network-is-open="clientPropertiesCtrl.accordions.configure.network" unifi-client-properties-configure-network-is-read-only="!clientPropertiesCtrl.isAdmin()" class="clientPropertiesConfigureNetwork"></div></div></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],355:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientPropertiesConfigure",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiClientProperties",template:a("./clientPropertiesConfigure.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"configure")}}}])},{"./clientPropertiesConfigure.jade":354}],356:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.$translate=a,this.clientUtils=b,this.userGroups=c,this.siteUtils=d,this.heyToasts=f,this.apiResults=h,this.patterns={name:i.NAME},e.call(this,g)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getUserGroups=function(){var a=(this.siteUtils.getActiveSite()||{}).id;return this.userGroups.repository.collection.where({site_id:a})},d.prototype.save=function(){this.isSubmitting=!0;var a={name:this.modelCopy.attributes.name,note:this.modelCopy.attributes.note,noted:!!this.modelCopy.attributes.note,usergroup_id:this.modelCopy.attributes.usergroup_id};return this.clientUtils.saveClient(this.model,a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("CLIENT_PROPERTIES_SECTION_CONFIGURE_GENERAL").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("CLIENT_PROPERTIES_SECTION_CONFIGURE_GENERAL").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.$inject=["$translate","clientUtils","userGroups","siteUtils","heyToasts","modelDivergence","apiResults","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("ClientPropertiesConfigureGeneralController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],357:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="clientPropertiesConfigureGeneralCtrl.form" ng-class="{    \'is-form-validation-visible\': clientPropertiesConfigureGeneralCtrl.showValidation,    \'is-validation-hidden\': !clientPropertiesConfigureGeneralCtrl.showValidation  }" ng-submit="clientPropertiesConfigureGeneralCtrl.form.$valid &amp;&amp; clientPropertiesConfigureGeneralCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="clientPropertiesConfigureGeneralCtrl.resolveDivergence()" unifi-config-changed-on-ignore="clientPropertiesConfigureGeneralCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; clientPropertiesConfigureGeneralCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><label translate="CLIENT_PROPERTIES_LABEL_ALIAS" class="appLabel--primary"></label><input type="text" name="clientName" ng-model="clientPropertiesConfigureGeneralCtrl.modelCopy.attributes.name" ng-model-master="clientPropertiesConfigureGeneralCtrl.model.attributes.name" ng-pattern="clientPropertiesConfigureGeneralCtrl.patterns.name" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="CLIENT_PROPERTIES_LABEL_NOTE" class="appLabel--primary"></label><textarea name="clientNote" ng-model="clientPropertiesConfigureGeneralCtrl.modelCopy.attributes.note" ng-model-master="clientPropertiesConfigureGeneralCtrl.model.attributes.note" class="textarea--full"></textarea></div><div class="appFormGroup appFormGroup--condensed"><label translate="CLIENT_PROPERTIES_LABEL_USER_GROUP" class="appLabel--primary"></label><select name="clientUserGroup" ng-model="clientPropertiesConfigureGeneralCtrl.modelCopy.attributes.usergroup_id" ng-model-master="clientPropertiesConfigureGeneralCtrl.model.attributes.usergroup_id" ng-options="userGroup.id as userGroup.get(\'name\') for userGroup in clientPropertiesConfigureGeneralCtrl.getUserGroups()" class="select--full"><option value="">{{\'CLIENT_PROPERTIES_VALUES_USER_GROUP_AUTOMATIC\' | translate}}</option></select><div ng-if="clientPropertiesConfigureGeneralCtrl.modelCopy.attributes.usergroup_id" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="CLIENT_PROPERTIES_USER_GROUP_NOTE" class="noMarginBottom"></p></div></div></div></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="clientPropertiesConfigureGeneralCtrl.showValidation = true" busy-toggle="clientPropertiesConfigureGeneralCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveClient">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-click="clientPropertiesConfigureGeneralCtrl.reset()" ng-disabled="clientPropertiesConfigureGeneralCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],358:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientPropertiesConfigureGeneral",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiClientPropertiesConfigureGeneral",isOpen:"=unifiClientPropertiesConfigureGeneralIsOpen",isReadOnly:"=unifiClientPropertiesConfigureGeneralIsReadOnly"},controller:"ClientPropertiesConfigureGeneralController",controllerAs:"clientPropertiesConfigureGeneralCtrl",template:a("./clientPropertiesConfigureGeneral.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./clientPropertiesConfigureGeneral.jade":357}],359:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.clientUtils=b,this.devices=c,this.networks=d,this.heyToasts=f,this.apiResults=h,e.call(this,g)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getNetworks=function(){var a=["corporate","guest","voip"];return this.networks.repository.collection.filter(function(b){return a.indexOf(b.get("purpose"))!==-1})},d.prototype.getNetworkIpSubnet=function(){if(this.modelCopy){var a=this.networks.repository.collection.get(this.modelCopy.get("network_id"));return a&&a.get("ip_subnet")}},d.prototype.canAssignFixedIp=function(){var a=this.devices.repository.collection.where({type:"ugw",adopted:!0}).length>0,b=this.networks.repository.collection.where({dhcpd_enabled:!0}).length>0;return a&&b},d.prototype.save=function(){this.isSubmitting=!0;var a={use_fixedip:this.modelCopy.attributes.use_fixedip,fixed_ip:this.modelCopy.attributes.use_fixedip?this.ipAddress:void 0,network_id:this.modelCopy.attributes.use_fixedip?this.modelCopy.attributes.network_id:void 0};return this.clientUtils.saveClient(this.model,a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("CLIENT_PROPERTIES_SECTION_CONFIGURE_NETWORK").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("CLIENT_PROPERTIES_SECTION_CONFIGURE_NETWORK").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"Master":"";this["ipAddress"+b]=this.model?this.model.get("fixed_ip")||this.model.get("ip"):void 0},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","clientUtils","devices","networks","heyToasts","modelDivergence","apiResults"],angular.module("app-unifi-manage").controller("ClientPropertiesConfigureNetworkController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],360:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="clientPropertiesConfigureNetworkCtrl.form" ng-class="{    \'is-form-validation-visible\': clientPropertiesConfigureNetworkCtrl.showValidation,    \'is-validation-hidden\': !clientPropertiesConfigureNetworkCtrl.showValidation  }" ng-submit="clientPropertiesConfigureNetworkCtrl.form.$valid &amp;&amp; clientPropertiesConfigureNetworkCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="clientPropertiesConfigureNetworkCtrl.resolveDivergence()" unifi-config-changed-on-ignore="clientPropertiesConfigureNetworkCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; clientPropertiesConfigureNetworkCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appInputGroup appInputGroup--comfy"><input type="checkbox" name="enabledFixedIp" id="clientFixedIp{{::directiveId}}" ng-model="clientPropertiesConfigureNetworkCtrl.modelCopy.attributes.use_fixedip" ng-model-master="clientPropertiesConfigureNetworkCtrl.model.attributes.use_fixedip" ng-disabled="!clientPropertiesConfigureNetworkCtrl.canAssignFixedIp()"><label for="clientFixedIp{{::directiveId}}" translate="CLIENT_PROPERTIES_VALUES_USE_FIXED_IP"></label><span unifi-notify-device-requirement="ugw"></span></div></fieldset><fieldset ng-show="clientPropertiesConfigureNetworkCtrl.modelCopy.attributes.use_fixedip" ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><label translate="CLIENT_PROPERTIES_LABEL_NETWORK" class="appLabel--primary"></label><select name="clientNetwork" ng-model="clientPropertiesConfigureNetworkCtrl.modelCopy.attributes.network_id" ng-model-master="clientPropertiesConfigureNetworkCtrl.model.attributes.network_id" ng-options="network.id as network.get(\'name\') for network in clientPropertiesConfigureNetworkCtrl.getNetworks()" class="select--full"></select></div><div class="appFormGroup appFormGroup--condensed"><label translate="CLIENT_PROPERTIES_LABEL_IP_ADDRESS" class="appLabel--primary"></label><input type="text" name="clientIpAddress" ng-model="clientPropertiesConfigureNetworkCtrl.ipAddress" ng-model-master="clientPropertiesConfigureNetworkCtrl.ipAddressMaster" unifi-validate-ip-in-subnet="clientPropertiesConfigureNetworkCtrl.getNetworkIpSubnet()" ng-required="clientPropertiesConfigureNetworkCtrl.modelCopy.attributes.use_fixedip" class="input--full"><div ng-show="clientPropertiesConfigureNetworkCtrl.form.clientIpAddress.$error.ipInSubnet" translate="VALIDATION_HINT_IP_IN_SUBNET" translate-values="{ip: clientPropertiesConfigureNetworkCtrl.form.clientIpAddress.$viewValue, subnet: clientPropertiesConfigureNetworkCtrl.getNetworkIpSubnet()}" class="appInputFeedback appInputFeedback--danger"></div></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="clientPropertiesConfigureNetworkCtrl.showValidation = true" busy-toggle="clientPropertiesConfigureNetworkCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveClient">{{\'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="clientPropertiesConfigureNetworkCtrl.reset()" ng-disabled="clientPropertiesConfigureNetworkCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],361:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientPropertiesConfigureNetwork",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiClientPropertiesConfigureNetwork",isOpen:"=unifiClientPropertiesConfigureNetworkIsOpen",isReadOnly:"=unifiClientPropertiesConfigureNetworkIsReadOnly"},controller:"ClientPropertiesConfigureNetworkController",controllerAs:"clientPropertiesConfigureNetworkCtrl",template:a("./clientPropertiesConfigureNetwork.jade")(),link:function(a,c,d,e){a.directiveId=a.$id,a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./clientPropertiesConfigureNetwork.jade":360}],362:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<accordion close-others=\"true\" class=\"appAccordion\"><accordion-group is-open=\"clientPropertiesCtrl.accordions.details.overview\" class=\"unifiPanelItemContent__section overview\"><accordion-heading>{{'CLIENT_PROPERTIES_SECTION_DETAILS_OVERVIEW' | translate}}</accordion-heading><div ng-if=\"clientPropertiesCtrl.accordions.details.overview\"><div class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow macAddress\"><dt>{{'CLIENT_PROPERTIES_LABEL_MAC_ADDRESS' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('mac')}}</dd></div><div ng-if=\"clientPropertiesCtrl.model.get('hostname')\" class=\"appDescriptionListRow hostname\"><dt>{{'CLIENT_PROPERTIES_LABEL_HOSTNAME' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('hostname')}}</dd></div><div unifi-if-role-admin class=\"appDescriptionListRow deviceType\"><dt>{{'CLIENT_PROPERTIES_LABEL_DEVICE_TYPE' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('oui')}}</dd></div></div><div ng-if=\"clientPropertiesCtrl.isClientConnected\" class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow ipAddress\"><dt>{{'CLIENT_PROPERTIES_LABEL_IP_ADDRESS' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('ip')}}</dd></div><div class=\"appDescriptionListRow uptime\"><dt>{{'CLIENT_PROPERTIES_LABEL_UPTIME' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('uptime') | seconds}}</dd></div><div ng-if=\"clientPropertiesCtrl.isClientWired\" class=\"appDescriptionListRow network\"><dt>{{'CLIENT_PROPERTIES_LABEL_NETWORK' | translate}}</dt><dd>{{clientPropertiesCtrl.model.getConnection()}}</dd></div><div class=\"appDescriptionListRow uplink\"><dt>{{clientPropertiesCtrl.isClientWired ? 'CLIENT_PROPERTIES_LABEL_PORT' : 'CLIENT_PROPERTIES_LABEL_CONNECTED_AP' | translate}}</dt><dd><a unifi-open-panel=\"clientPropertiesCtrl.uplink\" unifi-open-panel-active-tab=\"clientPropertiesCtrl.uplink.get('type') === 'usw' ? 'ports' : 'details'\" unifi-open-panel-change-tab=\"true\" unifi-open-panel-states=\"clientPropertiesCtrl.uplinkPropertyPanelState\">{{clientPropertiesCtrl.uplinkName}}</a></dd></div><div ng-if=\"!clientPropertiesCtrl.isClientWired\" class=\"appDescriptionListRow essid\"><dt>{{'CLIENT_PROPERTIES_LABEL_ESSID' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('essid')}}</dd></div></div><div ng-if=\"!clientPropertiesCtrl.isClientConnected\" class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow lastSeen\"><dt>{{'CLIENT_PROPERTIES_LABEL_LAST_SEEN' | translate}}</dt><dd><span ng-if=\"clientPropertiesCtrl.model.get('last_seen')\">{{clientPropertiesCtrl.model.get('last_seen') * 1000 | moment: 'fromNow'}}</span><span ng-if=\"!clientPropertiesCtrl.model.get('last_seen')\" translate=\"CLIENT_PROPERTIES_VALUES_LAST_SEEN_NEVER\"></span></dd></div></div></div></accordion-group><accordion-group ng-if=\"clientPropertiesCtrl.isClientConnected\" is-open=\"clientPropertiesCtrl.accordions.details.statistics\" class=\"unifiPanelItemContent__section statistics\"><accordion-heading>{{'CLIENT_PROPERTIES_SECTION_DETAILS_STATISTICS' | translate}}</accordion-heading><div ng-if=\"clientPropertiesCtrl.accordions.details.statistics\"><div ng-if=\"!clientPropertiesCtrl.isClientWired\" class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow channel\"><dt>{{'CLIENT_PROPERTIES_LABEL_CHANNEL' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('channel')}} (11{{clientPropertiesCtrl.model.get('radio_proto')}})</dd></div><div class=\"appDescriptionListRow signal\"><dt>{{'CLIENT_PROPERTIES_LABEL_SIGNAL' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('rssi') | rssi}} ({{clientPropertiesCtrl.model.get('rssi') | rssiToDbm}})</dd></div><div class=\"appDescriptionListRow txRate\"><dt>{{'CLIENT_PROPERTIES_LABEL_TX_RATE' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('tx_rate') | rxtx}}</dd></div><div class=\"appDescriptionListRow rxRate\"><dt>{{'CLIENT_PROPERTIES_LABEL_RX_RATE' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('rx_rate') | rxtx}}</dd></div><div class=\"appDescriptionListRow powerSave\"><dt>{{'CLIENT_PROPERTIES_LABEL_POWER_SAVE' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('powersave_enabled') ? 'CLIENT_PROPERTIES_VALUES_POWER_SAVE_ENABLED' : 'CLIENT_PROPERTIES_VALUES_POWER_SAVE_NOT_ENABLED' | translate}}</dd></div></div><div class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow activity\"><dt>{{'CLIENT_PROPERTIES_LABEL_ACTIVITY' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('bytes-r') | bps}}</dd></div><div class=\"appDescriptionListRow downPktsBytes\"><dt>{{'CLIENT_PROPERTIES_LABEL_DOWN_PKTS_BYTES' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('tx_packets') | numberToString}} / {{clientPropertiesCtrl.model.get('tx_bytes') | bytes}}</dd></div><div class=\"appDescriptionListRow upPktsBytes\"><dt>{{'CLIENT_PROPERTIES_LABEL_UP_PKTS_BYTES' | translate}}</dt><dd>{{clientPropertiesCtrl.model.get('rx_packets') | numberToString}} / {{clientPropertiesCtrl.model.get('rx_bytes') | bytes}}</dd></div></div></div></accordion-group><accordion-group ng-if=\"clientPropertiesCtrl.isClientConnected\" is-open=\"clientPropertiesCtrl.accordions.details.dpi\" class=\"unifiPanelItemContent__section dpi\"><accordion-heading>{{'CLIENT_PROPERTIES_SECTION_DETAILS_DPI' | translate}}</accordion-heading><unifi-client-properties-dpi-list ng-if=\"clientPropertiesCtrl.accordions.details.dpi\" unifi-client-properties-dpi-list-local-state=\"true\" unifi-client-properties-dpi-list-local-state-key=\"::clientPropertiesCtrl.model.get('mac') + '|dpi'\" unifi-client-properties-dpi-list-client-mac=\"::clientPropertiesCtrl.model.get('mac')\"></unifi-client-properties-dpi-list></accordion-group></accordion>"),b.join("")}},{"jade/runtime":232}],363:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientPropertiesDetails",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiClientProperties",template:a("./clientPropertiesDetails.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"details")}}}])},{"./clientPropertiesDetails.jade":362}],364:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.$translate=b,this.clients=c,this.dpi=g,this.Backbone=i,this.rowsPerPage=h.model.getRowsPerPropertyPanel(),this.defaultSortBy="bytes",this.defaultSortDesc=!0,this.model=this.clients.repository.collection.get(this.clientMac),this.collection=new this.Backbone.Collection,this.collectData(),e.call(this,a,f,h)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.addEventHandlers=function(){this.model&&this.model.on("change",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.model&&this.model.off("change",this.collectData,this)},d.prototype.getCollection=function(){return this.collection},d.prototype.collectData=function(){if(this.model){var a=this.model.get("dpi_stats");a&&this.collection.reset(a.map(function(a){return{application:this.dpi.getAppName(this.dpi.getCompoundId(a.cat,a.app))||this.$translate.instant("CLIENT_PROPERTIES_DPI_TABLE_UNKNOWN_APPLICATION"),packets:a.rx_packets+a.tx_packets,bytes:a.rx_bytes+a.tx_bytes,categoryId:a.cat,applicationId:a.app}},this))}},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","$translate","clients","collectionViewComparator","CollectionView","dpi","preferences","Backbone"],angular.module("app-unifi-manage").controller("ClientPropertiesDpiListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],365:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appScrollable flexFlag__body fullWidth"><table collection-view-sort="clientPropertiesDpiListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="application" class="clientDpiApplication"><span translate="CLIENT_PROPERTIES_DPI_TABLE_HEADER_NAME_APPLICATION"></span></th><th collection-view-sort-by="bytes" class="clientDpiBytes"><span translate="CLIENT_PROPERTIES_DPI_TABLE_HEADER_NAME_BYTES"></span></th><th collection-view-sort-by="packets" class="clientDpiPackets"><span translate="CLIENT_PROPERTIES_DPI_TABLE_HEADER_NAME_PACKETS"></span></th></tr></thead><tfoot ng-if="clientPropertiesDpiListCtrl.view.getModels().length"><tr><td colspan="3"><unifi-micro-pagination unifi-micro-pagination-current-page="clientPropertiesDpiListCtrl.currentPage" unifi-micro-pagination-rows-per-page="clientPropertiesDpiListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="clientPropertiesDpiListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in clientPropertiesDpiListCtrl.view.getModels(),          startFrom (clientPropertiesDpiListCtrl.currentPage - 1) * clientPropertiesDpiListCtrl.rowsPerPage,          limitTo clientPropertiesDpiListCtrl.rowsPerPage" data-id="{{::model.id}}" class="clickable"><td class="clientDpiApplication"><div unifi-dpi-icon unifi-dpi-icon-category-id="model.get(\'categoryId\')" unifi-dpi-icon-application-id="model.get(\'applicationId\')"></div><span>{{::model.get(\'application\')}}</span></td><td class="clientDpiBytes">{{::model.get(\'bytes\') | bytes}}</td><td class="clientDpiPackets">{{::model.get(\'packets\')}}</td></tr></tbody></table><div ng-if="!clientPropertiesDpiListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="CLIENT_PROPERTIES_DPI_TABLE_NO_DATA" class="noMarginBottom"></p></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],366:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientPropertiesDpiList",["PaginatedListDirective","eventHandlersDirectiveMixin",function(b,c){var d=new b("clientPropertiesDpi",a("./clientPropertiesDpiList.jade")(),{clientMac:"=unifiClientPropertiesDpiListClientMac"});return d.addMixin(c),d}])},{"./clientPropertiesDpiList.jade":365}],367:[function(a,b,c){"use strict";function d(a,b,c){this.clientUtils=c,this.skipInitialization=!0,e.call(this,a,b)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateModel=function(a){this.model=a,this.updateCollection()},d.prototype.updateCollection=function(){this.model&&this.clientUtils.fetchClientHistory(this.model,5).then(function(a){this.collection?this.collection.reset(a.models):(this.collection=a,this.initView(),this.initFilters())}.bind(this))},d.prototype.getCollection=function(){return this.collection},d.$inject=["$q","CollectionView","clientUtils"],angular.module("app-unifi-manage").controller("ClientPropertiesHistoryListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],368:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-switch="!!clientPropertiesHistoryListCtrl.view" class="unifiPanelItemContent__section appScrollable flexFlag__body fullWidth"><div ng-switch-when="true"><table collection-view-sort="clientPropertiesHistoryListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="assoc_time" class="historyDatetime"><span translate="CLIENT_PROPERTIES_HISTORY_TABLE_HEADER_DATE_TIME"></span></th><th collection-view-sort-by="duration" class="historyDuration"><span translate="CLIENT_PROPERTIES_HISTORY_TABLE_HEADER_DURATION"></span></th><th collection-view-sort-by="tx_bytes" class="historyTxBytes"><span translate="CLIENT_PROPERTIES_HISTORY_TABLE_HEADER_DOWN"></span></th><th collection-view-sort-by="rx_bytes" class="historyRxBytes"><span translate="CLIENT_PROPERTIES_HISTORY_TABLE_HEADER_UP"></span></th></tr></thead><tbody><tr collection-view-repeat="model in clientPropertiesHistoryListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="historyDatetime">{{::model.get(\'assoc_time\') * 1000 | moment: \'format\': \'datetime\'}}</td><td class="historyDuration">{{::model.get(\'duration\') | seconds}}</td><td class="historyTxBytes">{{::model.get(\'tx_bytes\')| bytes}}</td><td class="historyRxBytes">{{::model.get(\'rx_bytes\') | bytes}}</td></tr></tbody></table><div ng-if="!clientPropertiesHistoryListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="CLIENT_PROPERTIES_HISTORY_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div><div ng-switch-default class="unifiPanelItemContentSection__loading"><div class="appSpinner appSpinner--medium"></div></div></div>'),b.join("")}},{"jade/runtime":232}],369:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiClientPropertiesHistoryList",["updateModelDirectiveMixin","EVENTS",function(b,c){return{scope:{model:"=unifiClientPropertiesHistoryListModel"},controller:"ClientPropertiesHistoryListController",controllerAs:"clientPropertiesHistoryListCtrl",restrict:"E",replace:!0,template:a("./clientPropertiesHistoryList.jade")(),link:function(a,d,e,f){a.$on("$destroy",function(){f.destroyView()}),a.$on(c.APP_REFRESH,function(a,b){b.push(f.updateCollection())}),b.init(a,d,e,f,!0)}}}])},{"./clientPropertiesHistoryList.jade":368}],370:[function(a,b,c){"use strict";function d(){this.isDropdownVisible=!1,e.call(this)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){this.collection?this.requiresSorting?this.modelOptions=this.collection.sortBy(function(a){return this.getItemTitle(a)}.bind(this)):this.modelOptions=this.collection.models:this.modelOptions=[]},d.prototype.openDropdown=function(){this.isDropdownVisible=!0},d.prototype.closeDropdown=function(){this.isDropdownVisible=!1},d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.getSelectedTitle=function(){return this.selectedModel?this.getItemTitle(this.selectedModel):this.defaultLabel},d.prototype.getItemTitle=function(a){if(this.titleAttribute)return a.get(this.titleAttribute);if(this.titleFunction)return this.titleFunction({model:a});throw new Error("Missing title attribute or title function")},d.prototype.selectItem=function(a){this.selectedModel=a,this.onItemSelect&&this.onItemSelect({model:a})},d.$inject=[],angular.module("app-unifi-manage").controller("CollectionButtonDropdownController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],371:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="collectionButtonDropdownCtrl.toggleDropdown()" on-outside-element-click="collectionButtonDropdownCtrl.closeDropdown()" class="appMainButton appMainButton--filter appMainButton--cozy appMainButton--withDropdown"><span ng-if="collectionButtonDropdownCtrl.labelIcon" ng-class="collectionButtonDropdownCtrl.labelIcon" class="button__icon button__icon--left icon visible--xs"></span><span ng-if="collectionButtonDropdownCtrl.labelPrefix" ng-class="{\'visible--smUp\': !!collectionButtonDropdownCtrl.labelIcon}">{{collectionButtonDropdownCtrl.labelPrefix | translate}}:&nbsp;</span><span class="noTextTransform">{{collectionButtonDropdownCtrl.getSelectedTitle()}}</span><span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{\'is-dropdown-visible\': collectionButtonDropdownCtrl.isDropdownVisible}" class="appDropdown appDropdown--left appDropdown--inButton"><li ng-if="collectionButtonDropdownCtrl.defaultLabel" ng-click="collectionButtonDropdownCtrl.selectItem()" class="appDropdown__item">{{collectionButtonDropdownCtrl.defaultLabel}}</li><li ng-repeat="item in collectionButtonDropdownCtrl.modelOptions" ng-click="collectionButtonDropdownCtrl.selectItem(item)" class="appDropdown__item">{{collectionButtonDropdownCtrl.getItemTitle(item)}}</li></ul></div>'),b.join("")}},{"jade/runtime":232}],372:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiCollectionButtonDropdown",[function(){return{scope:{_collection:"=unifiCollectionButtonDropdownCollection",selectedModel:"=?unifiCollectionButtonDropdownSelectedModel",titleAttribute:"@?unifiCollectionButtonDropdownTitleAttribute",titleFunction:"&?unifiCollectionButtonDropdownTitleFunction",defaultLabel:"@?unifiCollectionButtonDropdownDefaultLabel",labelPrefix:"@?unifiCollectionButtonDropdownLabelPrefix",labelIcon:"@?unifiCollectionButtonDropdownLabelIcon",onItemSelect:"&?unifiCollectionButtonDropdownOnItemSelect",requiresSorting:"=unifiCollectionButtonDropdownRequiresSorting"},controller:"CollectionButtonDropdownController",controllerAs:"collectionButtonDropdownCtrl",bindToController:!0,replace:!0,template:a("./collectionButtonDropdown.jade")(),link:function(a,b,c,d){a.$watch(function(){return d._collection},function(a){d.updateCollection(a)}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./collectionButtonDropdown.jade":371}],373:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiCollectionViewRow",["$compile","$parse","$templateCache",function(a,b,c){return{scope:!1,controller:angular.noop,controllerAs:"collectionViewRowCtrl",restrict:"A",link:function(d,e,f,g){f.unifiCollectionViewRowConfig&&(g.config=b(f.unifiCollectionViewRowConfig)(d));var h=c.get("partials/"+f.unifiCollectionViewRow+"TableRow.html");e.html(h),a(e.contents())(d)}}}])},{}],374:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-init="tooltipVisible = false" on-outside-element-click="tooltipVisible = false" class="appTooltipContainer clickable"><div ng-class="{\'appTooltip--dark\': isDark}" ng-show="tooltipVisible" class="appTooltip"><unifi-color-tool-hsv-space ng-model="model"></unifi-color-tool-hsv-space></div><ng-transclude ng-click="tooltipVisible = true"></ng-transclude></div>'),b.join("")}},{"jade/runtime":232}],375:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiColorPicker",[function(){return{restrict:"E",scope:{model:"=unifiColorPickerModel",isDark:"=unifiColorPickerIsDark"},template:a("./colorPicker.jade")(),transclude:!0}}])},{"./colorPicker.jade":374}],376:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiColorToolHsvSpace"><unifi-color-tool-sv-space unifi-color-tool-sv-space-color-model="colorModel"></unifi-color-tool-sv-space><unifi-color-tool-hue-space unifi-color-tool-hue-space-color-model="colorModel"></unifi-color-tool-hue-space></div>'),b.join("")}},{"jade/runtime":232}],377:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiColorToolHsvSpace",["tinycolor",function(b){return{replace:!0,restrict:"E",template:a("./colorToolHsvSpace.jade")(),require:"ngModel",scope:{},link:function(a,c,d,e){a.colorModel={h:0,s:1,v:1},e.$formatters.push(function(a){var c=b(angular.copy(a));if(c.isValid()){var d=c.toHsv();return{h:d.h,s:d.s,v:d.v}}}),e.$render=function(){a.colorModel=e.$viewValue},a.$watch("colorModel",function(){e.$setViewValue(a.colorModel)}),e.$parsers.push(function(a){var c=b(angular.copy(a));return c.isValid()?c.toHexString():""})}}}])},{"./colorToolHsvSpace.jade":376}],378:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="onClick($event)" ng-mousemove="onMouseMove($event)" ng-mousedown="setMouseDown(true)" ng-mouseup="setMouseDown(false)" ng-mouseleave="setMouseDown(false)" class="unifiColorToolHueSpace"><div class="unifiColorToolHueSpace__canvas"><div ng-style="{\'left\': cursor.x + \'px\'}" class="unifiColorToolHueSpace__cursor"></div></div></div>'),b.join("")}},{"jade/runtime":232}],379:[function(a,b,c){"use strict";var d=".unifiColorToolHueSpace__canvas";angular.module("app-unifi-manage").directive("unifiColorToolHueSpace",["domHelper",function(b){return{replace:!0,restrict:"E",template:a("./colorToolHueSpace.jade")(),scope:{colorModel:"=unifiColorToolHueSpaceColorModel"},link:function(a,c){function e(){return c.is(":visible")}function f(){a.colorModel&&!a.mouseDown&&a.updateCursorPosition()}var g=c[0].querySelector(d);a.cursor={x:0},a.mouseDown=!1,a.$watchGroup(["colorModel",e],f),a.updateCursorPosition=function(){a.cursor.x=Math.floor(a.colorModel.h/360*b.clientWidth(g))},a.onClick=function(b){a.moveCursor(b),a.selectColor()},a.onMouseMove=function(b){a.mouseDown&&(a.moveCursor(b),a.selectColor())},a.setMouseDown=function(b){a.mouseDown=b},a.moveCursor=function(c){a.cursor.x=Math.max(0,Math.min(c.offsetX-g.offsetLeft,b.clientWidth(g)))},a.selectColor=function(){a.colorModel={h:a.cursor.x/b.clientWidth(g)*360,s:a.colorModel.s,v:a.colorModel.v}}}}}])},{"./colorToolHueSpace.jade":378}],380:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="onClick($event)" ng-mousemove="onMouseMove($event)" ng-mousedown="setMouseDown(true)" ng-mouseup="setMouseDown(false)" ng-mouseleave="setMouseDown(false)" class="unifiColorToolSvSpace"><div ng-style="{\'background-color\': getBgColor()}" class="unifiColorToolSvSpace__canvas"><div ng-style="{        \'left\': cursor.x + \'px\',        \'top\': cursor.y + \'px\'      }" class="unifiColorToolSvSpace__cursor"></div></div></div>'),b.join("")}},{"jade/runtime":232}],381:[function(a,b,c){"use strict";var d=".unifiColorToolSvSpace__canvas";angular.module("app-unifi-manage").directive("unifiColorToolSvSpace",["domHelper","tinycolor",function(b,c){return{replace:!0,restrict:"E",template:a("./colorToolSvSpace.jade")(),scope:{colorModel:"=unifiColorToolSvSpaceColorModel"},link:function(a,e){function f(){return e.is(":visible")}function g(){a.colorModel&&!a.mouseDown&&a.updateCursorPosition()}var h=e[0].querySelector(d);h.style.height=b.clientWidth(h)+"px",a.cursor={x:0,y:0},a.mouseDown=!1,a.$watchGroup(["colorModel",f],g),a.updateCursorPosition=function(){var c=a.colorModel;a.cursor.x=Math.floor(c.s*b.clientWidth(h)),a.cursor.y=b.clientHeight(h)-Math.floor(c.v*b.clientHeight(h))},a.onClick=function(b){a.moveCursor(b),a.selectColor()},a.onMouseMove=function(b){a.mouseDown&&(a.moveCursor(b),a.selectColor())},a.setMouseDown=function(b){a.mouseDown=b},a.moveCursor=function(c){a.cursor.x=Math.max(0,Math.min(c.offsetX-h.offsetLeft,b.clientWidth(h))),a.cursor.y=Math.max(0,Math.min(c.offsetY-h.offsetTop,b.clientHeight(h)))},a.selectColor=function(){a.colorModel={h:a.colorModel.h,s:a.cursor.x/b.clientWidth(h),v:1-a.cursor.y/b.clientHeight(h)}},a.getBgColor=function(){var b=a.colorModel&&void 0!==a.colorModel.h;if(!b)return"";var d=a.colorModel.h||0,e=c({h:d,s:1,v:1});return e.isValid()?e.toHexString():""}}}}])},{"./colorToolSvSpace.jade":380}],382:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'unifiConfigChanged--whiteout\': withWhiteout}" class="unifiConfigChanged"><div ng-class="{      \'appInfoBox--dark\': isDark,      \'appInfoBox--cozy\': isCozy,      \'appInfoBox--noBorder\': withWhiteout    }" class="appInfoBox appInfoBox--danger appInfoBox--responsive fullWidth"><div ng-if="withIcon" class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body noMarginTop"><p translate="COMMON_CONFIG_CHANGED_NOTICE"></p></div><div ng-class="{\'alignLeft\': withWhiteout}" class="appInfoBox__footer"><button type="button" ng-class="{\'appMainButton--condensed\': isCozy}" ng-click="onReset()" translate="COMMON_CONFIG_CHANGED_ACTIONS_RESET" class="appMainButton appMainButton--primary resolveDivergence"></button><button type="button" ng-class="{\'appMainButton--condensed\': isCozy}" ng-click="onIgnore()" translate="COMMON_CONFIG_CHANGED_ACTIONS_IGNORE" class="appMainButton ignoreDivergence"></button></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],383:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiConfigChanged",[function(){return{scope:{onReset:"&unifiConfigChangedOnReset",onIgnore:"&unifiConfigChangedOnIgnore",isCozy:"@?unifiConfigChangedIsCozy",isDark:"@?unifiConfigChangedIsDark",withWhiteout:"@?unifiConfigChangedWithWhiteout",withIcon:"@?unifiConfigChangedWithIcon"},restrict:"AE",template:a("./configChanged.jade")()}}])},{"./configChanged.jade":382}],384:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-init=\"mode = 'desktop'\" class=\"unifiCustomPortalPreview\"><ul ng-class=\"isDark ? 'appMainButtonGroup--dark' : 'appMainButtonGroup--filter'\" class=\"buttonGroup buttonGroup--shrink appMainButtonGroup verticalRhythm--cozy\"><li ng-click=\"mode = 'desktop'\" ng-class=\"{'is-button-selected': mode === 'desktop'}\" class=\"button appMainButton appMainButton--cozy\">{{ 'SETTINGS_GUEST_CONTROL_VALUES_CUSTOM_PORTAL_PREVIEW_DESKTOP' | translate }}</li><li ng-click=\"mode = 'mobile'\" ng-class=\"{'is-button-selected': mode === 'mobile'}\" class=\"button appMainButton appMainButton--cozy\">{{ 'SETTINGS_GUEST_CONTROL_VALUES_CUSTOM_PORTAL_PREVIEW_MOBILE' | translate }}</li></ul><div ng-class=\"{      'unifiCustomPortalPreview__wrapper--desktop': mode === 'desktop',      'unifiCustomPortalPreview__wrapper--mobile': mode === 'mobile'    }\" class=\"unifiCustomPortalPreview__wrapper\"><iframe ng-class=\"{        'unifiCustomPortalPreview__iframe--desktop': mode === 'desktop',        'unifiCustomPortalPreview__iframe--mobile': mode === 'mobile'      }\" ng-src=\"{{getPortalPreviewUrl()}}\" sandbox=\"allow-same-origin allow-forms allow-scripts\" unifi-iframe-post-message=\"model\" class=\"unifiCustomPortalPreview__iframe\"></iframe></div></div>"),b.join("")}},{"jade/runtime":232}],385:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiCustomPortalPreview",["siteUtils","UnifiHotspotHost",function(b,c){return{replace:!0,restrict:"E",scope:{model:"=unifiCustomPortalPreviewModel",isDark:"=unifiCustomPortalPreviewIsDark"},template:a("./customPortalPreview.jade")(),link:function(a){a.getPortalPreviewUrl=function(){return[c,"guest/preview/s",b.getActiveSite().get("name"),"#","preview/"].join("/")}}}}])},{"./customPortalPreview.jade":384}],386:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'unifiDashboardContainer--flexible\': isFlexible}" class="unifiSmartMarginContainer unifiDashboardContainer unifiDashboardContainer--scallable"><div class="container"><div class="row row--comfy"><div class="col--xs12"><unifi-health class="unifiDashboardHealth"></unifi-health></div></div></div><div class="container"><div class="row row--comfy"><unifi-throughput class="unifiDashboardGraph unifiDashboardThroughputGraph"></unifi-throughput><unifi-occupancy class="unifiDashboardGraph unifiDashboardOccupancyGraph"></unifi-occupancy></div></div><div class="container"><div class="row row--comfy"><unifi-inventory-devices-graph class="unifiDashboardGraph"></unifi-inventory-devices-graph><unifi-inventory-clients-graph class="unifiDashboardGraph"></unifi-inventory-clients-graph><unifi-inventory-dpi-graph class="unifiDashboardGraph"></unifi-inventory-dpi-graph></div></div></div>'),b.join("")}},{"jade/runtime":232}],387:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDashboard",["bowser",function(b){return{template:a("./dashboard.jade")(),link:function(a){a.isFlexible=!b.msie}}}])},{"./dashboard.jade":386}],388:[function(a,b,c){"use strict";function d(a,b){this.frame=a,this.widgets=b}d.prototype.resolve=function(){return this.widgets.activateWidget(this.selectedWidget),this.frame.getLayout("dashboardWidgetsLayout").resolve()},d.prototype.reject=function(){return this.frame.getLayout("dashboardWidgetsLayout").reject()},d.$inject=["frame","widgets"],angular.module("app-unifi-manage").controller("DashboardWidgetsController",d)},{}],389:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<li gridster-item="item" unifi-gridster-item-on-resize="item"><div ng-switch="item.type" class="dashboardWidget"><div ng-if="!locked" class="appActionIconGroup dashboardWidgetActions"><div ng-if="!gridster.isMobile" class="appActionIcon unifiDragHandle"><span class="button__icon icon ubnt-icon--arrows-updown-leftright"></span></div><div ng-click="widgets.deactivateWidget(item.widgetIndex)" class="appActionIcon"><span class="button__icon icon ubnt-icon--x"></span></div></div><unifi-health ng-switch-when="health" class="unifiDashboardHealth"></unifi-health><unifi-throughput ng-switch-when="throughput" class="unifiDashboardGraph unifiDashboardThroughputGraph"></unifi-throughput><unifi-occupancy ng-switch-when="occupancy" class="unifiDashboardGraph unifiDashboardOccupancyGraph"></unifi-occupancy><unifi-inventory-devices-graph ng-switch-when="devices" class="unifiDashboardGraph"></unifi-inventory-devices-graph><unifi-inventory-clients-graph ng-switch-when="clients" class="unifiDashboardGraph"></unifi-inventory-clients-graph><unifi-inventory-dpi-graph ng-switch-when="dpi" class="unifiDashboardGraph"></unifi-inventory-dpi-graph></div></li>'),b.join("")}},{"jade/runtime":232}],390:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDashboardWidget",["widgets",function(b){return{require:"^gridster",template:a("./dashboardWidget.jade")(),scope:{item:"=unifiDashboardWidgetItem",locked:"=unifiDashboardWidgetLocked"},link:function(a){a.widgets=b}}}])},{"./dashboardWidget.jade":389}],391:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){this.DEVICE_TYPES=v,this.devices=f,this.deviceDiscoveryUtils=k,this.system=r,this.tags=s,this.gatewayUtils=i,this.comparator=l,this.columnStore=m,this.filter=new j,this.defaultSortBy="state",this.getModelFeature=g.getModelFeature.bind(g),this.getRawDeviceState=h.getRawDeviceState.bind(h),this.getDeviceStatus=h.getDeviceStatus.bind(h),this.getDeviceModel=h.getDeviceModel.bind(h),this.isColumnVisible=this.columnStore.isColumnVisible.bind(this.columnStore),this.listeners={},e.call(this,a,p,q),this.allowBatchEdit=d.isEnabled("enableDevicesBatchEdit"),t(this,"batch:uap","batch:uap",o,n),u(this),this.deviceDiscoveryUtils.findDevicesIsVisible()&&!c.isEnabled("bypassAutoFindDevices")&&this.findDevices(!0),this.findDevicesIsVisible=this.deviceDiscoveryUtils.findDevicesIsVisible.bind(this.deviceDiscoveryUtils),this.findDevicesIsAvailable=this.deviceDiscoveryUtils.findDevicesIsAvailable.bind(this.deviceDiscoveryUtils)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initView=function(){e.prototype.initView.call(this),this.listeners.devices=this.devices.repository.collection.onUpdate(this.setFilterCounts.bind(this)),this.listeners.tags=this.tags.repository.collection.onUpdate(this.refreshIfSearchTag.bind(this)),this.setFilterCounts()},d.prototype.destroyView=function(){e.prototype.destroyView.call(this),Object.keys(this.listeners).forEach(function(a){this.listeners[a].stopListening()}.bind(this))},d.prototype.initFilters=function(){this.isFiltered=this.filter.isFiltered.bind(this.filter),this.getDeviceTypeFilter=this.filter.getDeviceTypeFilter.bind(this.filter),this.hasDeviceTypeFilter=this.filter.hasDeviceTypeFilter.bind(this.filter);var a=this.listState.getFilter("type");this.filter.setDeviceTypeFilter(a?a.split(","):void 0),this.columnGroup=this.listState.getFilter("view"),this.initFilterView(),this.refreshColumns()},d.prototype.initFilterView=function(){this.filterViewGroups=[],this.filterViewGroups.push({id:"deviceType",translationKey:"DEVICE_FILTER_TITLE_TYPE",items:[{id:"all",translationKey:"DEVICE_TYPE_FILTER_ALL",excludeFromSummary:!0,getCount:function(){return this.counts.all}.bind(this),isSelected:function(){return!this.getDeviceTypeFilter()}.bind(this),onSelect:function(){return this.clearDeviceTypeFilter()}.bind(this)},{id:"gatewaySwitches",translationKey:"DEVICE_TYPE_FILTER_GATEWAY_SWITCHES",getCount:function(){return this.counts.ugw+this.counts.usw}.bind(this),isSelected:function(){return this.hasDeviceTypeFilter([this.DEVICE_TYPES.GATEWAY,this.DEVICE_TYPES.SWITCH])}.bind(this),onSelect:function(){return this.setDeviceTypeFilter([this.DEVICE_TYPES.GATEWAY,this.DEVICE_TYPES.SWITCH])}.bind(this)},{id:"aps",translationKey:"DEVICE_TYPE_FILTER_APS",getCount:function(){return this.counts.uap}.bind(this),isSelected:function(){return this.hasDeviceTypeFilter([this.DEVICE_TYPES.AP])}.bind(this),onSelect:function(){return this.setDeviceTypeFilter([this.DEVICE_TYPES.AP])}.bind(this)},{id:"phones",translationKey:"DEVICE_TYPE_FILTER_PHONES",getCount:function(){return this.counts.uph}.bind(this),isSelected:function(){return this.hasDeviceTypeFilter([this.DEVICE_TYPES.PHONE])}.bind(this),onSelect:function(){return this.setDeviceTypeFilter([this.DEVICE_TYPES.PHONE])}.bind(this)}]}),this.filterViewGroups.push({id:"columnGroup",translationKey:"DEVICE_FILTER_TITLE_VIEW",excludeFromSummary:!0,isVisible:function(){return this.hasDeviceTypeFilter([this.DEVICE_TYPES.AP])&&!this.columnStore.getCustomized()}.bind(this),items:[{id:"overview",translationKey:"DEVICE_TYPE_FILTER_APS_OVERVIEW",isSelected:function(){return!this.getColumnGroup()}.bind(this),onSelect:function(){return this.clearColumnGroup()}.bind(this)},{id:"performance",translationKey:"DEVICE_TYPE_FILTER_APS_PERFORMANCE",isSelected:function(){return"performance"===this.getColumnGroup()}.bind(this),onSelect:function(){return this.setColumnGroup("performance")}.bind(this)},{id:"config",translationKey:"DEVICE_TYPE_FILTER_APS_CONFIG",isSelected:function(){return"config"===this.getColumnGroup()}.bind(this),onSelect:function(){return this.setColumnGroup("config")}.bind(this)}]})},d.prototype.setFilterCounts=function(){this.counts={all:this.devices.repository.collection.length,uap:0,ugw:0,usw:0,uph:0},this.devices.repository.collection.each(function(a){this.counts[a.get("type")]++}.bind(this))},d.prototype.setDeviceTypeFilter=function(a){this.beginStateChange(),this.listState.addFilter("type",a),this.filter.setDeviceTypeFilter(a),this.clearColumnGroup(),this.commitStateChange()},d.prototype.clearDeviceTypeFilter=function(){this.beginStateChange(),this.listState.removeFilter("type"),this.filter.clearDeviceTypeFilter(),this.clearColumnGroup(),this.commitStateChange()},d.prototype.getColumnGroup=function(){return this.columnGroup},d.prototype.setColumnGroup=function(a){this.beginStateChange(),this.listState.addFilter("view",a),this.columnGroup=a,this.commitStateChange()},d.prototype.clearColumnGroup=function(){this.beginStateChange(),this.listState.removeFilter("view"),this.columnGroup=void 0,this.commitStateChange()},d.prototype.refreshColumns=function(){this.isStateChanging()||(this.columnStore.setDeviceTypes(this.getDeviceTypeFilter()),this.columnStore.setColumnGroup(this.columnGroup),this.columnStore.setColumns())},d.prototype.refresh=function(a){return this.refreshColumns(),e.prototype.refresh.call(this,a)},d.prototype.refreshIfSearchTag=function(){this.filter.hasDeviceTagFilter()&&this.refresh()},d.prototype.onSearchTagChange=function(a){this.beginStateChange(),this.filter.setDeviceTagFilter(a),this.filter.updateSearchQuery(),this.commitStateChange()},d.prototype.getCollection=function(){return this.devices.repository.collection},d.prototype.getGatewayIp=function(a){return this.gatewayUtils.getIpByPortId("lan",a)||a.get("ip")},d.prototype.isBatchEditAllowed=function(a){return a.get("type")===this.DEVICE_TYPES.AP&&a.get("adopted")},d.prototype.findDevices=function(a){return this.deviceDiscoveryUtils.findDevices(a)},d.prototype.isFindingDevices=function(){return this.deviceDiscoveryUtils.isFindingDevices()},d.$inject=["$injector","$scope","bypass","featureFlag","devices","deviceFeatureUtils","deviceStateUtils","gatewayUtils","DeviceFilter","deviceDiscoveryUtils","manageDevicesComparator","deviceListColumnStore","BatchDeviceModel","DeviceCollection","CollectionView","preferences","system","tags","listBatchEditControllerMixin","listCollapsibleColumnControllerMixin","DEVICE_TYPES"],angular.module("app-unifi-manage").controller("DeviceListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],392:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters visible--lgUp"><unifi-ui-list-filter-buttons unifi-ui-list-filter-buttons-config="deviceListCtrl.filterViewGroups"></unifi-ui-list-filter-buttons></div><div class="appActionBarFilters visible--mdDown"><unifi-ui-list-filter-dropdown unifi-ui-list-filter-dropdown-config="deviceListCtrl.filterViewGroups" unifi-ui-list-filter-dropdown-filter-by-label="{{\'COMMON_LABEL_FILTER_BY\' | translate}}" unifi-ui-list-filter-dropdown-filter-by-all-label="{{\'COMMON_LABEL_FILTER_ALL\' | translate}}"></unifi-ui-list-filter-dropdown></div></div><div class="appActionBar__right"><div class="appActionBarFilters"><div ng-if="deviceListCtrl.findDevicesIsVisible()" class="appActionBarFilter"><div class="appTooltipContainer appTooltipContainer--hoverable"><button ng-class="{                    \'is-button-notifying\': deviceListCtrl.isFindingDevices()                  }" ng-click="deviceListCtrl.findDevices()" ng-disabled="!deviceListCtrl.findDevicesIsAvailable()" class="appMainButton appMainButton--primary appMainButton--cozy">{{deviceListCtrl.isFindingDevices() ? \'DEVICE_ACTIONS_FINDING_DEVICES\' : \'DEVICE_ACTIONS_FIND_DEVICES\' | translate}}</button><div ng-if="!deviceListCtrl.findDevicesIsAvailable()" class="appTooltip appTooltip--bottom">{{\'DEVICE_ACTIONS_FIND_DEVICES_INCOMPATIBLE_BROWSER_WARNING\' | translate}}</div></div></div><div class="appActionBarFilter appActionBarFilter--noBorder visible--lgUp"><a ng-if="deviceListCtrl.isBatchEditable() &amp;&amp; deviceListCtrl.getBatchEditCollection().length" unifi-open-panel="deviceListCtrl.getBatchEditModel()" unifi-open-panel-active-tab="\'configure\'" class="appMainButton appMainButton--cozy appMainButton--primary editBatchDevices"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT_SELECTED"></span></a></div><div ng-if="deviceListCtrl.hasDeviceTypeFilter([\'uap\'])" class="appActionBarFilter appActionBarFilter--noBorder"><button unifi-device-list-button-rolling-upgrade="deviceListCtrl.devices.repository.collection" unifi-device-list-button-rolling-upgrade-is-labeled="true" class="appMainButton appMainButton--primary appMainButton--cozy"></button></div><div class="appActionBarFilter appActionBarFilter--search"><form novalidate autocomplete="off" class="fullWidth"><unifi-device-search-with-tags-dropdown-list unifi-feature-flag-enable="enableApTagging" unifi-device-search-with-tags-dropdown-list-local-state="true" unifi-device-search-with-tags-dropdown-list-local-state-key="\'device-list-search\'" unifi-device-search-with-tags-dropdown-list-local-state-is-temporary="true" unifi-device-search-with-tags-dropdown-list-is-cozy="true" unifi-device-search-with-tags-dropdown-list-is-busy="deviceListCtrl.view.isRefreshing()" unifi-device-search-with-tags-dropdown-list-on-change="deviceListCtrl.onSearchQueryChange(searchQuery)" unifi-device-search-with-tags-dropdown-list-on-select="deviceListCtrl.onSearchTagChange(model)"></unifi-device-search-with-tags-dropdown-list><unifi-search unifi-feature-flag-disable="enableApTagging" unifi-search-on-change="deviceListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="deviceListCtrl.view.isRefreshing()"></unifi-search></form></div></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><table id="devicesTable" collection-view-sort="deviceListCtrl.view" ng-class="{          \'is-not-responsive\': deviceListCtrl.columnStore.getCustomized() || !deviceListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="unifiDevicesTable verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped appForm appForm--cozy"><thead><tr><td unifi-if-role-admin unifi-if-role-admin-and="::deviceListCtrl.isBatchEditable()" class="deviceCheckbox appTableCell--smash noPaddingTop"><input type="checkbox" name="deviceListSelectAllBatchEdit" ng-checked="deviceListCtrl.selectAllBatchEdit" ng-click="deviceListCtrl.toggleSelectAllBatchEdit()"></td><th collection-view-sort-by="state" class="alignCenter deviceStateIcon visible--smUp"></th><th collection-view-sort-by="name" ng-if="deviceListCtrl.isColumnVisible(\'name\')" class="deviceName"><span translate="DEVICE_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="mac" ng-if="deviceListCtrl.isColumnVisible(\'mac\')" class="deviceMacAddress visible--lgUp"><span translate="DEVICE_TABLE_HEADER_MAC_ADDRESS"></span></th><th collection-view-sort-by="ip" ng-if="deviceListCtrl.isColumnVisible(\'ip\')" class="deviceIp"><span translate="DEVICE_TABLE_HEADER_IP"></span></th><th collection-view-sort-by="stateString" ng-if="deviceListCtrl.isColumnVisible(\'stateString\')" class="deviceState"><span translate="DEVICE_TABLE_HEADER_STATUS"></span></th><th collection-view-sort-by="model" ng-if="deviceListCtrl.isColumnVisible(\'model\')" class="deviceModel visible--smUp"><span translate="DEVICE_TABLE_HEADER_MODEL"></span></th><th collection-view-sort-by="version" ng-if="deviceListCtrl.isColumnVisible(\'version\')" class="deviceVersion visible--mdUp"><span translate="DEVICE_TABLE_HEADER_VERSION"></span></th><th collection-view-sort-by="uptime" ng-if="deviceListCtrl.isColumnVisible(\'uptime\')" class="deviceUptime visible--lgUp"><span translate="DEVICE_TABLE_HEADER_UPTIME"></span></th><th collection-view-sort-by="clients" ng-if="deviceListCtrl.isColumnVisible(\'clients\')" class="deviceClients visible--mdUp"><span translate="DEVICE_TABLE_HEADER_CLIENTS"></span></th><th ng-if="deviceListCtrl.isColumnVisible(\'down\')" collection-view-sort-by="tx_bytes" class="deviceDown visible--lgUp"><span translate="DEVICE_TABLE_HEADER_DOWN"></span></th><th ng-if="deviceListCtrl.isColumnVisible(\'up\')" collection-view-sort-by="rx_bytes" class="deviceUp visible--lgUp"><span translate="DEVICE_TABLE_HEADER_UP"></span></th><th collection-view-sort-by="wlan2g" ng-if="deviceListCtrl.isColumnVisible(\'wlan2g\')" class="deviceWlan2g"><span translate="DEVICE_TABLE_HEADER_WLAN2G"></span></th><th collection-view-sort-by="wlan5g" ng-if="deviceListCtrl.isColumnVisible(\'wlan5g\')" class="deviceWlan5g"><span translate="DEVICE_TABLE_HEADER_WLAN5G"></span></th><th collection-view-sort-by="radio2g" ng-if="deviceListCtrl.isColumnVisible(\'radio2g\')" class="deviceRadio2g"><span translate="DEVICE_TABLE_HEADER_RADIO2G"></span></th><th collection-view-sort-by="radio5g" ng-if="deviceListCtrl.isColumnVisible(\'radio5g\')" class="deviceRadio5g"><span translate="DEVICE_TABLE_HEADER_RADIO5G"></span></th><th collection-view-sort-by="clients2g" ng-if="deviceListCtrl.isColumnVisible(\'clients2g\')" class="deviceClients2g"><span translate="DEVICE_TABLE_HEADER_2G_CLIENTS"></span></th><th collection-view-sort-by="clients5g" ng-if="deviceListCtrl.isColumnVisible(\'clients5g\')" class="deviceClients5g"><span translate="DEVICE_TABLE_HEADER_5G_CLIENTS"></span></th><th collection-view-sort-by="tx" ng-if="deviceListCtrl.isColumnVisible(\'tx\')" class="deviceTx"><span translate="DEVICE_TABLE_HEADER_TX"></span></th><th collection-view-sort-by="rx" ng-if="deviceListCtrl.isColumnVisible(\'rx\')" class="deviceRx"><span translate="DEVICE_TABLE_HEADER_RX"></span></th><th collection-view-sort-by="tx2g" ng-if="deviceListCtrl.isColumnVisible(\'tx2g\')" class="deviceTx2g visible--lgUp"><span translate="DEVICE_TABLE_HEADER_TX2G"></span></th><th collection-view-sort-by="tx5g" ng-if="deviceListCtrl.isColumnVisible(\'tx5g\')" class="deviceTx5g visible--lgUp"><span translate="DEVICE_TABLE_HEADER_TX5G"></span></th><th collection-view-sort-by="channel" ng-if="deviceListCtrl.isColumnVisible(\'channel\')" class="deviceChannel visible--mdUp"><span translate="DEVICE_TABLE_HEADER_CHANNEL"></span></th><th collection-view-sort-by="ng_cu_total" ng-if="deviceListCtrl.isColumnVisible(\'chutil2g\')" class="deviceChannelUtil2g visible--lgUp"><span translate="DEVICE_TABLE_HEADER_CHUTIL2G"></span></th><th collection-view-sort-by="na_cu_total" ng-if="deviceListCtrl.isColumnVisible(\'chutil5g\')" class="deviceChannelUtil5g visible--lgUp"><span translate="DEVICE_TABLE_HEADER_CHUTIL5G"></span></th><th unifi-if-role-admin class="deviceActions appTableCell--withAction"><span translate="DEVICE_TABLE_HEADER_ACTIONS"></span><span unifi-collapsible-table-icon="deviceListCtrl.collapsibleColumnKeyActions"></span><unifi-list-column-selector unifi-list-column-selector-with-batch-edit="deviceListCtrl.allowBatchEdit" unifi-list-column-selector-column-store="deviceListCtrl.columnStore"></unifi-list-column-selector></th><th unifi-if-role-admin="false" class="deviceActions appTableCell--isActionOnly"><unifi-list-column-selector unifi-list-column-selector-column-store="deviceListCtrl.columnStore"></unifi-list-column-selector></th></tr></thead><tfoot ng-if="deviceListCtrl.view.getModels().length"><tr><td colspan="{{::deviceListCtrl.columnStore.getColumns().length + 2 + (deviceListCtrl.isBatchEditable() ? 1 : 0)}}"><a ng-if="deviceListCtrl.isBatchEditable() &amp;&amp; deviceListCtrl.getBatchEditCollection().length" unifi-open-panel="deviceListCtrl.getBatchEditModel()" unifi-open-panel-active-tab="\'configure\'" class="appMainButton appMainButton--tertiary appMainButton--condensed verticalRhythmTop--condensed horizontalRhythm--cozy editBatchDevices"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT_SELECTED"></span></a><unifi-list-pagination unifi-list-pagination-current-page="deviceListCtrl.currentPage" unifi-list-pagination-page-size-options="[10, 25, 50, 100]" unifi-list-pagination-rows-per-page="deviceListCtrl.rowsPerPage" unifi-list-pagination-total-rows="deviceListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in deviceListCtrl.view.getModels(),              startFrom (deviceListCtrl.currentPage - 1) * deviceListCtrl.rowsPerPage,              limitTo deviceListCtrl.rowsPerPage" collection-view-repeat-watch-all="deviceListCtrl.columnStore.getColumns(); deviceListCtrl.isResponsive(); deviceListCtrl.isBatchEditable(); deviceListCtrl.isColumnCollapsed(deviceListCtrl.collapsibleColumnKeyActions)" data-id="{{::model.id}}" data-device-type="{{::model.get(\'type\')}}" data-is-managed="{{::model.get(\'adopted\')}}" ng-class="::{\'is-row-disabled\': model.get(\'disabled\') || [\'danger\', \'static\'].indexOf(deviceListCtrl.getDeviceStatus(model)) !== -1}" unifi-open-panel="::model" unifi-open-panel-active-tab="\'details\'" class="clickable"><td unifi-if-role-admin unifi-if-role-admin-and="::deviceListCtrl.isBatchEditable()" class="deviceCheckbox appTableCell--smash"><input type="checkbox" ng-checked="deviceListCtrl.isBatchEditSelected(model)" ng-click="deviceListCtrl.toggleBatchEdit(model); $event.stopPropagation();" ng-if="::deviceListCtrl.isBatchEditAllowed(model)"></td><td class="deviceStateIcon unifiDevicesTable__deviceIcon visible--smUp"><span unifi-device-icon="::model"></span></td><td ng-attr-title="{{::model.get(\'mac\')}}" ng-if="::deviceListCtrl.isColumnVisible(\'name\')" class="deviceName">{{::model.getDisplayName()}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'mac\')" class="deviceMacAddress visible--lgUp">{{::model.get(\'mac\')}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'ip\')" class="deviceIp"><a ng-init="gatewayIp = deviceListCtrl.getGatewayIp(model)" ng-if="::model.get(\'type\') === \'ugw\' &amp;&amp; !deviceListCtrl.system.isDemoMode()" ng-href="//{{::gatewayIp}}" ng-click="$event.stopPropagation()" target="_blank">{{::gatewayIp}}</a><span ng-if="::model.get(\'type\') !== \'ugw\' || deviceListCtrl.system.isDemoMode()">{{::model.get(\'ip\')}}</span></td><td ng-if="::deviceListCtrl.isColumnVisible(\'stateString\')" class="deviceState"><span unifi-device-status-badge="::model"></span></td><td ng-if="::deviceListCtrl.isColumnVisible(\'model\')" class="deviceModel visible--smUp">{{::deviceListCtrl.getDeviceModel(model)}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'version\')" class="deviceVersion visible--mdUp">{{::model.get(\'version\')}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'uptime\')" class="deviceUptime visible--lgUp">{{::model.get(\'uptime\') | seconds}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'clients\')" class="deviceClients visible--mdUp">{{::model.get(\'num_sta\')}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'down\')" class="deviceDown visible--lgUp">{{::model.get(\'tx_bytes\') | bytes}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'up\')" class="deviceUp visible--lgUp">{{::model.get(\'rx_bytes\') | bytes}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'wlan2g\')" class="deviceWlan2g">{{::model | wlanGroup: \'ng\'}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'wlan5g\')" class="deviceWlan5g">{{::model | wlanGroup: \'na\'}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'radio2g\')" class="deviceRadio2g">{{::model | radioChannelAndPower: \'ng\': true}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'radio5g\')" class="deviceRadio5g">{{::model | radioChannelAndPower: \'na\': true}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'clients2g\')" class="deviceClients2g">{{::model.get(\'ng-num_sta\')}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'clients5g\')" class="deviceClients5g">{{::model.get(\'na-num_sta\')}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'tx\')" class="deviceTx">{{::model.get(\'tx_bytes-d\') | bytes}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'rx\')" class="deviceRx">{{::model.get(\'rx_bytes-d\') | bytes}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'tx2g\')" class="deviceTx2g visible--lgUp"><unifi-tx-rate-status unifi-tx-rate-status-model="::model" unifi-tx-rate-status-radio="ng"></unifi-tx-rate-status></td><td ng-if="::deviceListCtrl.isColumnVisible(\'tx5g\')" class="deviceTx5g visible--lgUp"><unifi-tx-rate-status unifi-tx-rate-status-model="::model" unifi-tx-rate-status-radio="na"></unifi-tx-rate-status></td><td ng-if="::deviceListCtrl.isColumnVisible(\'channel\')" class="deviceChannel visible--mdUp">{{::model | channel}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'chutil2g\')" class="deviceChUtil2g visible--lgUp">{{::model | channelUtilization: \'ng\'}}</td><td ng-if="::deviceListCtrl.isColumnVisible(\'chutil5g\')" class="deviceChUtil5g visible--lgUp">{{::model | channelUtilization: \'na\'}}</td><td unifi-collapsible-table-cell="deviceListCtrl.collapsibleColumnKeyActions" unifi-collapsible-table-cell-bind-once="true" class="deviceActions appTableCell--actions"><div unifi-if-role-admin><button unifi-device-button-locate="::model" unifi-device-button-locate-with-map="true" unifi-device-button-locate-is-labeled="true" unifi-device-button-locate-is-responsive="::deviceListCtrl.isResponsive()" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button><button unifi-device-button-restart="::model" unifi-device-button-restart-is-labeled="true" unifi-device-button-restart-is-responsive="::deviceListCtrl.isResponsive()" unifi-device-button-restart-with-hard-reboot="::model.get(\'type\') === \'usw\' &amp;&amp; deviceListCtrl.getModelFeature(model, \'poe\') === true" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button><button unifi-device-button-adopt="::model" unifi-device-button-adopt-collection="::deviceListCtrl.devices.repository.collection" unifi-device-button-adopt-is-labeled="true" unifi-device-button-adopt-is-responsive="::deviceListCtrl.isResponsive()" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button><button unifi-device-button-upgrade="::model" unifi-device-button-upgrade-is-labeled="true" unifi-device-button-upgrade-is-responsive="::deviceListCtrl.isResponsive()" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button></div></td></tr></tbody></table><div ng-if="!deviceListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DEVICE_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!deviceListCtrl.isFiltered()" translate="DEVICE_TABLE_EMPTY_NO_DEVICES" class="noMarginBottom"></p><p ng-if="deviceListCtrl.isFiltered()" translate="DEVICE_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],393:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDeviceList",["PaginatedListDirective","listBatchEditDirectiveMixin",function(b,c){var d=new b("device",a("./deviceList.jade")());return d.addMixin(c),d}])},{"./deviceList.jade":392}],394:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.account=a,this.deviceStateUtils=b,this.mapDevices=c,this.mapFeatures=d,this.mapUtils=f,this.mapCoordinatesAssistant=g,this.MAP_FEATURES=h,this.selectedMap=f.getSelectedMap(),this.showToolbar=!1,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.showDeviceStatus=function(){return"success"!==this.getDeviceStatus()},d.prototype.getDeviceStatus=function(){return this.model?this.deviceStateUtils.getDeviceStatus(this.model):void 0},d.prototype.onModelChange=function(){},d.prototype.setOverlay=function(a){this.overlay=a},d.prototype.positionDevice=function(a){this.account.isAdmin()&&this.mapCoordinatesAssistant.getAssistantForMap(this.selectedMap).then(function(b){this.mapDevices.placeDevice(this.selectedMap,this.model,b.latLngToCoords(a))}.bind(this))},d.prototype.toggleToolbar=function(){this.showToolbar=!this.showToolbar},d.$inject=["account","deviceStateUtils","mapDevices","mapFeatures","mapUtils","mapCoordinatesAssistant","MAP_FEATURES"],angular.module("app-unifi-manage").controller("DeviceMarkerController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],395:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'unifiDeviceMarkerLocate\': deviceMarkerCtrl.model.get(\'locating\'),     \'unifiDeviceMarker--small\': deviceMarkerCtrl.mapFeatures.isEnabled(deviceMarkerCtrl.MAP_FEATURES.SMALL_ICONS)}" class="unifiDeviceMarker"><div unifi-device-icon="device" ng-click="deviceMarkerCtrl.toggleToolbar()" ng-dblclick="$event.stopImmediatePropagation()" class="unifiDeviceMarker__icon"></div><unifi-device-marker-label unifi-device="device"></unifi-device-marker-label><div ng-if="deviceMarkerCtrl.showDeviceStatus()" ng-class="\'unifiDeviceMarker__status-\' + deviceMarkerCtrl.getDeviceStatus()" class="unifiDeviceMarker__status alignCenter">!</div><unifi-device-marker-menu ng-show="deviceMarkerCtrl.showToolbar" unifi-device="device"></unifi-device-marker-menu></div>'),b.join("")}},{"jade/runtime":232}],396:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDeviceMarker",["account","mapUtils","DraggableOverlay","mapCoordinatesAssistant","$q",function(b,c,d,e,f){return{scope:{device:"=unifiDevice"},controller:"DeviceMarkerController",controllerAs:"deviceMarkerCtrl",require:["^atlasMap","unifiDeviceMarker"],template:a("./deviceMarker.jade")(),link:function(a,g,h,i){var j=a.device,k=i[0],l=i[1],m=c.getSelectedMap(),n=[k.getMap(),d,e.getAssistantForMap(m)];f.all(n).then(function(d){var e=d[0],f=d[1],h=d[2],i=c.getSelectedDevice();if(i&&j.id===i.id){var k=h.coordsToLatLng(i.getCoords());e.panTo(k)}var n=function(a,b){if(b){var c=h.coordsToLatLng(j.getCoords());e.panTo(c)}};j.on("change:locating",n);var o=function(a,c){q.setDragEnabled(b.isAdmin()&&!c)};j.on("change:locked",o);var p=g.children().get(0),q=new f(h.coordsToLatLng(j.getCoords()),p,l.positionDevice.bind(l));g.detach(),q.setDragEnabled(b.isAdmin()&&!j.get("locked")),q.setDragHandler(function(a){var b=h.latLngToCoords(a);j.set({x:b[0],y:b[1]})}),q.setMap(e),l.setOverlay(q);var r=function(){j.get("map_id")&&q.updatePosition(h.coordsToLatLng(j.getCoords()))};j.on("change:x change:y",r),m.on("change:upp change:unit",r),a.$on("$destroy",function(){j.off("change:x change:y",r),j.off("change:locating",n),j.off("change:locked",o),m.off("change:upp change:unit",r),q.setDragHandler(void 0),q.setMap(void 0)})}),a.$watch("device",function(a){l.updateModel(a)}),a.$on("$destroy",function(){l.removeEventHandlers(),l.overlay.setMap(void 0)})}}}])},{"./deviceMarker.jade":395}],397:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.clients=a,this.clientUplinkUtils=b,this.mapFeatures=c,this.DEVICE_TYPES=d,this.MAP_FEATURES=e,this.RADIO_TYPES=f}d.prototype.addEventHandlers=function(){this.listener=this.clients.repository.collection.onUpdate(this.countClients.bind(this)),this.countClients()},d.prototype.removeEventHandlers=function(){this.listener.stopListening()},d.prototype.countClients=function(){this.connectedClients=this.clients.repository.collection.filter(function(a){return this.model.get("mac")===this.clientUplinkUtils.getUplinkMac(a)}.bind(this)).reduce(function(a,b){return b.get("is_guest")?a.guests++:a.users++,a},{users:0,guests:0})},d.$inject=["clients","clientUplinkUtils","mapFeatures","DEVICE_TYPES","MAP_FEATURES","RADIO_TYPES"],angular.module("app-unifi-manage").controller("DeviceMarkerLabelController",d)},{}],398:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiDeviceMarkerLabel"><div ng-if="deviceMarkerLabelCtrl.mapFeatures.getLabelType() === deviceMarkerLabelCtrl.MAP_FEATURES.LABELS.SIMPLE" ng-class="{\'unifiDeviceMarkerLabel__box--cozy\': deviceMarkerLabelCtrl.mapFeatures.isEnabled(deviceMarkerLabelCtrl.MAP_FEATURES.SMALL_ICONS)}" class="unifiDeviceMarkerLabel__box">{{deviceMarkerLabelCtrl.model.getDisplayName()}}</div><div ng-if="deviceMarkerLabelCtrl.mapFeatures.getLabelType() === deviceMarkerLabelCtrl.MAP_FEATURES.LABELS.DETAILED" ng-class="{\'unifiDeviceMarkerLabel__box--cozy\': deviceMarkerLabelCtrl.mapFeatures.isEnabled(deviceMarkerLabelCtrl.MAP_FEATURES.SMALL_ICONS)}" class="unifiDeviceMarkerLabel__box"><div class="noVerticalMargin alignCenter">{{deviceMarkerLabelCtrl.model.get(\'name\') || \'MAP_DEVICE_MARKER_UNNAMED\' | translate}}</div><hr class="noMarginBottom"><div class="noVerticalMargin">{{\'MAP_DEVICE_MARKER_MAC\' | translate}}: {{deviceMarkerLabelCtrl.model.get(\'mac\')}}</div><div ng-if="deviceMarkerLabelCtrl.model.get(\'type\') === deviceMarkerLabelCtrl.DEVICE_TYPES.AP" class="noVerticalMargin"><div ng-if="deviceMarkerLabelCtrl.model.get(\'ng-channel\')" class="noVerticalMargin">{{\'MAP_DEVICE_MARKER_CHANNEL\' | translate}}: {{deviceMarkerLabelCtrl.model.get(\'ng-channel\')}} ({{deviceMarkerLabelCtrl.RADIO_TYPES.NG.type}})</div><div ng-if="deviceMarkerLabelCtrl.model.get(\'na-channel\')" class="noVerticalMargin">{{\'MAP_DEVICE_MARKER_CHANNEL\' | translate}}: {{deviceMarkerLabelCtrl.model.get(\'na-channel\')}} ({{deviceMarkerLabelCtrl.RADIO_TYPES.NA.type}})</div></div><div ng-if="deviceMarkerLabelCtrl.model.get(\'type\') !== deviceMarkerLabelCtrl.DEVICE_TYPES.GATEWAY" class="noVerticalMargin noUserSelect"><a unifi-open-property-panel="deviceMarkerLabelCtrl.model" unifi-open-property-panel-active-tab="\'users\'" unifi-open-property-panel-change-tab="true" class="unifiDeviceMarkerLabel__link">{{deviceMarkerLabelCtrl.connectedClients.users}} {{\'MAP_DEVICE_MARKER_USERS\' | translate}}</a><span>&nbsp;/&nbsp;</span><a unifi-open-property-panel="deviceMarkerLabelCtrl.model" unifi-open-property-panel-active-tab="\'guests\'" unifi-open-property-panel-change-tab="true" class="unifiDeviceMarkerLabel__link">{{deviceMarkerLabelCtrl.connectedClients.guests}} {{\'MAP_DEVICE_MARKER_GUESTS\' | translate}}</a></div></div></div>'),b.join("")}},{"jade/runtime":232}],399:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDeviceMarkerLabel",[function(){return{scope:{model:"=unifiDevice"},controller:"DeviceMarkerLabelController",controllerAs:"deviceMarkerLabelCtrl",template:a("./deviceMarkerLabel.jade")(),replace:!0,bindToController:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./deviceMarkerLabel.jade":398}],400:[function(a,b,c){"use strict";function d(a,b,c,d){this.account=a,this.deviceUtils=b,this.mapUtils=c,this.rfEnvironment=d,this.showToolbar=!1,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){},d.prototype.toggleLock=function(){var a=this.model.get("locked");this.deviceUtils.saveDevice(this.model,{locked:!a})},d.prototype.isRemovable=function(){return this.model&&!this.model.get("locked")&&this.account.isAdmin()},d.prototype.remove=function(){this.mapUtils.removeDevice(this.model)},d.prototype.isRfEnvironmentAvailable=function(){return!!this.model&&this.rfEnvironment.isAvailable(this.model)},d.$inject=["account","deviceUtils","mapUtils","rfEnvironment"],angular.module("app-unifi-manage").controller("DeviceMarkerMenuController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],401:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-mousedown="$event.stopImmediatePropagation(); $event.preventDefault();" ng-dblclick="$event.stopImmediatePropagation()" class="unifiDeviceMarkerToolbar"><button ng-click="deviceMarkerMenuCtrl.remove()" ng-disabled="!deviceMarkerMenuCtrl.isRemovable()" class="unifiDeviceMarkerToolbar__button"><span class="icon ubnt-icon--trash"></span></button><button ng-disabled="!deviceMarkerMenuCtrl.isRfEnvironmentAvailable()" unifi-open-panel="deviceMarkerMenuCtrl.model" unifi-open-panel-active-tab="\'details\'" unifi-open-panel-active-accordion-group="\'rfEnvironment\'" unifi-open-panel-change-tab="true" class="unifiDeviceMarkerToolbar__button"><span class="icon ubnt-icon--bars"></span></button><button unifi-open-panel="deviceMarkerMenuCtrl.model" unifi-open-panel-active-tab="\'details\'" unifi-open-panel-active-accordion-group="\'overview\'" class="unifiDeviceMarkerToolbar__button"><span class="icon ubnt-icon--gears"></span></button><button ng-disabled="deviceMarkerMenuCtrl.account.isReadOnly()" ng-click="deviceMarkerMenuCtrl.toggleLock()" class="unifiDeviceMarkerToolbar__button"><span ng-class="deviceMarkerMenuCtrl.model.get(\'locked\') ? \'ubnt-icon--lock-positive\' : \'ubnt-icon--lock-open\'" class="icon"></span></button></div>'),b.join("")}},{"jade/runtime":232}],402:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDeviceMarkerMenu",[function(){return{scope:{device:"=unifiDevice"},controller:"DeviceMarkerMenuController",controllerAs:"deviceMarkerMenuCtrl",template:a("./deviceMarkerMenu.jade")(),link:function(a,b,c,d){a.$watch("device",function(a){d.updateModel(a)}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./deviceMarkerMenu.jade":401}],403:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.$q=a,this.$translate=b,this.deviceAdoptStrategy=g,this.deviceStateUtils=c,this.frame=d,this.heyToasts=f,this.deviceUtils=h,this.DEVICE_STATES=j,this.patterns={ip:k.IP_ADDRESS},e.call(this,i)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.adopt=function(){var a={ip:this.adoptIp,port:this.modelCopy.attributes.sshd_port||"22",username:this.adoptUsername,password:this.adoptPassword,url:this.adoptUrl,sshKeyVerify:this.adoptSshKeyVerify};return this.$q.when(!a.sshKeyVerify&&this.hasSshHostKey()&&this.confirmUntrusted()).then(function(){return this.isAdopting=!0,this.deviceAdoptStrategy.advancedAdoptDevice(this.model,a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),this.isAdopting=!1,!1}.bind(this))}.bind(this))},d.prototype.getAdoptIp=function(){return this.model?this.model.get("adopt_ip")||this.model.get("ip"):null},d.prototype.getAdoptUrl=function(){return(this.model?this.model.get("adopt_url")||this.model.get("inform_url"):void 0)||"http://unifi:8080/inform"},d.prototype.confirmUntrusted=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_ADOPT_UNTRUSTED_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_ADOPT_UNTRUSTED_CONFIRM_MESSAGE")}.bind(this),options:function(){return{defaultCancel:!0}}})["catch"](function(){return this.adoptSshKeyVerify=!0,this.$q.reject()}.bind(this))},d.prototype.isSshHostKeyVerify=function(){if(this.model){var a=this.model.get("adopted"),b=this.deviceStateUtils.getRawDeviceState(this.model)===this.DEVICE_STATES.ADOPTION_FAILED,c=this.model.get("x_has_ssh_hostkey");return!!(a&&b&&c)}return!1},d.prototype.hasSshHostKey=function(){return!(!this.model||!this.model.get("x_has_ssh_hostkey"))},d.prototype.onModelChange=function(){this.isAdopting=!(!this.model||this.deviceStateUtils.getRawDeviceState(this.model)!==this.DEVICE_STATES.ADOPTING),this.adoptIpMaster=this.getAdoptIp(),this.adoptUrlMaster=this.getAdoptUrl()},d.prototype.reset=function(){e.prototype.reset.call(this),this.adoptIp=this.getAdoptIp(),this.adoptUrl=this.getAdoptUrl(),this.adoptUsername=null,this.adoptPassword=null,this.adoptSshKeyVerify=this.isSshHostKeyVerify()},d.$inject=["$q","$translate","deviceStateUtils","frame","heyToasts","deviceAdoptStrategy","deviceUtils","modelDivergence","DEVICE_STATES","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("DevicePropertiesAdoptController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],404:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiPanelItemContent__section"><h4 class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_ADVANCED_ADOPT\' | translate}}</div></h4><form novalidate autocomplete="off" name="devicePropertiesAdoptCtrl.form" ng-class="{      \'is-form-validation-visible\': devicePropertiesAdoptCtrl.showValidation,      \'is-validation-hidden\': !devicePropertiesAdoptCtrl.showValidation    }" ng-submit="devicePropertiesAdoptCtrl.form.$valid &amp;&amp; devicePropertiesAdoptCtrl.adopt()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="devicePropertiesAdoptCtrl.resolveDivergence()" unifi-config-changed-on-ignore="devicePropertiesAdoptCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="devicePropertiesAdoptCtrl.form.$error.divergent"></unifi-config-changed><div class="appFormGroup appFormGroup--condensed"><div class="flexRow"><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_IP_ADDRESS" class="appLabel--primary"></label><input type="text" name="adoptIp" ng-model="devicePropertiesAdoptCtrl.adoptIp" ng-model-master="devicePropertiesAdoptCtrl.adoptIpMaster" ng-pattern="devicePropertiesAdoptCtrl.patterns.ip" class="input--full"></div><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_PORT" class="appLabel--primary"></label><input type="text" name="adoptPort" ng-model="devicePropertiesAdoptCtrl.modelCopy.attributes.sshd_port" ng-model-master="devicePropertiesAdoptCtrl.model.attributes.sshd_port" class="input--full"></div></div><div class="flexRow"><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_USERNAME" class="appLabel--primary"></label><input type="text" name="adoptUsername" ng-model="devicePropertiesAdoptCtrl.adoptUsername" required class="input--full"></div><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_PASSWORD" class="appLabel--primary"></label><input type="password" name="adoptPassword" ng-model="devicePropertiesAdoptCtrl.adoptPassword" required unifi-password-reveal class="input--full"></div></div><div ng-if="devicePropertiesAdoptCtrl.hasSshHostKey()" class="flexRow"><div class="flexCol--12"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="adoptSshKeyVerify" id="adoptSshKeyVerify{{::directiveId}}" ng-model="devicePropertiesAdoptCtrl.adoptSshKeyVerify"><label for="adoptSshKeyVerify{{::directiveId}}" translate="DEVICE_PROPERTIES_LABEL_SSH_KEY" class="appLabel--half"></label></div></div></div><div class="flexRow"><div class="flexCol--12"><label translate="DEVICE_PROPERTIES_LABEL_INFORM_URL" class="appLabel--primary"></label><input type="text" name="adoptUrl" ng-model="devicePropertiesAdoptCtrl.adoptUrl" ng-model-master="devicePropertiesAdoptCtrl.adoptUrlMaster" class="input--full"></div></div></div><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="devicePropertiesAdoptCtrl.showValidation = true" busy-toggle="devicePropertiesAdoptCtrl.isAdopting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed adoptDevice">{{\'DEVICE_ACTIONS_ADOPT\' | translate}}</button><button type="button" ng-click="devicePropertiesAdoptCtrl.reset()" ng-disabled="devicePropertiesAdoptCtrl.isAdopting" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form></div>'),b.join("")}},{"jade/runtime":232}],405:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesAdopt",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDevicePropertiesAdopt"},controller:"DevicePropertiesAdoptController",controllerAs:"devicePropertiesAdoptCtrl",template:a("./devicePropertiesAdopt.jade")(),link:function(a,c,d,e){a.directiveId=a.$id,a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./devicePropertiesAdopt.jade":404}],406:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div class="unifiPanelItemContent"><div class="appInfoBox appInfoBox--cozy appInfoBox--collapsible appInfoBox--danger is-app-info-box-collapsed verticalRhythm--cozy verticalRhythmTop--condensed"><div class="appInfoBox__icon icon ubnt-icon--alert-fill"></div><div class="appInfoBox__content"><div class="appInfoBox__header">{{\'DEVICE_PROPERTIES_PENDING_CHANGES_BATCH_APPLY_ERROR\' | translate}}</div></div></div><div class="unifiPanelItemContent__section appScrollable flexFlag__body fullWidth"><ul class="list"><li ng-repeat="error in batchModel.get(\'error\')" ng-init="device = getDeviceByError(error)" class="verticalRhythm--cozy"><div class="iconText appIconText unifiDeviceIconText"><div unifi-device-icon="device" class="iconText__icon"></div><div class="iconText__text">{{device.getDisplayName() || error.id}}</div></div><div class="is-device-icon-text-aligned">{{getErrorMsg(error)}}</div></li></ul></div><button translate="COMMON_ACTIONS_DISMISS" ng-click="dismiss()" class="appMainButton appMainButton--cozy appMainButton--primary verticalRhythmTop--condensed"></button></div></div>'),b.join("")}},{"jade/runtime":232}],407:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesBatchError",["apiResults","devices",function(b,c){return{scope:{batchModel:"=unifiDevicePropertiesBatchError"},template:a("./devicePropertiesBatchError.jade")(),link:function(a){a.getDeviceByError=function(a){return c.repository.collection.get(a.id)},a.getErrorMsg=function(a){return b.translateErrorMsg(a)},a.dismiss=function(){a.batchModel.unset("success"),a.batchModel.unset("error")}}}}])},{"./devicePropertiesBatchError.jade":406}],408:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.clients=b,this.comparator=d,this.DEVICE_TYPES=g,this.filter=new c,this.rowsPerPage=h.model.getRowsPerPropertyPanel(),this.defaultSortBy="name",e.call(this,a,f,h)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){this.filter.setMacFilter(this.device.get("mac")),this.filter.setGuestFilter(this.isGuest)},d.prototype.getCollection=function(){return this.clients.repository.collection},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","clients","ClientFilter","clientsComparator","CollectionView","DEVICE_TYPES","preferences"],angular.module("app-unifi-manage").controller("DevicePropertiesClientListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],409:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-init="devicePropertiesClientListCtrl.isSwitch = (devicePropertiesClientListCtrl.device.get(\'type\') === devicePropertiesClientListCtrl.DEVICE_TYPES.SWITCH);           devicePropertiesClientListCtrl.isAP = (devicePropertiesClientListCtrl.device.get(\'type\') === devicePropertiesClientListCtrl.DEVICE_TYPES.AP);" class="unifiPanelItemContent__section appScrollable flexFlag__body fullWidth"><table collection-view-sort="devicePropertiesClientListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="name" class="clientName"><span ng-if="devicePropertiesClientListCtrl.isAP" translate="DEVICE_PROPERTIES_CLIENTS_TABLE_HEADER_NAME_WLAN"></span><span ng-if="devicePropertiesClientListCtrl.isSwitch" translate="DEVICE_PROPERTIES_CLIENTS_TABLE_HEADER_NAME"></span></th><th ng-if="devicePropertiesClientListCtrl.isAP" collection-view-sort-by="rssi" class="clientSignal"><span translate="DEVICE_PROPERTIES_CLIENTS_TABLE_HEADER_SIGNAL"></span></th><th ng-if="devicePropertiesClientListCtrl.isAP" collection-view-sort-by="tx_rate" class="clientTxRate"><span translate="DEVICE_PROPERTIES_CLIENTS_TABLE_HEADER_TX_RATE"></span></th><th ng-if="devicePropertiesClientListCtrl.isSwitch" collection-view-sort-by="ip" class="clientIp"><span translate="DEVICE_PROPERTIES_CLIENTS_TABLE_HEADER_IP"></span></th></tr></thead><tfoot ng-if="devicePropertiesClientListCtrl.view.getModels().length"><tr><td colspan="{{::devicePropertiesClientListCtrl.isAP ? 3 : 2}}"><unifi-micro-pagination unifi-micro-pagination-current-page="devicePropertiesClientListCtrl.currentPage" unifi-micro-pagination-rows-per-page="devicePropertiesClientListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="devicePropertiesClientListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in devicePropertiesClientListCtrl.view.getModels(),          startFrom (devicePropertiesClientListCtrl.currentPage - 1) * devicePropertiesClientListCtrl.rowsPerPage,          limitTo devicePropertiesClientListCtrl.rowsPerPage" data-id="{{::model.id}}" class="clickable"><td class="clientName"><a unifi-open-panel="model" unifi-open-panel-active-tab="\'details\'">{{::model.getDisplayName()}}</a><div ng-if="devicePropertiesClientListCtrl.isAP">{{::model.get(\'essid\')}}</div></td><td ng-if="devicePropertiesClientListCtrl.isAP" class="clientSignal">{{::model.get(\'rssi\') | rssiToDbm}}</td><td ng-if="devicePropertiesClientListCtrl.isAP" class="clientTxRate">{{::model.get(\'tx_rate\') | rxtx}}</td><td ng-if="devicePropertiesClientListCtrl.isSwitch" class="clientIp">{{::model.get(\'ip\')}}</td></tr></tbody></table><div ng-if="!devicePropertiesClientListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p ng-if="!devicePropertiesClientListCtrl.isGuest" translate="DEVICE_PROPERTIES_CLIENTS_TABLE_EMPTY_NO_USERS" class="noMarginBottom"></p><p ng-if="devicePropertiesClientListCtrl.isGuest" translate="DEVICE_PROPERTIES_CLIENTS_TABLE_EMPTY_NO_GUESTS" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],410:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesClientList",["PaginatedListDirective",function(b){return new b("devicePropertiesClient",a("./devicePropertiesClientList.jade")(),{device:"=unifiDevicePropertiesClientListDevice",isGuest:"=unifiDevicePropertiesClientListIsGuest"})}])},{"./devicePropertiesClientList.jade":409}],411:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.$q=a,this.$translate=b,this.deviceUtils=c,this.deviceBatchUtils=d,this.settings=f,this.sites=g,this.frame=h,this.heyToasts=i,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initBatchEdit=function(){this.isBatchEdit=!0},d.prototype.updateBatchModel=function(a){this.batchModel=a},d.prototype.customUpgradeAvailable=function(){var a=this.settings.getSettingFromKey("mgmt");return!a||!a.get("auto_upgrade")},d.prototype.customUpgrade=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_CUSTOM_UPGRADE_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_CUSTOM_UPGRADE_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isSubmitting=!0,(this.isBatchEdit?this.deviceBatchUtils.upgradeDevices(this.batchModel,this.url):this.deviceUtils.upgradeDevice(this.model,this.url)).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))}.bind(this))},d.prototype.isSubmitAllowed=function(){return this.form.$valid&&!this.form.$pristine},d.prototype.onModelChange=function(){},d.$inject=["$q","$translate","deviceUtils","deviceBatchUtils","settings","sites","frame","heyToasts"],angular.module("app-unifi-manage").controller("DevicePropertiesConfigureCustomUpgradeController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],412:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate name="devicePropertiesConfigureCustomUpgradeCtrl.form" ng-class="{    \'is-form-validation-visible\': devicePropertiesConfigureCustomUpgradeCtrl.showValidation,    \'is-validation-hidden\': !devicePropertiesConfigureCustomUpgradeCtrl.showValidation  }" ng-submit="devicePropertiesConfigureCustomUpgradeCtrl.isSubmitAllowed() &amp;&amp; devicePropertiesConfigureCustomUpgradeCtrl.customUpgrade()" class="appForm appForm--cozy unifiPanelItemForm positionRelative"><div ng-if="isOpen" unifi-upgrading-whiteout-notice="::devicePropertiesConfigureCustomUpgradeCtrl.model"></div><p ng-if="devicePropertiesConfigureCustomUpgradeCtrl.customUpgradeAvailable()" class="verticalRhythm--cozy">{{\'DEVICE_ACTIONS_CUSTOM_UPGRADE_INFO\' | translate}}</p><p ng-if="!devicePropertiesConfigureCustomUpgradeCtrl.customUpgradeAvailable()" class="verticalRhythm--cozy">{{\'DEVICE_ACTIONS_CUSTOM_UPGRADE_DISABLED_INFO\' | translate}}</p><fieldset class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><input type="url" name="url" ng-model="devicePropertiesConfigureCustomUpgradeCtrl.url" ng-disabled="!devicePropertiesConfigureCustomUpgradeCtrl.customUpgradeAvailable()" required placeholder="{{ \'DEVICE_ACTIONS_CUSTOM_UPGRADE_PLACEHOLDER\' | translate }}" class="input--full"><div ng-show="devicePropertiesConfigureCustomUpgradeCtrl.form.url.$error.url" translate="VALIDATION_HINT_URL" class="appInputFeedback appInputFeedback--danger"></div><div ng-show="devicePropertiesConfigureCustomUpgradeCtrl.form.url.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></fieldset><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="devicePropertiesConfigureCustomUpgradeCtrl.showValidation = true" ng-disabled="!devicePropertiesConfigureCustomUpgradeCtrl.customUpgradeAvailable()" busy-toggle="devicePropertiesConfigureCustomUpgradeCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed customUpgradeDevice"><span class="button__icon icon ubnt-icon--download-2"></span><span>{{\'DEVICE_ACTIONS_CUSTOM_UPGRADE\' | translate}}</span></button></div></div></form>'),b.join("")}},{"jade/runtime":232}],413:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesConfigureCustomUpgrade",["updateModelDirectiveMixin","devicePropertiesConfigureBatchDirectiveMixin",function(b,c){return{scope:{model:"=unifiDevicePropertiesConfigureCustomUpgrade",withBatch:"=unifiDevicePropertiesConfigureCustomUpgradeWithBatch",isOpen:"=unifiDevicePropertiesConfigureCustomUpgradeIsOpen"},controller:"DevicePropertiesConfigureCustomUpgradeController",controllerAs:"devicePropertiesConfigureCustomUpgradeCtrl",template:a("./devicePropertiesConfigureCustomUpgrade.jade")(),link:function(a,d,e,f){a.$watch("withBatch",function(a){f.updateBatchModel(a)}),a.$on("$destroy",function(){f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./devicePropertiesConfigureCustomUpgrade.jade":412}],414:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.windowPanels=a,this.TerminalAdapter=c,this.isConnecting=!1,[d.TERMINAL_CONNECTION_ERROR,d.TERMINAL_CONNECTED].forEach(function(a){b.$on(a,function(){this.isConnecting=!1}.bind(this))}.bind(this)),b.$on(f.TERMINAL_PANEL_CLOSE,function(a,b){b.get("mac")===this.model.get("mac")&&(this.isConnecting=!1)}.bind(this)),e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.openTerminal=function(){var a=this.windowPanels.itemState.getItemAndTypeId(this.model);this.windowPanels.getItemById(a)["catch"](function(){this.isConnecting=!0,this.windowPanels.addItem(this.model,[{state:"debugTerminal",value:!0,overwrite:!0}])}.bind(this))},d.prototype.onModelChange=function(){},d.$inject=["windowPanels","$scope","TerminalAdapter","TERMINAL_EVENTS","UNIFI_TERMINAL_EVENTS"],angular.module("app-unifi-manage").controller("DevicePropertiesConfigureDebugTerminalController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],415:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appForm appForm--cozy unifiPanelItemForm"><p class="verticalRhythm--cozy">{{\'DEVICE_ACTIONS_DEBUG_TERMINAL_INFO\' | translate}}</p><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="devicePropertiesConfigureDebugTerminalCtrl.openTerminal()" busy-toggle="devicePropertiesConfigureDebugTerminalCtrl.isConnecting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed debugTerminalDevice">{{\'DEVICE_ACTIONS_DEBUG_TERMINAL\' | translate}}</button></div></div></div>'),b.join("")}},{"jade/runtime":232}],416:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesConfigureDebugTerminal",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDevicePropertiesConfigureDebugTerminal",isOpen:"=unifiDevicePropertiesConfigureDebugTerminalIsOpen"},controller:"DevicePropertiesConfigureDebugTerminalController",controllerAs:"devicePropertiesConfigureDebugTerminalCtrl",template:a("./devicePropertiesConfigureDebugTerminal.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./devicePropertiesConfigureDebugTerminal.jade":415}],417:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.deviceUtils=b,this.deviceBatchUtils=c,this.frame=d,this.heyToasts=f,this.apiResults=g,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initBatchEdit=function(){this.isBatchEdit=!0},d.prototype.updateBatchModel=function(a){this.batchModel=a;
},d.prototype.toggle=function(){if(this.model)return this.isDisabled()?this.isBatchEdit?this.enableBatch():this.enable():this.isBatchEdit?this.disableBatch():this.disable()},d.prototype.isDisabled=function(){return this.forceToEnable||!this.forceToDisable&&this.model&&this.model.get("disabled")||!1},d.prototype.disable=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_DISABLE_CONFIRM_TITLE",{deviceName:this.model.getDisplayName()})}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_DISABLE_CONFIRM_MESSAGE",{deviceName:this.model.getDisplayName()})}.bind(this),options:angular.noop}).then(function(){return this.isDisabling=!0,this.deviceUtils.saveDevice(this.model,{disabled:!0},{wait:!0}).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DEVICE_ACTIONS_DISABLE_SUCCESS",{deviceName:this.model.getDisplayName()}))}.bind(this))["catch"](function(a){this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("DEVICE_ACTIONS_DISABLE_ERROR",{deviceName:this.model.getDisplayName()}),a))}.bind(this))["finally"](function(){this.isDisabling=!1}.bind(this))}.bind(this))},d.prototype.enable=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_ENABLE_CONFIRM_TITLE",{deviceName:this.model.getDisplayName()})}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_ENABLE_CONFIRM_MESSAGE",{deviceName:this.model.getDisplayName()})}.bind(this),options:angular.noop}).then(function(){return this.isEnabling=!0,this.deviceUtils.saveDevice(this.model,{disabled:!1},{wait:!0}).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DEVICE_ACTIONS_ENABLE_SUCCESS",{deviceName:this.model.getDisplayName()}))}.bind(this))["catch"](function(a){this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("DEVICE_ACTIONS_ENABLE_ERROR",{deviceName:this.model.getDisplayName()}),a))}.bind(this))["finally"](function(){this.isEnabling=!1}.bind(this))}.bind(this))},d.prototype.disableBatch=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_BATCH_DISABLE_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_BATCH_DISABLE_CONFIRM_MESSAGE",{count:this.batchModel.countCollectionAttrValue("disabled",!1,!0)},"messageformat")}.bind(this),options:angular.noop}).then(function(){return this.isDisabling=!0,this.deviceBatchUtils.saveDevices(this.batchModel,{disabled:!0},{wait:!0}).then(function(a){(this.batchModel.get("error")||[]).length?this.heyToasts.pushWarning(a):this.heyToasts.pushSuccess(a)}.bind(this))["catch"](function(a){this.heyToasts.pushError(a)}.bind(this))["finally"](function(){this.isDisabling=!1}.bind(this))}.bind(this))},d.prototype.enableBatch=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_BATCH_ENABLE_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_BATCH_ENABLE_CONFIRM_MESSAGE",{count:this.batchModel.countCollectionAttrValue("disabled",!0)},"messageformat")}.bind(this),options:angular.noop}).then(function(){return this.isEnabling=!0,this.deviceBatchUtils.saveDevices(this.batchModel,{disabled:!1},{wait:!0}).then(function(a){(this.batchModel.get("error")||[]).length?this.heyToasts.pushWarning(a):this.heyToasts.pushSuccess(a)}.bind(this))["catch"](function(a){this.heyToasts.pushError(a)}.bind(this))["finally"](function(){this.isEnabling=!1}.bind(this))}.bind(this))},d.prototype.onModelChange=function(){},d.$inject=["$translate","deviceUtils","deviceBatchUtils","frame","heyToasts","apiResults"],angular.module("app-unifi-manage").controller("DevicePropertiesConfigureDisableController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],418:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate name="devicePropertiesConfigureDisableCtrl.form" class="appForm appForm--cozy unifiPanelItemForm"><p class="verticalRhythm--cozy">{{devicePropertiesConfigureDisableCtrl.isDisabled() ? (devicePropertiesConfigureDisableCtrl.isBatchEdit ? \'DEVICE_ACTIONS_ENABLE_BATCH_INFO\' : \'DEVICE_ACTIONS_ENABLE_INFO\') : \'DEVICE_ACTIONS_DISABLE_INFO\' | translate}}</p><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="devicePropertiesConfigureDisableCtrl.toggle()" busy-toggle="devicePropertiesConfigureDisableCtrl.isEnabling || devicePropertiesConfigureDisableCtrl.isDisabling" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed disableDevice">{{devicePropertiesConfigureDisableCtrl.isDisabled() ? \'DEVICE_ACTIONS_ENABLE\' : \'DEVICE_ACTIONS_DISABLE\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],419:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesConfigureDisable",["updateModelDirectiveMixin","devicePropertiesConfigureBatchDirectiveMixin",function(b,c){return{scope:{model:"=unifiDevicePropertiesConfigureDisable",withBatch:"=unifiDevicePropertiesConfigureDisableWithBatch",forceToEnable:"=unifiDevicePropertiesConfigureDisableForceToEnable",forceToDisable:"=unifiDevicePropertiesConfigureDisableForceToDisable",isOpen:"=unifiDevicePropertiesConfigureDisableIsOpen"},controller:"DevicePropertiesConfigureDisableController",controllerAs:"devicePropertiesConfigureDisableCtrl",template:a("./devicePropertiesConfigureDisable.jade")(),link:function(a,d,e,f){f.forceToEnable=a.forceToEnable,f.forceToDisable=a.forceToDisable,a.$watch("withBatch",function(a){f.updateBatchModel(a)}),a.$on("$destroy",function(){f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./devicePropertiesConfigureDisable.jade":418}],420:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.$q=a,this.$translate=b,this.sites=c,this.siteUtils=d,this.deviceUtils=f,this.deviceBatchUtils=g,this.frame=h,this.heyToasts=i,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initBatchEdit=function(){this.isBatchEdit=!0},d.prototype.updateBatchModel=function(a){this.batchModel=a},d.prototype.getMoveToSites=function(){var a=(this.siteUtils.getActiveSite()||{}).id;return this.sites.repository.collection.filter(function(b){return!b.get("attr_hidden")&&b.id!==a})},d.prototype.move=function(){if(this.moveToSiteId){var a=this.sites.repository.collection.get(this.moveToSiteId);return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_MOVE_CONFIRM_TITLE",{siteDesc:a.get("desc")})}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_MOVE_CONFIRM_MESSAGE",{siteDesc:a.get("desc")})}.bind(this),options:angular.noop}).then(function(){return this.deviceUtils.moveDevice(this.model,a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))}.bind(this))["finally"](function(){this.moveToSiteId=null}.bind(this))}return this.$q.reject()},d.prototype.forget=function(){var a,b;return this.isBatchEdit?(a=["DEVICE_ACTIONS_BATCH_FORGET_CONFIRM_TITLE"],b=["DEVICE_ACTIONS_BATCH_FORGET_CONFIRM_MESSAGE",{count:this.batchModel.get("collection").length},"messageformat"]):(a=["DEVICE_ACTIONS_FORGET_CONFIRM_TITLE",{deviceName:this.model.getDisplayName()}],b=["DEVICE_ACTIONS_FORGET_CONFIRM_MESSAGE",{deviceName:this.model.getDisplayName()}]),this.frame.show("confirm",{title:function(){return this.$translate.instant.apply(this.$translate,a)}.bind(this),message:function(){return this.$translate.instant.apply(this.$translate,b)}.bind(this),options:angular.noop}).then(function(){return this.isForgetting=!0,(this.isBatchEdit?this.deviceBatchUtils.forgetDevices(this.batchModel):this.deviceUtils.forgetDevice(this.model)).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isForgetting=!1}.bind(this))}.bind(this))},d.prototype.onModelChange=function(){},d.$inject=["$q","$translate","sites","siteUtils","deviceUtils","deviceBatchUtils","frame","heyToasts"],angular.module("app-unifi-manage").controller("DevicePropertiesConfigureForgetController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],421:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate name="devicePropertiesConfigureForgetCtrl.form" class="appForm appForm--cozy unifiPanelItemForm positionRelative"><div ng-if="isOpen" unifi-upgrading-whiteout-notice="::devicePropertiesConfigureForgetCtrl.model"></div><p class="verticalRhythm--cozy">{{\'DEVICE_ACTIONS_FORGET_INFO\' | translate}}</p><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="devicePropertiesConfigureForgetCtrl.forget()" busy-toggle="devicePropertiesConfigureForgetCtrl.isForgetting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed forgetDevice">{{\'DEVICE_ACTIONS_FORGET\' | translate}}</button></div><div ng-if="!devicePropertiesConfigureForgetCtrl.isBatchEdit" class="appFormFooter__right"><select ng-init="sites = devicePropertiesConfigureForgetCtrl.getMoveToSites()" ng-show="sites.length" ng-model="devicePropertiesConfigureForgetCtrl.moveToSiteId" ng-change="devicePropertiesConfigureForgetCtrl.move()" ng-options="site.get(\'desc\') for site in sites track by site.id" class="moveDevice"><option unifi-option-placeholder="DEVICE_ACTIONS_MOVE_OPTION"></option></select></div></div></form>'),b.join("")}},{"jade/runtime":232}],422:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesConfigureForget",["updateModelDirectiveMixin","devicePropertiesConfigureBatchDirectiveMixin",function(b,c){return{scope:{model:"=unifiDevicePropertiesConfigureForget",withBatch:"=unifiDevicePropertiesConfigureForgetWithBatch",isOpen:"=unifiDevicePropertiesConfigureForgetIsOpen"},controller:"DevicePropertiesConfigureForgetController",controllerAs:"devicePropertiesConfigureForgetCtrl",template:a("./devicePropertiesConfigureForget.jade")(),link:function(a,d,e,f){a.$watch("withBatch",function(a){f.updateBatchModel(a)}),a.$on("$destroy",function(){f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./devicePropertiesConfigureForget.jade":421}],423:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.deviceUtils=b,this.heyToasts=c,this.apiResults=f,this.patterns={name:g.NAME},this.ledOptions=[{value:void 0,translationKey:"DEVICE_PROPERTIES_VALUES_KEEP_EXISTING",isAvailable:!1,isBatch:!0},{value:"default",translationKey:"DEVICE_PROPERTIES_VALUES_USE_SITE_SETTINGS",isAvailable:!0},{value:"on",translationKey:"COMMON_TOGGLE_ON",isAvailable:!0},{value:"off",translationKey:"COMMON_TOGGLE_OFF",isAvailable:!0}],e.call(this,d)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initBatchEdit=function(){this.isBatchEdit=!0,this.ledOptions.forEach(function(a){a.isBatch&&(a.isAvailable=!0)})},d.prototype.isSaveDisabled=function(){return this.isBatchEdit&&void 0===this.modelCopy.attributes.led_override},d.prototype.save=function(){this.isSubmitting=!0;var a={led_override:this.modelCopy.attributes.led_override};this.isBatchEdit||(a.name=this.modelCopy.attributes.name||this.modelCopy.attributes.mac);var b=this.isSaveQueued?"pending":void 0;return this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:b,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a,b){var c=a?"":"Copy";if(this.masterWithDefaults=this.masterWithDefaults||{},this["model"+c]){var d=a||!this.isSaveQueued?void 0:{delegateTo:"pending"},e={};b&&b.indexOf("led_override")===-1||void 0!==(e.led_override=this.model?this.model.get("led_override",d):void 0)||this.isBatchEdit||(e.led_override="default"),angular.extend(a?this.masterWithDefaults:this.modelCopy.attributes,e)}},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.resetModelCopyAttrs=function(a){e.prototype.resetModelCopyAttrs.call(this,a),this.setDefaultAttrs(!1,a)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","deviceUtils","heyToasts","modelDivergence","apiResults","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("DevicePropertiesConfigureGeneralController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],424:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="devicePropertiesConfigureGeneralCtrl.form" ng-class="{    \'is-form-validation-visible\': devicePropertiesConfigureGeneralCtrl.showValidation,    \'is-validation-hidden\': !devicePropertiesConfigureGeneralCtrl.showValidation  }" ng-submit="devicePropertiesConfigureGeneralCtrl.form.$valid &amp;&amp; devicePropertiesConfigureGeneralCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="devicePropertiesConfigureGeneralCtrl.resolveDivergence()" unifi-config-changed-on-ignore="devicePropertiesConfigureGeneralCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; devicePropertiesConfigureGeneralCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div ng-if="!devicePropertiesConfigureGeneralCtrl.isBatchEdit" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_ALIAS" class="appLabel--primary"></label><input type="text" name="deviceName" ng-model="devicePropertiesConfigureGeneralCtrl.modelCopy.attributes.name" ng-model-master="devicePropertiesConfigureGeneralCtrl.model.attributes.name" ng-pattern="devicePropertiesConfigureGeneralCtrl.patterns.name" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_LED" class="appLabel--primary"></label><div class="appInputGroup"><div ng-repeat="option in devicePropertiesConfigureGeneralCtrl.ledOptions" ng-if="option.isAvailable" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="led" id="led{{option.value + \'-\' + directiveId}}" ng-model="devicePropertiesConfigureGeneralCtrl.modelCopy.attributes.led_override" ng-model-master="devicePropertiesConfigureGeneralCtrl.masterWithDefaults.led_override" ng-value="option.value"><label for="led{{option.value + \'-\' + directiveId}}" translate="{{option.translationKey}}"></label></div></div></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="devicePropertiesConfigureGeneralCtrl.showValidation = true" busy-toggle="devicePropertiesConfigureGeneralCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="devicePropertiesConfigureGeneralCtrl.isSaveDisabled()" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{devicePropertiesConfigureGeneralCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-click="devicePropertiesConfigureGeneralCtrl.reset()" ng-disabled="devicePropertiesConfigureGeneralCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],425:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesConfigureGeneral",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin","devicePropertiesConfigureBatchDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiDevicePropertiesConfigureGeneral",withBatch:"=unifiDevicePropertiesConfigureGeneralWithBatch",isOpen:"=unifiDevicePropertiesConfigureGeneralIsOpen",isReadOnly:"=unifiDevicePropertiesConfigureGeneralIsReadOnly",isBatch:"=unifiDevicePropertiesConfigureGeneralIsBatch",isSaveQueued:"=unifiDevicePropertiesConfigureGeneralIsSaveQueued",group:"@unifiDevicePropertiesConfigureGeneralGroup"},controller:"DevicePropertiesConfigureGeneralController",controllerAs:"devicePropertiesConfigureGeneralCtrl",template:a("./devicePropertiesConfigureGeneral.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.$on("$destroy",function(){g.removeEventHandlers()}),b.init(a,e,f,g,!0),c.init(a,e,f,g),d.init(a,e,f,g)}}}])},{"./devicePropertiesConfigureGeneral.jade":424}],426:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.deviceUtils=b,this.deviceFeatureUtils=c,this.apiResults=g,this.connectionTypeOptions=[{value:"dhcp",translationKey:"DEVICE_PROPERTIES_VALUES_NETWORK_USING_DHCP"},{value:"static",translationKey:"DEVICE_PROPERTIES_VALUES_NETWORK_STATIC_IP"}],e.call(this,a,d,f,h)}var e=a("../../controllers/BaseConfigureNetworkController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=this.getAttrsToSave(),b=this.isSaveQueued?"pending":void 0;return this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:b,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.onModelChange=function(){e.prototype.onModelChange.call(this),this.isLinkAggregationGroupSupported=this.deviceFeatureUtils.isLinkAggregationGroupSupported(this.model)},d.$inject=["$translate","deviceUtils","deviceFeatureUtils","heyToasts","modelDivergence","apiResults","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("DevicePropertiesConfigureNetworkController",d)},{"../../controllers/BaseConfigureNetworkController":997}],427:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="devicePropertiesConfigureNetworkCtrl.form" ng-class="{    \'is-form-validation-visible\': devicePropertiesConfigureNetworkCtrl.showValidation,    \'is-validation-hidden\': !devicePropertiesConfigureNetworkCtrl.showValidation  }" ng-submit="devicePropertiesConfigureNetworkCtrl.form.$valid &amp;&amp; devicePropertiesConfigureNetworkCtrl.save()" unifi-form-group-warnings unifi-form-group-warnings-group="\'network\'" unifi-form-group-warnings-validator="devicePropertiesConfigureNetworkCtrl.validator" unifi-form-group-warnings-model="devicePropertiesConfigureNetworkCtrl.modelCopy" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="devicePropertiesConfigureNetworkCtrl.resolveDivergence()" unifi-config-changed-on-ignore="devicePropertiesConfigureNetworkCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; devicePropertiesConfigureNetworkCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_CONFIGURE_IP" class="appLabel--primary"></label><select name="connectionType" ng-model="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.type" ng-model-master="devicePropertiesConfigureNetworkCtrl.model.attributes.config_network.type" ng-options="connection.value as connection.translationKey | translate for connection in devicePropertiesConfigureNetworkCtrl.connectionTypeOptions" unifi-form-group-warnings-input unifi-form-group-warnings-input-attr="\'config_network\'" class="select--full"></select></div></fieldset><fieldset ng-if="devicePropertiesConfigureNetworkCtrl.showTypeForm === \'static\'" ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="flexRow noMarginBottom"><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_IP_ADDRESS" class="appLabel--primary"></label><input type="text" name="staticIpAddress" ng-model="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.ip" ng-model-master="devicePropertiesConfigureNetworkCtrl.model.attributes.config_network.ip" ng-model-master-cleanup="true" ng-pattern="devicePropertiesConfigureNetworkCtrl.patterns.ipAddress" ng-required="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.type === \'static\'" unifi-form-group-warnings-input unifi-form-group-warnings-input-attr="\'config_network\'" unifi-form-group-warnings-input-class="\'with-validation-meter without-standard-validation is-input-warning\'" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_SUBNET_MASK" class="appLabel--primary"></label><input type="text" name="staticNetmask" ng-model="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.netmask" ng-model-master="devicePropertiesConfigureNetworkCtrl.model.attributes.config_network.netmask" ng-model-master-cleanup="true" unifi-validate-netmask="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.ip" ng-required="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.type === \'static\'" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_GATEWAY" class="appLabel--primary"></label><input type="text" name="staticGateway" ng-model="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.gateway" ng-model-master="devicePropertiesConfigureNetworkCtrl.model.attributes.config_network.gateway" ng-model-master-cleanup="true" ng-pattern="devicePropertiesConfigureNetworkCtrl.patterns.ipAddress" unifi-form-group-warnings-input unifi-form-group-warnings-input-attr="\'config_network\'" unifi-form-group-warnings-input-class="\'with-validation-meter without-standard-validation is-input-warning\'" class="input--full"></div></div><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PREFERRED_DNS" class="appLabel--primary"></label><input type="text" name="staticPreferredDns" ng-model="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.dns1" ng-model-master="devicePropertiesConfigureNetworkCtrl.model.attributes.config_network.dns1" ng-model-master-cleanup="true" ng-pattern="devicePropertiesConfigureNetworkCtrl.patterns.ipAddress" unifi-form-group-warnings-input unifi-form-group-warnings-input-attr="\'config_network\'" unifi-form-group-warnings-input-class="\'with-validation-meter without-standard-validation is-input-warning\'" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_ALTERNATE_DNS" class="appLabel--primary"></label><input type="text" name="staticAlternateDns" ng-model="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.dns2" ng-model-master="devicePropertiesConfigureNetworkCtrl.model.attributes.config_network.dns2" ng-model-master-cleanup="true" ng-pattern="devicePropertiesConfigureNetworkCtrl.patterns.ipAddress" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_DNS_SUFFIX" class="appLabel--primary"></label><input type="text" name="staticDnsSuffix" ng-model="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.dnssuffix" ng-model-master="devicePropertiesConfigureNetworkCtrl.model.attributes.config_network.dnssuffix" ng-model-master-cleanup="true" class="input--full"></div></div></div></fieldset><fieldset ng-disabled="isReadOnly" ng-show="devicePropertiesConfigureNetworkCtrl.isLinkAggregationGroupSupported" class="appFieldset appFieldset--quiet verticalRhythmTop--cozy"><label translate="DEVICE_PROPERTIES_LABEL_PORT_AGGREGATION" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--comfy"><input type="checkbox" name="bondingEnabled" id="bondingEnabled{{::directiveId}}" ng-model="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.bonding_enabled" ng-model-master="devicePropertiesConfigureNetworkCtrl.model.attributes.config_network.bonding_enabled"><label for="bondingEnabled{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_PORT_AGGREGATION"></label><div ng-if="devicePropertiesConfigureNetworkCtrl.modelCopy.attributes.config_network.bonding_enabled" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_TOOLTIP_PORT_AGGREGATION" class="noMarginBottom"></p></div></div></div></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="devicePropertiesConfigureNetworkCtrl.showValidation = true" busy-toggle="devicePropertiesConfigureNetworkCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{devicePropertiesConfigureNetworkCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="devicePropertiesConfigureNetworkCtrl.reset()" ng-disabled="devicePropertiesConfigureNetworkCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],428:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesConfigureNetwork",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin",function(b,c){return{scope:{model:"=unifiDevicePropertiesConfigureNetwork",isOpen:"=unifiDevicePropertiesConfigureNetworkIsOpen",isReadOnly:"=unifiDevicePropertiesConfigureNetworkIsReadOnly",isSaveQueued:"=unifiDevicePropertiesConfigureNetworkIsSaveQueued",group:"@unifiDevicePropertiesConfigureNetworkGroup",validator:"=unifiDevicePropertiesConfigureNetworkValidator"},controller:"DevicePropertiesConfigureNetworkController",controllerAs:"devicePropertiesConfigureNetworkCtrl",template:a("./devicePropertiesConfigureNetwork.jade")(),link:function(a,d,e,f){a.directiveId=a.$id;var g=a.$watch("validator",function(a){a&&(f.validator=a,g())});a.$watch(function(){return f.modelCopy?f.modelCopy.attributes.config_network.type:void 0},f.onTypeChange),a.$on("$destroy",function(){f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./devicePropertiesConfigureNetwork.jade":427}],429:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DevicePropertiesConfigureWarningsValidator",["$translate","inhibitor","ipUtils","networks",function(a,b,c,d){var e=function(){this.forms={},this.watchers={},this.warnings=[],this.inhibitedValidate=b(this.validate.bind(this),{debounceWait:50,throttleWait:500,leading:!0})};return e.prototype.destroy=function(){this.removeMasterModel(),Object.keys(this.forms).forEach(function(a){this.removeFormModel(a)}.bind(this))},e.prototype.getInvalidAttrs=function(){return this.attrs||[]},e.prototype.validate=function(){var a=this.getFormModel("network",!0),b=this.includePendingChanges?{delegateTo:"pending"}:void 0;this.warnings=[],a&&["uap","usw"].indexOf(a.get("type"))!==-1&&"static"===a.getNested("config_network.type",b)&&(this._validateStaticNetworkDns(b),this._validateStaticNetworkGateway(b),this._validateStaticNetworkIpDhcpConflict(b)),this.attrs=this.warnings.map(function(a){return a.attr})},e.prototype._validateStaticNetworkDns=function(b){var c=this.getFormModel("network",!0);c.getNested("config_network.dns1",b)||this.warnings.push({attr:"staticPreferredDns",msg:a.instant("DEVICE_PROPERTIES_NOTICE_CONFIGURATION_NETWORK_DNS1")})},e.prototype._validateStaticNetworkGateway=function(b){var c=this.getFormModel("network",!0);c.getNested("config_network.gateway",b)||this.warnings.push({attr:"staticGateway",msg:a.instant("DEVICE_PROPERTIES_NOTICE_CONFIGURATION_NETWORK_GATEWAY")})},e.prototype._validateStaticNetworkIpDhcpConflict=function(b){var e=this.getFormModel("network",!0);if(e.getNested("config_network.ip",b)){var f=!1;d.repository.collection.each(function(a){if(a.get("dhcpd_enabled")){var b=c.ip2long(a.get("dhcpd_start")),d=c.ip2long(a.get("dhcpd_stop")),g=c.ip2long(e.getNested("config_network.ip"));g>=b&&g<=d&&(f=!0)}}),f&&this.warnings.push({attr:"staticIpAddress",msg:a.instant("DEVICE_PROPERTIES_NOTICE_CONFIGURATION_NETWORK_IP_CONFLICT")})}},e.prototype.addMasterModel=function(a){this.removeMasterModel(),this.model=a,this.model.on("change",this.inhibitedValidate,this),this.validate()},e.prototype.removeMasterModel=function(){this.model&&(this.model.off("change",this.inhibitedValidate,this),delete this.model,this.validate())},e.prototype.addFormModel=function(a,b){this.removeFormModel(a),this.forms[a]=b,this.forms[a].on("change",this.inhibitedValidate,this),this.validate()},e.prototype.removeFormModel=function(a){this.forms[a]&&(this.forms[a].off("change",this.inhibitedValidate,this),delete this.forms[a],this.validate())},e.prototype.getFormModel=function(a,b){var c=this.forms[a];return c?c:b?this.model:void 0},e}])},{}],430:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-if="validator.warnings.length" ng-class="{\'is-app-info-box-collapsed\': !isInfoBoxExpanded}" class="appInfoBox appInfoBox--cozy appInfoBox--collapsible appInfoBox--warning verticalRhythm--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert-fill"></div><div class="appInfoBox__content"><div class="appInfoBox__header">{{\'DEVICE_PROPERTIES_NOTICE_CONFIGURATION_HEADER\' | translate}}<div ng-click="isInfoBoxExpanded = !isInfoBoxExpanded" ng-class="isInfoBoxExpanded ? \'ubnt-icon--minus\' : \'ubnt-icon--plus\'" class="appInfoBox__toggle icon"></div></div><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_NOTICE_CONFIGURATION_BODY"></p><ul class="noMarginBottom"><li ng-repeat="warning in validator.warnings" class="verticalRhythmTop--cozy"><p ng-bind-html="warning.msg"></p></li></ul></div></div></div>'),
b.join("")}},{"jade/runtime":232}],431:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesConfigureWarnings",["DevicePropertiesConfigureWarningsValidator",function(b){return{scope:{model:"=unifiDevicePropertiesConfigureWarnings",validator:"=unifiDevicePropertiesConfigureWarningsValidator"},template:a("./devicePropertiesConfigureWarnings.jade")(),link:function(a){a.$on("$destroy",function(){a.validator&&(a.validator.destroy(),a.validator=void 0)});var c=a.$watch("model",function(d){d&&(a.validator=new b,a.validator.addMasterModel(a.model),c())})}}}])},{"./devicePropertiesConfigureWarnings.jade":430}],432:[function(a,b,c){"use strict";function d(a){this.deviceStateUtils=a,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){},d.prototype.isLicenseWithWarning=function(){return this.model&&this.deviceStateUtils.isLicenseWithWarning(this.model)},d.$inject=["deviceStateUtils"],angular.module("app-unifi-manage").controller("DevicePropertiesLicenseWarningController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],433:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-if="devicePropertiesLicenseWarningCtrl.isLicenseWithWarning()" ng-class="{\'is-app-info-box-collapsed\': !isInfoBoxExpanded}" class="appInfoBox appInfoBox--cozy appInfoBox--collapsible appInfoBox--warning verticalRhythm--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert-fill"></div><div class="appInfoBox__content"><div class="appInfoBox__header">{{\'DEVICE_PROPERTIES_NOTICE_LICENSE_\' + devicePropertiesLicenseWarningCtrl.model.get(\'license_state\').toUpperCase() + \'_HEADER\' | translate}}<div ng-click="isInfoBoxExpanded = !isInfoBoxExpanded" ng-class="isInfoBoxExpanded ? \'ubnt-icon--minus\' : \'ubnt-icon--plus\'" class="appInfoBox__toggle icon"></div></div><div class="appInfoBox__body"><p translate="{{\'DEVICE_PROPERTIES_NOTICE_LICENSE_\' + devicePropertiesLicenseWarningCtrl.model.get(\'license_state\').toUpperCase() + \'_BODY\'}}" translate-values="{url: CloudDashboardHost}"></p></div></div></div>'),b.join("")}},{"jade/runtime":232}],434:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesLicenseWarning",["CloudDashboardHost","updateModelDirectiveMixin",function(b,c){return{controller:"DevicePropertiesLicenseWarningController",controllerAs:"devicePropertiesLicenseWarningCtrl",scope:{model:"=unifiDevicePropertiesLicenseWarning"},template:a("./devicePropertiesLicenseWarning.jade")(),link:function(a,d,e,f){a.CloudDashboardHost=b,c.init(a,d,e,f,!0)}}}])},{"./devicePropertiesLicenseWarning.jade":433}],435:[function(a,b,c){"use strict";function d(a,b,c,d){this.$q=a,this.$translate=b,this.heyToasts=c,this.tags=d,this.isRemoving={},e.call(this),this.updateCollection(d.repository.collection)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.destroy=function(){this.removeEventHandlers()},d.prototype.onCollectionChange=function(){this.model&&this.collection?this.currentTags=this.tags.getTagsByMac(this.model.get("mac")):this.currentTags=[]},d.prototype.addTag=function(a){return this.isAdding=!0,this.tags[angular.isObject(a)?"addExistingTagByMac":"addNewTagByMac"](this.model.get("mac"),a,{wait:!0}).then(function(){return!0})["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isAdding=!1}.bind(this))},d.prototype.removeTag=function(a){return this.isRemoving[a.id]=!0,this.tags.removeTagByMac(this.model.get("mac"),a,{wait:!0}).then(function(){return!0})["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))},d.prototype.getCurrentTags=function(){return this.currentTags},d.prototype.isTagUnused=function(a){return!this.currentTags.find(function(b){return b.get("name")===a.get("name")})},d.$inject=["$q","$translate","heyToasts","tags"],angular.module("app-unifi-manage").controller("DevicePropertiesTagsController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],436:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="devicePropertiesConfigureTags"><div ng-if="devicePropertiesTagsCtrl.getCurrentTags().length" class="appTags appTags--wrapped noMarginBottom"><div ng-repeat="tag in devicePropertiesTagsCtrl.getCurrentTags()" class="tag appTag appTag--cozy appTag--transparent">{{tag.get(\'name\')}}<div unifi-if-role-admin ng-click="devicePropertiesTagsCtrl.removeTag(tag)" class="appTag__close"></div></div></div><div ng-if="!devicePropertiesTagsCtrl.getCurrentTags().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder noPadding verticalRhythm--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_SECTION_TAGS_EMPTY" class="noMarginBottom"></p></div></div></div><form unifi-if-role-admin novalidate autocomplete="off" ng-submit="submitForm()"><unifi-select-simple-dropdown-list unifi-select-simple-dropdown-list-collection="devicePropertiesTagsCtrl.tags.repository.collection" unifi-select-simple-dropdown-list-selected-model="devicePropertiesTagsCtrl.selectedTag" unifi-select-simple-dropdown-list-render-label="devicePropertiesTagsCtrl.selectedTag.get(\'name\')" unifi-select-simple-dropdown-list-row-template="\'simpleAttributes\'" unifi-select-simple-dropdown-list-row-config="[\'name\']" unifi-select-simple-dropdown-list-supplemental-filter="devicePropertiesTagsCtrl.isTagUnused(model)" unifi-select-simple-dropdown-list-searchable-attributes="[\'name\']" unifi-select-simple-dropdown-list-default-sort-by="\'name\'" unifi-select-simple-dropdown-list-default-sort-desc="false" unifi-select-simple-dropdown-list-search-placeholder="\'DEVICE_PROPERTIES_SELECT_TAG_DROPDOWN_SEARCH_PLACEHOLDER\'" unifi-select-simple-dropdown-list-empty-table-notice="\'DEVICE_PROPERTIES_SELECT_TAG_DROPDOWN_TABLE_EMPTY\'" unifi-select-simple-dropdown-list-local-state="true" unifi-select-simple-dropdown-list-local-state-key="devicePropertiesTagsCtrl.model.get(\'mac\') + \'|add-device-tag\'" unifi-select-simple-dropdown-list-local-state-is-temporary="true" unifi-select-simple-dropdown-list-is-cozy="true" unifi-select-simple-dropdown-list-is-pagination-optional="true" unifi-select-simple-dropdown-list-rows-per-page="5" unifi-select-simple-dropdown-list-hide-empty-notice="true" unifi-select-simple-dropdown-list-no-clear="false" unifi-select-simple-dropdown-list-open-upward="true" unifi-select-simple-dropdown-list-on-select="devicePropertiesTagsCtrl.addTag(model); resetForm();" unifi-select-simple-dropdown-list-on-submit="devicePropertiesTagsCtrl.addTag(searchQuery); resetForm();"></unifi-select-simple-dropdown-list></form></div>'),b.join("")}},{"jade/runtime":232}],437:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDevicePropertiesTags",["APP_EVENTS",function(b){return{scope:{model:"=unifiDevicePropertiesTags"},controller:"DevicePropertiesTagsController",controllerAs:"devicePropertiesTagsCtrl",bindToController:!0,template:a("./devicePropertiesTags.jade")(),link:function(a,c,d,e){a.directiveId=a.$id,a.$on("$destroy",function(){e.destroy()}),a.resetForm=function(){e.selectedTag=void 0,a.$broadcast(b.SELECT_DROPDOWN_LIST_CLEAR)},a.submitForm=function(){a.$broadcast(b.SELECT_DROPDOWN_LIST_SUBMIT),a.$broadcast(b.SELECT_DROPDOWN_LIST_CLOSE),a.$broadcast(b.SELECT_DROPDOWN_LIST_CLEAR)}}}}])},{"./devicePropertiesTags.jade":436}],438:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.tags=f,this.defaultSortBy="name",e.call(this,a,b,c,d)}var e=a("../../../app-unifi-manage/controllers/BaseDropdownListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){},d.prototype.getCollection=function(){return this.tags.repository.collection},d.$inject=["$injector","$timeout","CollectionView","preferences","tags"],angular.module("app-unifi-manage").controller("DeviceSearchWithTagsDropdownListController",d)},{"../../../app-unifi-manage/controllers/BaseDropdownListController":999}],439:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<ng-form name="deviceSearchWithTagsDropdownList" ng-class="::{    \'appForm--cozy\': deviceSearchWithTagsDropdownListCtrl.isCozy  }" class="appForm"><div ng-click="deviceSearchWithTagsDropdownListCtrl.openDropdown()" on-outside-element-click="deviceSearchWithTagsDropdownListCtrl.closeDropdown()" ng-switch="deviceSearchWithTagsDropdownListCtrl.isDropdownVisible || !deviceSearchWithTagsDropdownListCtrl.selectedModel" class="appFormDropdown appFormDropdown--withSearch fullWidth"><div ng-switch-when="false" ng-class="deviceSearchWithTagsDropdownListCtrl.selectedModel ? \'appFormDropdown__selectedItem--noIcon appIconInput--left\' : \'\'" class="appFormDropdown__selectedItem appIconInput appIconInput--right"><div class="appIconInput__input">{{ deviceSearchWithTagsDropdownListCtrl.selectedModel.get(\'name\') }}</div><div ng-if="deviceSearchWithTagsDropdownListCtrl.selectedModel" class="appIconInput__icon appIconInput__icon--left icon ubnt-icon--tag"></div><div ng-if="deviceSearchWithTagsDropdownListCtrl.selectedModel" ng-click="$event.stopPropagation(); deviceSearchWithTagsDropdownListCtrl.selectModel()" ng-class="deviceSearchWithTagsDropdownListCtrl.isBusy ? \'appIconAnimated--rotate ubnt-icon--sync\' : \'ubnt-icon--x-circle\'" class="appIconInput__icon appIconInput__icon--right icon clickable"></div></div><unifi-search ng-switch-when="true" unifi-search-on-change="deviceSearchWithTagsDropdownListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-full-width="true" unifi-search-is-cozy="deviceSearchWithTagsDropdownListCtrl.isCozy" unifi-search-is-busy="deviceSearchWithTagsDropdownListCtrl.isBusy" unifi-search-placeholder="\'DEVICE_SEARCH_OR_SELECT_TAG_PLACEHOLDER\'" unifi-search-left-icon="deviceSearchWithTagsDropdownListCtrl.selectedModel ? \'ubnt-icon--tag\' : undefined"></unifi-search><div ng-click="$event.stopPropagation();" ng-class="{        \'is-dropdown-visible\': deviceSearchWithTagsDropdownListCtrl.isDropdownVisible      }" class="appDropdown"><table ng-class="{          \'appTable--cozy\': !deviceSearchWithTagsDropdownListCtrl.isCozy,          \'appTable--condensed\': deviceSearchWithTagsDropdownListCtrl.isCozy        }" class="noMarginBottom appTable appTable--hoverable appTable--flexible appTable--minor appTable--striped appTable--transparent appTable--footerBorder appTable--light"><tfoot ng-if="deviceSearchWithTagsDropdownListCtrl.view.getModels().length || deviceSearchWithTagsDropdownListCtrl.view.getModels().length &gt; deviceSearchWithTagsDropdownListCtrl.rowsPerPage"><tr><td colspan="2"><unifi-micro-pagination unifi-micro-pagination-current-page="deviceSearchWithTagsDropdownListCtrl.currentPage" unifi-micro-pagination-rows-per-page="deviceSearchWithTagsDropdownListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="deviceSearchWithTagsDropdownListCtrl.view.getModels().length" class="noMarginBottom horizontalRhythmLeft--condensed"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in deviceSearchWithTagsDropdownListCtrl.view.getModels(),              startFrom (deviceSearchWithTagsDropdownListCtrl.currentPage - 1) * deviceSearchWithTagsDropdownListCtrl.rowsPerPage,              limitTo deviceSearchWithTagsDropdownListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-click="deviceSearchWithTagsDropdownListCtrl.selectModel(model)" ng-class="{\'is-row-selected\': deviceSearchWithTagsDropdownListCtrl.selectedModel.id === model.id}" class="clickable"><td class="tagIcon appTableCell--isIconOnly"><div class="icon ubnt-icon--tag"></div></td><td class="tagName fullWidth">{{::model.get(\'name\')}}</td></tr></tbody></table></div></div></ng-form>'),b.join("")}},{"jade/runtime":232}],440:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDeviceSearchWithTagsDropdownList",["PaginatedListDirective",function(b){var c=new b("deviceSearchWithTagsDropdown",a("./deviceSearchWithTagsDropdownList.jade")(),{localStateIsTemporary:"=?unifiDeviceSearchWithTagsDropdownListLocalStateIsTemporary",isCozy:"=?unifiDeviceSearchWithTagsDropdownListIsCozy",isBusy:"=?unifiDeviceSearchWithTagsDropdownListIsBusy",onSelect:"&?unifiDeviceSearchWithTagsDropdownListOnSelect",onChange:"&?unifiDeviceSearchWithTagsDropdownListOnChange"});return c.addMixin({init:function(a,b,c,d){a.$on("keypress:enter",d.closeDropdown.bind(d))}}),c}])},{"./deviceSearchWithTagsDropdownList.jade":439}],441:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.collection=this.collection||b.repository.collection,this.comparator=h,this.defaultSortBy="state",this.filter=this.filter||new f,this.rowsPerPage=k.model.getRowsPerPropertyPanel(),this.selectAllTest=this.selectAllTest||function(){return!0},this.getModelFeature=d.getModelFeature.bind(d),this.getDeviceModel=g.getDeviceModel.bind(g),e.call(this,a,i,k),j(this,c,this.getAllSelectableDevices.bind(this),this.handleSelectionChange.bind(this)),this.toggleSelectAll()}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.collection},d.prototype.onPageSizeChange=function(){},d.prototype.getAllSelectableDevices=function(){return this.collection.models.filter(this.selectAllTest||function(){return!0})},d.prototype.handleSelectionChange=function(a){this.onSelectionChange({selectedDevices:a})},d.$inject=["$injector","devices","DeviceCollection","deviceFeatureUtils","DeviceFilter","deviceStateUtils","devicesComparator","CollectionView","listSelectAllControllerMixin","preferences"],angular.module("app-unifi-manage").controller("DeviceSelectListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],442:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="list"><div ng-class="{      \'appActionBar--dark\': deviceSelectListCtrl.isDark,      \'appForm--dark\': deviceSelectListCtrl.isDark    }" class="appActionBar appActionBar--cozy appActionBar--flexible appForm--cozy"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><span translate="COMMON_SELECT_LIST_SHOWING_SELECTED" translate-values="{                \'numberOfSelected\': deviceSelectListCtrl.selectedCollection.models.length,                \'numberOfAllSelectable\': deviceSelectListCtrl.getAllSelectableDevices().length              }" class="static"></span></div></div></div><div class="appActionBar__right"><div class="appActionBarFilters"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="deviceSelectListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="deviceSelectListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div></div><table collection-view-sort="deviceSelectListCtrl.view" ng-class="{      \'appTable--dark\': deviceSelectListCtrl.isDark    }" class="noMarginBottom verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--striped appForm appForm--cozy"><thead><tr><td class="deviceCheckbox appTableCell--smash noPaddingTop"><input type="checkbox" name="selectAll" ng-hide="deviceSelectListCtrl.isSearchQuery" ng-checked="deviceSelectListCtrl.areAllSelected()" ng-click="deviceSelectListCtrl.toggleSelectAll()"></td><th collection-view-sort-by="state" class="alignCenter deviceStateIcon"></th><th collection-view-sort-by="name" class="deviceName"><span translate="DEVICE_OVERVIEW_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="stateString" class="deviceState"><span translate="DEVICE_OVERVIEW_TABLE_HEADER_STATUS"></span></th><th collection-view-sort-by="model" class="deviceModel"><span translate="DEVICE_OVERVIEW_TABLE_HEADER_MODEL"></span></th><th collection-view-sort-by="version" class="deviceVersion"><span translate="DEVICE_OVERVIEW_TABLE_HEADER_VERSION"></span></th><th unifi-if-role-admin unifi-if-role-admin-with-site="deviceSelectListCtrl.model.get(\'name\')" class="deviceActions"><span translate="DEVICE_OVERVIEW_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tfoot ng-if="deviceSelectListCtrl.view.getModels().length"><tr><td colspan="7"><unifi-list-pagination unifi-list-pagination-current-page="deviceSelectListCtrl.currentPage" unifi-list-pagination-page-size-options="[5, 10, 25]" unifi-list-pagination-rows-per-page="deviceSelectListCtrl.rowsPerPage" unifi-list-pagination-total-rows="deviceSelectListCtrl.view.getModels().length" unifi-list-pagination-total-links="5" unifi-list-pagination-is-dark="deviceSelectListCtrl.isDark"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in deviceSelectListCtrl.view.getModels(),          startFrom (deviceSelectListCtrl.currentPage - 1) * deviceSelectListCtrl.rowsPerPage,          limitTo deviceSelectListCtrl.rowsPerPage"><td class="deviceCheckbox appTableCell--smash"><input type="checkbox" ng-checked="deviceSelectListCtrl.isSelected(model)" ng-click="deviceSelectListCtrl.toggleSelect(model); $event.stopPropagation();"></td><td class="deviceStateIcon unifiDevicesTable__deviceIcon"><span unifi-device-icon="::model"></span></td><td ng-attr-title="{{::model.get(\'mac\')}}" class="deviceName">{{::model.getDisplayName()}}</td><td class="deviceState"><span unifi-device-status-badge="::model"></span></td><td class="deviceModel">{{::deviceSelectListCtrl.getDeviceModel(model)}}</td><td class="deviceVersion">{{::model.get(\'version\')}}</td><td unifi-if-role-admin unifi-if-role-admin-with-site="deviceSelectListCtrl.model.get(\'name\')" class="deviceActions appTableCell--actions"><button unifi-device-button-locate="::model" unifi-device-button-locate-is-labeled="true" unifi-device-button-locate-with-site="deviceSelectListCtrl.model.get(\'name\')" class="appMainButton appMainButton--tertiary appMainButton--condensed"></button><button unifi-device-button-restart="::model" unifi-device-button-restart-is-labeled="true" unifi-device-button-restart-with-hard-reboot="::model.get(\'type\') === \'usw\' &amp;&amp; deviceSelectListCtrl.getModelFeature(model, \'poe\') === true" unifi-device-button-restart-with-site="deviceSelectListCtrl.model.get(\'name\')" unifi-device-button-restart-on-success="deviceSelectListCtrl.refreshSitesOverview()" class="appMainButton appMainButton--tertiary appMainButton--condensed"></button><button unifi-device-button-adopt="::model" unifi-device-button-adopt-collection="::deviceSelectListCtrl.getCollection()" unifi-device-button-adopt-is-labeled="true" unifi-device-button-adopt-with-site="deviceSelectListCtrl.model.get(\'name\')" unifi-device-button-adopt-on-success="deviceSelectListCtrl.refreshSitesOverview()" class="appMainButton appMainButton--tertiary appMainButton--condensed"></button><button unifi-device-button-upgrade="::model" unifi-device-button-upgrade-is-labeled="true" unifi-device-button-upgrade-with-site="deviceSelectListCtrl.model.get(\'name\')" unifi-device-button-upgrade-on-success="deviceSelectListCtrl.refreshSitesOverview()" class="appMainButton appMainButton--tertiary appMainButton--condensed"></button></td></tr></tbody></table><div ng-class="{      \'appInfoBox--dark\': deviceSelectListCtrl.isDark    }" ng-if="!deviceSelectListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_OVERVIEW_TABLE_EMPTY_NO_DATA" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],443:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDeviceSelectList",["PaginatedListDirective",function(b){return new b("deviceSelect",a("./deviceSelectList.jade")(),{collection:"=?unifiDeviceSelectListCollection",filter:"=?unifiDeviceSelectListFilter",isDark:"=?unifiDeviceSelectListIsDark",onSelectionChange:"&unifiDeviceSelectListOnSelectionChange",selectAllTest:"=?unifiDeviceSelectListSelectAllTest"})}])},{"./deviceSelectList.jade":442}],444:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p){this.clients=a,this.devices=f,this.dpi=b,this.dpiStats=c,this.dpiUtils=d,this.selectedDpiApplications=i,this.wlanDpi=h,this.STATS_DEFAULTS=j,this.$stateParams=k,this.objectUtils=p,this.dpiEnabled=d.isDpiEnabled(),this.barChartConfig={valueProperty:"totalBytes",range:0},this.init(),e.call(this,f,g,l,h,m,n,o)}var e=a("../../../app-unifi-manage/controllers/DpiBaseUsersController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.init=function(){this.$stateParams.categoryId&&(this.categoryId=parseInt(this.$stateParams.categoryId),this.categoryName=this.dpi.getCategoryName(this.$stateParams.categoryId),this.selectedDpiApplications.setCategory(this.categoryName)),this.$stateParams.applicationId&&(this.applicationName=this.dpi.getAppName(this.dpi.getCompoundId(this.$stateParams.categoryId,this.$stateParams.applicationId)),this.selectedDpiApplications.clear(),this.selectedDpiApplications.addApplication(this.applicationName))},d.prototype.collectData=function(){var a=this.selectedDpiApplications.get().map(function(a){return{name:a.name}},this),b=this.dpiStats.getDpiByApp().filter(function(a){return!!a.clients&&!!this.selectedDpiApplications.get().find(function(b){return b.catId===a.cat&&b.appId===a.app})},this).map(function(b){return b.clients.map(function(c){return{mac:c.mac,rx_bytes:c.rx_bytes,tx_bytes:c.tx_bytes,rx_packets:c.rx_packets,tx_packets:c.tx_packets,totalBytes:c.rx_bytes+c.tx_bytes,modelReady:void 0!==this.getClientModel(c.mac),applicationStats:a.concat({name:this.dpi.getAppName(this.dpi.getCompoundId(b.cat,b.app)),rx_bytes:c.rx_bytes,tx_bytes:c.tx_bytes,rx_packets:c.rx_packets,tx_packets:c.tx_packets,totalBytes:c.rx_bytes+c.tx_bytes})}},this)},this);b=Array.prototype.concat.apply([],b),b=this.objectUtils.reduceDuplicates(b,"mac"),b.forEach(function(a){a.applicationStats=this.objectUtils.reduceDuplicates(a.applicationStats,"name",["name"]),a.applicationStats.sort(function(a,b){return this.selectedDpiApplications.indexOf(a.name)-this.selectedDpiApplications.indexOf(b.name)}.bind(this)),a.modelReady||this.fetchKnownClient(a.mac)},this),this.collection.reset(b),this.barChartConfig.range=Math.max.apply(Math,b.map(function(a){return a.totalBytes}))},d.prototype.knownClientFetched=function(a){this.collection.find(function(b){return b.get("mac")===a}).set({modelReady:!0})},d.$inject=["clients","dpi","dpiStats","dpiUtils","devices","knownClientsCache","wlanDpi","selectedDpiApplications","STATS_DEFAULTS","$stateParams","preferences","$injector","Backbone","CollectionView","objectUtils"],angular.module("app-unifi-manage").controller("DpiApplicationStatisticsController",d)},{"../../../app-unifi-manage/controllers/DpiBaseUsersController":1013}],445:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="container"><div class="row row--comfy noMarginBottom"><div class="col--xs12"><div class="appSubHeading appSubHeading--comfy type--small noMarginBottom"><a ui-sref="manage.site.statistics.dpi({view: \'overview\', categoryId: null, applicationId: null})"><div class="button appMainButton appMainButton--large appMainButton--transparent appMainButton--iconOnly"><span class="icon ubnt-icon--arrow-left-4"></span></div></a><span>{{dpiApplicationStatisticsCtrl.categoryName}}</span></div></div></div><div class="row row--comfy"><unifi-dpi-selector ng-if="dpiApplicationStatisticsCtrl.categoryName" unifi-dpi-selector-apps-from-category="dpiApplicationStatisticsCtrl.categoryName"></unifi-dpi-selector><div class="unifiDpiUsers"><table id="dpiUsersTable" collection-view-sort="dpiApplicationStatisticsCtrl.view" ng-class="{          \'is-not-responsive\': !dpiApplicationStatisticsCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th class="alignCenter dpiUserStateIcon visible--smUp"></th><th collection-view-sort-by="mac" class="dpiUserName"><span translate="DPI_APPLICATION_STATISTICS_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="totalBytes" class="dpiUserCategories"><span translate="DPI_APPLICATION_STATISTICS_TABLE_HEADER_APPLICATIONS"></span></th><th collection-view-sort-by="tx_bytes" class="dpiUserUp"><span translate="DPI_APPLICATION_STATISTICS_TABLE_HEADER_UP"></span></th><th collection-view-sort-by="rx_bytes" class="dpiUserDown"><span translate="DPI_APPLICATION_STATISTICS_TABLE_HEADER_DOWN"></span></th></tr></thead><tfoot ng-if="dpiApplicationStatisticsCtrl.view.getModels().length"><tr><td colspan="5"><unifi-list-pagination unifi-list-pagination-current-page="dpiApplicationStatisticsCtrl.currentPage" unifi-list-pagination-rows-per-page="dpiApplicationStatisticsCtrl.rowsPerPage" unifi-list-pagination-total-rows="dpiApplicationStatisticsCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in dpiApplicationStatisticsCtrl.view.getModels(),              startFrom (dpiApplicationStatisticsCtrl.currentPage - 1) * dpiApplicationStatisticsCtrl.rowsPerPage,              limitTo dpiApplicationStatisticsCtrl.rowsPerPage" data-id="{{::dpiApplicationStatisticsCtrl.getClientModel(model.get(\'mac\')).id}}"><td class="dpiUserStateIcon appTableCell--smash visible--smUp"><span unifi-client-icon="::dpiApplicationStatisticsCtrl.getClientModel(model.get(\'mac\'))"></span></td><td unifi-open-panel="dpiApplicationStatisticsCtrl.getClientModel(model.get(\'mac\'))" unifi-open-panel-active-tab="\'details\'" unifi-open-panel-active-accordion-group="\'dpi\'" class="dpiUserName appTableCell--smash clickable">{{::dpiApplicationStatisticsCtrl.getClientModel(model.get(\'mac\')).getDisplayName()}}</td><td class="dpiUserCategories"><unifi-bar-chart unifi-bar-chart-config="dpiApplicationStatisticsCtrl.barChartConfig" unifi-bar-chart-data="model.get(\'applicationStats\')"><div class="appTooltip appTooltip--cozy unifiBarSegmentTooltip"><div class="unifiChartTooltipHeader verticalRhythmQuarter">{{entry.name}}</div><div class="unifiChartTooltipBody"><div class="verticalRhythmQuarter"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow downPktsBytes"><dt>{{\'CLIENT_PROPERTIES_LABEL_UP_PKTS_BYTES\' | translate}}</dt><dd>{{entry.tx_packets | numberToString}} / {{entry.tx_bytes | bytes}}</dd></div><div class="appDescriptionListRow upPktsBytes"><dt>{{\'CLIENT_PROPERTIES_LABEL_DOWN_PKTS_BYTES\' | translate}}</dt><dd>{{entry.rx_packets | numberToString}} / {{entry.rx_bytes | bytes}}</dd></div></div></div></div></div></unifi-bar-chart></td><td class="dpiUserUp appTableCell--smash">{{::model.get(\'tx_bytes\') | bytes}}</td><td class="dpiUserDown appTableCell--smash">{{::model.get(\'rx_bytes\') | bytes}}</td></tr></tbody></table><div ng-if="!dpiApplicationStatisticsCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DPI_APPLICATION_STATISTICS_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="DPI_APPLICATION_STATISTICS_TABLE_EMPTY_NO_DATA" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],446:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiApplicationStatistics",[function(){return{controller:"DpiApplicationStatisticsController",controllerAs:"dpiApplicationStatisticsCtrl",template:a("./dpiApplicationStatistics.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$watch(function(){return d.selectedDpiApplications.getNames()},function(){d.collectData()},!0),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./dpiApplicationStatistics.jade":445}],447:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k){this.clients=a,this.devices=b,this.dpiStats=c,this.knownClientsCache=d,this.objectUtils=e,this.propertyPanel=f,this.$filter=h,this.$state=i,this.$translate=j,this.STATS_DEFAULTS=k,this.chartConfig={dataProperty:"bytes",type:"solid",label:{main:"0",secondary:h("uppercase")(j.instant("STATISTICS_DPI_TRAFFIC"))},pieCss:function(a,b){if(b<this.STATS_DEFAULTS.DPI.APPLICATION_GRAPH_MAX_ITEMS-1||b===this.STATS_DEFAULTS.DPI.APPLICATION_GRAPH_MAX_ITEMS-1&&!this.data[b].generated)return"unifiDonutChartPie"+b}.bind(this)},this.legendConfig={labelProperty:"name",valueProperty:"bytes",entryCssIndex:function(a,b){return b<this.STATS_DEFAULTS.DPI.APPLICATION_GRAPH_MAX_ITEMS-1||b===this.STATS_DEFAULTS.DPI.APPLICATION_GRAPH_MAX_ITEMS-1&&!this.data[b].generated?b:-1}.bind(this),valueFormat:function(a){return h("bytes")(a)}},this.dataConverter=(new g).deduplicatedBy("mac").sortedBy("bytes",!0).withLimit(k.DPI.APPLICATION_GRAPH_MAX_ITEMS,!0).countTotal().compactUnknown(function(a){return!a.name||"unknown"===a.name.toLowerCase()}).withUnknownDefaults({name:this.$translate.instant("STATISTICS_DPI_UNKNOWN")}).withOtherDefaults({name:this.$translate.instant("STATISTICS_DPI_UNKNOWN_OTHER")}),this.cachedKnownClientIds=[],this.collectData()}d.prototype.addEventHandlers=function(){this.devices.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.cachedKnownClientIds.forEach(function(a){this.knownClientsCache.repository.unregisterItem(a)},this),this.devices.repository.collection.off("sync",this.collectData,this)},d.prototype.back=function(){this.onBackCallback({})},d.prototype.close=function(){this.onCloseCallback({})},d.prototype.getClientModel=function(a){var b=this.clients.repository.collection.get(a)||this.knownClientsCache.repository.collection.get(a);return b},d.prototype.itemClicked=function(a){if(a){var b=[{state:"activeTab",value:"details"},{state:"collapsed",value:!1,overwrite:!0},{state:"activeAccordionGroup",value:"dpi",overwrite:!0}];this.propertyPanel.addItem(this.getClientModel(a),b)}else this.$state.go("manage.site.statistics.dpi",{view:"category",categoryId:this.categoryId,applicationId:this.applicationId})},d.prototype.collectData=function(){var a=this.dpiStats.getStatsForCategory(this.categoryId);if(this.data=[],this.chartConfig.label.main="?",a){this.categoryName=a.name;var b=this.objectUtils.appendAll(a.appsData.filter(function(a){return a.app===this.applicationId&&a.cat===this.categoryId},this));this.applicationName=b&&b.name?b.name:"";var c=b&&b.clients?b.clients:[],d=c.map(function(a){var b=this.getClientModel(a.mac);return b||this.fetchKnownClient(a.mac),{mac:a.mac,name:b?b.getDisplayName():a.mac,packets:a.rx_packets+a.tx_packets,bytes:a.rx_bytes+a.tx_bytes}},this),e=this.dataConverter.apply(d);this.data=e.data,this.data.length&&(this.chartConfig.label.main=this.$filter("bytes")(e.total.bytes))}},d.prototype.fetchKnownClient=function(a){this.cachedKnownClientIds.indexOf(a)===-1&&(this.cachedKnownClientIds.push(a),this.knownClientsCache.repository.registerItem(a).fetchItem(a)["finally"](function(){this.data.find(function(b){
return b.mac===a}).name=this.getClientModel(a).getDisplayName()}.bind(this)))},d.$inject=["clients","devices","dpiStats","knownClientsCache","objectUtils","propertyPanel","DataConverter","$filter","$state","$translate","STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("DpiApplicationUsageGraphController",d)},{}],448:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiDpiApplicationUsageGraph"><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="dpiApplicationUsageGraphCtrl.chartConfig" unifi-donut-chart-with-tooltip-data="dpiApplicationUsageGraphCtrl.data" class="unifiDpiApplicationUsageGraph__chart"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.name}}</div><div class="noPaddingBottom">{{focusedData.bytes | bytes}}</div></div></unifi-donut-chart-with-tooltip><div class="unifiDpiApplicationUsageGraph__header"><div class="appSubHeading appSubHeading--standalone verticalRhythmQuarter">{{dpiApplicationUsageGraphCtrl.applicationName}}</div><div class="appActionIconGroup unifiDpiApplicationUsageGraph__actionIcons"><div ng-click="dpiApplicationUsageGraphCtrl.back()" class="appActionIcon"><span class="icon ubnt-icon--pointer-left"></span></div><div ng-click="dpiApplicationUsageGraphCtrl.close()" class="appActionIcon"><span class="icon ubnt-icon--x"></span></div></div></div><unifi-chart-legend unifi-chart-legend-config="dpiApplicationUsageGraphCtrl.legendConfig" unifi-chart-legend-data="dpiApplicationUsageGraphCtrl.data" unifi-chart-legend-on-click="dpiApplicationUsageGraphCtrl.itemClicked(entry.mac);" class="unifiChartLegend--noWrap"></unifi-chart-legend><div ng-if="dpiApplicationUsageGraphCtrl.data.length" class="alignRight"><button ng-click="dpiApplicationUsageGraphCtrl.itemClicked()" class="appMainButton appMainButton--transparent"><span>{{\'DPI_OVERVIEW_MORE\' | translate}}</span><span class="button__icon button__icon--right icon ubnt-icon--pointer-right"></span></button></div><div ng-if="!dpiApplicationUsageGraphCtrl.data.length" class="appInfoBox appInfoBox--warning appInfoBox--cozy col--xs12 col--sm7"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="STATISTICS_DPI_APPLICATION_NO_DATA" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="STATISTICS_DPI_APPLICATION_NO_DATA_DETAILS" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],449:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiApplicationUsageGraph",[function(){return{controller:"DpiApplicationUsageGraphController",controllerAs:"dpiApplicationUsageGraphCtrl",template:a("./dpiApplicationUsageGraph.jade")(),replace:!0,bindToController:!0,scope:{applicationId:"=?unifiDpiApplicationUsageGraphApplicationId",categoryId:"=?unifiDpiApplicationUsageGraphCategoryId",onBackCallback:"&unifiDpiApplicationUsageGraphOnBack",onCloseCallback:"&unifiDpiApplicationUsageGraphOnClose"},link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./dpiApplicationUsageGraph.jade":448}],450:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.devices=a,this.dpi=b,this.dpiIcons=c,this.dpiStats=d,this.dpiUtils=f,this.selectedDpiCategories=h,this.$state=j,this.$translate=k,this.defaultSortBy="totalBytes",this.defaultSortDesc=!0,this.collection=new l.Collection,e.call(this,i,m,g)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.collection},d.prototype.addEventHandlers=function(){this.devices.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.devices.repository.collection.off("sync",this.collectData,this)},d.prototype.showApplicationUsage=function(a,b){this.$state.go("manage.site.statistics.dpi",{view:"category",categoryId:a,applicationId:b})},d.prototype.collectData=function(){var a=this.selectedDpiCategories.getIds(),b=this.dpiStats.getDpiByApp().filter(function(b){return a.indexOf(b.cat)!==-1}).map(function(a){return{categoryId:a.cat,applicationId:a.app,name:this.dpi.getAppName(this.dpi.getCompoundId(a.cat,a.app))||this.$translate.instant("DPI_APPS_TABLE_UNKNOWN_APP"),rx_bytes:a.rx_bytes,tx_bytes:a.tx_bytes,rx_packets:a.rx_packets,tx_packets:a.tx_packets,totalBytes:a.rx_bytes+a.tx_bytes,known_clients:a.known_clients,icon:this.dpiIcons.getIconForApplication(this.dpi.getCompoundId(a.cat,a.app))}},this);this.collection.reset(b)},d.$inject=["devices","dpi","dpiIcons","dpiStats","dpiUtils","preferences","selectedDpiCategories","$injector","$state","$translate","Backbone","CollectionView"],angular.module("app-unifi-manage").controller("DpiAppsController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],451:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiDpiApps"><table id="dpiAppsTable" collection-view-sort="dpiAppsCtrl.view" ng-class="{      \'is-not-responsive\': !dpiAppsCtrl.isResponsive()    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th class="alignCenter dpiAppIcon appTableCell--smash visible--smUp"></th><th collection-view-sort-by="name" class="dpiAppName"><span translate="DPI_APPS_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="tx_bytes" class="dpiAppUp"><span translate="DPI_APPS_TABLE_HEADER_UP"></span></th><th collection-view-sort-by="rx_bytes" class="dpiAppDown"><span translate="DPI_APPS_TABLE_HEADER_DOWN"></span></th><th collection-view-sort-by="known_clients" class="dpiAppUserCount"><span translate="DPI_APPS_TABLE_HEADER_USER_COUNT"></span></th></tr></thead><tfoot ng-if="dpiAppsCtrl.view.getModels().length"><tr><td colspan="5"><unifi-list-pagination unifi-list-pagination-current-page="dpiAppsCtrl.currentPage" unifi-list-pagination-rows-per-page="dpiAppsCtrl.rowsPerPage" unifi-list-pagination-total-rows="dpiAppsCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr ng-click="dpiAppsCtrl.showApplicationUsage(model.get(\'categoryId\'), model.get(\'applicationId\'))" collection-view-repeat="model in dpiAppsCtrl.view.getModels(),          startFrom (dpiAppsCtrl.currentPage - 1) * dpiAppsCtrl.rowsPerPage,          limitTo dpiAppsCtrl.rowsPerPage" class="clickable"><td class="dpiAppStateIcon visible--smUp iconText__icon alignCenter"><span ng-class="model.get(\'icon\')"></span></td><td class="dpiAppName">{{::model.get(\'name\')}}</td><td class="dpiAppUp appTableCell--smash">{{::model.get(\'tx_bytes\') | bytes}}</td><td class="dpiAppDown appTableCell--smash">{{::model.get(\'rx_bytes\') | bytes}}</td><td class="dpiAppUserCount appTableCell--smash">{{::model.get(\'known_clients\')}}</td></tr></tbody></table><div ng-if="!dpiAppsCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DPI_APPS_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="DPI_APPS_TABLE_EMPTY_NO_DATA" class="noMarginBottom"></p></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],452:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiApps",[function(){return{controller:"DpiAppsController",controllerAs:"dpiAppsCtrl",template:a("./dpiApps.jade")(),replace:!0,bindToController:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$watch(function(){return d.selectedDpiCategories.getNames()},function(){d.collectData()},!0),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./dpiApps.jade":451}],453:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.dpi=a,this.selectedDpiCategories=c,this.$state=d,this.$stateParams=e,this.dpiEnabled=b.isDpiEnabled(),this.activeTab=e.view,this.init()}d.prototype.init=function(){this.$stateParams.categoryId?(this.selectedDpiCategories.setTemporary(!0),this.selectedDpiCategories.clear(),this.selectedDpiCategories.addCategory(this.dpi.getCategoryName(this.$stateParams.categoryId))):this.selectedDpiCategories.setTemporary(!1)},d.prototype.setActiveTab=function(a){this.activeTab=a,this.selectedDpiCategories.setTemporary(!1),this.$state.go("manage.site.statistics.dpi",{view:a,categoryId:null,applicationId:null},{notify:!1})},d.$inject=["dpi","dpiUtils","selectedDpiCategories","$state","$stateParams"],angular.module("app-unifi-manage").controller("DpiCategoryStatisticsController",d)},{}],454:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="container"><div class="row row--comfy"><unifi-dpi-selector></unifi-dpi-selector></div><ul ng-if="dpiCategoryStatisticsCtrl.dpiEnabled" class="appTabs appTabs--cozy verticalRhythm"><li ng-click="dpiCategoryStatisticsCtrl.setActiveTab(\'overview\')" ng-class="{\'is-tab-selected\': dpiCategoryStatisticsCtrl.activeTab === \'overview\'}" translate="STATISTICS_DPI_OVERVIEW" class="tabs__item"></li><li ng-click="dpiCategoryStatisticsCtrl.setActiveTab(\'apps\')" ng-class="{\'is-tab-selected\': dpiCategoryStatisticsCtrl.activeTab === \'apps\'}" translate="STATISTICS_DPI_APPS" class="tabs__item"></li><li ng-click="dpiCategoryStatisticsCtrl.setActiveTab(\'users\')" ng-class="{\'is-tab-selected\': dpiCategoryStatisticsCtrl.activeTab === \'users\'}" translate="STATISTICS_DPI_USERS" class="tabs__item"></li></ul><unifi-dpi-overview ng-if="dpiCategoryStatisticsCtrl.dpiEnabled &amp;&amp; dpiCategoryStatisticsCtrl.activeTab === \'overview\'"></unifi-dpi-overview><unifi-dpi-apps ng-if="dpiCategoryStatisticsCtrl.dpiEnabled &amp;&amp; dpiCategoryStatisticsCtrl.activeTab === \'apps\'"></unifi-dpi-apps><unifi-dpi-users ng-if="dpiCategoryStatisticsCtrl.dpiEnabled &amp;&amp; dpiCategoryStatisticsCtrl.activeTab === \'users\'"></unifi-dpi-users></div>'),b.join("")}},{"jade/runtime":232}],455:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiCategoryStatistics",[function(){return{controller:"DpiCategoryStatisticsController",controllerAs:"dpiCategoryStatisticsCtrl",template:a("./dpiCategoryStatistics.jade")(),replace:!0}}])},{"./dpiCategoryStatistics.jade":454}],456:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k,l,m){this.devices=a,this.deviceCategoryUtils=b,this.deviceStateUtils=c,this.dpi=d,this.dpiIcons=e,this.dpiStats=f,this.dpiUtils=g,this.wlanDpi=h,this.STATS_DEFAULTS=j,this.$filter=k,this.$state=l,this.$translate=m,this.dataConverter=(new i).deduplicatedBy("name").sortedBy("bytes",!0).withLimit(j.DPI.APPLICATION_GRAPH_MAX_ITEMS,!0).countTotal().compactUnknown(function(a){return!a.name||"unknown"===a.name.toLowerCase()}).withUnknownDefaults({name:this.$translate.instant("STATISTICS_DPI_UNKNOWN_OTHER"),icon:j.UNKNOWN_ICON_CSS}),this.legendConfig={labelProperty:"name",valueProperty:"bytes",iconProperty:"icon",entryCssIndex:function(a,b){return b<this.STATS_DEFAULTS.DPI.CATEGORY_GRAPH_MAX_ITEMS-1||b===this.STATS_DEFAULTS.DPI.CATEGORY_GRAPH_MAX_ITEMS-1&&!this.data[b].generated?b:-1}.bind(this),valueFormat:function(a){return k("bytes")(a)}},this.chartConfig={dataProperty:"bytes",type:"solid",label:{main:"0",secondary:k("uppercase")(m.instant("STATISTICS_DPI_TRAFFIC"))},pieCss:function(a,b){if(b<this.STATS_DEFAULTS.DPI.CATEGORY_GRAPH_MAX_ITEMS-1||b===this.STATS_DEFAULTS.DPI.CATEGORY_GRAPH_MAX_ITEMS-1&&!this.data[b].generated)return"unifiDonutChartPie"+b}.bind(this)},this.categoryName&&(this.categoryIds=g.getIdsForCategoryName(this.categoryName)),this.collectData()}d.prototype.addEventHandlers=function(){this.devices.repository.collection.on("sync",this.collectData,this),this.wlanDpi.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.devices.repository.collection.off("sync",this.collectData,this),this.wlanDpi.repository.collection.off("sync",this.collectData,this)},d.prototype.close=function(){this.onCloseCallback({name:this.categoryName,categoryIds:this.categoryIds})},d.prototype.itemClicked=function(a){a.catId&&a.appId?this.onApplicationSelected({categoryId:a.catId,applicationId:a.appId}):this.$state.go("manage.site.statistics.dpi",{view:"apps",categoryId:this.categoryIds[0]})},d.prototype.collectData=function(){var a=this.dpiUtils.applicationsSortedByTraffic(this.categoryName,this.dataConverter);this.data=a.data,this.chartConfig.label.main=this.$filter("bytes")(a.total.bytes||0)},d.$inject=["devices","deviceCategoryUtils","deviceStateUtils","dpi","dpiIcons","dpiStats","dpiUtils","wlanDpi","DataConverter","STATS_DEFAULTS","$filter","$state","$translate"],angular.module("app-unifi-manage").controller("DpiCategoryUsageGraphController",d)},{}],457:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'unifiDpiCategoryUsageGraph--disabled\': !dpiCategoryUsageGraphCtrl.data.length}" class="unifiDpiCategoryUsageGraph"><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="dpiCategoryUsageGraphCtrl.chartConfig" unifi-donut-chart-with-tooltip-data="dpiCategoryUsageGraphCtrl.data" class="unifiDpiCategoryUsageGraph__chart"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.name}}</div><div class="noPaddingBottom">{{focusedData.bytes | bytes}}</div></div></unifi-donut-chart-with-tooltip><div class="unifiDpiCategoryUsageGraph__header"><div class="appSubHeading appSubHeading--standalone verticalRhythmQuarter">{{dpiCategoryUsageGraphCtrl.categoryName}}</div><div class="appActionIconGroup unifiDpiCategoryUsageGraph__actionIcons"><div ng-click="dpiCategoryUsageGraphCtrl.close()" class="appActionIcon"><span class="icon ubnt-icon--x"></span></div></div></div><unifi-chart-legend ng-if="dpiCategoryUsageGraphCtrl.data.length" unifi-chart-legend-config="dpiCategoryUsageGraphCtrl.legendConfig" unifi-chart-legend-data="dpiCategoryUsageGraphCtrl.data" unifi-chart-legend-on-click="dpiCategoryUsageGraphCtrl.itemClicked(entry);" class="unifiChartLegend--noWrap"></unifi-chart-legend><div ng-if="!dpiCategoryUsageGraphCtrl.data.length" class="appInfoBox appInfoBox--warning appInfoBox--cozy col--xs12 col--sm7"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="STATISTICS_DPI_CATEGORY_NO_DATA" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="STATISTICS_DPI_CATEGORY_NO_DATA_DETAILS" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],458:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiCategoryUsageGraph",[function(){return{controller:"DpiCategoryUsageGraphController",controllerAs:"dpiCategoryUsageGraphCtrl",template:a("./dpiCategoryUsageGraph.jade")(),replace:!0,bindToController:!0,scope:{categoryName:"=?unifiDpiCategoryUsageGraphCategoryName",onCloseCallback:"&unifiDpiCategoryUsageGraphOnClose",onApplicationSelected:"&unifiDpiCategoryUsageGraphOnApplicationSelected"},link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./dpiCategoryUsageGraph.jade":457}],459:[function(a,b,c){"use strict";function d(){}d.prototype.selectApplication=function(a,b){this.categoryId=a,this.applicationId=b},d.prototype.isApplicationSelected=function(){return void 0!==this.categoryId&&void 0!==this.applicationId},d.prototype.onClose=function(){this.onRemoveCallback({name:this.categoryName})},d.prototype.clearSelection=function(){this.categoryId=void 0,this.applicationId=void 0},d.$inject=[],angular.module("app-unifi-manage").controller("DpiDrillDownController",d)},{}],460:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="dpiDrillDown"><unifi-dpi-category-usage-graph ng-if="!dpiDrillDownCtrl.isApplicationSelected()" unifi-dpi-category-usage-graph-category-name="dpiDrillDownCtrl.categoryName" unifi-dpi-category-usage-graph-on-close="dpiDrillDownCtrl.onClose();" unifi-dpi-category-usage-graph-on-application-selected="dpiDrillDownCtrl.selectApplication(categoryId, applicationId);"></unifi-dpi-category-usage-graph><unifi-dpi-application-usage-graph ng-if="dpiDrillDownCtrl.isApplicationSelected()" unifi-dpi-application-usage-graph-category-id="dpiDrillDownCtrl.categoryId" unifi-dpi-application-usage-graph-application-id="dpiDrillDownCtrl.applicationId" unifi-dpi-application-usage-graph-on-close="dpiDrillDownCtrl.onClose();" unifi-dpi-application-usage-graph-on-back="dpiDrillDownCtrl.clearSelection();"></unifi-dpi-application-usage-graph></div>'),b.join("")}},{"jade/runtime":232}],461:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiDrillDown",[function(){return{controller:"DpiDrillDownController",controllerAs:"dpiDrillDownCtrl",template:a("./dpiDrillDown.jade")(),replace:!0,bindToController:!0,scope:{categoryName:"=?unifiDpiDrillDownCategoryName",onRemoveCallback:"&unifiDpiDrillDownOnRemove"}}}])},{"./dpiDrillDown.jade":460}],462:[function(a,b,c){"use strict";function d(a,b){this.frame=a,this.selectedDpiCategories=b,this.addGraph=b.addCategory.bind(b),this.removeGraph=b.removeCategory.bind(b)}d.prototype.showAddCategoryModal=function(){this.frame.show("configureDpiCategoryGraph",{excludedCategories:function(){return this.selectedDpiCategories.getNames()}.bind(this)}).then(function(a){a.map(function(a){return a.name}).forEach(this.addGraph,this)}.bind(this))},d.$inject=["frame","selectedDpiCategories"],angular.module("app-unifi-manage").controller("DpiOverviewController",d)},{}],463:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiDpiOverview"><div ng-repeat="categoryName in dpiOverviewCtrl.selectedDpiCategories.getNames()" class="unifiStatisticsDpiOverviewGraph noPadding unifiStatisticsDpiOverviewGraph__palette"><unifi-dpi-drill-down unifi-dpi-drill-down-category-name="categoryName" unifi-dpi-drill-down-on-remove="dpiOverviewCtrl.removeGraph(name)"></unifi-dpi-drill-down></div><div ng-if="!dpiOverviewCtrl.selectedDpiCategories.allCategoriesSelected()" class="unifiStatisticsDpiOverviewGraph noPadding"><div class="unifiStatisticsDpi__add"><button ng-click="dpiOverviewCtrl.showAddCategoryModal()" class="appMainButton appMainButton--transparent icon ubnt-icon--plus"></button></div><div class="unifiStatisticsDpi__button"><button ng-click="dpiOverviewCtrl.showAddCategoryModal()" class="appMainButton appMainButton--transparent">{{\'STATISTICS_DPI_ADD_CATEGORY\' | translate}}</button></div></div></div>'),b.join("")}},{"jade/runtime":232}],464:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiOverview",[function(){return{controller:"DpiOverviewController",controllerAs:"dpiOverviewCtrl",template:a("./dpiOverview.jade")(),replace:!0,bindToController:!0,scope:{categories:"=unifiDpiOverviewCategories",onAdd:"&unifiDpiOverviewOnAdd",onRemove:"&unifiDpiOverviewOnRemove"}}}])},{"./dpiOverview.jade":463}],465:[function(a,b,c){"use strict";function d(a,b){this.frame=a,this.preferences=b}d.prototype.addAssigment=function(){this.frame.show("dpiRestrictionNetworkAssignment")},d.$inject=["frame","preferences"],angular.module("app-unifi-manage").controller("DpiRestrictionAssignmentsController",d)},{}],466:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="container noHorizontalPadding unifiSettingsDpi__section"><div class="row unifiSettingsDpi__sectionHeader"><div class="col--xs12"><div ng-click="dpiRestrictionAssignmentsCtrl.expanded = !dpiRestrictionAssignmentsCtrl.expanded" ng-class="{          \'appSubHeading--dark\': dpiRestrictionAssignmentsCtrl.preferences.model.get(\'isSettingsDark\')        }" class="appSubHeading appSubHeading--comfy"><div ng-class="dpiRestrictionAssignmentsCtrl.expanded ? [\'appCollapserType\'] : \'appExpanderType\'" class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--network"></span><span class="iconText__text uppercase">{{ \'DPI_RESTRICTION_GROUP_ASSIGNMENTS_NETWORK\' | translate }}</span></div></div></div></div><div ng-if="dpiRestrictionAssignmentsCtrl.expanded"><unifi-dpi-restriction-network-assignments-list class="verticalRhythm"></unifi-dpi-restriction-network-assignments-list><unifi-dpi-restriction-wireless-network-assignments-list class="verticalRhythm"></unifi-dpi-restriction-wireless-network-assignments-list><div class="verticalRhythmTop--cozy"><button ng-click="dpiRestrictionAssignmentsCtrl.addAssigment()" ng-class="{          \'appMainButton--inputDark\': dpiRestrictionAssignmentsCtrl.preferences.model.get(\'isSettingsDark\')        }" class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span>{{\'DPI_RESTRICTION_GROUP_ACTION_ASSIGN_NETWORK\' | translate}}</span></button></div></div></div>'),b.join("")}},{"jade/runtime":232}],467:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiRestrictionAssignments",[function(){return{controller:"DpiRestrictionAssignmentsController",controllerAs:"dpiRestrictionAssignmentsCtrl",template:a("./dpiRestrictionAssignments.jade")(),replace:!0,bindToController:!0}}])},{"./dpiRestrictionAssignments.jade":466}],468:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$q=a,this.$translate=b,this.frame=c,this.dpiApps=d,this.heyToasts=e,this.preferences=f,this.showFrame=function(a){return c.show("editTextField",{text:function(){return a||""},title:function(){return b.instant(a?"DPI_RESTRICTION_GROUP_EDIT_MODAL_TITLE":"DPI_RESTRICTION_GROUP_CREATE_MODAL_TITLE")},label:function(){return b.instant("DPI_RESTRICTION_GROUP_NAME")},resolveButtonLabel:function(){return b.instant(a?"COMMON_ACTIONS_SAVE":"COMMON_ACTIONS_CREATE")}})}}d.prototype.edit=function(){this.isEditing=!0,this.showFrame(this.restrictionGroupModel.get("name")).then(function(a){this.restrictionGroupModel.save({name:a}).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_GROUP_SAVE_SUCCESS"))}.bind(this))["catch"](function(){this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_GROUP_SAVE_ERROR"))}.bind(this))}.bind(this))["finally"](function(){this.isEditing=!1}.bind(this))},d.prototype.addRestriction=function(){this.frame.show("dpiRestriction",{restrictionGroup:function(){return this.restrictionGroupModel}.bind(this),model:angular.noop}).then(function(a){a.save().then(function(){this.dpiApps.repository.collection.add(a);var b=this.getRestrictions();return b.push(a.id),this.restrictionGroupModel.save({apps_table_ids:b})["catch"](function(){return this.$q.reject()}.bind(this))}.bind(this)).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_GROUP_SAVE_SUCCESS"))}.bind(this))["catch"](function(){a.destroy(),this.restrictionGroupModel.fetch(),this.heyToasts.pushError(this.$translate.instant("DPI_RESTRICTION_GROUP_SAVE_ERROR"))}.bind(this))}.bind(this))},d.prototype.getRestrictions=function(){return this.restrictionGroupModel.get("apps_table_ids")||[]},d.prototype.remove=function(){this.isRemoving=!0,this.frame.show("confirm",{title:function(){return this.$translate.instant("DPI_RESTRICTION_GROUP_DELETE_HEADER")}.bind(this),message:function(){return this.$translate.instant("DPI_RESTRICTION_GROUP_DELETE_CONFIRM",{groupName:this.restrictionGroupModel.get("name")})}.bind(this),options:angular.noop}).then(function(){var a=this.getRestrictions().map(function(a){return this.dpiApps.repository.collection.get(a).destroy()},this);a.push(this.restrictionGroupModel.destroy()),this.$q.all(a).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_GROUP_DELETE_SUCCESS"))}.bind(this))["catch"](function(){this.heyToasts.pushError(this.$translate.instant("DPI_RESTRICTION_GROUP_DELETE_ERROR"))}.bind(this))}.bind(this))["finally"](function(){this.isRemoving=!1}.bind(this))},d.$inject=["$q","$translate","frame","dpiApps","heyToasts","preferences"],angular.module("app-unifi-manage").controller("DpiRestrictionGroupController",d)},{}],469:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="container noHorizontalPadding unifiSettingsDpi__section"><div class="row unifiSettingsDpi__sectionHeader"><div class="col--xs9"><div ng-click="dpiRestrictionGroupCtrl.expanded = !dpiRestrictionGroupCtrl.expanded" ng-class="{          \'appSubHeading--dark\': dpiRestrictionGroupCtrl.preferences.model.get(\'isSettingsDark\'),          \'appCollapserType\': dpiRestrictionGroupCtrl.expanded,          \'appExpanderType\': !dpiRestrictionGroupCtrl.expanded        }" class="appSubHeading appSubHeading--comfy">{{ dpiRestrictionGroupCtrl.restrictionGroupModel.get(\'name\') }}</div></div><div class="col--xs3 alignRight"><button unifi-if-role-admin unifi-if-role-admin-and="!dpiRestrictionGroupCtrl.restrictionGroupModel.get(\'attr_no_delete\')" ng-click="dpiRestrictionGroupCtrl.edit()" busy-toggle="dpiRestrictionGroupCtrl.isEditing" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin unifi-if-role-admin-and="!dpiRestrictionGroupCtrl.restrictionGroupModel.get(\'attr_no_delete\')" ng-click="dpiRestrictionGroupCtrl.remove()" busy-toggle="dpiRestrictionGroupCtrl.isRemoving" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></div></div><div ng-if="dpiRestrictionGroupCtrl.expanded"><unifi-dpi-restrictions-list ng-if="dpiRestrictionGroupCtrl.getRestrictions().length &gt; 0" unifi-dpi-restrictions-list-restriction-group="dpiRestrictionGroupCtrl.restrictionGroupModel"></unifi-dpi-restrictions-list><div class="verticalRhythmTop--cozy verticalRhythm--cozy"><button ng-class="{          \'appMainButton--inputDark\': dpiRestrictionGroupCtrl.preferences.model.get(\'isSettingsDark\')        }" ng-click="dpiRestrictionGroupCtrl.addRestriction()" class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span>{{\'DPI_RESTRICTION_ACTION_ADD\' | translate}}</span></button></div></div></div>'),b.join("")}},{"jade/runtime":232}],470:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiRestrictionGroup",[function(){return{controller:"DpiRestrictionGroupController",controllerAs:"dpiRestrictionGroupCtrl",template:a("./dpiRestrictionGroup.jade")(),replace:!0,bindToController:!0,scope:{restrictionGroupModel:"=unifiDpiRestrictionGroupModel"}}}])},{"./dpiRestrictionGroup.jade":469}],471:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o){this.$q=b,this.$translate=c,this.apiResults=d,this.dpiGroups=h,this.dpiUtils=i,this.frame=j,this.heyToasts=k,this.networks=l,this.networkUtils=m,this.sites=o,this.rowsPerPage=n.model.getRowsPerPropertyPanel(),this.defaultSortBy="name",this.collection=new f,this.isRemoving={},this.collectData(),e.call(this,a,g,n)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.addEventHandlers=function(){this.networks.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.networks.repository.collection.off("sync",this.collectData,this)},d.prototype.remove=function(a){this.frame.show("confirm",{title:function(){return this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_DELETE_HEADER")}.bind(this),message:function(){return this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_DELETE_CONFIRM")}.bind(this),options:angular.noop}).then(function(){this.isRemoving[a.id]=!0;var b=this.networks.repository.collection.get(a.id);b.save({dpi_enabled:!1,dpigroup_id:void 0}).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_DELETE_SUCCESS"))}.bind(this))["catch"](function(a){this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_DELETE_ERROR"),a))}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1,this.collectData()})}.bind(this))},d.prototype.getCollection=function(){return this.collection},d.prototype.collectData=function(){this.collection.reset(this.dpiUtils.getNetworksWithDpiGroups(this.networks.repository.collection))},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","$q","$translate","apiResults","BaseCollection","CollectionView","dpiGroups","dpiUtils","frame","heyToasts","networks","networkUtils","preferences","sites"],angular.module("app-unifi-manage").controller("DpiRestrictionNetworkAssignmentsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],472:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="verticalRhythmTop--cozy"><table collection-view-sort="dpiRestrictionNetworkAssignmentsListCtrl.view" ng-class="{      \'appTable--dark\': dpiRestrictionNetworkAssignmentsListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="networkName"><span translate="DPI_RESTRICTIONS_ASSIGNMENT_TABLE_HEADER_NETWORK"></span></th><th collection-view-sort-by="dpiRestrictionGroup" class="restrictionGroupName"><span translate="DPI_RESTRICTION_GROUP_NAME"></span></th><th collection-view-sort-by="purpose" class="networkPurpose"><span translate="SETTINGS_NETWORK_TABLE_HEADER_PURPOSE"></span></th><th collection-view-sort-by="ip_subnet" class="networkSubnet"><span translate="SETTINGS_NETWORK_TABLE_HEADER_SUBNET"></span></th><th collection-view-sort-by="vlan" class="networkVlan"><span translate="SETTINGS_NETWORK_TABLE_HEADER_VLAN"></span></th><th unifi-if-role-admin class="networkActions"><span translate="SETTINGS_NETWORK_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in dpiRestrictionNetworkAssignmentsListCtrl.view.getModels()" data-id="{{::model.id}}"><td ng-init="remoteSite = dpiRestrictionNetworkAssignmentsListCtrl.networkUtils.getRemoteSite(model)" class="networkName">{{::model.get(\'name\') + (remoteSite ? \' (\' + remoteSite.get(\'desc\') + \')\' : \'\')}}</td><td class="restrictionGroupName">{{::model.get(\'restrictionGroupName\')}}</td><td class="networkPurpose">{{::model.get(\'purpose\')}}</td><td class="networkSubnet">{{::model | networkSubnet}}</td><td class="networkVlan">{{::model.get(\'vlan\')}}</td><td unifi-if-role-admin class="networkActions appTableCell--actions"><button ng-click="dpiRestrictionNetworkAssignmentsListCtrl.remove(model)" ng-disabled="dpiRestrictionNetworkAssignmentsListCtrl.isRemoving[model._id]" class="appMainButton appMainButton--tertiary appMainButton--condensed noHorizontalMargin"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!dpiRestrictionNetworkAssignmentsListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': dpiRestrictionNetworkAssignmentsListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DPI_RESTRICTIONS_ASSIGNMENT_TABLE_NETWORK_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],473:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiRestrictionNetworkAssignmentsList",["ListDirective","eventHandlersDirectiveMixin",function(b,c){var d=new b("dpiRestrictionNetworkAssignments",a("./dpiRestrictionNetworkAssignmentsList.jade")());return d.addMixin(c),d}])},{"./dpiRestrictionNetworkAssignmentsList.jade":472}],474:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n){this.$q=b,this.$translate=c,this.apiResults=d,this.dpiGroups=h,this.dpiUtils=i,this.frame=j,this.heyToasts=k,this.sites=m,this.wirelessNetworks=n,this.rowsPerPage=l.model.getRowsPerPropertyPanel(),this.defaultSortBy="name",this.collection=new f,this.isRemoving={},this.collectData(),e.call(this,a,g,l)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.addEventHandlers=function(){this.wirelessNetworks.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.wirelessNetworks.repository.collection.off("sync",this.collectData,this)},d.prototype.remove=function(a){this.frame.show("confirm",{title:function(){return this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_DELETE_HEADER")}.bind(this),message:function(){return this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_DELETE_CONFIRM")}.bind(this),options:angular.noop}).then(function(){this.isRemoving[a.id]=!0;var b=this.wirelessNetworks.repository.collection.get(a.id);b.save({dpi_enabled:!1,dpigroup_id:void 0}).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_DELETE_SUCCESS"))}.bind(this))["catch"](function(a){this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_DELETE_ERROR"),a))}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1})}.bind(this))},d.prototype.getCollection=function(){return this.collection},d.prototype.collectData=function(){this.collection.reset(this.dpiUtils.getNetworksWithDpiGroups(this.wirelessNetworks.repository.collection))},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","$q","$translate","apiResults","BaseCollection","CollectionView","dpiGroups","dpiUtils","frame","heyToasts","preferences","sites","wirelessNetworks"],angular.module("app-unifi-manage").controller("DpiRestrictionWirelessNetworkAssignmentsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],475:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table collection-view-sort="dpiRestrictionWirelessNetworkAssignmentsListCtrl.view" ng-class="{      \'appTable--dark\': dpiRestrictionWirelessNetworkAssignmentsListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="networkName"><span translate="DPI_RESTRICTIONS_ASSIGNMENT_TABLE_HEADER_WIRELESS_NETWORK"></span></th><th collection-view-sort-by="restrictionGroupName" class="restrictionGroupName"><span translate="DPI_RESTRICTION_GROUP_NAME"></span></th><th collection-view-sort-by="security" class="wlanSecurity"><span translate="SETTINGS_WLAN_TABLE_HEADER_SECURITY"></span></th><th collection-view-sort-by="is_guest" class="wlanGuestNetwork"><span translate="SETTINGS_WLAN_TABLE_HEADER_GUEST_NETWORK"></span></th><th collection-view-sort-by="vlan" class="wlanVlan"><span translate="SETTINGS_WLAN_TABLE_HEADER_VLAN"></span></th><th unifi-if-role-admin class="wlanActions"><span translate="SETTINGS_WLAN_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in dpiRestrictionWirelessNetworkAssignmentsListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="networkName">{{::model.get(\'name\')}}</td><td class="restrictionGroupName">{{::model.get(\'restrictionGroupName\')}}</td><td class="wlanSecurity">{{::model.get(\'security\')}}</td><td ng-bind-html="model.get(\'is_guest\') | enabledIcon" class="wlanGuestNetwork"></td><td class="wlanVlan"><span ng-if="model.get(\'vlan_enabled\')">{{model.get(\'vlan\')}}</span><span ng-if="model.get(\'radius_vlan\') === dpiRestrictionWirelessNetworkAssignmentsListCtrl.RADIUS_VLAN_OPTIONS.ENABLED">{{\'SETTINGS_WLAN_TABLE_VALUE_VLAN_RADIUS_ASSIGNED\' | translate}}</span></td><td unifi-if-role-admin class="networkActions appTableCell--actions"><button ng-click="dpiRestrictionWirelessNetworkAssignmentsListCtrl.remove(model)" ng-disabled="dpiRestrictionWirelessNetworkAssignmentsListCtrl.isRemoving[model._id]" class="appMainButton appMainButton--tertiary appMainButton--condensed noHorizontalMargin"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!dpiRestrictionWirelessNetworkAssignmentsListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': dpiRestrictionWirelessNetworkAssignmentsListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DPI_RESTRICTIONS_ASSIGNMENT_TABLE_WIRELESS_NETWORK_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],476:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiRestrictionWirelessNetworkAssignmentsList",["ListDirective","eventHandlersDirectiveMixin",function(b,c){var d=new b("dpiRestrictionWirelessNetworkAssignments",a("./dpiRestrictionWirelessNetworkAssignmentsList.jade")());return d.addMixin(c),d}])},{"./dpiRestrictionWirelessNetworkAssignmentsList.jade":475}],477:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.$q=b,this.$translate=c,this.binaryPrefix=d,this.dpi=h,this.dpiApps=i,this.frame=j,this.heyToasts=k,this.Backbone=m,this.rowsPerPage=l.model.getRowsPerPropertyPanel(),this.defaultSortBy="catName",this.collection=new this.Backbone.Collection,this.isRemoving={},this.collectData(),e.call(this,a,g,l)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.addEventHandlers=function(){this.restrictionGroup&&this.restrictionGroup.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.restrictionGroup&&this.restrictionGroup.off("sync",this.collectData,this)},d.prototype.edit=function(a){var b=this.dpiApps.repository.collection.get(a.id);this.frame.show("dpiRestriction",{restrictionGroup:function(){return this.restrictionGroup}.bind(this),model:function(){return b}}).then(function(a){a.save().then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_SAVE_SUCCESS")),this.collectData()}.bind(this))["catch"](function(){this.heyToasts.pushError(this.$translate.instant("DPI_RESTRICTION_SAVE_ERROR")),a.fetch()}.bind(this))}.bind(this))},d.prototype.remove=function(a){this.frame.show("confirm",{title:function(){return this.$translate.instant("DPI_RESTRICTION_DELETE_HEADER")}.bind(this),message:function(){return this.$translate.instant("DPI_RESTRICTION_DELETE_CONFIRM")}.bind(this),options:angular.noop}).then(function(){this.isRemoving[a.id]=!0,this.dpiApps.repository.collection.get(a.id).destroy({wait:!0}).then(function(){var b=this.restrictionGroup.get("apps_table_ids");return b.splice(b.indexOf(a.id),1),this.restrictionGroup.save({apps_table_ids:b})["catch"](function(){return this.$q.reject()}.bind(this))}.bind(this)).then(function(){this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_DELETE_SUCCESS"))}.bind(this))["catch"](function(){this.heyToasts.pushError(this.$translate.instant("DPI_RESTRICTION_DELETE_ERROR"))}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1})}.bind(this))},d.prototype.getCollection=function(){return this.collection},d.prototype.collectData=function(){if(this.restrictionGroup){var a=this.restrictionGroup.get("apps_table_ids")||[];this.collection.reset(this.dpiApps.repository.collection.filter(function(b){return a.indexOf(b.id)!==-1}).map(function(a){var b,c="",d="",e=a.get("apps"),f=a.get("cats");return e&&e.length>0?(b=e[0],c=this.dpi.getCategoryName(e[0]>>16),d=this.dpi.getAppDefinition(e[0]).name):f&&f.length>0&&(c=this.dpi.getCategoryName(f[0])),{id:a.id,compoundId:b,catName:c,appName:d,blocked:a.get("blocked"),enabled:a.get("enabled"),maxRateDown:a.get("qos_rate_max_down")!==-1&&void 0!==a.get("qos_rate_max_down")?1024*a.get("qos_rate_max_down"):void 0,maxRateUp:a.get("qos_rate_max_up")!==-1&&void 0!==a.get("qos_rate_max_up")?1024*a.get("qos_rate_max_up"):void 0}}.bind(this)))}},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","$q","$translate","binaryPrefix","collectionViewComparator","CollectionView","dpi","dpiApps","frame","heyToasts","preferences","Backbone"],angular.module("app-unifi-manage").controller("DpiRestrictionsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],478:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="verticalRhythmTop--cozy"><table collection-view-sort="dpiRestrictionsListCtrl.view" ng-class="{      \'appTable--dark\': dpiRestrictionsListCtrl.preferences.model.get(\'isSettingsDark\')    }" class="noMarginBottom appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="catName" class="dpiRestrictionName"><span translate="DPI_RESTRICTIONS_TABLE_HEADER_NAME_CAT_OR_APP"></span></th><th collection-view-sort-by="enabled" class="dpiRestrictionEnabled"><span translate="DPI_RESTRICTIONS_TABLE_HEADER_NAME_ENABLED"></span></th><th collection-view-sort-by="blocked" class="dpiRestrictionBlocked"><span translate="DPI_RESTRICTIONS_TABLE_HEADER_NAME_BLOCKED"></span></th><th collection-view-sort-by="limitDown" class="dpiRestrictionLimitDown"><span translate="DPI_RESTRICTIONS_TABLE_HEADER_NAME_LIMIT_DOWN"></span></th><th collection-view-sort-by="limitUp" class="dpiRestrictionLimitUp"><span translate="DPI_RESTRICTIONS_TABLE_HEADER_NAME_LIMIT_UP"></span></th><th class="dpiRestrictionActions"><span translate="DPI_RESTRICTIONS_TABLE_HEADER_NAME_ACTIONS"></span></th></tr></thead><tfoot ng-if="dpiRestrictionsListCtrl.view.getModels().length"><tr><td colspan="6"><unifi-micro-pagination unifi-micro-pagination-current-page="dpiRestrictionsListCtrl.currentPage" unifi-micro-pagination-rows-per-page="dpiRestrictionsListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="dpiRestrictionsListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in dpiRestrictionsListCtrl.view.getModels(),          startFrom (dpiRestrictionsListCtrl.currentPage - 1) * dpiRestrictionsListCtrl.rowsPerPage,          limitTo dpiRestrictionsListCtrl.rowsPerPage" data-id="{{::model.id}}"><td class="dpiRestrictionName"><div unifi-dpi-icon unifi-dpi-icon-compound-id="model.get(\'apps\')[0]"></div><span>{{::model.get(\'catName\')}}</span><span ng-if="model.get(\'appName\')">/ {{::model.get(\'appName\')}}</span></td><td ng-bind-html="model.get(\'enabled\') | enabledIcon" class="dpiRestrictionEnabled"></td><td ng-bind-html="model.get(\'blocked\') | enabledIcon" class="dpiRestrictionBlocked"></td><td class="dpiRestrictionLimitDown">{{::model.get(\'maxRateDown\') ? (model.get(\'maxRateDown\') | bps) : (\'DPI_RESTRICTIONS_TABLE_VALUE_UNLIMITED\' | translate)}}</td><td class="dpiRestrictionLimitUp">{{::model.get(\'maxRateUp\') ? (model.get(\'maxRateUp\') | bps) : (\'DPI_RESTRICTIONS_TABLE_VALUE_UNLIMITED\' | translate)}}</td><td class="dpiRestrictionActions appTableCell--actions"><button unifi-if-role-admin ng-click="dpiRestrictionsListCtrl.edit(model)" ng-disabled="dpiRestrictionsListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin="false" ng-click="dpiRestrictionsListCtrl.edit(model)" ng-disabled="dpiRestrictionsListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW"></span></button><button unifi-if-role-admin ng-click="dpiRestrictionsListCtrl.remove(model)" ng-disabled="dpiRestrictionsListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!dpiRestrictionsListCtrl.view.getModels().length" class="appInfoBox appInfoBox--dark appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DPI_RESTRICTIONS_NO_DATA" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],479:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiRestrictionsList",["PaginatedListDirective","eventHandlersDirectiveMixin",function(b,c){var d=new b("dpiRestrictions",a("./dpiRestrictionsList.jade")(),{restrictionGroup:"=unifiDpiRestrictionsListRestrictionGroup"});return d.addMixin(c),d}])},{"./dpiRestrictionsList.jade":478}],480:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j){this.devices=e,this.dpiFilters=b,this.dpiStats=c,this.dpiUtils=d,this.frame=a,this.selectedDpiApplications=g,this.selectedDpiCategories=h,this.wlanDpi=f,this.$filter=i,this.addFilter=this.addFilter.bind(this),this.dpiEnabled=d.isDpiEnabled(),this.legendConfig={labelProperty:"name",valueProperty:"bytes",entryCssIndex:function(a){return this.indexOf(a.name)}.bind(this),visible:function(a){return a.bytes>0},valueFormat:function(a){return i("bytes")(a)}},this.dpiChartConfig={dataProperty:"bytes",type:"solid",label:{main:"",secondary:i("uppercase")(j.instant("STATISTICS_DPI_TRAFFIC"))},pieCss:function(a){var b=this.indexOf(a.data.name);if(b!==-1)return"unifiDonutChartPie"+b}.bind(this)}}d.prototype.setMode=function(){this.appsFromCategory?(this.toggle=this.selectedDpiApplications.toggleApplication.bind(this.selectedDpiApplications),this.indexOf=this.selectedDpiApplications.indexOf.bind(this.selectedDpiApplications)):(this.toggle=this.selectedDpiCategories.toggleCategory.bind(this.selectedDpiCategories),this.indexOf=this.selectedDpiCategories.indexOf.bind(this.selectedDpiCategories))},d.prototype.addEventHandlers=function(){this.devices.repository.collection.on("sync",this.collectData,this),this.wlanDpi.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.devices.repository.collection.off("sync",this.collectData,this),this.wlanDpi.repository.collection.off("sync",this.collectData,this)},d.prototype.showEditFiltersModal=function(){this.frame.show("statisticsDpiFilters").then(function(){this.dpiStats.parse(),this.collectData()}.bind(this))},d.prototype.addFilter=function(a){this.dpiFilters.isEnabled()||(this.dpiFilters.resetFilters(),this.dpiFilters.toggleFiltering()),this.dpiFilters.selectFilters([a]),this.dpiStats.parse(),this.collectData()},d.prototype.removeFilter=function(a){this.dpiFilters.deselectFilters([a]),this.dpiStats.parse(),this.collectData()},d.prototype.collectData=function(){if(this.dpiEnabled){var a=this.appsFromCategory?this.dpiUtils.applicationsSortedByTraffic(this.appsFromCategory):this.dpiUtils.categoriesSortedByTraffic();this.data=a.data,this.totalBytes=a.total.bytes,this.dpiChartConfig.label.main=this.$filter("bytes")(this.totalBytes)}else this.data=[],this.dpiChartConfig.label.main="?"},d.$inject=["frame","dpiFilters","dpiStats","dpiUtils","devices","wlanDpi","selectedDpiApplications","selectedDpiCategories","$filter","$translate"],angular.module("app-unifi-manage").controller("DpiSelectorController",d)},{}],481:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiDpiSelector"><div ng-class="{\'unifiDpiSelectorGraph--disabled\': !dpiSelectorCtrl.dpiEnabled}" class="unifiDpiSelectorGraph"><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="dpiSelectorCtrl.dpiChartConfig" unifi-donut-chart-with-tooltip-data="dpiSelectorCtrl.data"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.name}}</div><div class="noPaddingBottom">{{focusedData.bytes | bytes}}</div></div></unifi-donut-chart-with-tooltip></div><div class="unifiDpiSelectorGraph__rightPane"><div ng-if="dpiSelectorCtrl.dpiEnabled"><div unifi-feature-flag-enable="enableDpiSsidFiltering" class="appForm--cozy"><div class="appFormGroup appFormGroup--cozy"><unifi-autocomplete unifi-autocomplete-on-select="dpiSelectorCtrl.addFilter" unifi-autocomplete-hints="dpiSelectorCtrl.dpiFilters.isEnabled() ? dpiSelectorCtrl.dpiFilters.getAvailableFilters() : dpiSelectorCtrl.dpiFilters.getAllFilters()" unifi-autocomplete-hint-name-property="\'name\'" unifi-autocomplete-placeholder="{{\'STATISTICS_DPI_SEARCH\' | translate}}"></unifi-autocomplete></div></div><div unifi-feature-flag-enable="enableDpiSsidFiltering" class="appInputGroup"><div ng-repeat="filter in dpiSelectorCtrl.dpiFilters.getActiveFilters() | orderBy:\'toString()\'" class="tag appTag appTag--cozy uppercase">{{filter.name}}<div ng-click="dpiSelectorCtrl.removeFilter(filter)" class="appTag__close"></div></div><div class="tag appTag appTag--cozy"><button ng-click="dpiSelectorCtrl.showEditFiltersModal()" class="appMainButton appMainButton--transparent appMainButton--cozy icon ubnt-icon--gears noPadding"></button></div></div><hr unifi-feature-flag-enable="enableDpiSsidFiltering" ng-if="dpiSelectorCtrl.totalBytes !== 0"><unifi-chart-legend unifi-chart-legend-config="dpiSelectorCtrl.legendConfig" unifi-chart-legend-data="dpiSelectorCtrl.data" unifi-chart-legend-on-click="dpiSelectorCtrl.toggle(entry.name);"></unifi-chart-legend><div ng-if="dpiSelectorCtrl.totalBytes === 0" class="appInfoBox appInfoBox--warning appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="STATISTICS_DPI_NO_DATA" class="noMarginBottom"></p></div></div></div></div><div ng-if="!dpiSelectorCtrl.dpiEnabled" class="appInfoBox appInfoBox--warning appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="STATISTICS_DPI_NOT_ENABLED" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="STATISTICS_DPI_NOT_ENABLED_DETAILS" class="noMarginBottom"></p></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],482:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiSelector",[function(){return{controller:"DpiSelectorController",controllerAs:"dpiSelectorCtrl",template:a("./dpiSelector.jade")(),replace:!0,bindToController:!0,scope:{appsFromCategory:"=unifiDpiSelectorAppsFromCategory"},link:function(a,b,c,d){d.setMode(),d.addEventHandlers(),a.$watch(function(){return d.appsFromCategory?d.selectedDpiApplications.getNames():d.selectedDpiCategories.getNames()},function(){d.collectData()},!0),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./dpiSelector.jade":481}],483:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.clients=a,this.devices=b,this.dpi=c,this.dpiStats=d,this.objectUtils=g,this.selectedDpiCategories=i,this.barChartConfig={valueProperty:"totalBytes",range:0},e.call(this,b,f,h,j,k,l,m)}var e=a("../../../app-unifi-manage/controllers/DpiBaseUsersController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.collectData=function(){var a=this.selectedDpiCategories.getIds(),b=this.selectedDpiCategories.getNames(),c=b.map(function(a){return{name:a}},this),d=this.dpiStats.getDpiByApp().filter(function(b){return a.indexOf(b.cat)!==-1&&b.clients}).map(function(a){return a.clients.map(function(b){return{mac:b.mac,rx_bytes:b.rx_bytes,tx_bytes:b.tx_bytes,rx_packets:b.rx_packets,tx_packets:b.tx_packets,totalBytes:b.rx_bytes+b.tx_bytes,modelReady:void 0!==this.getClientModel(b.mac),categoryStats:c.concat({name:this.dpi.getCategoryName(a.cat),rx_bytes:b.rx_bytes,tx_bytes:b.tx_bytes,rx_packets:b.rx_packets,tx_packets:b.tx_packets,totalBytes:b.rx_bytes+b.tx_bytes})}},this)},this);d=Array.prototype.concat.apply([],d),d=this.objectUtils.reduceDuplicates(d,"mac"),d.forEach(function(a){a.categoryStats=this.objectUtils.reduceDuplicates(a.categoryStats,"name",["name","id"]),a.categoryStats.sort(function(a,c){return b.indexOf(a.name)-b.indexOf(c.name)}),a.modelReady||this.fetchKnownClient(a.mac)},this),this.collection.reset(d),this.barChartConfig.range=Math.max.apply(Math,d.map(function(a){return a.totalBytes}))},d.prototype.knownClientFetched=function(a){this.collection.find(function(b){return b.get("mac")===a}).set({modelReady:!0})},d.$inject=["clients","devices","dpi","dpiStats","knownClientsCache","objectUtils","preferences","selectedDpiCategories","wlanDpi","$injector","Backbone","CollectionView"],angular.module("app-unifi-manage").controller("DpiUsersController",d)},{"../../../app-unifi-manage/controllers/DpiBaseUsersController":1013}],484:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiDpiUsers"><table id="dpiUsersTable" collection-view-sort="dpiUsersCtrl.view" ng-class="{      \'is-not-responsive\': !dpiUsersCtrl.isResponsive()    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th class="alignCenter dpiUserStateIcon appTableCell--smash visible--smUp"></th><th collection-view-sort-by="mac" class="dpiUserName"><span translate="DPI_USERS_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="totalBytes" class="dpiUserCategories"><span translate="DPI_USERS_TABLE_HEADER_CATEGORIES"></span></th><th collection-view-sort-by="tx_bytes" class="dpiUserUp"><span translate="DPI_USERS_TABLE_HEADER_UP"></span></th><th collection-view-sort-by="rx_bytes" class="dpiUserDown"><span translate="DPI_USERS_TABLE_HEADER_DOWN"></span></th></tr></thead><tfoot ng-if="dpiUsersCtrl.view.getModels().length"><tr><td colspan="5"><unifi-list-pagination unifi-list-pagination-current-page="dpiUsersCtrl.currentPage" unifi-list-pagination-rows-per-page="dpiUsersCtrl.rowsPerPage" unifi-list-pagination-total-rows="dpiUsersCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in dpiUsersCtrl.view.getModels(),          startFrom (dpiUsersCtrl.currentPage - 1) * dpiUsersCtrl.rowsPerPage,          limitTo dpiUsersCtrl.rowsPerPage" data-id="{{::dpiUsersCtrl.getClientModel(model.get(\'mac\')).id}}"><td class="dpiUserStateIcon visible--smUp"><span unifi-client-icon="::dpiUsersCtrl.getClientModel(model.get(\'mac\'))"></span></td><td unifi-open-panel="dpiUsersCtrl.getClientModel(model.get(\'mac\'))" unifi-open-panel-active-tab="\'details\'" unifi-open-panel-active-accordion-group="\'dpi\'" class="dpiUserName appTableCell--smash clickable">{{::dpiUsersCtrl.getClientModel(model.get(\'mac\')).getDisplayName()}}</td><td class="dpiUserCategories"><unifi-bar-chart unifi-bar-chart-config="dpiUsersCtrl.barChartConfig" unifi-bar-chart-data="model.get(\'categoryStats\')"><div class="appTooltip appTooltip--cozy unifiBarSegmentTooltip"><div class="unifiChartTooltipHeader verticalRhythmQuarter">{{entry.name}}</div><div class="unifiChartTooltipBody"><div class="verticalRhythmQuarter"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow downPktsBytes"><dt>{{\'CLIENT_PROPERTIES_LABEL_UP_PKTS_BYTES\' | translate}}</dt><dd>{{entry.tx_packets | numberToString}} / {{entry.tx_bytes | bytes}}</dd></div><div class="appDescriptionListRow upPktsBytes"><dt>{{\'CLIENT_PROPERTIES_LABEL_DOWN_PKTS_BYTES\' | translate}}</dt><dd>{{entry.rx_packets | numberToString}} / {{entry.rx_bytes | bytes}}</dd></div></div></div></div></div></unifi-bar-chart></td><td class="dpiUserUp appTableCell--smash">{{::model.get(\'tx_bytes\') | bytes}}</td><td class="dpiUserDown appTableCell--smash">{{::model.get(\'rx_bytes\') | bytes}}</td></tr></tbody></table><div ng-if="!dpiUsersCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DPI_USERS_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="DPI_USERS_TABLE_EMPTY_NO_DATA" class="noMarginBottom"></p></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],485:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDpiUsers",[function(){return{controller:"DpiUsersController",controllerAs:"dpiUsersCtrl",template:a("./dpiUsers.jade")(),replace:!0,bindToController:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$watch(function(){return d.selectedDpiCategories.getNames()},function(){d.collectData()},!0),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./dpiUsers.jade":484}],486:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.frame=a,this.site=d,this.widgets=e,this.locked=!0,this.gridsterOpts={columns:3,rowHeight:102,margins:[10,10],outerMargin:!0,mobileBreakPoint:600,mobileModeEnabled:!0,minColumns:1,minRows:3,maxRows:100,defaultSizeX:1,defaultSizeY:1,draggable:{handle:".unifiDragHandle",stop:e.save,enabled:!0},resizable:{enabled:!1}},this.storage=new c(b,"DYNAMIC_DASHBOARD_SETTINGS"),this.storage.hydrate(),this.settings=this.storage.getValue()||{}}d.prototype.onResize=function(a){this.widgets.onResize(a)},d.prototype.showWidgetsModal=function(){this.frame.show("dashboardWidgets")},d.prototype.isHealthGraphVisible=function(){return void 0===this.settings[this.site.getActiveSite()]&&(this.settings[this.site.getActiveSite()]={gaugesVisible:!0}),this.settings[this.site.getActiveSite()].gaugesVisible},d.prototype.removeGauges=function(){this.settings[this.site.getActiveSite()].gaugesVisible=!1,this.storage.setValue(this.settings)},d.prototype.reset=function(){this.settings[this.site.getActiveSite()].gaugesVisible=!0,this.storage.setValue(this.settings),this.widgets.reset()},d.$inject=["frame","localStorageFailSafe","LocalStorageObjectValue","site","widgets"],angular.module("app-unifi-manage").controller("DynamicDashboardController",d)},{}],487:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appActionLinkContainer"><div class="appActionLinkList verticalRhythmTop--condensed"><p ng-if="!dynamicDashboardCtrl.locked" class="appActionLink"><a ng-click="dynamicDashboardCtrl.reset()" class="appLink--secondary appLink--subtleDanger iconText appIconText"><span class="iconText__icon icon ubnt-icon--reset"></span><span translate="DASHBOARD_ACTION_RESET" class="iconText__text"></span></a></p><p ng-if="!dynamicDashboardCtrl.locked" class="appActionLink"><a ng-click="dynamicDashboardCtrl.showWidgetsModal()" ng-class="{          \'is-link-disabled\': !dynamicDashboardCtrl.widgets.getAvailableWidgets().length        }" class="appLink--secondary appLink--subtleSuccess iconText appIconText"><span class="iconText__icon icon ubnt-icon--plus-circle"></span><span translate="DASHBOARD_ACTION_ADD_WIDGET" class="iconText__text"></span></a></p><p class="appActionLink horizontalRhythm--cozy"><a ng-click="dynamicDashboardCtrl.locked = !dynamicDashboardCtrl.locked" class="appLink--secondary iconText appIconText"><span ng-class="dynamicDashboardCtrl.locked ? \'ubnt-icon--lock\' : \'ubnt-icon--lock-open\'" class="iconText__icon icon ubnt-icon--lock"></span><span class="iconText__text">{{ dynamicDashboardCtrl.locked ? \'DASHBOARD_ACTION_UNLOCK\' : \'DASHBOARD_ACTION_LOCK\' | translate}}</span></a></p></div><div ng-class="{\'unifiDashboardContainer--flexible\': isFlexible}" class="unifiSmartMarginContainer unifiDashboardContainer verticalRhythmPaddingTop"><div ng-if="dynamicDashboardCtrl.isHealthGraphVisible()" class="container"><div class="row row--comfy"><div class="col--xs12 dashboardWidget"><div ng-if="!dynamicDashboardCtrl.locked" class="appActionIconGroup dashboardWidgetActions"><div ng-click="dynamicDashboardCtrl.removeGauges()" class="appActionIcon"><span class="button__icon icon ubnt-icon--x"></span></div></div><unifi-health class="unifiDashboardHealth"></unifi-health></div></div></div><div gridster="dynamicDashboardCtrl.gridsterOpts" class="container"><ul class="fullWidth"><unifi-dashboard-widget ng-repeat="item in dynamicDashboardCtrl.widgets.getActiveWidgets()" unifi-dashboard-widget-item="item" unifi-dashboard-widget-locked="dynamicDashboardCtrl.locked"></unifi-dashboard-widget></ul></div></div></div>'),b.join("")}},{"jade/runtime":232}],488:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDynamicDashboard",["bowser",function(b){return{controller:"DynamicDashboardController",controllerAs:"dynamicDashboardCtrl",template:a("./dynamicDashboard.jade")(),link:function(a){a.isFlexible=!b.msie}}}])},{"./dynamicDashboard.jade":487}],489:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.dynamicDnsStats=b,this.gatewayUtils=c,this.columnStore=h,this.INSIGHTS_DEFAULTS=i,this.filter=new g,this.defaultSortBy="status",this.isColumnVisible=this.columnStore.isColumnVisible.bind(this.columnStore),this.isCustomized=this.columnStore.getCustomized.bind(this.columnStore),e.call(this,a,f,d)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){this.isFiltered=this.filter.isFiltered.bind(this.filter)},d.prototype.getCollection=function(){return this.dynamicDnsStats.repository.collection},d.prototype.getEditDynamicDnsPropertyPanelStates=function(a){return[{state:"editDynamicDns",value:a.id,overwrite:!0}]},d.prototype.refreshColumns=function(){this.isStateChanging()||this.columnStore.setColumns()},d.prototype.refresh=function(a){return this.refreshColumns(),e.prototype.refresh.call(this,a)},d.$inject=["$injector","dynamicDnsStats","gatewayUtils","preferences","CollectionView","DynamicDnsFilter","dynamicDnsListColumnStore","INSIGHTS_DEFAULTS"],angular.module("app-unifi-manage").controller("DynamicDnsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],490:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="dynamicDnsListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="dynamicDnsListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="dynamicDnsListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><table id="knownClientsTable" collection-view-sort="dynamicDnsListCtrl.view" ng-class="{          \'is-not-responsive\': dynamicDnsListCtrl.columnStore.getCustomized() || !dynamicDnsListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="service" ng-if="dynamicDnsListCtrl.isColumnVisible(\'service\')" class="dynamicDnsService"><span translate="DYNAMIC_DNS_TABLE_HEADER_SERVICE"></span></th><th collection-view-sort-by="status" ng-if="dynamicDnsListCtrl.isColumnVisible(\'status\')" class="dynamicDnsStatus"><span translate="DYNAMIC_DNS_TABLE_HEADER_STATUS"></span></th><th collection-view-sort-by="host_name" ng-if="dynamicDnsListCtrl.isColumnVisible(\'host_name\')" class="dynamicDnsHostname"><span translate="DYNAMIC_DNS_TABLE_HEADER_HOSTNAME"></span></th><th collection-view-sort-by="login" ng-if="dynamicDnsListCtrl.isColumnVisible(\'login\')" class="dynamicDnsLogin"><span translate="DYNAMIC_DNS_TABLE_HEADER_USERNAME"></span></th><th collection-view-sort-by="server" ng-if="dynamicDnsListCtrl.isColumnVisible(\'server\')" class="dynamicDnsServer"><span translate="DYNAMIC_DNS_TABLE_HEADER_SERVER"></span></th><th collection-view-sort-by="ip" ng-if="dynamicDnsListCtrl.isColumnVisible(\'ip\')" class="dynamicDnsIp"><span translate="DYNAMIC_DNS_TABLE_HEADER_IP"></span></th><th collection-view-sort-by="last_updated" ng-if="dynamicDnsListCtrl.isColumnVisible(\'last_updated\')" class="dynamicDnsLastUpdated"><span translate="DYNAMIC_DNS_TABLE_HEADER_LAST_UPDATED"></span></th><th class="dynamicDnsActions appTableCell--withAction"><span translate="DYNAMIC_DNS_TABLE_HEADER_ACTIONS" ng-if="dynamicDnsListCtrl.isColumnVisible(\'actions\')"></span><unifi-list-column-selector unifi-list-column-selector-column-store="dynamicDnsListCtrl.columnStore"></unifi-list-column-selector></th></tr></thead><tfoot ng-if="dynamicDnsListCtrl.view.getModels().length"><tr><td colspan="{{dynamicDnsListCtrl.columnStore.getColumns().length + (dynamicDnsListCtrl.isColumnVisible(\'actions\') ? 0 : 1)}}"><unifi-list-pagination unifi-list-pagination-current-page="dynamicDnsListCtrl.currentPage" unifi-list-pagination-rows-per-page="dynamicDnsListCtrl.rowsPerPage" unifi-list-pagination-total-rows="dynamicDnsListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in dynamicDnsListCtrl.view.getModels(),              startFrom (dynamicDnsListCtrl.currentPage - 1) * dynamicDnsListCtrl.rowsPerPage,              limitTo dynamicDnsListCtrl.rowsPerPage" collection-view-repeat-watch="dynamicDnsListCtrl.columnStore.getColumns()" data-id="{{::model.id}}"><td ng-if="::dynamicDnsListCtrl.isColumnVisible(\'service\')" class="dynamicDnsService">{{::model.get(\'service\')}}</td><td ng-if="::dynamicDnsListCtrl.isColumnVisible(\'status\')" class="dynamicDnsStatus">{{::model.get(\'status\')}}</td><td ng-if="::dynamicDnsListCtrl.isColumnVisible(\'host_name\')" class="dynamicDnsHostname">{{::model.get(\'host_name\')}}</td><td ng-if="::dynamicDnsListCtrl.isColumnVisible(\'login\')" class="dynamicDnsLogin">{{::model.get(\'login\')}}</td><td ng-if="::dynamicDnsListCtrl.isColumnVisible(\'server\')" class="dynamicDnsServer">{{::model.get(\'server\')}}</td><td ng-if="::dynamicDnsListCtrl.isColumnVisible(\'ip\')" class="dynamicDnsIP">{{::model.get(\'ip\')}}</td><td ng-if="::dynamicDnsListCtrl.isColumnVisible(\'last_updated\')" class="dynamicDnsLastUpdated">{{::model.get(\'last_updated\') | seconds}}</td><td class="clientActions appTableCell--actions"><button ng-init="editStates = dynamicDnsListCtrl.getEditDynamicDnsPropertyPanelStates(model)" ng-if="dynamicDnsListCtrl.isColumnVisible(\'actions\')" unifi-open-panel="::dynamicDnsListCtrl.gatewayUtils.getSiteGateway()" unifi-open-panel-active-tab="\'configure\'" unifi-open-panel-active-accordion-group="\'dynamicDns\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="::editStates" class="appMainButton appMainButton--tertiary"><div unifi-if-role-admin><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT" class="visible--lgUp"></span></div><div unifi-if-role-admin="false"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW" class="visible--lgUp"></span></div></button></td></tr></tbody></table><div ng-if="!dynamicDnsListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DYNAMIC_DNS_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!dynamicDnsListCtrl.isFiltered()" translate="DYNAMIC_DNS_TABLE_EMPTY_NO_DYNAMIC_DNS" class="noMarginBottom"></p><p ng-if="dynamicDnsListCtrl.isFiltered()" translate="DYNAMIC_DNS_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],491:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiDynamicDnsList",["PaginatedListDirective",function(b){return new b("dynamicDns",a("./dynamicDnsList.jade")())}])},{"./dynamicDnsList.jade":490}],492:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiEventIcon",function(){var a={EVT_AD_GuestAuthorizedFor:["appAlertIcon--primary","ubnt-icon--check-circle2"],EVT_AD_GuestExtended:["appAlertIcon--primary","ubnt-icon--clock-2"],EVT_AD_GuestUnauthorized:["appAlertIcon--primary","ubnt-icon--block"],EVT_AD_Login:["appAlertIcon--primary","ubnt-icon--login"],EVT_AD_LoginFailed:["appAlertIcon--danger","ubnt-icon--login"],EVT_AD_PaymentRefunded:["appAlertIcon--primary","ubnt-icon--dollar-sign-2"],EVT_AD_PhoneAppUpdateAvailable:["appAlertIcon--primary","ubnt-icon--download-2"],EVT_AD_PhoneUpdateAvailable:["appAlertIcon--primary","ubnt-icon--download-2"],EVT_AD_UpdateAvailable:["appAlertIcon--primary","ubnt-icon--download-2"],EVT_AD_VoucherCreated:["appAlertIcon--primary","ubnt-icon--document"],EVT_AD_VoucherDeleted:["appAlertIcon--primary","ubnt-icon--trashcan"],EVT_AP_Adopted:["appAlertIcon--success","ubnt-icon--ap2"],EVT_AP_AutoReadopted:["appAlertIcon--success","ubnt-icon--ap2"],EVT_AP_ChannelChanged:["appAlertIcon--primary","ubnt-icon--ap2"],EVT_AP_Configured:["appAlertIcon--primary","ubnt-icon--tools"],EVT_AP_Connected:["appAlertIcon--success","ubnt-icon--ap2"],EVT_AP_Deleted:["appAlertIcon--danger","ubnt-icon--trashcan"],EVT_AP_DiscoveredPending:["appAlertIcon--warning","ubnt-icon--ap2"],EVT_AP_HostKeyMismatch:["appAlertIcon--danger","ubnt-icon--key"],EVT_AP_Isolated:["appAlertIcon--danger","ubnt-icon--ap-offline"],EVT_AP_Lost_Contact:["appAlertIcon--danger","ubnt-icon--ap-offline"],EVT_AP_PossibleInterference:["appAlertIcon--warning","ubnt-icon--sine-wave-alert"],EVT_AP_RediscoveredPending:["appAlertIcon--warning","ubnt-icon--ap2"],EVT_AP_Restarted:["appAlertIcon--warning","ubnt-icon--ap2"],EVT_AP_RestartedUnknown:["appAlertIcon--warning","ubnt-icon--ap2"],EVT_AP_DetectRogueAP:["appAlertIcon--danger","ubnt-icon--ap2"],EVT_AP_RollUpgrade:["appAlertIcon--primary","ubnt-icon--ap2"],EVT_AP_Upgraded:["appAlertIcon--success","ubnt-icon--ap2"],EVT_AP_UpgradeScheduled:["appAlertIcon--primary","ubnt-icon--clock-2"],EVT_CF_VwireSet:["appAlertIcon--primary","ubnt-icon--ap"],EVT_CF_VwireUnset:["appAlertIcon--primary","ubnt-icon--ap-offline"],EVT_GW_Adopted:["appAlertIcon--success","ubnt-icon--ethernet-port"],EVT_GW_AutoReadopted:["appAlertIcon--success","ubnt-icon--ethernet-port"],EVT_GW_Connected:["appAlertIcon--success","ubnt-icon--ethernet"],EVT_GW_Deleted:["appAlertIcon--danger","ubnt-icon--trashcan"],EVT_GW_DiscoveredPending:["appAlertIcon--warning","ubnt-icon--ethernet-port"],EVT_GW_HostKeyMismatch:["appAlertIcon--danger","ubnt-icon--key"],EVT_GW_Lost_Contact:["appAlertIcon--danger","ubnt-icon--ethernet"],EVT_GW_Restarted:["appAlertIcon--warning","ubnt-icon--ethernet-port"],EVT_GW_RestartedUnknown:["appAlertIcon--warning","ubnt-icon--ethernet-port"],EVT_GW_Upgraded:["appAlertIcon--success","ubnt-icon--ethernet-port"],EVT_GW_UpgradeScheduled:["appAlertIcon--primary","ubnt-icon--clock-2"],EVT_HS_AuthedByNoAuth:["appAlertIcon--primary","ubnt-icon--check-circle2"],EVT_HS_AuthedByPassword:["appAlertIcon--primary","ubnt-icon--check-circle2"],EVT_HS_PaymentProcessed:["appAlertIcon--primary","ubnt-icon--dollar-sign-2"],EVT_HS_VoucherUsed:["appAlertIcon--primary","ubnt-icon--document"],EVT_LC_Blocked:["appAlertIcon--primary","ubnt-icon--block"],EVT_LC_Unblocked:["appAlertIcon--primary","ubnt-icon--check-circle2"],EVT_LG_Connected:["appAlertIcon--primary","ubnt-icon--guest-wired"],EVT_LG_Disconnected:["appAlertIcon--primary","ubnt-icon--guest-wired"],EVT_LU_Connected:["appAlertIcon--primary","ubnt-icon--user-wired"],EVT_LU_Disconnected:["appAlertIcon--primary","ubnt-icon--user-wired"],EVT_PH_Adopted:["appAlertIcon--success","ubnt-icon--phone-3"],EVT_PH_AutoReadopted:["appAlertIcon--success","ubnt-icon--phone-3"],EVT_PH_Connected:["appAlertIcon--success","ubnt-icon--phone-3"],EVT_PH_Deleted:["appAlertIcon--danger","ubnt-icon--trashcan"],EVT_PH_DiscoveredPending:["appAlertIcon--warning","ubnt-icon--phone-3"],EVT_PH_HostKeyMismatch:["appAlertIcon--danger","ubnt-icon--key"],EVT_PH_Lost_Contact:["appAlertIcon--danger","ubnt-icon--phone-3"],EVT_PH_Restarted:["appAlertIcon--warning","ubnt-icon--phone-3"],EVT_PH_RestartedUnknown:["appAlertIcon--warning","ubnt-icon--phone-3"],EVT_PH_Upgraded:["appAlertIcon--success","ubnt-icon--phone-3"],EVT_PH_UpgradeScheduled:["appAlertIcon--primary","ubnt-icon--clock-2"],EVT_SW_Adopted:["appAlertIcon--success","ubnt-icon--switch"],EVT_SW_AutoReadopted:["appAlertIcon--success","ubnt-icon--switch"],EVT_SW_Connected:["appAlertIcon--success","ubnt-icon--switch"],EVT_SW_Deleted:["appAlertIcon--danger","ubnt-icon--trashcan"],EVT_SW_DetectNeighboringDHCP:["appAlertIcon--danger","ubnt-icon--network"],EVT_SW_DiscoveredPending:["appAlertIcon--warning","ubnt-icon--switch"],EVT_SW_HostKeyMismatch:["appAlertIcon--danger","ubnt-icon--key"],EVT_SW_Lost_Contact:["appAlertIcon--danger","ubnt-icon--switch"],EVT_SW_Restarted:["appAlertIcon--warning","ubnt-icon--switch"],EVT_SW_RestartedUnknown:["appAlertIcon--warning","ubnt-icon--switch"],EVT_SW_Upgraded:["appAlertIcon--success","ubnt-icon--switch"],EVT_SW_UpgradeScheduled:["appAlertIcon--primary","ubnt-icon--clock-2"],EVT_WC_Blocked:["appAlertIcon--primary","ubnt-icon--block"],EVT_WC_Unblocked:["appAlertIcon--primary","ubnt-icon--check-circle2"],EVT_WG_AuthorizationEnded:["appAlertIcon--primary","ubnt-icon--block"],EVT_WG_AuthorizationEndedByQuota:["appAlertIcon--primary","ubnt-icon--block"],EVT_WG_Connected:["appAlertIcon--primary","ubnt-icon--guest-wireless"],EVT_WG_Disconnected:["appAlertIcon--primary","ubnt-icon--guest-wireless"],EVT_WG_Roam:["appAlertIcon--primary","ubnt-icon--guest-wireless"],EVT_WG_RoamRadio:["appAlertIcon--primary","ubnt-icon--guest-wireless"],EVT_WU_Connected:["appAlertIcon--primary","ubnt-icon--user-wireless"],EVT_WU_Disconnected:["appAlertIcon--primary","ubnt-icon--user-wireless"],EVT_WU_Roam:["appAlertIcon--primary","ubnt-icon--user-wireless"],EVT_WU_RoamRadio:["appAlertIcon--primary","ubnt-icon--user-wireless"],EVT_LAN_LoopDetected:["appAlertIcon--danger","ubnt-icon--network"],EVT_LAN_NeighboringDHCPDetected:["appAlertIcon--danger","ubnt-icon--network"],EVT_WWW_Disconnected:["appAlertIcon--danger","ubnt-icon--internet-offline"],EVT_WWW_Reconnected:["appAlertIcon--success","ubnt-icon--internet"],EVT_DEV_Lost_Contact:["appAlertIcon--danger","ubnt-icon--ap-offline"],EVT_DEV_DiscoveredPending:["appAlertIcon--warning","ubnt-icon--ethernet-port"]};return{replace:!0,scope:{eventType:"@unifiEventIcon"},template:'<div class="icon appAlertIcon" ng-class="::eventIconClasses"></div>',link:function(b){b.eventType&&(b.eventIconClasses=a[b.eventType])}}})},{}],493:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.events=b,this.comparator=c,this.defaultSortBy="datetime",this.defaultSortDesc=!0,this.filter=new g,e.call(this,a,d,f)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){this.isFiltered=this.filter.isFiltered.bind(this.filter)},d.prototype.getCollection=function(){return this.events.repository.collection},d.prototype.setEventsWithin=function(a){return this.events.repository.collection.setWithin(a),this.events.repository.refresh({reset:!0})},d.prototype.getEventsWithin=function(){return this.events.repository.collection.getWithin()},d.prototype.setEventType=function(a){this.filter.setEventType(a),this.refresh()},d.prototype.isEventTypeActive=function(a){return this.filter.isEventTypeActive(a)},d.prototype.getEventTypeCount=function(a){return this.events.repository.collection.meta[a]||0},d.prototype.showMoreEvents=function(){return this.isFetchingMore=!0,this.events.repository.fetchMore()["finally"](function(){this.isFetchingMore=!1}.bind(this))},d.prototype.hasMoreEvents=function(){return this.getCollection().length<this.getTotalRows()},d.prototype.getTotalRows=function(){return this.events.repository.collection.getTotalEvents()},d.prototype.isEventsLoading=function(){return!!(this.getCollection().isLoading||this.view&&this.view.isRefreshing())},d.$inject=["$injector","events","eventsComparator","CollectionView","preferences","EventFilter"],angular.module("app-unifi-manage").controller("EventListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],494:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--dark appActionBar--transparent noHorizontalPadding"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-time-filter-dropdown unifi-time-filter-dropdown-default-hours="eventListCtrl.getEventsWithin()" unifi-time-filter-dropdown-values="[1, 8, 24, 48, 168, 336, 720]" unifi-time-filter-dropdown-callback="eventListCtrl.setEventsWithin(hours)" unifi-time-filter-dropdown-is-dark="true"></unifi-time-filter-dropdown></div><div class="appActionBarFilter visible--mdUp"><ul class="buttonGroup buttonGroup--shrink appMainButtonGroup appMainButtonGroup--dark appMainButtonGroup--cozy"><li id="eventTypeFilterAll" ng-click="eventListCtrl.setEventType(null)" ng-class="{\'is-button-selected\': eventListCtrl.isEventTypeActive(null) }" class="button appMainButton appMainButton--cozy">{{\'EVENT_TYPE_FILTER_ALL\' | translate}} ({{eventListCtrl.getEventTypeCount(\'all\')}})</li><li id="eventTypeFilterAdmin" ng-click="eventListCtrl.setEventType(\'admin\')" ng-class="{\'is-button-selected\': eventListCtrl.isEventTypeActive(\'admin\') }" class="button appMainButton appMainButton--cozy">{{\'EVENT_TYPE_FILTER_ADMIN\' | translate}} ({{eventListCtrl.getEventTypeCount(\'admin\')}})</li><li id="eventTypeFilterLan" ng-click="eventListCtrl.setEventType(\'lan\')" ng-class="{\'is-button-selected\': eventListCtrl.isEventTypeActive(\'lan\') }" class="button appMainButton appMainButton--cozy">{{\'EVENT_TYPE_FILTER_LAN\' | translate}} ({{eventListCtrl.getEventTypeCount(\'lan\')}})</li><li id="eventTypeFilterWlan" ng-click="eventListCtrl.setEventType(\'wlan\')" ng-class="{\'is-button-selected\': eventListCtrl.isEventTypeActive(\'wlan\') }" class="button appMainButton appMainButton--cozy">{{\'EVENT_TYPE_FILTER_WLAN\' | translate}} ({{eventListCtrl.getEventTypeCount(\'wlan\')}})</li></ul></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="eventListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-dark="true" unifi-search-is-busy="eventListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><table id="eventsTable" unifi-condensed="appTable--condensed" unifi-condensed-off="appTable--cozy" class="unifiEventsTable noMarginBottom table--scrollable appTable appTable--dark appTable--flexible appTable--fullScrollable"><thead><tr><th class="unifiEventsTable__eventIcon noPadding visible--smUp">&nbsp;</th><th class="unifiEventsTable__details"><span translate="EVENT_TABLE_HEADER_EVENT"></span></th><th class="unifiEventsTable__date visible--smUp"><span translate="EVENT_TABLE_HEADER_TIME"></span></th><th class="unifiEventsTable__time visible--smUp">&nbsp;</th></tr></thead><tbody><tr collection-view-repeat="model in eventListCtrl.view.getModels(),          startFrom (eventListCtrl.currentPage - 1) * eventListCtrl.rowsPerPage,          limitTo eventListCtrl.rowsPerPage" data-id="{{::model.id}}" class="unifiEventsTable__row"><td class="unifiEventsTable__eventIcon noPadding visible--smUp"><div unifi-event-icon="{{::model.get(\'key\')}}" class="appAlertIcon--condensed"></div></td><td class="unifiEventsTable__details"><span unifi-event-message="model"></span><div class="visible--xs">{{::model.get(\'datetime\') | moment: \'format\': \'datetime\'}}</div></td><td class="unifiEventsTable__date visible--smUp">{{::model.get(\'datetime\') | moment: \'calendar\'}}</td><td class="unifiEventsTable__time visible--smUp">{{::model.get(\'datetime\') | moment: \'format\': \'time\'}}</td></tr><tr ng-if="!eventListCtrl.isEventsLoading() &amp;&amp; !eventListCtrl.view.getModels().length"><td colspan="4"><div class="appInfoBox appInfoBox--cozy appInfoBox--dark appInfoBox--noBorder verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="EVENT_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!eventListCtrl.isFiltered()" translate="EVENT_TABLE_EMPTY_NO_EVENTS" class="noMarginBottom"></p><p ng-if="eventListCtrl.isFiltered()" translate="EVENT_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></td></tr><tr ng-if="eventListCtrl.isEventsLoading() &amp;&amp; !eventListCtrl.isFetchingMore" class="unifiEventsTable__busy"><td colspan="4"><div class="appSpinner appSpinner--light appSpinner--small"></div></td></tr></tbody><tfoot><tr><td colspan="4"><unifi-list-pagination unifi-list-pagination-current-page="eventListCtrl.currentPage" unifi-list-pagination-rows-per-page="eventListCtrl.rowsPerPage" unifi-list-pagination-total-rows="eventListCtrl.view.getModels().length" unifi-list-pagination-total-links="5" unifi-list-pagination-is-dark="true"></unifi-list-pagination></td></tr><tr ng-if="eventListCtrl.hasMoreEvents()"><td colspan="4" class="unifiEventsTable__showMore"><span>{{\'EVENT_TABLE_LIMITED\' | translate: \'{currentLength:\' + eventListCtrl.getCollection().length + \', totalLength: \' + eventListCtrl.getTotalRows() + \'}\'}}\n&nbsp;</span><button ng-click="eventListCtrl.showMoreEvents()" busy-toggle="eventListCtrl.isFetchingMore" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appTextButton">{{\'EVENT_TABLE_FETCH_MORE\' | translate}}</button></td></tr></tfoot></table></div>'),b.join("")}},{"jade/runtime":232}],495:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiEventList",["PaginatedListDirective",function(b){return new b("event",a("./eventList.jade")())}])},{"./eventList.jade":494}],496:[function(a,b,c){"use strict";function d(a,b,c){this.devices=a,this.clients=b,this.$filter=c,this.itemTypes={ap:"device","switch":"device",gateway:"device",phone:"device",user:"client",guest:"client",client:"client",voucher:void 0,admin:void 0}}d.prototype.getItemModel=function(a,b){switch(this.itemTypes[a.toLowerCase()]){case"device":return this.devices.repository.collection.get(b);case"client":return this.clients.repository.collection.get(b)}},d.prototype.formatAttributes=function(a){return a=angular.extend({},a),a.hasOwnProperty("bytes")&&(a.bytes=this.$filter("bytes")(a.bytes)),a.hasOwnProperty("duration")&&(a.duration=this.$filter("duration")(a.duration,"seconds","d[d] h[h] m[m]")),a},d.$inject=["devices","clients","$filter"],angular.module("app-unifi-manage").controller("EventMessageController",d)},{}],497:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiEventMessage",["$compile","$translate","regexUtils","REGEX_PATTERNS","EVENT_KEYS",function(a,b,c,d,e){return{scope:{model:"=unifiEventMessage"},controller:"EventMessageController",controllerAs:"eventMessageCtrl",replace:!0,restrict:"AE",template:"<span></span>",link:function(f,g,h,i){var j=function(b){if(b){var e=new RegExp("("+Object.keys(i.itemTypes).join("|")+")\\[(.*?)\\]","gi"),h=b.replace(e,function(a,b,e){var f=(e.match(c.captured(d.MAC_ADDRESS))||[])[0]||"",g=(e.match(/^(.*)(?=\()/i)||[])[0]||"";return["<unifi-event-message-item","  unifi-event-message-item-type=\"{{'"+b+"'}}\"","  unifi-event-message-item-id=\"{{'"+e+"'}}\"","  unifi-event-message-item-mac=\"{{'"+f+"'}}\"","  unifi-event-message-item-name=\"{{'"+g+"'}}\">","</unifi-event-message-item>"].join("")});g.html(a("<span>"+h+"</span>")(f))}};f.model&&j(e[f.model.get("key")]?b.instant(e[f.model.get("key")],i.formatAttributes(f.model.attributes)):f.model.get("msg"))}}}])},{}],498:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<span><a ng-if="model" unifi-open-panel="::model" unifi-open-panel-active-tab="\'details\'">{{(name || model.getDisplayName())}}</a><span ng-if="!model" class="is-alert-item-disabled">{{::type}} {{(name ? name : (mac ? mac : id))}}</span></span>'),b.join("")}},{"jade/runtime":232}],499:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiEventMessageItem",["knownClientsCache",function(a){return{scope:{type:"@unifiEventMessageItemType",id:"@unifiEventMessageItemId",mac:"@unifiEventMessageItemMac",name:"@unifiEventMessageItemName"},require:"^unifiEventMessage",replace:!0,restrict:"E",templateUrl:"partials/eventMessageItem.html",link:function(b,c,d,e){b.type&&b.mac?(b.model=e.getItemModel(b.type,b.mac))||"client"===e.itemTypes[b.type.toLowerCase()]&&(a.repository.registerItem(b.mac).fetchItem(b.mac).then(function(a){b.model=a}),b.$on("$destroy",function(){a.repository.unregisterItem(b.mac)})):b.model=void 0}}}])},{}],500:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("../../controllers/EventsLinkController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["eventFrameUtils"],angular.module("app-unifi-manage").controller("EventsSideNavController",d)},{"../../controllers/EventsLinkController":1021}],501:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="eventsLink" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div ng-click="eventsSideNavCtrl.toggleEvents()" class="appGlobalSideNav__itemTrigger"></div><div class="appGlobalSideNav__itemIcon icon ubnt-icon--select-check"></div><div ng-if="!eventsSideNavCtrl.isEventsOpen()" translate="COMMON_NAV_EVENTS" class="appGlobalSideNavTooltip"></div><div side-nav-popover-layout="eventsLayout" ng-init="eventsFullScreen = false" ng-class="{\'appGlobalSideNavPopover--fullscreen\': eventsFullScreen}" class="appGlobalSideNavPopover appGlobalSideNavPopover--withLayerShadow"><div ng-click="eventsFullScreen = !eventsFullScreen" class="appGlobalSideNavPopover__fullscreenIcon visible--mdUp"><div class="icon ubnt-icon--fullscreen"></div></div><div class="appGlobalSideNavPopover__inner"><div side-nav-popover-content class="appGlobalSideNavPopoverList"></div><div side-nav-popover-placeholder></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],502:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiEventsSideNav",[function(){return{controller:"EventsSideNavController",controllerAs:"eventsSideNavCtrl",replace:!0,restrict:"E",template:a("./eventsSideNav.jade")()}}])},{"./eventsSideNav.jade":501}],503:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.heyToasts=f,this.firewallGroups=d,this.apiResults=c,this.groupMembersMin=1,this.patterns={name:b.FIREWALL_GROUP_NAME},e.call(this,g)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes);return a.group_members=a.group_members.filter(function(a){return!!a}),this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("SETTINGS_ROUTING_TAB_FIREWALL_GROUPS").toLowerCase()})),this.firewallGroups.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("SETTINGS_ROUTING_TAB_FIREWALL_GROUPS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";this["model"+b]&&(this["model"+b].attributes.name=this.model&&this.model.get("name")||"",this["model"+b].attributes.group_type=this.model&&this.model.get("group_type")||"address-group",this["model"+b].attributes.group_members=this.model&&angular.copy(this.model.get("group_members"))||[])},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","REGEX_PATTERNS","apiResults","firewallGroups","heyToasts","modelDivergence"],angular.module("app-unifi-manage").controller("FirewallGroupsFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],504:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="firewallGroupsFormCtrl.form" ng-class="{    \'appForm--dark\': isDark,    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': firewallGroupsFormCtrl.showValidation,    \'is-validation-hidden\': !firewallGroupsFormCtrl.showValidation  }" ng-submit="firewallGroupsFormCtrl.form.$valid &amp;&amp; firewallGroupsFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="firewallGroupsFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="firewallGroupsFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="isDark" unifi-config-changed-with-icon="true" ng-show="firewallGroupsFormCtrl.form.$error.divergent"></unifi-config-changed><div ng-class="{\'noMargin\': isModal}" class="unifiSettingsSection"><div class="container unifiFirewallGroupsContainerBasicHeader"><div class="row"><div ng-if="!isModal" class="col--sm12"><div ng-if="isReadOnly" translate="SETTINGS_FIREWALL_GROUPS_SECTION_VIEW" translate-values="{groupName: firewallGroupsFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div ng-if="!isReadOnly &amp;&amp; firewallGroupsFormCtrl.model.id" translate="SETTINGS_FIREWALL_GROUPS_SECTION_EDIT" translate-values="{groupName: firewallGroupsFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div ng-if="!isReadOnly &amp;&amp; !firewallGroupsFormCtrl.model.id" translate="SETTINGS_FIREWALL_GROUPS_SECTION_CREATE" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div></div><div ng-if="isModal" class="col--sm12"><div ng-if="isReadOnly" translate="SETTINGS_FIREWALL_GROUPS_SECTION_VIEW" translate-values="{groupName: firewallGroupsFormCtrl.model.attributes.name}" class="appControlModal__header noPaddingLeft noPaddingTop"></div><div ng-if="!isReadOnly &amp;&amp; firewallGroupsFormCtrl.model.id" translate="SETTINGS_FIREWALL_GROUPS_SECTION_EDIT" translate-values="{groupName: firewallGroupsFormCtrl.model.attributes.name}" class="appControlModal__header noPaddingLeft noPaddingTop"></div><div ng-if="!isReadOnly &amp;&amp; !firewallGroupsFormCtrl.model.id" translate="SETTINGS_FIREWALL_GROUPS_SECTION_CREATE" class="appControlModal__header noPaddingLeft noPaddingTop"></div></div></div></div><div ng-class="{\'appControlModalScrollableContent\': isModal}" class="container unifiFirewallGroupsContainerBasic"><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_GROUPS_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="text" name="firewallGroupName" ng-model="firewallGroupsFormCtrl.modelCopy.attributes.name" ng-model-master="firewallGroupsFormCtrl.model.attributes.name" ng-pattern="firewallGroupsFormCtrl.patterns.name" required="true" class="input--full"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_GROUPS_LABEL_TYPE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="groupType in [\'address-group\', \'port-group\']" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="firewallGroupType" id="firewallGroupType{{groupType}}" ng-value="groupType" ng-model="firewallGroupsFormCtrl.modelCopy.attributes[\'group_type\']" ng-model-master="firewallGroupsFormCtrl.model.attributes[\'group_type\']" ng-disabled="firewallGroupsFormCtrl.model.id" required="true"><label for="firewallGroupType{{groupType}}">{{ \'FIREWALL_GROUPS_TYPE_\' + groupType | toTranslationKey | translate }}</label></div></div></div></div><div ng-if="firewallGroupsFormCtrl.modelCopy.attributes.group_type === \'address-group\'" class="row firewallGroupsMembers"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_GROUPS_LABEL_ADDRESSES" class="appLabel--primary appLabel--boxAlign"></label></div><div unifi-repeatable-input unifi-repeatable-input-min="firewallGroupsFormCtrl.groupMembersMin" unifi-repeatable-input-values="firewallGroupsFormCtrl.modelCopy.attributes[\'group_members\']" unifi-repeatable-input-is-read-only="firewallGroupsFormCtrl.isReadOnly" class="col--sm9 appFormGroup noMarginBottom"><div ng-repeat="i in repeatableInputCtrl.getOptions() track by $index" class="remoteSubnets appInputGroup appInputGroup--cozy"><input type="text" name="firewallGroupsMembers[]" id="firewallGroupsMembersAddress_{{$index}}" ng-model="repeatableInputCtrl.values[$index]" unifi-validate-ip-range><button type="button" ng-show="!repeatableInputCtrl.isReadOnly" ng-click="repeatableInputCtrl.removeItem($index)" ng-disabled="!repeatableInputCtrl.isRemoveAllowed()" title="{{\'SETTINGS_FIREWALL_GROUPS_BUTTON_REMOVE_MEMBER\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeRemoteSubnet"><span class="button__icon icon ubnt-icon--x"></span></button></div><div ng-show="!repeatableInputCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableInputCtrl.addItem()" ng-disabled="!repeatableInputCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addRemoteSubnet"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_FIREWALL_GROUPS_BUTTON_ADD_MEMBER"></span></button></div></div></div><div ng-if="firewallGroupsFormCtrl.modelCopy.attributes.group_type === \'port-group\'" class="row firewallGroupsMembers"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_GROUPS_LABEL_PORTS" class="appLabel--primary appLabel--boxAlign"></label></div><div unifi-repeatable-input unifi-repeatable-input-min="firewallGroupsFormCtrl.groupMembersMin" unifi-repeatable-input-values="firewallGroupsFormCtrl.modelCopy.attributes[\'group_members\']" unifi-repeatable-input-is-read-only="firewallGroupsFormCtrl.isReadOnly" class="col--sm9 appFormGroup noMarginBottom"><div ng-repeat="i in repeatableInputCtrl.getOptions() track by $index" class="remoteSubnets appInputGroup appInputGroup--cozy"><input type="text" name="firewallGroupsMembers[]" id="firewallGroupsMembersPort_{{$index}}" ng-model="repeatableInputCtrl.values[$index]" unifi-validate-port-range><button type="button" ng-show="!repeatableInputCtrl.isReadOnly" ng-click="repeatableInputCtrl.removeItem($index)" ng-disabled="!repeatableInputCtrl.isRemoveAllowed()" title="{{\'SETTINGS_FIREWALL_GROUPS_BUTTON_REMOVE_MEMBER\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeRemoteSubnet"><span class="button__icon icon ubnt-icon--x"></span></button></div><div ng-show="!repeatableInputCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableInputCtrl.addItem()" ng-disabled="!repeatableInputCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addRemoteSubnet"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_FIREWALL_GROUPS_BUTTON_ADD_MEMBER"></span></button></div></div></div></div></div></fieldset><div ng-class="{      \'appFormFooter--dark\': isDark,       \'appFormFooter--standalone\': !isModal,       \'verticalRhythmTop--breezy\': !isModal,       \'appFormFooter--smash\': isModal     }" class="appFormFooter appFormFooter--flush"><div ng-if="!isModal" class="appFormFooter__left"><button type="submit" ng-if="!isReadOnly" ng-click="firewallGroupsFormCtrl.showValidation = true" busy-toggle="firewallGroupsFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success firewallGroupsSaveButton">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="isDark ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div><div ng-if="isModal" class="appFormFooter__right"><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="isDark ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton appMainButton--cozy cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="submit" ng-if="!isReadOnly" ng-click="firewallGroupsFormCtrl.showValidation = true" busy-toggle="firewallGroupsFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--primary firewallGroupsSaveButton">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--cozy appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],505:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiFirewallGroupsForm",["SimpleFormDirective",function(b){return new b("firewallGroups",a("./firewallGroupsForm.jade")())}])},{"./firewallGroupsForm.jade":504}],506:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j){this.$state=a,this.$translate=b,this.apiResults=f,this.heyToasts=g,this.firewallGroups=h,this.frame=i,this.preferences=j,this.defaultSortBy="name",this.isRemoving={},e.call(this,c,d)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.firewallGroups.repository.collection},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_FIREWALL_GROUPS_DELETE_CONFIRM_TITLE",{groupName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_FIREWALL_GROUPS_DELETE_CONFIRM_MESSAGE",{groupName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("SETTINGS_FIREWALL_GROUPS_DELETE_SUCCESS",{groupName:a.get("name")})),!0}.bind(this))["catch"](function(b){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("SETTINGS_FIREWALL_GROUPS_DELETE_ERROR",{groupName:a.get("name")}),b)),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.$inject=["$state","$translate","$q","CollectionView","apiResults","heyToasts","firewallGroups","frame","preferences"],
angular.module("app-unifi-manage").controller("FirewallGroupsListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],507:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="firewallGroupsTable" collection-view-sort="firewallGroupsListCtrl.view" ng-class="{      \'appTable--dark\': firewallGroupsListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="firewallGroupsName"><span translate="SETTINGS_FIREWALL_GROUPS_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="group_type" class="firewallGroupsType"><span translate="SETTINGS_FIREWALL_GROUPS_TABLE_HEADER_TYPE"></span></th><th class="firewallGroupsCount"><span translate="SETTINGS_FIREWALL_GROUPS_TABLE_HEADER_COUNT"></span></th><th class="firewallGroupsActions"><span translate="SETTINGS_FIREWALL_GROUPS_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in firewallGroupsListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="firewallGroupsName">{{::model.get(\'name\')}}</td><td ng-switch="model.get(\'group_type\')" class="firewallGroupsType">{{ \'FIREWALL_GROUPS_TYPE_\' + model.get(\'group_type\') | toTranslationKey | translate }}</td><td class="firewallGroupsCount">{{::model.get(\'group_members\').length}}</td><td class="firewallGroupsActions appTableCell--actions"><button unifi-if-role-admin ng-click="firewallGroupsListCtrl.edit(model)" ng-disabled="firewallGroupsListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin="false" ng-click="firewallGroupsListCtrl.edit(model)" ng-disabled="firewallGroupsListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW"></span></button><button unifi-if-role-admin ng-click="firewallGroupsListCtrl.remove(model)" ng-disabled="firewallGroupsListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!firewallGroupsListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': firewallGroupsListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_FIREWALL_GROUPS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],508:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiFirewallGroupsList",["ListDirective",function(b){return new b("firewallGroups",a("./firewallGroupsList.jade")(),{onEdit:"&unifiFirewallGroupsListOnEdit"})}])},{"./firewallGroupsList.jade":507}],509:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o){this.$stateParams=a,this.$translate=b,this.apiResults=d,this.heyToasts=k,this.firewallGroups=g,this.firewallRules=h,this.firewallUtils=i,this.frame=j,this.networks=m,this.preferences=n,this.allowMultipleGroups=f.isEnabled("enableFirewallMultipleGroups"),this.ruleset=this.$stateParams.ruleset,this.isAdvancedExpanded=!0,this.isSourceExpanded=!0,this.isDestinationExpanded=!0,this.basicProtocols=["ah","ax.25","dccp","ddp","egp","eigrp","encap","esp","etherip","fc","ggp","gre","hip","hmp","icmp","idpr-cmtp","idrp","igmp","igp","ip","ipcomp","ipencap","ipip","ipv6","ipv6-frag","ipv6-icmp","ipv6-nonxt","ipv6-opts","ipv6-route","isis","iso-tp4","l2tp","manet","mobility-header","mpls-in-ip","ospf","pim","pup","rdp","rohc","rspf","rsvp","sctp","shim6","skip","st","udplite","vmtp","vrrp","wesp","xns-idp","xtp"],this.popularProtocols=["all","tcp","udp","tcp_udp"],this.patterns={name:c.FIREWALL_RULE_NAME,macAddress:o.exact(c.MAC_ADDRESS)},e.call(this,l)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getGroups=function(){return this.firewallGroups.repository.collection},d.prototype.hasSomeGroupsAvailable=function(a){return this.getGroups().models.some(function(b){return b.get("group_type")===a})},d.prototype.getNetworks=function(){return this.networks.repository.collection},d.prototype.save=function(){this.isSubmitting=!0,"all"===this.modelCopy.attributes.protocol&&(this.modelCopy.attributes.protocol_match_excepted=!1);var a=angular.extend({},this.modelCopy.attributes);if(angular.isArray(a.src_firewallgroup_ids)&&"group"===this.attrSourceType||(a.src_firewallgroup_ids=[]),angular.isArray(a.dst_firewallgroup_ids)&&"group"===this.attrDestinationType||(a.dst_firewallgroup_ids=[]),a.src_networkconf_id&&"network"===this.attrSourceType||(a.src_networkconf_id=""),a.dst_networkconf_id&&"network"===this.attrDestinationType||(a.dst_networkconf_id=""),this.allowMultipleGroups){var b=function(a){return!!a};a.src_firewallgroup_ids=a.src_firewallgroup_ids.filter(b),a.dst_firewallgroup_ids=a.dst_firewallgroup_ids.filter(b)}else a.src_firewallgroup_id=a.src_firewallgroup_ids[0]||"",a.dst_firewallgroup_id=a.dst_firewallgroup_ids[0]||"",a.src_firewallgroup_ids=void 0,a.dst_firewallgroup_ids=void 0;return this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("SETTINGS_ROUTING_TAB_FIREWALL_RULES").toLowerCase()})),this.firewallRules.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("SETTINGS_ROUTING_TAB_FIREWALL_RULES").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.modelGet=function(a,b){var c=this.model&&this.model.get(a);return angular.isArray(c)&&(c=angular.copy(c)),void 0!==c&&null!==c?c:b},d.prototype.setDefaultAttrs=function(a){var b=this.firewallRules.repository.collection,c=a?"":"Copy";if(this["model"+c]){var d=this["model"+c].attributes;if(d.ruleset=this.modelGet("ruleset",this.ruleset),d.rule_index=this.modelGet("rule_index",this.firewallUtils.getNextHighIndex(b,d.ruleset)),d.name=this.modelGet("name",""),d.enabled=this.modelGet("enabled",!0),d.action=this.modelGet("action")||"drop",d.protocol=this.modelGet("protocol",this.popularProtocols[0]),d.protocol_match_excepted=this.modelGet("protocol_match_excepted",!1),d.logging=this.modelGet("logging",!1),d.state_new=this.modelGet("state_new",!1),d.state_established=this.modelGet("state_established",!1),d.state_invalid=this.modelGet("state_invalid",!1),d.state_related=this.modelGet("state_related",!1),d.ipsec=this.modelGet("ipsec",""),d.p2p=this.modelGet("p2p",[]),d.src_firewallgroup_ids=this.modelGet("src_firewallgroup_ids",[]),d.src_networkconf_id=this.modelGet("src_networkconf_id",""),d.src_networkconf_type=this.modelGet("src_networkconf_type","ADDRv4"),d.src_mac_address=this.modelGet("src_mac_address",""),d.dst_firewallgroup_ids=this.modelGet("dst_firewallgroup_ids",[]),d.dst_networkconf_id=this.modelGet("dst_networkconf_id",""),d.dst_networkconf_type=this.modelGet("dst_networkconf_type","ADDRv4"),this.allowMultipleGroups){var e=function(a,b){var c=this.getGroups().get(b);return c&&c.get("group_type")===a}.bind(this),f=d.src_firewallgroup_ids.find(e.bind(this,"address-group")),g=d.src_firewallgroup_ids.find(e.bind(this,"port-group")),h=d.dst_firewallgroup_ids.find(e.bind(this,"address-group")),i=d.dst_firewallgroup_ids.find(e.bind(this,"port-group"));d.src_firewallgroup_ids=[f,g],d.dst_firewallgroup_ids=[h,i]}else{var j=this.modelGet("src_firewallgroup_id",""),k=this.modelGet("dst_firewallgroup_id","");d.src_firewallgroup_ids=j?[j]:[],d.dst_firewallgroup_ids=k?[k]:[]}this.attrPriority={},this.attrPriority.high=this.firewallUtils.isHighPriority(d.rule_index)?d.rule_index:this.firewallUtils.getNextHighIndex(b,d.ruleset),this.attrPriority.low=this.firewallUtils.isLowPriority(d.rule_index)?d.rule_index:this.firewallUtils.getNextLowIndex(b,d.ruleset),this.attrProtocolNumber=1*d.protocol?d.protocol:0,this.attrProtocolName=this.basicProtocols.indexOf(d.protocol)!==-1?d.protocol:this.basicProtocols[0],this.attrSourceType=d.src_networkconf_id&&"network"||"group",this.attrDestinationType=d.dst_networkconf_id&&"network"||"group"}},d.prototype.createGroup=function(a,b){this.frame.show("firewallGroupsCreate",{groupType:function(){return b}}).then(function(b){this.allowMultipleGroups?"address-group"===b.get("group_type")?this.modelCopy.attributes[a][0]=b.id:"port-group"===b.get("group_type")&&(this.modelCopy.attributes[a][1]=b.id):this.modelCopy.attributes[a]=[b.id]}.bind(this))},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$stateParams","$translate","REGEX_PATTERNS","apiResults","featureFlag","firewallGroups","firewallRules","firewallUtils","frame","heyToasts","modelDivergence","networks","preferences","regexUtils"],angular.module("app-unifi-manage").controller("FirewallRulesFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],510:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="firewallRulesFormCtrl.form" ng-class="{      \'appForm--dark\': firewallRulesFormCtrl.preferences.model.get(\'isSettingsDark\'),      \'appForm--isLoading\': !isLoaded,      \'is-form-validation-visible\': firewallRulesFormCtrl.showValidation,      \'is-validation-hidden\': !firewallRulesFormCtrl.showValidation    }" ng-submit="firewallRulesFormCtrl.form.$valid &amp;&amp; firewallRulesFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="firewallRulesFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="firewallRulesFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="firewallRulesFormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="firewallRulesFormCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div class="container firewallContainerBasicHeader"><div class="row"><div class="col--sm12"><div ng-if="isReadOnly" translate="SETTINGS_FIREWALL_RULES_SECTION_VIEW" translate-values="{ruleName: firewallRulesFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div ng-if="!isReadOnly &amp;&amp; firewallRulesFormCtrl.model.id" translate="SETTINGS_FIREWALL_RULES_SECTION_EDIT" translate-values="{ruleName: firewallRulesFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div ng-if="!isReadOnly &amp;&amp; !firewallRulesFormCtrl.model.id" translate="SETTINGS_FIREWALL_RULES_SECTION_CREATE" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div></div></div></div><div class="container firewallContainerBasic"><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="text" name="firewallRuleName" ng-model="firewallRulesFormCtrl.modelCopy.attributes.name" ng-model-master="firewallRulesFormCtrl.model.attributes.name" ng-pattern="firewallRulesFormCtrl.patterns.name" required="true" class="input--full"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_ENABLED" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><div data-on="{{ \'COMMON_TOGGLE_ON\' | translate }}" data-off="{{ \'COMMON_TOGGLE_OFF\' | translate }}" ng-class="{\'appToggle--dark\': firewallRulesFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="toggle appToggle"><input type="checkbox" name="firewallRuleEnabled" id="firewallRuleEnabled" ng-model="firewallRulesFormCtrl.modelCopy.attributes.enabled" ng-model-master="firewallRulesFormCtrl.model.attributes.enabled"><label for="firewallRuleEnabled"></label></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_PRIORITY" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="priority in [\'high\', \'low\']" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="firewallRulePriority" id="firewallRulePriority{{priority}}" ng-value="firewallRulesFormCtrl.attrPriority[priority]" ng-model="firewallRulesFormCtrl.modelCopy.attributes.rule_index" ng-model-master="firewallRulesFormCtrl.model.attributes.rule_index" required="true"><label for="firewallRulePriority{{priority}}">{{ \'FIREWALL_RULES_TYPE_PRIORITY_\' + priority | uppercase | translate }}</label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_ACTION" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="action in [\'drop\', \'reject\', \'accept\']" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="firewallRuleAction" id="firewallRuleAction{{action}}" ng-value="action" ng-model="firewallRulesFormCtrl.modelCopy.attributes.action" ng-model-master="firewallRulesFormCtrl.model.attributes.action" required="true"><label for="firewallRuleAction{{action}}">{{ \'FIREWALL_RULES_TYPE_ACTION_\' + action | uppercase | translate }}</label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_PROTOCOL" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="protocol in firewallRulesFormCtrl.popularProtocols" class="appInputGroup appInputGroup--cozy"><input type="radio" name="firewallRuleProtocol" id="firewallRuleProtocol{{protocol}}" ng-value="protocol" ng-model="firewallRulesFormCtrl.modelCopy.attributes.protocol" ng-model-master="firewallRulesFormCtrl.model.attributes.protocol" required="true"><label for="firewallRuleProtocol{{protocol}}">{{ \'FIREWALL_RULES_TYPE_PROTOCOL_\' + protocol | uppercase | translate }}</label></div></div><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="firewallRuleProtocol" ng-value="firewallRulesFormCtrl.attrProtocolName" ng-model="firewallRulesFormCtrl.modelCopy.attributes.protocol" ng-model-master="firewallRulesFormCtrl.model.attributes.protocol" required="true"><label for="firewallRuleProtocolName" translate="SETTINGS_FIREWALL_RULES_LABEL_PROTOCOL_BY_NAME"></label><select name="firewallRuleProtocolName" id="firewallRuleProtocolName" ng-focus="firewallRulesFormCtrl.modelCopy.attributes.protocol=firewallRulesFormCtrl.attrProtocolName" ng-change="firewallRulesFormCtrl.modelCopy.attributes.protocol=firewallRulesFormCtrl.attrProtocolName" ng-model="firewallRulesFormCtrl.attrProtocolName" ng-options="value as \'FIREWALL_RULES_TYPE_PROTOCOL_\' + value | toTranslationKey | translate for value in firewallRulesFormCtrl.basicProtocols track by value"></select></div></div><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="firewallRuleProtocol" ng-value="firewallRulesFormCtrl.attrProtocolNumber" ng-model="firewallRulesFormCtrl.modelCopy.attributes.protocol" ng-model-master="firewallRulesFormCtrl.model.attributes.protocol" required="true"><label for="firewallRuleProtocolNumber" translate="SETTINGS_FIREWALL_RULES_LABEL_PROTOCOL_BY_NUMBER"></label><input type="number" name="firewallRuleProtocolNumber" id="firewallRuleProtocolNumber" min="0" max="255" ng-focus="firewallRulesFormCtrl.modelCopy.attributes.protocol=firewallRulesFormCtrl.attrProtocolNumber" ng-change="firewallRulesFormCtrl.modelCopy.attributes.protocol=firewallRulesFormCtrl.attrProtocolNumber" ng-model="firewallRulesFormCtrl.attrProtocolNumber"></div></div><div ng-show="firewallRulesFormCtrl.modelCopy.attributes.protocol !== \'all\'" class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="firewallRuleProtocolExcepted" id="firewallRuleProtocolExcepted" ng-model="firewallRulesFormCtrl.modelCopy.attributes.protocol_match_excepted" ng-model-master="firewallRulesFormCtrl.model.attributes.protocol_match_excepted"><label for="firewallRuleProtocolExcepted" translate="SETTINGS_FIREWALL_RULES_LABEL_PROTOCOL_MATCH_EXCEPTED"></label></div></div></div></div></div><div class="container firewallContainerAdvancedHeader"><div class="row"><div class="col--sm12"><div ng-click="firewallRulesFormCtrl.isAdvancedExpanded = !firewallRulesFormCtrl.isAdvancedExpanded" ng-class="firewallRulesFormCtrl.isAdvancedExpanded ? [\'appCollapserType\'] : \'appExpanderType\'" translate="SETTINGS_FIREWALL_RULES_LABEL_ADVANCED" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div></div></div></div><div ng-show="firewallRulesFormCtrl.isAdvancedExpanded" class="container firewallContainerAdvanced"><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_LOGGING" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="firewallRuleLogging" id="firewallRuleLogging" ng-model="firewallRulesFormCtrl.modelCopy.attributes.logging" ng-model-master="firewallRulesFormCtrl.model.attributes.logging"><label for="firewallRuleLogging" translate="SETTINGS_FIREWALL_RULES_VALUES_LOGGING"></label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_STATE" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="state in [\'new\', \'established\', \'invalid\', \'related\']" class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="firewallRuleState" id="firewallRuleState{{state}}" ng-model="firewallRulesFormCtrl.modelCopy.attributes[\'state_\' + state]" ng-model-master="firewallRulesFormCtrl.model.attributes[\'state_\' + state]"><label for="firewallRuleState{{state}}">{{ \'SETTINGS_FIREWALL_RULES_VALUES_STATE_\' + state | uppercase | translate }}</label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_P2P" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="firewallRuleP2p" id="firewallRuleP2p" ng-true-value="[\'all\']" ng-false-value="[]" ng-model="firewallRulesFormCtrl.modelCopy.attributes.p2p" ng-model-master="firewallRulesFormCtrl.model.attributes.p2p"><label for="firewallRuleP2p" translate="SETTINGS_FIREWALL_RULES_VALUES_P2P"></label></div><div ng-show="firewallRulesFormCtrl.modelCopy.attributes.p2p.length" translate="SETTINGS_FIREWALL_RULES_HELP_P2P" class="appInputHelp"></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_IPSEC" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="ipsec in [\'\', \'match-ipsec\', \'match-none\']" class="appInputGroup appInputGroup--cozy"><input type="radio" name="firewallRuleIpsec" id="firewallRuleIpsec{{ipsec}}" ng-value="ipsec" ng-model="firewallRulesFormCtrl.modelCopy.attributes.ipsec" ng-model-master="firewallRulesFormCtrl.model.attributes.ipsec"><label for="firewallRuleIpsec{{ipsec}}">{{ \'FIREWALL_RULES_TYPE_IPSEC_\' + ipsec | toTranslationKey | translate }}</label></div></div></div></div></div><div class="container firewallContainerSourceHeader"><div class="row"><div class="col--sm12"><div ng-click="firewallRulesFormCtrl.isSourceExpanded = !firewallRulesFormCtrl.isSourceExpanded" ng-class="firewallRulesFormCtrl.isSourceExpanded ? [\'appCollapserType\'] : \'appExpanderType\'" translate="SETTINGS_FIREWALL_RULES_LABEL_SOURCE" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div></div></div></div><div ng-show="firewallRulesFormCtrl.isSourceExpanded" class="container firewallContainerSource"><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_SOURCE_TYPE" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="sourceType in [\'group\', \'network\']" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="firewallRuleSourceType" id="firewallRuleSourceType{{sourceType}}" ng-value="sourceType" ng-model="firewallRulesFormCtrl.attrSourceType"><label for="firewallRuleSourceType{{sourceType}}">{{ \'SETTINGS_FIREWALL_RULES_LABEL_SOURCE_\' + sourceType | uppercase | translate }}</label></div></div></div></div><div ng-show="firewallRulesFormCtrl.attrSourceType === \'group\'" unifi-feature-flag-disable="enableFirewallMultipleGroups" class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_SOURCE_GROUP" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select ng-show="firewallRulesFormCtrl.getGroups().models.length" name="firewallRuleSourceGroup[]" id="firewallRuleSourceGroup" ng-model="firewallRulesFormCtrl.modelCopy.attributes.src_firewallgroup_ids[0]" ng-model-master="firewallRulesFormCtrl.model.attributes.src_firewallgroup_ids[0]" ng-options="group.id as group.get(\'name\') for group in firewallRulesFormCtrl.getGroups().models"><option unifi-option-placeholder="SETTINGS_FIREWALL_RULES_SELECT_GROUP"></option></select><button type="button" ng-click="firewallRulesFormCtrl.createGroup(\'src_firewallgroup_ids\')" translate="SETTINGS_FIREWALL_RULES_BUTTON_GROUP_ADD" class="appMainButton appMainButton--cozy appMainButton--transparent"></button></div></div></div><div ng-show="firewallRulesFormCtrl.attrSourceType === \'group\'" unifi-feature-flag-enable="enableFirewallMultipleGroups" class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_SOURCE_ADDRESS_GROUP" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="firewallRuleSourceGroup[]" ng-model="firewallRulesFormCtrl.modelCopy.attributes.src_firewallgroup_ids[0]" ng-model-master="firewallRulesFormCtrl.model.attributes.src_firewallgroup_ids[0]" ng-options="group.id as group.get(\'name\') for group in firewallRulesFormCtrl.getGroups().models | filter:{attributes:{group_type: \'address-group\'}}" ng-disabled="!firewallRulesFormCtrl.hasSomeGroupsAvailable(\'address-group\')"><option translate="SETTINGS_FIREWALL_RULES_SELECT_GROUP"></option></select><button type="button" ng-click="firewallRulesFormCtrl.createGroup(\'src_firewallgroup_ids\', \'address-group\')" translate="SETTINGS_FIREWALL_RULES_BUTTON_ADDRESS_GROUP_ADD" class="appMainButton appMainButton--cozy appMainButton--transparent"></button></div></div></div><div ng-show="firewallRulesFormCtrl.attrSourceType === \'group\'" unifi-feature-flag-enable="enableFirewallMultipleGroups" class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_SOURCE_PORT_GROUP" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="firewallRuleSourceGroup[]" ng-model="firewallRulesFormCtrl.modelCopy.attributes.src_firewallgroup_ids[1]" ng-model-master="firewallRulesFormCtrl.model.attributes.src_firewallgroup_ids[1]" ng-options="group.id as group.get(\'name\') for group in firewallRulesFormCtrl.getGroups().models | filter:{attributes:{group_type: \'port-group\'}}" ng-disabled="!firewallRulesFormCtrl.hasSomeGroupsAvailable(\'port-group\')"><option translate="SETTINGS_FIREWALL_RULES_SELECT_GROUP"></option></select><button type="button" ng-click="firewallRulesFormCtrl.createGroup(\'src_firewallgroup_ids\', \'port-group\')" translate="SETTINGS_FIREWALL_RULES_BUTTON_PORT_GROUP_ADD" class="appMainButton appMainButton--cozy appMainButton--transparent"></button></div></div></div><div ng-show="firewallRulesFormCtrl.attrSourceType === \'network\'" class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_SOURCE_NETWORK" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="firewallRuleSourceNetwork" id="firewallRuleSourceNetwork" ng-model="firewallRulesFormCtrl.modelCopy.attributes.src_networkconf_id" ng-model-master="firewallRulesFormCtrl.model.attributes.src_networkconf_id" ng-options="network.id as network.get(\'name\') for network in firewallRulesFormCtrl.getNetworks().models"><option unifi-option-placeholder="SETTINGS_FIREWALL_RULES_SELECT_NETWORK"></option></select><select name="firewallRuleSourceNetworkType" id="firewallRuleSourceNetworkType" ng-model="firewallRulesFormCtrl.modelCopy.attributes.src_networkconf_type" ng-model-master="firewallRulesFormCtrl.model.attributes.src_networkconf_type" ng-options="value as value for value in [\'ADDRv4\', \'NETv4\']"></select></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_SOURCE_MAC" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><input type="text" name="firewallRuleSourceMac" id="firewallRuleSourceMac" ng-model="firewallRulesFormCtrl.modelCopy.attributes.src_mac_address" ng-model-master="firewallRulesFormCtrl.model.attributes.src_mac_address" ng-pattern="firewallRulesFormCtrl.patterns.macAddress"></div></div></div></div></div><div class="container firewallContainerDestinationHeader"><div class="row"><div class="col--sm12"><div ng-click="firewallRulesFormCtrl.isDestinationExpanded = !firewallRulesFormCtrl.isDestinationExpanded" ng-class="firewallRulesFormCtrl.isDestinationExpanded ? [\'appCollapserType\'] : \'appExpanderType\'" translate="SETTINGS_FIREWALL_RULES_LABEL_DESTINATION" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div></div></div></div><div ng-show="firewallRulesFormCtrl.isDestinationExpanded" class="container firewallContainerDestination"><div class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_DESTINATION_TYPE" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="destinationType in [\'group\', \'network\']" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="firewallRuleDestinationType" id="firewallRuleDestinationType{{destinationType}}" ng-value="destinationType" ng-model="firewallRulesFormCtrl.attrDestinationType"><label for="firewallRuleDestinationType{{destinationType}}">{{ \'SETTINGS_FIREWALL_RULES_LABEL_DESTINATION_\' + destinationType | uppercase | translate }}</label></div></div></div></div><div ng-show="firewallRulesFormCtrl.attrDestinationType === \'group\'" unifi-feature-flag-disable="enableFirewallMultipleGroups" class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_DESTINATION_GROUP" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select ng-show="firewallRulesFormCtrl.getGroups().models.length" name="firewallRuleDestinationGroup[]" id="firewallRuleDestinationGroup" ng-model="firewallRulesFormCtrl.modelCopy.attributes.dst_firewallgroup_ids[0]" ng-model-master="firewallRulesFormCtrl.model.attributes.dst_firewallgroup_ids[0]" ng-options="group.id as group.get(\'name\') for group in firewallRulesFormCtrl.getGroups().models"><option unifi-option-placeholder="SETTINGS_FIREWALL_RULES_SELECT_GROUP"></option></select><button type="button" ng-click="firewallRulesFormCtrl.createGroup(\'dst_firewallgroup_ids\')" translate="SETTINGS_FIREWALL_RULES_BUTTON_GROUP_ADD" class="appMainButton appMainButton--cozy appMainButton--transparent"></button></div></div></div><div ng-show="firewallRulesFormCtrl.attrDestinationType === \'group\'" unifi-feature-flag-enable="enableFirewallMultipleGroups" class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_DESTINATION_ADDRESS_GROUP" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="firewallRuleDestinationGroup[]" ng-model="firewallRulesFormCtrl.modelCopy.attributes.dst_firewallgroup_ids[0]" ng-model-master="firewallRulesFormCtrl.model.attributes.dst_firewallgroup_ids[0]" ng-options="group.id as group.get(\'name\') for group in firewallRulesFormCtrl.getGroups().models | filter:{attributes:{group_type: \'address-group\'}}" ng-disabled="!firewallRulesFormCtrl.hasSomeGroupsAvailable(\'address-group\')"><option translate="SETTINGS_FIREWALL_RULES_SELECT_GROUP"></option></select><button type="button" ng-click="firewallRulesFormCtrl.createGroup(\'dst_firewallgroup_ids\', \'address-group\')" translate="SETTINGS_FIREWALL_RULES_BUTTON_ADDRESS_GROUP_ADD" class="appMainButton appMainButton--cozy appMainButton--transparent"></button></div></div></div><div unifi-feature-flag-enable="enableFirewallMultipleGroups" ng-show="firewallRulesFormCtrl.attrDestinationType === \'group\'" class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_DESTINATION_PORT_GROUP" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="firewallRuleDestinationGroup[]" ng-model="firewallRulesFormCtrl.modelCopy.attributes.dst_firewallgroup_ids[1]" ng-model-master="firewallRulesFormCtrl.model.attributes.dst_firewallgroup_ids[1]" ng-options="group.id as group.get(\'name\') for group in firewallRulesFormCtrl.getGroups().models | filter:{attributes:{group_type: \'port-group\'}}" ng-disabled="!firewallRulesFormCtrl.hasSomeGroupsAvailable(\'port-group\')"><option translate="SETTINGS_FIREWALL_RULES_SELECT_GROUP"></option></select><button type="button" ng-click="firewallRulesFormCtrl.createGroup(\'dst_firewallgroup_ids\', \'port-group\')" translate="SETTINGS_FIREWALL_RULES_BUTTON_PORT_GROUP_ADD" class="appMainButton appMainButton--cozy appMainButton--transparent"></button></div></div><div ng-if="false &amp;&amp; firewallRulesFormCtrl.allowMultipleGroups" unifi-repeatable-input unifi-repeatable-input-min="0" unifi-repeatable-input-max="1" unifi-repeatable-input-values="firewallRulesFormCtrl.modelCopy.attributes.dst_firewallgroup_ids" class="col--smOffset3 col--sm8 appFormGroup noMarginBottom"><div ng-repeat="i in repeatableInputCtrl.getOptions() track by $index" class="remoteSubnets appInputGroup appInputGroup--cozy"><select name="firewallRuleDestinationGroups[]" id="firewallRuleDestinationGroups_{{$index}}" ng-model="repeatableInputCtrl.values[$index]" ng-options="group.id as group.get(\'name\') for group in firewallRulesFormCtrl.getGroups().models"><option unifi-option-placeholder="SETTINGS_FIREWALL_RULES_SELECT_GROUP"></option></select><button ng-if="repeatableInputCtrl.max &gt; repeatableInputCtrl.min" type="button" ng-click="repeatableInputCtrl.removeItem($index)" ng-disabled="!repeatableInputCtrl.isRemoveAllowed()" title="{{\'SETTINGS_FIREWALL_GROUPS_BUTTON_REMOVE_MEMBER\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeRemoteSubnet"><span class="button__icon icon ubnt-icon--x"></span></button></div><div class="appInputGroup appInputGroup--cozy"><button ng-if="repeatableInputCtrl.max &gt; repeatableInputCtrl.min" type="button" ng-click="repeatableInputCtrl.addItem()" ng-disabled="!repeatableInputCtrl.isAddAllowed()" ng-class="wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\') ? \'appMainButton--inputDark\' : \'appMainButton--input\'" class="appMainButton appMainButton--cozy"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_FIREWALL_GROUPS_BUTTON_ADD_MEMBER"></span></button><button type="button" ng-click="firewallRulesFormCtrl.createGroup(\'dst_firewallgroup_ids\')" ng-disabled="!repeatableInputCtrl.isAddAllowed()" ng-class="wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\') ? \'appMainButton--inputDark\' : \'appMainButton--input\'" class="appMainButton appMainButton--cozy"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_FIREWALL_RULES_BUTTON_GROUP_ADD"></span></button></div></div></div><div ng-show="firewallRulesFormCtrl.attrDestinationType === \'network\'" class="row"><div class="col--sm3"><label translate="SETTINGS_FIREWALL_RULES_LABEL_DESTINATION_NETWORK" class="appLabel--primary"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="firewallRuleDestinationNetwork" id="firewallRuleDestinationNetwork" ng-model="firewallRulesFormCtrl.modelCopy.attributes.dst_networkconf_id" ng-model-master="firewallRulesFormCtrl.model.attributes.dst_networkconf_id" ng-options="network.id as network.get(\'name\') for network in firewallRulesFormCtrl.getNetworks().models"><option unifi-option-placeholder="SETTINGS_FIREWALL_RULES_SELECT_NETWORK"></option></select><select name="firewallRuleDestinationNetworkType" id="firewallRuleDestinationNetworkType" ng-model="firewallRulesFormCtrl.modelCopy.attributes.dst_networkconf_type" ng-model-master="firewallRulesFormCtrl.model.attributes.dst_networkconf_type" ng-options="value as value for value in [\'ADDRv4\', \'NETv4\']"></select></div></div></div></div></div></fieldset><div ng-class="{\'appFormFooter--dark\': firewallRulesFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button type="submit" ng-if="!isReadOnly" ng-click="firewallRulesFormCtrl.showValidation = true" busy-toggle="firewallRulesFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success firewallRulesSaveButton">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="firewallRulesFormCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),
b.join("")}},{"jade/runtime":232}],511:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiFirewallRulesForm",["SimpleFormDirective",function(b){return new b("firewallRules",a("./firewallRulesForm.jade")())}])},{"./firewallRulesForm.jade":510}],512:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p){this.$state=a,this.$stateParams=b,this.$translate=c,this.apiResults=h,this.heyToasts=i,this.filter=new g,this.firewallGroups=k,this.firewallRules=l,this.firewallUtils=m,this.frame=n,this.networks=o,this.preferences=p,this.allowMultipleGroups=j.isEnabled("enableFirewallMultipleGroups"),this.isRemoving={},this.initRulesets(),this.initSortBy(),this.sortableConfig={animation:100,sort:!0,handle:".unifiFirewallRulesSortableHandle",ghostClass:"unifiFirewallRulesSortablePlaceholder",chosenClass:"unifiFirewallRulesSortableChosen",filter:".unifiFirewallRulesSortableDisabled",onMove:function(a){var b=a.dragged.attributes["data-rule-index"].value,c=a.related.attributes["data-rule-index"].value;return this.firewallUtils.getPriority(b)===this.firewallUtils.getPriority(c)}.bind(this),onEnd:function(){this.saveRulesOrder()}.bind(this)},e.call(this,d,f)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.firewallRules.repository.collection},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.prototype.add=function(){if(!this.onAdd)throw new Error("You must pass an onAdd function to the directive");this.onAdd()},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_FIREWALL_RULES_DELETE_CONFIRM_TITLE",{ruleName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_FIREWALL_RULES_DELETE_CONFIRM_MESSAGE",{ruleName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("SETTINGS_FIREWALL_RULES_DELETE_SUCCESS",{ruleName:a.get("name")})),!0}.bind(this))["catch"](function(b){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("SETTINGS_FIREWALL_RULES_DELETE_ERROR",{ruleName:a.get("name")}),b)),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.prototype.initRulesets=function(){this.rulesets=this.firewallUtils.RULESETS},d.prototype.initSortBy=function(){this.defaultSortBy="rule_index"},d.prototype.initFilters=function(){this.$stateParams.ruleset&&this.filter.updateRuleset(this.$stateParams.ruleset)},d.prototype.updateRuleset=function(a){this.$state.go(".",{ruleset:a})},d.prototype.isRulesetSelected=function(a){return this.$stateParams.ruleset===a},d.prototype.isPredefinedRule=function(a){return this.firewallUtils.isPredefinedRule(a)},d.prototype.isNumeric=function(a){return Number.isInteger(a)},d.prototype.getGroupName=function(a,b){var c,d=a.get(b),e=this.firewallGroups.repository.collection;return d&&(c=e.get(d))&&c.get("name")},d.prototype.hasGroupsId=function(a,b){var c=a.get(b);return c&&c.some(function(a){return!!a})},d.prototype.getGroupsName=function(a,b){var c=a.get(b),d=this.firewallGroups.repository.collection,e=c.map(function(a){var b=d.get(a);return b?b.get("name"):a});return e},d.prototype.getNetworkName=function(a,b){var c,d=a.get(b);return d&&(c=this.networks.repository.collection.get(d))&&c.get("name")},d.prototype.getCurrentRulesetTranslated=function(){var a=this.$stateParams.ruleset;return this.$translate.instant("SETTINGS_FIREWALL_RULESET_LABEL_"+a)},d.prototype.saveRulesOrder=function(){this.view.disableRefresh(),this.firewallUtils.saveRulesOrder(this.view.getModels()).then(function(){this.view.enableRefresh(),this.view.refresh()}.bind(this))["catch"](function(){this.view.enableRefresh(),this.view.refresh(),this.heyToasts.pushError(this.$translate.instant("SETTINGS_FIREWALL_RULES_DRAG_AND_DROP_SAVE_ERROR"))}.bind(this))},d.$inject=["$state","$stateParams","$translate","$q","CollectionView","FirewallRulesetFilter","apiResults","heyToasts","featureFlag","firewallGroups","firewallRules","firewallUtils","frame","networks","preferences"],angular.module("app-unifi-manage").controller("FirewallRulesListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],513:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><ul ng-class="{\'appMainButtonGroup--dark\': firewallRulesListCtrl.preferences.model.get(\'isSettingsDark\')}" class="buttonGroup buttonGroup--shrink appMainButtonGroup verticalRhythmTop--cozy"><li ng-repeat="ruleset in firewallRulesListCtrl.rulesets" ng-click="firewallRulesListCtrl.updateRuleset(ruleset)" ng-class="{\'is-button-selected\': firewallRulesListCtrl.isRulesetSelected(ruleset) }" translate="{{\'SETTINGS_FIREWALL_RULESET_LABEL_\' + ruleset}}" class="button appMainButton appMainButton--cozy"></li></ul><table id="firewallRulesTable" ng-class="{      \'appTable--dark\': firewallRulesListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th class="firewallRulesSortable"></th><th class="firewallRulesIndex"><span translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_INDEX"></span></th><th class="firewallRulesEnabled"><span translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_ENABLED"></span></th><th class="firewallRulesName"><span translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_NAME"></span></th><th class="firewallRulesAction"><span translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_ACTION"></span></th><th class="firewallRulesProtocol"><span translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_PROTOCOL"></span></th><th class="firewallRulesSource"><span translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_SOURCE"></span></th><th class="firewallRulesDestination"><span translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_DESTINATION"></span></th><th class="firewallRulesActions"><span translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody ng-sortable="firewallRulesListCtrl.sortableConfig"><tr ng-repeat="model in firewallRulesListCtrl.view.getModels()" data-id="{{model.id}}" data-rule-index="{{model.get(\'rule_index\')}}" ng-class="{          \'unifiFirewallRulesSortableDisabled\': firewallRulesListCtrl.isPredefinedRule(model)        }"><td class="firewallRulesSortable"><button unifi-if-role-admin ng-disabled="firewallRulesListCtrl.isPredefinedRule(model) || firewallRulesListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed unifiFirewallRulesSortableHandle"><span class="button__icon icon ubnt-icon--arrows-updown-leftright"></span></button></td><td class="firewallRulesIndex">{{model.get(\'rule_index\')}}</td><td ng-bind-html="model.get(\'enabled\') | enabledIcon" class="firewallRulesEnabled"></td><td class="firewallRulesName">{{model.get(\'name\')}}</td><td ng-switch="model.get(\'action\')" class="firewallRulesAction"><span ng-switch-when="drop" translate="FIREWALL_RULES_TYPE_ACTION_DROP"></span><span ng-switch-when="reject" translate="FIREWALL_RULES_TYPE_ACTION_REJECT"></span><span ng-switch-when="accept" translate="FIREWALL_RULES_TYPE_ACTION_ACCEPT"></span></td><td class="firewallRulesProtocol"><span ng-if="model.get(\'protocol_match_excepted\')" translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_PROTOCOL_EXCEPT"></span><span ng-if="!firewallRulesListCtrl.isNumeric(model.get(\'protocol\'))" translate="{{\'FIREWALL_RULES_TYPE_PROTOCOL_\' + model.get(\'protocol\') | toTranslationKey}}"></span><span ng-if="firewallRulesListCtrl.isNumeric(model.get(\'protocol\'))">{{model.get(\'protocol\')}}</span></td><td class="firewallRulesSource"><ul class="list list--cozy"><li ng-if="!firewallRulesListCtrl.allowMultipleGroups &amp;&amp; model.get(\'src_firewallgroup_id\')" translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_SOURCE_GROUP" translate-values="{value: firewallRulesListCtrl.getGroupName(model, \'src_firewallgroup_id\')}"></li><li ng-if="firewallRulesListCtrl.allowMultipleGroups &amp;&amp; firewallRulesListCtrl.hasGroupsId(model, \'src_firewallgroup_ids\')" class="allowWrap">{{\'SETTINGS_FIREWALL_RULES_TABLE_HEADER_SOURCE_GROUPS\' | translate}}<div ng-repeat="groupName in firewallRulesListCtrl.getGroupsName(model, \'src_firewallgroup_ids\') track by $index" ng-if="groupName" class="inlineBlock noWrap horizontalRhythmLeft--smash">{{groupName}}</div></li><li ng-if="model.get(\'src_networkconf_id\')" translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_SOURCE_NETWORK" translate-values="{value: firewallRulesListCtrl.getNetworkName(model, \'src_networkconf_id\')}"></li><li ng-if="model.get(\'src_networkconf_id\')" translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_SOURCE_NETWORK_TYPE" translate-values="{value: model.get(\'src_networkconf_type\')}"></li><li ng-if="model.get(\'src_mac_address\')" translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_SOURCE_MAC" translate-values="{value: model.get(\'src_mac_address\')}"></li></ul></td><td class="firewallRulesDestination"><ul class="list list--cozy"><li ng-if="!firewallRulesListCtrl.allowMultipleGroups &amp;&amp; model.get(\'dst_firewallgroup_id\')" translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_DESTINATION_GROUP" translate-values="{value: firewallRulesListCtrl.getGroupName(model, \'dst_firewallgroup_id\')}"></li><li ng-if="firewallRulesListCtrl.allowMultipleGroups &amp;&amp; firewallRulesListCtrl.hasGroupsId(model, \'dst_firewallgroup_ids\')" class="allowWrap">{{\'SETTINGS_FIREWALL_RULES_TABLE_HEADER_DESTINATION_GROUPS\' | translate}}<div ng-repeat="groupName in firewallRulesListCtrl.getGroupsName(model, \'dst_firewallgroup_ids\') track by $index" ng-if="groupName" class="inlineBlock noWrap horizontalRhythmLeft--smash">{{groupName}}</div></li><li ng-if="model.get(\'dst_networkconf_id\')" translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_DESTINATION_NETWORK" translate-values="{value: firewallRulesListCtrl.getNetworkName(model, \'dst_networkconf_id\')}"></li><li ng-if="model.get(\'dst_networkconf_id\')" translate="SETTINGS_FIREWALL_RULES_TABLE_HEADER_DESTINATION_NETWORK_TYPE" translate-values="{value: model.get(\'dst_networkconf_type\')}"></li></ul></td><td class="firewallRulesActions appTableCell--actions"><button unifi-if-role-admin ng-click="firewallRulesListCtrl.edit(model)" ng-disabled="firewallRulesListCtrl.isPredefinedRule(model) || firewallRulesListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin="false" ng-click="firewallRulesListCtrl.edit(model)" ng-disabled="firewallRulesListCtrl.isPredefinedRule(model) || firewallRulesListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW"></span></button><button unifi-if-role-admin ng-click="firewallRulesListCtrl.remove(model)" ng-disabled="firewallRulesListCtrl.isPredefinedRule(model) || firewallRulesListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!firewallRulesListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': firewallRulesListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_FIREWALL_RULES_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div><div unifi-if-role-admin class="unifiSettingsFooter"><button ng-click="firewallRulesListCtrl.add()" ng-class="firewallRulesListCtrl.preferences.model.get(\'isSettingsDark\') ? \'appMainButton--inputDark\' : \'appMainButton--input\'" class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_FIREWALL_RULES_BUTTON_ADD" translate-values="{ruleset: firewallRulesListCtrl.getCurrentRulesetTranslated()}"></span></button></div></div>'),b.join("")}},{"jade/runtime":232}],514:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiFirewallRulesList",["ListDirective",function(b){return new b("firewallRules",a("./firewallRulesList.jade")(),{onEdit:"&unifiFirewallRulesListOnEdit",onAdd:"&unifiFirewallRulesListOnAdd"})}])},{"./firewallRulesList.jade":513}],515:[function(a,b,c){"use strict";function d(){}d.prototype.updateModel=function(a){this.validator.removeFormModel(this.group),a&&this.validator.addFormModel(this.group,a),this.model=a},d.prototype.onInputChange=function(a,b,c){c?(this.model.trigger("change:"+c,this.model,b),this.model.trigger("change")):this.model.trigger("change")},d.prototype.destroy=function(){this.validator&&this.validator.removeFormModel(this.group)},d.$inject=[],angular.module("app-unifi-manage").controller("FormGroupWarningsController",d)},{}],516:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiFormGroupWarnings",["$parse",function(a){return{controller:"FormGroupWarningsController",controllerAs:"formGroupWarningsCtrl",restrict:"A",link:function(b,c,d,e){e.group=a(d.unifiFormGroupWarningsGroup)(b);var f=b.$watch(d.unifiFormGroupWarningsValidator,function(a){a&&(e.validator=a,b.$watch(d.unifiFormGroupWarningsModel,function(a){e.updateModel(a)}),f())});b.$on("$destroy",function(){e.destroy()})}}}])},{}],517:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiFormGroupWarningsInput",["$parse",function(a){return{restrict:"A",require:["^unifiFormGroupWarnings","^ngModel"],link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.unifiFormGroupWarningsInputAttr)(b),i=a(d.unifiFormGroupWarningsInputClass)(b);g.$viewChangeListeners.push(function(){f.onInputChange(g.$name,g.$viewValue,h)}),i&&b.$watchCollection(function(){return f.validator?f.validator.getInvalidAttrs():[]},function(a){a.indexOf(g.$name)!==-1?c.addClass(i):c.removeClass(i)})}}}])},{}],518:[function(a,b,c){"use strict";function d(a){this.gatewayUtils=a,this.portIds=this.gatewayUtils.getMappedPorts(this.model,!0),e.call(this)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){this.portModels={},this.collection&&angular.forEach(this.collection,function(a){this.portModels[a.get("name")]=a}.bind(this))},d.prototype.getPortLabel=function(a){return this.gatewayUtils.getPortLabel(a,this.model)},d.$inject=["gatewayUtils"],angular.module("app-unifi-manage").controller("GatewayDiagramController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],519:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-class=\"{    'unifiDevicePortDiagram--gateway3': gatewayDiagramCtrl.model.get('model') === 'UGW3',    'unifiDevicePortDiagram--gateway4': gatewayDiagramCtrl.model.get('model') === 'UGW4',    'unifiDevicePortDiagram--gateway8': gatewayDiagramCtrl.model.get('model') === 'UGW8'  }\" class=\"unifiDevicePortDiagram\"><div ng-repeat=\"portId in gatewayDiagramCtrl.portIds\" class=\"unifiDevicePortDiagramPort\"><div ng-class=\"{        'is-disconnected': gatewayDiagramCtrl.portModels[portId].get('enable') &amp;&amp; !gatewayDiagramCtrl.portModels[portId].get('up'),        'is-1000': gatewayDiagramCtrl.portModels[portId].get('up') &amp;&amp; gatewayDiagramCtrl.portModels[portId].get('speed') === 1000,        'is-100': gatewayDiagramCtrl.portModels[portId].get('up') &amp;&amp; (gatewayDiagramCtrl.portModels[portId].get('speed') === 100 || gatewayDiagramCtrl.portModels[portId].get('speed') === 10)      }\" class=\"unifiPortDiagramContainer\"><div class=\"unifiPortDiagramPort\"><img src=\"images/diagrams/port-spacer.png\" class=\"unifiPortDiagramPort__state\"></div><div class=\"unifiPortDiagramPortLabel\">{{gatewayDiagramCtrl.getPortLabel(portId)}}</div></div></div></div>"),b.join("")}},{"jade/runtime":232}],520:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayDiagram",[function(){return{scope:{model:"=unifiGatewayDiagramModel"},controller:"GatewayDiagramController",controllerAs:"gatewayDiagramCtrl",bindToController:!0,replace:!0,template:a("./gatewayDiagram.jade")(),link:function(a,b,c,d){a.$watch(function(){return d.model?d.model.get("port_table"):void 0},function(a){d.updateCollection(a)}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./gatewayDiagram.jade":519}],521:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiPortDiagramKeys"><div class="unifiPortDiagramKeysGroup"><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--disabled"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_DISABLED" class="unifiPortDiagramKeysItem__text"></div></div></div><div class="unifiPortDiagramKeysGroup"><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--disconnected"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_DISCONNECTED" class="unifiPortDiagramKeysItem__text"></div></div></div><div class="unifiPortDiagramKeysGroup"><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--1000"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_1000" class="unifiPortDiagramKeysItem__text noTextTransform"></div></div></div><div class="unifiPortDiagramKeysGroup"><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--100"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_100" class="unifiPortDiagramKeysItem__text noTextTransform"></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],522:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayDiagramKeys",[function(){return{replace:!0,template:a("./gatewayDiagramKeys.jade")()}}])},{"./gatewayDiagramKeys.jade":521}],523:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o){this.devices=f,this.deviceStateUtils=g,this.deviceUplinkUtils=h,this.deviceUtils=i,this.dynamicDns=j,this.gatewayUtils=l,this.portForwards=m,this.DEVICE_STATES=o,this.isSaveQueued=!0,this.modelChangeEvent="change change:port_table[*]",this.accordions={details:{overview:!0},configure:{general:!0}},e.call(this,a,b,c,n,d,k)}var e=a("../../controllers/BasePropertiesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.resolve=function(){return this.$q.all([this.dynamicDns.repository.register().fetch(),this.portForwards.repository.register().fetch()])},d.prototype.destroy=function(){this.dynamicDns.repository.unregister(),this.portForwards.repository.unregister()},d.prototype.reset=function(){this.deviceState=void 0,this.deviceStatus=void 0,this.lanIp=void 0,this.uplinkAttrs={},this.isPortUp={},this.showConfigureTab=!1,this.showAdoptTab=!1},d.prototype.onModelChange=function(){this.persistAdoptTab=this.showAdoptTab&&this.deviceStateUtils.getRawDeviceState(this.model)===this.DEVICE_STATES.ADOPTING,this.reset(),this.model&&(this.deviceState=this.deviceStateUtils.getDeviceState(this.model),this.deviceStatus=this.deviceStateUtils.getDeviceStatus(this.model),this.lanIp=this.gatewayUtils.getIpByPortId("lan",this.model),this.uplinkAttrs.wan1=this.deviceUplinkUtils.getUplinkAttrs(this.model,"wan1"),this.uplinkAttrs.wan2=this.deviceUplinkUtils.getUplinkAttrs(this.model,"wan2"),this.model.get("port_table")&&this.model.get("port_table").each(function(a){this.isPortUp[a.get("name")+(a.get("name").replace(/[^0-9]+/,"")?"":"1")]=a.get("up")}.bind(this)),this.showConfigureTab=this.model.get("adopted"),this.showAdoptTab=this.persistAdoptTab||this.deviceUtils.isGatewayAdoptable(this.model,this.devices.repository.collection)&&(this.deviceState===this.DEVICE_STATES.ADOPTION_FAILED||this.deviceState===this.DEVICE_STATES.MANAGED_BY_OTHER))},d.prototype.getPortTypeCount=function(a){return this.gatewayUtils.getPortTypeCount(a,this.model)},d.$inject=["$q","$timeout","$translate","account","devices","deviceStateUtils","deviceUplinkUtils","deviceUtils","dynamicDns","frame","gatewayUtils","portForwards","propertyPanel","DEVICE_STATES"],angular.module("app-unifi-manage").controller("GatewayPropertiesController",d)},{"../../controllers/BasePropertiesController":1001}],524:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-collapsed\': gatewayPropertiesCtrl.isCollapsed()}" ng-if="gatewayPropertiesCtrl.model" class="unifiPanelItem gatewayProperties"><unifi-loading-status unifi-loading-status-is-loading="gatewayPropertiesCtrl.isLoading" unifi-loading-status-failed="gatewayPropertiesCtrl.failedToLoad" unifi-loading-status-retry="gatewayPropertiesCtrl.init()"></unifi-loading-status><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__collapseToggle"><div ng-click="gatewayPropertiesCtrl.toggleCollapsed()" class="appActionIcon"><span ng-class="{            \'unifi-icon--default-collapse\': !gatewayPropertiesCtrl.isCollapsed(),            \'unifi-icon--default-expand\': gatewayPropertiesCtrl.isCollapsed()          }" class="button__icon icon"></span></div></div><div class="unifiPanelItemHeader__avatar"><div unifi-device-icon="::gatewayPropertiesCtrl.model"></div></div><div class="unifiPanelItemHeader__title"><span unifi-device-status="::gatewayPropertiesCtrl.model" unifi-device-status-is-cozy="true" unifi-device-status-is-truncated="true" unifi-device-status-with-icons="true" unifi-device-status-label="gatewayPropertiesCtrl.model.getDisplayName()"></span><div class="unifiPanelItemHeader__status"><span unifi-device-status-badge="::gatewayPropertiesCtrl.model"></span></div></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div unifi-device-button-adopt="::gatewayPropertiesCtrl.model" unifi-device-button-adopt-collection="::gatewayPropertiesCtrl.devices.repository.collection" unifi-device-button-adopt-is-reverse="true" class="appActionIcon appActionIcon--primary appActionIcon--reverse appActionIcon--round"></div><div unifi-device-button-restart="::gatewayPropertiesCtrl.model" class="appActionIcon"></div><div unifi-device-button-locate="::gatewayPropertiesCtrl.model" unifi-device-button-locate-with-map="true" class="appActionIcon"></div><div unifi-device-button-upgrade="::gatewayPropertiesCtrl.model" class="appActionIcon"></div><div ng-click="gatewayPropertiesCtrl.toggleUndocked()" title="{{gatewayPropertiesCtrl.isUndocked() ? \'COMMON_PROPERTY_PANEL_ITEM_DOCK\' : \'COMMON_PROPERTY_PANEL_ITEM_UNDOCK\' | translate}}" class="appActionIcon visible--mdUp"><span ng-class="{              \'ubnt-icon--header-maximize\': !gatewayPropertiesCtrl.isUndocked(),              \'ubnt-icon--header-minimize\': gatewayPropertiesCtrl.isUndocked()            }" class="button__icon icon"></span></div><div ng-click="gatewayPropertiesCtrl.removePanel()" title="{{\'COMMON_PROPERTY_PANEL_ITEM_REMOVE\' | translate}}" class="appActionIcon removePanelItem"><span class="button__icon icon unifi-icon--default-close"></span></div></div></div></div><div class="unifiPanelItemBody"><div class="unifiPanelItemBodySection"><div unifi-device-properties-license-warning="::gatewayPropertiesCtrl.model" class="unifiDevicePropertiesLicenseWarning"></div></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><unifi-gateway-diagram unifi-gateway-diagram-model="::gatewayPropertiesCtrl.model"></unifi-gateway-diagram><unifi-gateway-diagram-keys></unifi-gateway-diagram-keys></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><ul class="appTabs appTabs--compressed appTabs--alignLeft"><li ng-click="gatewayPropertiesCtrl.setActiveTab(\'details\')" ng-class="{            \'is-tab-selected\': gatewayPropertiesCtrl.getActiveTab() === \'details\',            \'is-tab-loading\': gatewayPropertiesCtrl.loadingTab === \'details\'          }" translate="DEVICE_PROPERTIES_TAB_DETAILS" class="tabs__item details"></li><li ng-click="gatewayPropertiesCtrl.setActiveTab(\'networks\')" ng-class="{            \'is-tab-selected\': gatewayPropertiesCtrl.getActiveTab() === \'networks\',            \'is-tab-loading\': gatewayPropertiesCtrl.loadingTab === \'networks\'          }" translate="DEVICE_PROPERTIES_TAB_NETWORKS" class="tabs__item networks"></li><li ng-if="gatewayPropertiesCtrl.showConfigureTab" ng-click="gatewayPropertiesCtrl.setActiveTab(\'configure\')" ng-class="{            \'is-tab-selected\': gatewayPropertiesCtrl.getActiveTab() === \'configure\',            \'is-tab-loading\': gatewayPropertiesCtrl.loadingTab === \'configure\'          }" translate="DEVICE_PROPERTIES_TAB_CONFIGURATION" class="tabs__item configure"></li><li unifi-if-role-admin unifi-if-role-admin-and="gatewayPropertiesCtrl.showAdoptTab" ng-click="gatewayPropertiesCtrl.setActiveTab(\'adopt\')" ng-class="{            \'is-tab-selected\': gatewayPropertiesCtrl.getActiveTab() === \'adopt\',            \'is-tab-loading\': gatewayPropertiesCtrl.loadingTab === \'adopt\'          }" translate="DEVICE_PROPERTIES_TAB_ADOPT" class="tabs__item adopt"></li></ul></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div class="unifiPanelItemContent"><div ng-if="gatewayPropertiesCtrl.isTabAvailable(\'details\') &amp;&amp; gatewayPropertiesCtrl.getActiveTab() === \'details\'" unifi-gateway-properties-details class="gatewayPropertiesDetails"></div><div ng-if="gatewayPropertiesCtrl.isTabAvailable(\'networks\') &amp;&amp; gatewayPropertiesCtrl.getActiveTab() === \'networks\'" class="gatewayPropertiesNetwork"><unifi-gateway-properties-network-list unifi-gateway-properties-network-list-local-state="true" unifi-gateway-properties-network-list-local-state-key="::gatewayPropertiesCtrl.model.get(\'mac\') + \'|networks\'" unifi-gateway-properties-network-list-collection="gatewayPropertiesCtrl.model.get(\'network_table\')"></unifi-gateway-properties-network-list></div><div ng-if="gatewayPropertiesCtrl.showConfigureTab &amp;&amp; gatewayPropertiesCtrl.isTabAvailable(\'configure\')" ng-show="gatewayPropertiesCtrl.getActiveTab() === \'configure\'" unifi-gateway-properties-configure class="gatewayPropertiesConfigure"></div><div unifi-if-role-admin unifi-if-role-admin-and="gatewayPropertiesCtrl.showAdoptTab &amp;&amp; gatewayPropertiesCtrl.isTabAvailable(\'adopt\')" ng-show="gatewayPropertiesCtrl.getActiveTab() === \'adopt\'" unifi-device-properties-adopt="::gatewayPropertiesCtrl.model" class="gatewayPropertiesAdopt"></div></div></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static unifiPanelItemBodySection--pending"><unifi-pending-changes-list unifi-pending-changes-list-model="::gatewayPropertiesCtrl.model" unifi-pending-changes-list-save="applyPendingChanges(model)"></unifi-pending-changes-list></div></div></div>'),b.join("")}},{"jade/runtime":232}],525:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayProperties",["updateModelDirectiveMixin","devicePropertiesPendingActionsDirectiveMixin",function(b,c){return{scope:{model:"=unifiGatewayProperties"},controller:"GatewayPropertiesController",controllerAs:"gatewayPropertiesCtrl",template:a("./gatewayProperties.jade")(),link:function(a,d,e,f){a.$on("$destroy",function(){f.destroy(),f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./gatewayProperties.jade":524}],526:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="gatewayPropertiesCtrl.accordions.configure.general" class="unifiPanelItemContent__section general"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::gatewayPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="gatewayPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers="!gatewayPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-general="::gatewayPropertiesCtrl.model" unifi-device-properties-configure-general-is-open="gatewayPropertiesCtrl.accordions.configure.general" unifi-device-properties-configure-general-is-read-only="!gatewayPropertiesCtrl.isAdmin()" unifi-device-properties-configure-general-is-save-queued="false" unifi-device-properties-configure-general-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="gatewayPropertiesConfigureGeneral"></div></div></accordion-group><accordion-group is-open="gatewayPropertiesCtrl.accordions.configure.wan1" class="unifiPanelItemContent__section wan1"><accordion-heading>{{gatewayPropertiesCtrl.getPortTypeCount(\'wan\') > 1 ? \'DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN_1\' : \'DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::gatewayPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN_1" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="gatewayPropertiesCtrl.accordions.configure.wan1" unifi-pause-children-watchers="!gatewayPropertiesCtrl.accordions.configure.wan1" unifi-pause-children-watchers-and-create-scope><div unifi-gateway-properties-configure-wan="::gatewayPropertiesCtrl.model" unifi-gateway-properties-configure-wan-is-open="gatewayPropertiesCtrl.accordions.configure.wan1" unifi-gateway-properties-configure-wan-is-read-only="!gatewayPropertiesCtrl.isAdmin()" unifi-gateway-properties-configure-wan-is-save-queued="gatewayPropertiesCtrl.isSaveQueued" unifi-gateway-properties-configure-wan-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN_1" class="gatewayPropertiesConfigureWan"></div></div></accordion-group><accordion-group ng-if="gatewayPropertiesCtrl.getPortTypeCount(\'wan\') &gt; 1" is-open="gatewayPropertiesCtrl.accordions.configure.wan2" class="unifiPanelItemContent__section wan2"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN_2\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::gatewayPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN_2" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="gatewayPropertiesCtrl.accordions.configure.wan2" unifi-pause-children-watchers="!gatewayPropertiesCtrl.accordions.configure.wan2" unifi-pause-children-watchers-and-create-scope><div unifi-gateway-properties-configure-wan="::gatewayPropertiesCtrl.model" unifi-gateway-properties-configure-wan-number="2" unifi-gateway-properties-configure-wan-is-open="gatewayPropertiesCtrl.accordions.configure.wan2" unifi-gateway-properties-configure-wan-is-read-only="!gatewayPropertiesCtrl.isAdmin()" unifi-gateway-properties-configure-wan-is-save-queued="gatewayPropertiesCtrl.isSaveQueued" unifi-gateway-properties-configure-wan-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN_2" class="gatewayPropertiesConfigureWan"></div></div></accordion-group><accordion-group is-open="gatewayPropertiesCtrl.accordions.configure.portForward" class="unifiPanelItemContent__section portForward"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_PORT_FORWARD\' | translate}}</accordion-heading><div unifi-initialize-when="gatewayPropertiesCtrl.accordions.configure.portForward" unifi-pause-children-watchers="!gatewayPropertiesCtrl.accordions.configure.portForward" unifi-pause-children-watchers-and-create-scope><div unifi-gateway-properties-port-forward-list="::gatewayPropertiesCtrl.model" unifi-gateway-properties-port-forward-list-local-state="true" unifi-gateway-properties-port-forward-list-local-state-key="::gatewayPropertiesCtrl.model.get(\'mac\') + \'|portfwd\'" unifi-gateway-properties-port-forward-list-collection="gatewayPropertiesCtrl.portForwards.repository.collection" unifi-gateway-properties-port-forward-list-is-open="gatewayPropertiesCtrl.accordions.configure.portForward" class="unifiGatewayPropertiesPortForwardList"></div></div></accordion-group><accordion-group is-open="gatewayPropertiesCtrl.accordions.configure.dynamicDns" class="unifiPanelItemContent__section dynamicDns"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_DYNAMIC_DNS\' | translate}}</accordion-heading><div unifi-initialize-when="gatewayPropertiesCtrl.accordions.configure.dynamicDns" unifi-pause-children-watchers="!gatewayPropertiesCtrl.accordions.configure.dynamicDns" unifi-pause-children-watchers-and-create-scope><div unifi-gateway-properties-dynamic-dns-list="::gatewayPropertiesCtrl.model" unifi-gateway-properties-dynamic-dns-list-local-state="true" unifi-gateway-properties-dynamic-dns-list-local-state-key="::gatewayPropertiesCtrl.model.get(\'mac\') + \'|dyndns\'" unifi-gateway-properties-dynamic-dns-list-collection="gatewayPropertiesCtrl.dynamicDns.repository.collection" unifi-gateway-properties-dynamic-dns-list-is-open="gatewayPropertiesCtrl.accordions.configure.dynamicDns" class="unifiGatewayPropertiesDynamicDnsList"></div></div></accordion-group><accordion-group ng-if="gatewayPropertiesCtrl.isAdmin()" is-open="gatewayPropertiesCtrl.accordions.configure.manage" class="unifiPanelItemContent__section manage"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_MANAGE_DEVICE\' | translate}}</accordion-heading><div unifi-initialize-when="gatewayPropertiesCtrl.accordions.configure.manage" unifi-pause-children-watchers="!gatewayPropertiesCtrl.accordions.configure.manage" unifi-pause-children-watchers-and-create-scope><div class="unifiPanelItemContentSection__subsection upgrade"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_CUSTOM_UPGRADE\' | translate}}</div></div></div><div unifi-device-properties-configure-custom-upgrade="::gatewayPropertiesCtrl.model" unifi-device-properties-configure-custom-upgrade-is-open="gatewayPropertiesCtrl.accordions.configure.manage" class="gatewayPropertiesConfigureCustomUpgrade"></div></div><div class="unifiPanelItemContentSection__subsection forget"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_FORGET\' | translate}}</div></div></div><div unifi-device-properties-configure-forget="::gatewayPropertiesCtrl.model" unifi-device-properties-configure-forget-is-open="gatewayPropertiesCtrl.accordions.configure.manage" class="gatewayPropertiesConfigureForget"></div></div></div></accordion-group></accordion>'),
b.join("")}},{"jade/runtime":232}],527:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayPropertiesConfigure",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiGatewayProperties",template:a("./gatewayPropertiesConfigure.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"configure")}}}])},{"./gatewayPropertiesConfigure.jade":526}],528:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.deviceUtils=b,this.apiResults=g,this.propertyName="config_network_wan",this.frame=c,this.speedTest=i,this.isPopulatingSmartQueue=!1,this.connectionTypeOptions=[{value:"disabled",translationKey:"DEVICE_PROPERTIES_VALUES_NETWORK_DISABLED",isAvailable:!1},{value:"dhcp",translationKey:"DEVICE_PROPERTIES_VALUES_NETWORK_USING_DHCP",isAvailable:!0},{value:"static",translationKey:"DEVICE_PROPERTIES_VALUES_NETWORK_STATIC_IP",isAvailable:!0},{value:"pppoe",translationKey:"DEVICE_PROPERTIES_VALUES_NETWORK_PPPOE",isAvailable:!0}],this.loadBalanceOptions=[{value:"failover-only",translationKey:"DEVICE_PROPERTIES_VALUES_LOAD_BALANCE_FAILOVER"},{value:"weighted",translationKey:"DEVICE_PROPERTIES_VALUES_LOAD_BALANCE_WEIGHTED"}],this.patterns={vlan:h.VLAN},e.call(this,a,d,f,h)}var e=a("../../controllers/BaseConfigureNetworkController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.setWanNumber=function(a){this.propertyName+=a,this.connectionTypeOptions.forEach(function(b){"disabled"===b.value&&(b.isAvailable=a>1)}),this.defaultConnectionType=a>1?"disabled":"dhcp",this.isLoadBalanceAvailable=a>1},d.prototype.getAttrsToSave=function(){var a=e.prototype.getAttrsToSave.call(this);return this.isLoadBalanceAvailable||delete a[this.propertyName].load_balance_type,a[this.propertyName].smartq_enabled||(delete a[this.propertyName].smartq_up_rate,delete a[this.propertyName].smartq_down_rate),a},d.prototype.setDefaultAttrs=function(a){e.prototype.setDefaultAttrs.call(this,a);var b=a?"":"Copy",c=a||!this.isSaveQueued?void 0:{delegateTo:"pending"};this["model"+b]&&(this["model"+b].attributes[this.propertyName].load_balance_type=(this.model?(this.model.get(this.propertyName,c)||{}).load_balance_type:void 0)||this.loadBalanceOptions[0].value)},d.prototype.save=function(){this.isSubmitting=!0;var a=this.getAttrsToSave(),b=this.isSaveQueued?"pending":void 0;return this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:b,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN")})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_WAN")}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.populateSmartQueue=function(a){this.isPopulatingSmartQueue=!0;var b=.8;this.speedTest.resolve().then(function(a){return this.speedTest.isTestCompleted(a)?a:(this.frame.show("speedTest"),this.speedTest.startTest())}.bind(this)).then(function(c){this.speedTest.isTestCompleted(c)&&(a.smartq_up_rate=Math.ceil(c.xput_upload*b*1e3),a.smartq_down_rate=Math.ceil(c.xput_download*b*1e3))}.bind(this))["catch"](function(){this.heyToasts.pushError(this.$translate.instant("DEVICE_PROPERTIES_SMART_QUEUES_PREPOPULATE_FAILED"))}.bind(this))["finally"](function(){this.isPopulatingSmartQueue=!1}.bind(this))},d.$inject=["$translate","deviceUtils","frame","heyToasts","modelDivergence","apiResults","REGEX_PATTERNS","speedTest"],angular.module("app-unifi-manage").controller("GatewayPropertiesConfigureWanController",d)},{"../../controllers/BaseConfigureNetworkController":997}],529:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="gatewayPropertiesConfigureWanCtrl.form" ng-class="{    \'is-form-validation-visible\': gatewayPropertiesConfigureWanCtrl.showValidation,    \'is-validation-hidden\': !gatewayPropertiesConfigureWanCtrl.showValidation  }" ng-submit="gatewayPropertiesConfigureWanCtrl.form.$valid &amp;&amp; gatewayPropertiesConfigureWanCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="gatewayPropertiesConfigureWanCtrl.resolveDivergence()" unifi-config-changed-on-ignore="gatewayPropertiesConfigureWanCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; gatewayPropertiesConfigureWanCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_CONNECTION_TYPE" class="appLabel--primary"></label><select name="connectionType" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].type" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].type" ng-options="connection.value as connection.translationKey | translate for connection in gatewayPropertiesConfigureWanCtrl.connectionTypeOptions | filter:{isAvailable: true}" class="select--full"></select></div></fieldset><fieldset ng-if="gatewayPropertiesConfigureWanCtrl.showTypeForm === \'dhcp\'" ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="flexRow noMarginBottom"><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PREFERRED_DNS" class="appLabel--primary"></label><input type="text" name="dhcpPreferredDns" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns1" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns1" ng-model-master-cleanup="true" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.ipAddress" class="input--full"></div></div><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_ALTERNATE_DNS" class="appLabel--primary"></label><input type="text" name="dhcpAlternateDns" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns2" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns2" ng-model-master-cleanup="true" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.ipAddress" class="input--full"></div></div></div></fieldset><fieldset ng-if="gatewayPropertiesConfigureWanCtrl.showTypeForm === \'static\'" ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="flexRow noMarginBottom"><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_IP_ADDRESS" class="appLabel--primary"></label><input type="text" name="staticIpAddress" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].ip" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].ip" ng-model-master-cleanup="true" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.ipAddress" ng-required="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].type === \'static\'" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_SUBNET_MASK" class="appLabel--primary"></label><input type="text" name="staticNetmask" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].netmask" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].netmask" ng-model-master-cleanup="true" ng-required="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].type === \'static\'" unifi-validate-netmask="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].ip" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_ROUTER" class="appLabel--primary"></label><input type="text" name="staticGateway" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].gateway" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].gateway" ng-model-master-cleanup="true" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.ipAddress" class="input--full"></div></div><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PREFERRED_DNS" class="appLabel--primary"></label><input type="text" name="staticPreferredDns" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns1" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns1" ng-model-master-cleanup="true" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.ipAddress" class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_ALTERNATE_DNS" class="appLabel--primary"></label><input type="text" name="staticAlternateDns" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns2" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns2" ng-model-master-cleanup="true" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.ipAddress" class="input--full"></div></div></div></fieldset><fieldset ng-if="gatewayPropertiesConfigureWanCtrl.showTypeForm === \'pppoe\'" ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="flexRow noMarginBottom"><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_USERNAME" class="appLabel--primary"></label><input type="text" name="pppoeUsername" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].username" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].username" ng-model-master-cleanup="true" class="input--full"></div></div><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PASSWORD" class="appLabel--primary"></label><input type="password" name="pppoePassword" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].x_password" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].x_password" ng-model-master-cleanup="true" unifi-password-reveal class="input--full"></div></div></div><div class="flexRow noMarginBottom"><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PREFERRED_DNS" class="appLabel--primary"></label><input type="text" name="pppoePreferredDns" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns1" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns1" ng-model-master-cleanup="true" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.ipAddress" class="input--full"></div></div><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_ALTERNATE_DNS" class="appLabel--primary"></label><input type="text" name="pppoeAlternateDns" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns2" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].dns2" ng-model-master-cleanup="true" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.ipAddress" class="input--full"></div></div></div></fieldset><fieldset ng-show="gatewayPropertiesConfigureWanCtrl.showTypeForm !== \'disabled\'" ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="flexRow noMarginBottom"><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_USE_VLAN" class="appLabel--primary"></label><div class="appInputGroup noMarginBottom"><input type="checkbox" name="useVlanId" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].vlan_enabled" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].vlan_enabled" ng-model-master-cleanup="true"><input type="text" name="vlanId" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].vlan" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].vlan" ng-model-master-cleanup="true" ng-disabled="!gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].vlan_enabled" ng-required="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].vlan_enabled" ng-pattern="gatewayPropertiesConfigureWanCtrl.patterns.vlan" class="input--smallNumber"></div><div ng-show="gatewayPropertiesConfigureWanCtrl.form.vlanId.$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: 2, max: 4095}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div></fieldset><fieldset ng-if="gatewayPropertiesConfigureWanCtrl.isLoadBalanceAvailable" ng-show="gatewayPropertiesConfigureWanCtrl.showTypeForm !== \'disabled\'" ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="flexRow noMarginBottom"><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_LOAD_BALANCING" class="appLabel--primary"></label><select name="loadBalancing" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].load_balance_type" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].load_balance_type" ng-options="loadBalance.value as loadBalance.translationKey | translate for loadBalance in gatewayPropertiesConfigureWanCtrl.loadBalanceOptions" class="select--full"></select></div></div><div ng-show="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].load_balance_type === \'weighted\'" class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_LOAD_BALANCE_WEIGHT" class="appLabel--primary"></label><div class="appInputGroup noMarginBottom"><input type="number" name="loadBalanceWeight" min="1" max="99" placeholder="50" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].load_balance_weight" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].load_balance_weight" unifi-string-to-integer-input class="input--smallNumber"><label>%</label></div><div ng-show="gatewayPropertiesConfigureWanCtrl.form.loadBalanceWeight.$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: 1, max: 99}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div></fieldset><fieldset ng-show="gatewayPropertiesConfigureWanCtrl.showTypeForm !== \'disabled\'" ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed noMarginBottom"><label translate="DEVICE_PROPERTIES_LABEL_SMART_QUEUES" class="appLabel--primary"></label></div><div class="flexRow noMarginBottom"><div class="flexCol--8"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="useSmartq_{{gatewayPropertiesConfigureWanCtrl.propertyName}}" name="useSmartq" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled"><label for="useSmartq_{{gatewayPropertiesConfigureWanCtrl.propertyName}}" translate="DEVICE_PROPERTIES_LABEL_SMART_QUEUES_ENABLE"></label></div></div><div class="flexCol--4 alignRight"><div class="appTooltipContainer appTooltipContainer--hoverable"><button type="button" ng-show="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled" ng-click="gatewayPropertiesConfigureWanCtrl.populateSmartQueue(gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName])" busy-toggle="gatewayPropertiesConfigureWanCtrl.isPopulatingSmartQueue" busy-toggle-spinner-classes="[\'appSpinner appSpinner--centered\']" class="appMainButton appMainButton--condensed appMainButton--tertiary appMainButton--transparent">{{ \'DEVICE_PROPERTIES_SMART_QUEUES_PREPOPULATE_ACTION\' | translate }}</button><div class="appTooltip appTooltip--leftCentered">{{ \'DEVICE_PROPERTIES_SMART_QUEUES_PREPOPULATE_TOOLTIP\' | translate }}</div></div></div></div></fieldset><fieldset ng-show="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled" class="appFieldset appFieldset--quiet"><div ng-show="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled" class="flexRow noMarginBottom"><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_SMART_QUEUES_UP_RATE" class="appLabel--primary"></label><div class="appIconInput appIconInput--right input--full"><div translate="DEVICE_PROPERTIES_LABEL_SMART_QUEUES_RATE_UNIT" class="appIconInput__icon"></div><input type="number" name="useSmartqUpRate" min="{{gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled ? 0 : \'\'}}" max="{{gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled ? 1000000 : \'\'}}" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_up_rate" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_up_rate" ng-disabled="gatewayPropertiesConfigureWanCtrl.isPopulatingSmartQueue" ng-required="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled" class="appIconInput__input input--full"><div ng-show="gatewayPropertiesConfigureWanCtrl.form.useSmartqUpRate.$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: 1, max: 1000000}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div class="flexCol--6"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_SMART_QUEUES_DOWN_RATE" class="appLabel--primary"></label><div class="appIconInput appIconInput--right input--full"><div translate="DEVICE_PROPERTIES_LABEL_SMART_QUEUES_RATE_UNIT" class="appIconInput__icon"></div><input type="number" name="useSmartqDownRate" min="{{gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled ? 0 : \'\'}}" max="{{gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled ? 1000000 : \'\'}}" ng-model="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_down_rate" ng-model-master="gatewayPropertiesConfigureWanCtrl.model.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_down_rate" ng-disabled="gatewayPropertiesConfigureWanCtrl.isPopulatingSmartQueue" ng-required="gatewayPropertiesConfigureWanCtrl.modelCopy.attributes[gatewayPropertiesConfigureWanCtrl.propertyName].smartq_enabled" class="appIconInput__input input--full"><div ng-show="gatewayPropertiesConfigureWanCtrl.form.useSmartqDownRate.$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: 1, max: 1000000}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="gatewayPropertiesConfigureWanCtrl.showValidation = true" busy-toggle="gatewayPropertiesConfigureWanCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{gatewayPropertiesConfigureWanCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="gatewayPropertiesConfigureWanCtrl.reset()" ng-disabled="gatewayPropertiesConfigureWanCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],530:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayPropertiesConfigureWan",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin",function(b,c){return{scope:{model:"=unifiGatewayPropertiesConfigureWan",wanNumber:"@?unifiGatewayPropertiesConfigureWanNumber",isOpen:"=unifiGatewayPropertiesConfigureWanIsOpen",isReadOnly:"=unifiGatewayPropertiesConfigureWanIsReadOnly",isSaveQueued:"=unifiGatewayPropertiesConfigureWanIsSaveQueued",group:"@unifiGatewayPropertiesConfigureWanGroup"},controller:"GatewayPropertiesConfigureWanController",controllerAs:"gatewayPropertiesConfigureWanCtrl",template:a("./gatewayPropertiesConfigureWan.jade")(),link:function(a,d,e,f){a.directiveId=a.$id,a.wanNumber&&f.setWanNumber(a.wanNumber),a.$watch(function(){return f.modelCopy?f.modelCopy.attributes[f.propertyName].type:void 0},f.onTypeChange),a.$on("$destroy",function(){f.removeEventHandlers()}),b.init(a,d,e,f,!0),c.init(a,d,e,f)}}}])},{"./gatewayPropertiesConfigureWan.jade":529}],531:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<accordion close-others=\"true\" class=\"appAccordion\"><accordion-group is-open=\"gatewayPropertiesCtrl.accordions.details.overview\" class=\"unifiPanelItemContent__section\"><accordion-heading>{{'DEVICE_PROPERTIES_SECTION_DETAILS_OVERVIEW' | translate}}</accordion-heading><div ng-if=\"gatewayPropertiesCtrl.accordions.details.overview\"><div class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow macAddress\"><dt>{{'DEVICE_PROPERTIES_LABEL_MAC_ADDRESS' | translate}}</dt><dd>{{gatewayPropertiesCtrl.model.get('mac')}}</dd></div><div class=\"appDescriptionListRow modelName\"><dt>{{'DEVICE_PROPERTIES_LABEL_MODEL' | translate}}</dt><dd>{{gatewayPropertiesCtrl.deviceStateUtils.getDeviceModel(gatewayPropertiesCtrl.model)}}</dd></div><div class=\"appDescriptionListRow version\"><dt>{{'DEVICE_PROPERTIES_LABEL_VERSION' | translate}}</dt><dd><span ng-if=\"gatewayPropertiesCtrl.model.get('version')\">{{gatewayPropertiesCtrl.model.get('version')}}</span><span ng-if=\"!gatewayPropertiesCtrl.model.get('version')\" translate=\"DEVICE_PROPERTIES_VALUES_VERSION_NOT_AVAILABLE\"></span></dd></div></div><div ng-if=\"gatewayPropertiesCtrl.deviceStatus === 'success'\" class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow ipAddress\"><dt>{{'DEVICE_PROPERTIES_LABEL_LAN_IP_ADDRESS' | translate}}</dt><dd>{{gatewayPropertiesCtrl.lanIp}}</dd></div><div class=\"appDescriptionListRow uptime\"><dt>{{'DEVICE_PROPERTIES_LABEL_UPTIME' | translate}}</dt><dd>{{gatewayPropertiesCtrl.model.get('uptime') | seconds}}</dd></div></div></div></accordion-group><accordion-group ng-repeat=\"port in ['wan1', 'wan2']\" ng-if=\"gatewayPropertiesCtrl.isPortUp[port] &amp;&amp; gatewayPropertiesCtrl.uplinkAttrs[port]\" is-open=\"gatewayPropertiesCtrl.accordions.details[port]\" class=\"unifiPanelItemContent__section\"><accordion-heading>{{'DEVICE_PROPERTIES_SECTION_DETAILS_WAN' | translate}} {{gatewayPropertiesCtrl.isPortUp.hasOwnProperty('wan2') ? port.replace('wan', '') : ''}}</accordion-heading><div ng-if=\"gatewayPropertiesCtrl.accordions.details[port]\"><div class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow uplinkIpAddress\"><dt>{{'DEVICE_PROPERTIES_LABEL_IP_ADDRESS' | translate}}</dt><dd>{{gatewayPropertiesCtrl.uplinkAttrs[port].ip}}</dd></div><div class=\"appDescriptionListRow uplinkSpeed\"><dt>{{'DEVICE_PROPERTIES_LABEL_SPEED' | translate}}</dt><dd>{{gatewayPropertiesCtrl.uplinkAttrs[port].speed}}</dd></div><div class=\"appDescriptionListRow uplinkDuplex\"><dt>{{'DEVICE_PROPERTIES_LABEL_DUPLEX' | translate}}</dt><dd>{{gatewayPropertiesCtrl.uplinkAttrs[port].full_duplex ? 'DEVICE_PROPERTIES_VALUES_DUPLEX_FULL' : 'DEVICE_PROPERTIES_VALUES_DUPLEX_HALF' | translate}}</dd></div></div><div class=\"appDescriptionList appDescriptionList--inline appDescriptionList--divider\"><div class=\"appDescriptionListRow uplinkDownPktsBytes\"><dt>{{'DEVICE_PROPERTIES_LABEL_DOWN_PKTS_BYTES' | translate}}</dt><dd>{{gatewayPropertiesCtrl.uplinkAttrs[port].rx_packets && gatewayPropertiesCtrl.uplinkAttrs[port].rx_bytes ? (gatewayPropertiesCtrl.uplinkAttrs[port].rx_packets | numberToString) + ' / ' + (gatewayPropertiesCtrl.uplinkAttrs[port].rx_bytes | bytes) : '0.00 / 0.00'}}</dd></div><div class=\"appDescriptionListRow uplinkUpPktsBytes\"><dt>{{'DEVICE_PROPERTIES_LABEL_UP_PKTS_BYTES' | translate}}</dt><dd>{{gatewayPropertiesCtrl.uplinkAttrs[port].tx_packets && gatewayPropertiesCtrl.uplinkAttrs[port].tx_bytes ? (gatewayPropertiesCtrl.uplinkAttrs[port].tx_packets | numberToString) + ' / ' + (gatewayPropertiesCtrl.uplinkAttrs[port].tx_bytes | bytes) : '0.00 / 0.00'}}</dd></div><div class=\"appDescriptionListRow uplinkDownActivity\"><dt>{{'DEVICE_PROPERTIES_LABEL_DOWN_ACTIVITY' | translate}}</dt><dd>{{gatewayPropertiesCtrl.uplinkAttrs[port]['rx_bytes-r'] | bps}}</dd></div><div class=\"appDescriptionListRow uplinkUpActivity\"><dt>{{'DEVICE_PROPERTIES_LABEL_UP_ACTIVITY' | translate}}</dt><dd>{{gatewayPropertiesCtrl.uplinkAttrs[port]['tx_bytes-r'] | bps}}</dd></div></div></div></accordion-group></accordion>"),b.join("")}},{"jade/runtime":232}],532:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayPropertiesDetails",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiGatewayProperties",template:a("./gatewayPropertiesDetails.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"details")}}}])},{"./gatewayPropertiesDetails.jade":531}],533:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.$translate=a,this.heyToasts=b,this.apiResults=d,this.dynamicDns=f,this.services=[{id:"afraid",name:"afraid"},{id:"dnspark",name:"dnspark"},{id:"dslreports",name:"dslreports"},{id:"dyndns",name:"dyndns"},{id:"easydns",name:"easydns"},{id:"namecheap",name:"namecheap"},{id:"sitelutions",name:"sitelutions"},{id:"zoneedit",name:"zoneedit"}],e.call(this,c)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes);return this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_DYNAMIC_DNS").toLowerCase()})),this.dynamicDns.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_DYNAMIC_DNS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";this["model"+b]&&(this["model"+b].attributes.service=(this.model?this.model.get("service"):void 0)||this.services[0].id)},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","modelDivergence","apiResults","dynamicDns"],angular.module("app-unifi-manage").controller("GatewayPropertiesDynamicDnsFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],534:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="gatewayPropertiesDynamicDnsFormCtrl.form" ng-class="{    \'is-form-validation-visible\': gatewayPropertiesDynamicDnsFormCtrl.showValidation,    \'is-validation-hidden\': !gatewayPropertiesDynamicDnsFormCtrl.showValidation  }" ng-submit="gatewayPropertiesDynamicDnsFormCtrl.form.$valid &amp;&amp; gatewayPropertiesDynamicDnsFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="gatewayPropertiesDynamicDnsFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="gatewayPropertiesDynamicDnsFormCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; gatewayPropertiesDynamicDnsFormCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_SERVICE" class="appLabel--primary"></label><select name="dynamicDnsService" ng-model="gatewayPropertiesDynamicDnsFormCtrl.modelCopy.attributes.service" ng-model-master="gatewayPropertiesDynamicDnsFormCtrl.model.attributes.service" ng-options="service.id as service.name for service in gatewayPropertiesDynamicDnsFormCtrl.services" required autofocus class="select--full"></select></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_HOSTNAME" class="appLabel--primary"></label><input type="text" name="dynamicDnsHostname" ng-model="gatewayPropertiesDynamicDnsFormCtrl.modelCopy.attributes.host_name" ng-model-master="gatewayPropertiesDynamicDnsFormCtrl.model.attributes.host_name" required class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_USERNAME" class="appLabel--primary"></label><input type="text" name="dynamicDnsUsername" ng-model="gatewayPropertiesDynamicDnsFormCtrl.modelCopy.attributes.login" ng-model-master="gatewayPropertiesDynamicDnsFormCtrl.model.attributes.login" required class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PASSWORD" class="appLabel--primary"></label><input type="password" name="dynamicDnsPassword" ng-model="gatewayPropertiesDynamicDnsFormCtrl.modelCopy.attributes.x_password" ng-model-master="gatewayPropertiesDynamicDnsFormCtrl.model.attributes.x_password" required unifi-password-reveal class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_SERVER" class="appLabel--primary"></label><input type="text" name="dynamicDnsServer" ng-model="gatewayPropertiesDynamicDnsFormCtrl.modelCopy.attributes.server" ng-model-master="gatewayPropertiesDynamicDnsFormCtrl.model.attributes.server" class="input--full"></div></fieldset><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="gatewayPropertiesDynamicDnsFormCtrl.showValidation = true" busy-toggle="gatewayPropertiesDynamicDnsFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveDynamicDns">{{\'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--transparent appMainButton--condensed cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary appMainButton--condensed cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),
b.join("")}},{"jade/runtime":232}],535:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayPropertiesDynamicDnsForm",["SimpleFormDirective",function(b){return new b("gatewayPropertiesDynamicDns",a("./gatewayPropertiesDynamicDnsForm.jade")(),{isOpen:"=unifiGatewayPropertiesDynamicDnsFormIsOpen"})}])},{"./gatewayPropertiesDynamicDnsForm.jade":534}],536:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=b,this.heyToasts=c,this.frame=d,this.isAdmin=g.isAdmin.bind(g),this.rowsPerPage=h.model.getRowsPerPropertyPanel(),this.defaultSortBy="service",this.isRemoving={},e.call(this,a,f,h)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.dynamicDns},d.prototype.cancelEdit=function(){this.showEditForm=!1,this.editModel=null},d.prototype.add=function(){this.showEditForm=!0;var a=this.getCollection().model;this.editModel=new a},d.prototype.edit=function(a){this.showEditForm=!0,this.editModel=a},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_DELETE_CONFIRM_TITLE",{serviceName:a.get("service")})}.bind(this),message:function(){return this.$translate.instant("DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_DELETE_CONFIRM_MESSAGE",{serviceName:a.get("service")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_DELETE_SUCCESS",{serviceName:a.get("service")})),!0}.bind(this))["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_DELETE_ERROR",{serviceName:a.get("service")})),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","$translate","heyToasts","frame","CollectionView","account","preferences"],angular.module("app-unifi-manage").controller("GatewayPropertiesDynamicDnsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],537:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-switch="gatewayPropertiesDynamicDnsListCtrl.showEditForm" class="appScrollable flexFlag__body fullWidth"><div ng-switch-when="true" unifi-gateway-properties-dynamic-dns-form="gatewayPropertiesDynamicDnsListCtrl.editModel" unifi-gateway-properties-dynamic-dns-form-on-save="gatewayPropertiesDynamicDnsListCtrl.cancelEdit()" unifi-gateway-properties-dynamic-dns-form-on-cancel="gatewayPropertiesDynamicDnsListCtrl.cancelEdit()" unifi-gateway-properties-dynamic-dns-form-is-open="gatewayPropertiesDynamicDnsListCtrl.isOpen" unifi-gateway-properties-dynamic-dns-form-is-read-only="!gatewayPropertiesDynamicDnsListCtrl.isAdmin()"></div><div ng-switch-default><div unifi-if-role-admin class="unifiPanelItemContentSection__action"><button ng-click="gatewayPropertiesDynamicDnsListCtrl.add()" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_CREATE"></span></button></div><table collection-view-sort="gatewayPropertiesDynamicDnsListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="service" class="dynamicDnsService"><span translate="DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_TABLE_HEADER_SERVICE"></span></th><th collection-view-sort-by="host_name" class="dynamicDnsHostname"><span translate="DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_TABLE_HEADER_HOSTNAME"></span></th><th collection-view-sort-by="server" class="dynamicDnsServer"><span translate="DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_TABLE_HEADER_SERVER"></span></th><th class="dynamicDnsActions"><span translate="DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tfoot ng-if="gatewayPropertiesDynamicDnsListCtrl.view.getModels().length"><tr><td colspan="4"><unifi-micro-pagination unifi-micro-pagination-current-page="gatewayPropertiesDynamicDnsListCtrl.currentPage" unifi-micro-pagination-rows-per-page="gatewayPropertiesDynamicDnsListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="gatewayPropertiesDynamicDnsListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in gatewayPropertiesDynamicDnsListCtrl.view.getModels(),            startFrom (gatewayPropertiesDynamicDnsListCtrl.currentPage - 1) * gatewayPropertiesDynamicDnsListCtrl.rowsPerPage,            limitTo gatewayPropertiesDynamicDnsListCtrl.rowsPerPage" data-id="{{::model.id}}"><td class="dynamicDnsService">{{::model.get(\'service\')}}</td><td class="dynamicDnsHostname">{{::model.get(\'host_name\')}}</td><td class="dynamicDnsServer">{{::model.get(\'server\')}}</td><td class="dynamicDnsActions appTableCell--actions"><button unifi-if-role-admin ng-click="gatewayPropertiesDynamicDnsListCtrl.edit(model)" ng-disabled="gatewayPropertiesDynamicDnsListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_EDIT\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span></button><button unifi-if-role-admin="false" ng-click="gatewayPropertiesDynamicDnsListCtrl.edit(model)" ng-disabled="gatewayPropertiesDynamicDnsListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_VIEW\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span></button><button unifi-if-role-admin ng-click="gatewayPropertiesDynamicDnsListCtrl.remove(model)" ng-disabled="gatewayPropertiesDynamicDnsListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_DELETE\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span></button></td></tr></tbody></table><div ng-if="!gatewayPropertiesDynamicDnsListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_GATEWAY_DYNAMIC_DNS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],538:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayPropertiesDynamicDnsList",["gatewayPropertiesDynamicDnsListDirectiveMixin","PaginatedListDirective",function(b,c){var d=new c("gatewayPropertiesDynamicDns",a("./gatewayPropertiesDynamicDnsList.jade")(),{model:"=unifiGatewayPropertiesDynamicDnsList",dynamicDns:"=unifiGatewayPropertiesDynamicDnsListCollection",isOpen:"=unifiGatewayPropertiesDynamicDnsListIsOpen"});return d.addMixin(b),d}])},{"./gatewayPropertiesDynamicDnsList.jade":537}],539:[function(a,b,c){"use strict";function d(a,b,c){this.rowsPerPage=c.model.getRowsPerPropertyPanel(),this.defaultSortBy="ip",e.call(this,a,b,c)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.networks},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","CollectionView","preferences"],angular.module("app-unifi-manage").controller("GatewayPropertiesNetworkListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],540:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiPanelItemContent__section appScrollable flexFlag__body fullWidth"><table collection-view-sort="gatewayPropertiesNetworkListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="name" class="networkName"><span translate="DEVICE_PROPERTIES_GATEWAY_NETWORKS_TABLE_HEADER_NETWORK"></span></th><th collection-view-sort-by="ip" class="networkIp"><span translate="DEVICE_PROPERTIES_GATEWAY_NETWORKS_TABLE_HEADER_IP"></span></th><th collection-view-sort-by="tx_bytes" class="networkTx"><span translate="DEVICE_PROPERTIES_GATEWAY_NETWORKS_TABLE_HEADER_TX"></span></th><th collection-view-sort-by="rx_bytes" class="networkRx"><span translate="DEVICE_PROPERTIES_GATEWAY_NETWORKS_TABLE_HEADER_RX"></span></th><th collection-view-sort-by="num_sta" class="networkNumClients"><span translate="DEVICE_PROPERTIES_GATEWAY_NETWORKS_TABLE_HEADER_NUM_CLIENTS"></span></th></tr></thead><tfoot ng-if="gatewayPropertiesNetworkListCtrl.view.getModels().length"><tr><td colspan="5"><unifi-micro-pagination unifi-micro-pagination-current-page="gatewayPropertiesNetworkListCtrl.currentPage" unifi-micro-pagination-rows-per-page="gatewayPropertiesNetworkListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="gatewayPropertiesNetworkListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in gatewayPropertiesNetworkListCtrl.view.getModels(),          startFrom (gatewayPropertiesNetworkListCtrl.currentPage - 1) * gatewayPropertiesNetworkListCtrl.rowsPerPage,          limitTo gatewayPropertiesNetworkListCtrl.rowsPerPage" data-id="{{::model.id}}" class="clickable"><td class="networkName">{{::model.get(\'name\')}}</td><td class="networkIp">{{::model.get(\'ip\')}}</td><td class="networkTx">{{::model.get(\'tx_bytes\') | bytes}}</td><td class="networkRx">{{::model.get(\'rx_bytes\') | bytes}}</td><td class="networkNumClients">{{::model.get(\'num_sta\')}}</td></tr></tbody></table><div ng-if="!gatewayPropertiesNetworkListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_GATEWAY_NETWORKS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],541:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayPropertiesNetworkList",["PaginatedListDirective",function(b){return new b("gatewayPropertiesNetwork",a("./gatewayPropertiesNetworkList.jade")(),{networks:"=unifiGatewayPropertiesNetworkListCollection"})}])},{"./gatewayPropertiesNetworkList.jade":540}],542:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.heyToasts=b,this.portForwards=f,this.portForwardStats=g,this.apiResults=d,this.patterns={ip:h.IP_ADDRESS,name:h.NAME},e.call(this,c)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes,{src:"limited"===this.srcType?this.limitedSrc:this.srcType});return this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_PORT_FORWARD").toLowerCase()})),this.portForwards.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_PORT_FORWARD").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"Master":"";this["srcType"+b]=this.model&&this.model.get("src")&&"any"!==this.model.get("src")?"limited":"any",this["limitedSrc"+b]=this.model&&"any"!==this.model.get("src")?this.model.get("src"):""},d.prototype.onDestinationPortChange=function(){this.hasMultipleDestinationPorts=!(!this.modelCopy||!this.modelCopy.attributes.dst_port)&&this.isMultiplePortString(this.modelCopy.attributes.dst_port),(this.hasMultipleDestinationPorts||this.modelCopy&&!this.modelCopy.attributes.fwd_port)&&(this.modelCopy.attributes.fwd_port=this.modelCopy.attributes.dst_port)},d.prototype.onForwardPortChange=function(){this.modelCopy&&this.modelCopy.attributes.fwd_port&&this.modelCopy.attributes.dst_port!==this.modelCopy.attributes.fwd_port&&this.isMultiplePortString(this.modelCopy.attributes.fwd_port)&&(this.modelCopy.attributes.dst_port=this.modelCopy.attributes.fwd_port)},d.prototype.isMultiplePortString=function(a){return!/^[0-9]*$/.test(a)},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","modelDivergence","apiResults","portForwards","portForwardStats","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("GatewayPropertiesPortForwardFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],543:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="gatewayPropertiesPortForwardFormCtrl.form" ng-class="{    \'is-form-validation-visible\': gatewayPropertiesPortForwardFormCtrl.showValidation,    \'is-validation-hidden\': !gatewayPropertiesPortForwardFormCtrl.showValidation  }" ng-submit="gatewayPropertiesPortForwardFormCtrl.form.$valid &amp;&amp; gatewayPropertiesPortForwardFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="gatewayPropertiesPortForwardFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="gatewayPropertiesPortForwardFormCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; gatewayPropertiesPortForwardFormCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_NAME" class="appLabel--primary"></label><input type="text" name="portForwardName" ng-model="gatewayPropertiesPortForwardFormCtrl.modelCopy.attributes.name" ng-model-master="gatewayPropertiesPortForwardFormCtrl.model.attributes.name" ng-pattern="gatewayPropertiesPortForwardFormCtrl.patterns.name" required autofocus class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_FROM" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="portForwardSrc" id="portForwardSrcAny{{::directiveId}}" value="any" ng-model="gatewayPropertiesPortForwardFormCtrl.srcType" ng-model-master="gatewayPropertiesPortForwardFormCtrl.srcTypeMaster"><label for="portForwardSrcAny{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ANYWHERE"></label><input type="radio" name="portForwardSrc" id="portForwardSrcLimited{{::directiveId}}" value="limited" ng-model="gatewayPropertiesPortForwardFormCtrl.srcType" ng-model-master="gatewayPropertiesPortForwardFormCtrl.srcTypeMaster"><label for="portForwardSrcLimited{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_LIMITED"></label><input type="text" name="portForwardSrcLimited" ng-model="gatewayPropertiesPortForwardFormCtrl.limitedSrc" ng-model-master="gatewayPropertiesPortForwardFormCtrl.limitedSrcMaster" ng-disabled="gatewayPropertiesPortForwardFormCtrl.srcType !== \'limited\'" ng-required="gatewayPropertiesPortForwardFormCtrl.srcType === \'limited\'" unifi-validate-ip-range></div><div ng-if="gatewayPropertiesPortForwardFormCtrl.form.portForwardSrcLimited.$invalid" translate="VALIDATION_HINT_IP_RANGE" class="appInputFeedback appInputFeedback--danger"></div></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PORT" class="appLabel--primary"></label><div class="flexRow"><div class="flexCol--11"><input type="text" name="portForwardDstPort" ng-model="gatewayPropertiesPortForwardFormCtrl.modelCopy.attributes.dst_port" ng-model-master="gatewayPropertiesPortForwardFormCtrl.model.attributes.dst_port" ng-model-options="{ updateOn: \'default blur\', debounce: { \'default\': 500, \'blur\': 0 }}" required unifi-validate-port-range class="input--full"><div ng-if="gatewayPropertiesPortForwardFormCtrl.form.portForwardDstPort.$invalid" translate="VALIDATION_HINT_PORT_RANGE" class="appInputFeedback appInputFeedback--danger"></div></div><div class="flexCol--1"><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div class="appTooltip appTooltip--brief appTooltip--leftSide">1000,1002-1004,...</div></div></div></div></div><div class="appFormGroup appFormGroup--condensed"><div class="flexRow"><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_FORWARD_IP" class="appLabel--primary"></label><input type="text" name="portForwardFwdIp" ng-model="gatewayPropertiesPortForwardFormCtrl.modelCopy.attributes.fwd" ng-model-master="gatewayPropertiesPortForwardFormCtrl.model.attributes.fwd" ng-pattern="gatewayPropertiesPortForwardFormCtrl.patterns.ip" required class="input--full"></div><div class="flexCol--6"><label translate="DEVICE_PROPERTIES_LABEL_FORWARD_PORT" class="appLabel--primary"></label><input type="text" name="portForwardFwdPort" ng-model="gatewayPropertiesPortForwardFormCtrl.modelCopy.attributes.fwd_port" ng-model-master="gatewayPropertiesPortForwardFormCtrl.model.attributes.fwd_port" ng-model-options="{ updateOn: \'blur\', debounce: { \'blur\': 0 }}" ng-disabled="gatewayPropertiesPortForwardFormCtrl.hasMultipleDestinationPorts" required unifi-validate-port-range class="input--full"><div ng-if="gatewayPropertiesPortForwardFormCtrl.form.portForwardFwdPort.$invalid" translate="VALIDATION_HINT_PORT_RANGE" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PROTOCOL" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="portForwardProtocol" id="portForwardProtocolBoth{{::directiveId}}" value="tcp_udp" ng-model="gatewayPropertiesPortForwardFormCtrl.modelCopy.attributes.proto" ng-model-master="gatewayPropertiesPortForwardFormCtrl.model.attributes.proto"><label for="portForwardProtocolBoth{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_BOTH"></label><input type="radio" name="portForwardProtocol" id="portForwardProtocolTcp{{::directiveId}}" value="tcp" ng-model="gatewayPropertiesPortForwardFormCtrl.modelCopy.attributes.proto" ng-model-master="gatewayPropertiesPortForwardFormCtrl.model.attributes.proto"><label for="portForwardProtocolTcp{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_TCP"></label><input type="radio" name="portForwardProtocol" id="portForwardProtocolUdp{{::directiveId}}" value="udp" ng-model="gatewayPropertiesPortForwardFormCtrl.modelCopy.attributes.proto" ng-model-master="gatewayPropertiesPortForwardFormCtrl.model.attributes.proto"><label for="portForwardProtocolUdp{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_UDP"></label></div></div></fieldset><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="gatewayPropertiesPortForwardFormCtrl.showValidation = true" busy-toggle="gatewayPropertiesPortForwardFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed savePortForward">{{\'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--transparent appMainButton--condensed cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary appMainButton--condensed cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],544:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayPropertiesPortForwardForm",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiGatewayPropertiesPortForwardForm",onSave:"&unifiGatewayPropertiesPortForwardFormOnSave",onCancel:"&unifiGatewayPropertiesPortForwardFormOnCancel",isReadOnly:"=unifiGatewayPropertiesPortForwardFormIsReadOnly",isOpen:"=unifiGatewayPropertiesPortForwardFormIsOpen"},controller:"GatewayPropertiesPortForwardFormController",controllerAs:"gatewayPropertiesPortForwardFormCtrl",template:a("./gatewayPropertiesPortForwardForm.jade")(),link:function(a,c,d,e){a.directiveId=a.$id,a.onSubmit=function(b){b===!0&&a.onSave()},a.$watch(function(){return e.modelCopy?e.modelCopy.attributes.dst_port:void 0},function(){e.onDestinationPortChange()}),a.$watch(function(){return e.modelCopy?e.modelCopy.attributes.fwd_port:void 0},function(){e.onForwardPortChange()}),a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./gatewayPropertiesPortForwardForm.jade":543}],545:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=b,this.heyToasts=c,this.frame=d,this.isAdmin=g.isAdmin.bind(g),this.rowsPerPage=h.model.getRowsPerPropertyPanel(),this.defaultSortBy="name",this.isRemoving={},e.call(this,a,f,h)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.portForwards},d.prototype.cancelEdit=function(){this.showEditForm=!1,this.editModel=null},d.prototype.add=function(){this.showEditForm=!0;var a=this.getCollection().model;this.editModel=new a({proto:"tcp_udp"})},d.prototype.edit=function(a){this.showEditForm=!0,this.editModel=a},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_DELETE_CONFIRM_TITLE",{ruleName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_DELETE_CONFIRM_MESSAGE",{ruleName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_DELETE_SUCCESS",{ruleName:a.get("name")})),!0}.bind(this))["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_DELETE_ERROR",{ruleName:a.get("name")})),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","$translate","heyToasts","frame","CollectionView","account","preferences"],angular.module("app-unifi-manage").controller("GatewayPropertiesPortForwardListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],546:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-switch="gatewayPropertiesPortForwardListCtrl.showEditForm" class="appScrollable flexFlag__body fullWidth"><div ng-switch-when="true" unifi-gateway-properties-port-forward-form="gatewayPropertiesPortForwardListCtrl.editModel" unifi-gateway-properties-port-forward-form-on-save="gatewayPropertiesPortForwardListCtrl.cancelEdit()" unifi-gateway-properties-port-forward-form-on-cancel="gatewayPropertiesPortForwardListCtrl.cancelEdit()" unifi-gateway-properties-port-forward-form-is-open="gatewayPropertiesPortForwardListCtrl.isOpen" unifi-gateway-properties-port-forward-form-is-read-only="!gatewayPropertiesPortForwardListCtrl.isAdmin()"></div><div ng-switch-default><div unifi-if-role-admin class="unifiPanelItemContentSection__action"><button ng-click="gatewayPropertiesPortForwardListCtrl.add()" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_CREATE"></span></button></div><table collection-view-sort="gatewayPropertiesPortForwardListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="name" class="portForwardName"><span translate="DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="src" class="portForwardFrom"><span translate="DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_TABLE_HEADER_FROM"></span></th><th collection-view-sort-by="dst_port" class="portForwardPort"><span translate="DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_TABLE_HEADER_PORT"></span></th><th class="portForwardDestination"><span translate="DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_TABLE_HEADER_DESTINATION"></span></th><th class="portForwardActions"><span translate="DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tfoot ng-if="gatewayPropertiesPortForwardListCtrl.view.getModels().length"><tr><td colspan="5"><unifi-micro-pagination unifi-micro-pagination-current-page="gatewayPropertiesPortForwardListCtrl.currentPage" unifi-micro-pagination-rows-per-page="gatewayPropertiesPortForwardListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="gatewayPropertiesPortForwardListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in gatewayPropertiesPortForwardListCtrl.view.getModels(),            startFrom (gatewayPropertiesPortForwardListCtrl.currentPage - 1) * gatewayPropertiesPortForwardListCtrl.rowsPerPage,            limitTo gatewayPropertiesPortForwardListCtrl.rowsPerPage" data-id="{{::model.id}}"><td class="portForwardName">{{::model.get(\'name\')}}</td><td class="portForwardFrom">{{::model.get(\'src\') && model.get(\'src\') !== \'any\' ? model.get(\'src\') : \'*\'}}</td><td class="portForwardPort">{{::model.get(\'dst_port\')}}</td><td class="portForwardDestination">{{::model.get(\'fwd\') + (model.get(\'fwd\') && model.get(\'fwd_port\') ? \':\' : \'\') + model.get(\'fwd_port\')}}</td><td class="portForwardActions appTableCell--actions"><button unifi-if-role-admin ng-click="gatewayPropertiesPortForwardListCtrl.edit(model)" ng-disabled="gatewayPropertiesPortForwardListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_EDIT\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span></button><button unifi-if-role-admin="false" ng-click="gatewayPropertiesPortForwardListCtrl.edit(model)" ng-disabled="gatewayPropertiesPortForwardListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_VIEW\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span></button><button unifi-if-role-admin ng-click="gatewayPropertiesPortForwardListCtrl.remove(model)" ng-disabled="gatewayPropertiesPortForwardListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_DELETE\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span></button></td></tr></tbody></table><div ng-if="!gatewayPropertiesPortForwardListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_GATEWAY_PORT_FORWARD_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],547:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGatewayPropertiesPortForwardList",["gatewayPropertiesPortForwardListDirectiveMixin","PaginatedListDirective",function(b,c){var d=new c("gatewayPropertiesPortForward",a("./gatewayPropertiesPortForwardList.jade")(),{model:"=unifiGatewayPropertiesPortForwardList",portForwards:"=unifiGatewayPropertiesPortForwardListCollection",isOpen:"=unifiGatewayPropertiesPortForwardListIsOpen"});return d.addMixin(b),d}])},{"./gatewayPropertiesPortForwardList.jade":546}],548:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appGlobalSideNav"><div ng-show="!isPrimaryMenuVisible" class="appGlobalSideNav__primaryMenu appGlobalSideNav__menuToggle"><a ng-click="togglePrimaryMenu()" class="appGlobalSideNav__item"><div class="appGlobalSideNav__itemIcon icon ubnt-icon--menu"></div></a></div><div ng-class="{\'is-menu-hidden\': !isPrimaryMenuVisible}" pageutils-nav pageutils-nav-active-class="is-item-selected" unifi-requires-site-context class="appGlobalSideNav__primaryMenu"><a pageutils-nav-state="manage.site.dashboard" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div class="appGlobalSideNav__itemIcon icon ubnt-icon--speedometer"></div><div translate="COMMON_NAV_DASHBOARD" class="appGlobalSideNavTooltip"></div></a><a pageutils-nav-state="manage.site.statistics" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div class="appGlobalSideNav__itemIcon icon ubnt-icon--statistics"></div><div translate="COMMON_NAV_STATISTICS" class="appGlobalSideNavTooltip"></div></a><a pageutils-nav-state="manage.site.maps" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div class="appGlobalSideNav__itemIcon icon ubnt-icon--map-2"></div><div translate="COMMON_NAV_MAP" class="appGlobalSideNavTooltip"></div></a><a pageutils-nav-state="manage.site.devices" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div class="appGlobalSideNav__itemIcon icon ubnt-icon--ap2"></div><div translate="COMMON_NAV_DEVICES" class="appGlobalSideNavTooltip"></div></a><a pageutils-nav-state="manage.site.clients" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div class="appGlobalSideNav__itemIcon icon ubnt-icon--users"></div><div translate="COMMON_NAV_CLIENTS" class="appGlobalSideNavTooltip"></div></a><a pageutils-nav-state="manage.site.insights" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div class="appGlobalSideNav__itemIcon icon ubnt-icon--bulb"></div><div translate="COMMON_NAV_INSIGHTS" class="appGlobalSideNavTooltip"></div></a></div><div ng-class="{\'is-menu-hidden\': isPrimaryMenuVisible}" pageutils-nav pageutils-nav-active-class="is-item-selected" unifi-requires-site-context class="appGlobalSideNav__secondaryMenu"><unifi-events-side-nav></unifi-events-side-nav><unifi-alerts-side-nav></unifi-alerts-side-nav><unifi-settings-side-nav></unifi-settings-side-nav><unifi-chat-side-nav></unifi-chat-side-nav></div><div ng-show="isPrimaryMenuVisible" class="appGlobalSideNav__secondaryMenu appGlobalSideNav__menuToggle"><a ng-click="togglePrimaryMenu()" class="appGlobalSideNav__item"><div class="appGlobalSideNav__itemIcon icon ubnt-icon--menu"></div><unifi-unread-alerts></unifi-unread-alerts></a></div></div>'),b.join("")}},{"jade/runtime":232}],549:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGlobalSideNav",[function(){return{scope:!0,template:a("./globalSideNav.jade")(),link:function(a){a.isPrimaryMenuVisible=!0,a.togglePrimaryMenu=function(){
a.isPrimaryMenuVisible=!a.isPrimaryMenuVisible},a.$on("$frameShowSuccess:alertsLayout",function(){a.isPrimaryMenuVisible=!1}),a.$on("$frameShowSuccess:eventsLayout",function(){a.isPrimaryMenuVisible=!1})}}}])},{"./globalSideNav.jade":548}],550:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.atlas=a,this.mapUtils=b,this.MAP_DEFAULTS=c,this.MAP_UNITS=d,this.$scope=e,this.$window=f,this.init()}d.prototype.init=function(){this.markerId="id",this.mouseListeners=[],this.selectedMap=this.mapUtils.getSelectedMap(),this.START_POINT=0,this.END_POINT=1,this.ruler=[{id:this.START_POINT},{id:this.END_POINT}],this.atlas.getGoogleMaps().then(function(){this.rulerLineOptions={icons:[{icon:{path:this.$window.google.maps.SymbolPath.BACKWARD_OPEN_ARROW,scale:2,strokeWeight:2},offset:"0%"},{icon:{path:this.$window.google.maps.SymbolPath.FORWARD_OPEN_ARROW,scale:2,strokeWeight:2},offset:"100%"}],strokeColor:"red",strokeOpacity:.8,strokeWeight:2},this.rulerEndsOptions={cursor:"move",icon:{path:this.$window.google.maps.SymbolPath.CIRCLE,scale:12},opacity:0}}.bind(this))},d.prototype.latLngAsArray=function(a){return[a.lat(),a.lng()]},d.prototype.setHandler=function(a){this.handler=a},d.prototype.setMap=function(a){this.map=a},d.prototype.handleMarkerMouseMove=function(a){this.mouseListeners.length<=1&&(this.mouseListeners.push(this.$window.google.maps.event.addListener(this.map,"mousemove",function(b){this.ruler[a].latLng=b.latLng,this.$scope.$apply()}.bind(this))),this.mouseListeners.push(this.$window.google.maps.event.addDomListenerOnce(this.map.getDiv(),"mouseleave",function(){this.finishDragging()}.bind(this))),this.mouseListeners.push(this.$window.google.maps.event.addDomListenerOnce(this.map.getDiv(),"mouseup",function(){this.finishDragging()}.bind(this))))},d.prototype.finishDragging=function(){this.mouseListeners.length&&(this.map.set("draggable",!0),this.map.set("draggableCursor","")),this.removeMouseListeners()},d.prototype.toggleRuler=function(){this.showRulerDialog=!this.showRulerDialog,this.showRuler=!1,this.map.set("draggableCursor",this.showRulerDialog?"crosshair":""),this.showRulerDialog?(this.mouseListeners.length&&this.finishDragging(),this.mouseListeners.push(this.$window.google.maps.event.addListenerOnce(this.map,"mousedown",function(a){this.map.set("draggable",!1),this.ruler[this.START_POINT].latLng=a.latLng,this.ruler[this.END_POINT].latLng=a.latLng,this.showRuler=!0,this.$scope.$apply(),this.handleMarkerMouseMove(this.END_POINT)}.bind(this)))):this.finishDragging()},d.prototype.removeMouseListeners=function(){this.mouseListeners.forEach(function(a){this.$window.google.maps.event.removeListener(a),this.mouseDownListener=void 0},this),this.mouseListeners=[]},d.prototype.setScale=function(a,b){var c=this.$window.google.maps.geometry.spherical.computeDistanceBetween(this.ruler[0].latLng,this.ruler[1].latLng),d=a;b===this.MAP_UNITS.FOOT&&(d*=this.MAP_DEFAULTS.FEET_TO_METERS_RATIO),this.handler&&this.handler({newDistance:d,oldDistance:c,newUnit:b})},d.$inject=["atlas","mapUtils","MAP_DEFAULTS","MAP_UNITS","$scope","$window"],angular.module("app-unifi-manage").controller("GoogleImageMapRulerController",d)},{}],551:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><unifi-image-map-ruler set-scale-callback="googleImageMapRulerCtrl.setScale(distance, unit)" toggle-callback="googleImageMapRulerCtrl.toggleRuler()" can-set-scale="googleImageMapRulerCtrl.showRuler"></unifi-image-map-ruler><div ng-if="googleImageMapRulerCtrl.showRuler" atlas-marker-manager="" atlas-marker-manager-id-key="googleImageMapRulerCtrl.markerId"><div atlas-repeat="rulerMarker in googleImageMapRulerCtrl.ruler track by rulerMarker.id" atlas-marker="" atlas-marker-options="googleImageMapRulerCtrl.rulerEndsOptions" atlas-marker-draggable="false" atlas-marker-latlng="googleImageMapRulerCtrl.latLngAsArray(rulerMarker.latLng)" atlas-marker-id="rulerMarker.id" atlas-marker-set-latlng="rulerMarker.latLng = $latLng" atlas-marker-mouseup="googleImageMapRulerCtrl.finishDragging()" atlas-marker-mousedown="googleImageMapRulerCtrl.handleMarkerMouseMove(rulerMarker.id)"></div><div atlas-connection="" atlas-connection-id-key="googleImageMapRulerCtrl.markerId" atlas-connection-models="googleImageMapRulerCtrl.ruler" atlas-connection-options="googleImageMapRulerCtrl.rulerLineOptions"></div></div></div>'),b.join("")}},{"jade/runtime":232}],552:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGoogleImageMapRuler",[function(){return{controller:"GoogleImageMapRulerController",controllerAs:"googleImageMapRulerCtrl",require:["^atlasControls","unifiGoogleImageMapRuler"],restrict:"E",scope:{scaleSetHandler:"&"},template:a("./googleImageMapRuler.jade")(),link:function(a,b,c,d){var e=d[0],f=d[1];f.setHandler(a.scaleSetHandler),e.getMap().then(function(a){f.setMap(a)})}}}])},{"./googleImageMapRuler.jade":551}],553:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiGridsterItemOnResize",["inhibitor","$window",function(a,b){return{require:"^gridsterItem",restrict:"A",link:function(c,d,e,f){var g=c.$eval(e.unifiGridsterItemOnResize);if(g.onResize){var h=a(function(){g.onResize(Math.round(f.getElementSizeX()),f.getElementSizeY())},{debounceWait:50,throttleWait:200});h();var i=angular.element(b);i.on("resize",h),c.$on("$destroy",function(){i.off("resize",h)})}}}}])},{}],554:[function(a,b,c){"use strict";function d(a,b){this.health=a,this.URLS=b,e.call(this)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){this.data=this.health.getNodes()},d.$inject=["health","URLS"],angular.module("app-unifi-manage").controller("HealthController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],555:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-mouseover="isMouseOver = true" ng-mouseleave="isMouseOver = false" class="unifiHealth"><div ng-style="{      \'left\': isSmall ? 0 : tooltipOffset.left    }" ng-class="{      \'unifiHealth__tooltipContainer--wide\': isSmall    }" class="unifiHealth__tooltipContainer"><div ng-class="{        \'appTooltip--right\': !isSmall &amp;&amp; selectedSubsystem === \'www\',        \'appTooltip--left\': !isSmall &amp;&amp; selectedSubsystem === \'wlan\'      }" ng-if="selectedSubsystem &amp;&amp; (showTooltip || isMouseOver)" class="appTooltip appTooltip--bottom"><div class="appSubHeading"><div class="iconText"><div ng-class="{              \'success\': subsystem[selectedSubsystem].get(\'status\') === \'ok\',              \'warning\': subsystem[selectedSubsystem].get(\'status\') === \'warning\',              \'danger\': subsystem[selectedSubsystem].get(\'status\') === \'error\',              \'ubnt-icon--world\': selectedSubsystem === \'www\',              \'ubnt-icon--shield\': selectedSubsystem === \'wan\',              \'ubnt-icon--network\': selectedSubsystem === \'lan\',              \'ubnt-icon--wifi-2\': selectedSubsystem === \'wlan\'            }" class="iconText__icon icon"></div><div class="iconText__text">{{ \'UNIFI_HEALTH_GRAPH_\' + selectedSubsystem.toUpperCase() | translate }}</div></div></div><unifi-health-stats unifi-health-stats-subsystem-attributes="subsystem[selectedSubsystem].attributes"></unifi-health-stats><div ng-if="selectedSubsystem === \'www\' &amp;&amp; subsystem.www.get(\'status\') === \'ok\'" class="appSubHeading verticalRhythmTopHalf"><div class="iconText"><div class="iconText__icon icon ubnt-icon--speedometer-low"></div><div class="iconText__text">{{ \'SPEED_TEST_TOOLTIP_LABEL\' | translate }}</div></div></div><unifi-speed-test-dashboard ng-if="selectedSubsystem === \'www\' &amp;&amp; subsystem.www.get(\'status\') === \'ok\'" unifi-speed-test-dashboard-subsystem-www-attributes="subsystem.www.attributes" unifi-speed-test-dashboard-with-button="isSmall"></unifi-speed-test-dashboard><div ng-if="selectedSubsystem === \'www\' &amp;&amp; subsystem.www.get(\'status\') === \'unknown\'" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--noBorder noPadding verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DASHBOARD_HEALTH_GATEWAY_REQUIRED_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="DASHBOARD_HEALTH_GATEWAY_REQUIRED" translate-values="{unifiGatewayLink: healthCtrl.URLS.UNIFI_SECURITY_GATEWAY}" class="noMarginBottom"></p></div></div></div></div></div><unifi-health-graph unifi-health-graph-data="healthCtrl.data" unifi-health-graph-handlers="eventHandlers" unifi-health-graph-on-render="onRender(ctx)"></unifi-health-graph><div ng-if="!isSmall" class="unifiHealth__speedTestActivate"><button ng-if="subsystem.www.get(\'status\') === \'ok\'" frame-show="speedTest" class="appMainButton appMainButton--primary appMainButton--cozy">{{ \'SPEED_TEST_TOOLTIP_LABEL\' | translate }}</button></div></div>'),b.join("")}},{"jade/runtime":232}],556:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHealth",["$timeout","$state","siteHealth","APP_EVENTS","HEALTH_GRAPH",function(b,c,d,e,f){return{controller:"HealthController",controllerAs:"healthCtrl",template:a("./health.jade")(),scope:{},replace:!0,link:function(a,g,h,i){var j;a.showTooltip=!1,a.isSmall=!1,a.allowClickEvents=!0,a.eventHandlers={click:function(b,d){if(a.allowClickEvents){var e={wan:"ugw",lan:"ugw,usw",wlan:"uap"};e[d.id]&&(d.gauges&&d.gauges[0]&&(d.gauges[0].active||0)+(d.gauges[0].inactive||0)+(d.gauges[0].pending||0)?c.go("manage.site.devices",{type:e[d.id]}):c.go("manage.site.devices"))}},touchstart:function(){a.allowClickEvents=!1},mouseover:function(c,d,e){j&&b.cancel(j),a.$apply(function(){a.showTooltip=!0,a.tooltipOffset={left:Math.ceil(e.left+e.width/2)+"px"},a.selectedSubsystem=d.id})},mouseout:function(){j=b(function(){a.$apply(function(){a.showTooltip=!1})},300)}},a.onRender=function(b){a.isSmall=b.size.isSmall},a.subsystem={},["lan","wan","wlan","www"].forEach(function(b){a.subsystem[b]=d.repository.collection.findWhere({subsystem:b})}),i.updateCollection(d.repository.collection),a.$on("$destroy",function(){i.removeEventHandlers()}),a.$on(e.PROPERTY_PANEL_OPEN,function(c,d){b(function(){a.$broadcast(f.resizeEvent)},d)}),a.$on(e.PROPERTY_PANEL_CLOSE,function(c,d){b(function(){a.$broadcast(f.resizeEvent)},d)})}}}])},{"./health.jade":555}],557:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHexColorInput",["tinycolor",function(a){return{restrict:"A",require:"ngModel",link:function(b,c,d,e){e.$formatters.push(function(b){var c=(b||"").replace(/^#/,""),d=!0;return b&&(d=a(b).isValid()),e.$setValidity("color",d),c}),e.$parsers.push(function(b){var c=b?"#"+b:void 0,d=!0;return b&&((d=a(c).isValid())||(c=void 0)),e.$setValidity("color",d),c})}}}])},{}],558:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHighlightedTextarea",[function(){return{link:function(a,b){a.back=b.find(".highlighted--back"),a.textarea=b.find(".highlighted--textarea");var c=function(){a.back.scrollTop(a.textarea.scrollTop()),a.back.scrollLeft(a.textarea.scrollLeft())};a.textarea.on({scroll:c})}}}])},{}],559:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.heyToasts=c,this.apiResults=b,this.preferences=g,this.hotspot2=d,this.isInterworkingExpanded=!0,e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes);return this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("SETTINGS_NAV_HOTSPOT2").toLowerCase()})),this.hotspot2.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("SETTINGS_NAV_HOTSPOT2").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.$inject=["$translate","apiResults","heyToasts","hotspot2","modelDivergence","preferences"],angular.module("app-unifi-manage").controller("Hotspot2FormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],560:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" ng-class="{    \'appForm--dark\': hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded  }" ng-submit="hotspot2FormCtrl.form.$valid &amp;&amp; hotspot2FormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="hotspot2FormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="hotspot2FormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="hotspot2FormCtrl.form.$error.divergent"></unifi-config-changed><ng-form name="hotspot2FormCtrl.form" ng-class="{          \'is-form-validation-visible\': hotspot2FormCtrl.showValidation,          \'is-validation-hidden\': !hotspot2FormCtrl.showValidation        }"><div class="unifiSettingsSection"><div translate translate-values="{hotspot2Name: hotspot2FormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_HOTSPOT2_SECTION_VIEW\' : (hotspot2FormCtrl.model.id ? \'SETTINGS_HOTSPOT2_SECTION_EDIT\' : \'SETTINGS_HOTSPOT2_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm3 appFormGroup appFormGroup--cozy"><input type="text" name="hotspot2Name" ng-model="hotspot2FormCtrl.modelCopy.attributes.name" ng-model-master="hotspot2FormCtrl.model.attributes.name" required class="input--full"><div ng-show="hotspot2FormCtrl.form.hotspot2Name.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><unifi-hotspot2-section-interworking unifi-hotspot2-section-interworking-form="hotspot2FormCtrl.form" unifi-hotspot2-section-interworking-network-type="hotspot2FormCtrl.modelCopy.attributes.network_type" unifi-hotspot2-section-interworking-network-access-internet="hotspot2FormCtrl.modelCopy.attributes.network_access_internet" unifi-hotspot2-section-interworking-network-access-asra="hotspot2FormCtrl.modelCopy.attributes.network_access_asra" unifi-hotspot2-section-interworking-network-access-esr="hotspot2FormCtrl.modelCopy.attributes.network_access_esr" unifi-hotspot2-section-interworking-network-access-uesa="hotspot2FormCtrl.modelCopy.attributes.network_access_uesa" unifi-hotspot2-section-interworking-hessid="hotspot2FormCtrl.modelCopy.attributes.hessid" unifi-hotspot2-section-interworking-venue-group="hotspot2FormCtrl.modelCopy.attributes.venue_group" unifi-hotspot2-section-interworking-venue-type="hotspot2FormCtrl.modelCopy.attributes.venue_type" unifi-hotspot2-section-interworking-is-dark="hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-hotspot2-section-interworking-is-expanded="hotspot2FormCtrl.isInterworkingExpanded"></unifi-hotspot2-section-interworking></ng-form><unifi-hotspot2-section-interworking-venue-name unifi-hotspot2-section-interworking-venue-name-list="hotspot2FormCtrl.modelCopy.attributes.venue_name" unifi-hotspot2-section-interworking-venue-name-is-dark="hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-hotspot2-section-interworking-venue-name-is-expanded="hotspot2FormCtrl.isInterworkingExpanded"></unifi-hotspot2-section-interworking-venue-name><unifi-hotspot2-section-nai-realm unifi-hotspot2-section-nai-realm-list="hotspot2FormCtrl.modelCopy.attributes.nai_realm_list" unifi-hotspot2-section-nai-realm-is-dark="hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\')"></unifi-hotspot2-section-nai-realm><unifi-hotspot2-section-domain-name unifi-hotspot2-section-domain-name-list="hotspot2FormCtrl.modelCopy.attributes.domain_name_list" unifi-hotspot2-section-domain-name-is-dark="hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\')"></unifi-hotspot2-section-domain-name><unifi-hotspot2-section-roaming-consortium unifi-hotspot2-section-roaming-consortium-list="hotspot2FormCtrl.modelCopy.attributes.roaming_consortium_list" unifi-hotspot2-section-roaming-consortium-is-dark="hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\')"></unifi-hotspot2-section-roaming-consortium><unifi-hotspot2-section-cellular-network unifi-hotspot2-section-cellular-network-list="hotspot2FormCtrl.modelCopy.attributes.cellular_network_list" unifi-hotspot2-section-cellular-network-is-dark="hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\')"></unifi-hotspot2-section-cellular-network></fieldset><div ng-class="{        \'appFormFooter--dark\': hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\')      }" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="hotspot2FormCtrl.showValidation = true" busy-toggle="hotspot2FormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveHotspot2">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="hotspot2FormCtrl.preferences.model.get(\'isSettingsDark\') ?             \'appMainButton--transparentDark\' :             \'appMainButton--transparent\'          " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],561:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspot2Form",["SimpleFormDirective",function(b){return new b("hotspot2",a("./hotspot2Form.jade")())}])},{"./hotspot2Form.jade":560}],562:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.$state=b,this.$translate=c,this.preferences=i,this.hotspot2=h,this.heyToasts=g,this.frame=f,this.defaultSortBy="name",this.isRemoving={},e.call(this,a,d)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.hotspot2.repository.collection},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_HOTSPOT2_DELETE_CONFIRM_TITLE",{hotspot2Name:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_HOTSPOT2_DELETE_CONFIRM_MESSAGE",{hotspot2Name:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("SETTINGS_HOTSPOT2_DELETE_SUCCESS",{hotspot2Name:a.get("name")})),!0}.bind(this))["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("SETTINGS_HOTSPOT2_DELETE_ERROR",{hotspot2Name:a.get("name")})),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.$inject=["$q","$state","$translate","CollectionView","frame","heyToasts","hotspot2","preferences"],angular.module("app-unifi-manage").controller("Hotspot2ListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],563:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="hotspot2Table" collection-view-sort="hotspot2ListCtrl.view" ng-class="{      \'appTable--dark\': hotspot2ListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="hotspot2Name"><span translate="SETTINGS_HOTSPOT2_TABLE_HEADER_NAME"></span></th><th class="hotspot2Actions"><span translate="SETTINGS_HOTSPOT2_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in hotspot2ListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="hotspot2Name">{{::model.get(\'name\')}}</td><td class="hotspot2Actions appTableCell--actions"><button unifi-if-role-admin ng-click="hotspot2ListCtrl.edit(model)" ng-disabled="hotspot2ListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin="false" ng-click="hotspot2ListCtrl.edit(model)" ng-disabled="hotspot2ListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW"></span></button><button unifi-if-role-admin ng-click="hotspot2ListCtrl.remove(model)" ng-disabled="hotspot2ListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!hotspot2ListCtrl.view.getModels().length" ng-class="{      \'appInfoBox--dark\': hotspot2ListCtrl.preferences.model.get(\'isSettingsDark\')    }" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_HOTSPOT2_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],564:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspot2List",["ListDirective",function(b){return new b("hotspot2",a("./hotspot2List.jade")(),{onEdit:"&unifiHotspot2ListOnEdit"})}])},{"./hotspot2List.jade":563}],565:[function(a,b,c){"use strict";function d(a){this.entry={},this.maxListSize=10,this.patterns={mcc:/^\d{3}$/,mnc:/^\d{3}$/},a(function(){this.isExpanded=!!this.list&&this.list.length}.bind(this),0)}d.prototype.addListEntry=function(){this.list=this.list||[],this.form.$valid&&this.list.length<this.maxListSize?(this.showValidation=!1,this.list.push(this.entry),this.entry={},this.form.$setPristine()):this.showValidation=!0},d.prototype.removeListEntry=function(a){this.list&&this.list.splice(a,1)},d.$inject=["$timeout"],angular.module("app-unifi-manage").controller("Hotspot2SectionCellularNetworkController",d)},{}],566:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSettingsSection"><div ng-click="hotspot2SectionCellularNetworkCtrl.isExpanded = !hotspot2SectionCellularNetworkCtrl.isExpanded" ng-class="hotspot2SectionCellularNetworkCtrl.isExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="SETTINGS_HOTSPOT2_SECTION_3GPP_CELLULAR_NETWORK_LIST" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="hotspot2SectionCellularNetworkCtrl.isExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm12 appFormGroup appFormGroup--cozy"><table ng-class="{            \'appTable--dark\': hotspot2SectionCellularNetworkCtrl.isDark          }" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><th class="3gppName"><span translate="SETTINGS_HOTSPOT2_3GPP_TABLE_HEADER_NAME"></span></th><th class="3gppMcc"><span translate="SETTINGS_HOTSPOT2_3GPP_TABLE_HEADER_MCC"></span></th><th class="3gppMnc"><span translate="SETTINGS_HOTSPOT2_3GPP_TABLE_HEADER_MNC"></span></th><th unifi-if-role-admin class="3gppActions"><span translate="SETTINGS_HOTSPOT2_3GPP_TABLE_HEADER_ACTIONS"></span></th></thead><tbody><tr ng-repeat="cellularNetwork in hotspot2SectionCellularNetworkCtrl.list"><td class="3gppName">{{::cellularNetwork.name}}</td><td class="3gppMcc">{{::cellularNetwork.mcc}}</td><td class="3gppMnc">{{::cellularNetwork.mnc}}</td><td class="3gppActions appTableCell--actions"><button type="button" ng-click="hotspot2SectionCellularNetworkCtrl.removeListEntry($index)" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table><div ng-if="!hotspot2SectionCellularNetworkCtrl.list.length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder appInfoBox--dark verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_HOTSPOT2_3GPP_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div><ng-form unifi-if-role-admin ng-class="{            \'is-form-validation-visible\': hotspot2SectionCellularNetworkCtrl.showValidation,            \'is-validation-hidden\': !hotspot2SectionCellularNetworkCtrl.showValidation          }" name="hotspot2SectionCellularNetworkCtrl.form"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock">   <label translate="SETTINGS_HOTSPOT2_3GPP_TABLE_HEADER_NAME"></label><input type="text" name="cellularName" ng-model="hotspot2SectionCellularNetworkCtrl.entry.name" required></div><div class="appInputGroup appInputGroup--cozy inlineBlock">   <label translate="SETTINGS_HOTSPOT2_3GPP_TABLE_HEADER_MCC"></label><input type="text" name="cellularMcc" placeholder="001" ng-model="hotspot2SectionCellularNetworkCtrl.entry.mcc" ng-pattern="hotspot2SectionCellularNetworkCtrl.patterns.mcc" required><div ng-if="hotspot2SectionCellularNetworkCtrl.form.cellularMcc.$invalid" class="appInputFeedback appInputFeedback--danger"></div></div><div class="appInputGroup appInputGroup--cozy inlineBlock">   <label translate="SETTINGS_HOTSPOT2_3GPP_TABLE_HEADER_MNC"></label><input type="text" name="cellularMnc" placeholder="001" ng-model="hotspot2SectionCellularNetworkCtrl.entry.mnc" ng-pattern="hotspot2SectionCellularNetworkCtrl.patterns.mcc" required><div ng-if="hotspot2SectionCellularNetworkCtrl.form.cellularMnc.$invalid" class="appInputFeedback appInputFeedback--danger"></div></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="hotspot2SectionCellularNetworkCtrl.addListEntry()" ng-disabled="hotspot2SectionCellularNetworkCtrl.form.$pristine" class="appMainButton appMainButton--primary appMainButton--condensed"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_HOTSPOT2_3GPP_ACTIONS_ADD"></span></button></div></div></ng-form></div></div></fieldset></div>'),b.join("")}},{"jade/runtime":232}],567:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspot2SectionCellularNetwork",[function(){return{scope:{list:"=unifiHotspot2SectionCellularNetworkList",isDark:"=unifiHotspot2SectionCellularNetworkIsDark"},controller:"Hotspot2SectionCellularNetworkController",controllerAs:"hotspot2SectionCellularNetworkCtrl",bindToController:!0,template:a("./hotspot2SectionCellularNetwork.jade")()}}])},{"./hotspot2SectionCellularNetwork.jade":566}],568:[function(a,b,c){"use strict";function d(a){this.maxListSize=10,a(function(){this.isExpanded=!!this.list&&this.list.length}.bind(this),0)}d.prototype.addListEntry=function(){this.list=this.list||[],this.form.$valid&&this.list.length<this.maxListSize?(this.showValidation=!1,this.list.push(this.entry),this.entry="",this.form.$setPristine()):this.showValidation=!0},d.prototype.removeListEntry=function(a){this.list&&this.list.splice(a,1)},d.$inject=["$timeout"],angular.module("app-unifi-manage").controller("Hotspot2SectionDomainNameController",d)},{}],569:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSettingsSection"><div ng-click="hotspot2SectionDomainNameCtrl.isExpanded = !hotspot2SectionDomainNameCtrl.isExpanded" ng-class="hotspot2SectionDomainNameCtrl.isExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="SETTINGS_HOTSPOT2_SECTION_DOMAIN_NAME_LIST" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="hotspot2SectionDomainNameCtrl.isExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm12 appFormGroup appFormGroup--cozy"><table ng-class="{            \'appTable--dark\': hotspot2SectionDomainNameCtrl.isDark          }" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><th class="domainNameListName"><span translate="SETTINGS_HOTSPOT2_DOMAIN_NAME_TABLE_HEADER_NAME"></span></th><th unifi-if-role-admin class="domainNameListActions"><span translate="SETTINGS_HOTSPOT2_DOMAIN_NAME_TABLE_HEADER_ACTIONS"></span></th></thead><tbody><tr ng-repeat="domain in hotspot2SectionDomainNameCtrl.list"><td class="domainNamelistName">{{::domain}}</td><td class="domainNameListActions appTableCell--actions"><button type="button" unifi-if-role-admin ng-click="hotspot2SectionDomainNameCtrl.removeListEntry($index)" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table><div ng-if="!hotspot2SectionDomainNameCtrl.list.length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder appInfoBox--dark verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_HOTSPOT2_DOMAIN_NAME_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div><ng-form unifi-if-role-admin ng-class="{            \'is-form-validation-visible\': hotspot2SectionDomainNameCtrl.showValidation,            \'is-validation-hidden\': !hotspot2SectionDomainNameCtrl.showValidation          }" name="hotspot2SectionDomainNameCtrl.form"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock">   <label translate="SETTINGS_HOTSPOT2_DOMAIN_NAME_TABLE_HEADER_NAME"></label><input type="text" name="domainName" ng-model="hotspot2SectionDomainNameCtrl.entry" required></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="hotspot2SectionDomainNameCtrl.addListEntry()" ng-disabled="hotspot2SectionDomainNameCtrl.form.$pristine" class="appMainButton appMainButton--primary appMainButton--condensed"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_HOTSPOT2_DOMAIN_NAME_LIST_ACTIONS_ADD"></span></button></div></div></ng-form></div></div></fieldset></div>'),b.join("")}},{"jade/runtime":232}],570:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspot2SectionDomainName",[function(){return{scope:{list:"=unifiHotspot2SectionDomainNameList",isDark:"=unifiHotspot2SectionDomainNameIsDark"},controller:"Hotspot2SectionDomainNameController",controllerAs:"hotspot2SectionDomainNameCtrl",bindToController:!0,template:a("./hotspot2SectionDomainName.jade")()
}}])},{"./hotspot2SectionDomainName.jade":569}],571:[function(a,b,c){"use strict";function d(a,b,c,d){this.HOTSPOT2_VENUE_GROUPS=b,this.HOTSPOT2_VENUE_TYPES=c,this.HOTSPOT2_NETWORK_TYPES=a,this.patterns={hessid:d.MAC_ADDRESS}}d.$inject=["HOTSPOT2_NETWORK_TYPES","HOTSPOT2_VENUE_GROUPS","HOTSPOT2_VENUE_TYPES","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("Hotspot2SectionInterworkingController",d)},{}],572:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSettingsSection"><div ng-click="hotspot2SectionInterworkingCtrl.isExpanded = !hotspot2SectionInterworkingCtrl.isExpanded" ng-class="hotspot2SectionInterworkingCtrl.isExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="SETTINGS_HOTSPOT2_SECTION_INTERWORKING_INFORMATION" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="hotspot2SectionInterworkingCtrl.isExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_LABEL_NETWORK_TYPE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="networkType" ng-model="hotspot2SectionInterworkingCtrl.networkType" ng-options="key as value | translate for (key, value) in hotspot2SectionInterworkingCtrl.HOTSPOT2_NETWORK_TYPES"></select></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_LABEL_NETWORK_ACCESS" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkAccessInternet" id="networkAccessInternet" ng-model="hotspot2SectionInterworkingCtrl.networkAccessInternet"><label translate="SETTINGS_HOTSPOT2_VALUES_NETWORK_INTERNET" for="networkAccessInternet"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkAccessAsra" id="networkAccessAsra" ng-model="hotspot2SectionInterworkingCtrl.networkAccessAsra"><label translate="SETTINGS_HOTSPOT2_VALUES_NETWORK_ASRA" for="networkAccessAsra"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkAccessEsr" id="networkAccessEsr" ng-model="hotspot2SectionInterworkingCtrl.networkAccessEsr"><label translate="SETTINGS_HOTSPOT2_VALUES_NETWORK_ESR" for="networkAccessEsr"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkAccessUesa" id="networkAccessUesa" ng-model="hotspot2SectionInterworkingCtrl.networkAccessUesa"><label translate="SETTINGS_HOTSPOT2_VALUES_NETWORK_UESA" for="networkAccessUesa"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_LABEL_HESSID" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm3 appFormGroup appFormGroup--cozy"><input type="text" name="hessid" ng-model="hotspot2SectionInterworkingCtrl.hessid" ng-pattern="hotspot2SectionInterworkingCtrl.patterns.hessid" class="input--full"><div ng-if="hotspot2SectionInterworkingCtrl.form.hessid.$invalid" translate="VALIDATION_HINT_MAC_ADDRESS" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_LABEL_VENUE_INFO" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="SETTINGS_HOTSPOT2_VALUES_VENUE_GROUP"></label><select name="venueGroup" ng-model="hotspot2SectionInterworkingCtrl.venueGroup" ng-options="key as value | translate for (key, value) in hotspot2SectionInterworkingCtrl.HOTSPOT2_VENUE_GROUPS" ng-change="hotspot2SectionInterworkingCtrl.venueType = \'0\'"></select></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="SETTINGS_HOTSPOT2_VALUES_VENUE_TYPE"></label><select name="venueType" ng-model="hotspot2SectionInterworkingCtrl.venueType" ng-options="key as value | translate for (key, value) in hotspot2SectionInterworkingCtrl.HOTSPOT2_VENUE_TYPES[hotspot2SectionInterworkingCtrl.venueGroup || \'0\']"></select></div></div></div></div></fieldset></div>'),b.join("")}},{"jade/runtime":232}],573:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspot2SectionInterworking",[function(){return{scope:{form:"=unifiHotspot2SectionInterworkingForm",networkType:"=unifiHotspot2SectionInterworkingNetworkType",networkAccessInternet:"=unifiHotspot2SectionInterworkingNetworkAccessInternet",networkAccessAsra:"=unifiHotspot2SectionInterworkingNetworkAccessAsra",networkAccessEsr:"=unifiHotspot2SectionInterworkingNetworkAccessEsr",networkAccessUesa:"=unifiHotspot2SectionInterworkingNetworkAccessUesa",hessid:"=unifiHotspot2SectionInterworkingHessid",venueGroup:"=unifiHotspot2SectionInterworkingVenueGroup",venueType:"=unifiHotspot2SectionInterworkingVenueType",isDark:"=unifiHotspot2SectionInterworkingIsDark",isExpanded:"=unifiHotspot2SectionInterworkingIsExpanded"},controller:"Hotspot2SectionInterworkingController",controllerAs:"hotspot2SectionInterworkingCtrl",bindToController:!0,template:a("./hotspot2SectionInterworking.jade")()}}])},{"./hotspot2SectionInterworking.jade":572}],574:[function(a,b,c){"use strict";function d(a){this.entry={},this.languages=a.languagesAlpha3,this.maxListSize=10}d.prototype.addListEntry=function(){this.list=this.list||[],this.form.$valid&&this.list.length<this.maxListSize?(this.showValidation=!1,this.list.push(this.entry),this.entry={},this.form.$setPristine()):this.showValidation=!0},d.prototype.removeListEntry=function(a){this.list&&this.list.splice(a,1)},d.$inject=["LANGUAGES"],angular.module("app-unifi-manage").controller("Hotspot2SectionInterworkingVenueNameController",d)},{}],575:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<fieldset ng-show="hotspot2SectionInterworkingVenueNameCtrl.isExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_LABEL_VENUE_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><table ng-class="{          \'appTable--dark\': hotspot2SectionInterworkingVenueNameCtrl.isDark        }" unifi-condensed="appTable--condensed" name="venueNameList" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><th class="venueNameLanguage"><span translate="SETTINGS_HOTSPOT2_VENUE_NAME_TABLE_HEADER_LANGUAGE"></span></th><th class="venueName"><span translate="SETTINGS_HOTSPOT2_VENUE_NAME_TABLE_HEADER_NAME"></span></th><th unifi-if-role-admin class="venueListActions"><span translate="SETTINGS_HOTSPOT2_VENUE_NAME_TABLE_HEADER_ACTIONS"></span></th></thead><tbody><tr ng-repeat="venue in hotspot2SectionInterworkingVenueNameCtrl.list"><td class="venueNameLanguage">{{::hotspot2SectionInterworkingVenueNameCtrl.languages[venue.language] | translate}}</td><td class="venueName">{{::venue.name}}</td><td unifi-if-role-admin class="venueListActions appTableCell--actions"><button type="button" ng-click="hotspot2SectionInterworkingVenueNameCtrl.removeListEntry($index)" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table><div ng-if="!hotspot2SectionInterworkingVenueNameCtrl.list.length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder appInfoBox--dark verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_HOTSPOT2_VENUE_NAME_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div><ng-form unifi-if-role-admin ng-class="{          \'is-form-validation-visible\': hotspot2SectionInterworkingVenueNameCtrl.showValidation,          \'is-validation-hidden\': !hotspot2SectionInterworkingVenueNameCtrl.showValidation        }" name="hotspot2SectionInterworkingVenueNameCtrl.form"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="SETTINGS_HOTSPOT2_VENUE_NAME_TABLE_HEADER_LANGUAGE"></label><select name="venueNameLanguage" ng-model="hotspot2SectionInterworkingVenueNameCtrl.entry.language" ng-options="key as value | translate for (key, value) in hotspot2SectionInterworkingVenueNameCtrl.languages" required><option unifi-option-placeholder></option></select></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="SETTINGS_HOTSPOT2_VENUE_NAME_TABLE_HEADER_NAME"></label><input type="text" name="venueName" ng-model="hotspot2SectionInterworkingVenueNameCtrl.entry.name" required></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="hotspot2SectionInterworkingVenueNameCtrl.addListEntry()" ng-disabled="hotspot2SectionInterworkingVenueNameCtrl.form.$pristine" class="appMainButton appMainButton--primary appMainButton--condensed"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_HOTSPOT2_VENUE_NAME_ACTIONS_ADD"></span></button></div></div></ng-form></div></div></fieldset>'),b.join("")}},{"jade/runtime":232}],576:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspot2SectionInterworkingVenueName",[function(){return{scope:{list:"=unifiHotspot2SectionInterworkingVenueNameList",isDark:"=unifiHotspot2SectionInterworkingVenueNameIsDark",isExpanded:"=unifiHotspot2SectionInterworkingVenueNameIsExpanded"},controller:"Hotspot2SectionInterworkingVenueNameController",controllerAs:"hotspot2SectionInterworkingVenueNameCtrl",bindToController:!0,template:a("./hotspot2SectionInterworkingVenueName.jade")()}}])},{"./hotspot2SectionInterworkingVenueName.jade":575}],577:[function(a,b,c){"use strict";function d(a,b,c){this.entry={},this.maxListSize=10,this.HOTSPOT2_EAP_METHODS=c,this.frame=b,a(function(){this.isExpanded=!!this.list&&this.list.length}.bind(this),0)}d.prototype.editEntry=function(a,b){var c,d=this.list;c=angular.copy(a,c),this.frame.show("hotspot2NaiRealmListEntry",{entry:function(){return c}}).then(function(a){d[b]=a})},d.prototype.addEntry=function(){if(this.list){if(this.list.length>=this.maxListSize)return}else this.list=[];this.frame.show("hotspot2NaiRealmListEntry",{entry:function(){return{}}}).then(function(a){this.list.push(a)}.bind(this))},d.prototype.removeEntry=function(a){this.list&&this.list.splice(a,1)},d.$inject=["$timeout","frame","HOTSPOT2_EAP_METHODS"],angular.module("app-unifi-manage").controller("Hotspot2SectionNaiRealmController",d)},{}],578:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSettingsSection"><div ng-click="hotspot2SectionNaiRealmCtrl.isExpanded = !hotspot2SectionNaiRealmCtrl.isExpanded" ng-class="hotspot2SectionNaiRealmCtrl.isExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="SETTINGS_HOTSPOT2_SECTION_NAI_REALM_LIST" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="hotspot2SectionNaiRealmCtrl.isExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm12 appFormGroup appFormGroup--cozy"><table ng-class="{            \'appTable--dark\': hotspot2SectionNaiRealmCtrl.isDark          }" unifi-condensed="appTable--condensed" name="naiRealmList" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><th class="realmListName"><span translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_HEADER_NAME"></span></th><th class="realmListEAP"><span translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_HEADER_EAP"></span></th><th class="realmListEAP"><span translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_HEADER_ENABLED"></span></th><th unifi-if-role-admin class="realmListActions"><span translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_HEADER_ACTIONS"></span></th></thead><tbody><tr ng-repeat="realm in hotspot2SectionNaiRealmCtrl.list"><td class="realmListName">{{::realm.name}}</td><td class="realmListEAP">{{ hotspot2SectionNaiRealmCtrl.HOTSPOT2_EAP_METHODS[realm.eap_method] }}</td><td class="realmListEnabled">{{ (realm.status ? "COMMON_VALUE_YES" : "COMMON_VALUE_NO") | translate }}</td><td unifi-if-role-admin class="realmListActions appTableCell--actions"><button type="button" ng-click="hotspot2SectionNaiRealmCtrl.editEntry(realm, $index)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button type="button" ng-click="hotspot2SectionNaiRealmCtrl.removeEntry($index)" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table><div ng-if="!hotspot2SectionNaiRealmCtrl.list.length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder appInfoBox--dark verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div><div unifi-if-role-admin class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="hotspot2SectionNaiRealmCtrl.addEntry()" ng-disabled="hotspot2SectionNaiRealmCtrl.list.length &gt;= hotspot2SectionNaiRealmCtrl.maxListSize" class="appMainButton appMainButton--primary appMainButton--condensed"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_HOTSPOT2_NAI_REALM_LIST_ACTIONS_ADD"></span></button></div></div></div></fieldset></div>'),b.join("")}},{"jade/runtime":232}],579:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspot2SectionNaiRealm",[function(){return{scope:{list:"=unifiHotspot2SectionNaiRealmList",isDark:"=unifiHotspot2SectionNaiRealmIsDark"},controller:"Hotspot2SectionNaiRealmController",controllerAs:"hotspot2SectionNaiRealmCtrl",bindToController:!0,template:a("./hotspot2SectionNaiRealm.jade")()}}])},{"./hotspot2SectionNaiRealm.jade":578}],580:[function(a,b,c){"use strict";function d(a){this.entry={},this.maxListSize=10,a(function(){this.isExpanded=!!this.list&&this.list.length}.bind(this),0)}d.prototype.addListEntry=function(){this.list=this.list||[],this.form.$valid&&this.list.length<this.maxListSize?(this.showValidation=!1,this.list.push(this.entry),this.entry={},this.form.$setPristine()):this.showValidation=!0},d.prototype.removeListEntry=function(a){this.list&&this.list.splice(a,1)},d.$inject=["$timeout"],angular.module("app-unifi-manage").controller("Hotspot2SectionRoamingConsortiumController",d)},{}],581:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSettingsSection"><div ng-click="hotspot2SectionRoamingConsortiumCtrl.isExpanded = !hotspot2SectionRoamingConsortiumCtrl.isExpanded" ng-class="hotspot2SectionRoamingConsortiumCtrl.isExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="SETTINGS_HOTSPOT2_SECTION_ROAMING_CONSORTIUM_LIST" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="hotspot2SectionRoamingConsortiumCtrl.isExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm12 appFormGroup appFormGroup--cozy"><table ng-class="{            \'appTable--dark\': hotspot2SectionRoamingConsortiumCtrl.isDark          }" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><th class="roamingConsortiumName"><span translate="SETTINGS_HOTSPOT2_ROAMING_CONSORTIUM_TABLE_HEADER_NAME"></span></th><th class="roamingConsortiumOid"><span translate="SETTINGS_HOTSPOT2_ROAMING_CONSORTIUM_TABLE_HEADER_OID"></span></th><th unifi-if-role-admin class="roamingConsortiumActions"><span translate="SETTINGS_HOTSPOT2_ROAMING_CONSORTIUM_TABLE_HEADER_ACTIONS"></span></th></thead><tbody><tr ng-repeat="roamingConsortium in hotspot2SectionRoamingConsortiumCtrl.list"><td class="roamingConsortiumName">{{::roamingConsortium.name}}</td><td class="roamingConsortiumOid">{{::roamingConsortium.oid}}</td><td class="roamingConsortiumActions appTableCell--actions"><button type="button" unifi-if-role-admin ng-click="hotspot2SectionRoamingConsortiumCtrl.removeListEntry($index)" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table><div ng-if="!hotspot2SectionRoamingConsortiumCtrl.list.length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder appInfoBox--dark verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_HOTSPOT2_ROAMING_CONSORTIUM_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div><ng-form unifi-if-role-admin ng-class="{            \'is-form-validation-visible\': hotspot2SectionRoamingConsortiumCtrl.showValidation,            \'is-validation-hidden\': !hotspot2SectionRoamingConsortiumCtrl.showValidation          }" name="hotspot2SectionRoamingConsortiumCtrl.form"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock">   <label translate="SETTINGS_HOTSPOT2_ROAMING_CONSORTIUM_TABLE_HEADER_NAME"></label><input type="text" name="roamingConsortiumName" ng-model="hotspot2SectionRoamingConsortiumCtrl.entry.name" required></div><div class="appInputGroup appInputGroup--cozy inlineBlock">   <label translate="SETTINGS_HOTSPOT2_ROAMING_CONSORTIUM_TABLE_HEADER_OID"></label><input type="text" name="roamingConsortiumOid" ng-model="hotspot2SectionRoamingConsortiumCtrl.entry.oid" required></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="hotspot2SectionRoamingConsortiumCtrl.addListEntry()" ng-disabled="hotspot2SectionRoamingConsortiumCtrl.form.$pristine" class="appMainButton appMainButton--primary appMainButton--condensed"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_HOTSPOT2_ROAMING_CONSORTIUM_ACTIONS_ADD"></span></button></div></div></ng-form></div></div></fieldset></div>'),b.join("")}},{"jade/runtime":232}],582:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspot2SectionRoamingConsortium",[function(){return{scope:{list:"=unifiHotspot2SectionRoamingConsortiumList",isDark:"=unifiHotspot2SectionRoamingConsortiumIsDark"},controller:"Hotspot2SectionRoamingConsortiumController",controllerAs:"hotspot2SectionRoamingConsortiumCtrl",bindToController:!0,template:a("./hotspot2SectionRoamingConsortium.jade")()}}])},{"./hotspot2SectionRoamingConsortium.jade":581}],583:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$q=a,this.$translate=b,this.frame=c,this.heyToasts=d,this.hotspotOverrides=e,this.preferences=f,this.isLoading=!0,this.isUpgrading=!1,e.repository.register().fetch()["finally"](function(){this.isLoading=!1}.bind(this))}d.prototype.upgradeOverrides=function(){var a=this.$q.when(),b=this.hotspotOverrides.repository.model.get("overrides_modified_files"),c=b&&b.length>0;return c&&(a=this.frame.show("confirmUpgradeOverrides",{modifiedFiles:function(){return b},options:angular.noop})),a.then(function(){return this.isUpgrading=!0,this.hotspotOverrides.upgrade().then(function(a){this.heyToasts.pushSuccess(a)}.bind(this))["catch"](function(a){this.heyToasts.pushError(a)}.bind(this))}.bind(this))["finally"](function(){this.isUpgrading=!1}.bind(this))},d.prototype.isUpgradeAvailable=function(){var a=this.hotspotOverrides.repository.model.get("portal_version"),b=this.hotspotOverrides.repository.model.get("overrides_portal_version");return!!a&&!!b&&a!==b},d.prototype.unregister=function(){this.hotspotOverrides.repository.unregister()},d.$inject=["$q","$translate","frame","heyToasts","hotspotOverrides","preferences"],angular.module("app-unifi-manage").controller("HotspotOverridesUpgradeController",d)},{}],584:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'appInfoBox--dark\': hotspotOverridesUpgradeCtrl.preferences.model.get(\'isSettingsDark\')}" ng-if="hotspotOverridesUpgradeCtrl.isUpgradeAvailable()" class="appInfoBox appInfoBox--warning appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__header">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_HEADER\' | translate}}</div><div class="appInfoBox__body"><p translate="SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_BODY_OVERRIDES_VERSION" translate-values="{version: hotspotOverridesUpgradeCtrl.hotspotOverrides.repository.model.get(\'overrides_portal_version\')}" class="noMarginBottom"></p><p translate="SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_BODY_CONTROLLER_VERSION" translate-values="{version: hotspotOverridesUpgradeCtrl.hotspotOverrides.repository.model.get(\'portal_version\')}" class="noMarginBottom"></p></div><div class="appInfoBox__footer"><button ng-click="hotspotOverridesUpgradeCtrl.upgradeOverrides()" type="button" busy-toggle="hotspotOverridesUpgradeCtrl.isUpgrading" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_BUTTON\' | translate}}</button></div></div></div>'),b.join("")}},{"jade/runtime":232}],585:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiHotspotOverridesUpgrade",[function(){return{controller:"HotspotOverridesUpgradeController",controllerAs:"hotspotOverridesUpgradeCtrl",template:a("./hotspotOverridesUpgrade.jade")(),link:function(a,b,c,d){a.$on("$destroy",function(){d.unregister()})}}}])},{"./hotspotOverridesUpgrade.jade":584}],586:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiIfAdvancedFeatures",["featureFlag","settings","ngIfDirective",function(a,b,c){var d=c[0];return{transclude:d.transclude,priority:d.priority,terminal:d.terminal,restrict:d.restrict,$$tlb:d.$$tlb,link:function(c,e,f){f.ngIf=function(){if(a.isEnabled("enableAdvancedFeaturesToggle")){var d=b.getSettingFromKey("mgmt"),e=!!d&&d.get("advanced_feature_enabled"),g=c.$eval(f.unifiIfAdvancedFeatures)===!1,h=c.$eval(f.unifiIfAdvancedFeaturesAnd);return(g?!e:e)&&(void 0===f.unifiIfAdvancedFeaturesAnd||h)}return!0},d.link.apply(d,arguments)}}}])},{}],587:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiIframePostMessage",["postMessage",function(a){return{scope:{model:"=unifiIframePostMessage"},link:function(b,c){var d=c[0].contentWindow,e=function(c){c.appLoaded===!0&&a.send(d,b.model)};a.registerListener(e),b.$watch("model",function(b){a.send(d,b)},!0),b.$on("$destroy",function(){a.unregisterListener(e)})}}}])},{}],588:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiImageMap"><unifi-svg-map><div class="unifiMapCustomControls"><a href="javascript:void(0)" ng-class="{\'unifiMapCustomControls__control--small\': svgMapCtrl.mapFeatures.isEnabled(svgMapCtrl.MAP_FEATURES.SMALL_ICONS)}" ng-click="svgMapCtrl.toggleMarkerSize()" class="unifiMapCustomControls__control unifiMapCustomControls__groupedItem"><div class="unifiMapCustomControls__icon icon ubnt-icon--ap2"></div></a></div><unifi-map-edit-panel unifi-if-role-admin></unifi-map-edit-panel><unifi-image-map-ruler set-scale-callback="svgMapCtrl.setMapScale(distance, unit)" toggle-callback="svgMapCtrl.toggleMeasurementMode()" can-set-scale="svgMapCtrl.getMeasuredLength() &gt; 0"></unifi-image-map-ruler></unifi-svg-map></div>'),b.join("")}},{"jade/runtime":232}],589:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiImageMap",[function(){return{template:a("./imageMap.jade")(),replace:!0}}])},{"./imageMap.jade":588}],590:[function(a,b,c){"use strict";function d(a,b){this.MAP_DEFAULTS=a,this.MAP_UNITS=b,this.unit=b.METER}d.prototype.getMaxValue=function(){var a=this.MAP_DEFAULTS.MAX_RULER_VALUE;return this.unit===this.MAP_UNITS.FOOT&&(a/=this.MAP_DEFAULTS.FEET_TO_METERS_RATIO),Math.round(a)},d.prototype.toggleRuler=function(){this.showRulerDialog=!this.showRulerDialog,this.toggleCallback()},d.prototype.setScale=function(){this.setScaleCallback({distance:this.distance,unit:this.unit}),this.toggleRuler(),this.distance=void 0},d.$inject=["MAP_DEFAULTS","MAP_UNITS"],angular.module("app-unifi-manage").controller("ImageMapRulerController",d)},{}],591:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiMapCustomControls appPopoverContainer"><a ng-click="imageMapRulerCtrl.toggleRuler()" class="unifiMapCustomControls__control"><div class="unifiMapCustomControls__icon icon ubnt-icon--length"></div></a><div ng-if="imageMapRulerCtrl.showRulerDialog" class="appPopover appPopover--withHeader appPopover--bottomRight appPopover--closeable"><div class="appPopover__inner"><div ng-click="imageMapRulerCtrl.toggleRuler()" class="appPopover__close"><div class="icon ubnt-icon--x"></div></div><div class="appPopover__header uppercase">{{\'MAP_SCALE_HEADER\' | translate}}</div><div class="appPopover__section"><p class="appType--quiet noMarginBottom">{{\'MAP_SCALE_DESCRIPTION\' | translate}}</p></div><div class="appPopover__content"><div class="container container--smash"><form><div class="appInputGroup appInputGroup--flex"><label class="appLabel--primary appLabel--boxInline">{{\'MAP_SCALE_DISTANCE\' | translate}}</label><div class="appCompoundInput appCompoundInput--flex"><input type="number" min="0" max="{{imageMapRulerCtrl.getMaxValue()}}" required ng-model="imageMapRulerCtrl.distance"><select ng-model="imageMapRulerCtrl.unit"><option ng-value="imageMapRulerCtrl.MAP_UNITS.METER">{{\'MAP_METER_UNIT_SHORT_NAME\' | translate}}</option><option ng-value="imageMapRulerCtrl.MAP_UNITS.FOOT">{{\'MAP_FEET_UNIT_SHORT_NAME\' | translate}}</option></select></div></div><div class="appFormFooter"><div class="appFormFooter__right"><button ng-disabled="!imageMapRulerCtrl.canSetScale                            || !imageMapRulerCtrl.distance                            || imageMapRulerCtrl.distance &lt;= 0                            || imageMapRulerCtrl.distance &gt; imageMapRulerCtrl.getMaxValue()" ng-click="imageMapRulerCtrl.setScale()" class="appMainButton appMainButton--primary">{{\'MAP_SCALE_APPLY\' | translate}}</button></div></div></form></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],592:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiImageMapRuler",[function(){return{bindToController:!0,replace:!0,controller:"ImageMapRulerController",controllerAs:"imageMapRulerCtrl",restrict:"E",scope:{setScaleCallback:"&",toggleCallback:"&",canSetScale:"="},template:a("./imageMapRuler.jade")()}}])},{"./imageMapRuler.jade":591}],593:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k){this.STATS_DEFAULTS=k,this.$filter=a,this.$translate=c,this.clients=d,this.dpi=e,this.dpiIcons=f,this.dpiUtils=g,this.ouiIcons=h,this.settings=i,this.legendConfig={labelProperty:"label",valueProperty:"value",iconProperty:"icon"},this.clientsChartConfig={dataProperty:"value",label:{main:"",secondary:""},onClick:function(){b.go("manage.site.clients")}},this.dataConverter=(new j).deduplicatedBy("label").sortedBy("value",!0).withLimit(this.STATS_DEFAULTS.INVENTORY_CLIENTS_MAX_ITEMS).compactUnknown(function(a){return!a.label||"unknown"===a.label.toLowerCase()}).withUnknownDefaults({label:this.$translate.instant("DASHBOARD_DPI_UNKNOWN")}).withOtherDefaults({label:this.$translate.instant("DASHBOARD_DPI_OTHER")}),this.checkDpiEnabled()}d.prototype.addEventHandlers=function(){this.settings.repository.collection.on("sync",this.checkDpiEnabled,this),this.clients.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.settings.repository.collection.off("sync",this.checkDpiEnabled,this),this.clients.repository.collection.off("sync",this.collectData,this)},d.prototype.checkDpiEnabled=function(){this.dpiEnabled=this.dpiUtils.isDpiEnabled(),this.collectData()},d.prototype.collectData=function(){var a=this.clients.repository.collection.map(function(a){var b=this.dpi.getDeviceCategory(a.get("dev_cat")),c=a.get("dev_cat")?this.dpiIcons.getIconForDeviceCategory(a.get("dev_cat")):this.ouiIcons.getIconForOuiName(a.get("oui"));return{value:1,label:b?b.name:a.get("oui"),icon:c}},this),b=this.dataConverter.apply(a);this.data=b.data,this.clientsChartConfig.label.main=this.clients.repository.collection.length,this.clientsChartConfig.label.secondary=this.$filter("uppercase")(this.$translate.instant("DASHBOARD_INVENTORY_CLIENTS_DONUT_LABEL",{count:this.clients.repository.collection.length},"messageformat"))},d.$inject=["$filter","$state","$translate","clients","dpi","dpiIcons","dpiUtils","ouiIcons","settings","DataConverter","STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("InventoryClientsGraphController",d)},{}],594:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiInventoryGraph"><div class="appSubHeading appSubHeading--standalone iconText appIconText"><span class="iconText__text">{{ \'DASHBOARD_INVENTORY_CLIENTS\' | translate }}</span><div ng-if="!inventoryClientsGraphCtrl.dpiEnabled &amp;&amp; inventoryClientsGraphCtrl.data.length" class="appTooltipContainer appTooltipContainer--hoverable unweighted iconText__icon"><div class="icon ubnt-icon--alert appStatusIcon--warning"></div><div class="appTooltip appTooltip--bottomRight"><div class="appTooltip__header">{{\'DASHBOARD_INVENTORY_CLIENTS_DPI_NOT_ENABLED\' | translate}}</div>{{\'DASHBOARD_INVENTORY_CLIENTS_DPI_NOT_ENABLED_DETAILS\' | translate}}</div></div></div><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="inventoryClientsGraphCtrl.clientsChartConfig" unifi-donut-chart-with-tooltip-data="inventoryClientsGraphCtrl.data" class="unifiInventoryGraphChart"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.label}}</div></div></unifi-donut-chart-with-tooltip><div class="unifiInventoryGraphPane"><unifi-chart-legend unifi-chart-legend-config="inventoryClientsGraphCtrl.legendConfig" unifi-chart-legend-data="inventoryClientsGraphCtrl.data"></unifi-chart-legend></div></div>'),b.join("")}},{"jade/runtime":232}],595:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiInventoryClientsGraph",[function(){return{controller:"InventoryClientsGraphController",controllerAs:"inventoryClientsGraphCtrl",template:a("./inventoryClientsGraph.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./inventoryClientsGraph.jade":594}],596:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k){this.devices=a,this.deviceCategoryUtils=b,this.deviceStateUtils=c,this.DEVICE_CATEGORIES=e,this.DEVICE_MODELS=f,this.DEVICE_STATES=g,this.DEVICE_TYPES=h,this.$filter=i,this.$translate=k,this.dataConverter=(new d).sortedBy("count",!0).countTotal().deduplicatedBy("label"),this.legendConfig={labelProperty:"label",valueProperty:"count",iconProperty:"icon"},this.devicesChartConfig={dataProperty:"count",label:{
main:"",secondary:""},onClick:function(){j.go("manage.site.devices")}},this.collectData()}d.prototype.getIconForDeviceCategory=function(a){switch(a){case this.DEVICE_CATEGORIES.WLAN:return"ubnt-icon--wifi-2";case this.DEVICE_CATEGORIES.WAN:return"ubnt-icon--shield";case this.DEVICE_CATEGORIES.LAN:return"ubnt-icon--network";case this.DEVICE_CATEGORIES.PHONE:return"ubnt-icon--phone";case this.DEVICE_CATEGORIES.PENDING:return"ubnt-icon--clock-2";case this.DEVICE_CATEGORIES.ADOPTING:return"ubnt-icon--plus-circle";case this.DEVICE_CATEGORIES.MANAGED_BY_OTHER:return"ubnt-icon--cube";case this.DEVICE_CATEGORIES.INACTIVE:return"ubnt-icon--link-broken";default:return}},d.prototype.addEventHandlers=function(){this.devices.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.devices.repository.collection.off("sync",this.collectData,this)},d.prototype.collectData=function(){var a=this.devices.repository.collection.filter(function(a){return!!this.deviceCategoryUtils.extractCategory(a)},this).map(function(a){var b=this.deviceCategoryUtils.extractCategory(a),c=this.deviceStateUtils.getDeviceModel(a),d={};return d[c]=1,{count:1,label:this.$translate.instant(b),icon:this.getIconForDeviceCategory(b),modelCount:d}},this);this.data=this.dataConverter.process(a),this.devicesChartConfig.label.main=this.dataConverter.total.count||0,this.devicesChartConfig.label.secondary=this.$filter("uppercase")(this.$translate.instant("DASHBOARD_INVENTORY_DEVICES_DONUT_LABEL",{count:this.dataConverter.total.count},"messageformat"))},d.$inject=["devices","deviceCategoryUtils","deviceStateUtils","DataConverter","DEVICE_CATEGORIES","DEVICE_MODELS","DEVICE_STATES","DEVICE_TYPES","$filter","$state","$translate"],angular.module("app-unifi-manage").controller("InventoryDevicesGraphController",d)},{}],597:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiInventoryGraph"><div class="appSubHeading appSubHeading--standalone">{{ \'DASHBOARD_INVENTORY_DEVICES\' | translate }}</div><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="inventoryDevicesGraphCtrl.devicesChartConfig" unifi-donut-chart-with-tooltip-data="inventoryDevicesGraphCtrl.data" class="unifiInventoryGraphChart"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.label}}</div><div ng-repeat="(model, count) in focusedData.modelCount" class="noPaddingBottom">{{count}} x {{model}}</div></div></unifi-donut-chart-with-tooltip><div class="unifiInventoryGraphPane"><unifi-chart-legend unifi-chart-legend-config="inventoryDevicesGraphCtrl.legendConfig" unifi-chart-legend-data="inventoryDevicesGraphCtrl.data"></unifi-chart-legend></div></div>'),b.join("")}},{"jade/runtime":232}],598:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiInventoryDevicesGraph",[function(){return{controller:"InventoryDevicesGraphController",controllerAs:"inventoryDevicesGraphCtrl",template:a("./inventoryDevicesGraph.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./inventoryDevicesGraph.jade":597}],599:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h){this.dpi=a,this.dpiStats=b,this.dpiUtils=c,this.$filter=f,this.$translate=h,this.dataConverter=(new d).deduplicatedBy("label").sortedBy("value",!0).countTotal().withLimit(e.DPI.GRAPH_MAX_ITEMS).compactUnknown(function(a){return!a.label||"unknown"===a.label.toLowerCase()}).withUnknownDefaults({label:this.$translate.instant("DASHBOARD_DPI_UNKNOWN")}).withOtherDefaults({label:this.$translate.instant("DASHBOARD_DPI_OTHER")}),this.legendConfig={labelProperty:"label",valueProperty:"value",valueFormat:function(a){return f("bytes")(a)}},this.chartConfig={dataProperty:"value",label:{main:"",secondary:f("uppercase")(h.instant("DASHBOARD_DPI_TRAFFIC"))},onClick:function(){g.go("manage.site.statistics.dpi")}},this.collectData()}d.prototype.addEventHandlers=function(){this.dpiStats.addEventHandlers(),this.dpiStats.repository.model.on("sync",this.collectData,this),this.dpiStats.repository.register(),this.dpiStats.repository.fetch({forceFetch:!0})},d.prototype.removeEventHandlers=function(){this.dpiStats.removeEventHandlers(),this.dpiStats.repository.model.off("sync",this.collectData,this),this.dpiStats.repository.unregister()},d.prototype.collectData=function(){if(this.dpiUtils.isDpiDataAvailable()){var a=this.dpiStats.getDpiByCategory(),b=a.map(function(a){var b=this.dpi.getAppCategory(a.cat);return{value:a.rx_bytes+a.tx_bytes,label:b?b.name:void 0}},this),c=this.dataConverter.apply(b);this.data=c.data,this.chartConfig.label.main=this.data.length?this.$filter("bytes")(c.total.value):"?"}else this.data=[],this.chartConfig.label.main="?"},d.$inject=["dpi","dpiStats","dpiUtils","DataConverter","STATS_DEFAULTS","$filter","$state","$translate"],angular.module("app-unifi-manage").controller("InventoryDpiGraphController",d)},{}],600:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiInventoryGraph"><div class="appSubHeading appSubHeading--standalone">{{ \'DASHBOARD_DPI\' | translate }}</div><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="inventoryDpiGraphCtrl.chartConfig" unifi-donut-chart-with-tooltip-data="inventoryDpiGraphCtrl.data" class="unifiInventoryGraphChart"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.label}}</div><div class="noPaddingBottom">{{focusedData.value | bytes}}</div></div></unifi-donut-chart-with-tooltip><div class="unifiInventoryGraphPane"><unifi-chart-legend unifi-chart-legend-config="inventoryDpiGraphCtrl.legendConfig" unifi-chart-legend-data="inventoryDpiGraphCtrl.data"></unifi-chart-legend><div ng-if="!inventoryDpiGraphCtrl.data.length" class="appInfoBox appInfoBox--warning appInfoBox--cozy withLayerShadow"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DASHBOARD_DPI_NO_DATA_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="DASHBOARD_DPI_NO_DATA" class="noMarginBottom"></p></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],601:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiInventoryDpiGraph",[function(){return{controller:"InventoryDpiGraphController",controllerAs:"inventoryDpiGraphCtrl",template:a("./inventoryDpiGraph.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./inventoryDpiGraph.jade":600}],602:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.clients=h,this.knownClients=b,this.comparator=d,this.INSIGHTS_DEFAULTS=i,this.filter=new c,e.call(this,a,f,g)}var e=a("../../controllers/BaseClientListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initView=function(){e.prototype.initView.call(this),this.knownClients.repository.collection.on("add remove change reset",this.setFilterCounts,this),this.setFilterCounts(),this.setViewFilterCounts()},d.prototype.destroyView=function(){e.prototype.destroyView.call(this),this.knownClients.repository.collection.off("add remove change reset",this.setFilterCounts,this)},d.prototype.initFilters=function(){e.prototype.initFilters.call(this),this.filter.setBlockedFilter(!!this.listState.getFilter("blocked")||void 0),this.filter.setNotedFilter(!!this.listState.getFilter("noted")||void 0),this.filter.setStaticIpFilter(!!this.listState.getFilter("staticIp")||void 0),this.hasBlockedFilter=this.filter.hasBlockedFilter.bind(this.filter),this.hasNotedFilter=this.filter.hasNotedFilter.bind(this.filter),this.hasStaticIpFilter=this.filter.hasStaticIpFilter.bind(this.filter),this.initFilterView()},d.prototype.initFilterView=function(){this.filterViewGroups=[],this.filterViewGroups.push({id:"knownClientWired",translationKey:"KNOWN_CLIENT_FILTER_TITLE_WIRED",items:[{id:"all",translationKey:"KNOWN_CLIENT_WIRED_FILTER_ALL",excludeFromSummary:!0,getCount:function(){return this.counts.sum.all}.bind(this),isSelected:function(){return!this.hasWiredFilter()}.bind(this),onSelect:function(){return this.clearWiredFilter()}.bind(this)},{id:"wireless",translationKey:"KNOWN_CLIENT_WIRED_FILTER_FALSE",getCount:function(){return this.counts.wireless.all}.bind(this),isSelected:function(){return this.getWiredFilter()===!1}.bind(this),onSelect:function(){return this.setWiredFilter(!1)}.bind(this)},{id:"wired",translationKey:"KNOWN_CLIENT_WIRED_FILTER_TRUE",getCount:function(){return this.counts.wired.all}.bind(this),isSelected:function(){return this.getWiredFilter()===!0}.bind(this),onSelect:function(){return this.setWiredFilter(!0)}.bind(this)}]}),this.filterViewGroups.push({id:"knownClientGuest",translationKey:"KNOWN_CLIENT_FILTER_TITLE_GUEST",items:[{id:"all",translationKey:"KNOWN_CLIENT_GUEST_FILTER_ALL",excludeFromSummary:!0,getCount:function(){return this.viewCounts.clients.all}.bind(this),isSelected:function(){return!this.hasGuestFilter()}.bind(this),onSelect:function(){return this.clearGuestFilter()}.bind(this)},{id:"user",translationKey:"KNOWN_CLIENT_GUEST_FILTER_FALSE",getCount:function(){return this.viewCounts.clients.users}.bind(this),isSelected:function(){return this.getGuestFilter()===!1}.bind(this),onSelect:function(){return this.setGuestFilter(!1)}.bind(this)},{id:"guest",translationKey:"KNOWN_CLIENT_GUEST_FILTER_TRUE",getCount:function(){return this.viewCounts.clients.guests}.bind(this),isSelected:function(){return this.getGuestFilter()===!0}.bind(this),onSelect:function(){return this.setGuestFilter(!0)}.bind(this)}]}),this.filterViewGroups.push({id:"knownClientExtra",translationKey:"KNOWN_CLIENT_FILTER_TITLE_EXTRA",allowMultiple:!0,items:[{id:"blocked",translationKey:"KNOWN_CLIENT_BLOCKED_FILTER",getCount:function(){return this.viewCounts.blocked}.bind(this),isSelected:function(){return this.hasBlockedFilter()}.bind(this),onSelect:function(){return this.toggleBlockedFilter()}.bind(this)},{id:"noted",translationKey:"KNOWN_CLIENT_NOTED_FILTER",getCount:function(){return this.viewCounts.noted}.bind(this),isSelected:function(){return this.hasNotedFilter()}.bind(this),onSelect:function(){return this.toggleNotedFilter()}.bind(this)},{id:"staticIp",translationKey:"KNOWN_CLIENT_STATIC_IP_FILTER",getCount:function(){return this.viewCounts.staticIp}.bind(this),isSelected:function(){return this.hasStaticIpFilter()}.bind(this),onSelect:function(){return this.toggleStaticIpFilter()}.bind(this)}]})},d.prototype.setFilterCounts=function(){this.counts={wired:{users:0,guests:0},wireless:{users:0,guests:0}},this.knownClients.repository.collection.each(function(a){a.get("is_wired")?a.get("is_guest")?this.counts.wired.guests++:this.counts.wired.users++:a.get("is_guest")?this.counts.wireless.guests++:this.counts.wireless.users++}.bind(this)),this.counts.wireless.all=this.counts.wireless.users+this.counts.wireless.guests,this.counts.wired.all=this.counts.wired.users+this.counts.wired.guests,this.counts.sum={},this.counts.sum.users=this.counts.wired.users+this.counts.wireless.users,this.counts.sum.guests=this.counts.wired.guests+this.counts.wireless.guests,this.counts.sum.all=this.counts.sum.users+this.counts.sum.guests},d.prototype.setViewFilterCounts=function(){this.viewCounts={clients:{},blocked:0,noted:0,staticIp:0},this.hasWiredFilter()?this.getWiredFilter()?this.viewCounts.clients=this.counts.wired:this.viewCounts.clients=this.counts.wireless:this.viewCounts.clients=this.counts.sum,angular.forEach(this.view.getModels(),function(a){a.get("blocked")&&this.viewCounts.blocked++,a.get("noted")&&this.viewCounts.noted++,a.get("use_fixedip")&&this.viewCounts.staticIp++}.bind(this))},d.prototype.toggleBlockedFilter=function(){this.beginStateChange(),this.hasBlockedFilter()?(this.listState.removeFilter("blocked"),this.filter.setBlockedFilter(void 0)):(this.listState.addFilter("blocked","blocked"),this.filter.setBlockedFilter(!0)),this.commitStateChange()},d.prototype.toggleNotedFilter=function(){this.beginStateChange(),this.hasNotedFilter()?(this.listState.removeFilter("noted"),this.filter.setNotedFilter(void 0)):(this.listState.addFilter("noted","noted"),this.filter.setNotedFilter(!0)),this.commitStateChange()},d.prototype.toggleStaticIpFilter=function(){this.beginStateChange(),this.hasStaticIpFilter()?(this.listState.removeFilter("staticIp"),this.filter.setStaticIpFilter(void 0)):(this.listState.addFilter("staticIp","static-ip"),this.filter.setStaticIpFilter(!0)),this.commitStateChange()},d.prototype.commitStateChange=function(){e.prototype.commitStateChange.call(this).then(function(){this.setViewFilterCounts()}.bind(this))},d.prototype.getCollection=function(){return this.knownClients.repository.collection},d.prototype.getWithin=function(){return this.knownClients.getWithin()},d.prototype.onUpdateWithin=function(a){this.beginStateChange(),this.listState.addFilter("within",a),this.knownClients.updateWithin(a),this.commitStateChange(),this.showLoader=!0,this.knownClients.repository.refresh().then(function(){this.showLoader=!1}.bind(this))},d.$inject=["$injector","knownClients","KnownClientFilter","knownClientsComparator","CollectionView","preferences","clients","INSIGHTS_DEFAULTS"],angular.module("app-unifi-manage").controller("KnownClientListController",d)},{"../../controllers/BaseClientListController":996}],603:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="knownClientListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div><div class="appActionBarFilter"><unifi-time-filter-dropdown unifi-time-filter-dropdown-default-hours="knownClientListCtrl.getWithin()" unifi-time-filter-dropdown-callback="knownClientListCtrl.onUpdateWithin(hours)" unifi-time-filter-dropdown-values="[24, 72, 168, 336, 720, 2880, 0]"></unifi-time-filter-dropdown></div><unifi-ui-list-filter-buttons unifi-ui-list-filter-buttons-config="knownClientListCtrl.filterViewGroups" class="visible--lgUp"></unifi-ui-list-filter-buttons><unifi-ui-list-filter-dropdown unifi-ui-list-filter-dropdown-config="knownClientListCtrl.filterViewGroups" unifi-ui-list-filter-dropdown-filter-by-label="{{\'COMMON_LABEL_FILTER_BY\' | translate}}" unifi-ui-list-filter-dropdown-filter-by-all-label="{{\'COMMON_LABEL_FILTER_ALL\' | translate}}" class="visible--mdDown"></unifi-ui-list-filter-dropdown></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="knownClientListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="knownClientListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><unifi-loading-status unifi-loading-status-is-loading="knownClientListCtrl.knownClients.repository.collection.isLoading &amp;&amp; knownClientListCtrl.showLoader" unifi-loading-status-is-medium="true"></unifi-loading-status><table id="knownClientsTable" collection-view-sort="knownClientListCtrl.view" ng-class="{          \'is-not-responsive\': !knownClientListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="clientName"><span translate="KNOWN_CLIENT_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="oui" class="clientManufacturer"><span translate="KNOWN_CLIENT_TABLE_HEADER_MANUFACTURER"></span></th><th collection-view-sort-by="is_guest" class="clientType"><span translate="KNOWN_CLIENT_TABLE_HEADER_USER_GUEST"></span></th><th collection-view-sort-by="tx_bytes" class="clientDown visible--lgUp"><span translate="KNOWN_CLIENT_TABLE_HEADER_DOWN"></span></th><th collection-view-sort-by="rx_bytes" class="clientUp visible--lgUp"><span translate="KNOWN_CLIENT_TABLE_HEADER_UP"></span></th><th collection-view-sort-by="last_seen" class="clientLastSeen visible--mdUp"><span translate="KNOWN_CLIENT_TABLE_HEADER_LAST_SEEN"></span></th><th unifi-if-role-admin colspan="2" class="clientActions"><span translate="KNOWN_CLIENT_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tfoot ng-if="knownClientListCtrl.view.getModels().length"><tr><td colspan="7"><unifi-list-pagination unifi-list-pagination-current-page="knownClientListCtrl.currentPage" unifi-list-pagination-rows-per-page="knownClientListCtrl.rowsPerPage" unifi-list-pagination-total-rows="knownClientListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in knownClientListCtrl.view.getModels(),              startFrom (knownClientListCtrl.currentPage - 1) * knownClientListCtrl.rowsPerPage,              limitTo knownClientListCtrl.rowsPerPage" data-id="{{::model.id}}" data-is-wired="{{::model.get(\'is_wired\')}}" data-is-guest="{{::model.get(\'is_guest\')}}" data-is-blocked="{{::model.get(\'blocked\')}}" data-is-noted="{{::model.get(\'noted\')}}" data-is-static-ip="{{::model.get(\'use_fixedip\')}}" ng-class="{\'is-row-disabled\': model.get(\'blocked\')}" unifi-open-panel="model" unifi-open-panel-active-tab="\'details\'" class="clickable"><td ng-attr-title="{{::model.get(\'mac\')}}" class="clientName">{{::model.getDisplayName()}}</td><td class="clientManufacturer">{{::model.get(\'oui\')}}</td><td class="clientType">{{::(model.get(\'is_guest\') ? \'KNOWN_CLIENT_TABLE_VALUE_USER_GUEST_GUEST\' : \'KNOWN_CLIENT_TABLE_VALUE_USER_GUEST_USER\') | translate}}</td><td class="clientDown visible--lgUp">{{::model.get(\'tx_bytes\') | bytes}}</td><td class="clientUp visible--lgUp">{{::model.get(\'rx_bytes\') | bytes}}</td><td class="clientLastSeen visible--mdUp">{{::model.get(\'last_seen\') * 1000 | moment: \'format\': \'datetime\'}}</td><td unifi-if-role-admin colspan="2" class="clientActions appTableCell--actions"><button unifi-client-button-block="::model" unifi-client-button-block-is-labeled="true" unifi-client-button-block-is-responsive="knownClientListCtrl.isResponsive()" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button></td></tr></tbody></table><div ng-if="!knownClientListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="KNOWN_CLIENT_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!knownClientListCtrl.isFiltered()" translate="KNOWN_CLIENT_TABLE_EMPTY_NO_CLIENTS" class="noMarginBottom"></p><p ng-if="knownClientListCtrl.isFiltered()" translate="KNOWN_CLIENT_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],604:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiKnownClientList",["PaginatedListDirective",function(b){return new b("knownClient",a("./knownClientList.jade")())}])},{"./knownClientList.jade":603}],605:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div unifi-repeatable-form unifi-repeatable-form-min="min" unifi-repeatable-form-max="max" unifi-repeatable-form-model="model" unifi-repeatable-form-attrs="[\'radius_acct_ip_{key}\', \'radius_acct_port_{key}\', \'x_radius_acct_secret_{key}\']" unifi-repeatable-form-is-read-only="isReadOnly" class="appFormGroup"><div ng-repeat="i in repeatableFormCtrl.getOptions() track by $index" class="radiusAcctServer appInputGroup appInputGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAcctServerIp{{$index}}" translate="RADIUS_SERVER_FORM_LABEL_IP_ADDRESS"></label><input type="text" name="radiusAcctServerIp{{$index}}" id="radiusAcctServerIp{{$index}}" size="16" ng-model="repeatableFormCtrl.model.attributes[\'radius_acct_ip_\' + ($index + 1)]" ng-pattern="patterns.ipAddress" ng-required="isRequired"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAcctServerPort{{$index}}" translate="RADIUS_SERVER_FORM_LABEL_PORT"></label><input type="text" name="radiusAcctServerPort{{$index}}" id="radiusAcctServerPort{{$index}}" size="5" ng-init="repeatableFormCtrl.model.attributes[\'radius_acct_port_\' + ($index + 1)] = repeatableFormCtrl.model.attributes[\'radius_acct_port_\' + ($index + 1)] || 1813" ng-model="repeatableFormCtrl.model.attributes[\'radius_acct_port_\' + ($index + 1)]" ng-pattern="patterns.portNumber" ng-required="isRequired"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAcctServerPassword{{$index}}" translate="RADIUS_SERVER_FORM_LABEL_PASSWORD"></label><input type="password" name="radiusAcctServerPassword{{$index}}" id="radiusAcctServerPassword{{$index}}" size="16" ng-model="repeatableFormCtrl.model.attributes[\'x_radius_acct_secret_\' + ($index + 1)]" ng-required="isRequired" unifi-password-reveal></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-if="!repeatableFormCtrl.isReadOnly" ng-click="repeatableFormCtrl.removeItem($index + 1)" ng-disabled="!repeatableFormCtrl.isRemoveAllowed()" title="{{\'RADIUS_SERVER_FORM_ACTION_REMOVE_ACCOUNTING_SERVER\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeAcctServer"><span class="button__icon icon ubnt-icon--x"></span></button></div></div><div ng-if="!repeatableFormCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableFormCtrl.addItem()" ng-disabled="!repeatableFormCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addAcctServer"><span class="button__icon icon ubnt-icon--plus"></span><span translate="RADIUS_SERVER_FORM_ACTION_ADD_ACCOUNTING_SERVER"></span></button></div></div>'),b.join("")}},{"jade/runtime":232}],606:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiLegacyRadiusAcctServerFormGroup",["REGEX_PATTERNS",function(b){return{scope:{model:"=unifiLegacyRadiusAcctServerFormGroupModel",min:"=unifiLegacyRadiusAcctServerFormGroupMin",max:"=unifiLegacyRadiusAcctServerFormGroupMax",isRequired:"=unifiLegacyRadiusAcctServerFormGroupIsRequired",isReadOnly:"=unifiLegacyRadiusAcctServerFormGroupIsReadOnly"},template:a("./legacyRadiusAcctServerFormGroup.jade")(),link:function(a){a.patterns={ipAddress:b.IP_ADDRESS,portNumber:b.PORT_NUMBER}}}}])},{"./legacyRadiusAcctServerFormGroup.jade":605}],607:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div unifi-repeatable-form unifi-repeatable-form-min="min" unifi-repeatable-form-max="max" unifi-repeatable-form-model="model" unifi-repeatable-form-attrs="[\'radius_ip_{key}\', \'radius_port_{key}\', \'x_radius_secret_{key}\']" unifi-repeatable-form-is-read-only="isReadOnly" class="appFormGroup"><div ng-repeat="i in repeatableFormCtrl.getOptions() track by $index" class="radiusAuthServer appInputGroup appInputGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAuthServerIp{{$index}}" translate="RADIUS_SERVER_FORM_LABEL_IP_ADDRESS"></label><input type="text" name="radiusAuthServerIp{{$index}}" id="radiusAuthServerIp{{$index}}" size="16" ng-model="repeatableFormCtrl.model.attributes[\'radius_ip_\' + ($index + 1)]" ng-pattern="patterns.ipAddress" ng-required="isRequired"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAuthServerPort{{$index}}" translate="RADIUS_SERVER_FORM_LABEL_PORT"></label><input type="text" name="radiusAuthServerPort{{$index}}" id="radiusAuthServerPort{{$index}}" size="5" ng-init="repeatableFormCtrl.model.attributes[\'radius_port_\' + ($index + 1)] = repeatableFormCtrl.model.attributes[\'radius_port_\' + ($index + 1)] || 1812" ng-model="repeatableFormCtrl.model.attributes[\'radius_port_\' + ($index + 1)]" ng-pattern="patterns.portNumber" ng-required="isRequired"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAuthServerPassword{{$index}}" translate="RADIUS_SERVER_FORM_LABEL_PASSWORD"></label><input type="password" name="radiusAuthServerPassword{{$index}}" id="radiusAuthServerPassword{{$index}}" size="16" ng-model="repeatableFormCtrl.model.attributes[\'x_radius_secret_\' + ($index + 1)]" ng-required="isRequired" unifi-password-reveal></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-if="!repeatableFormCtrl.isReadOnly" ng-click="repeatableFormCtrl.removeItem($index + 1)" ng-disabled="!repeatableFormCtrl.isRemoveAllowed()" title="{{\'RADIUS_SERVER_FORM_ACTION_REMOVE_AUTH_SERVER\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeAuthServer"><span class="button__icon icon ubnt-icon--x"></span></button></div></div><div ng-if="!repeatableFormCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableFormCtrl.addItem()" ng-disabled="!repeatableFormCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addAuthServer"><span class="button__icon icon ubnt-icon--plus"></span><span translate="RADIUS_SERVER_FORM_ACTION_ADD_AUTH_SERVER"></span></button></div></div>'),b.join("")}},{"jade/runtime":232}],608:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiLegacyRadiusAuthServerFormGroup",["REGEX_PATTERNS",function(b){return{scope:{model:"=unifiLegacyRadiusAuthServerFormGroupModel",min:"=unifiLegacyRadiusAuthServerFormGroupMin",max:"=unifiLegacyRadiusAuthServerFormGroupMax",isRequired:"=unifiLegacyRadiusAuthServerFormGroupIsRequired",isReadOnly:"=unifiLegacyRadiusAuthServerFormGroupIsReadOnly"},template:a("./legacyRadiusAuthServerFormGroup.jade")(),link:function(a){a.patterns={ipAddress:b.IP_ADDRESS,portNumber:b.PORT_NUMBER}}}}])},{"./legacyRadiusAuthServerFormGroup.jade":607}],609:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appTooltipContainer appTooltipContainer--hoverable noLineHeight fullWidth"><div class="statusBar appStatusBar appStatusBar--small {{statusBarClass}}"><div ng-style="{\'width\': percentage + \'%\'}" class="statusBar__inner"></div></div><div ng-if="!!label" class="appTooltip appTooltip--brief appTooltip--bottom">{{label}}</div></div>'),b.join("")}},{"jade/runtime":232}],610:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiLinkUsage",["$translate",function(b){return{template:a("./linkUsage.jade")(),scope:{usage:"=unifiLinkUsage",thresholds:"=?unifiLinkUsageThresholds",labelKey:"@?unifiLinkUsageLabelKey",statusBarClass:"@?unifiLinkUsageStatusBarClass"},link:function(a){var c=a.thresholds||[100,90,80,70,60,50,40,30,20,10,0];a.updateLevel=function(d){var e=0;if(c.forEach(function(a){a>=d&&(e=a)}),a.percentage=Math.ceil(e/Math.max.apply(Math,c)*100),a.labelKey){var f=Math.ceil(d/Math.max.apply(Math,c)*100*10)/10;a.label=b.instant(a.labelKey,{percentage:f})}},a.$watch("usage",function(b){a.updateLevel(b)})}}}])},{"./linkUsage.jade":609}],611:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiMacAddress",["macAddressFormatter",function(a){return{restrict:"A",require:"ngModel",scope:{},link:function(b,c,d,e){e.$formatters.push(a.toCanonical),e.$parsers.push(function(a){return a.toLowerCase()}),c.on("input",function(){var d=a.toCanonical(c.val());void 0!==d&&(e.$setViewValue(d),e.$render()),b.$apply()})}}}])},{}],612:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h){this.deviceRadioUtils=a,this.frame=b,this.maps=c,this.mapFeatures=d,this.mapUtils=e,this.MAP_DEFAULTS=f,this.MAP_FEATURES=g,this.RADIO_TYPES=h,this.RECEIVER_SENSITIVITY_DEFAULTS={MIN:-90,MAX:-60},this.filterGroups=[{id:"deviceFilter",translationKey:"MAP_DEVICES_FILTER_TITLE",allowMultiple:!0,excludeFromSummary:!0,items:[{id:"2g",translationKey:"MAP_DEVICES_2G",getCount:function(){return this.mapUtils.getPlacedDevicesForSelectedMap().filter(function(a){return this.deviceRadioUtils.hasRadioType(a,this.RADIO_TYPES.NG.type)},this).length}.bind(this),isSelected:function(){return this.mapFeatures.getDeviceFilter()===this.RADIO_TYPES.NG}.bind(this),onSelect:function(){this.mapFeatures.toggleDeviceFilter(this.RADIO_TYPES.NG)}.bind(this)},{id:"5g",translationKey:"MAP_DEVICES_5G",getCount:function(){return this.mapUtils.getPlacedDevicesForSelectedMap().filter(function(a){return this.deviceRadioUtils.hasRadioType(a,this.RADIO_TYPES.NA.type)},this).length}.bind(this),isSelected:function(){return this.mapFeatures.getDeviceFilter()===this.RADIO_TYPES.NA}.bind(this),onSelect:function(){this.mapFeatures.toggleDeviceFilter(this.RADIO_TYPES.NA)}.bind(this)}]},{id:"mapLayers",translationKey:"MAP_LAYERS",allowMultiple:!0,excludeFromSummary:!0,items:[{id:"coverage",translationKey:"MAP_FEATURE_COVERAGE",isSelected:function(){return this.mapFeatures.isEnabled(this.MAP_FEATURES.COVERAGE)}.bind(this),onSelect:function(){this.mapFeatures.toggle(this.MAP_FEATURES.COVERAGE)}.bind(this)},{id:"topology",translationKey:"MAP_FEATURE_TOPOLOGY",isSelected:function(){return this.mapFeatures.isEnabled(this.MAP_FEATURES.TOPOLOGY)}.bind(this),onSelect:function(){this.mapFeatures.toggle(this.MAP_FEATURES.TOPOLOGY)}.bind(this)}]},{id:"coverageType",translationKey:"MAP_FEATURE_COVERAGE_TYPE",excludeFromSummary:!0,isVisible:function(){return this.mapFeatures.isEnabled(this.MAP_FEATURES.COVERAGE)}.bind(this),items:[{id:"2g",translationKey:"MAP_FEATURE_COVERAGE_2G",isSelected:function(){return this.mapFeatures.getCoverageRadioType()===this.RADIO_TYPES.NG.type}.bind(this),onSelect:function(){this.mapFeatures.setCoverageRadioType(this.RADIO_TYPES.NG.type)}.bind(this)},{id:"5g",translationKey:"MAP_FEATURE_COVERAGE_5G",isSelected:function(){return this.mapFeatures.getCoverageRadioType()===this.RADIO_TYPES.NA.type}.bind(this),onSelect:function(){this.mapFeatures.setCoverageRadioType(this.RADIO_TYPES.NA.type)}.bind(this)}]}],this.selectedMap=this.mapUtils.getSelectedMap()}d.prototype.getReceiverSensitivity=function(){return this.mapFeatures.getReceiverSensitivity()},d.prototype.setReceiverSensitivity=function(a){this.mapFeatures.setReceiverSensitivity(a)},d.prototype.showConfigureMapsModal=function(){this.frame.show("configureMaps")},d.prototype.isCoverageEnabled=function(){return this.mapFeatures.isEnabled(this.MAP_FEATURES.COVERAGE)},d.$inject=["deviceRadioUtils","frame","maps","mapFeatures","mapUtils","MAP_DEFAULTS","MAP_FEATURES","RADIO_TYPES"],angular.module("app-unifi-manage").controller("MapActionBarController",d)},{}],613:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="mapActionBarCtrl.MAP_DEFAULTS.STATES"></unifi-state-switcher></div><div class="appActionBarFilter"><unifi-select-simple-dropdown-list style="width: 190px" unifi-select-simple-dropdown-list-collection="mapActionBarCtrl.maps.repository.collection" unifi-select-simple-dropdown-list-selected-model="mapActionBarCtrl.selectedMap" unifi-select-simple-dropdown-list-render-label="mapActionBarCtrl.selectedMap.get(\'name\')" unifi-select-simple-dropdown-list-row-template="\'selectedMap\'" unifi-select-simple-dropdown-list-inject-filter="\'MapFilter\'" unifi-select-simple-dropdown-list-default-sort-by="\'name\'" unifi-select-simple-dropdown-list-default-sort-desc="false" unifi-select-simple-dropdown-list-search-placeholder="\'MAP_SELECT_DROPDOWN_SEARCH_PLACEHOLDER\'" unifi-select-simple-dropdown-list-empty-table-notice="\'MAP_SELECT_DROPDOWN_TABLE_EMPTY\'" unifi-select-simple-dropdown-list-local-state="true" unifi-select-simple-dropdown-list-local-state-key="\'select-map\'" unifi-select-simple-dropdown-list-local-state-is-temporary="true" unifi-select-simple-dropdown-list-is-cozy="true" unifi-select-simple-dropdown-list-no-clear="true" unifi-select-simple-dropdown-list-on-select="mapActionBarCtrl.mapUtils.changeMap(model); statsRecentActivitiesCtrl.selectedMap = undefined"></unifi-select-simple-dropdown-list></div><div class="appActionBarFilter"><div class="buttonGroup buttonGroup--shrink appMainButtonGroup appMainButtonGroup--filter appMainButtonGroup--cozy"><div ng-click="mapActionBarCtrl.mapFeatures.nextLabelType()" class="button appMainButton appMainButton--cozy is-button-selected">{{\'MAP_LABELS\' | translate}}: {{mapActionBarCtrl.mapFeatures.getLabelType() | translate}}</div></div></div><unifi-ui-list-filter-buttons unifi-ui-list-filter-buttons-config="mapActionBarCtrl.filterGroups" class="visibleAdjusted--lgUp"></unifi-ui-list-filter-buttons><unifi-ui-list-filter-dropdown unifi-ui-list-filter-dropdown-config="mapActionBarCtrl.filterGroups" unifi-ui-list-filter-dropdown-filter-by-all-label="{{\'MAP_FEATURES\' | translate}}" class="visibleAdjusted--mdDown"></unifi-ui-list-filter-dropdown><div ng-show="mapActionBarCtrl.isCoverageEnabled()" class="appActionBarFilter"><form class="appForm appForm--cozy"><div class="appIconInput appIconInput--right"><input name="receiverSensitivity" type="number" min="{{mapActionBarCtrl.RECEIVER_SENSITIVITY_DEFAULTS.MIN}}" max="{{mapActionBarCtrl.RECEIVER_SENSITIVITY_DEFAULTS.MAX}}" ng-model="receiverSensitivity" required ng-attr-title="{{\'MAP_FEATURE_COVERAGE_RECEIVER_SENSITIVITY\' | translate}}" class="appIconInput__input unifiMapActionBarIconInput__receiverSensitivity"><div class="appIconInput__icon">{{\'DEVICE_RADIO_TRANSMIT_POWER_DBM\' | translate}}</div></div><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appActionBarFilter__tooltipContainer--cozy visibleAdjusted--mdUp"><div class="appTooltip appTooltip--brief appTooltip--bottom">{{\'MAP_FEATURE_COVERAGE_RECEIVER_SENSITIVITY_HINT\' | translate}}</div></div></form></div></div></div><div unifi-if-role-admin class="appActionBar__right"><button ng-click="mapActionBarCtrl.showConfigureMapsModal()" on-outside-element-click="mapActionBarCtrl.hideConfigureMapsModal()" title="{{\'MAP_CONFIGURE_MAPS\' | translate}}" class="appMainButton appMainButton--primary appMainButton--cozy appMainButton--iconOnly visibleAdjusted--xs"><span class="icon ubnt-icon--gear-2"></span></button><button ng-click="mapActionBarCtrl.showConfigureMapsModal()" on-outside-element-click="mapActionBarCtrl.hideConfigureMapsModal()" class="appMainButton appMainButton--primary appMainButton--cozy visibleAdjusted--smUp"><span class="button__icon icon ubnt-icon--gear-2"></span><span translate="MAP_CONFIGURE_MAPS"></span></button></div></div></div>'),
b.join("")}},{"jade/runtime":232}],614:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiMapActionBar",[function(){return{restrict:"E",controller:"MapActionBarController",controllerAs:"mapActionBarCtrl",template:a("./mapActionBar.jade")(),replace:!0,scope:{},link:function(a,b,c,d){a.receiverSensitivity=d.getReceiverSensitivity(),a.$watch("receiverSensitivity",function(a){d.setReceiverSensitivity(a)})}}}])},{"./mapActionBar.jade":613}],615:[function(a,b,c){"use strict";function d(a,b,c,d){this.mapDevices=b,this.mapUtils=c,this.mapCoordinatesAssistant=d,this.selectedMap=c.getSelectedMap(),this.getDeviceModel=a.getDeviceModel.bind(a),e.call(this)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.checkUnplacedDevicesVisibility=function(){0===this.unplacedDevices.length&&(this.showUnplacedDevices=!1)},d.prototype.toggleUnplacedDevicesList=function(){this.showUnplacedDevices=!this.showUnplacedDevices},d.prototype.onCollectionChange=function(){this.unplacedDevices=this.mapDevices.getUnplacedDevices().sort(function(a,b){return a.getDisplayName()>b.getDisplayName()}),this.checkUnplacedDevicesVisibility()},d.prototype.placeDevice=function(a,b){b.latlng?this.mapCoordinatesAssistant.getAssistantForMap(this.selectedMap).then(function(c){this.mapDevices.placeDevice(this.selectedMap,a,c.latLngToCoords(b.latlng))}.bind(this)):b.coords&&this.mapDevices.placeDevice(this.selectedMap,a,b.coords)},d.$inject=["deviceStateUtils","mapDevices","mapUtils","mapCoordinatesAssistant"],angular.module("app-unifi-manage").controller("MapEditPanelController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],616:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiMapCustomControls appPopoverContainer appGlobalSideNavTooltipContainer appPopoverContainer"><a href="javascript:void(0)" ng-click="mapEditPanelCtrl.unplacedDevices.length &gt; 0 &amp;&amp; mapEditPanelCtrl.toggleUnplacedDevicesList()" ng-disabled="mapEditPanelCtrl.unplacedDevices.length === 0" class="unifiMapCustomControls__control"><div class="unifiMapCustomControls__icon icon ubnt-icon--list-unordered"></div><div ng-show="mapEditPanelCtrl.unplacedDevices.length &gt; 0" class="unifiMapCustomControls__count count count--round appCount"><div class="count__value">{{mapEditPanelCtrl.unplacedDevices.length}}</div></div></a><div ng-if="mapEditPanelCtrl.showUnplacedDevices" unifi-stop-event="drop" class="appPopover appPopover--withHeader appPopover--rightDown appPopover--closeable unifiMapCustomControls__editPanel"><div class="appPopover__inner"><div ng-click="mapEditPanelCtrl.toggleUnplacedDevicesList()" class="appPopover__close"><div class="icon ubnt-icon--x"></div></div><div class="appPopover__header">{{\'MAP_UNPLACED_DEVICES\' | translate}} ({{mapEditPanelCtrl.unplacedDevices.length}})</div><div class="appPopover__section"><p class="appType--quiet noMarginBottom">{{\'MAP_UNPLACED_DEVICES_HINT\' | translate}}</p></div><ul class="unifiMapUnplacedDevices appMenu appMenu--scrollable appMenu--clickable appMenu--complex"><li ng-repeat="device in mapEditPanelCtrl.unplacedDevices track by device.id" event-draggable="true" event-draggable-on-drop="mapEditPanelCtrl.placeDevice(device, options)" event-draggable-icon-id="{{device.id}}" class="unifiMapUnplacedDevicesItem appMenu__item"><div class="unifiMapUnplacedDevicesItem__deviceIcon"><div unifi-device-icon="device" event-draggable-icon="{{device.id}}" event-draggable-icon-xoffset="20" event-draggable-icon-yoffset="20" class="unifiDeviceMarker__icon"></div></div><div class="unifiMapUnplacedDevicesItem__label"><h5 class="noMarginBottom">{{device.getDisplayName()}}</h5><p class="appType--quiet noMarginBottom">{{mapEditPanelCtrl.getDeviceModel(device)}}</p></div><div class="icon ubnt-icon--arrows-updown-leftright"></div></li></ul></div></div></div>'),b.join("")}},{"jade/runtime":232}],617:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiMapEditPanel",["devices",function(b){return{replace:!0,controller:"MapEditPanelController",controllerAs:"mapEditPanelCtrl",template:a("./mapEditPanel.jade")(),link:function(a,c,d,e){e.updateCollection(b.repository.collection),a.$on("$destroy",function(){e.removeEventHandlers()})}}}])},{"./mapEditPanel.jade":616}],618:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.EmptyMapType=f,this.mapCoordinatesAssistant=a,this.mapDevices=b,this.mapFeatures=c,this.mapUtils=d,this.ImageOverlay=g,this.selectedMap=d.getSelectedMap(),this.$window=i,this.APP_EVENTS=j,this.MAP_FEATURES=l,this.MAP_DEFAULTS=k,this.MAP_UNITS=m,this.deferred=h.defer(),this.initProperties(),this.init(),e.call(this)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initProperties=function(){this.imageBounds=void 0,this.center=[this.selectedMap.get("lat")||0,this.selectedMap.get("lng")||0],this.mapOptions={scaleControl:!0,zoom:this.selectedMap.get("zoom")||10},this.selectedMap.isGoogleMap()?(angular.extend(this.mapOptions,{mapTypeId:this.selectedMap.get("mapTypeId"),maxZoom:20,minZoom:3}),this.searchBoxValue=""):angular.extend(this.mapOptions,{backgroundColor:"ffffff",mapTypeId:this.MAP_DEFAULTS.EMPTY_MAP_TYPE,maxZoom:30})},d.prototype.init=function(){this.mapDivAvailable=!0,this.getMap().then(function(a){this.mapDivAvailable=!!a.getDiv(),a.mapTypes.set(this.MAP_DEFAULTS.EMPTY_MAP_TYPE,new this.EmptyMapType),this.getAssistant()}.bind(this)),this.mapLoaded=function(a){this.deferred.resolve(a)}.bind(this),this.getAssistant=function(){this.mapCoordinatesAssistant.getAssistantForMap(this.selectedMap).then(function(a){this.assistant=a,this.selectedMap.isImageMap()&&this.getMap().then(function(a){this.addImageOverlay(a)}.bind(this)),this.calculateCenter()}.bind(this))},this.updateMapModel=function(a){if(this.assistant){var b=this.assistant.normalizeZoomToV4(a.zoom),c={lat:a.center[0],lng:a.center[1],zoom:b};this.selectedMap.isGoogleMap()&&(c.mapTypeId=a.mapTypeId),this.selectedMap.set(c),this.selectedMap.savePartial(c)}}.bind(this),this.limitPanning=function(){this.imageBounds&&this.getMap().then(function(a){var b=this.mapUtils.trimPointToBounds(a.getCenter(),this.imageBounds);b.equals(a.getCenter())||a.panTo(b)}.bind(this))}.bind(this),this.selectedMap.on(this.MAP_DEFAULTS.MAP_EDITED_EVENT,function(){this.getMap().then(function(a){this.refresh(a)}.bind(this))}.bind(this))},d.prototype.mapLoaded=function(a){this.deferred.resolve(a)},d.prototype.getMap=function(){return this.deferred.promise},d.prototype.removeImageOverlay=function(){this.overlay&&(this.overlay.setMap(void 0),this.overlay=void 0)},d.prototype.refresh=function(a){this.initProperties(),this.removeImageOverlay(),a.setCenter({lat:this.center[0],lng:this.center[1]}),a.setOptions({minZoom:this.mapOptions.minZoom,maxZoom:this.mapOptions.maxZoom}),a.setZoom(this.mapOptions.zoom),a.setMapTypeId(this.mapOptions.mapTypeId),this.getAssistant()},d.prototype.calculateCenter=function(){var a=this.selectedMap,b=void 0!==a.get("lat")&&void 0!==a.get("lng");a.isImageMap()&&!b&&(this.center=[this.assistant.bounds[0].lat()/2,this.assistant.bounds[1].lng()/2])},d.prototype.addImageOverlay=function(a){this.assistant.preferredZoom&&(this.mapOptions.zoom=this.assistant.normalizeZoomToGoogleMap(this.selectedMap.get("zoom")),a.setOptions({minZoom:null,maxZoom:null}),a.setZoom(this.mapOptions.zoom),this.mapOptions.minZoom=this.assistant.preferredZoom+this.MAP_DEFAULTS.MIN_ZOOM_OFFSET,this.mapOptions.minZoom<0&&(this.mapOptions.minZoom=0),this.mapOptions.maxZoom=this.assistant.preferredZoom+this.MAP_DEFAULTS.MAX_ZOOM_OFFSET,a.setOptions({minZoom:this.mapOptions.minZoom,maxZoom:this.mapOptions.maxZoom})),this.removeImageOverlay(),this.imageBounds=new this.$window.google.maps.LatLngBounds(this.assistant.bounds[0],this.assistant.bounds[1]),this.ImageOverlay.then(function(b){this.overlay=new b(this.imageBounds,this.assistant.imageUrl),this.overlay.setMap(a)}.bind(this))},d.prototype.onCollectionChange=function(){this.placedDevices=this.mapDevices.getPlacedDevices(this.selectedMap)},d.prototype.onImageScaleChange=function(a,b,c){var d=this.selectedMap.get("unit")||this.MAP_UNITS.METER,e={};e[this.MAP_UNITS.METER]=1,e[this.MAP_UNITS.FOOT]=this.MAP_DEFAULTS.FEET_TO_METERS_RATIO;var f=new this.$window.google.maps.LatLng(0,0),g=this.assistant.bounds[1],h=this.$window.google.maps.geometry.spherical.computeDistanceBetween(f,g),i=a*h/(b*this.assistant.imageSize.width);i*=e[d]/e[c]*10;var j={upp:i,unit:c};this.assistant.updateParams(j),this.selectedMap.set(j),this.getMap().then(function(a){this.addImageOverlay(a)}.bind(this)),this.center=[this.assistant.bounds[0].lat()/2,this.assistant.bounds[1].lng()/2],this.selectedMap.savePartial(j)},d.prototype.onSearchBoxChange=function(a){var b=this.mapUtils.getGoogleMapPlaceParams(a);b&&(this.center=b.center,this.bounds=b.bounds)},d.prototype.isCoverageEnabled=function(){return this.mapFeatures.isEnabled(this.MAP_FEATURES.COVERAGE)},d.prototype.isTopologyEnabled=function(){return this.mapFeatures.isEnabled(this.MAP_FEATURES.TOPOLOGY)},d.prototype.getCoverageRadioType=function(){return this.mapFeatures.getCoverageRadioType()},d.prototype.getCoverageReceiverSensitivity=function(){return this.mapFeatures.getReceiverSensitivity()},d.$inject=["mapCoordinatesAssistant","mapDevices","mapFeatures","mapUtils","EmptyMapType","ImageOverlay","$q","$window","APP_EVENTS","MAP_DEFAULTS","MAP_FEATURES","MAP_UNITS"],angular.module("app-unifi-manage").controller("MapGoogleController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],619:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="map" class="unifiMapContainer positionRelative"><div ng-if="!mapGoogleCtrl.mapDivAvailable" unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox appInfoBox--cozy appInfoBox--centered"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="MAP_API_INIT_FAILURE_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="MAP_API_INIT_FAILURE_MESSAGE" translate-values="{state: \'manage.site.settings.controller\'}" translate-compile class="noMarginBottom"></p></div></div></div><div ng-show="mapGoogleCtrl.mapDivAvailable" atlas-map atlas-map-disable-default-ui atlas-map-center="mapGoogleCtrl.center" atlas-map-options="mapGoogleCtrl.mapOptions" unifi-atlas-dropzone="map" atlas-map-on-load="mapGoogleCtrl.mapLoaded" unifi-atlas-map-resize-on="[mapGoogleCtrl.APP_EVENTS.PROPERTY_PANEL_OPEN, mapGoogleCtrl.APP_EVENTS.PROPERTY_PANEL_CLOSE]" class="unifiMap"><div atlas-controls atlas-controls-position="\'TOP_LEFT\'" class="atlas-control-container"><unifi-map-menu></unifi-map-menu><unifi-google-image-map-ruler unifi-if-role-admin unifi-if-role-admin-and="!mapGoogleCtrl.selectedMap.isGoogleMap()" scale-set-handler="mapGoogleCtrl.onImageScaleChange(newDistance, oldDistance, newUnit)"></unifi-google-image-map-ruler></div><div unifi-atlas-coverage unifi-atlas-coverage-enabled="mapGoogleCtrl.isCoverageEnabled()" unifi-atlas-coverage-radio-type="mapGoogleCtrl.getCoverageRadioType()" unifi-atlas-coverage-receiver-sensitivity="mapGoogleCtrl.getCoverageReceiverSensitivity()"></div><unifi-topology ng-if="mapGoogleCtrl.isTopologyEnabled()"></unifi-topology><unifi-map-type-switcher ng-if="mapGoogleCtrl.selectedMap.isGoogleMap()"></unifi-map-type-switcher><unifi-atlas-event-handler event="idle" handler="mapGoogleCtrl.limitPanning"></unifi-atlas-event-handler><unifi-atlas-event-handler event="dragend" handler="mapGoogleCtrl.limitPanning"></unifi-atlas-event-handler><unifi-atlas-event-handler unifi-if-role-admin event="idle" handler="mapGoogleCtrl.updateMapModel"></unifi-atlas-event-handler><unifi-atlas-event-handler unifi-if-role-admin event="maptypeid_changed" handler="mapGoogleCtrl.updateMapModel"></unifi-atlas-event-handler><div atlas-controls atlas-controls-position="\'TOP_LEFT\'" ng-if="mapGoogleCtrl.selectedMap.isGoogleMap()" class="atlas-control-container"><div class="appInputGroup unifiMapSearch"><div class="appIconInput appIconInput--right"><div ng-show="!mapGoogleCtrl.searchBoxValue" class="appIconInput__icon icon ubnt-icon--search-2"></div><div unifi-map-google-clear-search unifi-map-google-clear-search-input="mapGoogleCtrl.searchBoxValue" class="appIconInput__clearSearch"></div><input atlas-search-box atlas-search-box-bounds="mapGoogleCtrl.bounds" atlas-search-box-change="mapGoogleCtrl.onSearchBoxChange(places)" placeholder="{{\'MAP_GOOGLE_SEARCH_PLACEHOLDER\' | translate}}" type="text" ng-model="mapGoogleCtrl.searchBoxValue" class="appIconInput__input unifiMapSearch__searchBox"></div></div></div><div ng-if="mapGoogleCtrl.assistant" ng-repeat="device in mapGoogleCtrl.placedDevices | filter: mapGoogleCtrl.mapFeatures.filterDevice track by device.id"><unifi-device-marker unifi-device="device"></unifi-device-marker></div></div></div>'),b.join("")}},{"jade/runtime":232}],620:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiMapGoogle",["devices",function(b){return{restrict:"E",controller:"MapGoogleController",controllerAs:"mapGoogleCtrl",template:a("./mapGoogle.jade")(),replace:!0,link:function(a,c,d,e){e.updateCollection(b.repository.collection),a.$on("$destroy",function(){e.removeEventHandlers()})}}}])},{"./mapGoogle.jade":619}],621:[function(a,b,c){"use strict";function d(){}d.prototype.clear=function(){this.searchInput=""},d.$inject=[],angular.module("app-unifi-manage").controller("MapGoogleClearSearchController",d)},{}],622:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<button ng-click="mapGoogleClearSearchCtrl.clear()" ng-show="mapGoogleClearSearchCtrl.searchInput" class="icon appIconInput__icon ubnt-icon--x-circle unifiMapSearch__clearIcon"></button>'),b.join("")}},{"jade/runtime":232}],623:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiMapGoogleClearSearch",[function(){return{controller:"MapGoogleClearSearchController",controllerAs:"mapGoogleClearSearchCtrl",template:a("./mapGoogleClearSearch.jade")(),scope:{searchInput:"=unifiMapGoogleClearSearchInput"},bindToController:!0}}])},{"./mapGoogleClearSearch.jade":622}],624:[function(a,b,c){"use strict";function d(a,b){this.mapFeatures=a,this.MAP_FEATURES=b}d.$inject=["mapFeatures","MAP_FEATURES"],angular.module("app-unifi-manage").controller("MapMenuController",d)},{}],625:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="atlas-control-container"><div class="unifiMapCustomControls"><a href="javascript:void(0)" atlas-controls-zoom="\'in\'" class="unifiMapCustomControls__control unifiMapCustomControls__control--small unifiMapCustomControls__groupedItem"><div class="unifiMapCustomControls__icon icon ubnt-icon--plus"></div></a><a href="javascript:void(0)" atlas-controls-zoom="\'out\'" class="unifiMapCustomControls__control unifiMapCustomControls__control--small unifiMapCustomControls__groupedItem"><div class="unifiMapCustomControls__icon icon ubnt-icon--minus"></div></a></div><div class="unifiMapCustomControls"><a href="javascript:void(0)" ng-class="{\'unifiMapCustomControls__control--small\': mapMenuCtrl.mapFeatures.isEnabled(mapMenuCtrl.MAP_FEATURES.SMALL_ICONS)}" ng-click="mapMenuCtrl.mapFeatures.toggle(mapMenuCtrl.MAP_FEATURES.SMALL_ICONS)" class="unifiMapCustomControls__control unifiMapCustomControls__groupedItem"><div class="unifiMapCustomControls__icon icon ubnt-icon--ap2"></div></a></div><unifi-map-edit-panel unifi-if-role-admin></unifi-map-edit-panel></div>'),b.join("")}},{"jade/runtime":232}],626:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiMapMenu",[function(){return{replace:!0,controller:"MapMenuController",controllerAs:"mapMenuCtrl",template:a("./mapMenu.jade")()}}])},{"./mapMenu.jade":625}],627:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiMapTypeSwitcher",["atlas",function(a){return{require:["^atlasMap"],restrict:"E",scope:{},link:function(b,c,d,e){var f=e[0];a.getGoogleMaps().then(function(a){f.getMap().then(function(c){c.setValues({mapTypeControl:!0,mapTypeControlOptions:{style:a.MapTypeControlStyle.HORIZONTAL_BAR,position:a.ControlPosition.RIGHT_TOP}}),b.$on("$destroy",function(){c.setValues({mapTypeControl:!1})})})})}}}])},{}],628:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.neighboringAccessPoints=d,this.INSIGHTS_DEFAULTS=h,this.RADIO_TYPES=i,this.filter=new g,this.comparator=f,this.defaultSortBy=this.hasRogueAps()?"is_rogue":"last_seen",this.defaultSortDesc=!0,this.expandedAps={},e.call(this,a,b,c)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.neighboringAccessPoints.repository.collection},d.prototype.initView=function(){e.prototype.initView.call(this),this.neighboringAccessPoints.repository.collection.on("add remove change reset",this.setFilterCounts,this),this.setFilterCounts()},d.prototype.destroyView=function(){e.prototype.destroyView.call(this),this.neighboringAccessPoints.repository.collection.off("add remove change reset",this.setFilterCounts,this)},d.prototype.initFilters=function(){var a=this.listState.getFilter("radioType");"all"===a?this.filter.clearRadioTypeFilter():this.filter.setRadioTypeFilter(a),this.isFiltered=this.filter.isFiltered.bind(this.filter),this.getRadioTypeFilter=this.filter.getRadioTypeFilter.bind(this.filter),this.hasRadioTypeFilter=this.filter.hasRadioTypeFilter.bind(this.filter)},d.prototype.toggleApDetails=function(a){var b=a.get("bssid");this.expandedAps[b]=!this.expandedAps[b]},d.prototype.isApDetailsExpanded=function(a){var b=a.get("bssid");return!!this.expandedAps[b]},d.prototype.clearRadioTypeFilter=function(){this.beginStateChange(),this.listState.removeFilter("radioType"),this.filter.clearRadioTypeFilter(),this.commitStateChange()},d.prototype.setRadioTypeFilter=function(a){this.beginStateChange(),this.listState.addFilter("radioType",a),this.filter.setRadioTypeFilter(a),this.commitStateChange()},d.prototype.setFilterCounts=function(){this.counts={all:this.neighboringAccessPoints.repository.collection.length,na:0,ng:0},this.neighboringAccessPoints.repository.collection.each(function(a){var b=a.get("radio");b===this.RADIO_TYPES.NA.type&&this.counts.na++,b===this.RADIO_TYPES.NG.type&&this.counts.ng++}.bind(this))},d.prototype.getWithin=function(){return this.neighboringAccessPoints.getWithin()},d.prototype.onUpdateWithin=function(a){this.listState.addFilter("within",a),this.neighboringAccessPoints.updateWithin(a),this.showLoader=!0,this.neighboringAccessPoints.repository.refresh().then(function(){this.showLoader=!1}.bind(this))},d.prototype.hasRogueAps=function(){return!!this.neighboringAccessPoints.repository.collection.find(function(a){return a.get("is_rogue")})},d.$inject=["$injector","CollectionView","preferences","neighboringAccessPoints","neighboringAccessPointsComparator","NeighboringAccessPointFilter","INSIGHTS_DEFAULTS","RADIO_TYPES"],angular.module("app-unifi-manage").controller("NeighboringAccessPointListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],629:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="neighboringAccessPointListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div><div class="appActionBarFilter"><unifi-time-filter-dropdown unifi-time-filter-dropdown-default-hours="neighboringAccessPointListCtrl.getWithin()" unifi-time-filter-dropdown-callback="neighboringAccessPointListCtrl.onUpdateWithin(hours)" unifi-time-filter-dropdown-values="[1, 8, 12, 24, 72, 168, 336, 720, 2880, 0]"></unifi-time-filter-dropdown></div><div class="appActionBarFilter"><ul class="buttonGroup buttonGroup--shrink appMainButtonGroup appMainButtonGroup--filter appMainButtonGroup--cozy"><li id="neighboringAccessPoints2g5gFilterAll" ng-click="neighboringAccessPointListCtrl.clearRadioTypeFilter()" ng-class="{\'is-button-selected\': !neighboringAccessPointListCtrl.hasRadioTypeFilter()}" class="button appMainButton appMainButton--cozy">{{\'NEIGHBORING_ACCESS_POINT_RADIO_TYPE_FILTER_ALL\' | translate}} ({{neighboringAccessPointListCtrl.counts.all}})</li><li id="neighboringAccessPoints2g5gFilter2g" ng-click="neighboringAccessPointListCtrl.setRadioTypeFilter(\'ng\')" ng-class="{\'is-button-selected\': neighboringAccessPointListCtrl.getRadioTypeFilter() === \'ng\'}" class="button appMainButton appMainButton--cozy">{{\'NEIGHBORING_ACCESS_POINT_RADIO_TYPE_FILTER_NG\' | translate}} ({{neighboringAccessPointListCtrl.counts.ng}})</li><li id="neighboringAccessPoints2g5gFilter5g" ng-click="neighboringAccessPointListCtrl.setRadioTypeFilter(\'na\')" ng-class="{\'is-button-selected\': neighboringAccessPointListCtrl.getRadioTypeFilter() === \'na\'}" class="button appMainButton appMainButton--cozy">{{\'NEIGHBORING_ACCESS_POINT_RADIO_TYPE_FILTER_NA\' | translate}} ({{neighboringAccessPointListCtrl.counts.na}})</li></ul></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="neighboringAccessPointListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="neighboringAccessPointListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><unifi-loading-status unifi-loading-status-is-loading="neighboringAccessPointListCtrl.neighboringAccessPoints.repository.collection.isLoading &amp;&amp; neighboringAccessPointListCtrl.showLoader" unifi-loading-status-is-medium="true"></unifi-loading-status><table id="neighboringAccessPointsTable" collection-view-sort="neighboringAccessPointListCtrl.view" ng-class="{          \'is-not-responsive\': !neighboringAccessPointListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" ng-init="hasRogueAps = neighboringAccessPointListCtrl.hasRogueAps()" class="appTable--verticalAlignTop verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th class="neighboringAccessPointExpand appTableCell--smash"></th><th collection-view-sort-by="aps_count" class="neighboringAccessPointBssidCount appTableCell--smash alignCenter"></th><th collection-view-sort-by="is_rogue" ng-if="hasRogueAps" class="neighboringAccessPointRogue appTableCell--smash"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_ROGUE"></span></th><th collection-view-sort-by="essid" class="neighboringAccessPointEssid"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_ESSID"></span></th><th collection-view-sort-by="bssid" class="neighboringAccessPointBssid visible--mdUp"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_BSSID"></span></th><th collection-view-sort-by="channel" class="neighboringAccessPointChannel"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_CHANNEL"></span></th><th collection-view-sort-by="bw" class="neighboringAccessPointBandwidth"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_BANDWIDTH" class="noTextTransform"></span></th><th collection-view-sort-by="security" class="neighboringAccessPointSecurity visible--lgUp"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_SECURITY"></span></th><th collection-view-sort-by="oui" class="neighboringAccessPointManufacturer visible--mdUp"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_MANUFACTURER"></span></th><th collection-view-sort-by="ap_mac" class="neighboringAccessPointLocation visible--mdUp"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_LOCATION"></span></th><th collection-view-sort-by="rssi" class="neighboringAccessPointSignal"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_SIGNAL"></span></th><th collection-view-sort-by="last_seen" class="neighboringAccessPointLastSeen visible--smUp"><span translate="NEIGHBORING_ACCESS_POINT_TABLE_HEADER_LAST_SEEN"></span></th></tr></thead><tfoot ng-if="neighboringAccessPointListCtrl.view.getModels().length"><tr><td colspan="8"><unifi-list-pagination unifi-list-pagination-current-page="neighboringAccessPointListCtrl.currentPage" unifi-list-pagination-rows-per-page="neighboringAccessPointListCtrl.rowsPerPage" unifi-list-pagination-total-rows="neighboringAccessPointListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in neighboringAccessPointListCtrl.view.getModels(),              startFrom (neighboringAccessPointListCtrl.currentPage - 1) * neighboringAccessPointListCtrl.rowsPerPage,              limitTo neighboringAccessPointListCtrl.rowsPerPage" data-id="{{::model.id}}"><td class="appTableCell--smash appTableCell--withSmallIcon"><span ng-if="model.isGrouped()"><div ng-click="neighboringAccessPointListCtrl.toggleApDetails(model)" class="appActionIcon"><span ng-class="{                            \'unifi-icon--default-collapse\': neighboringAccessPointListCtrl.isApDetailsExpanded(model),                            \'unifi-icon--default-expand\': !neighboringAccessPointListCtrl.isApDetailsExpanded(model)                          }" class="icon"></span></div></span></td><td class="appTableCell--smash"><div ng-class="{                      \'appCount--primary\': model.isGrouped(),                      \'appCount--static\': !model.isGrouped()                    }" class="count count--round appCount"><div class="count__value">{{model.get(\'aps\').length}}</div></div></td><td ng-if="hasRogueAps" class="wrappable appTableCell--smash neighboringAccessPointRogue alignCenter"><div ng-if="model.get(\'is_rogue\')" class="appTooltipContainer appTooltipContainer--hoverable"><div class="statusBall appStatusBall appStatusBall--danger"><div class="appTooltip appTooltip--bottomRight">{{"NEIGHBORING_ACCESS_POINT_TOOLTIP_ROGUE" | translate}}</div></div></div></td><td ng-class="{\'appType--dark\': !model.get(\'essid\')}" class="neighboringAccessPointEssid">{{::model.get(\'essid\') | essid}}</td><td class="neighboringAccessPointBssid visible--mdUp">{{::model.get(\'bssid\')}}</td><td class="neighboringAccessPointChannel">{{::model.get(\'channel\')}} ({{::model.get(\'radio\')}})</td><td class="neighboringAccessPointBandwidth"><span ng-if="model.get(\'bw\') &lt;= 0" ng-class="{\'appType--quiet\': model.get(\'bw\') &lt;= 0}">{{"DEVICE_PROPERTIES_VALUES_VERSION_NOT_AVAILABLE" | translate}}</span><span ng-if="model.get(\'bw\') &gt; 0">{{::model.get(\'bw\')}}</span></td><td class="neighboringAccessPointSecurity visible--lgUp"><span>{{::model.get(\'security\')}}</span><span ng-if="model.get(\'is_adhoc\')">&nbsp;({{ \'NEIGHBORING_ACCESS_POINT_AD_HOC\' | translate }})</span></td><td class="neighboringAccessPointManufacturer visible--mdUp">{{::model.get(\'oui\')}}</td><td class="neighboringAccessPointLocation visible--mdUp"><div ng-if="!neighboringAccessPointListCtrl.isApDetailsExpanded(model)">{{::model.get(\'ap_mac\') | neighboringApLocation:{isNearest:!!model.isGrouped()} }}</div><div ng-if="neighboringAccessPointListCtrl.isApDetailsExpanded(model)" ng-repeat="ap in model.get(\'aps\')" class="appDisplayEmptyLine">{{::ap.ap_mac | neighboringApLocation}}</div></td><td class="neighboringAccessPointSignal"><span ng-if="model.get(\'rssi\') &amp;&amp; !neighboringAccessPointListCtrl.isApDetailsExpanded(model)" ng-class="{\'appType--quiet\': model.get(\'rssi_age\') &gt; 60}">{{::model.get(\'rssi\') | rssi}} ({{::model.get(\'rssi\') | rssiToDbm}})</span><div ng-if="neighboringAccessPointListCtrl.isApDetailsExpanded(model)" ng-repeat="ap in model.get(\'aps\')" class="appDisplayEmptyLine"><span ng-if="ap.rssi" ng-class="{\'appType--quiet\': ap.rssi_age &gt; 60}">{{::ap.rssi | rssi}} ({{::ap.rssi | rssiToDbm}})</span></div></td><td class="neighboringAccessPointLastSeen visible--smUp"><span ng-if="!neighboringAccessPointListCtrl.isApDetailsExpanded(model)">{{::model.get(\'last_seen\') * 1000 | moment: \'format\': \'datetime\'}}</span><div ng-if="neighboringAccessPointListCtrl.isApDetailsExpanded(model)" ng-repeat="ap in model.get(\'aps\')" class="appDisplayEmptyLine">{{::ap.last_seen * 1000 | moment: \'format\': \'datetime\'}}</div></td></tr></tbody></table><div ng-if="!neighboringAccessPointListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="NEIGHBORING_ACCESS_POINT_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!neighboringAccessPointListCtrl.isFiltered()" translate="NEIGHBORING_ACCESS_POINT_TABLE_EMPTY_NO_APS" class="noMarginBottom"></p><p ng-if="neighboringAccessPointListCtrl.isFiltered()" translate="NEIGHBORING_ACCESS_POINT_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],630:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNeighboringAccessPointList",["PaginatedListDirective",function(b){return new b("neighboringAccessPoint",a("./neighboringAccessPointList.jade")())}])},{"./neighboringAccessPointList.jade":629}],631:[function(a,b,c){"use strict";function d(a){this.ipUtils=a}d.prototype.updateAttrs=function(a){var b=a?this.ipUtils.subnetToNetwork(a):void 0;b&&b.numIps>0?this.attrs={gatewayIp:b.ip,broadcastIp:this.ipUtils.long2ip(b.ipLongMax+1),ipCount:b.numIps,ipRangeMin:this.ipUtils.long2ip(b.ipLongMin),ipRangeMax:this.ipUtils.long2ip(b.ipLongMax),subnetMask:this.ipUtils.long2ip(b.netmask)}:this.attrs=void 0},d.$inject=["ipUtils"],angular.module("app-unifi-manage").controller("NetworkFormDetailsNetworkController",d)},{}],632:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<fieldset ng-if="networkFormDetailsNetworkCtrl.attrs" class="appFieldset appFieldset--quiet verticalRhythm--cozy"><div class="row verticalRhythm--condensed"><div class="col--sm2 col--smOffset3 col--xs7"><div translate="SETTINGS_NETWORK_LABEL_GATEWAY_IP" class="appLabel appLabel--primary"></div></div><div class="col--sm7 col--xs5"><span>{{networkFormDetailsNetworkCtrl.attrs.gatewayIp}}</span></div></div><div class="row verticalRhythm--condensed"><div class="col--sm2 col--smOffset3 col--xs7"><div translate="SETTINGS_NETWORK_LABEL_NETWORK_BROADCAST_IP" class="appLabel appLabel--primary"></div></div><div class="col--sm7 col--xs5"><span>{{networkFormDetailsNetworkCtrl.attrs.broadcastIp}}</span></div></div><div class="row verticalRhythm--condensed"><div class="col--sm2 col--smOffset3 col--xs7"><div translate="SETTINGS_NETWORK_LABEL_NETWORK_IP_COUNT" class="appLabel appLabel--primary"></div></div><div class="col--sm7 col--xs5"><span>{{networkFormDetailsNetworkCtrl.attrs.ipCount | numberToString}}</span></div></div><div class="row verticalRhythm--condensed"><div class="col--sm2 col--smOffset3 col--xs7"><div translate="SETTINGS_NETWORK_LABEL_NETWORK_IP_RANGE" class="appLabel appLabel--primary"></div></div><div class="col--sm7 col--xs5"><span>{{networkFormDetailsNetworkCtrl.attrs.ipRangeMin}} - {{networkFormDetailsNetworkCtrl.attrs.ipRangeMax}}</span></div></div><div class="row verticalRhythm--condensed"><div class="col--sm2 col--smOffset3 col--xs7"><div translate="SETTINGS_NETWORK_LABEL_NETWORK_SUBNET_MASK" class="appLabel appLabel--primary"></div></div><div class="col--sm7 col--xs5"><span>{{networkFormDetailsNetworkCtrl.attrs.subnetMask}}</span></div></div></fieldset>'),
b.join("")}},{"jade/runtime":232}],633:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkFormDetailsNetwork",[function(){return{scope:{subnet:"=unifiNetworkFormDetailsNetwork"},controller:"NetworkFormDetailsNetworkController",controllerAs:"networkFormDetailsNetworkCtrl",template:a("./networkFormDetailsNetwork.jade")(),link:function(a,b,c,d){a.$watch("subnet",function(a){d.updateAttrs(a)})}}}])},{"./networkFormDetailsNetwork.jade":632}],634:[function(a,b,c){"use strict";function d(a){this.networks=a}d.prototype.canAddRemoteUserVpn=function(){return!this.networks.repository.collection.findWhere({purpose:"remote-user-vpn"})},d.$inject=["networks"],angular.module("app-unifi-manage").controller("NetworkFormInputPurposeController",d)},{}],635:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkPurpose" id="networkPurposeCorporate" value="corporate" ng-model="networkFormInputPurposeCtrl.model.attributes.purpose" ng-disabled="!networkFormInputPurposeCtrl.model.isNew() &amp;&amp; networkFormInputPurposeCtrl.model.attributes.purpose !== \'corporate\'"><label for="networkPurposeCorporate" translate="SETTINGS_NETWORK_VALUES_PURPOSE_CORPORATE"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkPurpose" id="networkPurposeGuest" value="guest" ng-model="networkFormInputPurposeCtrl.model.attributes.purpose" ng-disabled="!networkFormInputPurposeCtrl.model.isNew() &amp;&amp; networkFormInputPurposeCtrl.model.attributes.purpose !== \'guest\'"><label for="networkPurposeGuest" translate="SETTINGS_NETWORK_VALUES_PURPOSE_GUEST"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkPurpose" id="networkPurposeVlanOnly" value="vlan-only" ng-model="networkFormInputPurposeCtrl.model.attributes.purpose" ng-disabled="!networkFormInputPurposeCtrl.model.isNew() &amp;&amp; networkFormInputPurposeCtrl.model.attributes.purpose !== \'vlan-only\'"><label for="networkPurposeVlanOnly" translate="SETTINGS_NETWORK_VALUES_PURPOSE_VLAN_ONLY"></label><span unifi-notify-device-requirement="usw" unifi-notify-device-requirement-is-dark="networkFormInputPurposeCtrl.isDark"></span></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkPurpose" id="networkPurposeRemoteUserVpn" value="remote-user-vpn" ng-model="networkFormInputPurposeCtrl.model.attributes.purpose" ng-disabled="(!networkFormInputPurposeCtrl.model.isNew() &amp;&amp; networkFormInputPurposeCtrl.model.attributes.purpose !== \'remote-user-vpn\') || !networkFormInputPurposeCtrl.canAddRemoteUserVpn()"><label for="networkPurposeRemoteUserVpn" translate="SETTINGS_NETWORK_VALUES_PURPOSE_REMOTE_USER_VPN"></label><span unifi-notify-device-requirement="ugw" unifi-notify-device-requirement-is-dark="networkFormInputPurposeCtrl.isDark"></span></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkPurpose" id="networkPurposeSiteVpn" value="site-vpn" ng-model="networkFormInputPurposeCtrl.model.attributes.purpose" ng-disabled="!networkFormInputPurposeCtrl.model.isNew() &amp;&amp; networkFormInputPurposeCtrl.model.attributes.purpose !== \'site-vpn\'"><label for="networkPurposeSiteVpn" translate="SETTINGS_NETWORK_VALUES_PURPOSE_SITE_TO_SITE_VPN"></label><span unifi-notify-device-requirement="ugw" unifi-notify-device-requirement-is-dark="networkFormInputPurposeCtrl.isDark"></span></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkPurpose" id="networkPurposeVpnClient" value="vpn-client" ng-model="networkFormInputPurposeCtrl.model.attributes.purpose" ng-disabled="!networkFormInputPurposeCtrl.model.isNew() &amp;&amp; networkFormInputPurposeCtrl.model.attributes.purpose !== \'vpn-client\'"><label for="networkPurposeVpnClient" translate="SETTINGS_NETWORK_VALUES_PURPOSE_VPN_CLIENT"></label><span unifi-notify-device-requirement="ugw" unifi-notify-device-requirement-is-dark="networkFormInputPurposeCtrl.isDark"></span></div></div>'),b.join("")}},{"jade/runtime":232}],636:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkFormInputPurpose",[function(){return{scope:{model:"=unifiNetworkFormInputPurpose",isDark:"=?unifiNetworkFormInputPurposeIsDark"},controller:"NetworkFormInputPurposeController",controllerAs:"networkFormInputPurposeCtrl",bindToController:!0,template:a("./networkFormInputPurpose.jade")()}}])},{"./networkFormInputPurpose.jade":635}],637:[function(a,b,c){"use strict";function d(a){this.remoteSubnetMin=this.isOptional?0:1,this.remoteSubnetMax=16,this.patterns={subnet:a.SUBNET}}d.$inject=["REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("NetworkFormInputRemoteSubnetsController",d)},{}],638:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div unifi-repeatable-input unifi-repeatable-input-min="networkFormInputRemoteSubnetsCtrl.remoteSubnetMin" unifi-repeatable-input-max="networkFormInputRemoteSubnetsCtrl.remoteSubnetMax" unifi-repeatable-input-values="networkFormInputRemoteSubnetsCtrl.remoteSubnets" unifi-repeatable-input-is-read-only="networkFormInputRemoteSubnetsCtrl.isReadOnly"><div ng-repeat="i in repeatableInputCtrl.getOptions() track by $index" class="remoteSubnets appInputGroup appInputGroup--cozy"><input type="text" name="networkRemoteSubnet{{$index}}" id="networkRemoteSubnet{{$index}}" ng-model="repeatableInputCtrl.values[$index]" ng-pattern="networkFormInputRemoteSubnetsCtrl.patterns.subnet" ng-required="$index &lt; repeatableInputCtrl.min"><button type="button" ng-show="!repeatableInputCtrl.isReadOnly" ng-click="repeatableInputCtrl.removeItem($index)" ng-disabled="!repeatableInputCtrl.isRemoveAllowed()" title="{{\'SETTINGS_COMMON_LABEL_REMOVE_SUBNET\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeRemoteSubnet"><span class="button__icon icon ubnt-icon--x"></span></button></div><div ng-show="!repeatableInputCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableInputCtrl.addItem()" ng-disabled="!repeatableInputCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addRemoteSubnet"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_COMMON_LABEL_ADD_SUBNET"></span></button></div></div>'),b.join("")}},{"jade/runtime":232}],639:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkFormInputRemoteSubnets",[function(){return{scope:{remoteSubnets:"=unifiNetworkFormInputRemoteSubnets",form:"=unifiNetworkFormInputRemoteSubnetsForm",isOptional:"=unifiNetworkFormInputRemoteSubnetsIsOptional",isReadOnly:"=unifiNetworkFormInputRemoteSubnetsIsReadOnly"},controller:"NetworkFormInputRemoteSubnetsController",controllerAs:"networkFormInputRemoteSubnetsCtrl",bindToController:!0,template:a("./networkFormInputRemoteSubnets.jade")()}}])},{"./networkFormInputRemoteSubnets.jade":638}],640:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.$translate=a,this.heyToasts=b,this.networks=c,this.networkUtils=d,this.preferences=f,this.ipUtils=g,this.featureFlag=i,this.NETWORK_DEFAULTS=j,this.patterns={name:k.NAME,ipAddress:k.IP_ADDRESS,subnet:k.SUBNET,vlan:k.VLAN},e.call(this,h)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes,{enabled:!0,is_nat:!0});return this.model.get("attr_hidden_id")||(a.vlan_enabled=!!this.modelCopy.get("vlan")),this.networkUtils.saveNetwork(this.model,a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.isVlanRequired=function(){if(this.modelCopy&&"LAN2"===this.modelCopy.get("networkgroup")&&this.featureFlag.isEnabled("enableEmptyLan2Vlan")){var a=this.networks.repository.collection.filter(function(a){if("LAN2"===a.get("networkgroup")){var b=this.model&&this.model.id===a.id;return!b&&!a.has("vlan")}}.bind(this));return!!a.length}return!0},d.prototype.showUpdateDhcpRangePrompt=function(){if(this.modelCopy&&this.modelCopy.get("dhcpd_enabled")&&this.modelCopy.get("ip_subnet")&&this.form&&this.form.networkIpSubnet.$valid){var a=this.modelCopy.get("ip_subnet"),b=this.ipUtils.recommendSubnet(a,0,this.NETWORK_DEFAULTS.MAX_DHCP_LEASES);return this.modelCopy.get("dhcpd_start")!==b.dhcpStartIp||this.modelCopy.get("dhcpd_stop")!==b.dhcpStopIp}return!1},d.prototype.updateDhcpRange=function(){if(this.modelCopy&&this.form.networkIpSubnet.$valid){var a=this.modelCopy.get("ip_subnet"),b=this.ipUtils.recommendSubnet(a,0,this.NETWORK_DEFAULTS.MAX_DHCP_LEASES);this.modelCopy.attributes.dhcpd_start=b.dhcpStartIp,this.modelCopy.attributes.dhcpd_stop=b.dhcpStopIp,this.isDhcpRangeLimited=b.isLimited}},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";if(this.masterWithDefaults=this.masterWithDefaults||{},this["model"+b]){this["model"+b].attributes.purpose=(this.model?this.model.get("purpose"):void 0)||"corporate";var c={networkgroup:(this.model?this.model.get("networkgroup"):void 0)||"LAN",dhcpd_enabled:!(this.model&&!this.model.isNew())||this.model.get("dhcpd_enabled"),dhcpd_leasetime:(this.model?this.model.get("dhcpd_leasetime"):void 0)||86400,dhcpd_dns_enabled:(this.model?this.model.get("dhcpd_dns_enabled"):void 0)||!1};angular.extend(a?this.masterWithDefaults:this.modelCopy.attributes,c)}},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","networks","networkUtils","preferences","ipUtils","modelDivergence","featureFlag","NETWORK_DEFAULTS","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("NetworkFormLanController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],641:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="networkFormLanCtrl.form" ng-class="{    \'appForm--dark\': networkFormLanCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': networkFormLanCtrl.showValidation,    \'is-validation-hidden\': !networkFormLanCtrl.showValidation  }" ng-submit="networkFormLanCtrl.form.$valid &amp;&amp; networkFormLanCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="networkFormLanCtrl.resolveDivergence()" unifi-config-changed-on-ignore="networkFormLanCtrl.ignoreDivergence()" unifi-config-changed-is-dark="networkFormLanCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="networkFormLanCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{networkName: networkFormLanCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_NETWORK_SECTION_VIEW\' : (networkFormLanCtrl.model.id ? \'SETTINGS_NETWORK_SECTION_EDIT\' : \'SETTINGS_NETWORK_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkName" ng-model="networkFormLanCtrl.modelCopy.attributes.name" ng-model-master="networkFormLanCtrl.model.attributes.name" ng-pattern="networkFormLanCtrl.patterns.name" required class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PURPOSE" class="appLabel--primary"></label></div><div unifi-network-form-input-purpose="networkFormLanCtrl.model" unifi-network-form-input-purpose-is-dark="networkFormLanCtrl.preferences.model.get(\'isSettingsDark\')" class="col--sm9 appFormGroup appFormGroup--cozy"></div></div><div ng-show="setVisibility(\'network-group\', networkFormLanCtrl.model.get(\'purpose\') !== \'voip\')" class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_NETWORK_GROUP" class="appLabel--primary appLabel--withBadge"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkGroup" id="networkGroupLan" value="LAN" ng-model="networkFormLanCtrl.modelCopy.attributes.networkgroup" ng-model-master="networkFormLanCtrl.masterWithDefaults.networkgroup"><label for="networkGroupLan" translate="SETTINGS_NETWORK_VALUES_NETWORK_GROUP_LAN"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkGroup" id="networkGroupLan2" value="LAN2" ng-model="networkFormLanCtrl.modelCopy.attributes.networkgroup" ng-model-master="networkFormLanCtrl.masterWithDefaults.networkgroup" ng-disabled="networkFormLanCtrl.model.get(\'attr_hidden_id\') === \'LAN\'"><label for="networkGroupLan2" translate="SETTINGS_NETWORK_VALUES_NETWORK_GROUP_LAN2"></label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_GATEWAY_SUBNET" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="text" name="networkIpSubnet" ng-model="networkFormLanCtrl.modelCopy.attributes.ip_subnet" ng-model-master="networkFormLanCtrl.model.attributes.ip_subnet" ng-pattern="networkFormLanCtrl.patterns.subnet" required><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div ng-class="{\'appTooltip--dark\': networkFormLanCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip appTooltip--top">{{\'SETTINGS_NETWORKS_TOOLTIP_GATEWAY_SUBNET\' | translate}}</div></div><button type="button" ng-if="networkFormLanCtrl.showUpdateDhcpRangePrompt()" ng-click="networkFormLanCtrl.updateDhcpRange()" ng-class="networkFormLanCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--secondaryDark\' :                 \'appMainButton--secondary\'              " class="appMainButton appMainButton--cozy updateDhcpRange">{{\'SETTINGS_NETWORK_BUTTON_UPDATE_DHCP_RANGE\' | translate}}</button></div></div></div><div unifi-network-form-details-network="networkFormLanCtrl.modelCopy.attributes.ip_subnet"></div><div ng-show="setVisibility(\'vlan\', !networkFormLanCtrl.model.get(\'attr_hidden_id\'))" class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_VLAN" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkVlan" ng-model="networkFormLanCtrl.modelCopy.attributes.vlan" ng-model-master="networkFormLanCtrl.model.attributes.vlan" ng-model-master-cleanup="true" ng-pattern="networkFormLanCtrl.patterns.vlan" ng-required="getVisibility(\'vlan\') &amp;&amp; networkFormLanCtrl.isVlanRequired()" class="input--smallNumber"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_IGMP_SNOOPING" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkEnableIgmpSnooping" id="networkEnableIgmpSnooping" ng-model="networkFormLanCtrl.modelCopy.attributes.igmp_snooping" ng-model-master="networkFormLanCtrl.model.attributes.igmp_snooping"><label for="networkEnableIgmpSnooping" translate="SETTINGS_NETWORK_VALUES_IGMP_SNOOPING_ENABLED"></label><span unifi-notify-device-requirement="usw" unifi-notify-device-requirement-is-dark="networkFormLanCtrl.preferences.model.get(\'isSettingsDark\')"></span></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DHCP_SERVER" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="checkbox" name="networkEnableDhcpServer" id="networkEnableDhcpServer" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_enabled" ng-model-master="networkFormLanCtrl.masterWithDefaults.dhcpd_enabled"><label for="networkEnableDhcpServer" translate="SETTINGS_NETWORK_VALUES_DHCP_SERVER_ENABLED"></label><span unifi-notify-device-requirement="ugw" unifi-notify-device-requirement-is-dark="networkFormLanCtrl.preferences.model.get(\'isSettingsDark\')"></span></div></div></div><fieldset ng-show="setVisibility(\'dhcp\', networkFormLanCtrl.modelCopy.attributes.dhcpd_enabled)" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DHCP_RANGE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpStart" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_start" ng-model-master="networkFormLanCtrl.model.attributes.dhcpd_start" ng-model-master-cleanup="true" unifi-validate-ip-in-subnet="getVisibility(\'dhcp\') ? networkFormLanCtrl.modelCopy.attributes.ip_subnet : null" ng-required="getVisibility(\'dhcp\')"><label>-</label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpStop" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_stop" ng-model-master="networkFormLanCtrl.model.attributes.dhcpd_stop" ng-model-master-cleanup="true" unifi-validate-ip-in-subnet="getVisibility(\'dhcp\') ? networkFormLanCtrl.modelCopy.attributes.ip_subnet : null" ng-required="getVisibility(\'dhcp\')"></div><div ng-if="networkFormLanCtrl.isDhcpRangeLimited" class="appTooltipContainer appTooltipContainer--iconPrompt appTooltipContainer--hoverable appTooltip--boxAlign"><div class="icon ubnt-icon--alert-fill warning"></div><div ng-class="{\'appTooltip--dark\': networkFormLanCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip appTooltip--top">{{\'SETTINGS_NETWORKS_TOOLTIP_DHCP_LEASES_LIMITED\' | translate:{maxDhcpLeases: networkFormLanCtrl.NETWORK_DEFAULTS.MAX_DHCP_LEASES} }}</div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DHCP_NAME_SERVER" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkDhcpDnsShared" id="networkDhcpDnsDisabledShared" ng-value="false" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_dns_enabled" ng-model-master="networkFormLanCtrl.masterWithDefaults.dhcpd_dns_enabled" ng-model-master-cleanup="true"><label for="networkDhcpDnsDisabledShared" translate="SETTINGS_NETWORK_VALUES_DHCP_SERVER_AUTO"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkDhcpDnsShared" id="networkDhcpDnsEnabledShared" ng-value="true" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_dns_enabled" ng-model-master="networkFormLanCtrl.masterWithDefaults.dhcpd_dns_enabled" ng-model-master-cleanup="true"><label for="networkDhcpDnsEnabledShared" translate="SETTINGS_NETWORK_VALUES_DHCP_SERVER_MANUAL"></label></div><div class="appInputGroup inlineBlock"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpDnsServer1" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_dns_1" ng-model-master="networkFormLanCtrl.model.attributes.dhcpd_dns_1" ng-model-master-cleanup="true" ng-pattern="networkFormLanCtrl.patterns.ipAddress" ng-disabled="!networkFormLanCtrl.modelCopy.attributes.dhcpd_dns_enabled" ng-required="getVisibility(\'dhcp\') &amp;&amp; networkFormLanCtrl.modelCopy.attributes.dhcpd_dns_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_NAME_SERVER\' | translate:{num: 1} }}"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpDnsServer2" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_dns_2" ng-model-master="networkFormLanCtrl.model.attributes.dhcpd_dns_2" ng-model-master-cleanup="true" ng-pattern="networkFormLanCtrl.patterns.ipAddress" ng-disabled="!networkFormLanCtrl.modelCopy.attributes.dhcpd_dns_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_NAME_SERVER\' | translate:{num: 2} }}"></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DHCP_WINS_SERVER" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="networkEnableDhcpWinsServer" id="networkEnableDhcpWinsServer" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_wins_enabled" ng-model-master="networkFormLanCtrl.model.attributes.dhcpd_wins_enabled" ng-model-master-cleanup="true"><label for="networkEnableDhcpWinsServer" translate="SETTINGS_NETWORK_VALUES_DHCP_WINS_SERVER_ENABLED"></label></div><div class="appInputGroup inlineBlock"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpDnsServer1" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_wins_1" ng-model-master="networkFormLanCtrl.model.attributes.dhcpd_wins_1" ng-model-master-cleanup="true" ng-pattern="networkFormLanCtrl.patterns.ipAddress" ng-disabled="!networkFormLanCtrl.modelCopy.attributes.dhcpd_wins_enabled" ng-required="getVisibility(\'dhcp\') &amp;&amp; networkFormLanCtrl.modelCopy.attributes.dhcpd_wins_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_WINS_SERVER\' | translate:{num: 1} }}"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpDnsServer2" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_wins_2" ng-model-master="networkFormLanCtrl.model.attributes.dhcpd_wins_2" ng-model-master-cleanup="true" ng-pattern="networkFormLanCtrl.patterns.ipAddress" ng-disabled="!networkFormLanCtrl.modelCopy.attributes.dhcpd_wins_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_WINS_SERVER\' | translate:{num: 2} }}"></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DHCP_LEASE_TIME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="number" size="8" name="networkDhcpLeaseTime" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_leasetime" ng-model-master="networkFormLanCtrl.masterWithDefaults.dhcpd_leasetime" ng-model-master-cleanup="true" ng-required="getVisibility(\'dhcp\')" unifi-string-to-integer-input><label for="networkDhcpLeaseTime" translate="DATETIME_SECONDS_FULL"></label></div></div></div></fieldset><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DHCP_GUARDING" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="networkEnableDhcpGuard" id="networkEnableDhcpGuard" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpguard_enabled" ng-model-master="networkFormLanCtrl.model.attributes.dhcpguard_enabled"><label for="networkEnableDhcpGuard" translate="SETTINGS_NETWORK_VALUES_DHCP_GUARDING_ENABLED"></label><span unifi-notify-device-requirement="usw" unifi-notify-device-requirement-is-dark="networkFormLanCtrl.preferences.model.get(\'isSettingsDark\')"></span></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkEnableDhcpGuardServer1" ng-model="networkFormLanCtrl.modelCopy.attributes.dhcpd_ip_1" ng-model-master="networkFormLanCtrl.model.attributes.dhcpd_ip_1" ng-pattern="networkFormLanCtrl.patterns.ipAddress" ng-disabled="!networkFormLanCtrl.modelCopy.attributes.dhcpguard_enabled" ng-required="networkFormLanCtrl.modelCopy.attributes.dhcpguard_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_TRUSTED_DHCP_SERVER_IP\' | translate}}"></div></div></div></div></div></fieldset><div ng-class="{\'appFormFooter--dark\': networkFormLanCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="networkFormLanCtrl.showValidation = true" busy-toggle="networkFormLanCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveNetwork">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="networkFormLanCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],642:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkFormLan",["$timeout","$stateParams","sharedAttrsDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiNetworkFormLan",attrs:"=unifiNetworkFormLanAttrs",onSave:"&unifiNetworkFormLanOnSave",onCancel:"&unifiNetworkFormLanOnCancel",isReadOnly:"=unifiNetworkFormLanIsReadOnly"},controller:"NetworkFormLanController",controllerAs:"networkFormLanCtrl",template:a("./networkFormLan.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.onSubmit=function(b){b===!0&&a.onSave()},a.$watch("model",function(a){g.updateModel(a)}),a.$on("$destroy",function(){g.removeEventHandlers()}),a.getVisibility=g.getVisibility.bind(g),a.setVisibility=g.setVisibility.bind(g),b(function(){a.isLoaded=!0},0),"add"===c.action&&d.init(a,e,f,g,["name"])}}}])},{"./networkFormLan.jade":641}],643:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.heyToasts=b,this.networkUtils=c,this.preferences=d,this.ipUtils=f,this.patterns={name:h.NAME,ipAddress:h.IP_ADDRESS,portNumber:h.PORT_NUMBER,subnet:h.SUBNET},e.call(this,g)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes,{enabled:!0,is_nat:!0});return this.networkUtils.saveNetwork(this.model,a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.updateDhcpRange=function(){if(this.modelCopy&&this.form.networkIpSubnet.$valid){var a=this.modelCopy.get("ip_subnet"),b=!1,c=this.ipUtils.recommendSubnet(a,b);this.modelCopy.attributes.dhcpd_start=c.dhcpStartIp,this.modelCopy.attributes.dhcpd_stop=c.dhcpStopIp}},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";if(this.masterWithDefaults=this.masterWithDefaults||{},this["model"+b]){this["model"+b].attributes.purpose=(this.model?this.model.get("purpose"):void 0)||"remote-user-vpn",this["model"+b].attributes.radius_port_1=(this.model?this.model.get("radius_port_1"):void 0)||1812;var c={dhcpd_dns_enabled:(this.model?this.model.get("dhcpd_dns_enabled"):void 0)||!1};angular.extend(a?this.masterWithDefaults:this.modelCopy.attributes,c)}},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","networkUtils","preferences","ipUtils","modelDivergence","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("NetworkFormRemoteUserVpnController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],644:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="networkFormRemoteUserVpnCtrl.form" ng-class="{    \'appForm--dark\': networkFormRemoteUserVpnCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': networkFormRemoteUserVpnCtrl.showValidation,    \'is-validation-hidden\': !networkFormRemoteUserVpnCtrl.showValidation  }" ng-submit="networkFormRemoteUserVpnCtrl.form.$valid &amp;&amp; networkFormRemoteUserVpnCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="networkFormRemoteUserVpnCtrl.resolveDivergence()" unifi-config-changed-on-ignore="networkFormRemoteUserVpnCtrl.ignoreDivergence()" unifi-config-changed-is-dark="networkFormRemoteUserVpnCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="networkFormRemoteUserVpnCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{networkName: networkFormRemoteUserVpnCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_NETWORK_SECTION_VIEW\' : (networkFormRemoteUserVpnCtrl.model.id ? \'SETTINGS_NETWORK_SECTION_EDIT\' : \'SETTINGS_NETWORK_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkName" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.name" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.name" ng-pattern="networkFormRemoteUserVpnCtrl.patterns.name" required class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PURPOSE" class="appLabel--primary"></label></div><div unifi-network-form-input-purpose="networkFormRemoteUserVpnCtrl.model" unifi-network-form-input-purpose-is-dark="networkFormRemoteUserVpnCtrl.preferences.model.get(\'isSettingsDark\')" class="col--sm9 appFormGroup appFormGroup--cozy"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_GATEWAY_SUBNET" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="text" name="networkIpSubnet" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.ip_subnet" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.ip_subnet" ng-pattern="networkFormRemoteUserVpnCtrl.patterns.subnet" required><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div ng-class="{\'appTooltip--dark\': networkFormRemoteUserVpnCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip appTooltip--top">{{\'SETTINGS_NETWORKS_TOOLTIP_GATEWAY_SUBNET\' | translate}}</div></div></div></div></div><div unifi-network-form-details-network="networkFormRemoteUserVpnCtrl.modelCopy.attributes.ip_subnet"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_IP_POOL" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpStart" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_start" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.dhcpd_start" unifi-validate-ip-in-subnet="networkFormRemoteUserVpnCtrl.modelCopy.attributes.ip_subnet" required disabled="true"><label>-</label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpStop" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_stop" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.dhcpd_stop" unifi-validate-ip-in-subnet="networkFormRemoteUserVpnCtrl.modelCopy.attributes.ip_subnet" required disabled="true"></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_NAME_SERVER" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkDhcpDnsRemote" id="networkDhcpDnsDisabledRemote" ng-value="false" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_dns_enabled" ng-model-master="networkFormRemoteUserVpnCtrl.masterWithDefaults.dhcpd_dns_enabled"><label for="networkDhcpDnsDisabledRemote" translate="SETTINGS_NETWORK_VALUES_DHCP_SERVER_AUTO"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkDhcpDnsRemote" id="networkDhcpDnsEnabledRemote" ng-value="true" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_dns_enabled" ng-model-master="networkFormRemoteUserVpnCtrl.masterWithDefaults.dhcpd_dns_enabled"><label for="networkDhcpDnsEnabledRemote" translate="SETTINGS_NETWORK_VALUES_DHCP_SERVER_MANUAL"></label></div><div class="appInputGroup inlineBlock"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpDnsServer1" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_dns_1" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.dhcpd_dns_1" ng-pattern="networkFormRemoteUserVpnCtrl.patterns.ipAddress" ng-disabled="!networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_dns_enabled" ng-required="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_dns_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_NAME_SERVER\' | translate:{num: 1} }}"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpDnsServer2" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_dns_2" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.dhcpd_dns_2" ng-pattern="networkFormRemoteUserVpnCtrl.patterns.ipAddress" ng-disabled="!networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_dns_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_NAME_SERVER\' | translate:{num: 2} }}"></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_WINS_SERVER" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="networkEnableDhcpWinsServer" id="networkEnableDhcpWinsServer" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_wins_enabled" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.dhcpd_wins_enabled"><label for="networkEnableDhcpWinsServer" translate="SETTINGS_NETWORK_VALUES_WINS_SERVER_ENABLED"></label></div><div class="appInputGroup inlineBlock"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpWinsServer1" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_wins_1" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.dhcpd_wins_1" ng-pattern="networkFormRemoteUserVpnCtrl.patterns.ipAddress" ng-disabled="!networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_wins_enabled" ng-required="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_wins_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_WINS_SERVER\' | translate:{num: 1} }}"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkDhcpWinsServer2" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_wins_2" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.dhcpd_wins_2" ng-pattern="networkFormRemoteUserVpnCtrl.patterns.ipAddress" ng-disabled="!networkFormRemoteUserVpnCtrl.modelCopy.attributes.dhcpd_wins_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_WINS_SERVER\' | translate:{num: 2} }}"></div></div></div></div></div><div unifi-feature-flag-disable="withRadiusProfilesEndpoint" class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_RADIUS_IP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkRadiusIp" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.radius_ip_1" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.radius_ip_1" ng-pattern="networkFormRemoteUserVpnCtrl.patterns.ipAddress" required class="input--full"></div></div><div unifi-feature-flag-disable="withRadiusProfilesEndpoint" class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_RADIUS_PORT" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="number" size="5" name="networkRadiusPort" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.radius_port_1" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.radius_port_1" ng-pattern="networkFormRemoteUserVpnCtrl.patterns.portNumber" placeholder="1812" required></div></div><div unifi-feature-flag-disable="withRadiusProfilesEndpoint" class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_RADIUS_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="password" name="networkRadiusPassword" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.x_radius_secret_1" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.x_radius_secret_1" required unifi-password-reveal class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_SITE_TO_SITE_VPN" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="checkbox" name="networkExposeToVpn" id="networkExposeToVpn" ng-model="networkFormRemoteUserVpnCtrl.modelCopy.attributes.exposed_to_site_vpn" ng-model-master="networkFormRemoteUserVpnCtrl.model.attributes.exposed_to_site_vpn"><label for="networkExposeToVpn" translate="SETTINGS_NETWORK_VALUES_EXPOSED_TO_VPN"></label></div></div></div></div><div unifi-feature-flag-enable="withRadiusProfilesEndpoint" class="unifiSettingsSection"><div translate="SETTINGS_NETWORK_SECTION_RADIUS" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_RADIUS_PROFILE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div unifi-radius-selector unifi-radius-selector-radius-profile-id="networkFormRemoteUserVpnCtrl.modelCopy.attributes.radiusprofile_id" unifi-radius-selector-is-required="true"></div></div></div></div></div></fieldset><div ng-class="{\'appFormFooter--dark\': networkFormRemoteUserVpnCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="networkFormRemoteUserVpnCtrl.showValidation = true" busy-toggle="networkFormRemoteUserVpnCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveNetwork">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="networkFormRemoteUserVpnCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),
b.join("")}},{"jade/runtime":232}],645:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkFormRemoteUserVpn",["$timeout","$stateParams","sharedAttrsDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiNetworkFormRemoteUserVpn",attrs:"=unifiNetworkFormRemoteUserVpnAttrs",onSave:"&unifiNetworkFormRemoteUserVpnOnSave",onCancel:"&unifiNetworkFormRemoteUserVpnOnCancel",isReadOnly:"=unifiNetworkFormRemoteUserVpnIsReadOnly"},controller:"NetworkFormRemoteUserVpnController",controllerAs:"networkFormRemoteUserVpnCtrl",template:a("./networkFormRemoteUserVpn.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.onSubmit=function(b){b===!0&&a.onSave()},a.$watch(function(){return g.modelCopy?g.modelCopy.get("ip_subnet"):void 0},function(a){a&&g.updateDhcpRange()}),a.$watch("model",function(a){g.updateModel(a)}),a.$on("$destroy",function(){g.removeEventHandlers()}),b(function(){a.isLoaded=!0},0),"add"===c.action&&d.init(a,e,f,g,["name"])}}}])},{"./networkFormRemoteUserVpn.jade":644}],646:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j){this.$translate=a,this.heyToasts=b,this.networks=c,this.networkUtils=d,this.sites=f,this.siteUtils=g,this.preferences=h,this.patterns={name:j.NAME,hostname:j.HOSTNAME,ipAddress:j.IP_ADDRESS,portNumber:j.PORT_NUMBER},this.ipsecProfileOptions=[{value:"customized",translationKey:"SETTINGS_NETWORK_VALUES_IPSEC_PROFILE_CUSTOMIZED"},{value:"azure_dynamic",translationKey:"SETTINGS_NETWORK_VALUES_IPSEC_PROFILE_AZURE_DYNAMIC_ROUTING"},{value:"azure_static",translationKey:"SETTINGS_NETWORK_VALUES_IPSEC_PROFILE_AZURE_STATIC_ROUTING"}],this.ipsecKeyExchangeOptions=[{value:"ikev1",name:"IKEv1"},{value:"ikev2",name:"IKEv2"}],this.ipsecEncryptionOptions=[{value:"aes128",name:"AES-128"},{value:"aes256",name:"AES-256"},{value:"3des",name:"3DES"}],this.ipsecHashOptions=[{value:"sha1",name:"SHA1"},{value:"md5",name:"MD5"}],this.ipsecDhGroupOptions=[2,5,14,15,16,19,20,21,25,26],e.call(this,i)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes,{enabled:!0,is_nat:!1});return"auto"!==a.vpn_type&&delete a.remote_site_id,"ipsec-vpn"!==a.vpn_type&&(delete a.ipsec_profile,delete a.ipsec_key_exchange,delete a.ipsec_encryption,delete a.ipsec_hash,delete a.ipsec_dh_group,delete a.ipsec_pfs,delete a.ipsec_dynamic_routing),"openvpn-vpn"!==a.vpn_type&&delete a.openvpn_mode,this.networkUtils.saveNetwork(this.model,a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.getRemoteSites=function(){var a=this.networks.repository.collection.pluck("remote_site_id"),b=(this.siteUtils.getActiveSite()||{}).id;return this.sites.repository.collection.filter(function(c){if(c.id!==b&&(this.model&&c.id===this.model.get("remote_site_id")||"admin"===c.get("role")&&a.indexOf(c.id)===-1))return!0}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";if(this.masterWithDefaults=this.masterWithDefaults||{},this["model"+b]){this["model"+b].attributes.purpose=(this.model?this.model.get("purpose"):void 0)||"site-vpn";var c={vpn_type:(this.model?this.model.get("vpn_type"):void 0)||"auto",ipsec_profile:(this.model?this.model.get("ipsec_profile"):void 0)||"customized",openvpn_mode:(this.model?this.model.get("openvpn_mode"):void 0)||"site-to-site",remote_vpn_subnets:(this.model?this.model.get("remote_vpn_subnets"):void 0)||[]};angular.extend(a?this.masterWithDefaults:this.modelCopy.attributes,c)}},d.prototype.updateIpsecAdvancedOptions=function(a){var b;switch(a){case"azure_dynamic":b={ipsec_key_exchange:"ikev2",ipsec_encryption:"aes256",ipsec_hash:"sha1",ipsec_dh_group:2,ipsec_pfs:!0,ipsec_dynamic_routing:!0};break;case"azure_static":b={ipsec_key_exchange:"ikev1",ipsec_encryption:"aes256",ipsec_hash:"sha1",ipsec_dh_group:2,ipsec_pfs:!1,ipsec_dynamic_routing:!1};break;default:b={ipsec_key_exchange:this.modelCopy.attributes.ipsec_key_exchange||"ikev1",ipsec_encryption:this.modelCopy.attributes.ipsec_encryption||"aes128",ipsec_hash:this.modelCopy.attributes.ipsec_hash||"sha1",ipsec_dh_group:this.modelCopy.attributes.ipsec_dh_group||14,ipsec_pfs:this.modelCopy.attributes.ipsec_pfs!==!1,ipsec_dynamic_routing:this.modelCopy.attributes.ipsec_dynamic_routing!==!1}}angular.extend(this.modelCopy.attributes,b)},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","networks","networkUtils","sites","siteUtils","preferences","modelDivergence","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("NetworkFormSiteVpnController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],647:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="networkFormSiteVpnCtrl.form" ng-class="{    \'appForm--dark\': networkFormSiteVpnCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': networkFormSiteVpnCtrl.showValidation,    \'is-validation-hidden\': !networkFormSiteVpnCtrl.showValidation  }" ng-submit="networkFormSiteVpnCtrl.form.$valid &amp;&amp; networkFormSiteVpnCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="networkFormSiteVpnCtrl.resolveDivergence()" unifi-config-changed-on-ignore="networkFormSiteVpnCtrl.ignoreDivergence()" unifi-config-changed-is-dark="networkFormSiteVpnCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="networkFormSiteVpnCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{networkName: networkFormSiteVpnCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_NETWORK_SECTION_VIEW\' : (networkFormSiteVpnCtrl.model.id ? \'SETTINGS_NETWORK_SECTION_EDIT\' : \'SETTINGS_NETWORK_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkName" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.name" ng-model-master="networkFormSiteVpnCtrl.model.attributes.name" ng-pattern="networkFormSiteVpnCtrl.patterns.name" required class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PURPOSE" class="appLabel--primary"></label></div><div unifi-network-form-input-purpose="networkFormSiteVpnCtrl.model" unifi-network-form-input-purpose-is-dark="networkFormSiteVpnCtrl.preferences.model.get(\'isSettingsDark\')" class="col--sm9 appFormGroup appFormGroup--cozy"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_VPN_TYPE" class="appLabel--primary appLabel--withBadge"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkVpnClient" id="networkVpnClientAuto" value="auto" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.vpn_type" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.vpn_type"><label for="networkVpnClientAuto" translate="SETTINGS_NETWORK_VALUES_VPN_CLIENT_AUTO"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkVpnClient" id="networkVpnClientIpSecVpn" value="ipsec-vpn" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.vpn_type" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.vpn_type"><label for="networkVpnClientIpSecVpn" translate="SETTINGS_NETWORK_VALUES_VPN_CLIENT_IPSEC_VPN"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkVpnClient" id="networkVpnClientOpenVpn" value="openvpn-vpn" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.vpn_type" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.vpn_type"><label for="networkVpnClientOpenVpn" translate="SETTINGS_NETWORK_VALUES_VPN_CLIENT_OPEN_VPN"></label></div></div></div></div><fieldset ng-show="setVisibility(\'auto\', networkFormSiteVpnCtrl.modelCopy.attributes.vpn_type === \'auto\')" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_REMOTE_SITE" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="networkRemoteSite" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.remote_site_id" ng-model-master="networkFormSiteVpnCtrl.model.attributes.remote_site_id" ng-options="site.id as site.get(\'desc\') for site in networkFormSiteVpnCtrl.getRemoteSites()" ng-required="getVisibility(\'auto\')" class="select--full"><option unifi-option-placeholder></option></select></div></div></div></fieldset><fieldset ng-show="setVisibility(\'custom-type\', networkFormSiteVpnCtrl.modelCopy.attributes.vpn_type !== \'auto\')" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_ENABLED" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkEnableSiteVpn" id="networkEnableSiteVpn" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.enabled" ng-model-master="networkFormSiteVpnCtrl.model.attributes.enabled"><label for="networkEnableSiteVpn" translate="SETTINGS_NETWORK_VALUES_SITE_VPN_ENABLED"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_REMOTE_SUBNETS" class="appLabel--primary appLabel--boxAlign"></label></div><div unifi-network-form-input-remote-subnets="networkFormSiteVpnCtrl.modelCopy.attributes.remote_vpn_subnets" unifi-network-form-input-remote-subnets-is-optional="true" unifi-network-form-input-remote-subnets-is-read-only="isReadOnly" class="col--sm5 appFormGroup appFormGroup--comfy"></div></div></fieldset><fieldset ng-show="setVisibility(\'ipsec\', networkFormSiteVpnCtrl.modelCopy.attributes.vpn_type === \'ipsec-vpn\')" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PEER_IP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkIpsecPeerIp" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_peer_ip" ng-model-master="networkFormSiteVpnCtrl.model.attributes.ipsec_peer_ip" ng-pattern="networkFormSiteVpnCtrl.patterns.ipAddress" ng-required="getVisibility(\'ipsec\')" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_LOCAL_WAN_IP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkIpsecLocalWanIp" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_local_ip" ng-model-master="networkFormSiteVpnCtrl.model.attributes.ipsec_local_ip" ng-pattern="networkFormSiteVpnCtrl.patterns.ipAddress" ng-required="getVisibility(\'ipsec\')" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PRE_SHARED_KEY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="password" name="networkIpsecPreSharedKey" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.x_ipsec_pre_shared_key" ng-model-master="networkFormSiteVpnCtrl.model.attributes.x_ipsec_pre_shared_key" ng-required="getVisibility(\'ipsec\')" unifi-password-reveal class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_IPSEC_PROFILE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><select name="networkIpsecProfile" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_profile" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.ipsec_profile" ng-options="option.value as option.translationKey | translate for option in networkFormSiteVpnCtrl.ipsecProfileOptions" ng-required="getVisibility(\'ipsec\')" class="select--full"></select></div></div></fieldset><fieldset ng-show="setVisibility(\'openvpn\', networkFormSiteVpnCtrl.modelCopy.attributes.vpn_type === \'openvpn-vpn\')" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_REMOTE_HOST" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkOpenVpnRemoteHost" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.openvpn_remote_host" ng-model-master="networkFormSiteVpnCtrl.model.attributes.openvpn_remote_host" ng-pattern="networkFormSiteVpnCtrl.patterns.hostname" ng-required="getVisibility(\'openvpn\')" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_REMOTE_ADDRESS" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" id="networkOpenVpnRemoteAddress" name="networkOpenVpnRemoteAddress" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.openvpn_remote_address" ng-model-master="networkFormSiteVpnCtrl.model.attributes.openvpn_remote_address" ng-pattern="networkFormSiteVpnCtrl.patterns.ipAddress" ng-required="getVisibility(\'openvpn\')"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="networkOpenVpnRemotePort" translate="SETTINGS_NETWORK_LABEL_PORT" class="appLabel--boxInline"></label><input type="text" size="5" id="networkOpenVpnRemotePort" name="networkOpenVpnRemotePort" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.openvpn_remote_port" ng-model-master="networkFormSiteVpnCtrl.model.attributes.openvpn_remote_port" ng-pattern="networkFormSiteVpnCtrl.patterns.portNumber" ng-required="getVisibility(\'openvpn\')"></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_LOCAL_ADDRESS" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" id="networkOpenVpnRemoteAddress" name="networkOpenVpnRemoteAddress" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.openvpn_local_address" ng-model-master="networkFormSiteVpnCtrl.model.attributes.openvpn_local_address" ng-pattern="networkFormSiteVpnCtrl.patterns.ipAddress" ng-required="getVisibility(\'openvpn\')"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="networkOpenVpnRemotePort" translate="SETTINGS_NETWORK_LABEL_PORT" class="appLabel--boxInline"></label><input type="text" size="5" id="networkOpenVpnRemotePort" name="networkOpenVpnRemotePort" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.openvpn_local_port" ng-model-master="networkFormSiteVpnCtrl.model.attributes.openvpn_local_port" ng-pattern="networkFormSiteVpnCtrl.patterns.portNumber" ng-required="getVisibility(\'openvpn\')"></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_SHARED_SECRET_KEY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="password" name="networkOpenVpnSharedSecretKey" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.x_openvpn_shared_secret_key" ng-model-master="networkFormSiteVpnCtrl.model.attributes.x_openvpn_shared_secret_key" ng-required="getVisibility(\'openvpn\')" unifi-password-reveal class="input--full"></div></div></fieldset></div><div ng-show="getVisibility(\'ipsec\')" class="unifiSettingsSection"><div ng-click="networkFormSiteVpnCtrl.isAdvancedExpanded = !networkFormSiteVpnCtrl.isAdvancedExpanded" ng-class="networkFormSiteVpnCtrl.isAdvancedExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="COMMON_SECTION_ADVANCED_OPTIONS" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="networkFormSiteVpnCtrl.isAdvancedExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_KEY_EXCHANGE_VERSION" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><select name="networkIpsecKeyExchangeVersion" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_key_exchange" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.ipsec_key_exchange" ng-options="option.value as option.name for option in networkFormSiteVpnCtrl.ipsecKeyExchangeOptions" ng-required="getVisibility(\'ipsec\')" class="select--full"></select></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_ENCRYPTION" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><select name="networkIpsecEncryption" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_encryption" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.ipsec_encryption" ng-options="option.value as option.name for option in networkFormSiteVpnCtrl.ipsecEncryptionOptions" ng-required="getVisibility(\'ipsec\')" class="select--full"></select></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_HASH" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><select name="networkIpsecHash" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_hash" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.ipsec_hash" ng-options="option.value as option.name for option in networkFormSiteVpnCtrl.ipsecHashOptions" ng-required="getVisibility(\'ipsec\')" class="select--full"></select></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DH_GROUP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><select name="networkIpsecDhGroup" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_dh_group" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.ipsec_dh_group" ng-options="option as option for option in networkFormSiteVpnCtrl.ipsecDhGroupOptions" ng-required="getVisibility(\'ipsec\')" class="select--full"></select></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PFS" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkEnablePfs" id="networkEnablePfs" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_pfs" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.ipsec_pfs"><label for="networkEnablePfs" translate="SETTINGS_NETWORK_VALUES_PFS_ENABLED"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DYNAMIC_ROUTING" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkEnableDynamicRouting" id="networkEnableDynamicRouting" ng-model="networkFormSiteVpnCtrl.modelCopy.attributes.ipsec_dynamic_routing" ng-model-master="networkFormSiteVpnCtrl.masterWithDefaults.ipsec_dynamic_routing"><label for="networkEnableDynamicRouting" translate="SETTINGS_NETWORK_VALUES_DYNAMIC_ROUTING_ENABLED"></label></div></div></div></fieldset></div></fieldset><div ng-class="{\'appFormFooter--dark\': networkFormSiteVpnCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="networkFormSiteVpnCtrl.showValidation = true" busy-toggle="networkFormSiteVpnCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveNetwork">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="networkFormSiteVpnCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],648:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkFormSiteVpn",["$timeout","$stateParams","sharedAttrsDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiNetworkFormSiteVpn",attrs:"=unifiNetworkFormSiteVpnAttrs",onSave:"&unifiNetworkFormSiteVpnOnSave",onCancel:"&unifiNetworkFormSiteVpnOnCancel",isReadOnly:"=unifiNetworkFormSiteVpnIsReadOnly"},controller:"NetworkFormSiteVpnController",controllerAs:"networkFormSiteVpnCtrl",template:a("./networkFormSiteVpn.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.onSubmit=function(b){b===!0&&a.onSave()},a.$watch(function(){return g.modelCopy?g.modelCopy.get("ipsec_profile"):void 0},function(a){a&&g.updateIpsecAdvancedOptions(a)}),a.$watch("model",function(a){g.updateModel(a)}),a.$on("$destroy",function(){g.removeEventHandlers()}),a.getVisibility=g.getVisibility.bind(g),a.setVisibility=g.setVisibility.bind(g),b(function(){a.isLoaded=!0},0),"add"===c.action&&d.init(a,e,f,g,["name"])}}}])},{"./networkFormSiteVpn.jade":647}],649:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.heyToasts=b,this.networkUtils=c,this.preferences=d,this.patterns={name:g.NAME,ipAddress:g.IP_ADDRESS,subnet:g.SUBNET,vlan:g.VLAN},e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes,{enabled:!0,is_nat:!0,vlan_enabled:!!this.modelCopy.get("vlan")});return this.networkUtils.saveNetwork(this.model,a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";this["model"+b]&&(this["model"+b].attributes.purpose=(this.model?this.model.get("purpose"):void 0)||"vlan-only")},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","networkUtils","preferences","modelDivergence","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("NetworkFormVlanOnlyController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],650:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="networkFormVlanOnlyCtrl.form" ng-class="{    \'appForm--dark\': networkFormVlanOnlyCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': networkFormVlanOnlyCtrl.showValidation,    \'is-validation-hidden\': !networkFormVlanOnlyCtrl.showValidation  }" ng-submit="networkFormVlanOnlyCtrl.form.$valid &amp;&amp; networkFormVlanOnlyCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="networkFormVlanOnlyCtrl.resolveDivergence()" unifi-config-changed-on-ignore="networkFormVlanOnlyCtrl.ignoreDivergence()" unifi-config-changed-is-dark="networkFormVlanOnlyCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="networkFormVlanOnlyCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{networkName: networkFormVlanOnlyCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_NETWORK_SECTION_VIEW\' : (networkFormVlanOnlyCtrl.model.id ? \'SETTINGS_NETWORK_SECTION_EDIT\' : \'SETTINGS_NETWORK_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkName" ng-model="networkFormVlanOnlyCtrl.modelCopy.attributes.name" ng-model-master="networkFormVlanOnlyCtrl.model.attributes.name" ng-pattern="networkFormVlanOnlyCtrl.patterns.name" required class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PURPOSE" class="appLabel--primary"></label></div><div unifi-network-form-input-purpose="networkFormVlanOnlyCtrl.model" unifi-network-form-input-purpose-is-dark="networkFormVlanOnlyCtrl.preferences.model.get(\'isSettingsDark\')" class="col--sm9 appFormGroup appFormGroup--cozy"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_VLAN" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkVlan" ng-model="networkFormVlanOnlyCtrl.modelCopy.attributes.vlan" ng-model-master="networkFormVlanOnlyCtrl.model.attributes.vlan" ng-pattern="networkFormVlanOnlyCtrl.patterns.vlan" class="input--smallNumber"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_IGMP_SNOOPING" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkEnableIgmpSnooping" id="networkEnableIgmpSnooping" ng-model="networkFormVlanOnlyCtrl.modelCopy.attributes.igmp_snooping" ng-model-master="networkFormVlanOnlyCtrl.model.attributes.igmp_snooping"><label for="networkEnableIgmpSnooping" translate="SETTINGS_NETWORK_VALUES_IGMP_SNOOPING_ENABLED"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_DHCP_GUARDING" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="networkEnableDhcpGuard" id="networkEnableDhcpGuard" ng-model="networkFormVlanOnlyCtrl.modelCopy.attributes.dhcpguard_enabled" ng-model-master="networkFormVlanOnlyCtrl.model.attributes.dhcpguard_enabled"><label for="networkEnableDhcpGuard" translate="SETTINGS_NETWORK_VALUES_DHCP_GUARDING_ENABLED"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="networkEnableDhcpGuardServer1" ng-model="networkFormVlanOnlyCtrl.modelCopy.attributes.dhcpd_ip_1" ng-model-master="networkFormVlanOnlyCtrl.model.attributes.dhcpd_ip_1" ng-pattern="networkFormVlanOnlyCtrl.patterns.ipAddress" ng-disabled="!networkFormVlanOnlyCtrl.modelCopy.attributes.dhcpguard_enabled" ng-required="networkFormVlanOnlyCtrl.modelCopy.attributes.dhcpguard_enabled" placeholder="{{\'SETTINGS_NETWORK_PLACEHOLDER_TRUSTED_DHCP_SERVER_IP\' | translate}}"></div></div></div></div></div></fieldset><div ng-class="{\'appFormFooter--dark\': networkFormVlanOnlyCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="networkFormVlanOnlyCtrl.showValidation = true" busy-toggle="networkFormVlanOnlyCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveNetwork">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="networkFormVlanOnlyCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],651:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkFormVlanOnly",["$timeout","$stateParams","sharedAttrsDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiNetworkFormVlanOnly",attrs:"=unifiNetworkFormVlanOnlyAttrs",onSave:"&unifiNetworkFormVlanOnlyOnSave",onCancel:"&unifiNetworkFormVlanOnlyOnCancel",isReadOnly:"=unifiNetworkFormVlanOnlyIsReadOnly"},controller:"NetworkFormVlanOnlyController",controllerAs:"networkFormVlanOnlyCtrl",template:a("./networkFormVlanOnly.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.onSubmit=function(b){b===!0&&a.onSave()},a.$watch("model",function(a){g.updateModel(a)}),a.$on("$destroy",function(){g.removeEventHandlers()}),b(function(){a.isLoaded=!0},0),"add"===c.action&&d.init(a,e,f,g,["name"])}}}])},{"./networkFormVlanOnly.jade":650}],652:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.heyToasts=b,this.networkUtils=c,this.preferences=d,this.ipUtils=f,this.patterns={name:h.NAME,ipAddress:h.IP_ADDRESS,vlan:h.VLAN},e.call(this,g)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes,{enabled:!0,is_nat:!0});return this.networkUtils.saveNetwork(this.model,a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";if(this.masterWithDefaults=this.masterWithDefaults||{},this["model"+b]){this["model"+b].attributes.purpose=(this.model?this.model.get("purpose"):void 0)||"vpn-client";var c={vpn_type:(this.model?this.model.get("vpn_type"):void 0)||"pptp-client",remote_vpn_subnets:(this.model?this.model.get("remote_vpn_subnets"):void 0)||[]};angular.extend(a?this.masterWithDefaults:this.modelCopy.attributes,c)}},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","networkUtils","preferences","ipUtils","modelDivergence","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("NetworkFormVpnClientController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],653:[function(a,b,c){
a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="networkFormVpnClientCtrl.form" ng-class="{    \'appForm--dark\': networkFormVpnClientCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': networkFormVpnClientCtrl.showValidation,    \'is-validation-hidden\': !networkFormVpnClientCtrl.showValidation  }" ng-submit="networkFormVpnClientCtrl.form.$valid &amp;&amp; networkFormVpnClientCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="networkFormVpnClientCtrl.resolveDivergence()" unifi-config-changed-on-ignore="networkFormVpnClientCtrl.ignoreDivergence()" unifi-config-changed-is-dark="networkFormVpnClientCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="networkFormVpnClientCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{networkName: networkFormVpnClientCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_NETWORK_SECTION_VIEW\' : (networkFormVpnClientCtrl.model.id ? \'SETTINGS_NETWORK_SECTION_EDIT\' : \'SETTINGS_NETWORK_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkName" ng-model="networkFormVpnClientCtrl.modelCopy.attributes.name" ng-model-master="networkFormVpnClientCtrl.model.attributes.name" ng-pattern="networkFormVpnClientCtrl.patterns.name" required class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PURPOSE" class="appLabel--primary"></label></div><div unifi-network-form-input-purpose="networkFormVpnClientCtrl.model" unifi-network-form-input-purpose-is-dark="networkFormVpnClientCtrl.preferences.model.get(\'isSettingsDark\')" class="col--sm9 appFormGroup appFormGroup--cozy"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_VPN_CLIENT" class="appLabel--primary appLabel--withBadge"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="networkVpnClient" id="networkVpnClientPptp" value="pptp-client" ng-model="networkFormVpnClientCtrl.modelCopy.attributes.vpn_type" ng-model-master="networkFormVpnClientCtrl.masterWithDefaults.vpn_type"><label for="networkVpnClientPptp" translate="SETTINGS_NETWORK_VALUES_VPN_CLIENT_PPTP"></label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_ENABLED" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkEnableVpnClient" id="networkEnableVpnClient" ng-model="networkFormVpnClientCtrl.modelCopy.attributes.enabled" ng-model-master="networkFormVpnClientCtrl.model.attributes.enabled"><label for="networkEnableVpnClient" translate="SETTINGS_NETWORK_VALUES_VPN_CLIENT_ENABLED"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_REMOTE_SUBNETS" class="appLabel--primary appLabel--boxAlign"></label></div><div unifi-network-form-input-remote-subnets="networkFormVpnClientCtrl.modelCopy.attributes.remote_vpn_subnets" unifi-network-form-input-remote-subnets-is-read-only="isReadOnly" class="col--sm5 appFormGroup appFormGroup--cozy"></div></div><fieldset ng-show="setVisibility(\'pptp\', networkFormVpnClientCtrl.modelCopy.attributes.vpn_type === \'pptp-client\')" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_SERVER_IP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkServerIp" ng-model="networkFormVpnClientCtrl.modelCopy.attributes.pptpc_server_ip" ng-model-master="networkFormVpnClientCtrl.model.attributes.pptpc_server_ip" ng-pattern="networkFormVpnClientCtrl.patterns.ipAddress" ng-required="getVisibility(\'pptp\')" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_USERNAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkUsername" ng-model="networkFormVpnClientCtrl.modelCopy.attributes.pptpc_username" ng-model-master="networkFormVpnClientCtrl.model.attributes.pptpc_username" ng-required="getVisibility(\'pptp\')" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="password" name="networkPassword" ng-model="networkFormVpnClientCtrl.modelCopy.attributes.x_pptpc_password" ng-model-master="networkFormVpnClientCtrl.model.attributes.x_pptpc_password" ng-required="getVisibility(\'pptp\')" unifi-password-reveal class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_NETWORK_LABEL_REQUIRE_MPPE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="networkRequireMppe" id="networkRequireMppe" ng-model="networkFormVpnClientCtrl.modelCopy.attributes.pptpc_require_mppe" ng-model-master="networkFormVpnClientCtrl.model.attributes.pptpc_require_mppe"><label for="networkRequireMppe" translate="SETTINGS_NETWORK_VALUES_REQUIRE_MPPE"></label></div></div></div></fieldset></div></fieldset><div ng-class="{\'appFormFooter--dark\': networkFormVpnClientCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="networkFormVpnClientCtrl.showValidation = true" busy-toggle="networkFormVpnClientCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveNetwork">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="networkFormVpnClientCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],654:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkFormVpnClient",["$timeout","$stateParams","sharedAttrsDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiNetworkFormVpnClient",attrs:"=unifiNetworkFormVpnClientAttrs",onSave:"&unifiNetworkFormVpnClientOnSave",onCancel:"&unifiNetworkFormVpnClientOnCancel",isReadOnly:"=unifiNetworkFormVpnClientIsReadOnly"},controller:"NetworkFormVpnClientController",controllerAs:"networkFormVpnClientCtrl",template:a("./networkFormVpnClient.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.onSubmit=function(b){b===!0&&a.onSave()},a.$watch("model",function(a){g.updateModel(a)}),a.$on("$destroy",function(){g.removeEventHandlers()}),a.getVisibility=g.getVisibility.bind(g),a.setVisibility=g.setVisibility.bind(g),b(function(){a.isLoaded=!0},0),"add"===c.action&&d.init(a,e,f,g,["name"])}}}])},{"./networkFormVpnClient.jade":653}],655:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.$state=a,this.$translate=b,this.heyToasts=d,this.frame=f,this.networks=h,this.networkUtils=i,this.sites=j,this.preferences=k,this.defaultSortBy="name",this.isRemoving={},e.call(this,c,g)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.networks.repository.collection},d.prototype.isNetworkEditable=function(a){return"site-vpn"!==a.get("purpose")||!this.networkUtils.isRemoteSiteVpn(a)},d.prototype.isNetworkRemovable=function(a){return this.networkUtils.isRemoteSiteVpn(a)?!!this.networkUtils.getRemoteSite(a):!a.get("attr_no_delete")},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_NETWORK_DELETE_CONFIRM_TITLE",{networkName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_NETWORK_DELETE_CONFIRM_MESSAGE",{networkName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,this.networkUtils.removeNetwork(a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.$inject=["$state","$translate","$q","heyToasts","frame","CollectionView","networks","networkUtils","sites","preferences"],angular.module("app-unifi-manage").controller("NetworkListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],656:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="networksTable" collection-view-sort="networkListCtrl.view" ng-class="{      \'appTable--dark\': networkListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="networkName"><span translate="SETTINGS_NETWORK_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="purpose" class="networkPurpose"><span translate="SETTINGS_NETWORK_TABLE_HEADER_PURPOSE"></span></th><th collection-view-sort-by="ip_subnet" class="networkSubnet"><span translate="SETTINGS_NETWORK_TABLE_HEADER_SUBNET"></span></th><th collection-view-sort-by="vlan" class="networkVlan"><span translate="SETTINGS_NETWORK_TABLE_HEADER_VLAN"></span></th><th colspan="2" class="networkActions"><span translate="SETTINGS_NETWORK_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in networkListCtrl.view.getModels()" data-id="{{::model.id}}"><td ng-init="remoteSite = networkListCtrl.networkUtils.getRemoteSite(model)" class="networkName">{{::model.get(\'name\') + (remoteSite ? \' (\' + remoteSite.get(\'desc\') + \')\' : \'\')}}</td><td class="networkPurpose">{{::model.get(\'purpose\')}}</td><td class="networkSubnet">{{::model | networkSubnet}}</td><td class="networkVlan">{{::model.get(\'vlan\')}}</td><td class="networkActions appTableCell--actions"><button unifi-if-role-admin unifi-if-role-admin-and="!networkListCtrl.networkUtils.isRemoteSiteVpn(model)" ng-click="networkListCtrl.edit(model)" ng-disabled="networkListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed noHorizontalMargin"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin="false" unifi-if-role-admin-and="!networkListCtrl.networkUtils.isRemoteSiteVpn(model)" ng-click="networkListCtrl.edit(model)" ng-disabled="networkListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed noHorizontalMargin"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW"></span></button></td><td class="networkActions appTableCell--actions"><button unifi-if-role-admin unifi-if-role-admin-and="networkListCtrl.isNetworkRemovable(model)" ng-click="networkListCtrl.remove(model)" ng-disabled="networkListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed noHorizontalMargin"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!networkListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': networkListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_NETWORK_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],657:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNetworkList",["ListDirective",function(b){return new b("network",a("./networkList.jade")(),{onEdit:"&unifiNetworkListOnEdit"})}])},{"./networkList.jade":656}],658:[function(a,b,c){"use strict";function d(a,b){this.DEVICE_STATE_IDS=b,e.call(this),this.updateCollection(a.repository.collection)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){this.isConnected=!!this.collection.findWhere({type:this.deviceType,adopted:!0,state:this.DEVICE_STATE_IDS.CONNECTED})},d.$inject=["devices","DEVICE_STATE_IDS"],angular.module("app-unifi-manage").controller("NotifyDeviceRequirementController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],659:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-if=\"!notifyDeviceRequirementCtrl.isConnected\" class=\"appTooltipContainer appTooltipContainer--hoverable\"><div class=\"appBadge appBadge--warning appBadge--boxAlign\">{{'COMMON_REQUIRES_' + $parent.notifyDeviceRequirementCtrl.deviceType.toUpperCase() + '_BADGE' | translate}}</div><div ng-class=\"{'appTooltip--dark': $parent.notifyDeviceRequirementCtrl.isDark}\" class=\"appTooltip appTooltip--brief\">{{'COMMON_REQUIRES_' + $parent.notifyDeviceRequirementCtrl.deviceType.toUpperCase() + '_TOOLTIP' | translate}}</div></div>"),b.join("")}},{"jade/runtime":232}],660:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiNotifyDeviceRequirement",[function(){return{scope:{deviceType:"@unifiNotifyDeviceRequirement",isDark:"=?unifiNotifyDeviceRequirementIsDark"},controller:"NotifyDeviceRequirementController",controllerAs:"notifyDeviceRequirementCtrl",bindToController:!0,replace:!0,template:a("./notifyDeviceRequirement.jade")(),link:function(a,b,c,d){a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./notifyDeviceRequirement.jade":659}],661:[function(a,b,c){"use strict";function d(a,b){this.occupancy=a,this.occupancyAttrs={},this.URLS=b,f.call(this)}var e=3,f=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(f.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){var a=this.occupancy.getOccupiedChannels(),b=a.radios.ng||[],c=a.radios.na||[],d=Math.min(c.length,e),f=c.reduce(function(a,b,c,e){var f=Math.floor(e.length/d),g=Math.min(Math.floor(c/f),d-1);return a[g]||(a[g]=[]),a[g].push(b),a},Array.apply(null,{length:d})),g=Math.max(b.length,f.reduce(function(a,b){return Math.max(a,b.length)},0));this.occupancyAttrs={ng:b,na:f,channelsInRow:g,maxValue:a.maxValue}},d.prototype.isApRequired=function(){return!this.occupancyAttrs.maxValue},d.$inject=["occupancy","URLS"],angular.module("app-unifi-manage").controller("OccupancyController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],662:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'unifiOccupancy--disabled\': occupancyCtrl.isApRequired()}" class="unifiOccupancy"><div ng-show="valueTooltipVisible" ng-style="{      \'left\': valueTooltipOffset.left,      \'bottom\': valueTooltipOffset.bottom,    }" class="appTooltip appTooltip--brief">{{ valueTooltipContent }}</div><div class="appSubHeading appSubHeading--standalone verticalRhythm">{{ \'DASHBOARD_OCCUPANCY_GRAPH_DEVICES_ON_NG_CHANNEL\' | translate }}</div><unifi-occupancy-graph unifi-occupancy-graph-data="occupancyCtrl.occupancyAttrs.ng" unifi-occupancy-graph-handlers="valueTooltipHoverHandlers" unifi-occupancy-graph-channels-in-row="occupancyCtrl.occupancyAttrs.channelsInRow" unifi-occupancy-graph-max-value="occupancyCtrl.occupancyAttrs.maxValue"></unifi-occupancy-graph><div class="appSubHeading appSubHeading--standalone verticalRhythm verticalRhythmTop">{{ \'DASHBOARD_OCCUPANCY_GRAPH_DEVICES_ON_NA_CHANNEL\' | translate }}</div><unifi-occupancy-graph ng-repeat="radios in occupancyCtrl.occupancyAttrs.na track by $index" unifi-occupancy-graph-data="radios" unifi-occupancy-graph-handlers="valueTooltipHoverHandlers" unifi-occupancy-graph-channels-in-row="occupancyCtrl.occupancyAttrs.channelsInRow" unifi-occupancy-graph-max-value="occupancyCtrl.occupancyAttrs.maxValue"></unifi-occupancy-graph><div ng-if="occupancyCtrl.isApRequired()" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--centered appInfoBox--solid appInfoBox--wide withLayerShadow"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DASHBOARD_OCCUPANCY_GRAPH_AP_REQUIRED_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="DASHBOARD_OCCUPANCY_GRAPH_AP_REQUIRED" translate-values="{unifiAPLink: occupancyCtrl.URLS.UNIFI_AP}" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],663:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiOccupancy",["$timeout","d3BBox","devices",function(b,c,d){var e=15;return{controller:"OccupancyController",controllerAs:"occupancyCtrl",replace:!0,scope:{},template:a("./occupancy.jade")(),link:function(a,b,f,g){a.valueTooltipVisible=!1,a.valueTooltipHoverHandlers={mouseover:function(d,f){a.$apply(function(){a.valueTooltipVisible=!0;var g=c.getRelativeBBox(d.target,b[0]);a.valueTooltipOffset={left:Math.ceil(g.left+g.width/2)+"px",bottom:Math.ceil(b[0].getBoundingClientRect().height-g.top+e)+"px"},a.valueTooltipContent=f.value})},mouseout:function(){a.$apply(function(){a.valueTooltipVisible=!1})}},g.updateCollection(d.repository.collection),a.$on("$destroy",function(){g.removeEventHandlers()})}}}])},{"./occupancy.jade":662}],664:[function(a,b,c){"use strict";function d(a,b,c,d){this.d3=a,this.d3Transform=b,this.options=d,this.render=c(this._render.bind(this),{throttleWait:1e3/15})}d.prototype.setParentElement=function(a){this.parentElement=a},d.prototype._render=function(a,b,c,d){if(!this.parentElement)throw new Error("Parent element is required.");if(!a)throw new Error("Data is required.");if(!angular.isArray(a))throw new Error("Data should be an Array.");c=c||0,d=d||this.d3.max(a,function(a){return a.value});var e=this.parentElement.clientHeight,f=this.parentElement.clientWidth;this.svgElement=this.d3.select(this.parentElement).ubntSelectBuilder("svg").withClass(this.options.selector.graph).build().attr("height",e).attr("width",f);var g=e-this.options.xAxisHeightInPx,h=f,i=this._calculateXPadding(a,c),j=this.d3.scale.ordinal().domain(a.map(function(a){return a.label})).rangeBands([0,h],i,0),k=this._calculateGrid(d,j,g);this._renderPlot(a,b,j,k,g),this._renderXAxis(a,j,g)},d.prototype._calculateXPadding=function(a,b){var c=b*(1+this.options.xAxisPadding);return(c-a.length)/c||0},d.prototype._calculateGrid=function(a,b,c){for(var d=0,e=this.options.minBoxesInRow;!d&&e<=Math.max(a,this.options.minBoxesInRow);){var f=b.rangeBand()/e;Math.ceil(a/e)*f<c?d=f:e++}return{boxSize:d,boxesInRow:e}},d.prototype._renderPlot=function(a,b,c,d,e){this.svgElement.ubntSelectBuilder("g").withClass(this.options.selector.plot).build(function(f){f.ubntSelectAllBuilder("g").withData(a).withClass(this.options.selector.boxes).build().attr("transform",function(a){return this.d3Transform.translate(c(a.label),0)}.bind(this)).ubntEach(function(a,f){this._renderBoxes(a,f,c,d,e),this._addEventHandlers(a,b)}.bind(this))}.bind(this))},d.prototype._renderBoxes=function(a,b,c,d,e){a.ubntSelectBuilder("rect").withClass(this.options.selector.bbox).build().attr("y",e-d.boxSize*Math.ceil(b.value/3)).attr("display",b.value?"block":"none").attr("height",d.boxSize*Math.ceil(b.value/3)).attr("width",c.rangeBand());var f=this.options.boxMarginInPts,g=d.boxSize,h=Math.max(0,d.boxSize-2*f);a.ubntSelectAllBuilder("rect").withData(this.d3.range(b.value)).withClass(this.options.selector.box).build(function(a,b,c){var i=g*(c%d.boxesInRow),j=g*(Math.floor(c/d.boxesInRow)+1);a.attr("height",h).attr("width",h).attr("x",f+i).attr("y",e-j)})},d.prototype._addEventHandlers=function(a,b){Object.keys(b||{}).forEach(function(c){a.on(c,function(a){b[c](this.d3.event,a)}.bind(this))}.bind(this))},d.prototype._renderXAxis=function(a,b,c){this.svgElement.ubntSelectBuilder("g").withClass(this.options.selector.xAxis).build().attr("transform",this.d3Transform.translate(0,c)).call(this.d3.svg.axis().scale(b).tickSize(this.options.xAxisTickSize).outerTickSize(this.options.xAxisLineSize).orient("bottom").tickFormat(function(b,c){return a[c].label}))},d.$inject=["d3","d3Transform","inhibitor","OCCUPANCY_GRAPH"],angular.module("app-unifi-manage").controller("OccupancyGraphController",d)},{}],665:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiOccupancyGraph"><svg class="unifiOccupancyGraph__graph"></svg></div>'),b.join("")}},{"jade/runtime":232}],666:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiOccupancyGraph",["$timeout","$window","APP_EVENTS",function(b,c,d){return{controller:"OccupancyGraphController",controllerAs:"occupancyGraphCtrl",replace:!0,scope:{data:"=unifiOccupancyGraphData",handlers:"=unifiOccupancyGraphHandlers",channelsInRow:"=?unifiOccupancyGraphChannelsInRow",maxValue:"=?unifiOccupancyGraphMaxValue"},template:a("./occupancyGraph.jade")(),link:function(a,e,f,g){function h(){g.render(a.data,a.handlers,a.channelsInRow,a.maxValue)}g.setParentElement(e[0]),a.$watchGroup(["data","handlers","channelsInRow","maxValue"],function(){b(h,0)}),c.addEventListener("resize",h,!1),a.$on("$destroy",function(){c.removeEventListener("resize",h,!1)}),a.$on(d.PROPERTY_PANEL_OPEN,function(a,c){b(h,c)}),a.$on(d.PROPERTY_PANEL_CLOSE,function(a,c){b(h,c)})}}}])},{"./occupancyGraph.jade":665}],667:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.$stateParams=b,this.clientUplinkUtils=c,this.clients=d,this.devices=g,this.knownClients=h,this.pastConnections=j,this.INSIGHTS_DEFAULTS=m,this.getUplinkPropertyPanelState=c.getUplinkPropertyPanelState.bind(c),this.comparator=k,this.filter=new i,this.intervals=[m.INTERVAL.DAY,m.INTERVAL.WEEK,m.INTERVAL.MONTH],this.initDateInterval(),e.call(this,a,f,l)}var e=a("../../controllers/BaseClientListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.pastConnections.repository.collection},d.prototype.initDateInterval=function(){this.interval=this.pastConnections.getInterval(),this.start=this.pastConnections.getStart(),this.end=this.pastConnections.getEnd()},d.prototype.initView=function(){e.prototype.initView.call(this),this.pastConnections.repository.collection.on("add remove change reset",this.setFilterCounts,this),this.setFilterCounts()},d.prototype.destroyView=function(){e.prototype.destroyView.call(this),this.pastConnections.repository.collection.off("add remove change reset",this.setFilterCounts,this)},d.prototype.initFilters=function(){e.prototype.initFilters.call(this)},d.prototype.setFilterCounts=function(){this.counts={all:this.pastConnections.repository.collection.length,guest:0},this.pastConnections.repository.collection.each(function(a){a.get("is_guest")&&this.counts.guest++}.bind(this))},d.prototype.getClient=function(a){return this.clients.repository.collection.get(a.get("mac"))||this.knownClients.repository.collection.get(a.get("mac"))||null},d.prototype.doesClientExist=function(a){return null!==this.getClient(a)},d.prototype.getUplinkDevice=function(a){return this.clientUplinkUtils.getUplink(a)||null},d.prototype.getUplinkDeviceName=function(a){var b=this.clientUplinkUtils.getUplinkDisplayName(a);return b?b:this.clientUplinkUtils.getUplinkMac(a)},d.prototype.doesDeviceExist=function(a){return null!==this.getUplinkDevice(a)},d.prototype.updateInterval=function(a){this.beginStateChange(),this.interval=a,this.pastConnections.setInterval(this.interval),this.listState.addFilter("interval",this.interval.name),this.commitStateChange()},d.prototype.updateDateInterval=function(a,b){this.pastConnections.updateDateInterval(a,b),this.showLoader=!0,this.pastConnections.repository.refresh().then(function(){this.showLoader=!1}.bind(this)),a!==this.listState.getFilter("start")&&(this.beginStateChange(),this.listState.addFilter("start",a),this.listState.addFilter("interval",this.interval.name),this.commitStateChange())},d.$inject=["$injector","$stateParams","clientUplinkUtils","clients","CollectionView","devices","knownClients","PastConnectionFilter","pastConnections","pastConnectionsComparator","preferences","INSIGHTS_DEFAULTS"],angular.module("app-unifi-manage").controller("PastConnectionListController",d)},{"../../controllers/BaseClientListController":996}],668:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="pastConnectionListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div><div class="appActionBarFilter"><div ng-click="pastConnectionListCtrl.isIntervalDropdownVisible = !pastConnectionListCtrl.isIntervalDropdownVisible" on-outside-element-click="pastConnectionListCtrl.isIntervalDropdownVisible = false" class="appMainButton appMainButton--filter appMainButton--cozy appMainButton--withDropdown">{{pastConnectionListCtrl.interval.translationKey | translate:pastConnectionListCtrl.interval.translationParams}}<span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{\'is-dropdown-visible\': pastConnectionListCtrl.isIntervalDropdownVisible}" class="appDropdown appDropdown--left appDropdown--inButton"><li ng-repeat="interval in pastConnectionListCtrl.intervals" ng-click="pastConnectionListCtrl.updateInterval(interval)" class="appDropdown__item">{{interval.translationKey | translate:interval.translationParams}}</li></ul></div></div><div class="appActionBarFilter appActionBarFilter--noBorder"><unifi-date-interval-selector unifi-date-interval-selector-value="pastConnectionListCtrl.interval.value" unifi-date-interval-selector-unit="pastConnectionListCtrl.interval.unit" unifi-date-interval-selector-start="pastConnectionListCtrl.start" unifi-date-interval-selector-end="pastConnectionListCtrl.end" unifi-date-interval-selector-on-change="pastConnectionListCtrl.updateDateInterval(start, end)"></unifi-date-interval-selector></div><div class="appActionBarFilter"><ul class="buttonGroup buttonGroup--shrink appMainButtonGroup appMainButtonGroup--filter appMainButtonGroup--cozy"><li ng-click="pastConnectionListCtrl.clearGuestFilter()" ng-class="{\'is-button-selected\': !pastConnectionListCtrl.hasGuestFilter()}" class="button appMainButton appMainButton--cozy">{{\'PAST_CONNECTION_GUEST_FILTER_ALL\' | translate}} ({{pastConnectionListCtrl.counts.all}})</li><li ng-click="pastConnectionListCtrl.setGuestFilter(false)" ng-class="{\'is-button-selected\': pastConnectionListCtrl.getGuestFilter() === false}" class="button appMainButton appMainButton--cozy">{{\'PAST_CONNECTION_GUEST_FILTER_USERS\' | translate}} ({{pastConnectionListCtrl.counts.all - pastConnectionListCtrl.counts.guest}})</li><li ng-click="pastConnectionListCtrl.setGuestFilter(true)" ng-class="{\'is-button-selected\': pastConnectionListCtrl.getGuestFilter() === true}" class="button appMainButton appMainButton--cozy">{{\'PAST_CONNECTION_GUEST_FILTER_GUESTS\' | translate}} ({{pastConnectionListCtrl.counts.guest}})</li></ul></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="pastConnectionListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="pastConnectionListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><unifi-loading-status unifi-loading-status-is-loading="pastConnectionListCtrl.pastConnections.repository.collection.isLoading &amp;&amp; pastConnectionListCtrl.showLoader" unifi-loading-status-is-medium="true"></unifi-loading-status><table id="pastConnectionsTable" collection-view-sort="pastConnectionListCtrl.view" ng-class="{          \'is-not-responsive\': !pastConnectionListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="pastConnectionName"><span translate="PAST_CONNECTION_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="is_guest" class="pastConnectionClientType"><span translate="PAST_CONNECTION_TABLE_HEADER_USER_GUEST"></span></th><th collection-view-sort-by="assoc_time" class="pastConnectionAssociated"><span translate="PAST_CONNECTION_TABLE_HEADER_ASSOCIATED"></span></th><th collection-view-sort-by="duration" class="pastConnectionDuration visible--smUp"><span translate="PAST_CONNECTION_TABLE_HEADER_DURATION"></span></th><th collection-view-sort-by="tx_bytes" class="pastConnectionDownload visible--mdUp"><span translate="PAST_CONNECTION_TABLE_HEADER_DOWNLOAD"></span></th><th collection-view-sort-by="rx_bytes" class="pastConnectionUpload visible--mdUp"><span translate="PAST_CONNECTION_TABLE_HEADER_UPLOAD"></span></th><th collection-view-sort-by="ip" class="pastConnectionIp visible--smUp"><span translate="PAST_CONNECTION_TABLE_HEADER_IP"></span></th><th class="pastConnectionLastAp visible--lgUp"><span translate="PAST_CONNECTION_TABLE_HEADER_LAST_AP"></span></th></tr></thead><tfoot ng-if="pastConnectionListCtrl.view.getModels().length"><tr><td colspan="8"><unifi-list-pagination unifi-list-pagination-current-page="pastConnectionListCtrl.currentPage" unifi-list-pagination-rows-per-page="pastConnectionListCtrl.rowsPerPage" unifi-list-pagination-total-rows="pastConnectionListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in pastConnectionListCtrl.view.getModels(),              startFrom (pastConnectionListCtrl.currentPage - 1) * pastConnectionListCtrl.rowsPerPage,              limitTo pastConnectionListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-init="client = pastConnectionListCtrl.getClient(model)"><td class="pastConnectionName"><a ng-if="client" ng-attr-title="{{model.get(\'mac\')}}" data-id="{{::client.id}}" data-is-wired="{{::client.get(\'is_wired\')}}" data-is-guest="{{::client.get(\'is_guest\')}}" unifi-open-panel="client" unifi-open-panel-active-tab="\'details\'">{{::client.getDisplayName()}}</a><span ng-if="!client" ng-attr-title="{{model.get(\'mac\')}}">{{::model.getDisplayName()}}</span></td><td class="pastConnectionClientType">{{::(model.get(\'is_guest\') ? \'PAST_CONNECTION_TABLE_VALUE_USER_GUEST_GUEST\' : \'PAST_CONNECTION_TABLE_VALUE_USER_GUEST_USER\') | translate}}</td><td class="pastConnectionAssociated">{{::model.get(\'assoc_time\') * 1000 | moment: \'format\': \'datetime\'}}</td><td class="pastConnectionDuration visible--smUp">{{::model.get(\'duration\') | seconds}}</td><td class="pastConnectionDownload visible--mdUp">{{::model.get(\'tx_bytes\') | bytes}}</td><td class="pastConnectionUpload visible--mdUp">{{::model.get(\'rx_bytes\') | bytes}}</td><td class="pastConnectionIp visible--smUp">{{::model.get(\'ip\')}}</td><td class="pastConnectionLastAp visible--lgUp"><a ng-init="uplink = pastConnectionListCtrl.getUplinkDevice(model); states = pastConnectionListCtrl.getUplinkPropertyPanelState(model, uplink)" ng-class="{\'is-link-disabled\': !pastConnectionListCtrl.doesDeviceExist(model)}" data-id="{{::uplink.id}}" data-device-type="{{::uplink.get(\'type\')}}" unifi-open-panel="uplink" unifi-open-panel-active-tab="uplink.get(\'type\') === \'usw\' ? \'ports\' : \'details\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="states">{{::pastConnectionListCtrl.getUplinkDeviceName(model)}}</a></td></tr></tbody></table><div ng-if="!pastConnectionListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="PAST_CONNECTION_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!pastConnectionListCtrl.isFiltered()" translate="PAST_CONNECTION_TABLE_EMPTY_NO_CONNECTIONS" class="noMarginBottom"></p><p ng-if="pastConnectionListCtrl.isFiltered()" translate="PAST_CONNECTION_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],669:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPastConnectionList",["PaginatedListDirective",function(b){return new b("pastConnection",a("./pastConnectionList.jade")())}])},{"./pastConnectionList.jade":668}],670:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.clients=c,this.clientUplinkUtils=b,this.pastGuestAuthorizations=h,this.getUplinkPropertyPanelState=b.getUplinkPropertyPanelState.bind(b),this.filter=new g,this.defaultSortBy="name",this.INSIGHTS_DEFAULTS=f,this.intervals=[f.INTERVAL.DAY,f.INTERVAL.WEEK,f.INTERVAL.MONTH],this.initDateInterval(),e.call(this,a,d,i)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.pastGuestAuthorizations.repository.collection},d.prototype.initDateInterval=function(){this.interval=this.pastGuestAuthorizations.getInterval(),this.start=this.pastGuestAuthorizations.getStart(),this.end=this.pastGuestAuthorizations.getEnd()},d.prototype.getClient=function(a){return this.clients.repository.collection.get(a.get("mac"))||null},d.prototype.getUplinkDevice=function(a){return this.clientUplinkUtils.getUplink(a)||null},d.prototype.getUplinkDeviceName=function(a){var b=this.clientUplinkUtils.getUplinkDisplayName(a);return b?b:this.clientUplinkUtils.getUplinkMac(a)},d.prototype.doesUplinkDeviceExist=function(a){return null!==this.getUplinkDevice(a)},d.prototype.updateInterval=function(a){this.beginStateChange(),this.interval=a,this.pastGuestAuthorizations.setInterval(this.interval),this.listState.addFilter("interval",this.interval.name),this.commitStateChange()},d.prototype.updateDateInterval=function(a,b){this.pastGuestAuthorizations.updateDateInterval(a,b),this.showLoader=!0,this.pastGuestAuthorizations.repository.refresh().then(function(){this.showLoader=!1}.bind(this)),a!==this.listState.getFilter("start")&&(this.beginStateChange(),this.listState.addFilter("start",a),this.listState.addFilter("interval",this.interval.name),this.commitStateChange())},d.$inject=["$injector","clientUplinkUtils","clients","CollectionView","INSIGHTS_DEFAULTS","PastGuestAuthorizationFilter","pastGuestAuthorizations","preferences"],angular.module("app-unifi-manage").controller("PastGuestAuthorizationListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],671:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="pastGuestAuthorizationListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div><div class="appActionBarFilter"><div ng-click="pastGuestAuthorizationListCtrl.isIntervalDropdownVisible = !pastGuestAuthorizationListCtrl.isIntervalDropdownVisible" on-outside-element-click="pastGuestAuthorizationListCtrl.isIntervalDropdownVisible = false" class="appMainButton appMainButton--filter appMainButton--cozy appMainButton--withDropdown">{{pastGuestAuthorizationListCtrl.interval.translationKey | translate:pastGuestAuthorizationListCtrl.interval.translationParams}}<span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{\'is-dropdown-visible\': pastGuestAuthorizationListCtrl.isIntervalDropdownVisible}" class="appDropdown appDropdown--left appDropdown--inButton"><li ng-repeat="interval in pastGuestAuthorizationListCtrl.intervals" ng-click="pastGuestAuthorizationListCtrl.updateInterval(interval)" class="appDropdown__item">{{interval.translationKey | translate:interval.translationParams}}</li></ul></div></div><div class="appActionBarFilter appActionBarFilter--noBorder"><unifi-date-interval-selector unifi-date-interval-selector-value="pastGuestAuthorizationListCtrl.interval.value" unifi-date-interval-selector-unit="pastGuestAuthorizationListCtrl.interval.unit" unifi-date-interval-selector-start="pastGuestAuthorizationListCtrl.start" unifi-date-interval-selector-end="pastGuestAuthorizationListCtrl.end" unifi-date-interval-selector-on-change="pastGuestAuthorizationListCtrl.updateDateInterval(start, end)"></unifi-date-interval-selector></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="pastGuestAuthorizationListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="pastGuestAuthorizationListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><unifi-loading-status unifi-loading-status-is-loading="pastGuestAuthorizationListCtrl.pastGuestAuthorizations.repository.collection.isLoading &amp;&amp; pastGuestAuthorizationListCtrl.showLoader" unifi-loading-status-is-medium="true"></unifi-loading-status><table id="pastGuestAuthorizationTable" collection-view-sort="pastGuestAuthorizationListCtrl.view" ng-class="{          \'is-not-responsive\': !pastGuestAuthorizationListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="pastGuestAuthorizationName"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="package" class="pastGuestAuthorizationPackage"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_PACKAGE"></span></th><th collection-view-sort-by="amount" class="pastGuestAuthorizationAmount"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_AMOUNT"></span></th><th collection-view-sort-by="authorized_by" class="pastGuestAuthorizationAuthorizedBy visible--lgUp"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_AUTHORIZED_BY"></span></th><th collection-view-sort-by="start" class="pastGuestAuthorizationStart visible--mdUp"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_START"></span></th><th collection-view-sort-by="duration" class="pastGuestAuthorizationDuration visible--mdUp"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_DURATION"></span></th><th collection-view-sort-by="tx_bytes" class="pastGuestAuthorizationDownload visible--lgUp"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_DOWNLOAD"></span></th><th collection-view-sort-by="rx_bytes" class="pastGuestAuthorizationUpload visible--lgUp"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_UPLOAD"></span></th><th collection-view-sort-by="ip" class="pastGuestAuthorizationIp visible--mdUp"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_IP"></span></th><th collection-view-sort-by="ap_mac" class="pastGuestAuthorizationLastAp visible--lgUp"><span translate="PAST_GUEST_AUTHORIZATION_TABLE_HEADER_LAST_AP"></span></th></tr></thead><tfoot ng-if="pastGuestAuthorizationListCtrl.view.getModels().length"><tr><td colspan="10"><unifi-list-pagination unifi-list-pagination-current-page="pastGuestAuthorizationListCtrl.currentPage" unifi-list-pagination-rows-per-page="pastGuestAuthorizationListCtrl.rowsPerPage" unifi-list-pagination-total-rows="pastGuestAuthorizationListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in pastGuestAuthorizationListCtrl.view.getModels(),                startFrom (pastGuestAuthorizationListCtrl.currentPage - 1) * pastGuestAuthorizationListCtrl.rowsPerPage,                limitTo pastGuestAuthorizationListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-init="client = pastGuestAuthorizationListCtrl.getClient(model)"><td class="pastGuestAuthorizationName"><a ng-if="client" ng-attr-title="{{model.get(\'mac\')}}" data-id="{{::client.id}}" data-is-wired="{{::client.get(\'is_wired\')}}" data-is-guest="{{::client.get(\'is_guest\')}}" unifi-open-panel="client" unifi-open-panel-active-tab="\'details\'">{{::client.getDisplayName()}}</a><span ng-if="!client" ng-attr-title="{{model.get(\'mac\')}}">{{::model.getDisplayName()}}</span></td><td class="pastGuestAuthorizationPackage">{{::model.get(\'package\')}}</td><td class="pastGuestAuthorizationAmount">{{::model | currency}}</td><td class="pastGuestAuthorizationAuthorizedBy visible--lgUp">{{::model | guestAuthorization}}</td><td class="pastGuestAuthorizationStart visible--mdUp">{{::model.get(\'start\') * 1000 | moment: \'format\': \'datetime\'}}</td><td class="pastGuestAuthorizationDuration visible--mdUp">{{::model.get(\'duration\') | seconds}}</td><td class="pastConnectionDownload visible--lgUp">{{::model.get(\'tx_bytes\') | bytes}}</td><td class="pastConnectionUpload visible--lgUp">{{::model.get(\'rx_bytes\') | bytes}}</td><td class="ip visible--mdUp">{{::model.get(\'ip\')}}</td><td class="pastGuestAuthorizationLastAp visible--lgUp"><a ng-init="uplink = pastGuestAuthorizationListCtrl.getUplinkDevice(model); states = pastGuestAuthorizationListCtrl.getUplinkPropertyPanelState(model, uplink)" ng-class="{\'is-link-disabled\': !pastGuestAuthorizationListCtrl.doesUplinkDeviceExist(model)}" data-id="{{::uplink.id}}" data-device-type="{{::uplink.get(\'type\')}}" unifi-open-panel="uplink" unifi-open-panel-active-tab="uplink.get(\'type\') === \'usw\' ? \'ports\' : \'details\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="states">{{::pastGuestAuthorizationListCtrl.getUplinkDeviceName(model)}}</a></td></tr></tbody></table><div ng-if="!pastGuestAuthorizationListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="PAST_GUEST_AUTHORIZATION_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-show="!pastGuestAuthorizationListCtrl.isFiltered()" translate="PAST_GUEST_AUTHORIZATION_TABLE_EMPTY_NO_CONNECTIONS" class="noMarginBottom"></p><p ng-show="pastGuestAuthorizationListCtrl.isFiltered()" translate="PAST_GUEST_AUTHORIZATION_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],672:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPastGuestAuthorizationList",["PaginatedListDirective",function(b){return new b("pastGuestAuthorization",a("./pastGuestAuthorizationList.jade")())}])},{"./pastGuestAuthorizationList.jade":671}],673:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<span ng-if="hasPendingChanges()" title="{{\'DEVICE_PROPERTIES_PENDING_CHANGES_NOTIFICATION_TITLE\' | translate}}" class="icon ubnt-icon--ellipsis"></span>'),b.join("")}},{"jade/runtime":232}],674:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPendingChangesIcon",[function(){return{scope:{model:"=unifiPendingChangesIconModel",group:"@unifiPendingChangesIconGroup"},replace:!0,template:a("./pendingChangesIcon.jade")(),link:function(a){a.hasPendingChanges=function(){return!!a.model&&a.model.hasPendingGroup(a.group)}}}}])},{"./pendingChangesIcon.jade":673}],675:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-if="hasPendingChanges()" class="appTags appTags--wrapped noMarginBottom"><div ng-repeat="group in getPendingGroups()" class="tag appTag appTag--cozy appTag--dark appTag--transparent">{{group | translate}}<div ng-click="clearPendingGroup(group)" class="appTag__close"></div></div><button ng-click="applyPendingChanges()" busy-toggle="isApplyingChanges" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--success withLightBorderHighlight">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button></div>'),b.join("")}},{"jade/runtime":232}],676:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPendingChangesList",[function(){return{scope:{model:"=unifiPendingChangesListModel",save:"&unifiPendingChangesListSave"},template:a("./pendingChangesList.jade")(),link:function(a){a.isApplyingChanges=!1,a.applyPendingChanges=function(){a.save&&(a.isApplyingChanges=!0,a.save({model:a.model})["finally"](function(){a.isApplyingChanges=!1}))},a.hasPendingChanges=function(){return!!a.model&&a.model.hasPendingChanges()},a.getPendingGroups=function(){return a.model.getPendingGroups()},a.clearPendingGroup=function(b){return a.model.clearPendingGroup(b)}}}}])},{"./pendingChangesList.jade":675}],677:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$q=a,this.batchEdit=b,this.devices=c,this.deviceUtils=d,this.deviceBatchUtils=f,this.propertyPanel=g,this.heyToasts=h,this.isDropdownVisible=!1,this.isApplying={},this.collectionChangeEvent="remove pending:add pending:remove pending:change pending:reset",e.call(this),this.updateCollection(c.repository.collection)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.addEventHandlers=function(){e.prototype.addEventHandlers.call(this),this.batchEdit.collection.on("change:collection pending:change",this.onCollectionChange,this)},d.prototype.removeEventHandlers=function(){e.prototype.removeEventHandlers.call(this),this.batchEdit.collection.off("change:collection pending:change",this.onCollectionChange,this)},d.prototype.onCollectionChange=function(){this._pendingDevices=this.propertyPanel.getItemsWithPendingChanges(),this._pendingDevices.length||(this.isDropdownVisible=!1)},d.prototype.saveAllPendingChanges=function(){return this.isApplyingAll=!0,this.$q.all(this._pendingDevices.map(function(a){return this.savePendingChanges(a)}.bind(this))).then(function(){this.isApplyingAll=!1}.bind(this))},d.prototype.savePendingChanges=function(a){this.isApplying[a.id]=!0;var b;return b=this.isBatchModel(a)?this.deviceBatchUtils.savePendingChanges(a,{wait:!0}).then(function(b){return(a.get("error")||[]).length?this.heyToasts.pushWarning(b):this.heyToasts.pushSuccess(b),!0}.bind(this)):this.deviceUtils.savePendingChanges(a,{wait:!0}).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this)),b["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){delete this.isApplying[a.id]}.bind(this))},d.prototype.clearPendingChanges=function(a){return a.clearPendingChanges()},d.prototype.hasChanges=function(){return this.getChangesCount()>0},d.prototype.getChangesCount=function(){return this._pendingDevices?this._pendingDevices.reduce(function(a,b){return this.isBatchModel(b)?a+b.get("collection").length:a+1}.bind(this),0):0},d.prototype.getChangedDevices=function(){return this._pendingDevices},d.prototype.isBatchModel=function(a){return!(!a||!a.isBatch)},d.$inject=["$q","batchEdit","devices","deviceUtils","deviceBatchUtils","propertyPanel","heyToasts"],angular.module("app-unifi-manage").controller("PendingDeviceChangesController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],678:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-if="pendingDeviceChangesCtrl.hasChanges()" class="appPopoverContainer"><div ng-click="pendingDeviceChangesCtrl.toggleDropdown()" class="appCountLabelContainer appCountLabelContainer--doubleLine clickable"><div class="count count--round appCount appCount--warning"><div class="count__value">{{pendingDeviceChangesCtrl.getChangesCount()}}</div></div><div translate="COMMON_PROPERTY_PANEL_PENDING_CHANGES" translate-values="{count: pendingDeviceChangesCtrl.getChangesCount()}" translate-interpolation="messageformat" class="appCountLabel appCountLabel--uppercase"></div><div class="appCountLabel appActionIcon appActionIcon--dark icon ubnt-icon--pointer-down"></div></div><div ng-if="pendingDeviceChangesCtrl.isDropdownVisible" class="appPopover appPopover--withFooter appPopover--scrollable appPopover--onActionIcon appPopover--bottomLeft"><div class="appPopover__inner"><div class="appPopover__content noHorizontalPadding"><ul class="appMenu appMenu--hoverable"><li ng-repeat="model in pendingDeviceChangesCtrl.getChangedDevices()" class="appMenu__item"><div ng-switch="pendingDeviceChangesCtrl.isBatchModel(model)" class="iconText appIconText unifiDeviceIconText unifiDeviceIconText--withActions"><div ng-switch-when="true" unifi-batch-device-icon="model" class="iconText__icon unifiBatchDeviceIcon--offsetCount"></div><div ng-switch-default unifi-device-icon="model" class="iconText__icon"></div><div class="iconText__text"><div>{{model.getDisplayName()}}</div><div><button type="button" ng-click="pendingDeviceChangesCtrl.savePendingChanges(model)" busy-toggle="pendingDeviceChangesCtrl.isApplying[model.id]" busy-toggle-spinner-classes="[\'appSpinner appSpinner--dark appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--condensed appMainButton--transparent success noPaddingLeft applyChanges"><span class="button__icon icon ubnt-icon--check-2 visible--smUp"></span><span>{{\'COMMON_ACTIONS_APPLY\' | translate}}</span></button><button type="button" ng-click="pendingDeviceChangesCtrl.clearPendingChanges(model)" ng-hide="pendingDeviceChangesCtrl.isApplying[model.id]" class="appMainButton appMainButton--condensed appMainButton--transparent neutral discardChanges"><span class="button__icon icon ubnt-icon--x visible--smUp"></span><span>{{\'COMMON_ACTIONS_DISCARD\' | translate}}</span></button></div></div></div></li></ul></div><div class="appPopover__footer"><button ng-click="pendingDeviceChangesCtrl.saveAllPendingChanges()" busy-toggle="pendingDeviceChangesCtrl.isApplyingAll" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--success">{{\'COMMON_ACTIONS_APPLY_ALL\' | translate}}</button></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],679:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPendingDeviceChanges",[function(){return{controller:"PendingDeviceChangesController",controllerAs:"pendingDeviceChangesCtrl",template:a("./pendingDeviceChanges.jade")(),link:function(a,b,c,d){a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./pendingDeviceChanges.jade":678}],680:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j){this.devices=f,this.deviceStateUtils=g,this.DEVICE_STATES=j,this.isSaveQueued=!0,this.accordions={details:{overview:!0},configure:{general:!0}},e.call(this,a,b,c,i,d,h)}var e=a("../../controllers/BasePropertiesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.reset=function(){this.deviceState=void 0,this.deviceStatus=void 0,this.showConfigureTab=!1,this.showAdoptTab=!1},d.prototype.onModelChange=function(){this.persistAdoptTab=this.showAdoptTab&&this.deviceStateUtils.getRawDeviceState(this.model)===this.DEVICE_STATES.ADOPTING,this.reset(),this.model&&(this.deviceState=this.deviceStateUtils.getDeviceState(this.model),this.deviceStatus=this.deviceStateUtils.getDeviceStatus(this.model),this.showConfigureTab=this.model.get("adopted"),this.showAdoptTab=this.persistAdoptTab||this.deviceState===this.DEVICE_STATES.ADOPTION_FAILED||this.deviceState===this.DEVICE_STATES.MANAGED_BY_OTHER)},d.$inject=["$q","$timeout","$translate","account","devices","deviceStateUtils","frame","propertyPanel","DEVICE_STATES"],angular.module("app-unifi-manage").controller("PhonePropertiesController",d)},{"../../controllers/BasePropertiesController":1001}],681:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-collapsed\': phonePropertiesCtrl.isCollapsed()}" ng-if="phonePropertiesCtrl.model" class="unifiPanelItem phoneProperties"><unifi-loading-status unifi-loading-status-is-loading="phonePropertiesCtrl.isLoading" unifi-loading-status-failed="phonePropertiesCtrl.failedToLoad" unifi-loading-status-retry="phonePropertiesCtrl.init()"></unifi-loading-status><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__collapseToggle"><div ng-click="phonePropertiesCtrl.toggleCollapsed()" class="appActionIcon"><span ng-class="{            \'unifi-icon--default-collapse\': !phonePropertiesCtrl.isCollapsed(),            \'unifi-icon--default-expand\': phonePropertiesCtrl.isCollapsed()          }" class="button__icon icon"></span></div></div><div class="unifiPanelItemHeader__avatar"><div unifi-device-icon="::phonePropertiesCtrl.model"></div></div><div class="unifiPanelItemHeader__title"><span unifi-device-status="::phonePropertiesCtrl.model" unifi-device-status-is-cozy="true" unifi-device-status-is-truncated="true" unifi-device-status-with-icons="true" unifi-device-status-label="phonePropertiesCtrl.model.getDisplayName()"></span><div class="unifiPanelItemHeader__status"><span unifi-device-status-badge="::phonePropertiesCtrl.model"></span></div></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div unifi-device-button-adopt="::phonePropertiesCtrl.model" unifi-device-button-adopt-collection="::phonePropertiesCtrl.devices.repository.collection" unifi-device-button-adopt-is-reverse="true" class="appActionIcon appActionIcon--primary appActionIcon--reverse appActionIcon--round"></div><div unifi-device-button-restart="::phonePropertiesCtrl.model" class="appActionIcon"></div><div unifi-device-button-locate="::phonePropertiesCtrl.model" unifi-device-button-locate-with-map="true" class="appActionIcon"></div><div unifi-device-button-upgrade="::phonePropertiesCtrl.model" class="appActionIcon"></div><div ng-click="phonePropertiesCtrl.toggleUndocked()" title="{{phonePropertiesCtrl.isUndocked() ? \'COMMON_PROPERTY_PANEL_ITEM_DOCK\' : \'COMMON_PROPERTY_PANEL_ITEM_UNDOCK\' | translate}}" class="appActionIcon visible--mdUp"><span ng-class="{              \'ubnt-icon--header-maximize\': !phonePropertiesCtrl.isUndocked(),              \'ubnt-icon--header-minimize\': phonePropertiesCtrl.isUndocked()            }" class="button__icon icon"></span></div><div ng-click="phonePropertiesCtrl.removePanel()" title="{{\'COMMON_PROPERTY_PANEL_ITEM_REMOVE\' | translate}}" class="appActionIcon removePanelItem"><span class="button__icon icon unifi-icon--default-close"></span></div></div></div></div><div class="unifiPanelItemBody"><div class="unifiPanelItemBodySection"><div unifi-device-properties-license-warning="::phonePropertiesCtrl.model" class="unifiDevicePropertiesLicenseWarning"></div></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><ul class="appTabs appTabs--compressed appTabs--alignLeft"><li ng-click="phonePropertiesCtrl.setActiveTab(\'details\')" ng-class="{            \'is-tab-selected\': phonePropertiesCtrl.getActiveTab() === \'details\',            \'is-tab-loading\': phonePropertiesCtrl.loadingTab === \'details\'          }" translate="DEVICE_PROPERTIES_TAB_DETAILS" class="tabs__item details"></li><li unifi-if-role-admin unifi-if-role-admin-and="phonePropertiesCtrl.showConfigureTab" ng-click="phonePropertiesCtrl.setActiveTab(\'configure\')" ng-class="{            \'is-tab-selected\': phonePropertiesCtrl.getActiveTab() === \'configure\',            \'is-tab-loading\': phonePropertiesCtrl.loadingTab === \'configure\'          }" translate="DEVICE_PROPERTIES_TAB_CONFIGURATION" class="tabs__item configure"></li><li unifi-if-role-admin unifi-if-role-admin-and="phonePropertiesCtrl.showAdoptTab" ng-click="phonePropertiesCtrl.setActiveTab(\'adopt\')" ng-class="{            \'is-tab-selected\': phonePropertiesCtrl.getActiveTab() === \'adopt\',            \'is-tab-loading\': phonePropertiesCtrl.loadingTab === \'adopt\'          }" translate="DEVICE_PROPERTIES_TAB_ADOPT" class="tabs__item adopt"></li></ul></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div class="unifiPanelItemContent"><div ng-if="phonePropertiesCtrl.isTabAvailable(\'details\') &amp;&amp; phonePropertiesCtrl.getActiveTab() === \'details\'" unifi-phone-properties-details class="phonePropertiesDetails"></div><div unifi-if-role-admin unifi-if-role-admin-and="phonePropertiesCtrl.showConfigureTab &amp;&amp; phonePropertiesCtrl.isTabAvailable(\'configure\')" ng-show="phonePropertiesCtrl.getActiveTab() === \'configure\'" unifi-phone-properties-configure class="phonePropertiesConfigure"></div><div unifi-if-role-admin unifi-if-role-admin-and="phonePropertiesCtrl.showAdoptTab &amp;&amp; phonePropertiesCtrl.isTabAvailable(\'adopt\')" ng-show="phonePropertiesCtrl.getActiveTab() === \'adopt\'" unifi-device-properties-adopt="::phonePropertiesCtrl.model" class="phonePropertiesAdopt"></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],682:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPhoneProperties",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiPhoneProperties"},controller:"PhonePropertiesController",controllerAs:"phonePropertiesCtrl",template:a("./phoneProperties.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./phoneProperties.jade":681}],683:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="phonePropertiesCtrl.accordions.configure.general" class="unifiPanelItemContent__section general"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::phonePropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="phonePropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers="!phonePropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-general="::phonePropertiesCtrl.model" unifi-device-properties-configure-general-is-open="phonePropertiesCtrl.accordions.configure.general" unifi-device-properties-configure-general-is-read-only="!phonePropertiesCtrl.isAdmin()" unifi-device-properties-configure-general-is-save-queued="false" unifi-device-properties-configure-general-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="apPropertiesConfigureGeneral"></div></div></accordion-group><accordion-group is-open="phonePropertiesCtrl.accordions.configure.forget" class="unifiPanelItemContent__section forget"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_FORGET\' | translate}}</accordion-heading><div unifi-initialize-when="phonePropertiesCtrl.accordions.configure.forget" unifi-pause-children-watchers="!phonePropertiesCtrl.accordions.configure.forget" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-forget="::phonePropertiesCtrl.model" unifi-device-properties-configure-forget-is-open="phonePropertiesCtrl.accordions.configure.forget" class="phonePropertiesConfigureForget"></div></div></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],684:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPhonePropertiesConfigure",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiPhoneProperties",template:a("./phonePropertiesConfigure.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"configure")}}}])},{"./phonePropertiesConfigure.jade":683}],685:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="phonePropertiesCtrl.accordions.details.overview" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_OVERVIEW\' | translate}}</accordion-heading><div ng-if="phonePropertiesCtrl.accordions.details.overview"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow macAddress"><dt>{{\'DEVICE_PROPERTIES_LABEL_MAC_ADDRESS\' | translate}}</dt><dd>{{phonePropertiesCtrl.model.get(\'mac\')}}</dd></div><div class="appDescriptionListRow modelName"><dt>{{\'DEVICE_PROPERTIES_LABEL_MODEL\' | translate}}</dt><dd>{{phonePropertiesCtrl.deviceStateUtils.getDeviceModel(phonePropertiesCtrl.model)}}</dd></div><div class="appDescriptionListRow version"><dt>{{\'DEVICE_PROPERTIES_LABEL_VERSION\' | translate}}</dt><dd><span ng-if="phonePropertiesCtrl.model.get(\'version\')">{{phonePropertiesCtrl.model.get(\'version\')}}</span><span ng-if="!phonePropertiesCtrl.model.get(\'version\')" translate="DEVICE_PROPERTIES_VALUES_VERSION_NOT_AVAILABLE"></span></dd></div></div><div ng-if="phonePropertiesCtrl.deviceStatus === \'success\'" class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow ipAddress"><dt>{{\'DEVICE_PROPERTIES_LABEL_IP_ADDRESS\' | translate}}</dt><dd>{{phonePropertiesCtrl.model.get(\'ip\')}}</dd></div><div class="appDescriptionListRow uptime"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPTIME\' | translate}}</dt><dd>{{phonePropertiesCtrl.model.get(\'uptime\') | seconds}}</dd></div></div></div></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],686:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPhonePropertiesDetails",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiPhoneProperties",template:a("./phonePropertiesDetails.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"details")}}}])},{"./phonePropertiesDetails.jade":685}],687:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.$translate=b,this.columnStore=l,this.INSIGHTS_DEFAULTS=c,this.frame=f,this.heyToasts=h,this.portForwardStats=j,this.getSiteGateway=g.getSiteGateway.bind(g),this.isColumnVisible=this.columnStore.isColumnVisible.bind(this.columnStore),this.isCustomized=this.columnStore.getCustomized.bind(this.columnStore),this.comparator=m,this.filter=new k,this.defaultSortBy="name",this.filterGroups=[],e.call(this,a,d,i)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){var a=this.listState.getFilter("view");"all"!==a&&this.filter.setViewFilter(a),this.columnGroup=this.listState.getFilter("view"),this.isFiltered=this.filter.isFiltered.bind(this.filter),this.getViewFilter=this.filter.getViewFilter.bind(this.filter),this.hasViewFilter=this.filter.hasViewFilter.bind(this.filter),this.initFilterView()},d.prototype.initFilterView=function(){this.filterGroups.push({id:"columnGroup",translationKey:"PORT_FORWARD_STATS_TITLE_VIEW",excludeFromSummary:!1,items:[{id:"all",translationKey:"PORT_FORWARD_STATS_VIEW_ALL",isSelected:function(){return"all"===this.getColumnGroup()}.bind(this),onSelect:function(){return this.filter.clearViewFilter(),this.setColumnGroup("all")}.bind(this)},{id:"userdefined",translationKey:"PORT_FORWARD_STATS_VIEW_USER_DEFINED",isSelected:function(){return"userdefined"===this.getColumnGroup()}.bind(this),onSelect:function(){return this.filter.setViewFilter("userdefined"),this.setColumnGroup("userdefined")}.bind(this)},{id:"upnp",translationKey:"PORT_FORWARD_STATS_VIEW_UPNP",isSelected:function(){
return"upnp"===this.getColumnGroup()}.bind(this),onSelect:function(){return this.filter.setViewFilter("upnp"),this.setColumnGroup("upnp")}.bind(this)}]})},d.prototype.getCollection=function(){return this.portForwardStats.repository.collection},d.prototype.getColumnGroup=function(){return this.columnGroup},d.prototype.getEditPortForwardPropertyPanelStates=function(a){return[{state:"editPortForward",value:a.id,overwrite:!0}]},d.prototype.setColumnGroup=function(a){this.beginStateChange(),this.listState.addFilter("view",a),this.columnGroup=a,this.commitStateChange()},d.prototype.refreshColumns=function(){this.isStateChanging()||(this.columnStore.setColumnGroup(this.columnGroup),this.columnStore.setColumns())},d.prototype.refresh=function(a){return this.refreshColumns(),e.prototype.refresh.call(this,a)},d.$inject=["$injector","$translate","INSIGHTS_DEFAULTS","CollectionView","frame","gatewayUtils","heyToasts","preferences","portForwardStats","PortForwardStatsFilter","portForwardStatsListColumnStore","portForwardStatsComparator"],angular.module("app-unifi-manage").controller("PortForwardStatsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],688:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="portForwardStatsListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div><unifi-ui-list-filter-buttons unifi-ui-list-filter-buttons-config="portForwardStatsListCtrl.filterGroups" class="visible--lgUp"></unifi-ui-list-filter-buttons><unifi-ui-list-filter-dropdown unifi-ui-list-filter-dropdown-config="portForwardStatsListCtrl.filterGroups" unifi-ui-list-filter-dropdown-filter-by-label="{{\'COMMON_LABEL_FILTER_BY\' | translate}}" unifi-ui-list-filter-dropdown-filter-by-all-label="{{\'COMMON_LABEL_FILTER_ALL\' | translate}}" class="visible--mdDown"></unifi-ui-list-filter-dropdown></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="portForwardStatsListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="portForwardStatsListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><table id="portForwardStatsListTable" ng-init="gateway = portForwardStatsListCtrl.getSiteGateway()" collection-view-sort="portForwardStatsListCtrl.view" ng-class="{          \'is-not-responsive\': portForwardStatsListCtrl.columnStore.getCustomized() || !portForwardStatsListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" ng-if="portForwardStatsListCtrl.isColumnVisible(\'name\')" class="portForwardStatsName"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="src" ng-if="portForwardStatsListCtrl.isColumnVisible(\'src\')" class="portForwardStatsSrc"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_SRC"></span></th><th collection-view-sort-by="proto" ng-if="portForwardStatsListCtrl.isColumnVisible(\'proto\')" class="portForwardStatsProto"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_PROTOCOL"></span></th><th collection-view-sort-by="dst_port" ng-if="portForwardStatsListCtrl.isColumnVisible(\'dst_port\')" class="portForwardStatsDstPort"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_DST_PORT"></span></th><th collection-view-sort-by="fwd" ng-if="portForwardStatsListCtrl.isColumnVisible(\'fwd\')" class="portForwardStatsForward"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_FORWARD_IP"></span></th><th collection-view-sort-by="fwd_port" ng-if="portForwardStatsListCtrl.isColumnVisible(\'fwd_port\')" class="portForwardStatsForwardPort"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_FORWARD_PORT"></span></th><th collection-view-sort-by="rx_packets" ng-if="portForwardStatsListCtrl.isColumnVisible(\'rx_packets\')" class="portForwardStatsRxPackets"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_RX_PACKETS"></span></th><th collection-view-sort-by="rx_bytes" ng-if="portForwardStatsListCtrl.isColumnVisible(\'rx_bytes\')" class="portForwardStatsRxBytes"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_RX_BYTES"></span></th><th collection-view-sort-by="lease_duration" ng-if="portForwardStatsListCtrl.isColumnVisible(\'lease_duration\')" class="portForwardStatsLeaseDuration"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_LEASE_DURATION"></span></th><th class="portForwardStatsActions appTableCell--withAction"><span translate="PORT_FORWARD_STATS_TABLE_HEADER_ACTIONS" ng-if="portForwardStatsListCtrl.isColumnVisible(\'actions\')"></span><unifi-list-column-selector unifi-list-column-selector-column-store="portForwardStatsListCtrl.columnStore"></unifi-list-column-selector></th></tr></thead><tfoot ng-if="portForwardStatsListCtrl.view.getModels().length"><tr><td colspan="{{portForwardStatsListCtrl.columnStore.getColumns().length + (portForwardStatsListCtrl.isColumnVisible(\'actions\') ? 0 : 1)}}"><unifi-list-pagination unifi-list-pagination-current-page="portForwardStatsListCtrl.currentPage" unifi-list-pagination-rows-per-page="portForwardStatsListCtrl.rowsPerPage" unifi-list-pagination-total-rows="portForwardStatsListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in portForwardStatsListCtrl.view.getModels(),                    startFrom (portForwardStatsListCtrl.currentPage - 1) * portForwardStatsListCtrl.rowsPerPage,                    limitTo portForwardStatsListCtrl.rowsPerPage" collection-view-repeat-watch="portForwardStatsListCtrl.columnStore.getColumns()" data-id="{{::model.id}}"><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'name\')" class="portForwardStatsName">{{::model.get(\'name\')}}</td><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'src\')" class="portForwardStatsSrc">{{::model.get(\'src\') | portForwardSource}}</td><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'proto\')" class="portForwardStatsProto">{{::model.get(\'proto\') | portForwardProtocol}}</td><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'dst_port\')" class="portForwardStatsPort">{{::model.get(\'dst_port\')}}</td><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'fwd\')" class="portForwardStatsForward">{{::model.get(\'fwd\')}}</td><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'fwd_port\')" class="portForwardStatsForwardPort">{{::model.get(\'fwd_port\')}}</td><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'rx_packets\')" class="portForwardStatsRxPackets">{{::model.get(\'rx_packets\') | numberToString}}</td><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'rx_bytes\')" class="portForwardStatsRxBytes">{{::model.get(\'rx_bytes\') | bytes}}</td><td ng-if="::portForwardStatsListCtrl.isColumnVisible(\'lease_duration\')" class="portForwardStatsLeaseduration">{{::model.get(\'lease_duration\') | seconds}}</td><td class="switchStatsActions appTableCell--actions"><button ng-init="editStates = portForwardStatsListCtrl.getEditPortForwardPropertyPanelStates(model)" ng-if="portForwardStatsListCtrl.isColumnVisible(\'actions\') &amp;&amp; !model.get(\'is_upnp\')" data-id="{{::gateway.id}}" data-device-type="{{::gateway.get(\'type\')}}" unifi-open-panel="::gateway" unifi-open-panel-active-tab="\'configure\'" unifi-open-panel-active-accordion-group="\'portForward\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="::editStates" class="appMainButton appMainButton--tertiary"><div unifi-if-role-admin><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT" class="visible--lgUp"></span></div><div unifi-if-role-admin="false"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW" class="visible--lgUp"></span></div></button></td></tr></tbody></table><div ng-if="!portForwardStatsListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="PORT_FORWARD_STATS_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!portForwardStatsListCtrl.isFiltered()" translate="PORT_FORWARD_STATS_TABLE_EMPTY_NO_FORWARDS" class="noMarginBottom"></p><p ng-if="portForwardStatsListCtrl.isFiltered()" translate="PORT_FORWARD_STATS_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],689:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPortForwardStatsList",["PaginatedListDirective",function(b){return new b("portForwardStats",a("./portForwardStatsList.jade")())}])},{"./portForwardStatsList.jade":688}],690:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-if="isPowerSaveEnabled" title="{{\'COMMON_TITLE_POWER_SAVE_ENABLED\' | translate}}" class="appAlertIcon appAlertIcon--scaled appAlertIcon--success"><div class="icon ubnt-icon--leaf"></div></div>'),b.join("")}},{"jade/runtime":232}],691:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPowerSaveIcon",[function(){return{scope:{isPowerSaveEnabled:"=unifiPowerSaveIcon"},template:a("./powerSaveIcon.jade")()}}])},{"./powerSaveIcon.jade":690}],692:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$q=a,this.$translate=c,this.frame=d,this.deviceFeatureUtils=g,e.call(this,b,f,h)}var e=a("../../../base-unifi/controllers/BaseDockablePanelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getItemElementId=function(a){return["propertyPanelItem",a.modelType,a.id.replace(/:/g,"")].join("-")},d.prototype.getItemType=function(a){return"device"===a.modelType?this.deviceFeatureUtils.getHybridCapability(a.get("model"),a.get("type")):"knownclient"===a.modelType?"sta":a.modelType},d.prototype.removeDockedItems=function(){var a,b=this.panels.getItemsWithPendingChanges(!0);return a=b.length?this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_PROPERTIES_PENDING_CHANGES_FORGET_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_PROPERTIES_PENDING_CHANGES_FORGET_ALL_CONFIRM_MESSAGE",{count:b.length},"messageformat")}.bind(this),options:angular.noop}):this.$q.when(),a.then(function(){this.panels.removeDockedItems()}.bind(this))},d.$inject=["$q","$timeout","$translate","frame","propertyPanel","deviceFeatureUtils","scroller"],angular.module("app-unifi-manage").controller("PropertyPanelController",d)},{"../../../base-unifi/controllers/BaseDockablePanelController":1659}],693:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="propertyPanel" ng-class="{    \'withLayerShadow\': propertyPanelCtrl.isDockOpen(),    \'is-view-side-panel-open\': propertyPanelCtrl.isDockOpen(),    \'is-view-side-panel-closed\': !propertyPanelCtrl.isDockOpen()  }" class="appViewSidePanel appViewSidePanel--right appViewSidePanel--withToggleButton unifiViewSidePanel"><div ng-if="!propertyPanelCtrl.isEmpty() &amp;&amp; !propertyPanelCtrl.isDockOpen()" ng-click="propertyPanelCtrl.toggleDock()" title="{{\'COMMON_PROPERTY_PANEL_OPEN\' | translate}}" class="appViewSidePanelToggleButton appViewSidePanelToggleButton--cozy"><div class="appViewSidePanelToggleButton__background"></div><div class="appViewSidePanelToggleButton__icon icon ubnt-icon--panels"></div></div><div class="appViewSidePanel__inner flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--dark appActionBar--cozy appActionBar--flexible unifiViewSidePanelActionBar"><div class="appActionBar__inner"><div class="appActionBar__left"><div translate="COMMON_PROPERTY_PANEL_TITLE" class="appActionBarTitle"></div></div><div ng-if="propertyPanelCtrl.isDockOpen()" class="appActionBar__left unifiViewSidePanelActionBarPendingChanges"><unifi-pending-device-changes></unifi-pending-device-changes></div><div class="appActionBar__right"><div class="appActionIconGroup"><div ng-click="propertyPanelCtrl.removeDockedItems()" title="{{\'COMMON_PROPERTY_PANEL_REMOVE_ALL\' | translate}}" class="appActionIcon appActionIcon--dark"><span class="button__icon icon ubnt-icon--lines-step-up"></span></div><div ng-if="!propertyPanelCtrl.areAllDockedPanelsCollapsed()" ng-click="propertyPanelCtrl.collapsePanels()" title="{{\'COMMON_PROPERTY_PANEL_COLLAPSE_ALL\' | translate}}" class="appActionIcon appActionIcon--dark"><span class="button__icon icon ubnt-icon--menu"></span></div><div ng-if="propertyPanelCtrl.areAllDockedPanelsCollapsed()" ng-click="propertyPanelCtrl.expandPanels()" title="{{\'COMMON_PROPERTY_PANEL_EXPAND_ALL\' | translate}}" class="appActionIcon appActionIcon--dark"><span class="button__icon icon ubnt-icon--menu"></span></div><div ng-click="propertyPanelCtrl.closeDock()" title="{{\'COMMON_PROPERTY_PANEL_CLOSE\' | translate}}" class="appActionIcon appActionIcon--dark"><span class="button__icon icon ubnt-icon--pointer-double-right"></span></div></div></div></div></div><unifi-side-panel-sticky-title unifi-side-panel-sticky-title-type="property" unifi-side-panel-sticky-title-data-attr="item-id" unifi-side-panel-sticky-title-panels="propertyPanelCtrl.panels" unifi-side-panel-sticky-title-container-selector=".unifiPanel" unifi-side-panel-sticky-title-item-selector=".unifiDndItem.is-docked" unifi-side-panel-sticky-title-offset-adjust="32"></unifi-side-panel-sticky-title><div id="propertyPanelScrollContainer" unifi-dnd-dock unifi-dnd-dock-items="propertyPanelCtrl.getItems()" unifi-dnd-dock-placeholder-src="partials/propertyPanelDndPlaceholder.html" unifi-dnd-dock-on-drop-inside="propertyPanelCtrl.setItemOrder(itemId, index)" unifi-dnd-dock-on-drop-outside="propertyPanelCtrl.setItemCoords(itemId, x, y)" unifi-dnd-dock-can-drop-outside="true" unifi-dnd-dock-allowed-item-classes="[\'unifiDndItem\']" scroll-container class="flexFlag__body fullWidth unifiPanel unifiDndDock"><div ng-repeat="item in propertyPanelCtrl.getItems()" ng-switch="propertyPanelCtrl.getItemType(item)" ng-class="{          \'is-docked\': !dockedItemCtrl.isUndocked,          \'is-undocked\': dockedItemCtrl.isUndocked,          \'is-dragging\': draggableItemCtrl.isDragging        }" ng-init="itemId = propertyPanelCtrl.panels.getItemAndTypeId(item)" ng-attr-id="{{propertyPanelCtrl.getItemElementId(item)}}" ng-attr-data-item-id="{{itemId}}" unifi-dockable-item unifi-dockable-item-is-undocked="propertyPanelCtrl.panels.getItemState(item, \'undocked\')" unifi-draggable-item unifi-draggable-item-handle=".unifiPanelItemHeader" unifi-draggable-item-is-disabled="!dockedItemCtrl.isUndocked" unifi-draggable-item-on-drag-start="propertyPanelCtrl.onItemDragStart(itemId)" unifi-draggable-item-on-drag-stop="propertyPanelCtrl.onItemDragStop(itemId, elementX, elementY)" unifi-resizable-item unifi-resizable-item-direction="[\'right\']" unifi-resizable-item-is-disabled="!dockedItemCtrl.isUndocked" unifi-resizable-item-on-resize-stop="propertyPanelCtrl.onItemResizeStop(itemId, width, height)" unifi-dnd-dock-item="itemId" unifi-dnd-dock-item-handle=".unifiPanelItemHeader" unifi-dnd-dock-item-is-disabled="dockedItemCtrl.isUndocked" unifi-constrain-position unifi-constrain-position-selector="#contentContainer &gt; .appViewCenterPanel" unifi-constrain-position-is-disabled="!dockedItemCtrl.isUndocked" ng-style="{          \'left\': dockedItemCtrl.isUndocked ? propertyPanelCtrl.panels.getItemState(item, \'x\') || (100 + \'px\') : 0,          \'top\': dockedItemCtrl.isUndocked ? propertyPanelCtrl.panels.getItemState(item, \'y\') || (100 + \'px\') : 0,          \'width\': dockedItemCtrl.isUndocked ? propertyPanelCtrl.panels.getItemState(item, \'width\') : \'auto\',          \'z-index\': propertyPanelCtrl.getItems().length - $index + (dockedItemCtrl.isUndocked ? 500 : 0)        }" class="unifiDndItem"><div ng-switch-when="ugw" unifi-gateway-properties="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div><div ng-switch-when="usw" unifi-switch-properties="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div><div ng-switch-when="uap" unifi-ap-properties="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div><div ng-switch-when="uap+usw" unifi-ap-switch-properties="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div><div ng-switch-when="uph" unifi-phone-properties="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div><div ng-switch-when="sta" unifi-client-properties="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div><div ng-switch-when="stream" unifi-stream-properties="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div><div ng-switch-when="batch:uap" unifi-ap-properties-batch="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],694:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiPropertyPanel",[function(){return{controller:"PropertyPanelController",controllerAs:"propertyPanelCtrl",replace:!0,restrict:"E",template:a("./propertyPanel.jade")(),link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./propertyPanel.jade":693}],695:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appFormGroup"><div ng-repeat="server in radiusRepeatableFormCtrl.model.attributes[radiusRepeatableFormCtrl.attributeName] track by $index" class="radiusAcctServer appInputGroup appInputGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAcctServerIp{{$index}}" translate="PROFILES_RADIUS_FORM_LABEL_IP_ADDRESS"></label><input type="text" name="radiusAcctServerIp{{$index}}" id="radiusAcctServerIp{{$index}}" size="16" ng-model="server.ip" ng-pattern="radiusRepeatableFormCtrl.patterns.ipAddress" ng-required="radiusRepeatableFormCtrl.isRequired"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAcctServerPort{{$index}}" translate="PROFILES_RADIUS_FORM_LABEL_PORT"></label><input type="text" name="radiusAcctServerPort{{$index}}" id="radiusAcctServerPort{{$index}}" size="5" ng-init="server.port = server.port || 1813" ng-model="server.port" ng-pattern="radiusRepeatableFormCtrl.patterns.portNumber" ng-required="radiusRepeatableFormCtrl.isRequired"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAcctServerPassword{{$index}}" translate="PROFILES_RADIUS_FORM_LABEL_PASSWORD"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': radiusRepeatableFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><span translate="VALIDATION_HINT_RADIUS_SECRET"></span></div></div><input type="password" name="radiusAcctServerPassword{{$index}}" id="radiusAcctServerPassword{{$index}}" size="16" ng-model="server.x_secret" ng-required="radiusRepeatableFormCtrl.isRequired" ng-pattern="radiusRepeatableFormCtrl.patterns.secret" unifi-password-reveal></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-if="!radiusRepeatableFormCtrl.isReadOnly" ng-click="radiusRepeatableFormCtrl.removeItem($index + 1)" ng-disabled="!radiusRepeatableFormCtrl.isRemoveAllowed()" title="{{\'PROFILES_RADIUS_FORM_ACTION_REMOVE_ACCOUNTING_SERVER\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeAcctServer"><span class="button__icon icon ubnt-icon--x"></span></button></div></div><div ng-if="!radiusRepeatableFormCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="radiusRepeatableFormCtrl.addItem()" ng-disabled="!radiusRepeatableFormCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addAcctServer"><span class="button__icon icon ubnt-icon--plus"></span><span translate="PROFILES_RADIUS_FORM_ACTION_ADD_ACCOUNTING_SERVER"></span></button></div></div>'),b.join("")}},{"jade/runtime":232}],696:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRadiusAcctServerFormGroup",[function(){return{scope:{model:"=unifiRadiusAcctServerFormGroupModel",attributeName:"@unifiRadiusAcctServerFormGroupAttributeName",min:"=unifiRadiusAcctServerFormGroupMin",max:"=unifiRadiusAcctServerFormGroupMax",isRequired:"=unifiRadiusAcctServerFormGroupIsRequired",isReadOnly:"=unifiRadiusAcctServerFormGroupIsReadOnly"},controller:"RadiusRepeatableFormController",controllerAs:"radiusRepeatableFormCtrl",bindToController:!0,template:a("./radiusAcctServerFormGroup.jade")(),link:function(a,b,c,d){a.$watch(function(){return d.model},function(a){d.updateModel(a)})}}}])},{"./radiusAcctServerFormGroup.jade":695}],697:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appFormGroup"><div ng-repeat="server in radiusRepeatableFormCtrl.model.attributes[radiusRepeatableFormCtrl.attributeName] track by $index" class="radiusAuthServer appInputGroup appInputGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAuthServerIp{{$index}}" translate="PROFILES_RADIUS_FORM_LABEL_IP_ADDRESS"></label><input type="text" name="radiusAuthServerIp{{$index}}" id="radiusAuthServerIp{{$index}}" size="16" ng-model="server.ip" ng-pattern="radiusRepeatableFormCtrl.patterns.ipAddress" ng-required="radiusRepeatableFormCtrl.isRequired"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAuthServerPort{{$index}}" translate="PROFILES_RADIUS_FORM_LABEL_PORT"></label><input type="text" name="radiusAuthServerPort{{$index}}" id="radiusAuthServerPort{{$index}}" size="5" ng-init="server.port = server.port || 1812" ng-model="server.port" ng-pattern="radiusRepeatableFormCtrl.patterns.portNumber" ng-required="radiusRepeatableFormCtrl.isRequired"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="radiusAuthServerPassword{{$index}}" translate="PROFILES_RADIUS_FORM_LABEL_PASSWORD"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': radiusRepeatableFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><span translate="VALIDATION_HINT_RADIUS_SECRET"></span></div></div><input type="password" name="radiusAuthServerPassword{{$index}}" id="radiusAuthServerPassword{{$index}}" size="16" ng-model="server.x_secret" ng-required="radiusRepeatableFormCtrl.isRequired" ng-pattern="radiusRepeatableFormCtrl.patterns.secret" unifi-password-reveal></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-if="!radiusRepeatableFormCtrl.isReadOnly" ng-click="radiusRepeatableFormCtrl.removeItem($index + 1)" ng-disabled="!radiusRepeatableFormCtrl.isRemoveAllowed()" title="{{\'PROFILES_RADIUS_FORM_ACTION_REMOVE_AUTH_SERVER\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeAuthServer"><span class="button__icon icon ubnt-icon--x"></span></button></div></div><div ng-if="!radiusRepeatableFormCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="radiusRepeatableFormCtrl.addItem()" ng-disabled="!radiusRepeatableFormCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addAuthServer"><span class="button__icon icon ubnt-icon--plus"></span><span translate="PROFILES_RADIUS_FORM_ACTION_ADD_AUTH_SERVER"></span></button></div></div>'),b.join("")}},{"jade/runtime":232}],698:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRadiusAuthServerFormGroup",[function(){return{scope:{model:"=unifiRadiusAuthServerFormGroupModel",attributeName:"@unifiRadiusAuthServerFormGroupAttributeName",min:"=unifiRadiusAuthServerFormGroupMin",max:"=unifiRadiusAuthServerFormGroupMax",isRequired:"=unifiRadiusAuthServerFormGroupIsRequired",isReadOnly:"=unifiRadiusAuthServerFormGroupIsReadOnly"},controller:"RadiusRepeatableFormController",controllerAs:"radiusRepeatableFormCtrl",bindToController:!0,template:a("./radiusAuthServerFormGroup.jade")(),link:function(a,b,c,d){a.$watch(function(){return d.model},function(a){d.updateModel(a)})}}}])},{"./radiusAuthServerFormGroup.jade":697}],699:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.heyToasts=b,this.preferences=c,this.radius=d,this.RADIUS_VLAN_OPTIONS=g,this.patterns={ipAddress:h.IP_ADDRESS,portNumber:h.PORT_NUMBER},this.radiusAcctServerMin=1,this.radiusAcctServerMax=4,this.radiusAuthServerMin=1,this.radiusAuthServerMax=4,e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){return this.isSubmitting=!0,this.radius.save(this.model,this.modelCopy.attributes).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.$inject=["$translate","heyToasts","preferences","radius","modelDivergence","RADIUS_VLAN_OPTIONS","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("RadiusProfileFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],700:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="radiusProfileFormCtrl.form" ng-class="{    \'appForm--dark\': isDark,    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': radiusProfileFormCtrl.showValidation,    \'is-validation-hidden\': !radiusProfileFormCtrl.showValidation  }" ng-submit="radiusProfileFormCtrl.form.$valid &amp;&amp; radiusProfileFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="radiusProfileFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="radiusProfileFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="isDark" unifi-config-changed-with-icon="true" ng-show="radiusProfileFormCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div class="row"><div class="col--sm3"><label translate="PROFILES_RADIUS_FORM_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="name" ng-model="radiusProfileFormCtrl.modelCopy.attributes.name" ng-model-master="radiusProfileFormCtrl.model.attributes.name" required class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="PROFILES_RADIUS_FORM_LABEL_VLAN_ENABLED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="radiusProfileVlanEnabled" id="radiusProfileVlanEnabled" ng-model="radiusProfileFormCtrl.modelCopy.attributes.vlan_enabled" ng-model-master="radiusProfileFormCtrl.model.attributes.vlan_enabled"><label for="radiusProfileVlanEnabled" translate="PROFILES_RADIUS_FORM_VALUES_VLAN_ENABLED"></label></div></div></div><div unifi-feature-flag-enable="withRadiusVlanModes" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="radiusProfileVlanWlanMode" id="radiusProfileVlanWlanMode" ng-model="radiusProfileFormCtrl.modelCopy.attributes.vlan_wlan_mode" ng-model-master="radiusProfileFormCtrl.modelCopy.attributes.vlan_wlan_mode" ng-true-value="\'{{radiusProfileFormCtrl.RADIUS_VLAN_OPTIONS.ENABLED}}\'" ng-false-value="\'{{radiusProfileFormCtrl.RADIUS_VLAN_OPTIONS.DISABLED}}\'"><label for="radiusProfileVlanWlanMode" translate="PROFILES_RADIUS_FORM_VALUES_VLAN_WLAN_MODE"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div></div></div><div class="row"><div class="col--sm3"><label translate="PROFILES_RADIUS_FORM_LABEL_AUTH_SERVER" class="appLabel--primary"></label></div><div class="col--sm9"><unifi-radius-auth-server-form-group ng-if="!radiusProfileFormCtrl.model.get(\'attr_hidden_id\')" unifi-radius-auth-server-form-group-model="radiusProfileFormCtrl.modelCopy" unifi-radius-auth-server-form-group-attribute-name="auth_servers" unifi-radius-auth-server-form-group-min="radiusProfileFormCtrl.radiusAuthServerMin" unifi-radius-auth-server-form-group-max="radiusProfileFormCtrl.radiusAuthServerMax" unifi-radius-auth-server-form-group-is-required="true" unifi-radius-auth-server-form-group-is-read-only="isReadOnly"></unifi-radius-auth-server-form-group><div ng-if="radiusProfileFormCtrl.model.get(\'attr_hidden_id\')" class="appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><div translate="COMMON_REQUIRES_UGW_BADGE" class="appBadge appBadge--warning appBadge--boxAlign"></div></div></div></div></div><div ng-if="!radiusProfileFormCtrl.model.get(\'attr_hidden_id\')" class="row"><div class="col--sm3"><label translate="PROFILES_RADIUS_FORM_LABEL_ACCOUNTING_ENABLED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="radiusProfileAccountingEnabled" id="radiusProfileAccountingEnabled" ng-model="radiusProfileFormCtrl.modelCopy.attributes.accounting_enabled" ng-model-master="radiusProfileFormCtrl.model.attributes.accounting_enabled"><label for="radiusProfileAccountingEnabled" translate="PROFILES_RADIUS_FORM_VALUES_ACCOUNTING_ENABLED"></label></div></div></div><div ng-if="radiusProfileFormCtrl.modelCopy.attributes.accounting_enabled" class="row"><div class="col--sm3"><label translate="PROFILES_RADIUS_FORM_LABEL_ACCOUNTING_SERVER" class="appLabel--primary"></label></div><div unifi-radius-acct-server-form-group unifi-radius-acct-server-form-group-model="radiusProfileFormCtrl.modelCopy" unifi-radius-acct-server-form-group-attribute-name="acct_servers" unifi-radius-acct-server-form-group-min="radiusProfileFormCtrl.radiusAcctServerMin" unifi-radius-acct-server-form-group-max="radiusProfileFormCtrl.radiusAcctServerMax" unifi-radius-acct-server-form-group-is-required="true" unifi-radius-acct-server-form-group-is-read-only="isReadOnly" class="col--sm9"></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="isDark ?                 \'appMainButton--transparentDark\' :                 \'appMainButton--transparent\'              " class="appMainButton appMainButton--cozy cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--cozy appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button><button ng-if="!isReadOnly" ng-click="radiusProfileFormCtrl.showValidation = true" busy-toggle="radiusProfileFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--primary saveRadiusUser">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button></div></div></div></div></fieldset></form>'),
b.join("")}},{"jade/runtime":232}],701:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRadiusProfileForm",["SimpleFormDirective",function(b){return new b("radiusProfile",a("./radiusProfileForm.jade")())}])},{"./radiusProfileForm.jade":700}],702:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=b,this.frame=d,this.heyToasts=f,this.preferences=g,this.radius=h,this.isRemoving={},e.call(this,a,c)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.radius.repository.collection},d.prototype.getNetworkName=function(a){var b=this.networks.repository.collection.get(a);return b?b.get("name"):""},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_PROFILES_RADIUS_DELETE_CONFIRM_TITLE",{name:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_PROFILES_RADIUS_DELETE_CONFIRM_MESSAGE",{name:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,this.radius.remove(a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(b){return this.heyToasts.pushError(b),this.isRemoving[a.id]=!1,!1}.bind(this))}.bind(this))},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.$inject=["$q","$translate","CollectionView","frame","heyToasts","preferences","radius"],angular.module("app-unifi-manage").controller("RadiusProfilesListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],703:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="radiusProfilesTable" collection-view-sort="radiusProfilesListCtrl.view" ng-class="{      \'appTable--dark\': radiusProfilesListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="radiusProfileName"><span translate="SETTINGS_PROFILES_RADIUS_TABLE_HEADER_NAME"></span></th><th class="radiusProfileNumberOfServers"><span translate="SETTINGS_PROFILES_RADIUS_TABLE_HEADER_NUMBER_OF_SERVERS"></span></th><th collection-view-sort-by="accounting_enabled" class="radiusProfileAccountingEnabled"><span translate="SETTINGS_PROFILES_RADIUS_TABLE_HEADER_ACCOUNTING_ENABLED"></span></th><th class="radiusProfileActions"><span translate="SETTINGS_PROFILES_RADIUS_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in radiusProfilesListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="radiusProfileName">{{::model.get(\'name\')}}</td><td class="radiusProfileNumberOfServers"><div ng-if="model.get(\'attr_hidden_id\')" translate="COMMON_REQUIRES_UGW_BADGE" class="appBadge appBadge--warning appBadge--boxAlign"></div><span ng-if="!model.get(\'attr_hidden_id\')">{{::model.get(\'auth_servers\').length}}</span></td><td ng-bind-html="model.get(\'accounting_enabled\') | enabledIcon" class="radiusProfileAccountingEnabled"></td><td class="radiusProfileActions appTableCell--actions"><button ng-click="radiusProfilesListCtrl.edit(model)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button ng-click="radiusProfilesListCtrl.remove(model)" ng-disabled="radiusProfilesListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--lock"></span><span translate="SETTINGS_PROFILES_RADIUS_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!radiusProfilesListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': radiusProfilesListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_PROFILES_RADIUS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],704:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRadiusProfilesList",["ListDirective",function(b){return new b("radiusProfiles",a("./radiusProfilesList.jade")(),{onEdit:"&unifiRadiusProfilesListOnEdit"})}])},{"./radiusProfilesList.jade":703}],705:[function(a,b,c){"use strict";function d(a,b,c){this.frame=a,this.radius=b,this.RadiusProfileModel=c}d.prototype.getProfiles=function(){return this.radius.repository.collection.models},d.prototype.createNewRadiusProfile=function(){return this.frame.show("radiusProfile",{model:function(){return new this.RadiusProfileModel}.bind(this)}).then(function(a){this.radiusProfileId=a.get("_id")}.bind(this))},d.$inject=["frame","radius","RadiusProfileModel"],angular.module("app-unifi-manage").controller("RadiusSelectorController",d)},{}],706:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><select name="radiusProfileId" ng-model="radiusSelectorCtrl.radiusProfileId" ng-options="radiusProfile.id as radiusProfile.get(\'name\') for radiusProfile in radiusSelectorCtrl.getProfiles()" ng-required="radiusSelectorCtrl.isRequired" ng-disabled="radiusSelectorCtrl.isReadOnly"><option unifi-option-placeholder></option></select></div><button ng-if="!radiusSelectorCtrl.isReadOnly" type="button" ng-click="radiusSelectorCtrl.createNewRadiusProfile()" class="appMainButton appMainButton--primary appMainButton--condensed createNewRadiusProfile">{{\'PROFILES_RADIUS_ACTIONS_BUTTON_ADD\' | translate}}</button></div>'),b.join("")}},{"jade/runtime":232}],707:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRadiusSelector",[function(){return{scope:{radiusProfileId:"=unifiRadiusSelectorRadiusProfileId",isRequired:"=unifiRadiusSelectorIsRequired",isReadOnly:"=unifiRadiusSelectorIsReadOnly"},bindToController:!0,controller:"RadiusSelectorController",controllerAs:"radiusSelectorCtrl",template:a("./radiusSelector.jade")()}}])},{"./radiusSelector.jade":706}],708:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.heyToasts=b,this.preferences=c,this.radiusUsers=d,this.patterns={ip:g.IP_ADDRESS,vlan:g.VLAN},e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){return this.isSubmitting=!0,this.radiusUsers.save(this.model,this.modelCopy.attributes).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.$inject=["$translate","heyToasts","preferences","radiusUsers","modelDivergence","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("RadiusUserFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],709:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="radiusUserFormCtrl.form" ng-class="{    \'appForm--dark\': radiusUserFormCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': radiusUserFormCtrl.showValidation,    \'is-validation-hidden\': !radiusUserFormCtrl.showValidation  }" ng-submit="radiusUserFormCtrl.form.$valid &amp;&amp; radiusUserFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="radiusUserFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="radiusUserFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="radiusUserFormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="radiusUserFormCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{userName: radiusUserFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{radiusUserFormCtrl.model.id ? \'SETTINGS_PROFILES_SECTION_EDIT_USER\' : \'SETTINGS_PROFILES_SECTION_CREATE_USER\'}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_USERS_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="name" ng-model="radiusUserFormCtrl.modelCopy.attributes.name" ng-model-master="radiusUserFormCtrl.model.attributes.name" ng-pattern="radiusUserFormCtrl.patterns.name" required class="input--full"><div ng-show="radiusUserFormCtrl.form.name.$error.pattern" translate="VALIDATION_HINT_RADIUS_USER_NAME" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_USERS_LABEL_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="password" name="password" ng-model="radiusUserFormCtrl.modelCopy.attributes.x_password" ng-model-master="radiusUserFormCtrl.model.attributes.x_password" ng-pattern="radiusUserFormCtrl.patterns.password" unifi-password-reveal required class="input--full"><div ng-show="radiusUserFormCtrl.form.password.$error.pattern" translate="VALIDATION_HINT_RADIUS_USER_PASSWORD" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_USERS_LABEL_VLAN" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="networkVlan" ng-model="radiusUserFormCtrl.modelCopy.attributes.vlan" ng-model-master="radiusUserFormCtrl.model.attributes.vlan" ng-pattern="radiusUserFormCtrl.patterns.vlan" class="input--smallNumber"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_USERS_LABEL_TUNNEL_TYPE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="number" name="tunnelType" ng-model="radiusUserFormCtrl.modelCopy.attributes.tunnel_type" ng-model-master="radiusUserFormCtrl.model.attributes.tunnel_type" min="1" max="12" ng-required="!!radiusUserFormCtrl.modelCopy.attributes.vlan" class="input--smallNumber"><div ng-if="radiusUserFormCtrl.form.tunnelType.$error.min || radiusUserFormCtrl.form.tunnelType.$error.max" translate="VALIDATION_HINT_RANGE" translate-values="{min: 1, max: 12}" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_USERS_LABEL_TUNNEL_MEDIUM_TYPE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="number" name="tunnelMediumType" ng-model="radiusUserFormCtrl.modelCopy.attributes.tunnel_medium_type" ng-model-master="radiusUserFormCtrl.model.attributes.tunnel_medium_type" min="1" max="8" ng-required="!!radiusUserFormCtrl.modelCopy.attributes.vlan" class="input--smallNumber"><div ng-if="radiusUserFormCtrl.form.tunnelMediumType.$error.min || radiusUserFormCtrl.form.tunnelMediumType.$error.max" translate="VALIDATION_HINT_RANGE" translate-values="{min: 1, max: 8}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div></fieldset><div ng-class="{\'appFormFooter--dark\': radiusUserFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="radiusUserFormCtrl.showValidation = true" busy-toggle="radiusUserFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveRadiusUser">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="radiusUserFormCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],710:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRadiusUserForm",["SimpleFormDirective",function(b){return new b("radiusUser",a("./radiusUserForm.jade")())}])},{"./radiusUserForm.jade":709}],711:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.$translate=b,this.frame=d,this.heyToasts=f,this.networks=g,this.preferences=h,this.radiusUsers=i,this.isRemoving={},e.call(this,a,c)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.radiusUsers.repository.collection},d.prototype.getNetworkName=function(a){var b=this.networks.repository.collection.get(a);return b?b.get("name"):""},d.prototype.removeUser=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_RADIUS_USERS_DELETE_CONFIRM_TITLE",{name:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_RADIUS_USERS_DELETE_CONFIRM_MESSAGE",{name:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,this.radiusUsers.removeUser(a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(b){return this.heyToasts.pushError(b),this.isRemoving[a.id]=!1,!1}.bind(this))}.bind(this))},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.$inject=["$q","$translate","CollectionView","frame","heyToasts","networks","preferences","radiusUsers"],angular.module("app-unifi-manage").controller("RadiusUsersListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],712:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="radiusUsersTable" collection-view-sort="radiusUsersListCtrl.view" ng-class="{        \'appTable--dark\': radiusUsersListCtrl.preferences.model.get(\'isSettingsDark\')      }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="radiusUserName"><span translate="SETTINGS_RADIUS_USERS_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="vlan" class="radiusUserNetwork"><span translate="SETTINGS_RADIUS_USERS_TABLE_HEADER_VLAN"></span></th><th class="radiusUserActions"><span translate="SETTINGS_RADIUS_USERS_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in radiusUsersListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="radiusUserName">{{::model.get(\'name\')}}</td><td class="radiusUserVlan">{{::model.get(\'vlan\')}}</td><td class="radiusUserActions appTableCell--actions"><button ng-click="radiusUsersListCtrl.edit(model)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button ng-click="radiusUsersListCtrl.removeUser(model)" ng-disabled="radiusUsersListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--lock"></span><span translate="SETTINGS_RADIUS_USERS_ACTIONS_REVOKE"></span></button></td></tr></tbody></table><div ng-if="!radiusUsersListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': radiusUsersListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_RADIUS_USERS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],713:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRadiusUsersList",["ListDirective",function(b){return new b("radiusUsers",a("./radiusUsersList.jade")(),{onEdit:"&unifiRadiusUsersListOnEdit"})}])},{"./radiusUsersList.jade":712}],714:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l){this.remoteUserVpn=f,this.remoteUserVpnUtils=g,this.INSIGHTS_DEFAULTS=l,this.$translate=b,this.columnStore=h,this.frame=c,this.heyToasts=d,this.filter=new k,this.defaultSortBy="uptime",this.isColumnVisible=this.columnStore.isColumnVisible.bind(this.columnStore),this.isCustomized=this.columnStore.getCustomized.bind(this.columnStore),e.call(this,a,j,i)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){this.isFiltered=this.filter.isFiltered.bind(this.filter)},d.prototype.terminate=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("REMOTE_USER_VPN_TERMINATE_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("REMOTE_USER_VPN_TERMINATE_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.remoteUserVpnUtils.terminate(a).then(function(a){this.heyToasts.pushSuccess(a)}.bind(this))["catch"](function(a){this.heyToasts.pushError(a)}.bind(this))}.bind(this))},d.prototype.getCollection=function(){return this.remoteUserVpn.repository.collection},d.prototype.refreshColumns=function(){this.isStateChanging()||this.columnStore.setColumns()},d.prototype.refresh=function(a){return this.refreshColumns(),e.prototype.refresh.call(this,a)},d.$inject=["$injector","$translate","frame","heyToasts","remoteUserVpn","remoteUserVpnUtils","remoteUserVpnListColumnStore","preferences","CollectionView","RemoteUserVpnFilter","INSIGHTS_DEFAULTS"],angular.module("app-unifi-manage").controller("RemoteUserVpnListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],715:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="remoteUserVpnListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="remoteUserVpnListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="remoteUserVpnListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><table id="knownClientsTable" collection-view-sort="remoteUserVpnListCtrl.view" ng-class="{          \'is-not-responsive\': remoteUserVpnListCtrl.columnStore.getCustomized() || !remoteUserVpnListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="interface" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'interface\')" class="remoteUserVpnInterface"><span translate="REMOTE_USER_VPN_TABLE_HEADER_INTERFACE"></span></th><th collection-view-sort-by="remote_ip" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'remote_ip\')" class="remoteUserVpnRemoteIp"><span translate="REMOTE_USER_VPN_TABLE_HEADER_REMOTE_IP"></span></th><th collection-view-sort-by="user" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'user\')" class="remoteUserVpnUser"><span translate="REMOTE_USER_VPN_TABLE_HEADER_USER"></span></th><th collection-view-sort-by="rx_packets" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'rx_packets\')" class="remoteUserVpnDownPkts"><span translate="REMOTE_USER_VPN_TABLE_HEADER_DOWN_PKTS"></span></th><th collection-view-sort-by="rx_bytes" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'rx_bytes\')" class="remoteUserDownBytes"><span translate="REMOTE_USER_VPN_TABLE_HEADER_DOWN_BYTES"></span></th><th collection-view-sort-by="tx_packets" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'tx_packets\')" class="remoteUserUpPkts"><span translate="REMOTE_USER_VPN_TABLE_HEADER_UP_PKTS"></span></th><th collection-view-sort-by="tx_bytes" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'tx_bytes\')" class="remoteUserVpnUpBytes"><span translate="REMOTE_USER_VPN_TABLE_HEADER_UP_BYTES"></span></th><th collection-view-sort-by="uptime" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'uptime\')" class="remoteUserVpnUptime"><span translate="REMOTE_USER_VPN_TABLE_HEADER_UPTIME"></span></th><th unifi-if-role-admin class="remoteUserVpnActions appTableCell--withAction"><span translate="REMOTE_USER_VPN_TABLE_HEADER_ACTIONS" ng-if="remoteUserVpnListCtrl.isColumnVisible(\'actions\')"></span><unifi-list-column-selector unifi-list-column-selector-column-store="remoteUserVpnListCtrl.columnStore"></unifi-list-column-selector></th></tr></thead><tfoot ng-if="remoteUserVpnListCtrl.view.getModels().length"><tr><td colspan="{{remoteUserVpnListCtrl.columnStore.getColumns().length + (remoteUserVpnListCtrl.isColumnVisible(\'actions\') ? 0 : 1)}}"><unifi-list-pagination unifi-list-pagination-current-page="remoteUserVpnListCtrl.currentPage" unifi-list-pagination-rows-per-page="remoteUserVpnListCtrl.rowsPerPage" unifi-list-pagination-total-rows="remoteUserVpnListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in remoteUserVpnListCtrl.view.getModels(),              startFrom (remoteUserVpnListCtrl.currentPage - 1) * remoteUserVpnListCtrl.rowsPerPage,              limitTo remoteUserVpnListCtrl.rowsPerPage" collection-view-repeat-watch="remoteUserVpnListCtrl.columnStore.getColumns()" data-id="{{::model.id}}"><td ng-if="::remoteUserVpnListCtrl.isColumnVisible(\'interface\')" class="remoteUserVpnInterface">{{::model.get(\'interface\')}}</td><td ng-if="::remoteUserVpnListCtrl.isColumnVisible(\'remote_ip\')" class="remoteUserVpnRemoteIp">{{::model.get(\'remote_ip\')}}</td><td ng-if="::remoteUserVpnListCtrl.isColumnVisible(\'user\')" class="remoteUserVpnUser">{{::model.get(\'user\')}}</td><td ng-if="::remoteUserVpnListCtrl.isColumnVisible(\'rx_packets\')" class="remoteUserVpnDownPkts">{{::model.get(\'rx_packets\')}}</td><td ng-if="::remoteUserVpnListCtrl.isColumnVisible(\'rx_bytes\')" class="remoteUserDownBytes">{{::model.get(\'rx_bytes\') | bytes}}</td><td ng-if="::remoteUserVpnListCtrl.isColumnVisible(\'tx_packets\')" class="remoteUserVpnUpPkts">{{::model.get(\'tx_packets\')}}</td><td ng-if="::remoteUserVpnListCtrl.isColumnVisible(\'tx_bytes\')" class="remoteUserUpBytes">{{::model.get(\'tx_bytes\') | bytes}}</td><td ng-if="::remoteUserVpnListCtrl.isColumnVisible(\'uptime\')" class="remoteUserVpnUptime">{{::model.get(\'uptime\') | seconds}}</td><td unifi-if-role-admin class="clientActions appTableCell--actions"><button ng-if="remoteUserVpnListCtrl.isColumnVisible(\'actions\')" ng-click="remoteUserVpnListCtrl.terminate(model)" class="appMainButton appMainButton--tertiary"><div><span class="button__icon icon ubnt-icon--link-broken"></span><span translate="REMOTE_USER_VPN_TABLE_ACTION_TERMINATE" class="visible--lgUp"></span></div></button></td></tr></tbody></table><div ng-if="!remoteUserVpnListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="REMOTE_USER_VPN_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!remoteUserVpnListCtrl.isFiltered()" translate="REMOTE_USER_VPN_TABLE_EMPTY_NO_REMOTE_USER_VPN" class="noMarginBottom"></p><p ng-if="remoteUserVpnListCtrl.isFiltered()" translate="REMOTE_USER_VPN_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],716:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRemoteUserVpnList",["PaginatedListDirective",function(b){return new b("remoteUserVpn",a("./remoteUserVpnList.jade")())}])},{"./remoteUserVpnList.jade":715}],717:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("../../../app-unifi-manage/controllers/BaseRepeatableController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype._generateNumericAttr=function(a,b){return a.replace("{key}",b)},d.prototype.updateModel=function(a){this.model=a,this.syncCount()},d.prototype.syncCount=function(){var a=0;if(this.model&&this.attrs&&this.attrs.length)for(var b=1;b<=this.max;b++)this.model.attributes[this._generateNumericAttr(this.attrs[0],b)]&&a++;this.count=Math.max(this.min||0,a)},d.prototype.markFormAsDirty=function(){this.form&&this.form.$setDirty()},d.prototype.addItem=function(){if(e.prototype.addItem.call(this))return this.markFormAsDirty(),!0},d.prototype.removeItem=function(a){var b={};if(this.isRemoveAllowed()&&a<=this.count)return this.attrs.forEach(function(c){for(var d=a;d<=this.count;d++)b[this._generateNumericAttr(c,d)]=d===this.count?"":this.model.attributes[this._generateNumericAttr(c,d+1)]}.bind(this)),this.count--,this.model.set(b),this.markFormAsDirty(),!0},d.$inject=["formUtils"],angular.module("app-unifi-manage").controller("RepeatableFormController",d)},{"../../../app-unifi-manage/controllers/BaseRepeatableController":1002}],718:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRepeatableForm",["EVENTS",function(a){return{scope:!0,controller:"RepeatableFormController",controllerAs:"repeatableFormCtrl",restrict:"A",require:["^unifiRepeatableForm","^?form"],link:function(b,c,d,e){var f=e[0];f.form=e[1],b.$watch(d.unifiRepeatableFormMin,function(a){f.min=a}),b.$watch(d.unifiRepeatableFormMax,function(a){f.max=a}),b.$watch(d.unifiRepeatableFormAttrs,function(a){f.attrs=a}),b.$watch(d.unifiRepeatableFormIsReadOnly,function(a){f.isReadOnly=a}),b.$watch(d.unifiRepeatableFormModel,function(a){f.updateModel(a)}),b.$on(a.SYNC_REPEATABLE_COUNT,function(){f.syncCount()})}}}])},{}],719:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("../../../app-unifi-manage/controllers/BaseRepeatableController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateValues=function(a){this.values=a,this.syncCount()},d.prototype.syncCount=function(){this.count=Math.max(this.min||0,this.values?this.values.length:0),this.max&&this.count>this.max&&(this.count=this.max)},d.prototype.markFormAsDirty=function(){this.form&&this.form.$setDirty()},d.prototype.addItem=function(){if(e.prototype.addItem.call(this))return this.markFormAsDirty(),!0},d.prototype.removeItem=function(a){if(this.isRemoveAllowed()&&a<this.count)return this.values&&this.values.splice(a,1),this.count--,this.markFormAsDirty(),!0},d.$inject=["formUtils"],angular.module("app-unifi-manage").controller("RepeatableInputController",d)},{"../../../app-unifi-manage/controllers/BaseRepeatableController":1002}],720:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRepeatableInput",["EVENTS",function(a){return{scope:!0,controller:"RepeatableInputController",controllerAs:"repeatableInputCtrl",restrict:"A",require:["^unifiRepeatableInput","^?form"],link:function(b,c,d,e){var f=e[0];f.form=e[1],b.$watch(d.unifiRepeatableInputMin,function(a){f.min=a}),b.$watch(d.unifiRepeatableInputMax,function(a){f.max=a}),b.$watch(d.unifiRepeatableInputIsReadOnly,function(a){f.isReadOnly=a}),b.$watch(d.unifiRepeatableInputValues,function(a){f.updateValues(a)}),b.$on(a.SYNC_REPEATABLE_COUNT,function(){f.syncCount()})}}}])},{}],721:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n){this.$translate=a,this.d3=b,this.d3ChannelTrapezoidPoints=c,this.d3RfEnvironmentInterferenceScale=d,this.d3Transform=f,this.d3Url=g,this.domHelper=h,this.mathUtils=j,this.RADIO_TYPES=k,this.RF_ENVIRONMENT_CHART_OPTIONS=l,this.RF_ENVIRONMENT_CHART_SELECTORS=m,this.rfEnvironmentChart=n,this.interferenceToColor=this.d3RfEnvironmentInterferenceScale,this.normalizeUtilization=this.d3.scale.linear().domain([0,100]).range([.1,1]),e.call(this),this.render=i(this._render.bind(this),{throttleWait:1e3/15})}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){this.render()},d.prototype.setParentElement=function(a){this.parentElement=a},d.prototype._render=function(){if(!this.parentElement)throw new Error("Parent element is required.");if(!this.device)throw new Error("Device model is required.");if(!this.spectrumScan)throw new Error("SpectrumScan model is required.");if(!this.radioType)throw new Error("Radio type is required.");var a=this.domHelper.clientWidth(this.parentElement);if(this.svgElement=this.d3.select(this.parentElement).ubntSelectBuilder("svg").build(),!a)return void this.svgElement.attr("height",0).attr("width",0);var b=this.rfEnvironmentChart.getData(this.device,this.radioType,this.spectrumScan),c=this.rfEnvironmentChart.getDomainIntervals(b),d=this.rfEnvironmentChart.getTicks(c,this._getTickInterval(this.radioType));this.frequencyToPosition=this._getFrequencyToPosition(a,c);var e=this.rfEnvironmentChart.getCurrentChannelDescription(this.device,this.radioType),f=this.svgElement.ubntSelectBuilder("g").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.plot).build(function(a){var c=this.RF_ENVIRONMENT_CHART_OPTIONS.marginTopInPx;a.attr("transform",this.d3Transform.translate(this.RF_ENVIRONMENT_CHART_OPTIONS.marginLeftInPx,0));var f=a.ubntSelectBuilder("g").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.currentChannel).build(),g=a.ubntSelectBuilder("g").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.xAxis).build(),h=a.ubntSelectAllBuilder("g").withData(b).withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.htRow).build();c=this._renderHtRows(this.radioType,h,c,this.handlers),this._renderCurrentChannel(f,c,e),this._renderXAxis(g,c,d)}.bind(this));this.svgElement.attr("height",f[0][0].getBBox().height).attr("width",a)},d.prototype._getFrequencyToPosition=function(a,b){var c=this.rfEnvironmentChart.getDomainLength(b),d=b.length-1,e=a-this.RF_ENVIRONMENT_CHART_OPTIONS.marginLeftInPx-this.RF_ENVIRONMENT_CHART_OPTIONS.marginRightInPx,f=e-this.RF_ENVIRONMENT_CHART_OPTIONS.domainIntervalMarginInPx*d,g=b.reduce(function(a,b){return a.push(b.lowerFrequency),a.push(b.upperFrequency),a},[]),h=b.reduce(function(a,b){a.length?a.push(a[a.length-1]+this.RF_ENVIRONMENT_CHART_OPTIONS.domainIntervalMarginInPx):a.push(0);
var d=(b.upperFrequency-b.lowerFrequency)/c*f;return a.push(a[a.length-1]+d),a}.bind(this),[]);return this.d3.scale.linear().domain(g).range(h)},d.prototype._renderHtRows=function(a,b,c,d){return b.ubntEach(function(b,e){c+=this.RF_ENVIRONMENT_CHART_OPTIONS.rowMarginTopInPx;var f=0,g=0;b.ubntSelectBuilder("text").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.htLabel).build(function(a){a.attr("y",this.RF_ENVIRONMENT_CHART_OPTIONS.htLabelMarginTopInPx+c).attr("x",this.RF_ENVIRONMENT_CHART_OPTIONS.htLabelMarginLeftInPx).text(this.$translate.instant("DEVICE_PROPERTIES_RF_ENVIRONMENT_CHART_HT_LABEL",{ht:e.ht}))}.bind(this)),b.ubntSelectAllBuilder("g").withData(e.channels).withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.channel).build(function(b,e){e.lowerFrequency>=g?(g=e.upperFrequency,f=0):f+=1;var h=this._getChannelTrapezoidHeight(a),i=this._getChannelTrapezoidCut(a,e),j=this._getChannelTrapezoidWidth(e),k=this.frequencyToPosition(e.lowerFrequency),l=f*(h+this.RF_ENVIRONMENT_CHART_OPTIONS.channelTrapezoidBottomMarginInPx)+c,m=angular.isDefined(e.utilization)?this.normalizeUtilization(e.utilization):0,n=angular.isDefined(e.interference)?this.interferenceToColor(e.interference):"none";b.attr("transform",this.d3Transform.translate(k,l)),b.ubntSelectAllBuilder("path").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.channelTrapezoidBg).withData([this.d3ChannelTrapezoidPoints({height:h,width:j,cutLeft:i,cutRight:i})]).build(function(a){a.attr("d",this.d3.svg.line())}.bind(this)),b.ubntSelectAllBuilder("path").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.channelTrapezoid).withData([this.d3ChannelTrapezoidPoints({height:h,width:j,cutLeft:i,cutRight:i,scaleHeight:m})]).build(function(a){a.attr("d",this.d3.svg.line()).attr("fill",n)}.bind(this)),b.ubntSelectAllBuilder("path").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.channelBbox).withData([this.d3ChannelTrapezoidPoints({height:h,width:j,cutLeft:i,cutRight:i})]).build(function(a){a.attr("d",this.d3.svg.line()),this._addEventHandlers(a,d,e)}.bind(this)),b.ubntSelectBuilder("text").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.channelLabel).build(function(a){a.attr("font-size",this._getChannelLabelFontSize(j)).attr("y",h+10).attr("x",j/2).text(e.channel)}.bind(this)),b.ubntSelectBuilder("circle").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.channelMarkBg).build(function(a){e.utilization>=this.RF_ENVIRONMENT_CHART_OPTIONS.warningUtilizationLevel?a.attr("r",this._getChannelLabelFontSize(j)/2+1).attr("cy",h/2).attr("cx",j/2):a.remove()}.bind(this)),b.ubntSelectBuilder("text").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.channelMark).build(function(a){e.utilization>=this.RF_ENVIRONMENT_CHART_OPTIONS.warningUtilizationLevel?a.attr("font-size",this._getChannelLabelFontSize(j)).attr("y",h/2+this._getChannelLabelFontSize(j)/3).attr("x",j/2).text("!"):a.remove()}.bind(this))}.bind(this)),c+=b[0][0].getBBox().height+this.RF_ENVIRONMENT_CHART_OPTIONS.rowMarginBottomInPx}.bind(this)),c},d.prototype._renderCurrentChannel=function(a,b,c){a.ubntSelectBuilder("rect").withClass(this.RF_ENVIRONMENT_CHART_SELECTORS.currentChannelRect).build(function(a){a.attr("display",c?"block":"none"),c&&a.attr("x",this.frequencyToPosition(c.lowerFrequency)).attr("y",0).attr("height",b).attr("width",this._getChannelTrapezoidWidth(c)).attr("fill",this.d3Url.id("unifiRfEnvironmentChart__stripes"))}.bind(this))},d.prototype._renderXAxis=function(a,b,c){a.attr("transform",this.d3Transform.translate(0,b)).call(this.d3.svg.axis().scale(this.frequencyToPosition).tickValues(c).orient("bottom").innerTickSize(-b).outerTickSize(1).tickFormat(function(a){return a})).selectAll("text").attr("dx",".5em").attr("dy","0").attr("transform","rotate(90)").style("text-anchor","")},d.prototype._addEventHandlers=function(a,b,c){Object.keys(b||{}).forEach(function(d){a.on(d,function(){b[d](this.d3.event,c)}.bind(this))}.bind(this))},d.prototype._getTickInterval=function(a){switch(a){case this.RADIO_TYPES.NA.type:return this.RF_ENVIRONMENT_CHART_OPTIONS.tickIntervalNa;case this.RADIO_TYPES.NG.type:return this.RF_ENVIRONMENT_CHART_OPTIONS.tickIntervalNg}},d.prototype._getChannelTrapezoidHeight=function(a){switch(a){case this.RADIO_TYPES.NA.type:return this.RF_ENVIRONMENT_CHART_OPTIONS.channelTrapezoidNaHeightInPx;case this.RADIO_TYPES.NG.type:return this.RF_ENVIRONMENT_CHART_OPTIONS.channelTrapezoidNgHeightInPx}},d.prototype._getChannelTrapezoidCut=function(a,b){var c=0;switch(a){case this.RADIO_TYPES.NA.type:c=this.RF_ENVIRONMENT_CHART_OPTIONS.channelTrapezoidNaCutInMHz;break;case this.RADIO_TYPES.NG.type:c=this.RF_ENVIRONMENT_CHART_OPTIONS.channelTrapezoidNgCutInMHz}return this.frequencyToPosition(b.lowerFrequency+c)-this.frequencyToPosition(b.lowerFrequency)},d.prototype._getChannelTrapezoidWidth=function(a){return this.frequencyToPosition(a.upperFrequency)-this.frequencyToPosition(a.lowerFrequency)},d.prototype._getChannelLabelFontSize=function(a){var b=a<14;return b?this.RF_ENVIRONMENT_CHART_OPTIONS.channelLabelSmallFontSizeInPx:this.RF_ENVIRONMENT_CHART_OPTIONS.channelLabelRegularFontSizeInPx},d.$inject=["$translate","d3","d3ChannelTrapezoidPoints","d3RfEnvironmentInterferenceScale","d3Transform","d3Url","domHelper","inhibitor","mathUtils","RADIO_TYPES","RF_ENVIRONMENT_CHART_OPTIONS","RF_ENVIRONMENT_CHART_SELECTORS","rfEnvironmentChart"],angular.module("app-unifi-manage").controller("RfEnvironmentChartController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],722:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiRfEnvironmentChart"><svg height="0" width="0" class="unifiRfEnvironmentChartSvg"></svg><ng-d3-svg-pattern ng-d3-svg-pattern-id="unifiRfEnvironmentChart__stripes" ng-d3-svg-pattern-type="stripes" ng-d3-svg-pattern-options="{ width: 5 }"></ng-d3-svg-pattern></div>'),b.join("")}},{"jade/runtime":232}],723:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRfEnvironmentChart",["$timeout","$window","d3Url","devices","domHelper",function(b,c,d,e,f){return{bindToController:!0,controller:"RfEnvironmentChartController",controllerAs:"rfEnvironmentChartCtrl",replace:!0,scope:{device:"=unifiRfEnvironmentChartDevice",spectrumScan:"=unifiRfEnvironmentChartSpectrumScan",handlers:"=unifiRfEnvironmentChartHandlers",radioType:"=unifiRfEnvironmentChartRadioType"},template:a("./rfEnvironmentChart.jade")(),link:function(a,b,g,h){var i=b[0];h.setParentElement(i);var j=function(){h.render()};a.$watchGroup([function(){return h.device},function(){return h.spectrumScan},function(){return h.radioType},function(){return d.getUrlWithoutHash()},function(){return f.clientWidth(i)}],j),h.updateCollection(e.repository.collection),h.spectrumScan.on("change",j),c.addEventListener("resize",j,!1),a.$on("$destroy",function(){c.removeEventListener("resize",j,!1),h.spectrumScan.off("change",j),h.removeEventHandlers()})}}}])},{"./rfEnvironmentChart.jade":722}],724:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.$translate=a,this.d3=b,this.d3RfEnvironmentInterferenceScale=c,this.domHelper=e,this.options={tickCount:12,tickHeight:4,tickSpacing:1,labels:[-96,-80,-64,-48],maxHueValue:120,paddingLeft:0,paddingRight:22,interferenceLegendPos:8,interferenceLegendMarginLeft:2,interferenceChartPos:12,utilizationLegendPos:30,interferenceRange:[-96,-48]},this.tickIndexToInterference=this.d3.scale.linear().domain([0,this.options.tickCount-1]).range(this.options.interferenceRange)}d.prototype.setParentElement=function(a){this.parentElement=a},d.prototype.render=function(){if(!this.parentElement)throw new Error("Parent element is required.");this.domHelper.clientWidth(this.parentElement)&&this._render()},d.prototype._render=function(){this._renderChart(),this._renderTicks(),this._renderLabels(),this._renderInfos()},d.prototype._renderChart=function(){this.svgLegend=this.d3.select(this.parentElement).ubntSelectBuilder("svg").withClass("unifiRfEnvironmentLegend__graph").build().attr("width",this.parentElement.clientWidth).attr("height",this.parentElement.clientHeight)},d.prototype._renderTicks=function(){var a=this.options.paddingLeft,b=this.options.paddingRight,c=this.parentElement.clientWidth-a-b,d=this.options.tickCount,e=this.options.tickSpacing,f=(c-(d-1)*e)/d,g=this.options.tickHeight,h=this.options.interferenceChartPos,i=Array.from({length:d},function(a,b){return this.tickIndexToInterference(b)}.bind(this)),j=this.d3.scale.linear().domain(this.options.interferenceRange).range([a,c+a-f]);this.svgLegend.ubntSelectBuilder("g").withClass("unifiRfEnvironmentLegend__ticks").build().ubntSelectAllBuilder("rect").withData(i).withClass("unifiRfEnvironmentLegend__tick").build(function(a){a.attr("x",j).attr("y",h).attr("width",f).attr("height",g).attr("fill",this.d3RfEnvironmentInterferenceScale)}.bind(this))},d.prototype._renderLabels=function(){var a=this.options.paddingLeft,b=this.options.paddingRight,c=this.parentElement.clientWidth-a-b,d=this.options.interferenceLegendPos,e=this.d3.scale.linear().domain(this.options.interferenceRange).range([a,c+a]);this.svgLegend.ubntSelectBuilder("g").withClass("unifiRfEnvironmentLegend__labels").build().ubntSelectAllBuilder("text").withData(this.options.labels).withClass("unifiRfEnvironmentLegend__label").build(function(a,b){a.text(b).attr("x",e).attr("y",d)})},d.prototype._renderInfos=function(){var a=this.options.paddingLeft,b=this.options.paddingRight,c=this.parentElement.clientWidth,d=this.options.interferenceLegendPos,e=this.options.interferenceLegendMarginLeft,f=this.options.utilizationLegendPos;this.svgLegend.ubntSelectBuilder("g").withClass("unifiRfEnvironmentDescriptions").build(function(g){g.ubntSelectBuilder("text").withClass("unifiRfEnvironmentLegend_interference").build(function(a){a.text("dBm").attr("x",c-b+e).attr("y",d)}),g.ubntSelectBuilder("text").withClass("unifiRfEnvironmentLegend_utilization").build(function(b){b.text(this.$translate.instant("DEVICE_PROPERTIES_RF_ENVIRONMENT_LEGEND_UTILIZATION")).attr("x",a).attr("y",f)}.bind(this))}.bind(this))},d.$inject=["$translate","d3","d3RfEnvironmentInterferenceScale","d3Transform","domHelper"],angular.module("app-unifi-manage").controller("RfEnvironmentLegendController",d)},{}],725:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiRfEnvironmentLegend"><svg width="0" height="0" class="unifiRfEnvironmentLegend__graph"></svg></div>'),b.join("")}},{"jade/runtime":232}],726:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRfEnvironmentLegend",["domHelper",function(b){return{controller:"RfEnvironmentLegendController",controllerAs:"rfEnvironmentLegendCtrl",template:a("./rfEnvironmentLegend.jade")(),transclude:!0,replace:!0,link:function(a,c,d,e){e.setParentElement(c[0]),a.$watch(function(){return b.clientWidth(c[0])},function(){e.render()})}}}])},{"./rfEnvironmentLegend.jade":725}],727:[function(a,b,c){"use strict";function d(a,b,c,d){this.$translate=a,this.d3=b,this.d3RfEnvironmentRssiInterferenceScale=c,this.RF_ENVIRONMENT_INTERFERENCE_INTERVAL=d,this.options={tickHeight:50,tickSpacing:1,tickRounding:.3,interferenceGradientPadding:1,interferenceGradientStepHeight:2,padding:15}}d.prototype.setParentElement=function(a){this.parentElement=a},d.prototype.render=function(a,b){if(!this.parentElement)throw new Error("Parent element is required.");if(!a)throw new Error("Data is required.");if(!angular.isArray(a))throw new Error("Data should be an Array.");this.svgRssiHistogram=this.d3.select(this.parentElement).ubntSelectBuilder("svg").withClass("unifiRfEnvironmentRssiHistogram__graph").build().attr("width",this.parentElement.firstChild.clientWidth),this._renderTicks(a,b),this._renderInterferenceGradient(b),this._renderLabels(b),this.svgRssiHistogram.attr("height",this.svgRssiHistogram[0][0].getBBox().height)},d.prototype._renderTicks=function(a,b){var c=this.parentElement.firstChild.clientWidth,d=a.length,e=this.options.tickSpacing,f=(c-(d-1)*e)/d,g=this.options.tickHeight,h=this.d3.scale.linear().domain([0,d-1]).range(this._getInterferenceInterval(b)),i=this.d3.scale.linear().domain([0,100]).range([0,g]),j=this.d3.scale.linear().domain(this._getInterferenceInterval(b)).range([0,c-f]),k=Array.from({length:d},function(a,b){return h(b)});this.svgRssiHistogram.ubntSelectBuilder("g").withClass("unifiRfEnvironmentRssiHistogram__ticks").build(function(b){b.ubntSelectAllBuilder("rect").withData(k).withClass("unifiRfEnvironmentRssiHistogram__bgTick").build(function(a){a.attr("x",j).attr("y",0).attr("width",f).attr("height",g)}),b.ubntSelectAllBuilder("rect").withData(k).withClass("unifiRfEnvironmentRssiHistogram__tick").build(function(b,c,d){var e=a[d],h=i(e),k=this.options.tickRounding*f;b.attr("x",j).attr("y",g-h).attr("rx",k).attr("ry",k).attr("width",f).attr("height",h).attr("fill",this.d3RfEnvironmentRssiInterferenceScale)}.bind(this))}.bind(this))},d.prototype._renderInterferenceGradient=function(a){var b=this.parentElement.firstChild.clientWidth,c=this.svgRssiHistogram[0][0].getBBox().height,d=this._getInterferenceInterval(a),e=d[1]-d[0],f=this.d3.range.apply(this.d3,d),g=this.d3.scale.linear().domain(d).range([0,b]),h=c+this.options.interferenceGradientPadding,i=this.options.interferenceGradientStepHeight;this.svgRssiHistogram.ubntSelectBuilder("g").withClass("unifiRfEnvironmentRssiHistogram__interferenceGradient").build().ubntSelectAllBuilder("rect").withData(f).withClass("unifiRfEnvironmentRssiHistogram__interferenceGradientStep").build(function(a){var c=1.1*b/e;a.attr("x",g).attr("y",h).attr("width",c).attr("height",i).attr("fill",this.d3RfEnvironmentRssiInterferenceScale)}.bind(this))},d.prototype._renderLabels=function(a){var b=this.options.padding,c=this.parentElement.firstChild.clientWidth-2*b,d=this.svgRssiHistogram[0][0].getBBox().height,e=this._getInterferenceInterval(a),f=this.d3.scale.linear().domain(e).range([b,c+b]);this.svgRssiHistogram.ubntSelectBuilder("g").withClass("unifiRfEnvironmentRssiHistogram__labels").build().ubntSelectAllBuilder("text").withData(e).withClass("unifiRfEnvironmentRssiHistogram__label").build(function(a,b){a.text(b+" "+this.$translate.instant("DEVICE_RADIO_TRANSMIT_POWER_DBM")).attr("x",f).attr("y",d+a[0][0].getBBox().height)}.bind(this))},d.prototype._getInterferenceInterval=function(a){return this.RF_ENVIRONMENT_INTERFERENCE_INTERVAL[a]},d.$inject=["$translate","d3","d3RfEnvironmentRssiInterferenceScale","RF_ENVIRONMENT_INTERFERENCE_INTERVAL"],angular.module("app-unifi-manage").controller("RfEnvironmentRssiHistogramController",d)},{}],728:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiRfEnvironmentRssiHistogram"><svg width="0" height="0" class="unifiRfEnvironmentRssiHistogram__graph"></svg></div>'),b.join("")}},{"jade/runtime":232}],729:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRfEnvironmentRssiHistogram",[function(){return{controller:"RfEnvironmentRssiHistogramController",controllerAs:"rfEnvironmentRssiHistogramCtrl",template:a("./rfEnvironmentRssiHistogram.jade")(),transclude:!0,scope:{data:"=unifiRfEnvironmentRssiHistogramData",ht:"=unifiRfEnvironmentRssiHistogramHt"},link:function(a,b,c,d){d.setParentElement(b[0]),a.$watch("data",function(){d.render(a.data,a.ht)})}}}])},{"./rfEnvironmentRssiHistogram.jade":728}],730:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-style=\"{     'left': offset.left,     'bottom': offset.bottom   }\" class=\"unifiRfEnvironmentTooltip\"><div ng-class=\"{       'appTooltip--standalone': offset.align === 'standalone',       'appTooltip--right': offset.align === 'right',       'appTooltip--left': offset.align === 'left'     }\" class=\"appTooltip\"><div class=\"appSubHeading appSubHeading--standalone\"><div class=\"iconText\"><div class=\"iconText__icon icon ubnt-icon--bars\"></div><div class=\"iconText__text\">{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_CHANNEL_LABEL' | translate }} {{content.channel }}</div></div></div><div class=\"unifiRfEnvironmentTooltip__data\"><div class=\"unifiRfEnvironmentTooltip__header\">{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_SECTION_OVERVIEW' | translate }}</div><table class=\"appTable appTable--condensed appTable--noLines noMarginBottom\"><tbody><tr><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_RADIOTYPE_LABEL' | translate }}</td><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_RADIOTYPE_' + content.radioType | uppercase | translate }}</td></tr><tr><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_HT_LABEL' | translate }}</td><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_HT_DATA' | translate:'{ht: ' + content.ht + '}' }}</td></tr><tr ng-if=\"content.subChannels.length &gt; 1\"><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_SUBCHANNELS_LABEL' | translate }}</td><td>{{ content.subChannels[0] }} - {{ content.subChannels[ content.subChannels.length - 1] }}</td></tr><tr><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_FREQUENCY_RANGE_LABEL' | translate }}</td><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_FREQUENCY_RANGE_DATA' | translate:'{lowerFrequency: ' + content.lowerFrequency + ', upperFrequency: ' + content.upperFrequency + '}' }}</td></tr></tbody></table><div class=\"unifiRfEnvironmentTooltip__header\">{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_SECTION_RF_SCAN_DETAILS' | translate }}</div><table ng-if=\"content.utilization !== undefined &amp;&amp; content.interference !== undefined\" class=\"appTable appTable--condensed appTable--noLines noMarginBottom\"><tbody><tr><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_UTILIZATION_LABEL' | translate }}</td><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_UTILIZATION_DATA' | translate:'{utilization: ' + content.utilization + '}' }}</td></tr><tr><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_INTERFERENCE_LABEL' | translate }}</td><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_INTERFERENCE_DATA' | translate:'{interference: ' + content.interference + '}' }}</td></tr><tr><td colspan=\"2\" class=\"alignCenter\"><unifi-rf-environment-rssi-histogram unifi-rf-environment-rssi-histogram-data=\"content.rssi_histogram\" unifi-rf-environment-rssi-histogram-ht=\"content.ht\"></unifi-rf-environment-rssi-histogram></td></tr><tr ng-if=\"content.interference_type.length &gt; 0\"><td>{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_INTERFERENCE_TYPE_LABEL' | translate }}</td><td><div ng-repeat=\"type in content.interference_type\" ng-class=\"{                   'ubnt-icon--wifi-2': type === 'wifi',                   'ubnt-icon--microwave': type === 'microwave',                   'ubnt-icon--bluetooth-oval': type === 'fhss',                   'ubnt-icon--tone': type === 'tone'                 }\" title=\"{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_INTERFERENCE_TYPE_' + type | uppercase | translate }}\" class=\"icon icon--inline noMarginLeft\"></div></td></tr></tbody></table><div ng-if=\"content.utilization === undefined || content.interference === undefined\" class=\"appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--noBorder\"><div class=\"appInfoBox__icon icon ubnt-icon--info\"></div><div class=\"appInfoBox__content\"><div class=\"appInfoBox__body\"><p class=\"noMarginBottom\">{{ 'DEVICE_PROPERTIES_RF_ENVIRONMENT_TOOLTIP_NO_DATA_AVAILABLE' | translate }}</p></div></div></div></div></div></div>"),b.join("")}},{"jade/runtime":232}],731:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRfEnvironmentTooltip",[function(){return{template:a("./rfEnvironmentTooltip.jade")(),replace:!0,scope:{content:"=unifiRfEnvironmentTooltipContent",offset:"=unifiRfEnvironmentTooltipOffset"}}}])},{"./rfEnvironmentTooltip.jade":730}],732:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.$translate=a,this.apiResults=b,this.gatewayUtils=c,this.heyToasts=d,this.networks=g,this.preferences=h,this.routing=i,this.DEVICE_MODELS=j,this.patterns={ip:k.IP_ADDRESS,name:k.NAME,routeDistance:k.ROUTE_DISTANCE,subnet:k.SUBNET},this.collectInterfaces(),e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.collectInterfaces=function(){var a=this.gatewayUtils.getSiteGateway(),b=this.gatewayUtils.getMappedPorts(a);this.interfaces=b.filter(function(a){return 0===a.indexOf("wan")}).map(function(b){return{label:this.gatewayUtils.getPortLabel(b,a),value:[b.slice(0,3),b.slice(3)||"1"].join("").toUpperCase()}},this),this.interfaces.push.apply(this.interfaces,this.networks.repository.collection.map(function(a){return{label:a.get("name"),value:a.id}}))},d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes);return"interface-route"!==a["static-route_type"]&&delete a["static-route_interface"],"nexthop-route"!==a["static-route_type"]&&delete a["static-route_nexthop"],this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("SETTINGS_ROUTING_TAB_STATIC_ROUTES").toLowerCase()})),this.routing.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("SETTINGS_ROUTING_TAB_STATIC_ROUTES").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";this["model"+b]&&(this["model"+b].attributes.enabled=!this.model||this.model.get("enabled")!==!1,this["model"+b].attributes.type=this.model&&this.model.get("type")||"static-route",this["model"+b].attributes["static-route_type"]=this.model&&this.model.get("static-route_type")||"nexthop-route",this["model"+b].attributes["static-route_interface"]=this.model&&this.model.get("static-route_interface")||"WAN1")},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","apiResults","gatewayUtils","heyToasts","modelDivergence","networks","preferences","routing","DEVICE_MODELS","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("RoutingFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],733:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="routingFormCtrl.form" ng-class="{    \'appForm--dark\': routingFormCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': routingFormCtrl.showValidation,    \'is-validation-hidden\': !routingFormCtrl.showValidation  }" ng-submit="routingFormCtrl.form.$valid &amp;&amp; routingFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="routingFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="routingFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="routingFormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="routingFormCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{routeName: routingFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_ROUTING_SECTION_VIEW\' : (routingFormCtrl.model.id ? \'SETTINGS_ROUTING_SECTION_EDIT\' : \'SETTINGS_ROUTING_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_ROUTING_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="text" name="routeName" ng-model="routingFormCtrl.modelCopy.attributes.name" ng-model-master="routingFormCtrl.model.attributes.name" ng-pattern="routingFormCtrl.patterns.name" required="true" class="input--full"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_ROUTING_LABEL_ENABLED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="routeEnabled" id="routeEnabled" ng-model="routingFormCtrl.modelCopy.attributes.enabled" ng-model-master="routingFormCtrl.model.attributes.enabled"><label for="routeEnabled" translate="SETTINGS_ROUTING_VALUES_ENABLED"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_ROUTING_TYPE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="routeType" id="routeTypeStatic" value="static-route" ng-model="routingFormCtrl.modelCopy.attributes.type" ng-model-master="routingFormCtrl.model.attributes.type"><label for="networkPurposeCorporate" translate="SETTINGS_ROUTING_TYPE_STATIC"></label></div></div></div></div><div ng-show="routingFormCtrl.setVisibility(\'static\', routingFormCtrl.modelCopy.attributes.type === \'static-route\')" class="row"><div class="col--sm3"><label translate="SETTINGS_ROUTING_LABEL_NETWORK" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="text" name="routeNetwork" ng-model="routingFormCtrl.modelCopy.attributes[\'static-route_network\']" ng-model-master="routingFormCtrl.model.attributes[\'static-route_network\']" ng-pattern="routingFormCtrl.patterns.subnet" ng-required="routingFormCtrl.getVisibility(\'static\')"></div></div></div><div ng-show="routingFormCtrl.setVisibility(\'static\', routingFormCtrl.modelCopy.attributes.type === \'static-route\')" class="row"><div class="col--sm3"><label translate="SETTINGS_ROUTING_LABEL_DISTANCE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><input type="text" size="4" name="routeDistance" ng-model="routingFormCtrl.modelCopy.attributes[\'static-route_distance\']" ng-model-master="routingFormCtrl.model.attributes[\'static-route_distance\']" ng-pattern="routingFormCtrl.patterns.routeDistance" class="input--smallNumber"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_STATIC_ROUTING_LABEL_TYPE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="staticRouteType" id="staticRouteTypeNexthop" value="nexthop-route" ng-model="routingFormCtrl.modelCopy.attributes[\'static-route_type\']" ng-model-master="routingFormCtrl.model.attributes[\'static-route_type\']"><label for="staticRouteTypeNexthop" translate="SETTINGS_STATIC_ROUTING_TYPE_NEXTHOP"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="staticRouteType" id="staticRouteTypeinterface" value="interface-route" ng-model="routingFormCtrl.modelCopy.attributes[\'static-route_type\']" ng-model-master="routingFormCtrl.model.attributes[\'static-route_type\']"><label for="staticRouteTypeinterface" translate="SETTINGS_STATIC_ROUTING_TYPE_INTERFACE"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="staticRouteType" id="staticRouteTypeBlackhole" value="blackhole" ng-model="routingFormCtrl.modelCopy.attributes[\'static-route_type\']" ng-model-master="routingFormCtrl.model.attributes[\'static-route_type\']"><label for="staticRouteTypeBlackhole" translate="SETTINGS_STATIC_ROUTING_TYPE_BLACKHOLE"></label></div></div></div></div><div ng-show="routingFormCtrl.setVisibility(\'nexthop\', routingFormCtrl.modelCopy.attributes[\'static-route_type\'] === \'nexthop-route\')" class="row"><div class="col--sm3"><label translate="SETTINGS_STATIC_ROUTING_LABEL_NEXTHOP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="text" name="routeNexthop" placeholder="{{\'SETTINGS_STATIC_ROUTING_VALUES_NEXTHOP_PLACEHOLDER\' | translate}}" ng-model="routingFormCtrl.modelCopy.attributes[\'static-route_nexthop\']" ng-model-master="routingFormCtrl.model.attributes[\'static-route_nexthop\']" ng-pattern="routingFormCtrl.patterns.ip" ng-required="routingFormCtrl.getVisibility(\'nexthop\')"></div></div></div><div ng-show="routingFormCtrl.setVisibility(\'interface\', routingFormCtrl.modelCopy.attributes[\'static-route_type\'] === \'interface-route\')" class="row"><div class="col--sm3"><label translate="SETTINGS_STATIC_ROUTING_LABEL_INTERFACE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="interface in routingFormCtrl.interfaces" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="staticRouteInterface" id="{{\'staticRouteInterface\' + interface.value}}" value="{{interface.value}}" ng-model="routingFormCtrl.modelCopy.attributes[\'static-route_interface\']" ng-model-master="routingFormCtrl.model.attributes[\'static-route_interface\']"><label for="{{\'staticRouteInterface\' + interface.value}}">{{interface.label}}</label></div></div></div></div></div></fieldset><div ng-class="{\'appFormFooter--dark\': routingFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button type="submit" ng-if="!isReadOnly" ng-click="routingFormCtrl.showValidation = true" busy-toggle="routingFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveRoute">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="routingFormCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],734:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRoutingForm",["SimpleFormDirective",function(b){return new b("routing",a("./routingForm.jade")())}])},{"./routingForm.jade":733}],735:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j){this.$state=a,this.$translate=b,this.heyToasts=d,this.frame=f,this.routing=h,this.preferences=i,this.networks=j,this.defaultSortBy="name",this.isRemoving={},e.call(this,c,g)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.routing.repository.collection},d.prototype.getInterfaceLabel=function(a){var b=this.networks.repository.collection.get(a);return b?b.get("name"):a},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_ROUTING_DELETE_CONFIRM_TITLE",{routeName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_ROUTING_DELETE_CONFIRM_MESSAGE",{routeName:a.get("name")});
}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("SETTINGS_ROUTING_DELETE_SUCCESS",{routeName:a.get("name")})),!0}.bind(this))["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("SETTINGS_ROUTING_DELETE_ERROR",{routeName:a.get("name")})),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.$inject=["$state","$translate","$q","heyToasts","frame","CollectionView","routing","preferences","networks"],angular.module("app-unifi-manage").controller("RoutingListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],736:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="routingTable" collection-view-sort="routingListCtrl.view" ng-class="{      \'appTable--dark\': routingListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="routingName"><span translate="SETTINGS_ROUTING_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="enabled" class="routingEnabled"><span translate="SETTINGS_ROUTING_TABLE_HEADER_ENABLED"></span></th><th collection-view-sort-by="static-route_network" class="routingNetwork"><span translate="SETTINGS_ROUTING_TABLE_HEADER_NETWORK"></span></th><th collection-view-sort-by="static-route_type" class="routingType"><span translate="SETTINGS_ROUTING_TABLE_HEADER_TYPE"></span></th><th collection-view-sort-by="static-route_interface" class="routingInterface"><span translate="SETTINGS_ROUTING_TABLE_HEADER_INTERFACE"></span></th><th collection-view-sort-by="static-route_nexthop" class="routingNexthop"><span translate="SETTINGS_ROUTING_TABLE_HEADER_NEXTHOP"></span></th><th collection-view-sort-by="static-route_distance" class="routingDistance"><span translate="SETTINGS_ROUTING_TABLE_HEADER_DISTANCE"></span></th><th class="routingActions"><span translate="SETTINGS_ROUTING_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in routingListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="routingName">{{::model.get(\'name\')}}</td><td ng-bind-html="model.get(\'enabled\') | enabledIcon" class="routingEnabled"></td><td class="routingNetwork">{{::model.get(\'static-route_network\')}}</td><td ng-switch="model.get(\'static-route_type\')" class="routingType"><span ng-switch-when="blackhole" translate="SETTINGS_STATIC_ROUTING_TYPE_BLACKHOLE"></span><span ng-switch-when="interface-route" translate="SETTINGS_STATIC_ROUTING_TYPE_INTERFACE"></span><span ng-switch-when="nexthop-route" translate="SETTINGS_STATIC_ROUTING_TYPE_NEXTHOP"></span></td><td class="routingInterface">{{::routingListCtrl.getInterfaceLabel(model.get(\'static-route_interface\'))}}</td><td class="routingNexthop">{{::model.get(\'static-route_nexthop\')}}</td><td class="routingDistance">{{::model.get(\'static-route_distance\')}}</td><td class="routingActions appTableCell--actions"><button unifi-if-role-admin ng-click="routingListCtrl.edit(model)" ng-disabled="routingListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin="false" ng-click="routingListCtrl.edit(model)" ng-disabled="routingListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW"></span></button><button unifi-if-role-admin ng-click="routingListCtrl.remove(model)" ng-disabled="routingListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!routingListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': routingListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_ROUTING_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],737:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRoutingList",["ListDirective",function(b){return new b("routing",a("./routingList.jade")(),{onEdit:"&unifiRoutingListOnEdit"})}])},{"./routingList.jade":736}],738:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.routingStats=b,this.INSIGHTS_DEFAULTS=g,this.filter=new c,e.call(this,a,d,f)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.routingStats.repository.collection},d.$inject=["$injector","routingStats","RoutingStatsFilter","CollectionView","preferences","INSIGHTS_DEFAULTS"],angular.module("app-unifi-manage").controller("RoutingStatsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],739:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="routingStatsListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="routingStatsListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="routingStatsListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><table id="routingTable" collection-view-sort="routingStatsListCtrl.view" ng-class="{          \'is-not-responsive\': !routingStatsListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="prefix" class="routingPrefix"><span translate="ROUTING_TABLE_HEADER_PREFIX"></span></th><th collection-view-sort-by="type" class="routingType"><span translate="ROUTING_TABLE_HEADER_TYPE"></span></th><th collection-view-sort-by="interface" class="routingInterface"><span translate="ROUTING_TABLE_HEADER_INTERFACE"></span></th><th collection-view-sort-by="metric" class="routingMetric"><span translate="ROUTING_TABLE_HEADER_METRIC"></span></th><th collection-view-sort-by="via" class="routingVia"><span translate="ROUTING_TABLE_HEADER_VIA"></span></th></tr></thead><tfoot ng-if="routingStatsListCtrl.view.getModels().length"><tr><td colspan="5"><unifi-list-pagination unifi-list-pagination-current-page="routingStatsListCtrl.currentPage" unifi-list-pagination-rows-per-page="routingStatsListCtrl.rowsPerPage" unifi-list-pagination-total-rows="routingStatsListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in routingStatsListCtrl.view.getModels(),              startFrom (routingStatsListCtrl.currentPage - 1) * routingStatsListCtrl.rowsPerPage,              limitTo routingStatsListCtrl.rowsPerPage"><td class="routingPrefix">{{::model.get(\'prefix\')}}</td><td class="routingType">{{::model.get(\'type\')}}</td><td class="routingInterface">{{::model.get(\'interface\')}}</td><td class="routingMetric">{{::model.get(\'metric\')}}</td><td class="routingVia">{{::model.get(\'via\')}}</td></tr></tbody></table><div ng-if="!routingStatsListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="ROUTING_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!routingStatsListCtrl.isFiltered()" translate="ROUTING_TABLE_EMPTY_NO_ROUTES" class="noMarginBottom"></p><p ng-if="routingStatsListCtrl.isFiltered()" translate="ROUTING_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],740:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiRoutingStatsList",["PaginatedListDirective",function(b){return new b("routingStats",a("./routingStatsList.jade")())}])},{"./routingStatsList.jade":739}],741:[function(a,b,c){"use strict";function d(a,b){this.$window=a,this.$document=b}d.prototype.download=function(a,b){var c=b+"Config.png";return this.$window.domToImage.toPng(a).then(function(a){var b=a.replace(/^data:image\/[^;]*/,"data:image/octet-stream"),d=this.$document[0].createElement("a");d.download=c,d.href=b,angular.element(this.$document[0].body).append(d),d.click(),angular.element(d).remove()}.bind(this))},d.$inject=["$window","$document"],angular.module("app-unifi-manage").controller("ScreenshotDownloadController",d)},{}],742:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiScreenshotDownload",[function(){return{controller:"ScreenshotDownloadController",controllerAs:"screenshotDownloadCtrl",scope:{section:"=unifiScreenshotDownload",elementId:"@unifiScreenshotDownloadElementId",toggleClass:"@unifiScreenshotDownloadToggleClass"},link:function(a,b,c,d){b.on("click",function(b){b.preventDefault(),b.stopPropagation();var c=angular.element("#"+a.elementId);c.addClass(a.toggleClass),d.download(c[0],a.section).then(function(){c.removeClass(a.toggleClass)})})}}}])},{}],743:[function(a,b,c){"use strict";function d(a,b){this.sdn=a,this.SDN_STATES=b}d.$inject=["sdn","SDN_STATES"],angular.module("app-unifi-manage").controller("SdnStatusController",d)},{}],744:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<h5 class=\"noMarginBottom\"><span ng-class=\"{      'appBadge--medium': sdnStatusCtrl.sdn.getStatus() === sdnStatusCtrl.SDN_STATES.DISABLED,      'appBadge--warning': sdnStatusCtrl.sdn.getStatus() === sdnStatusCtrl.SDN_STATES.CONNECTING,      'appBadge--success': sdnStatusCtrl.sdn.getStatus() === sdnStatusCtrl.SDN_STATES.CONNECTED,      'appBadge--danger': sdnStatusCtrl.sdn.getStatus() === sdnStatusCtrl.SDN_STATES.DISCONNECTED || sdnStatusCtrl.sdn.getStatus() === sdnStatusCtrl.SDN_STATES.NOT_REGISTERED    }\" translate=\"SETTINGS_CLOUD_ACCESS_LABEL_STATUS_{{sdnStatusCtrl.sdn.getStatus().toUpperCase()}}\" class=\"appBadge\"></span></h5>"),b.join("")}},{"jade/runtime":232}],745:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSdnStatus",[function(){return{template:a("./sdnStatus.jade")(),controller:"SdnStatusController",controllerAs:"sdnStatusCtrl"}}])},{"./sdnStatus.jade":744}],746:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.devices=f,this.comparator=h,this.DeviceFilter=i,this.getDeviceModel=g.getDeviceModel.bind(g),this.defaultSortBy="state",e.call(this,a,b,c,d)}var e=a("../../../app-unifi-manage/controllers/BaseDropdownListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){this.filter=new this.DeviceFilter},d.prototype.getCollection=function(){return this.devices.repository.collection},d.$inject=["$injector","$timeout","CollectionView","preferences","devices","deviceStateUtils","manageDevicesComparator","DeviceFilter"],angular.module("app-unifi-manage").controller("SelectDeviceDropdownListController",d)},{"../../../app-unifi-manage/controllers/BaseDropdownListController":999}],747:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<ng-form ng-class="::{    \'appForm--cozy\': selectDeviceDropdownListCtrl.isCozy,    \'appForm--dark\': selectDeviceDropdownListCtrl.isDark  }" class="appForm"><div ng-click="selectDeviceDropdownListCtrl.openDropdown()" ng-class="{\'is-input-invalid\': selectDeviceDropdownListCtrl.isRequired &amp;&amp; !selectDeviceDropdownListCtrl.selectedModel}" on-outside-element-click="selectDeviceDropdownListCtrl.closeDropdown()" ng-switch="selectDeviceDropdownListCtrl.isDropdownVisible || !selectDeviceDropdownListCtrl.selectedModel" class="appFormDropdown appFormDropdown--withSearch fullWidth"><div ng-switch-when="false" ng-class="{\'appFormDropdown__selectedItem--noIcon\': !selectDeviceDropdownListCtrl.noClear}" class="appIconInput appIconInput--full appIconInput--right appFormDropdown__selectedItem appInputGroup"><div unifi-device-status="selectDeviceDropdownListCtrl.selectedModel" unifi-device-status-is-cozy="true" unifi-device-status-with-icons="true" unifi-device-status-label="selectDeviceDropdownListCtrl.selectedModel.getDisplayName()" class="appIconInput__input"></div><div ng-if="!selectDeviceDropdownListCtrl.noClear" ng-click="selectDeviceDropdownListCtrl.selectModel(); $event.stopImmediatePropagation(); $event.preventDefault();" ng-class="selectDeviceDropdownListCtrl.isBusy ? \'appIconAnimated--rotate ubnt-icon--sync\' : \'ubnt-icon--x-circle\'" class="appIconInput__icon icon clickable"></div></div><unifi-search ng-switch-when="true" unifi-search-on-change="selectDeviceDropdownListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-full-width="true" unifi-search-is-cozy="selectDeviceDropdownListCtrl.isCozy" unifi-search-is-dark="selectDeviceDropdownListCtrl.isDark" unifi-search-is-busy="selectDeviceDropdownListCtrl.view.isRefreshing()" unifi-search-query="selectDeviceDropdownListCtrl.filter.searchQuery" unifi-search-placeholder="\'COMMON_SELECT_DEVICE_DROPDOWN_SEARCH_PLACEHOLDER\'"></unifi-search><div ng-click="$event.stopPropagation();" ng-class="{        \'appDropdown--dark\': selectDeviceDropdownListCtrl.isDark,        \'is-dropdown-visible\': selectDeviceDropdownListCtrl.isDropdownVisible      }" class="appDropdown"><table ng-class="{          \'appTable--cozy\': !selectDeviceDropdownListCtrl.isCozy,          \'appTable--condensed\': selectDeviceDropdownListCtrl.isCozy,          \'appTable--light\': !selectDeviceDropdownListCtrl.isDark,          \'appTable--dark\': selectDeviceDropdownListCtrl.isDark        }" class="noMarginBottom appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--minor appTable--striped appTable--transparent"><tfoot ng-if="selectDeviceDropdownListCtrl.view.getModels().length"><tr><td colspan="4"><unifi-micro-pagination unifi-micro-pagination-current-page="selectDeviceDropdownListCtrl.currentPage" unifi-micro-pagination-rows-per-page="selectDeviceDropdownListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="selectDeviceDropdownListCtrl.view.getModels().length" class="noMarginBottom horizontalRhythmLeft--condensed"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in selectDeviceDropdownListCtrl.view.getModels(),              startFrom (selectDeviceDropdownListCtrl.currentPage - 1) * selectDeviceDropdownListCtrl.rowsPerPage,              limitTo selectDeviceDropdownListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-click="selectDeviceDropdownListCtrl.selectModel(model)" ng-class="{\'is-row-selected\': selectDeviceDropdownListCtrl.selectedModel.id === model.id}" class="clickable"><td class="deviceStateIcon unifiDevicesTable__statusBall"><span unifi-device-status="::model" unifi-device-status-with-icons="true" class="horizontalRhythmLeft--condensed"></span></td><td ng-attr-title="{{::model.get(\'mac\')}}" class="deviceName">{{::model.getDisplayName()}}</td><td class="deviceModel visible--smUp">{{::selectDeviceDropdownListCtrl.getDeviceModel(model)}}</td><td class="deviceActions appTableCell--actions noVerticalPadding"><button unifi-open-panel="model" unifi-open-panel-active-tab="\'configure\'" title="{{\'COMMON_PROPERTY_PANEL_OPEN\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--panels"></span></button></td></tr></tbody></table><div ng-if="!selectDeviceDropdownListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': selectDeviceDropdownListCtrl.isDark}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="COMMON_SELECT_DEVICE_DROPDOWN_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div></div></ng-form>'),b.join("")}},{"jade/runtime":232}],748:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSelectDeviceDropdownList",["PaginatedListDirective",function(b){var c=new b("selectDeviceDropdown",a("./selectDeviceDropdownList.jade")(),{isCozy:"=unifiSelectDeviceDropdownListIsCozy",isDark:"=unifiSelectDeviceDropdownListIsDark",isRequired:"=unifiSelectDeviceDropdownListIsRequired",noClear:"=?unifiSelectDeviceDropdownListNoClear",selectedModel:"=unifiSelectDeviceDropdownListSelectedModel",localStateIsTemporary:"=unifiSelectDeviceDropdownListLocalStateIsTemporary",deviceFilter:"&?unifiSelectDeviceDropdownListDeviceFilter",onSelect:"&?unifiSelectDeviceDropdownListOnSelect",refreshEvent:"=?unifiSelectDeviceDropdownListRefreshEvent"});return c.addMixin({init:function(a,b,c,d){a.$watch(function(){return d.deviceFilter},function(a){a?d.setSupplementalFilter(function(b){return a({model:b})}):d.clearSupplementalFilter()}),c.unifiSelectDeviceDropdownListRefreshEvent&&a.$on(d.refreshEvent,d.refresh.bind(d))}}),c}])},{"./selectDeviceDropdownList.jade":747}],749:[function(a,b,c){"use strict";function d(a,b,c,d){this.skipInitialization=!0,e.call(this,a,b,c,d)}var e=a("../../../app-unifi-manage/controllers/BaseDropdownListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){if(this.injectFilter){var a=this.$injector.get(this.injectFilter);return void(this.filter=new a)}e.prototype.initFilters.call(this)},d.prototype.initView=function(){this.injectComparator&&(this.comparator=this.$injector.get(this.injectComparator)),e.prototype.initView.call(this)},d.prototype.getCollection=function(){return this.collection},d.$inject=["$injector","$timeout","CollectionView","preferences"],angular.module("app-unifi-manage").controller("SelectSimpleDropdownListController",d)},{"../../../app-unifi-manage/controllers/BaseDropdownListController":999}],750:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<ng-form name="selectSimpleDropdownListForm" ng-class="::{    \'appForm--cozy\': selectSimpleDropdownListCtrl.isCozy,    \'appForm--dark\': selectSimpleDropdownListCtrl.isDark  }" class="appForm"><div ng-click="selectSimpleDropdownListCtrl.openDropdown()" ng-class="{\'is-input-invalid\': selectSimpleDropdownListCtrl.isRequired &amp;&amp; !selectSimpleDropdownListCtrl.selectedModel}" on-outside-element-click="selectSimpleDropdownListCtrl.closeDropdown()" ng-switch="selectSimpleDropdownListCtrl.isDropdownVisible || !selectSimpleDropdownListCtrl.selectedModel" class="appFormDropdown appFormDropdown--withSearch fullWidth"><div ng-switch-when="false" ng-class="{        \'appFormDropdown__selectedItem--noIcon\': selectSimpleDropdownListCtrl.selectedModel &amp;&amp; !selectSimpleDropdownListCtrl.noClear,        \'appIconInput--left\': selectSimpleDropdownListCtrl.leftIcon      }" class="appFormDropdown__selectedItem appIconInput appIconInput--right"><div class="appIconInput__input">{{selectSimpleDropdownListCtrl.renderLabel({ model: selectSimpleDropdownListCtrl.selectedModel })}}</div><div ng-if="selectSimpleDropdownListCtrl.leftIcon" ng-class="selectSimpleDropdownListCtrl.leftIcon" class="appIconInput__icon appIconInput__icon--left icon"></div><div ng-if="selectSimpleDropdownListCtrl.selectedModel &amp;&amp; !selectSimpleDropdownListCtrl.noClear" ng-click="$event.stopPropagation(); selectSimpleDropdownListCtrl.selectModel()" ng-class="selectSimpleDropdownListCtrl.isBusy ? \'appIconAnimated--rotate ubnt-icon--sync\' : \'ubnt-icon--x-circle\'" class="appIconInput__icon appIconInput__icon--right icon clickable"></div></div><unifi-search ng-switch-when="true" unifi-search-on-change="selectSimpleDropdownListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="selectSimpleDropdownListCtrl.isCozy" unifi-search-is-dark="selectSimpleDropdownListCtrl.isDark" unifi-search-is-full-width="true" unifi-search-is-busy="selectSimpleDropdownListCtrl.isBusy || selectSimpleDropdownListCtrl.view.isRefreshing()" unifi-search-query="selectSimpleDropdownListCtrl.filter.searchQuery" unifi-search-placeholder="selectSimpleDropdownListCtrl.searchPlaceholder || \'COMMON_SELECT_SIMPLE_DROPDOWN_SEARCH_PLACEHOLDER\'" unifi-search-left-icon="selectSimpleDropdownListCtrl.leftIcon"></unifi-search><div ng-click="$event.stopPropagation();" ng-class="{        \'appDropdown--dark\': selectSimpleDropdownListCtrl.isDark,        \'appDropdown--upward\': selectSimpleDropdownListCtrl.openUpward,        \'is-dropdown-visible\': selectSimpleDropdownListCtrl.isDropdownVisible &amp;&amp; (selectSimpleDropdownListCtrl.view.getModels().length || !selectSimpleDropdownListCtrl.hideEmptyNotice)      }" class="appDropdown"><table ng-class="{          \'appTable--noWrap\': selectSimpleDropdownListCtrl.noWrap,          \'appTable--cozy\': !selectSimpleDropdownListCtrl.isCozy,          \'appTable--condensed\': selectSimpleDropdownListCtrl.isCozy,          \'appTable--light\': !selectSimpleDropdownListCtrl.isDark,          \'appTable--dark\': selectSimpleDropdownListCtrl.isDark        }" class="noMarginBottom appTable appTable--hoverable appTable--flexible appTable--minor appTable--striped appTable--transparent appTable--footerBorder"><tfoot ng-if="            selectSimpleDropdownListCtrl.view.getModels().length &amp;&amp;             (!selectSimpleDropdownListCtrl.isPaginationOptional || selectSimpleDropdownListCtrl.view.getModels().length &gt; selectSimpleDropdownListCtrl.rowsPerPage)          "><tr><td colspan="5"><unifi-micro-pagination unifi-micro-pagination-current-page="selectSimpleDropdownListCtrl.currentPage" unifi-micro-pagination-rows-per-page="selectSimpleDropdownListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="selectSimpleDropdownListCtrl.view.getModels().length" class="noMarginBottom horizontalRhythmLeft--condensed"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in selectSimpleDropdownListCtrl.view.getModels(),              startFrom (selectSimpleDropdownListCtrl.currentPage - 1) * selectSimpleDropdownListCtrl.rowsPerPage,              limitTo selectSimpleDropdownListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-click="selectSimpleDropdownListCtrl.selectModel(model)" ng-class="{\'is-row-selected\': selectSimpleDropdownListCtrl.selectedModel.id === model.id}" unifi-collection-view-row="{{selectSimpleDropdownListCtrl.rowTemplate}}" unifi-collection-view-row-config="{{selectSimpleDropdownListCtrl.rowConfig}}" class="clickable"></tr></tbody></table><div ng-if="!selectSimpleDropdownListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': selectSimpleDropdownListCtrl.isDark}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p class="noMarginBottom">{{selectSimpleDropdownListCtrl.emptyTableNotice || \'COMMON_SELECT_SIMPLE_DROPDOWN_TABLE_EMPTY\' | translate}}</p></div></div></div></div></div></ng-form>'),b.join("")}},{"jade/runtime":232}],751:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSelectSimpleDropdownList",["PaginatedListDirective","APP_EVENTS",function(b,c){var d=new b("selectSimpleDropdown",a("./selectSimpleDropdownList.jade")(),{_collection:"=unifiSelectSimpleDropdownListCollection",selectedModel:"=unifiSelectSimpleDropdownListSelectedModel",renderLabel:"&unifiSelectSimpleDropdownListRenderLabel",rowTemplate:"=unifiSelectSimpleDropdownListRowTemplate",rowConfig:"=?unifiSelectSimpleDropdownListRowConfig",injectFilter:"=?unifiSelectSimpleDropdownListInjectFilter",supplementalFilter:"&?unifiSelectSimpleDropdownListSupplementalFilter",injectComparator:"=?unifiSelectSimpleDropdownListInjectComparator",defaultSortBy:"=?unifiSelectSimpleDropdownListDefaultSortBy",defaultSortDesc:"=?unifiSelectSimpleDropdownListDefaultSortDesc",searchableAttributes:"=?unifiSelectSimpleDropdownListSearchableAttributes",searchPlaceholder:"=?unifiSelectSimpleDropdownListSearchPlaceholder",emptyTableNotice:"=?unifiSelectSimpleDropdownListEmptyTableNotice",isCozy:"=?unifiSelectSimpleDropdownListIsCozy",isDark:"=?unifiSelectSimpleDropdownListIsDark",isRequired:"=?unifiSelectSimpleDropdownListIsRequired",isBusy:"=?unifiSelectSimpleDropdownListIsBusy",rowsPerPage:"=?unifiSelectSimpleDropdownListRowsPerPage",isPaginationOptional:"=?unifiSelectSimpleDropdownListIsPaginationOptional",hideEmptyNotice:"=?unifiSelectSimpleDropdownListHideEmptyNotice",noClear:"=?unifiSelectSimpleDropdownListNoClear",noWrap:"=?unifiSelectSimpleDropdownListNoWrap",openUpward:"=?unifiSelectSimpleDropdownListOpenUpward",leftIcon:"=?unifiSelectSimpleDropdownListLeftIcon",localStateIsTemporary:"=?unifiSelectSimpleDropdownListLocalStateIsTemporary",onSelect:"&?unifiSelectSimpleDropdownListOnSelect",onChange:"&?unifiSelectSimpleDropdownListOnChange",onSubmit:"&?unifiSelectSimpleDropdownListOnSubmit"});return d.addMixin({init:function(a,b,d,e){a.$watch(function(){return e._collection},function(a){e.destroyView(),(e.collection=a)&&(e.initFilters(),e.initView())}),a.$watch(function(){return e.supplementalFilter},function(a){e.isSupplementalFilterAllowed()&&(a?e.setSupplementalFilter(function(b){return a({model:b})}):e.clearSupplementalFilter())}),a.$on(c.SELECT_DROPDOWN_LIST_OPEN,e.openDropdown.bind(e)),a.$on(c.SELECT_DROPDOWN_LIST_CLOSE,e.closeDropdown.bind(e)),a.$on(c.SELECT_DROPDOWN_LIST_CLEAR,e.clearSearchQuery.bind(e)),a.$on(c.SELECT_DROPDOWN_LIST_SUBMIT,function(){e.onSubmit&&e.onSubmit({searchQuery:e.filter?e.filter.searchQuery:void 0})})}}),d}])},{"./selectSimpleDropdownList.jade":750}],752:[function(a,b,c){"use strict";function d(a,b,c){this.modelChangeEvent="change:site_role change:is_super",this.account=a,this.featureFlag=b,this.system=c,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.init=function(){this.updateModel(this.account.repository.model)},d.prototype.onModelChange=function(){this.updateChildStates()},d.prototype.updateChildStates=function(){this.states=[{id:"site",name:"SETTINGS_NAV_SITE",section:"application"},{id:"wlans",name:"SETTINGS_NAV_WIRELESS_NETWORKS",section:"application"},{id:"hotspot2",name:"SETTINGS_NAV_HOTSPOT2",section:"application",beta:!0,featureFlag:"enableHotspot2"},{id:"networks",name:"SETTINGS_NAV_NETWORKS",section:"application"},{id:"routingAndFirewall",name:"SETTINGS_NAV_ROUTING_AND_FIREWALL",section:"application",beta:!0},{id:"guestcontrol",name:"SETTINGS_NAV_GUEST_CONTROL",section:"application"},{id:"profiles",name:"SETTINGS_NAV_PROFILES",section:"application",featureFlag:"withRadiusProfilesEndpoint"},{id:"radius",name:"SETTINGS_NAV_RADIUS",section:"application",beta:!0,featureFlag:"enableRadiusServer",isAdminOnly:!0},{id:"admins",name:"SETTINGS_NAV_ADMINS",section:"application",isAdminOnly:!0},{id:"usergroups",name:"SETTINGS_NAV_USER_GROUPS",section:"application"},{id:"dpi",name:"SETTINGS_NAV_DPI",section:"application"},{id:"controller",name:"SETTINGS_NAV_CONTROLLER",section:"controller"},{id:"cloudaccess",name:"SETTINGS_NAV_CLOUD_ACCESS",section:"controller"},{id:"maintenance",name:"SETTINGS_NAV_MAINTENANCE",section:"controller",isSuperAdminOnly:!0},{id:"backup",name:"SETTINGS_NAV_AUTOBACKUP",section:"controller",isSuperAdminOnly:!0,disableForUnifiGo:!0}].filter(function(a){return!angular.isDefined(a.featureFlag)||this.featureFlag.isEnabled(a.featureFlag)}.bind(this)),this.account.isAdmin()||(this.states=this.states.filter(function(a){return!a.isAdminOnly&&!a.isSuperAdminOnly})),this.account.isSuperAdmin()||(this.states=this.states.filter(function(a){return!a.isSuperAdminOnly})),this.system.isUnifiGo()&&(this.states=this.states.filter(function(a){return!a.disableForUnifiGo}))},d.$inject=["account","featureFlag","system"],angular.module("app-unifi-manage").controller("SettingsNavController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],753:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<ul ng-class="isDark ? \'appMenu--dark\' : \'appMenu--light\'" pageutils-nav pageutils-nav-active-class="is-menu-item-selected" gradient gradient-start-color="withGradient ? (isDark ? \'#035f86\' : \'#c8d9e2\') : null" gradient-stop-color="withGradient ? (isDark ? \'#102129\' : \'#fcfeff\') : null" gradient-selector=".appMenu__item" gradient-attribute="background-color" gradient-event="settings:navRendered" class="appMenu appMenu--transparent appMenu--gradient"><li ng-repeat="state in settingsNavCtrl.states" ng-class="{      \'appMenu__item--divider\': $index &gt; 0 &amp;&amp; state.section !== settingsNavCtrl.states[$index - 1].section,      \'appMenu__item--withBadge\': state.beta &amp;&amp; withBadges    }" pageutils-nav-state="manage.site.settings.{{state.id}}" on-last-repeat="settings:navRendered" class="appMenu__item clickable"><span>{{state.name | translate}}</span><span ng-if="state.beta &amp;&amp; withBadges" translate="COMMON_BETA" class="appBadge appBadge--warning pull-right"></span></li></ul>'),b.join("")}},{"jade/runtime":232}],754:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSettingsNav",[function(){return{scope:{isDark:"=unifiSettingsNavIsDark",withGradient:"=unifiSettingsNavWithGradient",withBadges:"=unifiSettingsNavWithBadges"},controller:"SettingsNavController",controllerAs:"settingsNavCtrl",template:a("./settingsNav.jade")(),link:function(a,b,c,d){d.init(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./settingsNav.jade":753}],755:[function(a,b,c){"use strict";function d(a,b){this.URLS=a,this.preferences=b}d.$inject=["URLS","preferences"],angular.module("app-unifi-manage").controller("SettingsSecurityGatewayIsRequiredController",d)},{}],756:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'appInfoBox--dark\': settingsSecurityGatewayIsRequiredCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--wide autoMargin verticalRhythmTop--breezy withLayerShadow"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="SETTINGS_COMMON_GATEWAY_REQUIRED_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="SETTINGS_COMMON_GATEWAY_REQUIRED_MESSAGE" translate-values="{unifiGatewayLink: settingsSecurityGatewayIsRequiredCtrl.URLS.UNIFI_SECURITY_GATEWAY, feature:settingsSecurityGatewayIsRequiredCtrl.feature}" class="noMarginBottom"></p></div></div></div>'),b.join("")}},{"jade/runtime":232}],757:[function(a,b,c){"use strict";
angular.module("app-unifi-manage").directive("unifiSettingsSecurityGatewayIsRequired",[function(){return{controller:"SettingsSecurityGatewayIsRequiredController",controllerAs:"settingsSecurityGatewayIsRequiredCtrl",scope:{feature:"@unifiSettingsSecurityGatewayIsRequiredFeature"},bindToController:!0,template:a("./settingsSecurityGatewayIsRequired.jade")()}}])},{"./settingsSecurityGatewayIsRequired.jade":756}],758:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<a pageutils-nav-state="manage.site.settings" on-outside-element-click="isVisible = false" unifi-mobile-safe-hover class="appGlobalSideNav__item"><div ng-click="isVisible = !isVisible; $event.stopPropagation();" class="appGlobalSideNav__itemTrigger visible--smDown"></div><div class="appGlobalSideNav__itemIcon icon ubnt-icon--gears"></div><div ng-if="!isVisible" translate="COMMON_NAV_SETTINGS" class="appGlobalSideNavTooltip"></div><div ng-class="{\'is-side-nav-popover-visible\': isVisible}" ng-click="$event.stopPropagation()" class="appGlobalSideNavPopover appGlobalSideNavPopover--subnav appGlobalSideNavPopover--withLayerShadow visible--smDown"><div class="appGlobalSideNavPopover__inner"><unifi-settings-nav unifi-settings-nav-is-dark="true" unifi-settings-nav-with-gradient="false" unifi-settings-nav-with-badges="false"></unifi-settings-nav></div></div></a>'),b.join("")}},{"jade/runtime":232}],759:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSettingsSideNav",[function(){return{scope:!0,template:a("./settingsSideNav.jade")(),link:function(a){a.$on("$stateChangeSuccess",function(){a.isVisible=!1})}}}])},{"./settingsSideNav.jade":758}],760:[function(a,b,c){"use strict";function d(){this.tabs=[{translationKey:"SETTINGS_RADIUS_TAB_USERS",state:"manage.site.settings.radius.users"},{translationKey:"SETTINGS_RADIUS_TAB_SERVER",state:"manage.site.settings.radius.server"}]}d.$inject=[],angular.module("app-unifi-manage").controller("SettingsSubMenuRadiusController",d)},{}],761:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="row"><unifi-settings-tabs-header tabs="settingsSubMenuRadiusCtrl.tabs" class="col--xs12"></unifi-settings-tabs-header></div>'),b.join("")}},{"jade/runtime":232}],762:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSettingsSubMenuRadius",[function(){return{controller:"SettingsSubMenuRadiusController",controllerAs:"settingsSubMenuRadiusCtrl",template:a("./settingsSubMenuRadius.jade")()}}])},{"./settingsSubMenuRadius.jade":761}],763:[function(a,b,c){"use strict";function d(){this.tabs=[{translationKey:"SETTINGS_ROUTING_TAB_STATIC_ROUTES",state:"manage.site.settings.routingAndFirewall.routing"},{translationKey:"SETTINGS_ROUTING_TAB_FIREWALL",state:"manage.site.settings.routingAndFirewall.firewall"}]}d.$inject=[],angular.module("app-unifi-manage").controller("SettingsSubMenuRoutingAndFirewallController",d)},{}],764:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="row"><unifi-settings-tabs-header tabs="settingsSubMenuRoutingAndFirewallCtrl.tabs" class="col--xs12"></unifi-settings-tabs-header></div>'),b.join("")}},{"jade/runtime":232}],765:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSettingsSubMenuRoutingAndFirewall",[function(){return{controller:"SettingsSubMenuRoutingAndFirewallController",controllerAs:"settingsSubMenuRoutingAndFirewallCtrl",template:a("./settingsSubMenuRoutingAndFirewall.jade")()}}])},{"./settingsSubMenuRoutingAndFirewall.jade":764}],766:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSettingsHeader noBorder"><div ng-class="{\'appTabs--dark\': preferences.model.get(\'isSettingsDark\')}" pageutils-nav pageutils-nav-active-class="is-tab-selected" class="appTabs appTabs--cozy"><li ng-repeat="tab in tabs" pageutils-nav-state="{{tab.state}}" class="tabs__item">{{ tab.translationKey | translate }}</li></div></div>'),b.join("")}},{"jade/runtime":232}],767:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSettingsTabsHeader",["preferences",function(b){return{replace:!0,restrict:"E",scope:{tabs:"=tabs"},template:a("./settingsTabsHeader.jade")(),link:function(a){a.preferences=b}}}])},{"./settingsTabsHeader.jade":766}],768:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSpeedTestDashboard"><unifi-health-stats unifi-health-stats-subsystem-attributes="attributes"></unifi-health-stats><div class="alignCenter verticalRhythmTop--cozy"><button ng-if="withButton" frame-show="speedTest" class="appMainButton appMainButton--primary appMainButton--cozy">{{ \'SPEED_TEST_TOOLTIP_ACTION_RUN_SPEED_TEST\' | translate }}</button></div></div>'),b.join("")}},{"jade/runtime":232}],769:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSpeedTestDashboard",[function(){return{template:a("./speedTestDashboard.jade")(),scope:{subsystemWwwAttributes:"=unifiSpeedTestDashboardSubsystemWwwAttributes",withButton:"=unifiSpeedTestDashboardWithButton"},replace:!0,link:function(a){a.attributes={},a.$watch("subsystemWwwAttributes",function(b){a.attributes=angular.copy(b),a.attributes.subsystem="speedtest"})}}}])},{"./speedTestDashboard.jade":768}],770:[function(a,b,c){"use strict";function d(a,b,c){this.binaryPrefix=a,this.SCALE_MAX=b.DONUT_CHART.SCALE_MAX,this.SCALE_SPACE=b.DONUT_CHART.SCALE_SPACE,this.STATUS=c,this.donutChartConfig={dataProperty:"value",donutThickness:6,type:"solid",transitionDuration:10,startAngle:-180+this.SCALE_SPACE/2,endAngle:180-this.SCALE_SPACE/2,radius:49,tickWidth:1,externalRingThickness:0,numOfTicks:100,quantifyData:!1,label:{main:"",secondary:""}},this.resetDonutChartValues()}d.prototype.resetDonutChartValues=function(){this.download=0,this.upload=0,this.donutChartData=[{value:0},{value:1},{value:this.SCALE_SPACE/360},{value:1},{value:0}]},d.prototype.updateDonutChart=function(a){this.download=a.valueDownload||0,this.upload=a.valueUpload||0,this.downloadStatus=a.statusDownload,this.uploadStatus=a.statusUpload;var b=this.rescale(this.download),c=this.rescale(this.upload),d=this.rescale(this.SCALE_MAX),e=this.SCALE_SPACE/360*2*d;this.donutChartData=[{value:c},{value:d-c},{value:e},{value:d-b},{value:b}]},d.prototype.rescale=function(a){return a=Math.min(a,this.SCALE_MAX),Math.log1p(a/10)},d.prototype.getFormattedDownload=function(){return Number(this.download).toFixed(1)},d.prototype.getFormattedUpload=function(){return Number(this.upload).toFixed(1)},d.prototype.isDownloadInProgress=function(){return this.downloadStatus===this.STATUS.IN_PROGRESS},d.prototype.isUploadInProgress=function(){return this.uploadStatus===this.STATUS.IN_PROGRESS},d.$inject=["binaryPrefix","SPEED_TEST_SETTINGS","SPEED_TEST_STATUSES"],angular.module("app-unifi-manage").controller("SpeedTestDonutChartController",d)},{}],771:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSpeedTestDonutChart"><unifi-donut-chart unifi-donut-chart-config="speedTestDonutChartControllerCtrl.donutChartConfig" unifi-donut-chart-data="speedTestDonutChartControllerCtrl.donutChartData"></unifi-donut-chart><div class="unifiSpeedTestDonutChartLegendBox"><div class="unifiSpeedTestDonutChartLegend"><div class="unifiSpeedTestDonutChartLegend__top unifiSpeedTestDonutChartLegend__row unifiSpeedTestDonutChartLegend__row--label">{{"SPEED_TEST_TOOLTIP_SPEED_LABEL" | translate}}</div><div class="unifiSpeedTestDonutChartLegend__top unifiSpeedTestDonutChartLegend__row unifiSpeedTestDonutChartLegend__row--upload"><div ng-class="{\'unifiSpeedTestDonutChartArrow__inProgress\': speedTestDonutChartControllerCtrl.isUploadInProgress()}" class="unifiSpeedTestDonutChartArrow-up"></div>{{speedTestDonutChartControllerCtrl.getFormattedUpload()}}</div><div class="unifiSpeedTestDonutChartLegend__bottom unifiSpeedTestDonutChartLegend__row unifiSpeedTestDonutChartLegend__row--download"><div ng-class="{\'unifiSpeedTestDonutChartArrow__inProgress\': speedTestDonutChartControllerCtrl.isDownloadInProgress()}" class="unifiSpeedTestDonutChartArrow-down"></div>{{speedTestDonutChartControllerCtrl.getFormattedDownload()}}</div><div class="unifiSpeedTestDonutChartLegend__bottom unifiSpeedTestDonutChartLegend__row unifiSpeedTestDonutChartLegend__row--unit">{{"SPEED_TEST_TOOLTIP_SPEED_UNIT" | translate}}</div></div></div></div>'),b.join("")}},{"jade/runtime":232}],772:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSpeedTestDonutChart",[function(){return{controller:"SpeedTestDonutChartController",controllerAs:"speedTestDonutChartControllerCtrl",template:a("./speedTestDonutChart.jade")(),scope:{series:"=unifiSpeedTestDonutChartSeries"},replace:!0,link:function(a,b,c,d){a.$watchGroup(["series.valueDownload","series.valueUpload"],function(){d.updateDonutChart(a.series)})}}}])},{"./speedTestDonutChart.jade":771}],773:[function(a,b,c){"use strict";function d(a,b,c){this.objectUtils=b,this.CHART_SETTINGS=c.LINE_CHART,this.TICKS_ON_SCALE=c.LINE_CHART.TICKS_ON_SCALE,this.TICKS_FACTOR=c.LINE_CHART.TICKS_FACTOR,this.columnChartConfig={valueProperties:["valueDownload","valueUpload"],range:1},this.resetLineChartValues()}d.prototype.resetLineChartValues=function(){this.lineChartData=Array(this.TICKS_ON_SCALE)},d.prototype.updateChartRange=function(a){this.columnChartConfig.range=Math.max(this.columnChartConfig.range,a.valueDownload||0,a.valueUpload||0)},d.prototype.reduceArray=function(a,b){for(var c=0;a.length;){var d=a.splice(0,this.TICKS_FACTOR),e=this.objectUtils.appendAll(d);e.index=c++,e.value/=d.length,e.valueDownload/=d.length,e.valueUpload/=d.length;var f=b[e.index]||e;f.valueDownload=e.valueDownload||f.valueDownload||void 0,f.valueUpload=e.valueUpload||f.valueUpload||void 0,b[f.index]=f,this.updateChartRange(f)}},d.prototype.updateLineChart=function(a){a.seriesDownload.length||a.seriesUpload.length?(a.seriesDownload.length&&a.seriesDownload.length%this.TICKS_FACTOR===0&&this.reduceArray(angular.copy(a.seriesDownload),this.lineChartData),a.seriesUpload.length&&a.seriesUpload.length%this.TICKS_FACTOR===0&&this.reduceArray(angular.copy(a.seriesUpload),this.lineChartData),this.lineChartData.length=this.TICKS_ON_SCALE):this.resetLineChartValues()},d.$inject=["domHelper","objectUtils","SPEED_TEST_SETTINGS"],angular.module("app-unifi-manage").controller("SpeedTestLineChartController",d)},{}],774:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSpeedTestLineChart"><unifi-column-chart style="height: 60px; width: 394px;" unifi-column-chart-config="speedTestLineChartControllerCtrl.columnChartConfig" unifi-column-chart-data="speedTestLineChartControllerCtrl.lineChartData"></unifi-column-chart><div class="unifiSpeedTestLineChartOverlay"></div></div>'),b.join("")}},{"jade/runtime":232}],775:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSpeedTestLineChart",[function(){return{controller:"SpeedTestLineChartController",controllerAs:"speedTestLineChartControllerCtrl",template:a("./speedTestLineChart.jade")(),scope:{series:"=unifiSpeedTestLineChartSeries"},replace:!0,link:function(a,b,c,d){a.$watchGroup(["series.seriesDownload.length","series.seriesUpload.length"],function(){d.updateLineChart(a.series)})}}}])},{"./speedTestLineChart.jade":774}],776:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSpeedTestResult"><div class="unifiSpeedTestResult__label">{{ label | translate }}</div><div class="unifiSpeedTestResult__data"><div ng-class="{\'unifiSpeedTestResult__value--inProgress\': !isCompleted()}" class="unifiSpeedTestResult__value">{{value}}</div><div class="unifiSpeedTestResult__unit">{{unit | translate}}</div></div></div>'),b.join("")}},{"jade/runtime":232}],777:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSpeedTestResult",["SPEED_TEST_STATUSES",function(b){return{template:a("./speedTestResult.jade")(),scope:{value:"=unifiSpeedTestResultValue",status:"=unifiSpeedTestResultStatus",unit:"=unifiSpeedTestResultUnit",label:"=unifiSpeedTestResultLabel"},replace:!0,link:function(a){a.inProgress=function(){return a.status===b.IN_PROGRESS},a.isCompleted=function(){return a.status===b.IS_COMPLETED}}}}])},{"./speedTestResult.jade":776}],778:[function(a,b,c){"use strict";function d(a,b){this.$state=a,this.$translate=b,this.isDropdownVisible=!1,this.currentState=this.states.find(function(a){return a.state===this.$state.current.name},this)}d.prototype.openDropdown=function(){this.isDropdownVisible=!0},d.prototype.closeDropdown=function(){this.isDropdownVisible=!1},d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.changeState=function(a){this.$state.go(a)},d.$inject=["$state","$translate"],angular.module("app-unifi-manage").controller("StateSwitcherController",d)},{}],779:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'appMainButton--withBadge\': stateSwitcherCtrl.currentState.beta}" ng-click="stateSwitcherCtrl.toggleDropdown()" on-outside-element-click="stateSwitcherCtrl.closeDropdown()" class="appMainButton appMainButton--filter appMainButton--cozy appMainButton--withDropdown"><span class="horizontalRhythm--condensed">{{stateSwitcherCtrl.currentState.translationKey | translate}}</span><span ng-if="stateSwitcherCtrl.currentState.beta" translate="COMMON_BETA" class="appBadge appBadge--warning"></span><span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{\'is-dropdown-visible\': stateSwitcherCtrl.isDropdownVisible}" class="appDropdown appDropdown--left appDropdown--inButton"><li ng-repeat="state in stateSwitcherCtrl.states" ng-click="stateSwitcherCtrl.changeState(state.state)" class="appDropdown__item"><span class="horizontalRhythm--condensed">{{state.translationKey | translate}}</span><span ng-if="state.beta" translate="COMMON_BETA" class="appBadge appBadge--warning"></span></li></ul></div>'),b.join("")}},{"jade/runtime":232}],780:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStateSwitcher",[function(){return{scope:{states:"=unifiStateSwitcherStates"},controller:"StateSwitcherController",controllerAs:"stateSwitcherCtrl",bindToController:!0,replace:!0,template:a("./stateSwitcher.jade")()}}])},{"./stateSwitcher.jade":779}],781:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.clients=a,this._=c,this.$filter=d,this.$translate=e,this.chartData=[],this.dataConverter=(new b).deduplicatedBy("essid").sortedBy("count",!0).countTotal().withLimit(f.MAX_DONUT_ITEMS).compactUnknown(function(a){return!a.essid}).withOtherDefaults({name:this.$translate.instant("STATISTICS_CLIENTS_PER_ESSID_OTHER")}),this.chartConfig={dataProperty:"count",type:"solid",donutThickness:10,label:{main:"",secondary:""}},this.legendConfig={labelProperty:"essid"},this.countClientsPerEssid(),this.countClientsPerEssidDebounced=c.debounce(function(){this.countClientsPerEssid()}.bind(this),100)}d.prototype.addEventHandlers=function(){this.clients.repository.collection.on("change",this.countClientsPerEssidDebounced,this)},d.prototype.removeEventHandlers=function(){this.clients.repository.collection.off("change",this.countClientsPerEssidDebounced,this)},d.prototype.countClientsPerEssid=function(){var a=this.clients.repository.collection.filter(function(a){return a.get("essid")}).map(function(a){return{count:1,essid:a.get("essid")}});this.data=this.dataConverter.apply(a).data,this.chartConfig.label.main=a.length,this.chartConfig.label.secondary=this.$filter("uppercase")(this.$translate.instant("STATISTICS_CLIENTS_PER_ESSID_DONUT_LABEL",{count:this.data.total},"messageformat"))},d.$inject=["clients","DataConverter","_","$filter","$translate","STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("StatsClientsPerEssidController",d)},{}],782:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiStatisticsClients unifiStatisticsClientsPerEssid"><div class="appSubHeading appSubHeading--standalone">{{\'STATISTICS_CLIENTS_PER_ESSID_HEADING\' | translate}}</div><div class="unifiStatisticsClientsGraph"><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="statsClientsPerEssidCtrl.chartConfig" unifi-donut-chart-with-tooltip-data="statsClientsPerEssidCtrl.data"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.label}}</div><div translate="STATISTICS_CURRENT_USAGE_COUNT" translate-values="{count: focusedData.count}" translate-interpolation="messageformat" class="noPaddingBottom"></div></div></unifi-donut-chart-with-tooltip><unifi-chart-legend unifi-chart-legend-config="statsClientsPerEssidCtrl.legendConfig" unifi-chart-legend-data="statsClientsPerEssidCtrl.data" class="unifiStatisticsClientsLegend"></unifi-chart-legend></div></div>'),b.join("")}},{"jade/runtime":232}],783:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStatsClientsPerEssid",[function(){return{controller:"StatsClientsPerEssidController",controllerAs:"statsClientsPerEssidCtrl",template:a("./statsClientsPerEssid.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./statsClientsPerEssid.jade":782}],784:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){this.devices=a,this.statsUtils=b,this.DEVICE_TYPES=c,this.STATS_DEFAULTS=d,this._=e,this.$filter=f,this.$translate=g,this.chartData=[],this.clientsChartConfig={dataProperty:"clients",donutThickness:10,type:"solid",quantifyData:!1,label:{main:"",secondary:""}},this.trafficChartConfig={dataProperty:"traffic",type:"solid",donutThickness:10,quantifyData:!1,label:{main:"",secondary:this.$filter("uppercase")(this.$translate.instant("STATISTICS_CURRENT_USAGE_TRAFFIC"))}},this.legendConfig={labelProperty:"label"},this.collectData(),this.collectDataDebounced=e.debounce(function(){this.collectData()}.bind(this),1e3)}d.prototype.addEventHandlers=function(){this.devices.repository.collection.on("change",this.collectDataDebounced,this)},d.prototype.removeEventHandlers=function(){this.devices.repository.collection.off("change",this.collectDataDebounced,this)},d.prototype.collectData=function(){this.numberOfClients=0,this.totalTraffic=0;var a=[],b=this.statsUtils.getTopItems(this.devices.repository.collection,this.STATS_DEFAULTS.MAX_DONUT_ITEMS,"bytes",void 0,function(a){return a.get("type")===this.DEVICE_TYPES.AP&&a.get("bytes")>0}.bind(this));b.forEach(function(b){this.numberOfClients+=b.get("num_sta"),this.totalTraffic+=b.get("bytes"),a.push({clients:b.get("num_sta"),traffic:b.get("bytes"),label:b.getDisplayName()})}.bind(this)),this.chartData=a,this.clientsChartConfig.label.main=this.numberOfClients,this.clientsChartConfig.label.secondary=this.$filter("uppercase")(this.$translate.instant("STATISTICS_CURRENT_USAGE_DONUT_LABEL",{count:this.numberOfClients},"messageformat")),this.trafficChartConfig.label.main=this.$filter("bytes")(this.totalTraffic)},d.$inject=["devices","statsUtils","DEVICE_TYPES","STATS_DEFAULTS","_","$filter","$translate"],angular.module("app-unifi-manage").controller("StatsCurrentUsageController",d)},{}],785:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiStatisticsClients unifiStatisticsCurrentUsage"><div class="appSubHeading appSubHeading--standalone">{{\'STATISTICS_CURRENT_USAGE_HEADING\' | translate}}</div><div ng-if="statsCurrentUsageCtrl.chartData.length" class="unifiStatisticsClientsGraph"><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="statsCurrentUsageCtrl.clientsChartConfig" unifi-donut-chart-with-tooltip-data="statsCurrentUsageCtrl.chartData"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.label}}</div><div translate="STATISTICS_CURRENT_USAGE_COUNT" translate-values="{count: focusedData.clients}" translate-interpolation="messageformat" class="noPaddingBottom"></div></div></unifi-donut-chart-with-tooltip><unifi-donut-chart-with-tooltip unifi-donut-chart-with-tooltip-config="statsCurrentUsageCtrl.trafficChartConfig" unifi-donut-chart-with-tooltip-data="statsCurrentUsageCtrl.chartData"><div ng-class="cssTooltipPosition" class="appTooltip appTooltip--hint"><div class="appSubHeading appSubHeading--small">{{focusedData.label}}</div><div class="noPaddingBottom">{{focusedData.traffic | bytes}}</div></div></unifi-donut-chart-with-tooltip><unifi-chart-legend unifi-chart-legend-config="statsCurrentUsageCtrl.legendConfig" unifi-chart-legend-data="statsCurrentUsageCtrl.chartData" class="unifiStatisticsClientsLegend"></unifi-chart-legend></div><div ng-if="!statsCurrentUsageCtrl.chartData.length" class="unifiStatisticsClients__noData"><div class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--centered appInfoBox--solid"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p class="noMarginBottom">{{\'STATISTICS_NO_DATA_AVAILABLE\' | translate}}</p></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],786:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStatsCurrentUsage",[function(){return{controller:"StatsCurrentUsageController",controllerAs:"statsCurrentUsageCtrl",template:a("./statsCurrentUsage.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./statsCurrentUsage.jade":785}],787:[function(a,b,c){"use strict";function d(a,b,c,d){this.clients=a,this.devices=b,this.deviceStateUtils=c,this.DEVICE_TYPES=d,this.getMostActiveAP(),this.getMostActiveClient(),this.getAllTimeTopClient()}d.prototype.addEventHandlers=function(){this.devices.repository.collection.on("change",this.getMostActiveAP,this),this.clients.repository.collection.on("change",this.getMostActiveClient,this),this.clients.repository.collection.on("change",this.getAllTimeTopClient,this)},d.prototype.removeEventHandlers=function(){this.devices.repository.collection.off("change",this.getMostActiveAP,this),this.clients.repository.collection.off("change",this.getMostActiveClient,this),this.clients.repository.collection.off("change",this.getAllTimeTopClient,this)},d.prototype.isBytesDataAvailable=function(a){return void 0!==a.get("tx_bytes")&&void 0!==a.get("rx_bytes")},d.prototype.getMostActiveAP=function(){this.mostActiveAP=this.devices.repository.collection.filter(function(a){return a.get("type")===this.DEVICE_TYPES.AP&&this.deviceStateUtils.isDeviceConnected(a)},this).reduce(function(a,b){return(a&&a.get("bytes")||0)>(b.get("bytes")||0)?a:b},void 0)},d.prototype.getMostActiveClient=function(){this.mostActiveClient=this.clients.repository.collection.max(function(a){return a.get("tx_bytes")+a.get("rx_bytes")}),this.mostActiveClient===Number.NEGATIVE_INFINITY&&(this.mostActiveClient=void 0)},d.prototype.getAllTimeTopClient=function(){this.topClient=this.clients.repository.collection.max(function(a){return a.get("uptime")}),this.topClient===Number.NEGATIVE_INFINITY&&(this.topClient=void 0)},d.$inject=["clients","devices","deviceStateUtils","DEVICE_TYPES"],angular.module("app-unifi-manage").controller("StatsQuickLookController",d)},{}],788:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiStatisticsQuickLook"><div class="appSubHeading appSubHeading--standalone">{{\'STATISTICS_QUICK_LOOK_HEADING\' | translate}}</div><div class="unifiStatisticsQuickLook__subHeading unifiStatisticsQuickLook__subHeading--standalone">{{\'STATISTICS_QUICK_LOOK_MOST_ACTIVE_AP\' | translate}}</div><div class="container container--centered"><div ng-if="statsQuickLookCtrl.mostActiveAP" class="row row--comfy verticalRhythmTop--cozy"><div class="col--xs6 col--smash"><a unifi-open-panel="statsQuickLookCtrl.mostActiveAP" unifi-open-panel-active-tab="\'details\'">{{statsQuickLookCtrl.mostActiveAP.getDisplayName()}}</a></div><div ng-if="!statsQuickLookCtrl.isBytesDataAvailable(statsQuickLookCtrl.mostActiveAP)" class="col--xs6 noWrap"><div class="alignCenter">{{\'STATISTICS_NO_DATA_AVAILABLE\' | translate}}</div></div><div ng-if="statsQuickLookCtrl.isBytesDataAvailable(statsQuickLookCtrl.mostActiveAP)" class="col--xs6 noWrap col--smash"><div class="col--xs6 noWrap iconText appIconText"><span class="iconText__icon icon ubnt-icon--arrow-down-4 down"></span><span class="iconText__text">{{statsQuickLookCtrl.mostActiveAP.get(\'tx_bytes\') | bytes}}</span></div><div class="col--xs6 noWrap iconText appIconText"><span class="iconText__icon icon ubnt-icon--arrow-up-4 up"></span><span class="iconText__text">{{statsQuickLookCtrl.mostActiveAP.get(\'rx_bytes\') | bytes}}</span></div></div></div><div ng-if="!statsQuickLookCtrl.mostActiveAP" class="row row--comfy verticalRhythmTop--cozy"><div class="col--xs12 col--smash"><div class="alignCenter">{{\'STATISTICS_NO_DATA_AVAILABLE\' | translate}}</div></div></div></div><div class="unifiStatisticsQuickLook__subHeading unifiStatisticsQuickLook__subHeading--standalone">{{\'STATISTICS_QUICK_LOOK_MOST_ACTIVE_CLIENT\' | translate}}</div><div class="container container--centered"><div ng-if="statsQuickLookCtrl.mostActiveClient" class="row row--comfy verticalRhythmTop--cozy"><div class="col--xs6 col--smash"><a unifi-open-panel="statsQuickLookCtrl.mostActiveClient" unifi-open-panel-active-tab="\'details\'">{{statsQuickLookCtrl.mostActiveClient.getDisplayName()}}</a></div><div ng-if="!statsQuickLookCtrl.isBytesDataAvailable(statsQuickLookCtrl.mostActiveClient)" class="col--xs6 noWrap"><div class="alignCenter">{{\'STATISTICS_NO_DATA_AVAILABLE\' | translate}}</div></div><div ng-if="statsQuickLookCtrl.isBytesDataAvailable(statsQuickLookCtrl.mostActiveClient)" class="col--xs6 noWrap col--smash"><div class="col--xs6 noWrap iconText appIconText"><span class="iconText__icon icon ubnt-icon--arrow-down-4 down"></span><span class="iconText__text">{{statsQuickLookCtrl.mostActiveClient.get(\'tx_bytes\') | bytes}}</span></div><div class="col--xs6 noWrap iconText appIconText"><span class="iconText__icon icon ubnt-icon--arrow-up-4 up"></span><span class="iconText__text">{{statsQuickLookCtrl.mostActiveClient.get(\'rx_bytes\') | bytes}}</span></div></div></div><div ng-if="!statsQuickLookCtrl.mostActiveClient" class="row row--comfy verticalRhythmTop--cozy"><div class="col--xs12 col--smash"><div class="alignCenter">{{\'STATISTICS_NO_DATA_AVAILABLE\' | translate}}</div></div></div></div><div class="unifiStatisticsQuickLook__subHeading unifiStatisticsQuickLook__subHeading--standalone">{{\'STATISTICS_QUICK_LOOK_TOP_CLIENT\' | translate}}</div><div class="container container--centered"><div ng-if="statsQuickLookCtrl.topClient" class="row row--comfy verticalRhythmTop--cozy"><div class="col--xs6 col--smash"><a unifi-open-panel="statsQuickLookCtrl.topClient" unifi-open-panel-active-tab="\'details\'">{{statsQuickLookCtrl.topClient.getDisplayName()}}</a><br><div class="verticalRhythmTop--cozy">{{statsQuickLookCtrl.topClient.get(\'uptime\') | duration: \'seconds\': \'d[d] h[h] m[m]\'}}</div></div><div ng-if="!statsQuickLookCtrl.isBytesDataAvailable(statsQuickLookCtrl.topClient)" class="col--xs6 noWrap"><div class="alignCenter">{{\'STATISTICS_NO_DATA_AVAILABLE\' | translate}}</div></div><div ng-if="statsQuickLookCtrl.isBytesDataAvailable(statsQuickLookCtrl.topClient)" class="col--xs6 noWrap col--smash"><div class="col--xs6 noWrap iconText appIconText"><span class="iconText__icon icon ubnt-icon--arrow-down-4 down"></span><span class="iconText__text">{{statsQuickLookCtrl.topClient.get(\'tx_bytes\') | bytes}}</span></div><div class="col--xs6 noWrap iconText appIconText"><span class="iconText__icon icon ubnt-icon--arrow-up-4 up"></span><span class="iconText__text">{{statsQuickLookCtrl.topClient.get(\'rx_bytes\') | bytes}}</span></div></div></div><div ng-if="!statsQuickLookCtrl.topClient" class="row row--comfy verticalRhythmTop--cozy"><div class="col--xs12 col--smash"><div class="alignCenter">{{\'STATISTICS_NO_DATA_AVAILABLE\' | translate}}</div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],789:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStatsQuickLook",[function(){return{controller:"StatsQuickLookController",controllerAs:"statsQuickLookCtrl",template:a("./statsQuickLook.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./statsQuickLook.jade":788}],790:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){this.$filter=a,this.$q=b,this.$scope=c,this.$state=d,this.$translate=e,this.BaseCollection=g,this.binaryPrefix=h,this.activityReports=f,this.dateIntervalUtils=i,this.devices=k,this.statsUtils=m,this.preferences=l,this.STATS_DEFAULTS=n,this.TIME_INTERVALS=o,this.isNumber=angular.isNumber,this.prepareChartsDebounced=j(function(){c.$apply(function(){this.prepareCharts()}.bind(this))}.bind(this),400),this.selectedDevices=[],this.availableDevices=new g,this.initCommonConfig(),this.prepareCharts(),this.refreshAvailableDevices()}var e=a("moment");d.prototype.addEventHandlers=function(){this.activityReports.repositories.site.collection.on("sync",this.prepareChartsDebounced),this.activityReports.repositories.ap.collection.on("sync",this.prepareChartsDebounced),this.devices.repository.collection.on("add remove sync",this.refreshAvailableDevices)},d.prototype.removeEventHandlers=function(){this.activityReports.repositories.site.collection.off("sync",this.prepareChartsDebounced),this.activityReports.repositories.ap.collection.off("sync",this.prepareChartsDebounced),this.devices.repository.collection.off("add remove sync",this.refreshAvailableDevices)},d.prototype.refresh=function(){return this.$q.all([this.activityReports.repositories.site.refresh(),this.activityReports.repositories.ap.refresh()]).then(function(){this.refreshAvailableDevices()}.bind(this))},d.prototype.setInterval=function(a){this.activityReports.getInterval().url!==a.url&&e().utcOffset()>0&&(this.activityReports.start=e(parseInt(this.activityReports.start)).add(a===this.TIME_INTERVALS.DAILY?-1:1,"day").format("x")),this.activityReports.setInterval(a)},d.prototype.refreshAvailableDevices=function(){this.availableDevices&&this.availableDevices.reset(Array.from(new Set(this.activityReports.repositories.ap.collection.pluck("ap"))).filter(function(a){return this.selectedDevices.indexOf(a)===-1}.bind(this)).map(function(a){return this.devices.repository.collection.get(a)||new this.devices.repository.collection.model({mac:a})}.bind(this)))},d.prototype.addDevice=function(a){a&&!this.isDeviceSelected(a)&&(this.selectedDevices.push(a.get("mac")),this.prepareCharts(),this.refreshAvailableDevices())},d.prototype.removeDevice=function(a){if(a){var b=this.selectedDevices.indexOf(a.get("mac"));b!==-1&&(this.selectedDevices.splice(b,1),this.prepareCharts(),this.refreshAvailableDevices())}},d.prototype.removeDeviceByIndex=function(a){this.selectedDevices.splice(a,1),this.prepareCharts(),this.refreshAvailableDevices()},d.prototype.isDeviceSelected=function(a){return this.selectedDevices.indexOf(a.get("mac"))!==-1},d.prototype.getDeviceName=function(a){return a.getDisplayName()},d.prototype.initCommonConfig=function(){var a=this.$translate;this.chartConfig=[],this.commonChartConfig={margin:{left:45,top:20,bottom:25,right:30},xProperty:"x",left:{continuous:!0,type:"area",yProperty:"traffic",bytesUnit:"",yAxisFormat:function(){var a;return function(b){var c=Math.floor(b).toFixed(0),d=c!==a?c:"";return a=c,d}}(),yAxisLabel:function(){return[a.instant("STATISTICS_RECENT_ACTIVITIES_TRAFFIC")," ","[",this.bytesUnit,"B]"].join("")}},right:{
continuous:!0,type:"plot",yProperty:"clients",yAxisFormat:function(a){return a%1===0?a:""}},xAxisFormat:function(a){var b=this.activityReports.getInterval();switch(b){case this.TIME_INTERVALS.DAILY:return e(a,"x").format(this.preferences.model.get("use24HourTime")?"H:mm":"hA");case this.TIME_INTERVALS.WEEKLY:return e.utc(a,"x").format("dddd");case this.TIME_INTERVALS.MONTHLY:return e.utc(a,"x").format("Do")}}.bind(this),shadedBackgroundFilter:function(a,b){var c=this.activityReports.getInterval();switch(c){case this.TIME_INTERVALS.DAILY:return Math.floor(b/6)%2;case this.TIME_INTERVALS.WEEKLY:return e(a).dayOfYear()%2;case this.TIME_INTERVALS.MONTHLY:return e(a).format("w")%2}}.bind(this)}},d.prototype.updateCommonConfig=function(){var a=this.activityReports.getInterval(),b=this.activityReports.getStart(),c=this.activityReports.getEnd();this.commonChartConfig.xAxisTickResolution=a.grain,this.commonChartConfig.xScaleDomain=[b,c]},d.prototype.updateRange=function(a,b){this.activityReports.setDateInterval(a,b),this.dateIntervalUtils.updateStateWithNewInterval(a,this.activityReports.getInterval()).then(this.refresh.bind(this))},d.prototype.prepareCharts=function(){this.chartConfig=[],this.chartDataSeries=[],0!==this.activityReports.repositories.site.collection.size()&&(this.buildDataSeries(this.activityReports.repositories.site.collection,this.$translate.instant("STATISTICS_RECENT_ACTIVITIES_TOTAL")),this.selectedDevices.forEach(function(a){var b=this.activityReports.repositories.ap.collection.filter(function(b){return b.get("ap")===a});this.buildDataSeries(new this.BaseCollection(b),this.$filter("deviceName")(a))}.bind(this)),this.updateCommonConfig())},d.prototype.tooltipShownCallback=function(a){this.focusedX=a?a.x:void 0},d.prototype.getFocusedData=function(a){return this.chartDataSeries[a].find(function(a){return a.x===this.focusedX}.bind(this))},d.prototype.bytesLength=function(a){if(void 0!==this.focusedX){var b=this.getFocusedData(a);return b.bytesRaw.filter(function(a){return!isNaN(a)&&null!==a}).length}},d.prototype.clientsCountLength=function(a){if(void 0!==this.focusedX){var b=this.getFocusedData(a);return b.clients.filter(function(a){return a>0}).length}},d.prototype.parseBytes=function(a){return this.binaryPrefix.parse(a)},d.prototype.buildDataSeries=function(a,b){if(0!==a.length){var c;["wlan_bytes","bytes"].forEach(function(b){if(isNaN(c)){var d=this.statsUtils.getTopItems(a,1,b);c=d[0].get(b)}},this);var d=this.binaryPrefix.parse(c).prefix,f=[];if(a.each(function(a){var b=a.get("wlan_bytes");void 0===b&&(b=a.get("bytes"));var c=a.get("wlan-num_sta");void 0===c&&(c=a.get("num_sta"));var e=this.statsUtils.normalizeTime(a.get("time"),this.activityReports.getInterval());if(void 0!==e){var g={x:e,clients:c,traffic:this.binaryPrefix.normalizeToPrefix(d,b),bytesRaw:b};f.push(g)}}.bind(this)),0===f.length)return;f.sort(function(a,b){return a.x-b.x});var g=this.activityReports.getInterval(),h=this.activityReports.getStart(),i=Math.min(this.activityReports.getEnd(),e().endOf("hour").format("x"));this.chartDataSeries.push(this.statsUtils.fillWithPaddingDataPoints(f,g,h,i));var j=Object.create(this.commonChartConfig);j.label=b,j.left=angular.copy(this.commonChartConfig.left),j.left.bytesUnit=d,this.chartConfig.push(j)}},d.$inject=["$filter","$q","$scope","$state","$translate","activityReports","BaseCollection","binaryPrefix","dateIntervalUtils","debounce","devices","preferences","statsUtils","STATS_DEFAULTS","TIME_INTERVALS"],angular.module("app-unifi-manage").controller("StatsRecentActivitiesController",d)},{moment:238}],791:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiStatisticsRecentActivities"><div class="appSubHeading appSubHeading--standalone">{{\'STATISTICS_RECENT_ACTIVITIES_HEADING\' | translate}}</div><form autocomplete="off" class="shelf verticalRhythmTop--condensed"><div class="inflexible"><div class="appInputGroup--cozy"><unifi-time-interval-selector unifi-time-interval-selector-init-value="statsRecentActivitiesCtrl.activityReports.getInterval()" unifi-time-interval-selector-on-change="statsRecentActivitiesCtrl.setInterval(interval)" class="horizontalRhythm--condensed"></unifi-time-interval-selector></div></div><div class="inflexible"><div class="appInputGroup--cozy"><unifi-date-interval-selector unifi-date-interval-selector-value="statsRecentActivitiesCtrl.activityReports.interval.value" unifi-date-interval-selector-unit="statsRecentActivitiesCtrl.activityReports.interval.unit" unifi-date-interval-selector-start="statsRecentActivitiesCtrl.activityReports.start" unifi-date-interval-selector-end="statsRecentActivitiesCtrl.activityReports.end" unifi-date-interval-selector-on-change="statsRecentActivitiesCtrl.updateRange(start, end)" unifi-date-interval-selector-use-utc="statsRecentActivitiesCtrl.activityReports.getInterval() !== statsRecentActivitiesCtrl.TIME_INTERVALS.DAILY" class="horizontalRhythm--cozy noMarginBottom"></unifi-date-interval-selector></div></div><div class="growable"><div style="width: 290px" class="appInputGroup--cozy"><unifi-select-simple-dropdown-list unifi-select-simple-dropdown-list-collection="statsRecentActivitiesCtrl.availableDevices" unifi-select-simple-dropdown-list-selected-model="statsRecentActivitiesCtrl._selectedModel" unifi-select-simple-dropdown-list-render-label="statsRecentActivitiesCtrl.getDeviceName(model)" unifi-select-simple-dropdown-list-row-template="\'statsRecentActivitiesSelectDevice\'" unifi-select-simple-dropdown-list-inject-filter="\'DeviceFilter\'" unifi-select-simple-dropdown-list-inject-comparator="\'manageDevicesComparator\'" unifi-select-simple-dropdown-list-default-sort-by="\'state\'" unifi-select-simple-dropdown-list-default-sort-desc="false" unifi-select-simple-dropdown-list-search-placeholder="\'COMMON_SELECT_DEVICE_DROPDOWN_SEARCH_PLACEHOLDER\'" unifi-select-simple-dropdown-list-empty-table-notice="\'COMMON_SELECT_DEVICE_DROPDOWN_TABLE_EMPTY\'" unifi-select-simple-dropdown-list-local-state="true" unifi-select-simple-dropdown-list-local-state-key="\'stats-recent-activities-select-device\'" unifi-select-simple-dropdown-list-local-state-is-temporary="true" unifi-select-simple-dropdown-list-is-cozy="true" unifi-select-simple-dropdown-list-no-clear="true" unifi-select-simple-dropdown-list-on-select="statsRecentActivitiesCtrl.addDevice(model); statsRecentActivitiesCtrl._selectedModel = undefined"></unifi-select-simple-dropdown-list></div></div><div class="inflexible"><span>{{\'STATISTICS_RECENT_ACTIVITIES_TRAFFIC\' | translate}}</span><div class="unifiLegendLine unifiLegendLine--solid"></div><span>{{\'STATISTICS_RECENT_ACTIVITIES_CLIENTS\' | translate}}</span><div class="unifiLegendLine unifiLegendLine--dotted"></div></div></form><div ng-if="statsRecentActivitiesCtrl.chartDataSeries.length &gt; 0" ng-repeat="dataSeries in statsRecentActivitiesCtrl.chartDataSeries track by $index" class="unifiStatisticsRecentActivitiesChartContainer verticalRhythmTop--comfy"><div ng-if="$index &gt; 0" class="unifiStatisticsRecentActivitiesChartContainer__remove"><a ng-click="statsRecentActivitiesCtrl.removeDeviceByIndex($index - 1)" class="icon ubnt-icon--x"></a></div><unifi-line-chart-with-tooltip ng-class="[        \'unifiStatisticsRecentActivities__chart\' + $index      ]" unifi-line-chart-with-tooltip-config="statsRecentActivitiesCtrl.chartConfig[$index]" unifi-line-chart-with-tooltip-data="dataSeries" unifi-line-chart-with-tooltip-callback="statsRecentActivitiesCtrl.tooltipShownCallback(data)" unifi-line-chart-with-tooltip-external-source="statsRecentActivitiesCtrl.getFocusedData($index)"><div ng-if="statsRecentActivitiesCtrl.activityReports.getInterval() === statsRecentActivitiesCtrl.TIME_INTERVALS.DAILY" class="unifiChartTooltipHeader">{{statsRecentActivitiesCtrl.getFocusedData($index).x | moment: \'format\': \'time\'}}</div><div ng-if="statsRecentActivitiesCtrl.activityReports.getInterval() === statsRecentActivitiesCtrl.TIME_INTERVALS.MONTHLY || statsRecentActivitiesCtrl.activityReports.getInterval() === statsRecentActivitiesCtrl.TIME_INTERVALS.WEEKLY" class="unifiChartTooltipHeader">{{statsRecentActivitiesCtrl.getFocusedData($index).x | moment: [\'utc\', \'format\']: \'date\'}}</div><div class="unifiChartTooltipBody unifiStatisticsRecentActivitiesTooltip"><div ng-if="statsRecentActivitiesCtrl.getFocusedData($index).bytesRaw === undefined &amp;&amp; statsRecentActivitiesCtrl.getFocusedData($index).clients === undefined" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--noBorder"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="STATISTICS_NO_DATA_AVAILABLE" class="noMarginBottom"></p></div></div></div><div ng-if="statsRecentActivitiesCtrl.isNumber(statsRecentActivitiesCtrl.getFocusedData($index).clients)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__title">{{\'STATISTICS_RECENT_ACTIVITIES_CLIENTS\' | translate}}</div></div><div ng-if="statsRecentActivitiesCtrl.isNumber(statsRecentActivitiesCtrl.getFocusedData($index).clients)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__number"><strong>{{statsRecentActivitiesCtrl.getFocusedData($index).clients}}</strong></div></div><div ng-if="statsRecentActivitiesCtrl.isNumber(statsRecentActivitiesCtrl.getFocusedData($index).bytesRaw)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__title">{{\'STATISTICS_RECENT_ACTIVITIES_TRAFFIC\' | translate}}</div></div><div ng-if="statsRecentActivitiesCtrl.isNumber(statsRecentActivitiesCtrl.getFocusedData($index).bytesRaw)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__number"><strong>{{statsRecentActivitiesCtrl.parseBytes(statsRecentActivitiesCtrl.getFocusedData($index).bytesRaw).value}}</strong>{{statsRecentActivitiesCtrl.parseBytes(statsRecentActivitiesCtrl.getFocusedData($index).bytesRaw).prefix}}B</div></div></div></unifi-line-chart-with-tooltip></div><div ng-if="statsRecentActivitiesCtrl.chartDataSeries.length === 0" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--centered appInfoBox--solid"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="STATISTICS_NO_DATA_AVAILABLE" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],792:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStatsRecentActivities",[function(){return{controller:"StatsRecentActivitiesController",controllerAs:"statsRecentActivitiesCtrl",template:a("./statsRecentActivities.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./statsRecentActivities.jade":791}],793:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStopEvent",[function(){return{restrict:"A",link:function(a,b,c){b.on(c.unifiStopEvent,function(a){a.stopImmediatePropagation()})}}}])},{}],794:[function(a,b,c){"use strict";function d(){e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.reset(),this.model&&(this.isReady=this.model.get("ready"),this.isStreaming=this.model.get("streaming"))},d.prototype.reset=function(){this.isReady=null,this.isStreaming=null},d.prototype.getClassName=function(){var a=[];return this.isStreaming?a.push("ubnt-icon--audio-on"):a.push("ubnt-icon--audio-off"),this.isReady&&(this.isStreaming?a.push("success"):a.push("warning")),a.join(" ")},d.$inject=[],angular.module("app-unifi-manage").controller("StreamIconController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],795:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<span class="icon {{streamIconCtrl.getClassName()}}"></span>'),b.join("")}},{"jade/runtime":232}],796:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStreamIcon",[function(){return{scope:{stream:"=unifiStreamIcon"},controller:"StreamIconController",controllerAs:"streamIconCtrl",replace:!0,restrict:"A",template:a("./streamIcon.jade")(),link:function(a,b,c,d){a.$watch("stream",function(a){d.updateModel(a)}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./streamIcon.jade":795}],797:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.heyToasts=g,this.streams=i,this.accordions={details:{overview:!0}},e.call(this,a,b,c,h,d,f)}var e=a("../../controllers/BasePropertiesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.resolve=function(){return this.streams.repository.register().fetch()},d.prototype.destroy=function(){this.streams.repository.unregister()},d.prototype.terminateStream=function(a){this.isTerminating=!0,this.streams.terminateStream(a).then(function(a){this.heyToasts.pushSuccess(a)}.bind(this))["catch"](function(a){this.heyToasts.pushError(a)}.bind(this))["finally"](function(){this.isTerminating=!1}.bind(this))},d.$inject=["$q","$timeout","$translate","account","frame","heyToasts","propertyPanel","streams"],angular.module("app-unifi-manage").controller("StreamPropertiesController",d)},{"../../controllers/BasePropertiesController":1001}],798:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-collapsed\': streamPropertiesCtrl.isCollapsed()}" ng-if="streamPropertiesCtrl.model" class="unifiPanelItem streamProperties"><unifi-loading-status unifi-loading-status-is-loading="streamPropertiesCtrl.isLoading" unifi-loading-status-failed="streamPropertiesCtrl.failedToLoad" unifi-loading-status-retry="streamPropertiesCtrl.init()"></unifi-loading-status><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__collapseToggle"><div ng-click="streamPropertiesCtrl.toggleCollapsed()" class="appActionIcon"><span ng-class="{            \'unifi-icon--default-collapse\': !streamPropertiesCtrl.isCollapsed(),            \'unifi-icon--default-expand\': streamPropertiesCtrl.isCollapsed()          }" class="button__icon icon"></span></div></div><div class="unifiPanelItemHeader__avatar"><div unifi-stream-icon="::streamPropertiesCtrl.model"></div></div><div class="unifiPanelItemHeader__title truncate"><span>{{streamPropertiesCtrl.model.getDisplayName()}}</span></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div unifi-if-role-admin ng-click="streamPropertiesCtrl.terminateStream(model)" title="{{\'STREAM_ACTIONS_TERMINATE\' | translate}}" class="appActionIcon"><span ng-class="{              \'ubnt-icon--link-broken\': !streamPropertiesCtrl.isTerminating,              \'ubnt-icon--clock-2\': streamPropertiesCtrl.isTerminating            }" class="button__icon icon"></span></div><div ng-click="streamPropertiesCtrl.toggleUndocked()" title="{{streamPropertiesCtrl.isUndocked() ? \'COMMON_PROPERTY_PANEL_ITEM_DOCK\' : \'COMMON_PROPERTY_PANEL_ITEM_UNDOCK\' | translate}}" class="appActionIcon visible--mdUp"><span ng-class="{              \'ubnt-icon--header-maximize\': !streamPropertiesCtrl.isUndocked(),              \'ubnt-icon--header-minimize\': streamPropertiesCtrl.isUndocked()            }" class="button__icon icon"></span></div><div ng-click="streamPropertiesCtrl.removePanel()" title="{{\'COMMON_PROPERTY_PANEL_ITEM_REMOVE\' | translate}}" class="appActionIcon removePanelItem"><span class="button__icon icon unifi-icon--default-close"></span></div></div></div></div><div class="unifiPanelItemBody"><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><ul class="appTabs appTabs--compressed appTabs--alignLeft"><li ng-repeat="tabItem in [\'details\', \'devices\']" ng-click="streamPropertiesCtrl.setActiveTab(tabItem)" ng-class="{            \'is-tab-selected\': streamPropertiesCtrl.getActiveTab() === tabItem,            \'is-tab-loading\': streamPropertiesCtrl.loadingTab === tabItem          }" class="tabs__item">{{\'STREAM_PROPERTIES_TAB_\' + tabItem | uppercase | translate}}</li></ul></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div class="unifiPanelItemContent"><div ng-if="streamPropertiesCtrl.isTabAvailable(\'details\') &amp;&amp; streamPropertiesCtrl.getActiveTab() === \'details\'" unifi-stream-properties-details class="streamPropertiesDetails"></div><div ng-if="streamPropertiesCtrl.isTabAvailable(\'devices\') &amp;&amp; streamPropertiesCtrl.getActiveTab() === \'devices\'" class="streamPropertiesDevices"><unifi-stream-properties-device-list unifi-stream-properties-device-list-stream-id="streamPropertiesCtrl.model.id"></unifi-stream-properties-device-list></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],799:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStreamProperties",["updateModelDirectiveMixin",function(b){return{controller:"StreamPropertiesController",controllerAs:"streamPropertiesCtrl",scope:{model:"=unifiStreamProperties"},template:a("./streamProperties.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.destroy(),e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./streamProperties.jade":798}],800:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="streamPropertiesCtrl.accordions.details.overview" class="unifiPanelItemContent__section"><accordion-heading>{{\'STREAM_PROPERTIES_SECTION_DETAILS_OVERVIEW\' | translate}}</accordion-heading><div ng-if="streamPropertiesCtrl.accordions.details.overview"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow streamId"><dt>{{\'STREAM_PROPERTIES_LABEL_ID\' | translate}}</dt><dd>{{streamPropertiesCtrl.model.get(\'streamId\')}}</dd></div><div class="appDescriptionListRow streamNumberOfDevices"><dt>{{\'STREAM_PROPERTIES_LABEL_NUMBER_OF_DEVICES\' | translate}}</dt><dd>{{streamPropertiesCtrl.model.get(\'devices\').length}}</dd></div><div class="appDescriptionListRow streamReady"><dt>{{\'STREAM_PROPERTIES_LABEL_READY\' | translate}}</dt><dd>{{streamPropertiesCtrl.model.get(\'ready\') | yesOrNo}}</dd></div><div class="appDescriptionListRow streamStreaming"><dt>{{\'STREAM_PROPERTIES_LABEL_STREAMING\' | translate}}</dt><dd>{{streamPropertiesCtrl.model.get(\'streaming\') | yesOrNo}}</dd></div></div></div></accordion-group><accordion-group is-open="streamPropertiesCtrl.accordions.details.quality" class="unifiPanelItemContent__section"><accordion-heading>{{\'STREAM_PROPERTIES_SECTION_DETAILS_QUALITY\' | translate}}</accordion-heading><div ng-if="streamPropertiesCtrl.accordions.details.quality"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow streamQuality"><dt>{{\'STREAM_PROPERTIES_LABEL_ENCODING_QUALITY\' | translate}}</dt><dd>{{streamPropertiesCtrl.model.get(\'quality\') | streamEncodingQuality}}</dd></div><div class="appDescriptionListRow streamQuality"><dt>{{\'STREAM_PROPERTIES_LABEL_RATE\' | translate}}</dt><dd>{{streamPropertiesCtrl.model.get(\'rate\')}}</dd></div><div class="appDescriptionListRow streamQuality"><dt>{{\'STREAM_PROPERTIES_LABEL_CHANNELS\' | translate}}</dt><dd translate="STREAM_PROPERTIES_LABEL_CHANNELS_NUMBER" translate-values="{channels: streamPropertiesCtrl.model.get(\'channel\')}" translate-interpolation="messageformat"></dd></div></div></div></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],801:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStreamPropertiesDetails",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiStreamProperties",template:a("./streamPropertiesDetails.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"details")}}}])},{"./streamPropertiesDetails.jade":800}],802:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.devices=b,this.streams=c,this.comparator=f,this.filter=new d,this.rowsPerPage=h.model.getRowsPerPropertyPanel(),this.defaultSortBy="name",e.call(this,a,g,h)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){this.filter.setStreamFilter(this.streamId)},d.prototype.getCollection=function(){return this.streams.streamDevicesCollection},d.prototype.getDevice=function(a){return this.devices.repository.collection.get(a.get("mac"))},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","devices","streams","StreamDeviceFilter","streamDevicesComparator","CollectionView","preferences"],angular.module("app-unifi-manage").controller("StreamPropertiesDeviceListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],803:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiPanelItemContent__section appScrollable flexFlag__body fullWidth"><table collection-view-sort="streamPropertiesDeviceListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="device" class="streamDevice"><span translate="STREAM_PROPERTIES_DEVICES_TABLE_HEADER_DEVICE"></span></th><th collection-view-sort-by="connected" class="streamDeviceConnected"><span translate="STREAM_PROPERTIES_DEVICES_TABLE_HEADER_CONNECTED"></span></th></tr></thead><tfoot ng-if="streamPropertiesDeviceListCtrl.view.getModels().length"><tr><td colspan="2"><unifi-micro-pagination unifi-micro-pagination-current-page="streamPropertiesDeviceListCtrl.currentPage" unifi-micro-pagination-rows-per-page="streamPropertiesDeviceListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="streamPropertiesDeviceListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in streamPropertiesDeviceListCtrl.view.getModels(),            startFrom (streamPropertiesDeviceListCtrl.currentPage - 1) * streamPropertiesDeviceListCtrl.rowsPerPage,            limitTo streamPropertiesDeviceListCtrl.rowsPerPage" ng-init="device = streamPropertiesDeviceListCtrl.getDevice(model)" data-id="{{::device.id}}" data-device-type="{{::device.get(\'type\')}}" unifi-open-panel="device" unifi-open-panel-active-tab="\'details\'" class="clickable"><td class="streamDevice"><span ng-if="!device">{{::model.get(\'mac\')}}</span><span ng-if="device">{{::device.getDisplayName()}}</span></td><td class="streamDeviceConnected">{{::model.get(\'connected\') | yesOrNo}}</td></tr></tbody></table><div ng-if="!streamPropertiesDeviceListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="STREAM_PROPERTIES_DEVICES_TABLE_EMPTY_NO_USERS" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],804:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStreamPropertiesDeviceList",["PaginatedListDirective",function(b){return new b("streamPropertiesDevice",a("./streamPropertiesDeviceList.jade")(),{streamId:"=unifiStreamPropertiesDeviceListStreamId"})}])},{"./streamPropertiesDeviceList.jade":803}],805:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.columnStore=k,this.devices=c,this.heyToasts=d,this.INSIGHTS_DEFAULTS=f,this.streams=j,this.isColumnVisible=this.columnStore.isColumnVisible.bind(this.columnStore),this.isCustomized=this.columnStore.getCustomized.bind(this.columnStore),this.comparator=i,this.filter=new h,this.filterGroups=[],this.defaultSortBy="streamId",this.columnStore.setColumns(),e.call(this,a,b,g)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){var a=this.listState.getFilter("stream");"all"!==a&&this.filter.setStreamFilter(a),this.isFiltered=this.filter.isFiltered.bind(this.filter),this.getStreamFilter=this.filter.getStreamFilter.bind(this.filter),this.hasStreamFilter=this.filter.hasStreamFilter.bind(this.filter),this.initFilterView()},d.prototype.initFilterView=function(){var a=this.getStreams();if(a.length>1){var b={id:"stream",translationKey:"STREAMS_FILTER_TITLE_STREAM",items:[{id:"all",translationKey:"STREAMS_FILTER_ALL_STREAMS",excludeFromSummary:!0,isSelected:function(){return!this.hasStreamFilter()}.bind(this),onSelect:function(){return this.clearStreamFilter()}.bind(this)}]};a.forEach(function(a){b.items.push({id:a.id,label:a.id,excludeFromSummary:!1,isSelected:function(){return this.getStreamFilter()===a.id}.bind(this),onSelect:function(){return this.setStreamFilter(a.id)}.bind(this)})}.bind(this)),this.filterGroups.push(b)}},d.prototype.getCollection=function(){return this.streams.streamDevicesCollection},d.prototype.getStreamFilterGroup=function(){return this.filterGroups.find(function(a){return"stream"===a.id})},d.prototype.getStreams=function(){return this.streams.repository.collection},d.prototype.getDevice=function(a){return this.devices.repository.collection.get(a.get("mac"))},d.prototype.getStream=function(a){return this.streams.repository.collection.get(a.get("streamId"))},d.prototype.terminateStream=function(a){this.isTerminating=!0,this.streams.terminateStream(a).then(function(a){this.heyToasts.pushSuccess(a)}.bind(this))["catch"](function(a){this.heyToasts.pushError(a)}.bind(this))["finally"](function(){this.isTerminating=!1}.bind(this))},d.prototype.clearStreamFilter=function(){this.beginStateChange(),this.listState.removeFilter("stream"),this.filter.clearStreamFilter(),this.commitStateChange()},d.prototype.setStreamFilter=function(a){this.beginStateChange(),this.listState.addFilter("stream",a),this.filter.setStreamFilter(a),this.commitStateChange()},d.$inject=["$injector","CollectionView","devices","heyToasts","INSIGHTS_DEFAULTS","preferences","StreamDeviceFilter","streamDevicesComparator","streams","streamsListColumnStore"],angular.module("app-unifi-manage").controller("StreamsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],806:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="streamsListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div><div ng-if="streamsListCtrl.getStreams().length &gt; 1"><unifi-ui-single-filter-dropdown unifi-ui-single-filter-dropdown-filter-group="streamsListCtrl.getStreamFilterGroup()" unifi-ui-single-filter-dropdown-filter-by-label="{{\'STREAMS_FILTER_TITLE_STREAM\' | translate}}" unifi-ui-single-filter-dropdown-filter-by-all-label="{{\'STREAMS_FILTER_ALL_STREAMS\' | translate}}" class="visible--lgUp"></unifi-ui-single-filter-dropdown><unifi-ui-list-filter-dropdown unifi-ui-list-filter-dropdown-config="streamsListCtrl.filterGroups" unifi-ui-list-filter-dropdown-filter-by-label="{{\'COMMON_LABEL_FILTER_BY\' | translate}}" unifi-ui-list-filter-dropdown-filter-by-all-label="{{\'COMMON_LABEL_FILTER_ALL\' | translate}}" class="visible--mdDown"></unifi-ui-list-filter-dropdown></div><div ng-if="streamsListCtrl.getStreams().length &gt; 0" class="appActionBarFilter"><div on-outside-element-click="streamsListCtrl.terminateStreamDropdownVisible = false" ng-click="streamsListCtrl.terminateStreamDropdownVisible = !streamsListCtrl.terminateStreamDropdownVisible" ng-disabled="streamsListCtrl.isTerminating" class="appMainButton appMainButton--primary appMainButton--cozy appMainButton--withDropdown visible--mdUp"><span class="button__icon icon ubnt-icon--link-broken"></span><span translate="STREAMS_ACTIONS_TERMINATE"></span><span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="streamsListCtrl.terminateStreamDropdownVisible ? \'is-dropdown-visible\' : \'\'" class="appDropdown appDropdown--inButton appDropdown--left appDropdown--scrollable appDropdown--medium"><li ng-repeat="stream in streamsListCtrl.getStreams().models" ng-click="streamsListCtrl.terminateStream(stream)" class="appDropdown__item">{{ stream.get(\'streamId\') }}</li></ul></div></div></div></div><div class="appActionBar__right"><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="streamsListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="streamsListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><table id="streamsListTable" collection-view-sort="streamsListCtrl.view" ng-class="{            \'is-not-responsive\': streamsListCtrl.columnStore.getCustomized() || !streamsListCtrl.isResponsive()          }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th class="streamsStateIcon"></th><th collection-view-sort-by="device" ng-if="streamsListCtrl.isColumnVisible(\'device\')" class="streamsDevice"><span translate="STREAMS_TABLE_HEADER_DEVICE"></span></th><th collection-view-sort-by="streamId" ng-if="streamsListCtrl.isColumnVisible(\'stream_id\')" class="streamsStreamId"><span translate="STREAMS_TABLE_HEADER_STREAM_ID"></span></th><th collection-view-sort-by="ready" ng-if="streamsListCtrl.isColumnVisible(\'ready\')" class="streamsReady"><span translate="STREAMS_TABLE_HEADER_READY"></span></th><th collection-view-sort-by="streaming" ng-if="streamsListCtrl.isColumnVisible(\'streaming\')" class="streamsStreaming"><span translate="STREAMS_TABLE_HEADER_STREAMING"></span></th><th collection-view-sort-by="connected" ng-if="streamsListCtrl.isColumnVisible(\'connected\')" class="streamsConnected"><span translate="STREAMS_TABLE_HEADER_CONNECTED"></span></th><th class="streamsActions appTableCell--withAction"><unifi-list-column-selector unifi-list-column-selector-column-store="streamsListCtrl.columnStore"></unifi-list-column-selector></th></tr></thead><tfoot ng-if="streamsListCtrl.view.getModels().length"><tr><td colspan="{{streamsListCtrl.columnStore.getColumns().length + (streamsListCtrl.isColumnVisible(\'actions\') ? 0 : 1)}}"><unifi-list-pagination unifi-list-pagination-current-page="streamsListCtrl.currentPage" unifi-list-pagination-rows-per-page="streamsListCtrl.rowsPerPage" unifi-list-pagination-total-rows="streamsListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in streamsListCtrl.view.getModels(),                      startFrom (streamsListCtrl.currentPage - 1) * streamsListCtrl.rowsPerPage,                      limitTo streamsListCtrl.rowsPerPage" collection-view-repeat-watch="streamsListCtrl.columnStore.getColumns()" data-id="{{::model.id}}" ng-init="device = streamsListCtrl.getDevice(model)"><td class="streamsStateIcon unifiDevicesTable__statusBall"><span unifi-device-icon="::device"></span></td><td ng-if="::streamsListCtrl.isColumnVisible(\'device\')" class="streamsDevice"><span ng-if="!device">{{::model.get(\'mac\')}}</span><a ng-if="device" data-id="{{::device.id}}" data-device-type="{{::device.get(\'type\')}}" unifi-open-panel="device" unifi-open-panel-active-tab="\'details\'">{{::device.getDisplayName()}}</a></td><td ng-if="::streamsListCtrl.isColumnVisible(\'stream_id\')" class="streamsStreamId"><a data-id="{{::model.get(\'streamId\')}}" unifi-open-panel="streamsListCtrl.getStream(model)" unifi-open-panel-active-tab="\'details\'">{{::model.get(\'streamId\')}}</a></td><td ng-if="::streamsListCtrl.isColumnVisible(\'ready\')" class="streamsReady"><unifi-yes-or-no-badge unifi-yes-or-no-badge-model="model.get(\'ready\')"></unifi-yes-or-no-badge></td><td ng-if="::streamsListCtrl.isColumnVisible(\'streaming\')" class="streamsStreaming"><unifi-yes-or-no-badge unifi-yes-or-no-badge-model="model.get(\'streaming\')"></unifi-yes-or-no-badge></td><td ng-if="::streamsListCtrl.isColumnVisible(\'connected\')" class="streamsConnected"><unifi-yes-or-no-badge unifi-yes-or-no-badge-model="model.get(\'connected\')"></unifi-yes-or-no-badge></td><td class="switchStatsActions appTableCell--actions"></td></tr></tbody></table><div ng-if="!streamsListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="STREAMS_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!streamsListCtrl.isFiltered()" translate="STREAMS_TABLE_EMPTY_NO_STREAMS" class="noMarginBottom"></p><p ng-if="streamsListCtrl.isFiltered()" translate="STREAMS_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],807:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStreamsList",["PaginatedListDirective",function(b){return new b("streams",a("./streamsList.jade")())}])},{"./streamsList.jade":806}],808:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiStringToIntegerInput",[function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$formatters.push(function(a){var b=a||0===a?parseInt(a,10):void 0,c=void 0===b||!isNaN(b);return d.$setValidity("number",c),b||a}),d.$parsers.push(function(a){var b=a+"",c=!0;return b.length&&((c=/^-?[0-9]*$/.test(b))||(b=void 0)),d.$setValidity("number",c),b})}}}])},{}],809:[function(a,b,c){"use strict";function d(a,b,c,f,g,h,i,j){this.CHART=a,this.d3=b,this.dataUtils=c,this.debounce=f,this.geometryUtils=g,this.imageUrlUtils=h,this.mergeDefaults=i,this.$location=j,e.call(this),d.prototype.init.call(this)}var e=a("../../../app-unifi-manage/controllers/BaseChartController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.init=function(){this.currentZoomScale=1,this.currentZoomCoords=[0,0],this.chart={},this.config={zoomingFactor:1.2,zoomingRange:[.12,3.2],zoomDuration:150,rulerHeight:4,rulerBackgroundHeight:20,rulerLabelBackgroundWidth:50,expectedRulerLength:100}},d.prototype.updateConfig=function(a){a&&(this.config=this.mergeDefaults(Object.create(a),this.config))},d.prototype.setImage=function(a){this.image=a,this.chart.image.attr({width:a.size.width,height:a.size.height,"xlink:href":a.url})},d.prototype.setScale=function(a){this.zoomListener.scale(a)},d.prototype.render=function(){this.addRuler()},d.prototype.setParentElement=function(a){this.svgElement=angular.element(a.find("svg")),this.chart.svg=this.d3.select(this.svgElement[0]),this.chart.canvas=this.chart.svg.append("g").attr("class","unifiBaseSvgMap__canvas"),this.chart.zoomOverlay=this.chart.canvas.append("rect").attr({"class":"unifiBaseSvgMap__zoomable",width:"100%",height:"100%"}),this.chart.map=this.chart.canvas.append("svg").attr({x:"50%",y:"50%",style:"overflow: visible;"}).append("g").attr("class","unifiBaseSvgMap__map"),this.chart.image=this.chart.map.append("image"),this.zoomListener=this.d3.behavior.zoom().scaleExtent(this.config.zoomingRange).on("zoom",this.onZoom.bind(this)).on("zoomend",this.debounce(this.onZoomEnd.bind(this),1e3)),this.chart.zoomOverlay.call(this.zoomListener),this.chart.zoomOverlay.on("dblclick.zoom",null)},d.prototype.addRuler=function(){var a=this.chart.svg.append("svg").attr({x:"100%",y:"100%",style:"overflow: visible;"}),b=a.append("g").attr({"class":"unifiBaseSvgMap__ruler",transform:"translate(-10, -10)"}),c=this.d3.svg.line().x(function(a){return a[0]}).y(function(a){return a[1]}).interpolate("linear"),d=b.append("rect").attr({"class":"unifiBaseSvgMap__rulerBackground",height:this.config.rulerBackgroundHeight}),e=b.append("path"),f=b.append("text").attr({x:-this.config.rulerHeight,y:this.config.rulerHeight});this.updateRuler=function(a){var b=this.dataUtils.nicelyRound(this.upp*this.scaleByZoom(this.config.expectedRulerLength));f.text(b+" "+this.unit);var g=b*this.currentZoomScale/this.upp;this.addTransition(e,a).attr("d",c([[0,0],[0,this.config.rulerHeight],[-g,this.config.rulerHeight],[-g,0]])),this.addTransition(f,a).attr("dx",-g),d.attr({width:g+this.config.rulerLabelBackgroundWidth,transform:"translate(-"+(g+this.config.rulerLabelBackgroundWidth)+", -"+this.config.rulerBackgroundHeight+")translate(10, 10)"})}},d.prototype.applyViewport=function(a,b,c){this.currentZoomCoords=a||this.currentZoomCoords,this.currentZoomScale=b||this.currentZoomScale,this.zoomListener.scale(this.currentZoomScale);var d=this.getCenter();this.zoomListener.translate([this.currentZoomCoords[0]+d[0],this.currentZoomCoords[1]+d[1]]),this.onZoom(c),this.onZoomEnd()},d.prototype.onZoom=function(a){this.currentZoomScale=this.zoomListener.scale();var b=this.getCenter(),c=this.getVisibleImageSize();this.currentZoomCoords=this.zoomListener.translate(),this.currentZoomCoords=this.geometryUtils.limitRectPosition(this.currentZoomCoords[0],this.currentZoomCoords[1],c.width,c.height,b),this.zoomListener.translate(this.currentZoomCoords),this.currentZoomCoords[0]-=b[0],this.currentZoomCoords[1]-=b[1],this.addTransition(this.chart.map,a).attr("transform","translate("+this.currentZoomCoords+")scale("+this.currentZoomScale+")"),this.updateRuler(a),this.addTransition(this.d3.selectAll(".constantSize"),a).attr("transform","scale("+this.scaleByZoom(1)+")"),this.onChange(a)},d.prototype.onZoomEnd=function(){this.onChangeEnd()},d.prototype.zoomStep=function(a){if(a!==this.currentZoomScale){var b=this.getVisibleImageSize(),c=this.geometryUtils.rescaleRect(this.currentZoomCoords[0],this.currentZoomCoords[1],b.width,b.height,this.scaleByZoom(a));this.applyViewport([c.x,c.y],a,!0),this.onZoomEnd()}},d.prototype.zoomIn=function(){var a=Math.min(this.currentZoomScale*this.config.zoomingFactor,this.config.zoomingRange[1]);this.zoomStep(a)},d.prototype.zoomOut=function(){var a=Math.max(this.currentZoomScale/this.config.zoomingFactor,this.config.zoomingRange[0]);this.zoomStep(a)},d.prototype.addTransition=function(a,b){return b&&(a=a.transition().duration(this.config.zoomDuration)),a},d.prototype.getCenter=function(){return[this.svgElement.width()/2,this.svgElement.height()/2]},d.prototype.displayToPhysicalCoords=function(a,b){var c=this.svgElement.offset();a-=c.left,b-=c.top;var d=this.getCenter();return[this.scaleByZoom(a-this.currentZoomCoords[0]-d[0]),this.scaleByZoom(b-this.currentZoomCoords[1]-d[1])]},d.prototype.getVisibleImageSize=function(){return{width:this.currentZoomScale*this.image.size.width,height:this.currentZoomScale*this.image.size.height}},d.prototype.scaleByZoom=function(a){return a/this.currentZoomScale},d.prototype.onChange=function(){},d.prototype.onChangeEnd=function(){},d.prototype.getDefsUrl=function(a){var b=this.$location.absUrl(),c=b.indexOf("#")>=0?b.substr(0,b.indexOf("#")):b;return"url("+c+"#"+a+")"},d.$inject=["CHART","d3","dataUtils","debounce","geometryUtils","imageUrlUtils","mergeDefaults","$location"],b.exports=d},{"../../../app-unifi-manage/controllers/BaseChartController":995}],810:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.geometryUtils=f,e.call(this,a,b,c,d,f,g,h,i),this.line=[[0,0],[0,0]],this.measurement={},this.DRAG_HANDLE_RADIUS=20}var e=a("./BaseSvgMapController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.render=function(){e.prototype.render.call(this),this.addMeasurementCapabilities()},d.prototype.addMeasurementCapabilities=function(){this.measurement.group=this.chart.svg.append("g"),this.measurement.overlay=this.measurement.group.append("rect").attr({"class":"unifiMeasurableSvgMap",width:"100%",height:"100%"}),this.addMeasurementTool();var a=this.d3.behavior.drag().on("dragstart",function(){this.chart.map.select(".unifiMeasurableSvgMap__line").classed("unifiMeasurableSvgMap__line-visible",!0);var a=this.displayToPhysicalCoords(this.d3.event.sourceEvent.clientX,this.d3.event.sourceEvent.clientY);this.line[0]=a,this.line[1]=a,this.updateMeasurementLine()}.bind(this)).on("drag",function(){var a=this.displayToPhysicalCoords(this.d3.event.sourceEvent.clientX,this.d3.event.sourceEvent.clientY);this.line[1]=a,this.updateMeasurementLine()}.bind(this)).on("dragend",function(){this.chart.svg.classed("unifiMeasurableSvgMap-preselectMode",!1),this.chart.svg.classed("unifiMeasurableSvgMap-editMode",!0)}.bind(this));this.measurement.overlay.call(a)},d.prototype.addMeasurementTool=function(){var a=this.d3.behavior.drag().on("drag",function(a,b){this.line[b][0]+=this.d3.event.dx,this.line[b][1]+=this.d3.event.dy,this.updateMeasurementLine()}.bind(this));this.chart.map.append("line").attr("class","unifiMeasurableSvgMap__line").attr({"marker-start":this.getDefsUrl("arrowStart"),"marker-end":this.getDefsUrl("arrowEnd")}),this.chart.map.selectAll(".unifiMeasurableSvgMap__handle").data(this.line).enter().append("g").call(a).attr("class","unifiMeasurableSvgMap__handle").attr("id",function(a,b){return"handle_"+b}).append("circle").attr({"class":"constantSize",r:this.DRAG_HANDLE_RADIUS})},d.prototype.toggleMeasurementMode=function(){this.line=[[0,0],[0,0]];var a=this.chart.svg.classed("unifiMeasurableSvgMap-preselectMode")||this.chart.svg.classed("unifiMeasurableSvgMap-editMode");this.chart.svg.classed("unifiMeasurableSvgMap-preselectMode",!a),this.chart.svg.classed("unifiMeasurableSvgMap-editMode",!1),this.chart.map.select(".unifiMeasurableSvgMap__line").classed("unifiMeasurableSvgMap__line-visible",!1)},d.prototype.updateMeasurementLine=function(){this.chart.map.selectAll(".unifiMeasurableSvgMap__handle").data(this.line).attr("transform",function(a){return"translate("+a+")"}).each(function(){this.parentNode.appendChild(this)}),this.chart.map.select(".unifiMeasurableSvgMap__line").attr({x1:this.line[0][0],y1:this.line[0][1],x2:this.line[1][0],y2:this.line[1][1]}).each(function(){this.parentNode.appendChild(this)})},d.prototype.getMeasuredLength=function(){return this.geometryUtils.getLength(this.line[0],this.line[1])},d.prototype.setMapScale=function(a,b){this.selectedMap.save({unit:b,upp:10*a/this.getMeasuredLength()})},d.$inject=["CHART","d3","dataUtils","debounce","geometryUtils","imageUrlUtils","mergeDefaults","$location"],b.exports=d},{"./BaseSvgMapController":809}],811:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B){this.CHART=a,this.apiResults=b,this.d3=c,this.devices=g,this.deviceCoverageCalculator=h,this.deviceStateUtils=i,this.domHelper=j,this.geometryUtils=k,this.heyToasts=l,this.imageMapUtils=m,this.mapDevices=o,this.mapFeatures=p,this.mapUtils=q,this.mergeDefaults=r,this.rfEnvironment=s,this.topologyUtils=t,this.DEVICE_TYPES=u,this.MAP_DEFAULTS=v,this.MAP_FEATURES=w,this.TOPOLOGY_LINKS=x,this.$compile=y,this.$translate=B,this.$location=z,e.call(this,a,c,d,f,k,n,r,z),this.init()}var e=a("./MeasurableSvgMapController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.setScope=function(a){this.scope=a},d.prototype.init=function(){this.config=this.mergeDefaults({coverageLayers:8,deviceMarker:{iconSize:42,menuItemSize:16,toolbarItemsAngle:45,toolbarItemsRadius:60}},this.config),this.selectedMap=this.mapUtils.getSelectedMap(),this.upp=(this.selectedMap.get("upp")||this.MAP_DEFAULTS.UPP)/10,this.unit=this.selectedMap.get("unit")||this.MAP_DEFAULTS.DEFAULT_MAP.unit,this.loadImagePromise=this.imageUrlUtils.loadImage(this.selectedMap.getMapImageUrl()),this.loadImagePromise.then(function(a){var b=this.mapUtils.getSelectedDevice();this.setImage(a);var c=1;this.selectedMap.get("zoom")?c=this.config.zoomingRange[0]+(this.config.zoomingRange[1]-this.config.zoomingRange[0])*(this.selectedMap.get("zoom")-1)/20:a.size.width&&a.size.height&&(c=Math.min(1,this.svgElement.width()/a.size.width,this.svgElement.height()/a.size.height));var d=this.selectedMap.has("offset_left")?this.selectedMap.get("offset_left"):-a.size.width/2,e=this.selectedMap.has("offset_top")?this.selectedMap.get("offset_top"):-a.size.height/2,f=b?[-b.get("x"),-b.get("y")]:[d,e];this.applyViewport(f,c)}.bind(this))["catch"](function(){this.heyToasts.pushError(this.$translate.instant("MAP_IMAGE_LOAD_FAILURE_MESSAGE"))}.bind(this))},d.prototype.onChange=function(a){[this.d3.selectAll(".unifiSvgMapDeviceMarker"),this.d3.selectAll(".unifiSvgMapDeviceCoverage")].forEach(function(b){b=b.filter(function(a){return!a.temporaryCoords}),this.addTransition(b,a).attr("transform",function(a){return"translate("+[a.get("x"),a.get("y")]+")"})},this),this.updateLinks()},d.prototype.onChangeEnd=function(){var a=1+20*(this.currentZoomScale-this.config.zoomingRange[0])/(this.config.zoomingRange[1]-this.config.zoomingRange[0]);this.selectedMap.savePartial({offset_left:this.currentZoomCoords[0],offset_top:this.currentZoomCoords[1],zoom:Math.round(a)}),this.updateLinks()},d.prototype.render=function(){this.addLinks(),this.addCoverages(),this.addPlacedDevices(),e.prototype.render.call(this)},d.prototype.getMarkerSize=function(){var a=this.config.deviceMarker.iconSize;return this.mapFeatures.isEnabled(this.MAP_FEATURES.SMALL_ICONS)&&(a=.7*this.config.deviceMarker.iconSize),a},d.prototype.toggleMarkerSize=function(){this.mapFeatures.toggle(this.MAP_FEATURES.SMALL_ICONS);var a=this.getMarkerSize();this.d3.selectAll(".unifiSvgMapDeviceMarker__icon").attr({x:-a/2,y:-a/2,height:a,width:a}),this.d3.selectAll(".unifiSvgMapDeviceMarker__statusWarning").attr("transform","translate("+[.4*a,.4*-a]+")scale("+a/this.config.deviceMarker.iconSize+")")},d.prototype.addPlacedDevices=function(){var a=this.mapUtils.getPlacedDevicesForSelectedMap().filter(this.mapFeatures.filterDevice),b=this.chart.map.selectAll(".unifiSvgMapDeviceMarker").data(a,function(a){return a.id}),c=this.d3.behavior.drag().on("drag",function(a){a.get("locked")||(a.temporaryCoords=this.displayToPhysicalCoords(this.d3.event.sourceEvent.clientX,this.d3.event.sourceEvent.clientY),this.d3.select('[id="device_'+a.id+'"]').attr("transform",function(){return"translate("+a.temporaryCoords+")"}),this.d3.selectAll(".coverage_"+a.id.replace(/:/g,"")).attr("transform",function(){return"translate("+a.temporaryCoords+")"}),this.d3.event.sourceEvent.stopPropagation(),this.d3.event.sourceEvent.stopImmediatePropagation(),this.d3.event.sourceEvent.preventDefault(),this.updateLinks())}.bind(this)).on("dragend",function(a){a.temporaryCoords&&!angular.equals(a.temporaryCoords,[a.get("x"),a.get("y")])?a.get("locked")||this.mapDevices.placeDevice(this.selectedMap,a,[Math.round(a.temporaryCoords[0]),Math.round(a.temporaryCoords[1])]):this.toggleDeviceToolbar(a),a.temporaryCoords=void 0}.bind(this)),d=b.enter().append("g").attr("class","unifiSvgMapDeviceMarker").attr("id",function(a){return"device_"+a.id}).attr("transform",function(a){return"translate("+[a.get("x"),a.get("y")]+")"});b.attr("class",function(a){var b=["unifiSvgMapDeviceMarker"],c=this.deviceStateUtils.getDeviceStatus(a);return"success"!==c&&(b.push("unifiSvgMapDeviceMarker-withWarning"),b.push("unifiSvgMapDeviceMarker-withWarning__"+c)),b.join(" ")}.bind(this)).classed("unifiSvgMapDeviceMarker-locating",function(a){return a.get("locating")}).classed("unifiSvgMapDeviceMarker-locked",function(a){return a.get("locked")}).classed("unifiSvgMapDeviceMarker-noRfEnvironment",function(a){return!this.rfEnvironment.isAvailable(a)}.bind(this));var e=this.getMarkerSize(),f=d.append("g").classed("constantSize",!0).attr("transform",function(){return"scale("+this.scaleByZoom(1)+")"}.bind(this));f.append("image").call(c).attr({"class":"unifiSvgMapDeviceMarker__icon",x:-e/2,y:-e/2,width:e,height:e,"xlink:href":function(a){var b=this.deviceStateUtils.getIconClassName(a);return this.domHelper.getComputedCssProperty(b,"background-image").match(/\url\((.*)\)/)[1]}.bind(this)}),b.filter(function(a){var b=this.deviceStateUtils.getDeviceStatus(a);return"success"!==b}.bind(this)).each(this.addStatusWarning.bind(this)),b.filter(function(a){var b=this.deviceStateUtils.getDeviceStatus(a);return"success"===b}.bind(this)).each(this.removeStatusWarning.bind(this)),this.toggleLabels(b),b.exit().remove()},d.prototype.toggleLabels=function(a){if(this.mapFeatures.getLabelType()===this.MAP_FEATURES.LABELS.NONE)a.selectAll("foreignObject").remove();else if(a.select(".constantSize").selectAll("foreignObject").empty()){var b=this.$compile,c=this.scope;a.selectAll(".constantSize").append("foreignObject").html('<unifi-device-marker-label unifi-device="device" />').attr({width:300,height:100,x:-150,y:35}).each(function(a){var d=c.$new();d.device=a,b(this.childNodes[0])(d)})}},d.prototype.addStatusWarning=function(a){var b=this.d3.select('[id="device_'+a.id+'"] .constantSize');if(b.select(".unifiSvgMapDeviceMarker__statusWarning").empty()){var c=this.getMarkerSize(),d=b.append("g").attr("class","unifiSvgMapDeviceMarker__statusWarning").attr("transform","translate("+[.4*c,.4*-c]+")scale("+c/this.config.deviceMarker.iconSize+")");d.append("circle").attr("class","unifiSvgMapDeviceMarker__statusWarningShape").attr("r",this.config.deviceMarker.iconSize/4),d.append("text").attr("class","unifiSvgMapDeviceMarker__statusWarningIcon").text("!")}},d.prototype.removeStatusWarning=function(a){this.d3.select('[id="device_'+a.id+'"] .constantSize .unifiSvgMapDeviceMarker__statusWarning').remove()},d.prototype.addLinks=function(){var a=this.mapDevices.getAllLinks(this.selectedMap).filter(function(a){return this.mapFeatures.filterDevice(a.device)&&this.mapFeatures.filterDevice(a.parentDevice)},this);this.chart.linksOverlay=this.chart.linksOverlay||this.chart.map.append("g").attr("class","unifiSvgMapLinksOverlay"),this.chart.linksOverlay.attr("opacity",this.mapFeatures.isEnabled(this.MAP_FEATURES.TOPOLOGY)?1:0);var b=this.chart.linksOverlay.selectAll(".unifiSvgMapUplink").data(a,function(a){return a.device.id+a.parentDevice.id+a.type}),c=b.enter().append("g").attr("class","unifiSvgMapUplink").attr("id",function(a){return"uplink_"+a.device.id});c.append("line"),c.append("line"),this.updateLinks(),b.exit().remove()},d.prototype.updateLinks=function(){this.chart.linksOverlay.selectAll(".unifiSvgMapUplink").each(this.updateLinkPath.bind(this))},d.prototype.updateLinkPath=function(a){var b=a.device.temporaryCoords||[a.device.get("x"),a.device.get("y")],c=a.parentDevice.temporaryCoords||[a.parentDevice.get("x"),a.parentDevice.get("y")],d=this.d3.selectAll('[id="uplink_'+a.device.id+'"] line');d.attr({x1:b[0],y1:b[1],x2:c[0],y2:c[1]});var e=this.TOPOLOGY_LINKS.WIRELESS_STYLE.STROKE,f=this.TOPOLOGY_LINKS.WIRELESS_STYLE.BG_STROKE;if(this.d3.select(d[0][0]).attr({stroke:"white","stroke-width":this.scaleByZoom(e+2*f)}),this.d3.select(d[0][1]).attr({stroke:this.mapDevices.getLinkColor(a),"stroke-width":this.scaleByZoom(e)}),a.type===this.TOPOLOGY_LINKS.TYPE.WIRELESS){var g=this.TOPOLOGY_LINKS.WIRELESS_STYLE.DASHARRAY,h=[g[0]+f,g[1]-f];this.d3.select(d[0][0]).attr({"stroke-dasharray":h.map(this.scaleByZoom,this),"stroke-dashoffset":this.scaleByZoom(f/2)}),this.d3.select(d[0][1]).attr({"stroke-dasharray":g.map(this.scaleByZoom,this)})}else this.d3.select(d[0][0]).attr({"stroke-dasharray":void 0,"stroke-dashoffset":void 0}),this.d3.select(d[0][1]).attr({"stroke-dasharray":void 0})},d.prototype.addCoverages=function(){if(this.chart.coverageContainer||(this.chart.coverageContainer=this.chart.map.append("g").attr("class","unifiSvgMapDeviceCoverageContainer")),this.mapFeatures.isEnabled(this.MAP_FEATURES.COVERAGE)){var a=this.mapUtils.getPlacedDevicesForSelectedMap().filter(function(a){return a.get("type")===this.DEVICE_TYPES.AP}.bind(this)).filter(this.mapFeatures.filterDevice);if(!this.chart.coverageLayers){var b=this.chart.coverageContainer.append("g").attr("class","unifiSvgMapDeviceCoverageLayers");this.chart.coverageLayers=[];for(var c=this.config.coverageLayers;c>=0;c--)this.chart.coverageLayers.push(b.append("g").attr("opacity",(this.config.coverageLayers-c/1.5)/this.config.coverageLayers));this.chart.coverageLayers.reverse()}this.chart.coverageLayers.forEach(function(b,c){this.addCoverageLayer(b,a,c)}.bind(this))}else this.d3.selectAll(".unifiSvgMapDeviceCoverageLayers").remove(),this.chart.coverageLayers=void 0},d.prototype.addCoverageLayer=function(a,b,c){var d=a.selectAll(".unifiSvgMapDeviceCoverage").data(b,function(a){return a.id});d.enter().append("circle").attr("class",function(a){return"unifiSvgMapDeviceCoverage coverage_"+a.id.replace(/:/g,"")}).attr("transform",function(a){return"translate("+[a.get("x"),a.get("y")]+")"}).attr("fill",this.getDefsUrl("coverageGradient"+c)),d.exit().remove(),a.selectAll(".unifiSvgMapDeviceCoverage").attr("r",function(a){var b=this.mapFeatures.isEnabled(this.MAP_FEATURES.COVERAGE)?this.imageMapUtils.meterToPixels(this.deviceCoverageCalculator.calculateDeviceMetricRadius(a),this.unit,this.upp):0;return b}.bind(this))},d.prototype.toggleDeviceToolbar=function(a){var b=this.d3.select('[id="device_'+a.id+'"] .constantSize .unifiSvgMapDeviceMarker__menu');if(!b.empty())return void this.d3.select('[id="device_'+a.id+'"] .constantSize .unifiSvgMapDeviceMarker__menu').remove();var c=[{icon:"ubnt-icon--trash",action:function(){this.mapUtils.removeDevice(a)}},{icon:"ubnt-icon--bars",action:function(){this.imageMapUtils.openPropertyPanel(a,"details","rfEnvironment")}},{icon:"ubnt-icon--gears",action:function(){this.imageMapUtils.openPropertyPanel(a,"details","overview")}},{icon:function(){return a.get("locked")?"ubnt-icon--lock-positive":"ubnt-icon--lock-open"},action:function(b){var c=this.d3.select('[id="device_'+a.id+'"]'),d=a.get("locked");a.save({locked:!d}).then(function(){c.classed("unifiSvgMapDeviceMarker-locked",!d),this.d3.select('[id="device_'+a.id+'"] .unifiSvgMapDeviceMarker__menuItem:nth-child(4) .unifiSvgMapDeviceMarker__menuItemIcon').text(this.domHelper.getIconMark(b.icon))}.bind(this))}}],d=this.d3.select('[id="device_'+a.id+'"] .constantSize').append("g").attr("class","unifiSvgMapDeviceMarker__menu"),e=d.selectAll(".unifiSvgMapDeviceMarker__menuItem").data(c).enter().append("g").attr("class","unifiSvgMapDeviceMarker__menuItem").attr("transform",function(a,b){return"rotate(-"+this.config.deviceMarker.toolbarItemsAngle*b+")translate("+this.config.deviceMarker.toolbarItemsRadius+", 0)rotate("+this.config.deviceMarker.toolbarItemsAngle*b+")"}.bind(this)).on("click",function(a){a.action.call(this,a)}.bind(this));e.append("circle").attr("class","unifiSvgMapDeviceMarker__menuItemShape").attr("r",this.config.deviceMarker.menuItemSize),e.append("text").attr("class","unifiSvgMapDeviceMarker__menuItemIcon").text(function(a){return this.domHelper.getIconMark(a.icon)}.bind(this))},d.prototype.onMapChange=function(){this.upp=this.selectedMap.get("upp")/10,this.unit=this.selectedMap.get("unit"),this.updateRuler(),this.addCoverages()},d.prototype.onImageChange=function(){this.imageUrlUtils.loadImage(this.selectedMap.getMapImageUrl()).then(function(a){this.setImage(a)}.bind(this))},d.prototype.onDevicesChange=function(){this.addLinks(),this.addCoverages(),this.addPlacedDevices(),this.onChange()},d.prototype.addEventHandlers=function(){this.selectedMap.on("change:upp",this.onMapChange,this),this.selectedMap.on("change:url change:filename",this.onImageChange,this),this.listener=this.devices.repository.collection.onEvent("add remove change update",this.onDevicesChange.bind(this))},d.prototype.removeEventHandlers=function(){this.selectedMap.off("change:upp",this.onMapChange,this),this.selectedMap.off("change:url change:filename",this.onImageChange,this),this.listener.stopListening()},d.$inject=["CHART","apiResults","d3","dataUtils","debounce","devices","deviceCoverageCalculator","deviceStateUtils","domHelper","geometryUtils","heyToasts","imageMapUtils","imageUrlUtils","mapDevices","mapFeatures","mapUtils","mergeDefaults","rfEnvironment","topologyUtils","DEVICE_TYPES","MAP_DEFAULTS","MAP_FEATURES","TOPOLOGY_LINKS","$compile","$location","$q","$translate"],angular.module("app-unifi-manage").controller("SvgMapController",d)},{"./MeasurableSvgMapController":810}],812:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'invisible\': !svgMapCtrl.image}" class="unifiSvgMap"><svg dropzone="svgMap" width="0"><defs ng-if="svgMapCtrl.image"><radialGradient id="coverageGradient0"><stop offset="0%" stop-color="rgb(255,0,0)" stop-opacity="1"></stop><stop offset="20%" stop-color="rgb(255,0,0)" stop-opacity="0.7"></stop><stop offset="35%" stop-color="rgb(255,0,0)" stop-opacity="0"></stop></radialGradient><radialGradient id="coverageGradient1"><stop offset="0%" stop-color="rgb(255,255,255)" stop-opacity="1"></stop><stop offset="20%" stop-color="rgb(255,255,255)" stop-opacity="0.9"></stop><stop offset="35%" stop-color="rgb(255,255,255)" stop-opacity="0"></stop></radialGradient><radialGradient id="coverageGradient2"><stop offset="20%" stop-color="rgb(255,255,0)" stop-opacity="0"></stop><stop offset="35%" stop-color="rgb(255,255,0)" stop-opacity="1"></stop><stop offset="50%" stop-color="rgb(255,255,0)" stop-opacity="0"></stop></radialGradient><radialGradient id="coverageGradient3"><stop offset="20%" stop-color="rgb(255,255,255)" stop-opacity="0"></stop><stop offset="35%" stop-color="rgb(255,255,255)" stop-opacity="1"></stop><stop offset="50%" stop-color="rgb(255,255,255)" stop-opacity="0"></stop></radialGradient><radialGradient id="coverageGradient4"><stop offset="25%" stop-color="rgb(0,255,0)" stop-opacity="0"></stop><stop offset="45%" stop-color="rgb(0,255,0)" stop-opacity="1"></stop><stop offset="70%" stop-color="rgb(0,255,0)" stop-opacity="0"></stop></radialGradient><radialGradient id="coverageGradient5"><stop offset="25%" stop-color="rgb(255,255,255)" stop-opacity="0"></stop><stop offset="45%" stop-color="rgb(255,255,255)" stop-opacity="1"></stop><stop offset="70%" stop-color="rgb(255,255,255)" stop-opacity="0"></stop></radialGradient><radialGradient id="coverageGradient6"><stop offset="40%" stop-color="rgb(0,255,255)" stop-opacity="0"></stop><stop offset="60%" stop-color="rgb(0,255,255)" stop-opacity="1"></stop><stop offset="85%" stop-color="rgb(0,255,255)" stop-opacity="0"></stop></radialGradient><radialGradient id="coverageGradient7"><stop offset="40%" stop-color="rgb(255,255,255)" stop-opacity="0"></stop><stop offset="60%" stop-color="rgb(255,255,255)" stop-opacity="1"></stop><stop offset="85%" stop-color="rgb(255,255,255)" stop-opacity="0"></stop></radialGradient><radialGradient id="coverageGradient8"><stop offset="55%" stop-color="rgb(0,0,255)" stop-opacity="0"></stop><stop offset="75%" stop-color="rgb(0,0,255)" stop-opacity="1"></stop><stop offset="100%" stop-color="rgb(0,0,255)" stop-opacity="0"></stop></radialGradient><marker id="arrowStart" markerWidth="13" markerHeight="13" refX="2" refY="7" orient="auto"><path d="M8,11 L2,7 L8,2" class="unifiMeasurableSvgMap__lineMarker"></path></marker><marker id="arrowEnd" markerWidth="13" markerHeight="13" refX="8" refY="7" orient="auto"><path d="M2,11 L8,7 L2,2" class="unifiMeasurableSvgMap__lineMarker"></path></marker></defs></svg><div class="unifiSvgMapControls"><div class="unifiMapCustomControls"><a href="javascript:void(0)" ng-click="svgMapCtrl.zoomIn();" class="unifiMapCustomControls__control unifiMapCustomControls__control--small unifiMapCustomControls__groupedItem"><div class="unifiMapCustomControls__icon icon ubnt-icon--plus"></div></a><a href="javascript:void(0)" ng-click="svgMapCtrl.zoomOut();" class="unifiMapCustomControls__control unifiMapCustomControls__control--small unifiMapCustomControls__groupedItem"><div class="unifiMapCustomControls__icon icon ubnt-icon--minus"></div></a></div><div class="unifiSvgMapControls__additional"></div></div></div>'),b.join("")}},{"jade/runtime":232}],813:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSvgMap",["_","$timeout","$window","APP_EVENTS","CHART","domHelper","dragdrop","MAP_FEATURES","propertyPanel",function(b,c,d,e,f,g,h,i,j){return{template:a("./svgMap.jade")(),scope:{config:"=unifiSvgMapConfig"},controller:"SvgMapController",controllerAs:"svgMapCtrl",replace:!0,transclude:!0,link:function(a,g,k,l,m){m(function(a,b){g.find(".unifiSvgMapControls__additional").append(a),b.svgMapCtrl=l}),l.setScope(a),l.setParentElement(g),l.updateConfig(a.config),l.render(),a.$on(i.CHANGED_EVENT,function(){l.addPlacedDevices(),l.addCoverages(),l.addLinks()});var n=angular.element(g.find("svg"));n.on("dragover",function(a){return a.preventDefault(),a.originalEvent.dataTransfer.dropEffect="move",!1}),n.on("drop",function(b){b.preventDefault(),a.$apply(function(){h.fireCallback(b.originalEvent.dataTransfer.getData("text"),{$event:b.originalEvent,options:{coords:l.displayToPhysicalCoords(b.originalEvent.clientX,b.originalEvent.clientY)}})})});var o=[n.height(),n.width()],p=b.debounce(function(a){a=angular.isNumber(a)?a:j.isDockOpen()?j.openTransitionRate:0,c(function(){var a=[n.height(),n.width()];angular.equals(a,o)||l.trigger(f.EVENTS.RESIZE),o=a},a)},10),q=angular.element(d);q.on("resize",p),a.$on("$destroy",function(){q.off("resize",p)}),a.$on(e.PROPERTY_PANEL_OPEN,function(a,b){p(b)}),a.$on(e.PROPERTY_PANEL_CLOSE,function(a,b){p(b)}),l.addEventHandlers(),a.$on("$destroy",function(){l.removeEventHandlers()})}}}])},{"./svgMap.jade":812}],814:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-class=\"{    'unifiDevicePortDiagram--switchSfp': isSfpSupported,    'unifiDevicePortDiagram--switch8': model.get('model').substring(0, 3) === 'US8',    'unifiDevicePortDiagram--switch16': model.get('model').substring(0, 4) === 'US16',    'unifiDevicePortDiagram--switch24': model.get('model').substring(0, 4) === 'US24',    'unifiDevicePortDiagram--switch48': model.get('model').substring(0, 4) === 'US48',    'unifiDevicePortDiagram--switch16xg': model.get('model') === 'USXG'  }\" class=\"unifiDevicePortDiagram\"><div ng-repeat=\"rowLayout in rowLayouts track by $index\" ng-class=\"{      'unifiDevicePortDiagramRow--top': $index === 0,      'unifiDevicePortDiagramRow--bottom': $index === rowLayouts.length - 1    }\" class=\"unifiDevicePortDiagramRow\"><div ng-repeat=\"portConfig in rowLayout track by $index\" ng-init=\"portModel = portConfig ? model.get('port_table').get(portConfig.portNumber) : undefined\" ng-mouseenter=\"isActive = true\" ng-mouseleave=\"isActive = false\" ng-click=\"onPortClick(portModel)\" ng-class=\"{        'clickable': !isDisabled &amp;&amp; !!portModel,        'is-selected': isPortSelected({model: portModel})      }\" class=\"unifiDevicePortDiagramPort appTooltipContainer appTooltipContainer--hoverable\"><unifi-switch-port-diagram unifi-switch-port-diagram-port-model=\"portModel\" unifi-switch-port-diagram-is-spacer=\"!portModel\"></unifi-switch-port-diagram><unifi-switch-port-tooltip ng-if=\"isActive &amp;&amp; !!portModel\" unifi-switch-port-tooltip-device-model=\"model\" unifi-switch-port-tooltip-port-model=\"portModel\" unifi-switch-port-tooltip-position=\"$index &lt; rowLayout.length / 2 ? 'rightSide' : 'leftSide'\"></unifi-switch-port-tooltip></div></div></div>"),b.join("")}},{"jade/runtime":232}],815:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchDiagram",["switchUtils","DEVICE_MODELS",function(b,c){var d=function(a,c){return a.map(function(a){return a.split(" ").map(function(a){var d=parseInt(a,10);if(!isNaN(d))return{portNumber:d,portType:b.getPortTypeByNumber(c,d)}})})},e=function(a,c){var d,e=a.get("model");switch((e.match(/US[0-9]+/)||[e])[0]){case"US8":d=1;break;case"US16":case"US24":case"US48":d=2}var f=c.standard.length/d+(c.sfp.length||c.plus.length?1:0)+(c.sfp.length+c.plus.length)/d;return new Array(d).fill().map(function(a,e){return new Array(f).fill().map(function(a,f){var g=f<c.standard.length/d,h=f>c.standard.length/d,i=g?f*d+e+1:h?f*d+e+1-d:void 0;if(i)return{portNumber:i,portType:b.getPortTypeByNumber(c,i)}})})};return{scope:{model:"=unifiSwitchDiagramModel",togglePortSelection:"&unifiSwitchDiagramTogglePortSelection",isPortSelectable:"&unifiSwitchDiagramIsPortSelectable",isPortSelected:"&unifiSwitchDiagramIsPortSelected",isDisabled:"=unifiSwitchDiagramIsDisabled",highlightPort:"&?unifiSwitchDiagramHighlightPort"},replace:!0,template:a("./switchDiagram.jade")(),link:function(a){var f=c[a.model.get("model")],g=b.getPortNumbers(a.model);a.isSfpSupported=g.sfp.length+g.plus.length>0,a.rowLayouts=f.diagram?d(f.diagram,g):e(a.model,g),a.onPortClick=function(b){a.isDisabled||(a.highlightPort&&a.highlightPort({model:b,scrollToPort:!0}),a.togglePortSelection({model:b}))}}}}])},{"./switchDiagram.jade":814}],816:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiPortDiagramKeys unifiPortDiagramKeys--stacked"><div class="unifiPortDiagramKeysGroup"><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--100"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_100" class="unifiPortDiagramKeysItem__text noTextTransform"></div></div><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--1000"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_1000" class="unifiPortDiagramKeysItem__text noTextTransform"></div></div><div ng-if="isSfpPlusSupported" class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--10000"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_10000" class="unifiPortDiagramKeysItem__text noTextTransform"></div></div></div><div class="unifiPortDiagramKeysGroup"><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--disabled"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_DISABLED" class="unifiPortDiagramKeysItem__text"></div></div><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--disconnected"><div class="unifiPortDiagramKeysItem__color"></div><div translate="DEVICE_PORT_STATE_DISCONNECTED" class="unifiPortDiagramKeysItem__text"></div></div></div><div class="unifiPortDiagramKeysGroup"><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--blocking"><div class="unifiPortDiagramKeysItem__icon icon ubnt-icon--block"></div><div translate="DEVICE_PORT_STATE_STP_BLOCKING" class="unifiPortDiagramKeysItem__text"></div></div><div class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--mirror"><div class="unifiPortDiagramKeysItem__icon icon ubnt-icon--eye-fill"></div><div translate="DEVICE_PORT_STATE_MIRROR" class="unifiPortDiagramKeysItem__text"></div></div></div><div ng-if="isPoeSupported" class="unifiPortDiagramKeysGroup"><div ng-if="isPoePlusSupported" class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--poePlus"><div class="unifiPortDiagramKeysItem__icon icon ubnt-icon--plus"></div><div translate="DEVICE_PORT_STATE_POE_PLUS" class="unifiPortDiagramKeysItem__text noTextTransform"></div></div><div ng-if="(isPoeAutoSupported &amp;&amp; !isPoePlusSupported) || isPoePassthroughSupported" class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--poe"><div class="unifiPortDiagramKeysItem__icon icon ubnt-icon--lightning-bolt-fill"></div><div translate="DEVICE_PORT_STATE_POE" class="unifiPortDiagramKeysItem__text noTextTransform"></div></div><div ng-if="isPoePassive24Supported" class="unifiPortDiagramKeysItem unifiPortDiagramKeysItem--poe"><div class="unifiPortDiagramKeysItem__icon icon ubnt-icon--lightning-bolt-fill"></div><div translate="DEVICE_PORT_STATE_POE_PASSIVE" class="unifiPortDiagramKeysItem__text noTextTransform"></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],817:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchDiagramKeys",["deviceFeatureUtils","switchUtils",function(b,c){return{scope:{model:"=unifiSwitchDiagramKeysModel"},replace:!0,template:a("./switchDiagramKeys.jade")(),link:function(a){var d=a.$watch("model",function(e){if(e){var f=c.getPortNumbers(e);a.isSfpPlusSupported=f.plus.length>0,a.isPoeSupported=b.getModelFeature(e,"poe")===!0,d()}}),e=a.$watch(function(){return a.model?a.model.get("port_table"):void 0},function(b){if(b){var d=c.getDevicePoeAvailability(a.model);Object.keys(d).forEach(function(b){a[b]=d[b]}),e()}})}}}])},{"./switchDiagramKeys.jade":816}],818:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.devices=c,this.heyToasts=d,this.frame=f,this.switches=g,e.call(this,b)}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){},d.prototype.clearCounters=function(a){a.stopPropagation();var b=this.model,c=this.devices.repository.collection.get(this.model.get("device"));return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_SWITCH_PORT_CLEAR_COUNTERS_CONFIRM_TITLE",{port:b.get("port_idx"),deviceName:c.getDisplayName()})}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_SWITCH_PORT_CLEAR_COUNTERS_CONFIRM_MESSAGE",{port:b.get("port_idx"),deviceName:c.getDisplayName()})}.bind(this),options:angular.noop}).then(function(){return this.isPending=!!c.id,this.switches.clearPortCounters(c,b).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isPending=!1}.bind(this))}.bind(this))},d.$inject=["$translate","account","devices","heyToasts","frame","switches"],angular.module("app-unifi-manage").controller("SwitchPortButtonClearCountersController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],819:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="switchPortButtonClearCountersCtrl.clearCounters($event)" ng-disabled="switchPortButtonClearCountersCtrl.isPending" title="{{\'DEVICE_ACTIONS_SWITCH_PORT_CLEAR_COUNTERS\' | translate}}" unifi-fix-disabled><span ng-class="switchPortButtonClearCountersCtrl.isPending &amp;&amp; isLabeled ? \'ubnt-icon--clock-2\' : \'ubnt-icon--x-circle\'" class="button__icon icon"></span><span class="visible--lgUp">{{\'DEVICE_ACTIONS_SWITCH_PORT_CLEAR_COUNTERS\' | translate}}</span></div>'),b.join("")}},{"jade/runtime":232}],820:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPortButtonClearCounters",[function(){return{controller:"SwitchPortButtonClearCountersController",controllerAs:"switchPortButtonClearCountersCtrl",template:a("./switchPortButtonClearCounters.jade")(),replace:!0,scope:{model:"=unifiSwitchPortButtonClearCounters"},link:function(a,b,c,d){a.$watch("model",function(a){d.updateModel(a)}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./switchPortButtonClearCounters.jade":819}],821:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.devices=c,this.heyToasts=d,this.frame=f,this.switches=g,e.call(this,b)}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){},d.prototype.powerCycle=function(a){a.stopPropagation();var b=this.model,c=this.devices.repository.collection.get(this.model.get("device"));return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_SWITCH_PORT_POWER_CYCLE_CONFIRM_TITLE",{port:b.get("port_idx"),deviceName:c.getDisplayName()})}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_SWITCH_PORT_POWER_CYCLE_CONFIRM_MESSAGE",{port:b.get("port_idx"),deviceName:c.getDisplayName()})}.bind(this),options:angular.noop}).then(function(){return this.isPowerCycling=!!c.id,this.switches.powerCyclePort(c,b).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isPowerCycling=!1}.bind(this))}.bind(this))},d.$inject=["$translate","account","devices","heyToasts","frame","switches"],angular.module("app-unifi-manage").controller("SwitchPortButtonPowerCycleController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],822:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="switchPortButtonPowerCycleCtrl.powerCycle($event)" ng-disabled="switchPortButtonPowerCycleCtrl.isPowerCycling" title="{{\'DEVICE_ACTIONS_RESTART\' | translate}}" unifi-fix-disabled><span ng-class="switchPortButtonPowerCycleCtrl.isPowerCycling &amp;&amp; isLabeled ? \'ubnt-icon--clock-2\' : \'ubnt-icon--refresh-2\'" class="button__icon icon"></span><span ng-if="::isLabeled" translate="DEVICE_ACTIONS_SWITCH_PORT_POWER_CYCLE" class="visible--lgUp"></span></div>'),b.join("")}},{"jade/runtime":232}],823:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPortButtonPowerCycle",["updateModelDirectiveMixin",function(b){return{controller:"SwitchPortButtonPowerCycleController",controllerAs:"switchPortButtonPowerCycleCtrl",template:a("./switchPortButtonPowerCycle.jade")(),replace:!0,scope:{model:"=unifiSwitchPortButtonPowerCycle",isLabeled:"=unifiSwitchPortButtonPowerCycleIsLabeled"},link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./switchPortButtonPowerCycle.jade":822}],824:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-class=\"{    'unifiPortDiagramContainer--cozy': fixedSize === 'cozy',    'is-disconnected': portModel.get('enable') &amp;&amp; !portModel.get('up'),    'is-100': portModel.get('up') &amp;&amp; (portModel.get('speed') === 100 || portModel.get('speed') === 10),    'is-1000': portModel.get('up') &amp;&amp; (portModel.get('speed') === 1000),    'is-10000': portModel.get('up') &amp;&amp; (portModel.get('speed') &gt; 1000),    'is-spacer': isSpacer  }\" class=\"unifiPortDiagramContainer\"><div class=\"unifiPortDiagramPort\"><img ng-if=\"portModel &amp;&amp; portModel.get('op_mode') === 'mirror'\" src=\"images/diagrams/port-mirror.svg\" class=\"unifiPortDiagramPort__icon\"><img ng-if=\"portModel &amp;&amp; portModel.get('poe_enable')\" ng-src=\"{{isPoePlus() ? 'images/diagrams/port-poe-plus.svg' : 'images/diagrams/port-poe.svg'}}\" ng-class=\"{'is-flashing': portModel &amp;&amp; portModel.get('stp_state') === 'discarding'}\" class=\"unifiPortDiagramPort__icon\"><img ng-if=\"portModel &amp;&amp; portModel.get('stp_state') === 'discarding'\" src=\"images/diagrams/port-discarding.svg\" ng-class=\"{'is-flashing': portModel &amp;&amp; portModel.get('poe_enable')}\" class=\"unifiPortDiagramPort__icon\"><img src=\"images/diagrams/port-spacer.png\" class=\"unifiPortDiagramPort__state\"></div></div>"),b.join("")}},{"jade/runtime":232}],825:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPortDiagram",["portFeatureUtils","POE_VOLTAGE",function(b,c){return{scope:{portModel:"=unifiSwitchPortDiagramPortModel",isSpacer:"=unifiSwitchPortDiagramIsSpacer",fixedSize:"@?unifiSwitchPortDiagramFixedSize"},template:a("./switchPortDiagram.jade")(),replace:!0,link:function(a){a.POE_VOLTAGE=c,a.isPoePlus=function(){return"auto"===a.portModel.get("poe_mode")&&b.isPoePlusSupported(a.portModel)||a.portModel.get("poe_voltage")===c.POE_PLUS}}}}])},{"./switchPortDiagram.jade":824}],826:[function(a,b,c){"use strict";function d(a){this.switchUtils=a,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateDevice=function(a){this.device=a},d.prototype.onModelChange=function(){this.model?this.tooltip={index:this.switchUtils.getPortIndex(this.model),name:this.model.get("name"),status:this.switchUtils.getPortStatus(this.model),txBytes:this.model.get("tx_bytes"),rxBytes:this.model.get("rx_bytes"),poeMode:this.switchUtils.getPortPoeModeText(this.model),networksVlans:this.switchUtils.getPortNetworksVlans(this.model),downlink:this.switchUtils.getPortDownlink(this.device,this.model),uplink:this.switchUtils.getPortUplink(this.device,this.model)}:this.tooltip={}},d.$inject=["switchUtils"],angular.module("app-unifi-manage").controller("SwitchPortTooltipController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],827:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{    \'appTooltip--leftSide\': position === \'leftSide\',    \'appTooltip--rightSide\': position === \'rightSide\'  }" class="appTooltip unifiPortDiagramTooltip noPointerEvents"><div class="appDescriptionList appDescriptionList--inline"><div ng-if="switchPortTooltipCtrl.tooltip.index" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_PORT\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.index}}</dd></div><div ng-if="switchPortTooltipCtrl.tooltip.name" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_NAME\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.name}}</dd></div><div ng-if="switchPortTooltipCtrl.tooltip.status" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_STATUS\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.status}}</dd></div><div ng-if="switchPortTooltipCtrl.tooltip.txBytes" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_TX\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.txBytes | bytes}}</dd></div><div ng-if="switchPortTooltipCtrl.tooltip.rxBytes" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_RX\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.rxBytes | bytes}}</dd></div><div ng-if="switchPortTooltipCtrl.tooltip.poeMode" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_POE\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.poeMode}}</dd></div><div ng-if="switchPortTooltipCtrl.tooltip.networksVlans" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_NETWORK_VLANS\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.networksVlans}}</dd></div><div ng-if="switchPortTooltipCtrl.tooltip.downlink" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_DOWNLINK\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.downlink.getDisplayName()}}</dd></div><div ng-if="switchPortTooltipCtrl.tooltip.uplink" class="appDescriptionListRow"><dt>{{\'DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_UPLINK\' | translate}}</dt><dd>{{switchPortTooltipCtrl.tooltip.uplink.getDisplayName()}}</dd></div></div></div>'),b.join("")}},{"jade/runtime":232}],828:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPortTooltip",[function(){return{scope:{deviceModel:"=unifiSwitchPortTooltipDeviceModel",portModel:"=unifiSwitchPortTooltipPortModel",position:"=?unifiSwitchPortTooltipPosition"},controller:"SwitchPortTooltipController",controllerAs:"switchPortTooltipCtrl",template:a("./switchPortTooltip.jade")(),link:function(a,b,c,d){a.$watch("deviceModel",function(a){d.updateDevice(a)}),a.$watch("portModel",function(a){d.updateModel(a)}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./switchPortTooltip.jade":827}],829:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.binaryPrefix=a,this.DataConverter=b,this.devices=c,this.preferences=d,this.statsUtils=f,this.$stateParams=i,this.$translate=j,this.switchReports=g,this.switchUtils=h,this.TIME_INTERVALS=k,this.switchModel=this.devices.repository.collection.get(g.repository.collection.getMac()),this.interval=this.switchReports.getInterval(),this.config={margin:{left:50,top:10,bottom:30,right:50},xProperty:"time",xAxisPadding:0,xAxisTickSize:2,xAxisTickResolution:e.duration(60,"minute").asMilliseconds(),lockYAxises:!0,withDots:!1,shadedBackgroundFilter:function(a,b){var c=this.switchReports.getInterval();switch(c){case this.TIME_INTERVALS.DAILY:return Math.floor(b/6)%2;case this.TIME_INTERVALS.WEEKLY:return e(a).dayOfYear()%2;case this.TIME_INTERVALS.MONTHLY:return e(a).format("w")%2}}.bind(this)},this.config.xAxisFormat=function(a){var b=this.switchReports.getInterval();switch(b){case this.TIME_INTERVALS.DAILY:return e(a,"x").format(this.preferences.model.get("use24HourTime")?"H:mm":"hA");case this.TIME_INTERVALS.WEEKLY:return e.utc(a,"x").add(1,"day").format("dddd");case this.TIME_INTERVALS.MONTHLY:return e.utc(a,"x").add(1,"day").format("Do")}}.bind(this),this.config.left={continuous:!1,type:"plot",yAxisFormat:function(){var a;return function(b){var c=Math.floor(b).toFixed(0),d=c!==a?c:"";return a=c,d}}()},this.config.left.yProperty="rx",this.config.left.yAxisLabel=function(){return this.$translate.instant("SWITCH_PORT_USAGE_RX_AXIS_LABEL",{prefix:this.units.rx})}.bind(this),this.config.right=angular.copy(this.config.left),this.config.right.yProperty="tx",this.config.right.yAxisLabel=function(){return this.$translate.instant("SWITCH_PORT_USAGE_TX_AXIS_LABEL",{prefix:this.units.tx})}.bind(this),this.txKey="port_"+this.port.get("port_idx")+"-tx_bytes",this.rxKey="port_"+this.port.get("port_idx")+"-rx_bytes",this.dataConverter=(new this.DataConverter).sortedBy("time").withMap({rx:this.rxKey,tx:this.txKey,time:"time"},!1).withBinaryNormalization(["time"],!0),this.collectData()}var e=a("moment");d.prototype.tooltipShownCallback=function(a){this.focusedDataTime=a?a.time:void 0},d.prototype.isNumber=angular.isNumber,d.prototype.parseBytes=function(a){return this.binaryPrefix.parse(a)},d.prototype.getFocusedData=function(){if(this.data&&this.focusedDataTime)return this.data.find(function(a){return a.time===this.focusedDataTime},this)},d.prototype.addEventHandlers=function(){this.switchReports.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.switchReports.repository.collection.off("sync",this.collectData,this)},d.prototype.collectData=function(){this.data=this.dataConverter.process(this.switchReports.repository.collection.toJSON()),this.units=this.dataConverter.units,this.updateConfig()},d.prototype.updateConfig=function(){var a=this.switchReports.getInterval(),b=this.switchReports.getStart(),c=this.switchReports.getEnd();this.start=b,this.end=c,this.config.xAxisTickResolution=a.grain,this.config.xScaleDomain=[b,c]},d.prototype.normalizeTime=function(a){var b=a;return[this.TIME_INTERVALS.WEEKLY,this.TIME_INTERVALS.MONTHLY].indexOf(this.switchReports.getInterval())!==-1&&(b=e(a).add(1,"day").subtract(1,"second").startOf("day").valueOf()),b},d.$inject=["binaryPrefix","DataConverter","devices","preferences","statsUtils","switchReports","switchUtils","$stateParams","$translate","TIME_INTERVALS"],angular.module("app-unifi-manage").controller("SwitchPortUsageController",d)},{moment:238}],830:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSwitchPortUsage"><div class="appSubHeading appSubHeading--standalone">{{::switchPortUsageCtrl.port.get(\'name\')}}</div><unifi-line-chart-with-tooltip unifi-line-chart-with-tooltip-config="switchPortUsageCtrl.config" unifi-line-chart-with-tooltip-data="switchPortUsageCtrl.data" unifi-line-chart-with-tooltip-callback="switchPortUsageCtrl.tooltipShownCallback(data)" class="unifiSwitchPortUsageGraph"><div class="unifiChartTooltipHeader verticalRhythmQuarter">{{switchPortUsageCtrl.getFocusedData().time | moment: \'format\': \'datetime\'}}</div><div class="unifiChartTooltipBody"><div ng-if="!switchPortUsageCtrl.isNumber(switchPortUsageCtrl.getFocusedData().rx) &amp;&amp; !switchPortUsageCtrl.isNumber(switchPortUsageCtrl.getFocusedData().tx)" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--noBorder"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p class="noMarginBottom">{{\'SWITCH_PORT_USAGE_NO_DATA_AVAILABLE\' | translate}}</p></div></div></div><div ng-if="switchPortUsageCtrl.isNumber(switchPortUsageCtrl.getFocusedData().raw.rx)" class="verticalRhythmTopQuarter"><div class="unifiChartTooltipBody__title">{{\'SWITCH_PORT_USAGE_RX\' | translate}}</div></div><div ng-if="switchPortUsageCtrl.isNumber(switchPortUsageCtrl.getFocusedData().raw.rx)" class="noPadding"><div class="unifiChartTooltipBody__number down"><strong>{{switchPortUsageCtrl.getFocusedData().raw.rx | bytes}}</strong></div></div><div ng-if="switchPortUsageCtrl.isNumber(switchPortUsageCtrl.getFocusedData().raw.tx)" class="verticalRhythmTopQuarter"><div class="unifiChartTooltipBody__title">{{\'SWITCH_PORT_USAGE_TX\' | translate}}</div></div><div ng-if="switchPortUsageCtrl.isNumber(switchPortUsageCtrl.getFocusedData().raw.tx)" class="noPadding"><div class="unifiChartTooltipBody__number up"><strong>{{switchPortUsageCtrl.getFocusedData().raw.tx | bytes}}</strong></div></div></div></unifi-line-chart-with-tooltip></div>'),b.join("")}},{"jade/runtime":232}],831:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPortUsage",[function(){return{controller:"SwitchPortUsageController",controllerAs:"switchPortUsageCtrl",template:a("./switchPortUsage.jade")(),replace:!0,bindToController:!0,scope:{port:"=unifiSwitchPortUsagePort",device:"=unifiSwitchPortUsageDevice"},link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./switchPortUsage.jade":830}],832:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q){g(this),this.$timeout=b,this.deviceFeatureUtils=f,this.devices=h,this.deviceStateUtils=i,this.deviceUplinkUtils=j,this.networks=l,this.switches=n,this.switchUtils=o,this.DEVICE_STATES=p,this.DEVICE_MODELS=q,this.isSaveQueued=!0,this.modelChangeEvent="change change:port_table[*]",this.accordions={details:{overview:!0},configure:{general:!0}},this.validators={warnings:void 0},e.call(this,a,b,c,m,d,k)}var e=a("../../controllers/BasePropertiesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.resolve=function(){return this.$q.all([this.networks.repository.register().fetch(),this.switches.repository.register().fetch()])},d.prototype.destroy=function(){this.networks.repository.unregister(),this.switches.repository.unregister()},d.prototype.reset=function(){this.deviceState=void 0,this.deviceStatus=void 0,this.hasSfpPorts=void 0,this.uplink=void 0,this.uplinkAttrs={},this.uplinkName="",this.totalPower=0,this.isSimpleFan=!1,this.fanOnLevel=void 0,this.isPoeSupported=void 0,this.hasUplink=!1,this.hasDownlinks=!1,this.showUsersTab=!1,this.showGuestsTab=!1,this.showPortsTab=!1,this.showConfigureTab=!1,this.showAdoptTab=!1,this.showDownlinksAccordion=!1,this.showTerminalAccordion=!1},d.prototype.onModelChange=function(){if(this.persistAdoptTab=this.showAdoptTab&&this.deviceStateUtils.getRawDeviceState(this.model)===this.DEVICE_STATES.ADOPTING,this.reset(),this.model){this.deviceState=this.deviceStateUtils.getDeviceState(this.model),this.deviceStatus=this.deviceStateUtils.getDeviceStatus(this.model);var a=this.switchUtils.getPortNumbers(this.model);this.hasSfpPorts=a.sfp.length+a.plus.length>0,(this.uplinkAttrs=this.deviceUplinkUtils.getUplinkAttrs(this.model))&&(this.uplink=this.deviceUplinkUtils.getUplink(this.model),this.uplinkName=this.deviceUplinkUtils.getUplinkDisplayName(this.model)),this.totalPower=this.switchUtils.getTotalPower(this.model),this.isSimpleFan=this.deviceFeatureUtils.isSimpleFan(this.model),this.fanOnLevel=this.deviceFeatureUtils.getFanOnLevel(this.model),this.isPoeSupported=this.deviceFeatureUtils.getModelFeature(this.model,"poe")===!0,this.hasUplink=angular.isObject(this.model.get("uplink"))&&!angular.equals({},this.model.get("uplink")),this.hasDownlinks=this.model.get("downlink_table")&&this.model.get("downlink_table").length>0,this.showUsersTab="success"===this.deviceStatus,this.showGuestsTab="success"===this.deviceStatus,this.showPortsTab=this.model.get("adopted"),this.showPortsDiagram=this.showPortsTab&&this.model.get("port_table")&&this.model.get("port_table").length,this.showConfigureTab=this.model.get("adopted"),this.showAdoptTab=this.persistAdoptTab||this.deviceState===this.DEVICE_STATES.ADOPTION_FAILED||this.deviceState===this.DEVICE_STATES.MANAGED_BY_OTHER,this.showDownlinksAccordion="success"===this.deviceStatus,this.showTerminalAccordion=this.deviceFeatureUtils.isTerminalSupported(this.model)&&(this.deviceState===this.DEVICE_STATES.CONNECTED||this.deviceState===this.DEVICE_STATES.PROVISIONING)}},d.$inject=["$q","$timeout","$translate","account","deviceFeatureUtils","devicePropertiesPortsControllerMixin","devices","deviceStateUtils","deviceUplinkUtils","frame","networks","propertyPanel","switches","switchUtils","DEVICE_STATES","DEVICE_MODELS"],angular.module("app-unifi-manage").controller("SwitchPropertiesController",d)},{"../../controllers/BasePropertiesController":1001}],833:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-collapsed\': switchPropertiesCtrl.isCollapsed()}" ng-if="switchPropertiesCtrl.model" class="unifiPanelItem switchProperties"><unifi-loading-status unifi-loading-status-is-loading="switchPropertiesCtrl.isLoading" unifi-loading-status-failed="switchPropertiesCtrl.failedToLoad" unifi-loading-status-retry="switchPropertiesCtrl.init()"></unifi-loading-status><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__collapseToggle"><div ng-click="switchPropertiesCtrl.toggleCollapsed()" class="appActionIcon"><span ng-class="{            \'unifi-icon--default-collapse\': !switchPropertiesCtrl.isCollapsed(),            \'unifi-icon--default-expand\': switchPropertiesCtrl.isCollapsed()          }" class="button__icon icon"></span></div></div><div class="unifiPanelItemHeader__avatar"><div unifi-device-icon="::switchPropertiesCtrl.model"></div></div><div class="unifiPanelItemHeader__title"><span unifi-device-status="::switchPropertiesCtrl.model" unifi-device-status-is-cozy="true" unifi-device-status-is-truncated="true" unifi-device-status-with-icons="true" unifi-device-status-label="switchPropertiesCtrl.model.getDisplayName()"></span><div class="unifiPanelItemHeader__status"><span unifi-device-status-badge="::switchPropertiesCtrl.model"></span></div></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div unifi-device-button-adopt="::switchPropertiesCtrl.model" unifi-device-button-adopt-collection="::switchPropertiesCtrl.devices.repository.collection" unifi-device-button-adopt-is-reverse="true" class="appActionIcon appActionIcon--primary appActionIcon--reverse appActionIcon--round"></div><div unifi-device-button-restart="::switchPropertiesCtrl.model" unifi-device-button-restart-with-hard-reboot="switchPropertiesCtrl.isPoeSupported" class="appActionIcon"></div><div unifi-device-button-locate="::switchPropertiesCtrl.model" unifi-device-button-locate-with-map="true" class="appActionIcon"></div><div unifi-device-button-upgrade="::switchPropertiesCtrl.model" class="appActionIcon"></div><div ng-click="switchPropertiesCtrl.toggleUndocked()" title="{{switchPropertiesCtrl.isUndocked() ? \'COMMON_PROPERTY_PANEL_ITEM_DOCK\' : \'COMMON_PROPERTY_PANEL_ITEM_UNDOCK\' | translate}}" class="appActionIcon visible--mdUp"><span ng-class="{              \'ubnt-icon--header-maximize\': !switchPropertiesCtrl.isUndocked(),              \'ubnt-icon--header-minimize\': switchPropertiesCtrl.isUndocked()            }" class="button__icon icon"></span></div><div ng-click="switchPropertiesCtrl.removePanel()" title="{{\'COMMON_PROPERTY_PANEL_ITEM_REMOVE\' | translate}}" class="appActionIcon removePanelItem"><span class="button__icon icon unifi-icon--default-close"></span></div></div></div></div><div class="unifiPanelItemBody"><div class="unifiPanelItemBodySection"><div unifi-device-properties-license-warning="::switchPropertiesCtrl.model" class="unifiDevicePropertiesLicenseWarning"></div></div><div ng-if="switchPropertiesCtrl.showPortsDiagram" class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><unifi-switch-diagram unifi-switch-diagram-model="::switchPropertiesCtrl.model" unifi-switch-diagram-toggle-port-selection="switchPropertiesCtrl.togglePortSelection(model, isSelected)" unifi-switch-diagram-is-port-selectable="switchPropertiesCtrl.isPortSelectable(model)" unifi-switch-diagram-is-port-selected="switchPropertiesCtrl.isPortSelected(model)" unifi-switch-diagram-is-disabled="switchPropertiesCtrl.isEditingPorts" unifi-switch-diagram-highlight-port="switchPropertiesCtrl.highlightPort(model, scrollToPort)"></unifi-switch-diagram><unifi-switch-diagram-keys unifi-switch-diagram-keys-model="::switchPropertiesCtrl.model"></unifi-switch-diagram-keys></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><ul class="appTabs appTabs--compressed appTabs--alignLeft"><li ng-click="switchPropertiesCtrl.setActiveTab(\'details\')" ng-class="{            \'is-tab-selected\': switchPropertiesCtrl.getActiveTab() === \'details\',            \'is-tab-loading\': switchPropertiesCtrl.loadingTab === \'details\'          }" translate="DEVICE_PROPERTIES_TAB_DETAILS" class="tabs__item details"></li><li ng-if="switchPropertiesCtrl.showUsersTab" ng-click="switchPropertiesCtrl.setActiveTab(\'users\')" ng-class="{            \'is-tab-selected\': switchPropertiesCtrl.getActiveTab() === \'users\',            \'is-tab-loading\': switchPropertiesCtrl.loadingTab === \'users\'          }" translate="DEVICE_PROPERTIES_TAB_USERS" class="tabs__item users"></li><li ng-if="switchPropertiesCtrl.showGuestsTab" ng-click="switchPropertiesCtrl.setActiveTab(\'guests\')" ng-class="{            \'is-tab-selected\': switchPropertiesCtrl.getActiveTab() === \'guests\',            \'is-tab-loading\': switchPropertiesCtrl.loadingTab === \'guests\'          }" translate="DEVICE_PROPERTIES_TAB_GUESTS" class="tabs__item guests"></li><li ng-if="switchPropertiesCtrl.showPortsTab" ng-click="switchPropertiesCtrl.setActiveTab(\'ports\')" ng-class="{            \'is-tab-selected\': switchPropertiesCtrl.getActiveTab() === \'ports\',            \'is-tab-loading\': switchPropertiesCtrl.loadingTab === \'ports\'          }" translate="DEVICE_PROPERTIES_TAB_PORTS" class="tabs__item ports"></li><li ng-if="switchPropertiesCtrl.showConfigureTab" ng-click="switchPropertiesCtrl.setActiveTab(\'configure\')" ng-class="{            \'is-tab-selected\': switchPropertiesCtrl.getActiveTab() === \'configure\',            \'is-tab-loading\': switchPropertiesCtrl.loadingTab === \'configure\'          }" translate="DEVICE_PROPERTIES_TAB_CONFIGURATION" class="tabs__item configure"></li><li unifi-if-role-admin unifi-if-role-admin-and="switchPropertiesCtrl.showAdoptTab" ng-click="switchPropertiesCtrl.setActiveTab(\'adopt\')" ng-class="{            \'is-tab-selected\': switchPropertiesCtrl.getActiveTab() === \'adopt\',            \'is-tab-loading\': switchPropertiesCtrl.loadingTab === \'adopt\'          }" translate="DEVICE_PROPERTIES_TAB_ADOPT" class="tabs__item adopt"></li></ul></div><div ng-attr-id="switchPropertiesContent{{::directiveId}}" scroll-container class="unifiPanelItemBodySection unifiPanelItemBodySection--flexible"><div class="unifiPanelItemContent"><div ng-if="switchPropertiesCtrl.isTabAvailable(\'details\') &amp;&amp; switchPropertiesCtrl.getActiveTab() === \'details\'" unifi-switch-properties-details class="switchPropertiesDetails"></div><div ng-if="switchPropertiesCtrl.showUsersTab &amp;&amp; switchPropertiesCtrl.isTabAvailable(\'users\') &amp;&amp; switchPropertiesCtrl.getActiveTab() === \'users\'" class="switchPropertiesUsers"><unifi-device-properties-client-list unifi-device-properties-client-list-local-state="true" unifi-device-properties-client-list-local-state-key="::switchPropertiesCtrl.model.get(\'mac\') + \'|users\'" unifi-device-properties-client-list-device="::switchPropertiesCtrl.model" unifi-device-properties-client-list-is-guest="false"></unifi-device-properties-client-list></div><div ng-if="switchPropertiesCtrl.showGuestsTab &amp;&amp; switchPropertiesCtrl.isTabAvailable(\'guests\') &amp;&amp; switchPropertiesCtrl.getActiveTab() === \'guests\'" class="switchPropertiesGuests"><unifi-device-properties-client-list unifi-device-properties-client-list-local-state="true" unifi-device-properties-client-list-local-state-key="::switchPropertiesCtrl.model.get(\'mac\') + \'|guests\'" unifi-device-properties-client-list-device="::switchPropertiesCtrl.model" unifi-device-properties-client-list-is-guest="true"></unifi-device-properties-client-list></div><div ng-if="switchPropertiesCtrl.showPortsTab &amp;&amp; switchPropertiesCtrl.isTabAvailable(\'ports\')" ng-show="switchPropertiesCtrl.getActiveTab() === \'ports\'" class="switchPropertiesPorts"><unifi-switch-properties-port-list unifi-switch-properties-port-list-model="::switchPropertiesCtrl.model" unifi-switch-properties-port-list-collection="switchPropertiesCtrl.model.get(\'port_table\')" unifi-switch-properties-port-list-toggle-port-selection="switchPropertiesCtrl.togglePortSelection(model, isSelected)" unifi-switch-properties-port-list-is-port-selectable="switchPropertiesCtrl.isPortSelectable(model)" unifi-switch-properties-port-list-is-port-selected="switchPropertiesCtrl.isPortSelected(model)" unifi-switch-properties-port-list-is-editing-ports="switchPropertiesCtrl.isEditingPorts" unifi-switch-properties-port-list-highlighted-port="switchPropertiesCtrl.highlightedPort" unifi-switch-properties-port-list-edited-port="switchPropertiesCtrl.editedPort" unifi-switch-properties-port-list-with-batch-edit="true" unifi-switch-properties-port-list-is-open="true"></unifi-switch-properties-port-list></div><div ng-if="switchPropertiesCtrl.showConfigureTab &amp;&amp; switchPropertiesCtrl.isTabAvailable(\'configure\')" ng-show="switchPropertiesCtrl.getActiveTab() === \'configure\'" unifi-switch-properties-configure class="switchPropertiesConfigure"></div><div unifi-if-role-admin unifi-if-role-admin-and="switchPropertiesCtrl.showAdoptTab &amp;&amp; switchPropertiesCtrl.isTabAvailable(\'adopt\')" ng-show="switchPropertiesCtrl.getActiveTab() === \'adopt\'" unifi-device-properties-adopt="::switchPropertiesCtrl.model" class="switchPropertiesAdopt"></div></div></div><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static unifiPanelItemBodySection--pending"><unifi-pending-changes-list unifi-pending-changes-list-model="::switchPropertiesCtrl.model" unifi-pending-changes-list-save="applyPendingChanges(model)"></unifi-pending-changes-list></div></div></div>'),b.join("")}},{"jade/runtime":232}],834:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchProperties",["updateModelDirectiveMixin","devicePropertiesPortsDirectiveMixin","devicePropertiesPendingActionsDirectiveMixin",function(b,c,d){return{scope:{model:"=unifiSwitchProperties"},controller:"SwitchPropertiesController",controllerAs:"switchPropertiesCtrl",template:a("./switchProperties.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.$on("$destroy",function(){g.destroy(),g.removeEventHandlers()}),b.init(a,e,f,g,!0),c.init(a,e,f,g),d.init(a,e,f,g)}}}])},{"./switchProperties.jade":833}],835:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><div unifi-initialize-when="!switchPropertiesCtrl.isLoading" unifi-device-properties-configure-warnings="::switchPropertiesCtrl.model" unifi-device-properties-configure-warnings-validator="switchPropertiesCtrl.validators.warnings" class="switchPropertiesConfigureWarnings"></div><accordion-group is-open="switchPropertiesCtrl.accordions.configure.general" class="unifiPanelItemContent__section general"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::switchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="switchPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers="!switchPropertiesCtrl.accordions.configure.general" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-general="::switchPropertiesCtrl.model" unifi-device-properties-configure-general-is-open="switchPropertiesCtrl.accordions.configure.general" unifi-device-properties-configure-general-is-read-only="!switchPropertiesCtrl.isAdmin()" unifi-device-properties-configure-general-is-save-queued="false" unifi-device-properties-configure-general-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_GENERAL" class="switchPropertiesConfigureGeneral"></div></div></accordion-group><accordion-group is-open="switchPropertiesCtrl.accordions.configure.networksVlans" class="unifiPanelItemContent__section networksVlans"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORKS_VLANS\' | translate}}</accordion-heading><div unifi-initialize-when="switchPropertiesCtrl.accordions.configure.networksVlans" unifi-pause-children-watchers="!switchPropertiesCtrl.accordions.configure.networksVlans" unifi-pause-children-watchers-and-create-scope><unifi-switch-properties-networks-vlans-list unifi-switch-properties-networks-vlans-list-local-state="true" unifi-switch-properties-networks-vlans-list-local-state-key="::switchPropertiesCtrl.model.get(\'mac\') + \'|networks-vlans\'" unifi-switch-properties-networks-vlans-list-collection="switchPropertiesCtrl.switches.repository.collection" unifi-switch-properties-networks-vlans-list-is-open="switchPropertiesCtrl.accordions.configure.networksVlans"></unifi-switch-properties-networks-vlans-list></div></accordion-group><accordion-group is-open="switchPropertiesCtrl.accordions.configure.services" class="unifiPanelItemContent__section services"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_SERVICES\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::switchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_SERVICES" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="switchPropertiesCtrl.accordions.configure.services" unifi-pause-children-watchers="!switchPropertiesCtrl.accordions.configure.services" unifi-pause-children-watchers-and-create-scope><div unifi-switch-properties-configure-services="::switchPropertiesCtrl.model" unifi-switch-properties-configure-services-is-open="switchPropertiesCtrl.accordions.configure.services" unifi-switch-properties-configure-services-is-read-only="!switchPropertiesCtrl.isAdmin()" unifi-switch-properties-configure-services-is-save-queued="switchPropertiesCtrl.isSaveQueued" unifi-switch-properties-configure-services-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_SERVICES" class="switchPropertiesConfigureServices"></div></div></accordion-group><accordion-group is-open="switchPropertiesCtrl.accordions.configure.network" class="unifiPanelItemContent__section network"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK\' | translate}}<unifi-pending-changes-icon unifi-pending-changes-icon-model="::switchPropertiesCtrl.model" unifi-pending-changes-icon-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK" class="unifiPanelItemContentSection__titleIcon"></unifi-pending-changes-icon></accordion-heading><div unifi-initialize-when="switchPropertiesCtrl.accordions.configure.network" unifi-pause-children-watchers="!switchPropertiesCtrl.accordions.configure.network" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-network="::switchPropertiesCtrl.model" unifi-device-properties-configure-network-is-open="switchPropertiesCtrl.accordions.configure.network" unifi-device-properties-configure-network-is-read-only="!switchPropertiesCtrl.isAdmin()" unifi-device-properties-configure-network-is-save-queued="switchPropertiesCtrl.isSaveQueued" unifi-device-properties-configure-network-group="DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORK" unifi-device-properties-configure-network-validator="switchPropertiesCtrl.validators.warnings" class="switchPropertiesConfigureNetwork"></div></div></accordion-group><accordion-group ng-if="switchPropertiesCtrl.isAdmin()" is-open="switchPropertiesCtrl.accordions.configure.manage" class="unifiPanelItemContent__section manage"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_MANAGE_DEVICE\' | translate}}</accordion-heading><div unifi-initialize-when="switchPropertiesCtrl.accordions.configure.manage" unifi-pause-children-watchers="!switchPropertiesCtrl.accordions.configure.manage" unifi-pause-children-watchers-and-create-scope><div class="unifiPanelItemContentSection__subsection copy"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_COPY\' | translate}}</div></div></div><div unifi-switch-properties-copy-configuration="::switchPropertiesCtrl.model" unifi-switch-properties-copy-configuration-is-open="switchPropertiesCtrl.accordions.configure.manage" class="switchPropertiesConfigureCopy"></div></div><div class="unifiPanelItemContentSection__subsection upgrade"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_CUSTOM_UPGRADE\' | translate}}</div></div></div><div unifi-device-properties-configure-custom-upgrade="::switchPropertiesCtrl.model" unifi-device-properties-configure-custom-upgrade-is-open="switchPropertiesCtrl.accordions.configure.manage" class="switchPropertiesConfigureCustomUpgrade"></div></div><div class="unifiPanelItemContentSection__subsection forget"><div class="panelHeading"><div class="panelTitle"><div>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_FORGET\' | translate}}</div></div></div><div unifi-device-properties-configure-forget="::switchPropertiesCtrl.model" unifi-device-properties-configure-forget-is-open="switchPropertiesCtrl.accordions.configure.manage" class="switchPropertiesConfigureForget"></div></div></div></accordion-group><accordion-group ng-if="switchPropertiesCtrl.isAdmin() &amp;&amp; switchPropertiesCtrl.showTerminalAccordion" is-open="switchPropertiesCtrl.accordions.configure.terminal" class="unifiPanelItemContent__section debugTerminal visible--desktop"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_CONFIGURE_DEBUG_TERMINAL\' | translate}}</accordion-heading><div unifi-initialize-when="switchPropertiesCtrl.accordions.configure.terminal" unifi-pause-children-watchers="!switchPropertiesCtrl.accordions.configure.terminal" unifi-pause-children-watchers-and-create-scope><div unifi-device-properties-configure-debug-terminal="::switchPropertiesCtrl.model" unifi-device-properties-configure-debug-terminal-is-open="switchPropertiesCtrl.accordions.configure.terminal" unifi-pause-children-watchers="!switchPropertiesCtrl.accordions.configure.terminal" class="switchPropertiesConfigureDebugTerminal"></div></div></accordion-group></accordion>'),
b.join("")}},{"jade/runtime":232}],836:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesConfigure",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiSwitchProperties",template:a("./switchPropertiesConfigure.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"configure")}}}])},{"./switchPropertiesConfigure.jade":835}],837:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.SPANNING_TREE_PRIORITIES=i,this.radiusAuthServerMin=1,this.radiusAuthServerMax=2,this.radiusAcctServerMin=0,this.radiusAcctServerMax=2,e.call(this,a,b,c,d,f,g,h)}var e=a("../../controllers/BaseConfigureServicesController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getAttrsToSave=function(){var a={jumboframe_enabled:this.modelCopy.attributes.jumboframe_enabled,flowctrl_enabled:this.modelCopy.attributes.flowctrl_enabled,mgmt_network_id:this.mgmtNetworkId,stp_version:this.modelCopy.attributes.stp_version,stp_priority:this.modelCopy.attributes.stp_priority,dot1x_portctrl_enabled:this.modelCopy.attributes.dot1x_portctrl_enabled};return this.modelCopy.attributes.dot1x_portctrl_enabled&&(a.dot1x_dyvlan_enabled=this.modelCopy.attributes.dot1x_dyvlan_enabled,a.radiusprofile_id=this.modelCopy.attributes.radiusprofile_id),a},d.$inject=["$translate","deviceUtils","heyToasts","networks","networkUtils","modelDivergence","apiResults","SPANNING_TREE_PRIORITIES"],angular.module("app-unifi-manage").controller("SwitchPropertiesConfigureServicesController",d)},{"../../controllers/BaseConfigureServicesController":998}],838:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="switchPropertiesConfigureServicesCtrl.form" ng-class="{    \'is-form-validation-visible\': switchPropertiesConfigureServicesCtrl.showValidation,    \'is-validation-hidden\': !switchPropertiesConfigureServicesCtrl.showValidation  }" ng-submit="switchPropertiesConfigureServicesCtrl.form.$valid &amp;&amp; switchPropertiesConfigureServicesCtrl.save()" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="switchPropertiesConfigureServicesCtrl.resolveDivergence()" unifi-config-changed-on-ignore="switchPropertiesConfigureServicesCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; switchPropertiesConfigureServicesCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_MGMT_VLAN" class="appLabel--primary"></label><select name="networkVlanNativeNetwork" ng-model="switchPropertiesConfigureServicesCtrl.mgmtNetworkId" ng-model-master="switchPropertiesConfigureServicesCtrl.mgmtNetworkIdMaster" ng-options="network.id as network.get(\'name\') for network in switchPropertiesConfigureServicesCtrl.nativeNetworks" class="select--full"></select></div><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="enableJumboFrame" id="servicesJumboFrame{{::directiveId}}" ng-model="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.jumboframe_enabled" ng-model-master="switchPropertiesConfigureServicesCtrl.model.attributes.jumboframe_enabled"><label for="servicesJumboFrame{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_JUMBO_FRAME"></label></div><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="enableFlowControl" id="servicesFlowControl{{::directiveId}}" ng-model="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.flowctrl_enabled" ng-model-master="switchPropertiesConfigureServicesCtrl.model.attributes.flowctrl_enabled"><label for="servicesFlowControl{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_FLOW_CONTROL"></label></div><div class="appFormGroup appFormGroup--condensed verticalRhythmTop--cozy"><label translate="DEVICE_PROPERTIES_LABEL_SPANNING_TREE" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><input type="radio" name="spanningTree" id="spanningTreeRstp{{::directiveId}}" ng-model="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.stp_version" ng-model-master="switchPropertiesConfigureServicesCtrl.model.attributes.stp_version" value="rstp"><label for="spanningTreeRstp{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_SPANNING_TREE_RSTP"></label><input type="radio" name="spanningTree" id="spanningTreeStp{{::directiveId}}" ng-model="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.stp_version" ng-model-master="switchPropertiesConfigureServicesCtrl.model.attributes.stp_version" value="stp"><label for="spanningTreeStp{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_SPANNING_TREE_STP"></label><input type="radio" name="spanningTree" id="spanningTreeDisabled{{::directiveId}}" ng-model="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.stp_version" ng-model-master="switchPropertiesConfigureServicesCtrl.model.attributes.stp_version" value="disabled"><label for="spanningTreeDisabled{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_SPANNING_TREE_DISABLED"></label></div></div><div ng-show="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.stp_version !== \'disabled\'" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_PRIORITY" class="appLabel--primary"></label><div class="flexRow noMarginBottom"><div class="flexCol--6"><select name="radioChannel{{radioType}}" ng-model="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.stp_priority" ng-model-master="switchPropertiesConfigureServicesCtrl.model.attributes.stp_priority" ng-options="priority for priority in switchPropertiesConfigureServicesCtrl.SPANNING_TREE_PRIORITIES track by priority" class="select--full"></select></div></div></div><div class="appInputGroup appInputGroup--cozy verticalRhythmTop--cozy"><input type="checkbox" name="enable8021xControl" id="services8021xControl{{::directiveId}}" ng-model="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.dot1x_portctrl_enabled" ng-model-master="switchPropertiesConfigureServicesCtrl.model.attributes.dot1x_portctrl_enabled"><label for="services8021xControl{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_8021X_CONTROL"></label></div><div unifi-feature-flag-disable="withRadiusProfilesEndpoint" unifi-feature-flag-and="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.dot1x_portctrl_enabled" class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="enableRadiusVlan" id="servicesRadiusVlan{{::directiveId}}" ng-model="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.dot1x_dyvlan_enabled" ng-model-master="switchPropertiesConfigureServicesCtrl.model.attributes.dot1x_dyvlan_enabled"><label for="servicesRadiusVlan{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_RADIUS_VLAN"></label></div><div unifi-feature-flag-enable="withRadiusProfilesEndpoint" unifi-feature-flag-and="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.dot1x_portctrl_enabled" class="appFormGroup appFormGroup--condensed verticalRhythmTop--cozy"><label translate="DEVICE_PROPERTIES_LABEL_RADIUS_PROFILE" class="appLabel--primary"></label><unifi-radius-selector unifi-radius-selector-radius-profile-id="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.radiusprofile_id" unifi-radius-selector-is-required="true"></unifi-radius-selector></div><div unifi-feature-flag-disable="withRadiusProfilesEndpoint" unifi-feature-flag-and="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.dot1x_portctrl_enabled" class="appFormGroup appFormGroup--condensed verticalRhythmTop--cozy"><label translate="DEVICE_PROPERTIES_LABEL_RADIUS_AUTH_SERVER" class="appLabel--primary"></label><unifi-legacy-radius-auth-server-form-group unifi-legacy-radius-auth-server-form-group-model="switchPropertiesConfigureServicesCtrl.modelCopy" unifi-legacy-radius-auth-server-form-group-min="switchPropertiesConfigureServicesCtrl.radiusAuthServerMin" unifi-legacy-radius-auth-server-form-group-max="switchPropertiesConfigureServicesCtrl.radiusAuthServerMax" unifi-legacy-radius-auth-server-form-group-is-required="switchPropertiesConfigureServicesCtrl.modelCopy &amp;&amp; switchPropertiesConfigureServicesCtrl.modelCopy.attributes.dot1x_portctrl_enabled" unifi-legacy-radius-auth-server-form-group-is-read-only="isReadOnly"></unifi-legacy-radius-auth-server-form-group></div><div unifi-feature-flag-disable="withRadiusProfilesEndpoint" unifi-feature-flag-and="switchPropertiesConfigureServicesCtrl.modelCopy.attributes.dot1x_portctrl_enabled" class="appFormGroup appFormGroup--condensed verticalRhythmTop--cozy"><label translate="DEVICE_PROPERTIES_LABEL_RADIUS_ACCOUNTING_SERVER" class="appLabel--primary"></label><unifi-legacy-radius-acct-server-form-group unifi-legacy-radius-acct-server-form-group-model="switchPropertiesConfigureServicesCtrl.modelCopy" unifi-legacy-radius-acct-server-form-group-min="switchPropertiesConfigureServicesCtrl.radiusAcctServerMin" unifi-legacy-radius-acct-server-form-group-max="switchPropertiesConfigureServicesCtrl.radiusAcctServerMax" unifi-legacy-radius-acct-server-form-group-is-required="switchPropertiesConfigureServicesCtrl.modelCopy &amp;&amp; switchPropertiesConfigureServicesCtrl.modelCopy.attributes.dot1x_portctrl_enabled" unifi-legacy-radius-acct-server-form-group-is-read-only="isReadOnly"></unifi-legacy-radius-acct-server-form-group></div></fieldset><div ng-if="!isReadOnly" class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="switchPropertiesConfigureServicesCtrl.showValidation = true" busy-toggle="switchPropertiesConfigureServicesCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{switchPropertiesConfigureServicesCtrl.isSaveQueued ? \'COMMON_ACTIONS_QUEUE_CHANGES\' : \'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-click="switchPropertiesConfigureServicesCtrl.reset()" ng-disabled="switchPropertiesConfigureServicesCtrl.form.$pristine" class="appMainButton appMainButton--transparent appMainButton--condensed resetForm">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],839:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesConfigureServices",["updateModelDirectiveMixin","devicePropertiesConfigureWithPendingDirectiveMixin","EVENTS",function(b,c,d){return{scope:{model:"=unifiSwitchPropertiesConfigureServices",isOpen:"=unifiSwitchPropertiesConfigureServicesIsOpen",isReadOnly:"=unifiSwitchPropertiesConfigureServicesIsReadOnly",isSaveQueued:"=unifiSwitchPropertiesConfigureServicesIsSaveQueued",group:"@unifiSwitchPropertiesConfigureServicesGroup"},controller:"SwitchPropertiesConfigureServicesController",controllerAs:"switchPropertiesConfigureServicesCtrl",template:a("./switchPropertiesConfigureServices.jade")(),link:function(a,e,f,g){a.directiveId=a.$id,a.$on("$destroy",function(){g.removeEventHandlers()}),b.init(a,e,f,g,!0),c.init(a,e,f,g),a.$on([d.PENDING_CHANGES_CANCELLED,a.group].join(":"),function(){a.$broadcast(d.SYNC_REPEATABLE_COUNT)}),a.$on(d.PENDING_CHANGES_CANCELLED,function(){a.$broadcast(d.SYNC_REPEATABLE_COUNT)})}}}])},{"./switchPropertiesConfigureServices.jade":838}],840:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.devices=a,this.deviceUtils=b,this.frame=c,this.$q=d,this.$translate=f,this.heyToasts=g,this.compatibilityMap={US24:["US24P250","US24P500"],US24P250:["US24","US24P500"],US24P500:["US24","US24P250"],US48:["US48P500","US48P750"],US48P500:["US48","US48P750"],US48P750:["US48","US48P500"]},this.sourceFilter=this.sourceFilter.bind(this),e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.copy=function(){return this.sourceModel?this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_COPY_CONFIRM_TITLE",{deviceName:this.sourceModel.getDisplayName()})}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_COPY_CONFIRM_MESSAGE",{deviceName:this.sourceModel.getDisplayName()})}.bind(this),options:angular.noop}).then(function(){return this.deviceUtils.copyConfig(this.model,this.sourceModel).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))}.bind(this)):this.$q.reject()},d.prototype.sourceFilter=function(a){if("usw"===a.get("type")&&a.get("mac")!==this.model.get("mac")&&a.get("adopted")){if(a.get("model")===this.model.get("model"))return!0;var b=this.compatibilityMap[this.model.get("model")];if(b&&b.indexOf(a.get("model"))!==-1)return!0}return!1},d.prototype.onModelChange=function(){},d.$inject=["devices","deviceUtils","frame","$q","$translate","heyToasts"],angular.module("app-unifi-manage").controller("SwitchPropertiesCopyConfigurationController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],841:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="switchPropertiesCopyConfigurationCtrl.form" ng-class="{    \'is-form-validation-visible\': switchPropertiesCopyConfigurationCtrl.showValidation,    \'is-validation-hidden\': !switchPropertiesCopyConfigurationCtrl.showValidation  }" ng-submit="switchPropertiesCopyConfigurationCtrl.form.$valid &amp;&amp; switchPropertiesCopyConfigurationCtrl.copy()" class="appForm unifiPanelItemForm"><fieldset class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><unifi-select-device-dropdown-list unifi-select-device-dropdown-list-selected-model="switchPropertiesCopyConfigurationCtrl.sourceModel" unifi-select-device-dropdown-list-is-required="true" unifi-select-device-dropdown-list-device-filter="switchPropertiesCopyConfigurationCtrl.sourceFilter(model)" unifi-select-device-dropdown-list-local-state="true" unifi-select-device-dropdown-list-local-state-key="::switchPropertiesCopyConfigurationCtrl.model.get(\'mac\') + \'|copy-config\'" unifi-select-device-dropdown-list-local-state-is-temporary="true" unifi-select-device-dropdown-list-is-cozy="true" unifi-select-device-dropdown-list-no-clear="true"></unifi-select-device-dropdown-list></div></fieldset><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-click="switchPropertiesCopyConfigurationCtrl.showValidation = true" busy-toggle="switchPropertiesCopyConfigurationCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="switchPropertiesCopyConfigurationCtrl.isSaveDisabled()" class="appMainButton appMainButton--primary appMainButton--condensed saveDevice">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],842:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesCopyConfiguration",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiSwitchPropertiesCopyConfiguration",isOpen:"=unifiSwitchPropertiesCopyConfigurationIsOpen"},controller:"SwitchPropertiesCopyConfigurationController",controllerAs:"switchPropertiesCopyConfigurationCtrl",template:a("./switchPropertiesCopyConfiguration.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./switchPropertiesCopyConfiguration.jade":841}],843:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<accordion close-others="true" class="appAccordion"><accordion-group is-open="switchPropertiesCtrl.accordions.details.overview" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_OVERVIEW\' | translate}}</accordion-heading><div ng-if="switchPropertiesCtrl.accordions.details.overview"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow macAddress"><dt>{{\'DEVICE_PROPERTIES_LABEL_MAC_ADDRESS\' | translate}}</dt><dd>{{switchPropertiesCtrl.model.get(\'mac\')}}</dd></div><div class="appDescriptionListRow modelName"><dt>{{\'DEVICE_PROPERTIES_LABEL_MODEL\' | translate}}</dt><dd>{{switchPropertiesCtrl.deviceStateUtils.getDeviceModel(switchPropertiesCtrl.model)}}</dd></div><div class="appDescriptionListRow version"><dt>{{\'DEVICE_PROPERTIES_LABEL_VERSION\' | translate}}</dt><dd><span ng-if="switchPropertiesCtrl.model.get(\'version\')">{{switchPropertiesCtrl.model.get(\'version\')}}</span><span ng-if="!switchPropertiesCtrl.model.get(\'version\')" translate="DEVICE_PROPERTIES_VALUES_VERSION_NOT_AVAILABLE"></span></dd></div></div><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow ipAddress"><dt>{{\'DEVICE_PROPERTIES_LABEL_IP_ADDRESS\' | translate}}</dt><dd>{{switchPropertiesCtrl.model.get(\'ip\')}}</dd></div><div ng-if="switchPropertiesCtrl.totalPower &gt; 0" class="appDescriptionListRow totalPower"><dt>{{\'DEVICE_PROPERTIES_LABEL_POWER_CONSUMPTION\' | translate}}</dt><dd>{{\'DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_POWER\' | translate: \'{power: \' + switchPropertiesCtrl.totalPower + \'}\'}}</dd></div><div ng-if="switchPropertiesCtrl.model.get(\'general_temperature\') &gt; 0" class="appDescriptionListRow temperature"><dt>{{\'DEVICE_PROPERTIES_LABEL_TEMPERATURE\' | translate}}</dt><dd><div class="iconText appIconText"><span class="iconText__text">{{switchPropertiesCtrl.model.get(\'general_temperature\') | temperature}}</span><span ng-class="switchPropertiesCtrl.model.get(\'overheating\') ? \'ubnt-icon--alert-fill danger\' : \'ubnt-icon--blank\'" class="iconText__icon icon"></span></div><div ng-if="switchPropertiesCtrl.model.get(\'overheating\')" translate="DEVICE_PROPERTIES_NOTICE_OVERHEATING_VENTILATION" class="bold"></div></dd></div><div ng-if="switchPropertiesCtrl.model.get(\'has_fan\') &amp;&amp; !switchPropertiesCtrl.isSimpleFan" class="appDescriptionListRow fanLevel"><dt>{{\'DEVICE_PROPERTIES_LABEL_FAN_LEVEL\' | translate}}</dt><dd ng-switch="switchPropertiesCtrl.model.get(\'fan_level\') &gt;= switchPropertiesCtrl.fanOnLevel"><span ng-switch-when="true">{{switchPropertiesCtrl.model.get(\'fan_level\')}}</span><span ng-switch-when="false">{{\'DEVICE_PROPERTIES_VALUES_FAN_LEVEL_OFF\' | translate}}</span></dd></div><div ng-if="switchPropertiesCtrl.model.get(\'has_fan\') &amp;&amp; switchPropertiesCtrl.isSimpleFan" class="appDescriptionListRow fanState"><dt>{{\'DEVICE_PROPERTIES_LABEL_FAN_STATE\' | translate}}</dt><dd ng-switch="switchPropertiesCtrl.model.get(\'fan_level\') &gt;= switchPropertiesCtrl.fanOnLevel"><span ng-switch-when="true">{{\'DEVICE_PROPERTIES_VALUES_FAN_LEVEL_ON\' | translate}}</span><span ng-switch-when="false">{{\'DEVICE_PROPERTIES_VALUES_FAN_LEVEL_OFF\' | translate}}</span></dd></div><div class="appDescriptionListRow uptime"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPTIME\' | translate}}</dt><dd>{{switchPropertiesCtrl.model.get(\'uptime\') | seconds}}</dd></div><div ng-if="switchPropertiesCtrl.model.getNested(\'sys_stats.mem_total\')" class="appDescriptionListRow memory"><dt>{{\'DEVICE_PROPERTIES_LABEL_MEMORY_USAGE\' | translate}}</dt><dd>{{switchPropertiesCtrl.model.getNested(\'sys_stats.mem_used\') | percent: switchPropertiesCtrl.model.getNested(\'sys_stats.mem_total\')}}</dd></div><div ng-if="switchPropertiesCtrl.model.getNested(\'sys_stats.loadavg_1\')" class="appDescriptionListRow load"><dt>{{\'DEVICE_PROPERTIES_LABEL_LOAD_AVERAGE\' | translate}}</dt><dd>{{switchPropertiesCtrl.model.get(\'sys_stats\') | loadAvg}}<div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable horizontalRhythmLeft--cozy"><div translate="DEVICE_PROPERTIES_TOOLTIP_LOAD_AVERAGE" class="appTooltip appTooltip--left"></div></div></dd></div><div ng-if="switchPropertiesCtrl.uplinkName &amp;&amp; switchPropertiesCtrl.deviceStatus !== \'success\'" class="appDescriptionListRow uplinkName"><dt>{{\'DEVICE_PROPERTIES_LABEL_LAST_UPLINK\' | translate}}</dt><dd><a unifi-open-panel="switchPropertiesCtrl.uplink" unifi-open-panel-active-tab="switchPropertiesCtrl.uplinkAttrs.uplink_remote_port ? \'ports\' : \'details\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="[{ state: \'port\', value: switchPropertiesCtrl.uplinkAttrs.uplink_remote_port, overwrite: true }]">{{switchPropertiesCtrl.uplinkName}}</a></dd></div></div><div ng-if="switchPropertiesCtrl.deviceStatus !== \'success\'" class="appDescriptionList appDescriptionList--inline"><div class="appDescriptionListRow lastSeen"><dt>{{\'DEVICE_PROPERTIES_LABEL_LAST_SEEN\' | translate}}</dt><dd><span ng-if="switchPropertiesCtrl.model.get(\'last_seen\')">{{switchPropertiesCtrl.model.get(\'last_seen\') * 1000 | moment: \'fromNow\'}}</span><span ng-if="!switchPropertiesCtrl.model.get(\'last_seen\')" translate="DEVICE_PROPERTIES_VALUES_LAST_SEEN_NEVER"></span></dd></div></div></div></accordion-group><accordion-group ng-if="switchPropertiesCtrl.hasUplink" is-open="switchPropertiesCtrl.accordions.details.uplink" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_UPLINK\' | translate}}</accordion-heading><div ng-if="switchPropertiesCtrl.accordions.details.uplink"><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow uplinkPort"><dt>{{\'DEVICE_PROPERTIES_LABEL_PORT\' | translate}}</dt><dd>{{switchPropertiesCtrl.uplinkAttrs.port_idx}}</dd></div><div ng-if="switchPropertiesCtrl.uplinkName" class="appDescriptionListRow uplinkName"><dt>{{\'DEVICE_PROPERTIES_LABEL_UPLINK\' | translate}}</dt><dd><a unifi-open-panel="switchPropertiesCtrl.uplink" unifi-open-panel-active-tab="switchPropertiesCtrl.uplinkAttrs.uplink_remote_port ? \'ports\' : \'details\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="[{ state: \'port\', value: switchPropertiesCtrl.uplinkAttrs.uplink_remote_port, overwrite: true }]">{{switchPropertiesCtrl.uplinkName}}</a></dd></div><div class="appDescriptionListRow uplinkSpeed"><dt>{{\'DEVICE_PROPERTIES_LABEL_SPEED\' | translate}}</dt><dd>{{switchPropertiesCtrl.uplinkAttrs.speed}}</dd></div><div class="appDescriptionListRow uplinkDuplex"><dt>{{\'DEVICE_PROPERTIES_LABEL_DUPLEX\' | translate}}</dt><dd>{{switchPropertiesCtrl.uplinkAttrs.full_duplex ? \'DEVICE_PROPERTIES_VALUES_DUPLEX_FULL\' : \'DEVICE_PROPERTIES_VALUES_DUPLEX_HALF\' | translate}}</dd></div></div><div class="appDescriptionList appDescriptionList--inline appDescriptionList--divider"><div class="appDescriptionListRow uplinkDownPktsBytes"><dt>{{\'DEVICE_PROPERTIES_LABEL_DOWN_PKTS_BYTES\' | translate}}</dt><dd>{{switchPropertiesCtrl.uplinkAttrs.rx_packets && switchPropertiesCtrl.uplinkAttrs.rx_bytes ? (switchPropertiesCtrl.uplinkAttrs.rx_packets | numberToString) + \' / \' + (switchPropertiesCtrl.uplinkAttrs.rx_bytes | bytes) : \'0.00 / 0.00\'}}</dd></div><div class="appDescriptionListRow uplinkUpPktsBytes"><dt>{{\'DEVICE_PROPERTIES_LABEL_UP_PKTS_BYTES\' | translate}}</dt><dd>{{switchPropertiesCtrl.uplinkAttrs.tx_packets && switchPropertiesCtrl.uplinkAttrs.tx_bytes ? (switchPropertiesCtrl.uplinkAttrs.tx_packets | numberToString) + \' / \' + (switchPropertiesCtrl.uplinkAttrs.tx_bytes | bytes) : \'0.00 / 0.00\'}}</dd></div><div class="appDescriptionListRow uplinkActivity"><dt>{{\'DEVICE_PROPERTIES_LABEL_ACTIVITY\' | translate}}</dt><dd>{{(switchPropertiesCtrl.uplinkAttrs[\'rx_bytes-r\'] || 0) + (switchPropertiesCtrl.uplinkAttrs[\'tx_bytes-r\'] || 0) | bps}}</dd></div></div></div></accordion-group><accordion-group ng-if="switchPropertiesCtrl.showDownlinksAccordion" is-open="switchPropertiesCtrl.accordions.details.downlinks" class="unifiPanelItemContent__section"><accordion-heading>{{\'DEVICE_PROPERTIES_SECTION_DETAILS_DOWNLINKS\' | translate}}</accordion-heading><unifi-switch-properties-downlink-list ng-if="switchPropertiesCtrl.accordions.details.downlinks" unifi-switch-properties-downlink-list-local-state="true" unifi-switch-properties-downlink-list-local-state-key="::switchPropertiesCtrl.model.get(\'mac\') + \'|downlinks\'" unifi-switch-properties-downlink-list-collection="switchPropertiesCtrl.model.get(\'downlink_table\')"></unifi-switch-properties-downlink-list></accordion-group></accordion>'),b.join("")}},{"jade/runtime":232}],844:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesDetails",["devicePropertiesActiveAccordionDirectiveMixin",function(b){return{scope:!0,require:"^unifiSwitchProperties",template:a("./switchPropertiesDetails.jade")(),link:function(a,c,d,e){b.init(a,c,d,e,"details")}}}])},{"./switchPropertiesDetails.jade":843}],845:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.getDownlinkDevice=b.repository.collection.get.bind(b.repository.collection),this.getDownlinkDeviceModel=c.getDeviceModel.bind(c),this.rowsPerPage=f.model.getRowsPerPropertyPanel(),this.defaultSortBy="port_idx",e.call(this,a,d,f)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.downlinks},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","devices","deviceStateUtils","CollectionView","preferences"],angular.module("app-unifi-manage").controller("SwitchPropertiesDownlinkListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],846:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table collection-view-sort="switchPropertiesDownlinkListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="port_idx" class="downlinkPort"><span translate="DEVICE_PROPERTIES_SWITCH_DOWNLINKS_TABLE_HEADER_PORT"></span></th><th collection-view-sort-by="mac" class="downlinkName"><span translate="DEVICE_PROPERTIES_SWITCH_DOWNLINKS_TABLE_HEADER_DEVICE"></span></th><th class="downlinkModel"><span translate="DEVICE_PROPERTIES_SWITCH_DOWNLINKS_TABLE_HEADER_MODEL"></span></th><th collection-view-sort-by="speed" class="downlinkStatus"><span translate="DEVICE_PROPERTIES_SWITCH_DOWNLINKS_TABLE_HEADER_STATUS"></span></th></tr></thead><tfoot ng-if="switchPropertiesDownlinkListCtrl.view.getModels().length"><tr><td colspan="4"><unifi-micro-pagination unifi-micro-pagination-current-page="switchPropertiesDownlinkListCtrl.currentPage" unifi-micro-pagination-rows-per-page="switchPropertiesDownlinkListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="switchPropertiesDownlinkListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in switchPropertiesDownlinkListCtrl.view.getModels(),          startFrom (switchPropertiesDownlinkListCtrl.currentPage - 1) * switchPropertiesDownlinkListCtrl.rowsPerPage,          limitTo switchPropertiesDownlinkListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-init="device = switchPropertiesDownlinkListCtrl.getDownlinkDevice(model.get(\'mac\'))" class="clickable"><td class="downlinkPort">{{::model.get(\'port_idx\')}}</td><td class="downlinkPort"><a unifi-open-panel="device" unifi-open-panel-active-tab="\'details\'">{{::device.getDisplayName()}}</a></td><td class="downlinkModel">{{::switchPropertiesDownlinkListCtrl.getDownlinkDeviceModel(device)}}</td><td class="downlinkStatus">{{::model | duplex}}</td></tr></tbody></table><div ng-if="!switchPropertiesDownlinkListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_DOWNLINKS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],847:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesDownlinkList",["PaginatedListDirective",function(b){return new b("switchPropertiesDownlink",a("./switchPropertiesDownlinkList.jade")(),{downlinks:"=unifiSwitchPropertiesDownlinkListCollection"})}])},{"./switchPropertiesDownlinkList.jade":846}],848:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.$translate=a,this.heyToasts=b,this.switches=c,this.networks=d,this.networkUtils=f,this.apiResults=h,this.patterns={name:i.NAME},e.call(this,g)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.addEventHandlers=function(){e.prototype.addEventHandlers.call(this),this.networks.repository.collection.on("add remove change reset",this.onNetworksChange,this),this.onNetworksChange()},d.prototype.removeEventHandlers=function(){e.prototype.removeEventHandlers.call(this),this.networks.repository.collection.off("add remove change reset",this.onNetworksChange,this)},d.prototype.save=function(){this.isSubmitting=!0;var a=[];angular.forEach(this.taggedNetworks,function(b,c){b.checked&&a.push(c)});var b=angular.extend({},this.modelCopy.attributes,{forward:this.modelCopy.attributes.native_networkconf_id&&!a.length?"native":"customize",tagged_networkconf_ids:a});return this.model.save(b,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORKS_VLANS").toLowerCase()})),this.switches.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_NETWORKS_VLANS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.getTaggedNetworks=function(){var a={},b=(this.model?this.model.get("tagged_networkconf_ids"):void 0)||[];return angular.forEach(this.nativeNetworks,function(c){a[c.id]={name:c.get("name"),checked:b.indexOf(c.id)!==-1}}),this.modelCopy&&this.modelCopy.attributes.native_networkconf_id&&(a[this.modelCopy.attributes.native_networkconf_id].checked=!1),a},d.prototype.onNativeNetworkChange=function(){if(this.modelCopy&&this.modelCopy.attributes.native_networkconf_id){var a=this.taggedNetworks[this.modelCopy.attributes.native_networkconf_id];a&&(a.checked=!1)}},d.prototype.onNetworksChange=function(){this.nativeNetworks=this.networks.repository.collection.filter(function(a){return this.networkUtils.nativeNetworkTypes.indexOf(a.get("purpose"))!==-1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"Master":"";this["taggedNetworks"+b]=this.getTaggedNetworks()},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","switches","networks","networkUtils","modelDivergence","apiResults","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("SwitchPropertiesNetworksVlansFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],849:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="switchPropertiesNetworksVlansFormCtrl.form" ng-class="{    \'is-form-validation-visible\': switchPropertiesNetworksVlansFormCtrl.showValidation,    \'is-validation-hidden\': !switchPropertiesNetworksVlansFormCtrl.showValidation  }" ng-submit="switchPropertiesNetworksVlansFormCtrl.form.$valid &amp;&amp; switchPropertiesNetworksVlansFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="switchPropertiesNetworksVlansFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="switchPropertiesNetworksVlansFormCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; switchPropertiesNetworksVlansFormCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_NAME" class="appLabel--primary"></label><input type="text" name="networkVlanName" ng-model="switchPropertiesNetworksVlansFormCtrl.modelCopy.attributes.name" ng-model-master="switchPropertiesNetworksVlansFormCtrl.model.attributes.name" ng-pattern="switchPropertiesNetworksVlansFormCtrl.patterns.name" required autofocus class="input--full"></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_NATIVE_NETWORK" class="appLabel--primary"></label><select name="networkVlanNativeNetwork" ng-model="switchPropertiesNetworksVlansFormCtrl.modelCopy.attributes.native_networkconf_id" ng-model-master="switchPropertiesNetworksVlansFormCtrl.model.attributes.native_networkconf_id" ng-change="switchPropertiesNetworksVlansFormCtrl.onNativeNetworkChange()" ng-options="network.id as network.get(\'name\') for network in switchPropertiesNetworksVlansFormCtrl.nativeNetworks" class="select--full"><option value="">{{\'DEVICE_PROPERTIES_VALUES_NONE\' | translate}}</option></select></div><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_TAGGED_NETWORKS" class="appLabel--primary"></label><ol class="list list--inline appInputList"><li ng-repeat="network in switchPropertiesNetworksVlansFormCtrl.nativeNetworks" class="appInputGroup networkVlanTaggedNetworks"><input type="checkbox" id="network{{::directiveId}}_{{::network.id}}" ng-model="switchPropertiesNetworksVlansFormCtrl.taggedNetworks[network.id].checked" ng-model-master="switchPropertiesNetworksVlansFormCtrl.taggedNetworksMaster[network.id].checked" ng-disabled="network.id === switchPropertiesNetworksVlansFormCtrl.modelCopy.attributes.native_networkconf_id"><label for="network{{::directiveId}}_{{::network.id}}">{{network.get(\'name\')}}</label></li></ol></div></fieldset><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="switchPropertiesNetworksVlansFormCtrl.showValidation = true" busy-toggle="switchPropertiesNetworksVlansFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed saveNetworkVlan">{{\'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--transparent appMainButton--condensed cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary appMainButton--condensed cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),
b.join("")}},{"jade/runtime":232}],850:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesNetworksVlansForm",["SimpleFormDirective",function(b){return new b("switchPropertiesNetworksVlans",a("./switchPropertiesNetworksVlansForm.jade")(),{isOpen:"=unifiSwitchPropertiesNetworksVlansFormIsOpen"})}])},{"./switchPropertiesNetworksVlansForm.jade":849}],851:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j){this.$translate=b,this.heyToasts=c,this.frame=d,this.networks=g,this.networkUtils=h,this.isAdmin=i.isAdmin.bind(i),this.rowsPerPage=j.model.getRowsPerPropertyPanel(),this.defaultSortBy="name",this.isRemoving={},e.call(this,a,f,j)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initView=function(){e.prototype.initView.call(this),this.networks.repository.collection.on("add remove change reset",this.onNetworksChange,this)},d.prototype.destroyView=function(){e.prototype.destroyView.call(this),this.networks.repository.collection.off("add remove change reset",this.onNetworksChange,this)},d.prototype.onNetworksChange=function(){this.refresh()},d.prototype.initFilters=function(){this.filter={getTest:function(){return function(a){return"native"===a.get("forward")||"customize"===a.get("forward")}}}},d.prototype.getConfigValue=function(a){var b;switch(a.get("forward")){case"customize":b=this.$translate.instant("DEVICE_PROPERTIES_VALUES_CUSTOMIZED");break;case"native":b=this.$translate.instant("DEVICE_PROPERTIES_VALUES_NATIVE"),this.networks.repository.collection.each(function(c){c.id===a.get("native_networkconf_id")&&this.networkUtils.nativeNetworkTypes.indexOf(c.get("purpose"))!==-1&&(b+=" ("+c.get("name")+")")}.bind(this))}return b},d.prototype.getCollection=function(){return this.networksVlans},d.prototype.cancelEdit=function(){this.showEditForm=!1,this.editModel=null},d.prototype.add=function(){var a=this.getCollection().model;this.editModel=new a,this.showEditForm=!0},d.prototype.edit=function(a){this.showEditForm=!0,this.editModel=a},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_PROPERTIES_SWITCH_NETWORKS_VLANS_DELETE_CONFIRM_TITLE",{name:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("DEVICE_PROPERTIES_SWITCH_NETWORKS_VLANS_DELETE_CONFIRM_MESSAGE",{name:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving=a.id,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("DEVICE_PROPERTIES_SWITCH_NETWORKS_VLANS_DELETE_SUCCESS",{name:a.get("name")})),!0}.bind(this))["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("DEVICE_PROPERTIES_SWITCH_NETWORKS_VLANS_DELETE_ERROR",{name:a.get("name")})),!1}.bind(this))["finally"](function(){this.isRemoving=!1}.bind(this))}.bind(this))},d.prototype.onPageSizeChange=function(){},d.$inject=["$injector","$translate","heyToasts","frame","CollectionView","networks","networkUtils","account","preferences"],angular.module("app-unifi-manage").controller("SwitchPropertiesNetworksVlansListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],852:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-switch="switchPropertiesNetworksVlansListCtrl.showEditForm" class="appScrollable flexFlag__body fullWidth"><div ng-switch-when="true" unifi-switch-properties-networks-vlans-form="switchPropertiesNetworksVlansListCtrl.editModel" unifi-switch-properties-networks-vlans-form-on-save="switchPropertiesNetworksVlansListCtrl.cancelEdit()" unifi-switch-properties-networks-vlans-form-on-cancel="switchPropertiesNetworksVlansListCtrl.cancelEdit()" unifi-switch-properties-networks-vlans-form-is-open="switchPropertiesNetworksVlansListCtrl.isOpen" unifi-switch-properties-networks-vlans-form-is-read-only="!switchPropertiesNetworksVlansListCtrl.isAdmin() || switchPropertiesNetworksVlansListCtrl.editModel.get(\'attr_no_edit\')"></div><div ng-switch-default><div unifi-if-role-admin class="unifiPanelItemContentSection__action"><button ng-click="switchPropertiesNetworksVlansListCtrl.add()" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_CREATE"></span></button></div><table collection-view-sort="switchPropertiesNetworksVlansListCtrl.view" class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent"><thead><tr><th collection-view-sort-by="name" class="networksVlansName"><span translate="DEVICE_PROPERTIES_SWITCH_NETWORKS_VLANS_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="forward" class="networksVlansConfig"><span translate="DEVICE_PROPERTIES_SWITCH_NETWORKS_VLANS_TABLE_HEADER_CONFIG"></span></th><th class="networksVlansActions"><span translate="DEVICE_PROPERTIES_SWITCH_NETWORKS_VLANS_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tfoot ng-if="switchPropertiesNetworksVlansListCtrl.view.getModels().length"><tr><td colspan="3"><unifi-micro-pagination unifi-micro-pagination-current-page="switchPropertiesNetworksVlansListCtrl.currentPage" unifi-micro-pagination-rows-per-page="switchPropertiesNetworksVlansListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="switchPropertiesNetworksVlansListCtrl.view.getModels().length" class="noMarginBottom"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in switchPropertiesNetworksVlansListCtrl.view.getModels(),            startFrom (switchPropertiesNetworksVlansListCtrl.currentPage - 1) * switchPropertiesNetworksVlansListCtrl.rowsPerPage,            limitTo switchPropertiesNetworksVlansListCtrl.rowsPerPage" data-id="{{::model.id}}"><td class="networksVlansName">{{::model.get(\'name\')}}</td><td class="networksVlansFrom">{{::switchPropertiesNetworksVlansListCtrl.getConfigValue(model)}}</td><td class="appTableCell--actions networksVlansActions"><button ng-if="switchPropertiesNetworksVlansListCtrl.isAdmin() &amp;&amp; !model.get(\'attr_no_edit\')" ng-click="switchPropertiesNetworksVlansListCtrl.edit(model)" ng-disabled="switchPropertiesNetworksVlansListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_EDIT\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span></button><button ng-if="!switchPropertiesNetworksVlansListCtrl.isAdmin() || model.get(\'attr_no_edit\')" ng-click="switchPropertiesNetworksVlansListCtrl.edit(model)" ng-disabled="switchPropertiesNetworksVlansListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_VIEW\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span></button><button unifi-if-role-admin unifi-if-role-admin-and="!model.get(\'attr_no_delete\')" ng-click="switchPropertiesNetworksVlansListCtrl.remove(model)" ng-disabled="switchPropertiesNetworksVlansListCtrl.isRemoving[model.id]" title="{{\'COMMON_ACTIONS_DELETE\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span></button></td></tr></tbody></table><div ng-if="!switchPropertiesNetworksVlansListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_SWITCH_NETWORKS_VLANS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],853:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesNetworksVlansList",["PaginatedListDirective",function(b){return new b("switchPropertiesNetworksVlans",a("./switchPropertiesNetworksVlansList.jade")(),{networksVlans:"=unifiSwitchPropertiesNetworksVlansListCollection",isOpen:"=unifiSwitchPropertiesNetworksVlansListIsOpen"})}])},{"./switchPropertiesNetworksVlansList.jade":852}],854:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n){this.$translate=a,this.$q=b,this.frame=c,this.heyToasts=d,this.deviceUtils=f,this.switchUtils=g,this.portFeatureUtils=h,this.switches=i,this.clients=j,this.apiResults=l,this.DEVICE_MODELS=m,this.patterns={name:n.NAME},this.poeOptions=[{value:void 0,translationKey:"DEVICE_PROPERTIES_VALUES_KEEP_EXISTING",isAvailable:!1,isDisabled:!1,isBatch:!0},{value:"off",translationKey:"DEVICE_PROPERTIES_VALUES_OFF",isAvailable:!0,isDisabled:!1},{value:"pasv24",translationKey:"DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_PASSIVE",isAvailable:!0,isDisabled:!1},{value:"auto",translationKey:"DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_PLUS",isAvailable:!0,isDisabled:!1},{value:"passthrough",translationKey:"DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_PASSTHROUGH",isAvailable:!1,isDisabled:!1}],this.speedOptions=[{value:1e4,label:"10 Gbps",isAvailable:!0},{value:1e3,label:"1000 Mbps",isAvailable:!0},{value:100,label:"100 Mbps",isAvailable:!0},{value:10,label:"10 Mbps",isAvailable:!0}],this.castRateMin=100,this.castRateMax=1488e4,e.call(this,k)}var e=a("../../../base-unifi/controllers/BaseBatchFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){var a,b=this.clients.repository.collection.findWhere({ip:this.device.get("inform_ip")});b&&b.get("sw_mac")===this.device.get("mac")&&(a=this.models.find(function(a){return a.get("port_idx")===b.get("sw_port")}));var c;return c=a?this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_PROPERTIES_SWITCH_PORT_SAVE_CONTROLLER_CONFIRM_TITLE",{port:b.get("sw_port")})}.bind(this),message:function(){return this.$translate.instant("DEVICE_PROPERTIES_SWITCH_PORT_SAVE_CONTROLLER_CONFIRM_MESSAGE",{port:b.get("sw_port"),informIp:this.device.get("inform_ip")})}.bind(this),options:angular.noop}):this.$q.when(),c.then(function(){return this.isSubmitting=!0,this.deviceUtils.saveDevice(this.device,{port_overrides:this.getAttrsToSave()},{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_TAB_PORTS").toLowerCase()})),this.device.fetch(),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_TAB_PORTS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))}.bind(this))},d.prototype.getAttrsToSave=function(){var a=this.device.get("port_overrides").deepCopy(),b={};return b.op_mode=this.modelCopy.attributes.op_mode,this.modelCopy.attributes.name&&(b.name=this.modelCopy.attributes.name),this.getVisibility("networks-vlans")&&this.modelCopy.attributes.portconf_id&&(b.portconf_id=this.modelCopy.attributes.portconf_id),this.getVisibility("mirror-port")&&(b.mirror_port_idx=this.modelCopy.attributes.mirror_port_idx),this.getVisibility("aggregate-ports")&&(b.aggregate_num_ports=this.aggregatePortStopCopy-this.modelCopy.attributes.port_idx+1),this.getVisibility("dot1x-ctrl")&&this.modelCopy.attributes.dot1x_ctrl&&(b.dot1x_ctrl=this.modelCopy.attributes.dot1x_ctrl),this.getVisibility("isolation")&&void 0!==this.portOverrideIsolationCopy&&(b.isolation=this.portOverrideIsolationCopy),this.getVisibility("link-neg")&&(b.autoneg="manual"!==this.portOverrideLinkNegCopy),this.getVisibility("full-duplex")&&(b.full_duplex=this.portOverrideFullDuplexCopy),this.getVisibility("speed")&&(b.speed=this.portOverrideSpeedCopy),this.getVisibility("storm-control")&&(void 0!==this.portOverrideStormControlEnabledCopy.unicast&&(b.stormctrl_ucast_enabled=!!this.portOverrideStormControlEnabledCopy.unicast)&&(b.stormctrl_ucast_rate=this.portOverrideStormControlRateCopy.unicast),void 0!==this.portOverrideStormControlEnabledCopy.multicast&&(b.stormctrl_mcast_enabled=!!this.portOverrideStormControlEnabledCopy.multicast)&&(b.stormctrl_mcast_rate=this.portOverrideStormControlRateCopy.multicast),void 0!==this.portOverrideStormControlEnabledCopy.broadcast&&(b.stormctrl_bcast_enabled=!!this.portOverrideStormControlEnabledCopy.broadcast)&&(b.stormctrl_bcast_rate=this.portOverrideStormControlRateCopy.broadcast)),angular.forEach(this.models,function(c){var d=a.model,e=a.findWhere({port_idx:c.get("port_idx")})||new d({port_idx:c.get("port_idx")}),f={};if(this.isPoeSupported&&"SFP"!==e.get("media")&&"SFP+"!==e.get("media")&&(f.poe_mode=this.modelCopy.attributes.poe_mode||e.get("poe_mode")),!b.name&&!this.isBatch)switch(this.switchUtils.getPortTypeByNumber(this.portNumbers,c.get("port_idx"))){case"sfp":f.name="SFP "+(this.portNumbers.sfp.indexOf(c.get("port_idx"))+1);break;case"plus":f.name="SFP+ "+(this.portNumbers.plus.indexOf(c.get("port_idx"))+1);break;case"standard":f.name="Port "+(this.portNumbers.standard.indexOf(c.get("port_idx"))+1);break;default:f.name="Port"}e.get("portconf_id")||b.portconf_id||(f.portconf_id=this.getDefaultPortConfId()),e.set(angular.extend({},b,f)),a.add(e,{merge:!0})}.bind(this)),a.toJSON()},d.prototype.updateModels=function(a){e.prototype.updateModels.call(this,a),this.isPoeSupported=this.models&&this.models.reduce(function(a,b){return a||b.get("port_poe")},!1),this.getAllPortsHaveOverrides(),this.getAggregateRange()},d.prototype.updateDevice=function(a){this.device=a,this.addDeviceEventHandlers(),this.portNumbers=this.switchUtils.getPortNumbers(a),this.numPorts=Object.keys(this.portNumbers).reduce(function(a,b){return this.portNumbers[b].length+a}.bind(this),0)||0,this.mirroringPortMin=Math.min(this.portNumbers.standard[0]||0,this.portNumbers.sfp[0]||0,this.portNumbers.plus[0]||0),this.mirroringPortMax=Math.max(this.portNumbers.standard[this.portNumbers.standard.length-1]||0,this.portNumbers.sfp[this.portNumbers.sfp.length-1]||0,this.portNumbers.plus[this.portNumbers.plus.length-1]||0),this.hasFullFeatures="usw"===a.get("type"),this.getAggregateRange(),this.setOverrideAttrs(!0)},d.prototype.addDeviceEventHandlers=function(){this.device&&this.device.on("change:port_overrides[*]",this.onModelChange,this)},d.prototype.removeDeviceEventHandlers=function(){this.device&&this.device.off("change:port_overrides[*]",this.onModelChange,this)},d.prototype.getAggregateRange=function(){if(this.aggregateMin=this.aggregateMax=void 0,this.models&&this.device){this.aggregateMin=this.models[0].get("port_idx")+1,this.aggregateMax=Math.min(this.aggregateMin+2,this.numPorts);for(var a,b=this.aggregateMin;b<=this.aggregateMax;b++)if(a=this.device.get("port_table").findWhere({port_idx:b}),!a||"switch"!==a.get("op_mode")){this.aggregateMax=b;break}}this.clampAggregatePortStop()},d.prototype.clampAggregatePortStop=function(){this.aggregateMin&&this.aggregateMin===this.aggregateMax&&(this.aggregatePortStop||(this.aggregatePortStop=this.aggregateMin),this.aggregatePortStopCopy||(this.aggregatePortStopCopy=this.aggregateMin))},d.prototype.getPortsLabel=function(){var a,b=[];return this.models&&angular.forEach(this.models,function(c){if("aggregate"===c.get("op_mode"))b.push([c.get("port_idx"),c.get("port_idx")+c.get("aggregate_num_ports")-1].join("-")),a=null;else{if(a&&a+1===c.get("port_idx")){var d=b.pop().toString().split("-");1===d.length?d=[a,c.get("port_idx")]:d[1]++,b.push(d.join("-"))}else b.push(c.get("port_idx"));a=c.get("port_idx")}}),b.join(", ")},d.prototype.getDefaultPortConfId=function(){return(this.switches.repository.collection.findWhere({attr_hidden_id:"All"})||this.switches.repository.collection.at(0)||{}).id},d.prototype.getAllPortsHaveOverrides=function(){this.allPortsHaveOverrides=!1,this.models&&this.device&&(this.allPortsHaveOverrides=this.getModelsIds().reduce(function(a,b){return a&&!!this.device.get("port_overrides").get(b)}.bind(this),!0))},d.prototype.isMirroringAllowed=function(){if(!this.isBatch&&this.device){var a=this.device.get("port_table").findWhere({op_mode:"mirror"});if(!a||a.get("port_idx")===this.models[0].get("port_idx"))return!0}return!1},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";this["model"+b]&&(this["model"+b].attributes.op_mode=(this.model?this.model.get("op_mode"):void 0)||"switch",this.isBatch?(this["model"+b].attributes.poe_mode=this.getUnanimousModelValue("poe_mode"),this["model"+b].attributes.dot1x_ctrl=this.getUnanimousModelValue("dot1x_ctrl"),this["model"+b].attributes.portconf_id=this.getUnanimousModelValue("portconf_id")):(this["model"+b].attributes.poe_mode=(this.model?this.model.get("poe_mode"):void 0)||(this.portFeatureUtils.isPoeAutoSupported(this.model)?"auto":"off"),this["model"+b].attributes.dot1x_ctrl=(this.model?this.model.get("dot1x_ctrl"):void 0)||"force_authorized",this["model"+b].attributes.portconf_id=(this.model?this.model.get("portconf_id"):void 0)||this.getDefaultPortConfId(),this["aggregatePortStop"+b]=this.model&&this.model.get("aggregate_num_ports")?this.model.get("port_idx")+this.model.get("aggregate_num_ports")-1:null,this.clampAggregatePortStop()))},d.prototype.setOverrideAttrs=function(a){var b,c=a?"":"Copy";if(this["model"+c]){if(this.isBatch){this.getAllPortsHaveOverrides();var d=this.getModelsIds();b=this.device.get("port_overrides").filter(function(a){return d.indexOf(a.get("port_idx"))!==-1})}else this.device&&this.device.get("port_overrides")&&(b=this.device.get("port_overrides").findWhere({port_idx:this.model.get("port_idx")}));this["portOverrideLinkNeg"+c]=!this.isBatch&&b&&b.has("autoneg")&&!b.get("autoneg")?"manual":"auto",this["portOverrideFullDuplex"+c]=!(!this.isBatch&&b&&b.has("full_duplex"))||b.get("full_duplex"),this["portOverrideSpeed"+c]=this.getOverrideAttr("speed",b,1e3),this["portOverrideIsolation"+c]=this.getOverrideAttr("isolation",b,!1),this["portOverrideStormControlEnabled"+c]={unicast:this.getOverrideAttr("stormctrl_ucast_enabled",b,!1),multicast:this.getOverrideAttr("stormctrl_mcast_enabled",b,!1),broadcast:this.getOverrideAttr("stormctrl_bcast_enabled",b,!1)},this["portOverrideStormControlRate"+c]={unicast:this.getOverrideAttr("stormctrl_ucast_rate",b,void 0),multicast:this.getOverrideAttr("stormctrl_mcast_rate",b,void 0),broadcast:this.getOverrideAttr("stormctrl_bcast_rate",b,void 0)}}},d.prototype.getOverrideAttr=function(a,b,c){var d;return this.isBatch?(d=this.getUnanimousModelValue(a,b),d===c||this.allPortsHaveOverrides||(d=void 0)):d=(b?b.get(a):void 0)||c,d},d.prototype.setAdvancedExpanded=function(){this.model&&("switch"!==this.model.get("op_mode")||this.model.get("dot1x_ctrl")&&"force_authorized"!==this.model.get("dot1x_ctrl")||"manual"===this.portOverrideLinkNeg||this.portOverrideIsolation||this.portOverrideStormControlEnabled&&(this.portOverrideStormControlEnabled.unicast||this.portOverrideStormControlEnabled.multicast||this.portOverrideStormControlEnabled.broadcast))&&(this.isAdvancedExpanded=!0)},d.prototype.updatePoeAvailability=function(){var a=this.isBatch?this.switchUtils.getUnanimousPortPoeAvailability(this.models):this.switchUtils.getPortPoeAvailability(this.model);angular.forEach(this.poeOptions,function(b){if(b.isBatch&&(b.isAvailable=!!this.isBatch),this.isBatch)switch(b.value){case"passthrough":b.isDisabled=void 0===a.isPoePassthroughSupported,b.isAvailable=b.isDisabled||a.isPoePassthroughSupported===!0;break;case"pasv24":b.isDisabled=void 0===a.isPoePassive24Supported,b.isAvailable=b.isDisabled||a.isPoePassive24Supported===!0;break;case"auto":b.isDisabled=void 0===a.isPoeAutoSupported,b.isAvailable=b.isDisabled||a.isPoeAutoSupported===!0,b.translationKey=a.isPoePlusSupported===!0?"DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_PLUS":"DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE"}else switch(b.value){case"passthrough":b.isAvailable=a.isPoePassthroughSupported===!0;break;case"pasv24":b.isAvailable=a.isPoePassthroughSupported===!1&&a.isPoePassive24Supported===!0;break;case"auto":b.isAvailable=a.isPoePassthroughSupported===!1&&a.isPoeAutoSupported===!0,b.translationKey=a.isPoePlusSupported===!0?"DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_PLUS":"DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE"}}.bind(this))},d.prototype.updateSpeedAvailability=function(){if(this.model){var a=this.model.get("media");angular.forEach(this.speedOptions,function(b){1e4===b.value&&(b.isAvailable="SFP+"===a||"10GE"===a),100!==b.value&&10!==b.value||(b.isAvailable="SFP"!==a&&"SFP+"!==a&&"10GE"!==a)})}},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0),this.setOverrideAttrs(!0),this.setAdvancedExpanded(),this.updatePoeAvailability(),this.updateSpeedAvailability()},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1),this.setOverrideAttrs(!1)},d.$inject=["$translate","$q","frame","heyToasts","deviceUtils","switchUtils","portFeatureUtils","switches","clients","modelDivergence","apiResults","DEVICE_MODELS","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("SwitchPropertiesPortFormController",d)},{"../../../base-unifi/controllers/BaseBatchFormController":1654}],855:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="switchPropertiesPortFormCtrl.form" ng-class="{    \'is-form-validation-visible\': switchPropertiesPortFormCtrl.showValidation,    \'is-validation-hidden\': !switchPropertiesPortFormCtrl.showValidation  }" ng-submit="switchPropertiesPortFormCtrl.form.$valid &amp;&amp; switchPropertiesPortFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy unifiPanelItemForm"><unifi-config-changed unifi-config-changed-on-reset="switchPropertiesPortFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="switchPropertiesPortFormCtrl.ignoreDivergence()" unifi-config-changed-is-cozy="true" unifi-config-changed-with-whiteout="true" ng-show="isOpen &amp;&amp; switchPropertiesPortFormCtrl.form.$error.divergent"></unifi-config-changed><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><h4 class="panelTitle"><div>{{\'DEVICE_PROPERTIES_LABEL_PORT\' | translate}} {{switchPropertiesPortFormCtrl.getPortsLabel()}}</div></h4><div class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_NAME" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><input type="text" name="portName" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.name" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.name" ng-pattern="switchPropertiesPortFormCtrl.patterns.name" placeholder="{{switchPropertiesPortFormCtrl.isBatch ? \'DEVICE_PROPERTIES_VALUES_KEEP_EXISTING\' : \'\' | translate}}" autofocus class="input--full"></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'poe-mode\', switchPropertiesPortFormCtrl.isPoeSupported &amp;&amp; switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode === \'switch\')" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_POE" class="appLabel--primary"></label><div class="appInputGroup"><div ng-repeat="option in switchPropertiesPortFormCtrl.poeOptions" ng-if="option.isAvailable" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="poeMode" id="portPoeMode{{option.value + \'-\' + directiveId}}" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.poe_mode" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.poe_mode" ng-value="option.value" ng-disabled="option.isDisabled"><label for="portPoeMode{{option.value + \'-\' + directiveId}}" translate="{{option.translationKey}}"></label></div></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'networks-vlans\', switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode !== \'mirror\')" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_NETWORKS_VLANS" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><select name="networksVlans" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.portconf_id" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.portconf_id" ng-options="port.id as port | networkVlan: \'native_networkconf_id\' for port in switchPropertiesPortFormCtrl.switches.repository.collection.models" class="select--full"><option ng-if="switchPropertiesPortFormCtrl.isBatch" value="">{{\'DEVICE_PROPERTIES_VALUES_KEEP_EXISTING\' | translate}}</option></select></div></div></fieldset><fieldset ng-if="switchPropertiesPortFormCtrl.hasFullFeatures" ng-disabled="isReadOnly" ng-class="{\'appFieldset--collapsed\': !switchPropertiesPortFormCtrl.isAdvancedExpanded}" class="appFieldset appFieldset--quiet verticalRhythmTop"><h4 class="panelTitle"><div ng-click="switchPropertiesPortFormCtrl.isAdvancedExpanded = !switchPropertiesPortFormCtrl.isAdvancedExpanded" ng-class="switchPropertiesPortFormCtrl.isAdvancedExpanded ? \'appCollapserType\' : \'appExpanderType\'" translate="COMMON_SECTION_ADVANCED_OPTIONS"></div></h4><div class="appFormGroup appFormGroup--cozy"><label translate="DEVICE_PROPERTIES_LABEL_OPERATION" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><div class="appInputGroup inlineBlock"><input type="radio" name="opMode" id="portOpModeSwitch{{::directiveId}}" value="switch" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.op_mode"><label for="portOpModeSwitch{{::directiveId}}" translate="DEVICE_PROPERTIES_SWITCH_PORT_VALUES_OPERATION_SWITCH"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="opMode" id="portOpModeMirror{{::directiveId}}" value="mirror" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.op_mode" ng-disabled="switchPropertiesPortFormCtrl.isBatch || !switchPropertiesPortFormCtrl.isMirroringAllowed()"><label for="portOpModeMirror{{::directiveId}}" translate="DEVICE_PROPERTIES_SWITCH_PORT_VALUES_OPERATION_MIRROR"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="opMode" id="portOpModeAggregate{{::directiveId}}" value="aggregate" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.op_mode" ng-disabled="switchPropertiesPortFormCtrl.isBatch || switchPropertiesPortFormCtrl.aggregateMin &gt; switchPropertiesPortFormCtrl.numPorts || switchPropertiesPortFormCtrl.aggregateMax &lt; switchPropertiesPortFormCtrl.aggregateMin"><label for="portOpModeAggregate{{::directiveId}}" translate="DEVICE_PROPERTIES_SWITCH_PORT_VALUES_OPERATION_AGGREGATE"></label></div></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'mirror-port\', switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode === \'mirror\')" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_MIRRORING_PORT" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><input type="number" min="{{switchPropertiesPortFormCtrl.getVisibility(\'mirror-port\') ? switchPropertiesPortFormCtrl.mirroringPortMin : \'\'}}" max="{{switchPropertiesPortFormCtrl.getVisibility(\'mirror-port\') ? switchPropertiesPortFormCtrl.mirroringPortMax : \'\'}}" name="mirroringPort" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.mirror_port_idx" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.mirror_port_idx" unifi-string-to-integer-input class="input--smallNumber"><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="DEVICE_PROPERTIES_TOOLTIP_MIRRORING_PORT" translate-values="{port: switchPropertiesPortFormCtrl.modelCopy.attributes.port_idx}" class="appTooltip appTooltip--rightSide"></div></div></div><div ng-if="switchPropertiesPortFormCtrl.form.mirroringPort.$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: switchPropertiesPortFormCtrl.mirroringPortMin, max: switchPropertiesPortFormCtrl.mirroringPortMax}" class="appInputFeedback appInputFeedback--danger"></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'aggregate-ports\', switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode === \'aggregate\')" class="appFormGroup appFormGroup--cozy"><label translate="DEVICE_PROPERTIES_LABEL_AGGREGATE_PORTS" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><input type="text" name="aggregatePortStart" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.port_idx" disabled="true" class="input--smallNumber"><label>-</label><input type="number" name="aggregatePortStop" min="{{switchPropertiesPortFormCtrl.getVisibility(\'aggregate-ports\') ? switchPropertiesPortFormCtrl.aggregateMin : \'\'}}" max="{{switchPropertiesPortFormCtrl.getVisibility(\'aggregate-ports\') ? switchPropertiesPortFormCtrl.aggregateMax : \'\'}}" ng-model="switchPropertiesPortFormCtrl.aggregatePortStopCopy" ng-model-master="switchPropertiesPortFormCtrl.aggregatePortStop" ng-disabled="switchPropertiesPortFormCtrl.aggregateMin === switchPropertiesPortFormCtrl.aggregateMax" ng-required="switchPropertiesPortFormCtrl.getVisibility(\'aggregate-ports\')" unifi-string-to-integer-input class="input--smallNumber"><span ng-if="switchPropertiesPortFormCtrl.aggregateMin !== switchPropertiesPortFormCtrl.aggregateMax" translate="DEVICE_PROPERTIES_VALUES_BETWEEN" translate-values="{            \'min\': switchPropertiesPortFormCtrl.aggregateMin,            \'max\': switchPropertiesPortFormCtrl.aggregateMax          }" class="appType--micro appType--quiet italicized"></span></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'dot1x-ctrl\', switchPropertiesPortFormCtrl.device.get(\'dot1x_portctrl_enabled\') &amp;&amp; [\'switch\', \'aggregate\'].indexOf(switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode) !== -1)" class="appFormGroup appFormGroup--cozy"><label translate="DEVICE_PROPERTIES_LABEL_8021X_CONTROL" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><div class="appInputGroup inlineBlock"><input type="radio" name="dot1xCtrl" id="port8021xCtrlAuto{{::directiveId}}" value="auto" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.dot1x_ctrl" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.dot1x_ctrl"><label for="port8021xCtrlAuto{{::directiveId}}" translate="DEVICE_PROPERTIES_SWITCH_PORT_VALUES_AUTO"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="dot1xCtrl" id="port8021xCtrlForceAuthorized{{::directiveId}}" value="force_authorized" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.dot1x_ctrl" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.dot1x_ctrl"><label for="port8021xCtrlForceAuthorized{{::directiveId}}" translate="DEVICE_PROPERTIES_SWITCH_PORT_VALUES_FORCE_AUTHORIZED"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="dot1xCtrl" id="port8021xCtrlForceUnauthorized{{::directiveId}}" value="force_unauthorized" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.dot1x_ctrl" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.dot1x_ctrl"><label for="port8021xCtrlForceUnauthorized{{::directiveId}}" translate="DEVICE_PROPERTIES_SWITCH_PORT_VALUES_FORCE_UNAUTHORIZED"></label></div><div ng-if="switchPropertiesPortFormCtrl.isBatch &amp;&amp; !switchPropertiesPortFormCtrl.modelCopy.attributes.dot1x_ctrl" class="appInputGroup inlineBlock"><input type="radio" name="dot1xCtrl" id="port8021xCtrlForceUnchanged{{::directiveId}}" ng-value="undefined" ng-model="switchPropertiesPortFormCtrl.modelCopy.attributes.dot1x_ctrl" ng-model-master="switchPropertiesPortFormCtrl.model.attributes.dot1x_ctrl"><label for="port8021xCtrlForceUnchanged{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></label></div></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'link-neg\', !switchPropertiesPortFormCtrl.isBatch &amp;&amp; switchPropertiesPortFormCtrl.model.get(\'media\'))" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_LINK_NEGOTIATION" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><div class="appInputGroup inlineBlock"><input type="radio" name="autoNeg" id="portLinkNegAuto{{::directiveId}}" value="auto" ng-model="switchPropertiesPortFormCtrl.portOverrideLinkNegCopy" ng-model-master="switchPropertiesPortFormCtrl.portOverrideLinkNeg"><label for="portLinkNegAuto{{::directiveId}}" translate="DEVICE_PROPERTIES_SWITCH_PORT_VALUES_LINK_NEGOTIATION_AUTO"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="autoNeg" id="portLinkNegManual{{::directiveId}}" value="manual" ng-model="switchPropertiesPortFormCtrl.portOverrideLinkNegCopy" ng-model-master="switchPropertiesPortFormCtrl.portOverrideLinkNeg"><label for="portLinkNegManual{{::directiveId}}" translate="DEVICE_PROPERTIES_SWITCH_PORT_VALUES_LINK_NEGOTIATION_MANUAL"></label></div></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'full-duplex\', switchPropertiesPortFormCtrl.portOverrideLinkNegCopy === \'manual\' &amp;&amp; [\'SFP\', \'SFP+\'].indexOf(switchPropertiesPortFormCtrl.model.get(\'media\')) === -1)" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_FULL_DUPLEX" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="enableFullDuplex" id="portFullDuplex{{::directiveId}}" ng-model="switchPropertiesPortFormCtrl.portOverrideFullDuplexCopy" ng-model-master="switchPropertiesPortFormCtrl.portOverrideFullDuplex"><label for="portFullDuplex{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_FULL_DUPLEX"></label></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'speed\', switchPropertiesPortFormCtrl.portOverrideLinkNegCopy === \'manual\')" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_LINK_SPEED" class="appLabel--primary"></label><div class="appInputGroup appInputGroup--cozy"><select name="linkSpeed" ng-model="switchPropertiesPortFormCtrl.portOverrideSpeedCopy" ng-model-master="switchPropertiesPortFormCtrl.portOverrideSpeed" ng-options="speed.value as speed.label for speed in switchPropertiesPortFormCtrl.speedOptions | filter:{isAvailable: true}" class="select--full"></select></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'isolation\', switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode !== \'aggregate\')" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_ISOLATION" class="appLabel--primary"></label><div ng-if="!switchPropertiesPortFormCtrl.isBatch" class="appInputGroup appInputGroup--comfy"><input type="checkbox" name="enableIsolation" id="portIsolation{{::directiveId}}" ng-model="switchPropertiesPortFormCtrl.portOverrideIsolationCopy" ng-model-master="switchPropertiesPortFormCtrl.portOverrideIsolation"><label for="portIsolation{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_ISOLATION"></label></div><div ng-if="switchPropertiesPortFormCtrl.isBatch" class="appInputGroup appInputGroup--comfy"><div class="appInputGroup inlineBlock"><input type="radio" name="enableIsolation" id="portIsolationUnchanged{{::directiveId}}" ng-value="undefined" ng-model="switchPropertiesPortFormCtrl.portOverrideIsolationCopy" ng-model-master="switchPropertiesPortFormCtrl.portOverrideIsolation"><label for="portIsolationUnchanged{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="enableIsolation" id="portIsolationDisabled{{::directiveId}}" ng-value="false" ng-model="switchPropertiesPortFormCtrl.portOverrideIsolationCopy" ng-model-master="switchPropertiesPortFormCtrl.portOverrideIsolation"><label for="portIsolationDisabled{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_DISABLE_ISOLATION"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="enableIsolation" id="portIsolationEnabled{{::directiveId}}" ng-value="true" ng-model="switchPropertiesPortFormCtrl.portOverrideIsolationCopy" ng-model-master="switchPropertiesPortFormCtrl.portOverrideIsolation"><label for="portIsolationEnabled{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_ENABLE_ISOLATION"></label></div></div></div><div ng-show="switchPropertiesPortFormCtrl.setVisibility(\'storm-control\', switchPropertiesPortFormCtrl.modelCopy.attributes.op_mode === \'switch\')" class="appFormGroup appFormGroup--condensed"><label translate="DEVICE_PROPERTIES_LABEL_STORM_CONTROL" class="appLabel--primary"></label><div ng-if="!switchPropertiesPortFormCtrl.isBatch" ng-repeat="type in [\'unicast\', \'multicast\', \'broadcast\']" class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="enableStormControl{{type}}" id="portStormControl{{type}}{{::directiveId}}" ng-model="switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]" ng-model-master="switchPropertiesPortFormCtrl.portOverrideStormControlEnabled[type]"><label for="portStormControl{{type}}{{::directiveId}}" translate="{{\'DEVICE_PROPERTIES_VALUES_\' + type | toTranslationKey}}"></label><input type="number" name="stormControl{{type}}Rate" ng-model="switchPropertiesPortFormCtrl.portOverrideStormControlRateCopy[type]" ng-model-master="switchPropertiesPortFormCtrl.portOverrideStormControlRate[type]" ng-disabled="!switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]" ng-required="switchPropertiesPortFormCtrl.getVisibility(\'storm-control\') &amp;&amp; switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]" min="{{switchPropertiesPortFormCtrl.getVisibility(\'storm-control\') ? switchPropertiesPortFormCtrl.castRateMin : \'\'}}" max="{{switchPropertiesPortFormCtrl.getVisibility(\'storm-control\') ? switchPropertiesPortFormCtrl.castRateMax : \'\'}}"><label ng-class="{\'is-label-disabled\': !switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]}">pkts/s</label><div ng-if="switchPropertiesPortFormCtrl.form[\'stormControl\' + type + \'Rate\'].$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: switchPropertiesPortFormCtrl.castRateMin, max: \'{{switchPropertiesPortFormCtrl.castRateMax | numberToString}}\'}" class="appInputFeedback appInputFeedback--danger"></div></div><div ng-if="switchPropertiesPortFormCtrl.isBatch" ng-repeat="type in [\'unicast\', \'multicast\', \'broadcast\']" class="appInputGroup appInputGroup--cozy"><div class="appInputGroup inlineBlock"><label translate="{{\'DEVICE_PROPERTIES_VALUES_\' + type | toTranslationKey}}"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="enableStormControl{{type}}" id="stormControlUnchanged{{type}}{{::directiveId}}" ng-value="undefined" ng-model="switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]" ng-model-master="switchPropertiesPortFormCtrl.portOverrideStormControlEnabled[type]"><label for="stormControlUnchanged{{type}}{{::directiveId}}" translate="DEVICE_PROPERTIES_VALUES_KEEP_EXISTING"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="enableStormControl{{type}}" id="stormControlDisabled{{type}}{{::directiveId}}" ng-value="false" ng-model="switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]" ng-model-master="switchPropertiesPortFormCtrl.portOverrideStormControlEnabled[type]"><label for="stormControlDisabled{{type}}{{::directiveId}}" translate="COMMON_LABEL_DISABLED"></label></div><div class="appInputGroup inlineBlock"><input type="radio" name="enableStormControl{{type}}" id="stormControlEnabled{{type}}{{::directiveId}}" ng-value="true" ng-model="switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]" ng-model-master="switchPropertiesPortFormCtrl.portOverrideStormControlEnabled[type]"><label for="stormControlEnabled{{type}}{{::directiveId}}" translate="COMMON_LABEL_ENABLED"></label><input type="number" name="stormControl{{type}}Rate" ng-model="switchPropertiesPortFormCtrl.portOverrideStormControlRateCopy[type]" ng-model-master="switchPropertiesPortFormCtrl.portOverrideStormControlRate[type]" ng-disabled="!switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]" ng-required="switchPropertiesPortFormCtrl.getVisibility(\'storm-control\') &amp;&amp; switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]" min="{{switchPropertiesPortFormCtrl.getVisibility(\'storm-control\') ? switchPropertiesPortFormCtrl.castRateMin : \'\'}}" max="{{switchPropertiesPortFormCtrl.getVisibility(\'storm-control\') ? switchPropertiesPortFormCtrl.castRateMax : \'\'}}"><label ng-class="{\'is-label-disabled\': !switchPropertiesPortFormCtrl.portOverrideStormControlEnabledCopy[type]}">pkts/s</label><div ng-if="switchPropertiesPortFormCtrl.form[\'stormControl\' + type + \'Rate\'].$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: switchPropertiesPortFormCtrl.castRateMin, max: \'{{switchPropertiesPortFormCtrl.castRateMax | numberToString}}\'}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div></fieldset><div class="appFormFooter appFormFooter--cozy appFormFooter--flush appFormFooter--transparent verticalRhythmTop--cozy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="switchPropertiesPortFormCtrl.showValidation = true" busy-toggle="switchPropertiesPortFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--condensed savePort">{{\'COMMON_ACTIONS_APPLY\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--transparent appMainButton--condensed cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary appMainButton--condensed cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),
b.join("")}},{"jade/runtime":232}],856:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesPortForm",[function(){return{scope:{models:"=unifiSwitchPropertiesPortForm",device:"=unifiSwitchPropertiesPortFormDevice",onSave:"&unifiSwitchPropertiesPortFormOnSave",onCancel:"&unifiSwitchPropertiesPortFormOnCancel",isOpen:"=unifiSwitchPropertiesPortFormIsOpen",isReadOnly:"=unifiSwitchPropertiesPortFormIsReadOnly"},controller:"SwitchPropertiesPortFormController",controllerAs:"switchPropertiesPortFormCtrl",template:a("./switchPropertiesPortForm.jade")(),link:function(a,b,c,d){a.directiveId=a.$id,a.onSubmit=function(b){b===!0&&a.onSave()};var e=a.$watch("device",function(a){a&&(d.updateDevice(a),e())});a.$watch("models",function(a){d.updateModels(a)}),a.$on("$destroy",function(){d.removeEventHandlers(),d.removeDeviceEventHandlers()})}}}])},{"./switchPropertiesPortForm.jade":855}],857:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.skipInitialization=!0,this.isAdmin=f.isAdmin.bind(f),this.switchUtils=d,this.filter=new b,this.defaultSortBy="port_idx",e.call(this,a,c)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){this.filter.removeAttributeFilter("attr_no_edit"),this.filter.addAttributeFilter("attr_no_edit",!0,{negate:!0})},d.prototype.updateModel=function(a){this.model=a},d.prototype.updateCollection=function(a){this.destroyView(),this.collection=a,this.initFilters(),this.initView()},d.prototype.getCollection=function(){return this.collection},d.prototype.cancelEdit=function(){this.showEditForm=!1,this.editModels=null},d.prototype.edit=function(a){this.showEditForm=!0,this.editModels=[a]},d.prototype.editBatch=function(a){this.showEditForm=!0,this.editModels=a},d.$inject=["$q","SimpleModelFilter","CollectionView","switchUtils","account"],angular.module("app-unifi-manage").controller("SwitchPropertiesPortListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],858:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-switch="switchPropertiesPortListCtrl.showEditForm" class="unifiPanelItemContent__section appScrollable flexFlag__body fullWidth"><div ng-switch-when="true" unifi-switch-properties-port-form="switchPropertiesPortListCtrl.editModels" unifi-switch-properties-port-form-device="switchPropertiesPortListCtrl.model" unifi-switch-properties-port-form-on-save="switchPropertiesPortListCtrl.cancelEdit()" unifi-switch-properties-port-form-on-cancel="switchPropertiesPortListCtrl.cancelEdit()" unifi-switch-properties-port-form-is-read-only="!switchPropertiesPortListCtrl.isAdmin()" unifi-switch-properties-port-form-is-open="isOpen"></div><div ng-switch-default><table class="noMarginBottom appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--condensed appTable--minor appTable--transparent appForm appForm--cozy"><thead><tr><th ng-if="attrs.withStateIcon" class="portStateIcon">&nbsp;</th><td ng-if="attrs.withBatchEdit &amp;&amp; switchPropertiesPortListCtrl.view.getModels().length" ng-show="switchPropertiesPortListCtrl.isAdmin()" class="portCheckbox"><input type="checkbox" ng-model="attrs.selectAllPorts" ng-change="toggleSelectAllPorts()" class="appCheckbox--condensed"></td><th class="portIndex"><span translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_HEADER_PORT"></span></th><th class="portName"><span translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_HEADER_NAME"></span></th><th class="portStatus"><span translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_HEADER_STATUS"></span></th><th class="portTx hide-if-docked"><span translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_HEADER_TX"></span></th><th class="portRx hide-if-docked"><span translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_HEADER_RX"></span></th><th ng-if="attrs.isPoeSupported" class="portPoe"><span translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_HEADER_POE"></span></th><th class="portNetworksVlans hide-if-docked"><span translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_HEADER_NETWORKS_VLANS"></span></th><th class="portActions"><span translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_HEADER_ACTIONS" class="visible--smUp"></span></th></tr></thead><tfoot unifi-if-role-admin unifi-if-role-admin-and="switchPropertiesPortListCtrl.view.getModels().length &amp;&amp; attrs.withBatchEdit"><td colspan="10"><button ng-click="switchPropertiesPortListCtrl.editBatch(getSelectedPorts())" ng-disabled="!attrs.isBatchEditable" class="appMainButton appMainButton--tertiary appMainButton--condensed verticalRhythmTop--condensed editBatchPorts"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT_SELECTED"></span></button></td></tfoot><tbody><tr collection-view-repeat="model in switchPropertiesPortListCtrl.view.getModels()" ng-attr-id="portRow{{switchPropertiesPortListCtrl.model.get(\'_id\')}}-{{::model.get(\'port_idx\')}}" ng-class="{\'is-row-selected\': highlightedPort === model.get(\'port_idx\')}" ng-click="toggleHighlightedPort(model)" class="clickable"><td ng-if="attrs.withStateIcon" class="portStateIcon"><unifi-switch-port-diagram unifi-switch-port-diagram-port-model="::model" unifi-switch-port-diagram-fixed-size="cozy"></unifi-switch-port-diagram></td><td ng-if="attrs.withBatchEdit" ng-show="switchPropertiesPortListCtrl.isAdmin()" class="portCheckbox"><input type="checkbox" ng-model="selectedPorts[model.get(\'port_idx\')]" ng-disabled="!isPortSelectable({model: model})" class="appCheckbox--condensed"></td><td class="portIndex">{{::switchPropertiesPortListCtrl.switchUtils.getPortIndex(model)}}</td><td class="portName appTableCell--truncated">{{::model.get(\'name\')}}</td><td class="portStatus allowWrap">{{::switchPropertiesPortListCtrl.switchUtils.getPortStatus(model)}}</td><td class="portTx hide-if-docked">{{::model.get(\'tx_bytes\') | bytes}}</td><td class="portRx hide-if-docked">{{::model.get(\'rx_bytes\') | bytes}}</td><td ng-if="attrs.isPoeSupported" class="portPoe">{{::switchPropertiesPortListCtrl.switchUtils.getPortPoeModeText(model)}}</td><td class="portNetworkVlans hide-if-docked">{{::switchPropertiesPortListCtrl.switchUtils.getPortNetworksVlans(model)}}</td><td class="portActions appTableCell--actions"><button unifi-if-role-admin unifi-if-role-admin-and="!model.get(\'masked\') &amp;&amp; !model.get(\'attr_no_edit\')" ng-click="switchPropertiesPortListCtrl.edit(model)" title="{{\'COMMON_ACTIONS_EDIT\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span></button><button unifi-if-role-admin="false" unifi-if-role-admin-and="!model.get(\'masked\')" ng-click="switchPropertiesPortListCtrl.edit(model)" title="{{\'COMMON_ACTIONS_VIEW\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span></button><button unifi-if-role-admin unifi-if-role-admin-and="model.get(\'poe_enable\') === true" unifi-switch-port-button-power-cycle="::model" unifi-switch-port-button-power-cycle-is-labeled="false" class="appMainButton appMainButton--tertiary appMainButton--condensed"></button></td></tr></tbody></table><div ng-if="!switchPropertiesPortListCtrl.view.getModels().length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTopQuarter"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="DEVICE_PROPERTIES_SWITCH_PORTS_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],859:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchPropertiesPortList",["deviceFeatureUtils",function(b){return{scope:{model:"=unifiSwitchPropertiesPortListModel",ports:"=unifiSwitchPropertiesPortListCollection",togglePortSelection:"&unifiSwitchPropertiesPortListTogglePortSelection",isPortSelectable:"&unifiSwitchPropertiesPortListIsPortSelectable",isPortSelected:"&unifiSwitchPropertiesPortListIsPortSelected",isEditingPorts:"=?unifiSwitchPropertiesPortListIsEditingPorts",highlightedPort:"=unifiSwitchPropertiesPortListHighlightedPort",editedPort:"=unifiSwitchPropertiesPortListEditedPort",withBatchEdit:"=?unifiSwitchPropertiesPortListWithBatchEdit",withStateIcon:"=?unifiSwitchPropertiesPortListWithStateIcon",isOpen:"=unifiSwitchPropertiesPortListIsOpen"},controller:"SwitchPropertiesPortListController",controllerAs:"switchPropertiesPortListCtrl",restrict:"E",replace:!0,template:a("./switchPropertiesPortList.jade")(),link:function(a,c,d,e){a.selectedPorts={},a.attrs={withStateIcon:a.withStateIcon,withBatchEdit:a.withBatchEdit,selectAllPorts:!1,isBatchEditable:!1,isPoeSupported:!1},a.$watch("model",function(c){e.updateModel(c),c&&(a.attrs.isPoeSupported=b.getModelFeature(c,"poe")===!0)}),a.$watch("ports",function(a){e.updateCollection(a)}),a.$watch("editedPort",function(a){a?e.edit(a):null===a&&e.cancelEdit()}),a.$watch(function(){return e.showEditForm},function(b){a.isEditingPorts=!!b}),a.$on("$destroy",function(){e.destroyView()}),a.$on("portSelectionChange",function(){a.initSelectedPorts()}),a.$watchCollection("selectedPorts",function(b){a.attrs.isBatchEditable=!1,a.ports&&a.ports.each(function(c){var d=a.togglePortSelection({model:c,isSelected:!!b[c.get("port_idx")]});d&&(a.attrs.isBatchEditable=!0)})}),a.initSelectedPorts=function(){var b=!1;a.attrs.isBatchEditable=!1,a.ports&&a.ports.each(function(c){a.isPortSelected({model:c})?(a.attrs.isBatchEditable=!0,a.selectedPorts[c.get("port_idx")]=!0):(a.selectedPorts[c.get("port_idx")]=!1,b=!0)}),b||(a.attrs.selectAllPorts=!0)},a.getSelectedPorts=function(){var b=[];return a.ports&&a.ports.each(function(c){a.isPortSelected({model:c})&&b.push(c)}),b},a.toggleSelectAllPorts=function(){a.ports&&a.ports.each(function(b){a.togglePortSelection({model:b,isSelected:!!a.attrs.selectAllPorts})})},a.setHighlightedPort=function(b){a.highlightedPort=b.get("port_idx")},a.toggleHighlightedPort=function(b){a.highlightedPort===b.get("port_idx")?a.highlightedPort=null:a.highlightedPort=b.get("port_idx")},a.initSelectedPorts()}}}])},{"./switchPropertiesPortList.jade":858}],860:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p){this.$translate=b,this.columnStore=n,this.devices=c,this.DEVICE_TYPES=d,this.INSIGHTS_DEFAULTS=f,this.frame=h,this.heyToasts=i,this.switches=k,this.switchStats=l,this.switchUtils=p,this.isColumnVisible=this.columnStore.isColumnVisible.bind(this.columnStore),this.isCustomized=this.columnStore.getCustomized.bind(this.columnStore),this.isPowerDeviceDetected=p.isPowerDeviceDetected.bind(p),this.getDevice=p.getPortDevice.bind(p),this.getSwitchPortNetworksVlans=p.getPortNetworksVlans.bind(p),this.getSwitchPortOperationMode=p.getPortOperationMode.bind(p),this.getSwitchPortPoeDetection=p.getPortPoeDetection.bind(p),this.getSwitchPortPoeModeText=p.getPortPoeModeText.bind(p),this.getSwitchPortPoeVoltage=p.getPortPoeVoltage.bind(p),this.getSwitchPortStatus=p.getPortStatus.bind(p),this.getSwitchPortStpStatus=p.getPortStpStatus.bind(p),this.getRxLinkUsage=p.getRxLinkUsage.bind(p),this.getTxLinkUsage=p.getTxLinkUsage.bind(p),this.isAdoptedSwitch=p.isAdoptedSwitch.bind(p),this.comparator=m,this.filter=new o,this.defaultSortBy="port_idx",this.filterGroups=[],this.viewGroups=[],e.call(this,a,g,j)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){var a=this.listState.getFilter("device");"all"!==a&&(this.filter.setSwitchFilter(a),this.selectedSwitch=this.devices.repository.collection.get(a));var b=this.listState.getFilter("linkStatus");"all"!==b&&this.filter.setLinkStatusFilter(b),this.columnGroup=this.listState.getFilter("view"),this.isFiltered=this.filter.isFiltered.bind(this.filter),this.getSwitchFilter=this.filter.getSwitchFilter.bind(this.filter),this.hasSwitchFilter=this.filter.hasSwitchFilter.bind(this.filter),this.getLinkStatusFilter=this.filter.getLinkStatusFilter.bind(this.filter),this.hasLinkStatusFilter=this.filter.hasLinkStatusFilter.bind(this.filter),this.initFilterView()},d.prototype.initFilterView=function(){var a=this.switchUtils.getAdoptedSwitches();if(a.length>1){var b={id:"switch",translationKey:"SWITCH_STATS_FILTER_TITLE_SWITCH",items:[{id:"all",translationKey:"SWITCH_STATS_FILTER_ALL_SWITCHES",excludeFromSummary:!0,isSelected:function(){return!this.hasSwitchFilter()}.bind(this),onSelect:function(){return this.clearSwitchFilter()}.bind(this)}]};a.forEach(function(a){b.items.push({id:a.id,label:a.getDisplayName(),excludeFromSummary:!1,isSelected:function(){return this.getSwitchFilter()===a.id}.bind(this),onSelect:function(){return this.setSwitchFilter(a.id)}.bind(this)})}.bind(this)),this.filterGroups.push(b)}this.linkStatuses=[{id:"all",translationKey:"SWITCH_STATS_FILTER_LINK_STATUS_ALL",excludeFromSummary:!0,isSelected:function(){return!this.hasLinkStatusFilter()}.bind(this),onSelect:function(){return this.clearLinkStatusFilter()}.bind(this)},{id:"connected",translationKey:"SWITCH_STATS_FILTER_LINK_STATUS_CONNECTED",excludeFromSummary:!1,isSelected:function(){return"connected"===this.getLinkStatusFilter()}.bind(this),onSelect:function(){return this.setLinkStatusFilter("connected")}.bind(this)},{id:"disconnected",translationKey:"SWITCH_STATS_FILTER_LINK_STATUS_DISCONNECTED",excludeFromSummary:!1,isSelected:function(){return"disconnected"===this.getLinkStatusFilter()}.bind(this),onSelect:function(){return this.setLinkStatusFilter("disconnected")}.bind(this)}],this.filterGroups.push({id:"linkStatus",translationKey:"SWITCH_STATS_FILTER_LINK_STATUS_TITLE",items:this.linkStatuses}),this.viewGroups.push({id:"columnGroup",translationKey:"SWITCH_STATS_TITLE_VIEW",excludeFromSummary:!0,isVisible:function(){return!this.columnStore.getCustomized()}.bind(this),items:[{id:"overview",translationKey:"SWITCH_STATS_PRESET_OVERVIEW",isSelected:function(){return"overview"===this.getColumnGroup()}.bind(this),onSelect:function(){return this.setColumnGroup("overview")}.bind(this)},{id:"poe",translationKey:"SWITCH_STATS_PRESET_POE",isSelected:function(){return"poe"===this.getColumnGroup()}.bind(this),onSelect:function(){return this.setColumnGroup("poe")}.bind(this)},{id:"counters",translationKey:"SWITCH_STATS_PRESET_COUNTERS",isSelected:function(){return"counters"===this.getColumnGroup()}.bind(this),onSelect:function(){return this.setColumnGroup("counters")}.bind(this)}]})},d.prototype.getCollection=function(){return this.switchStats.repository.collection},d.prototype.getPortPropertyPanelState=function(a){return[{state:"port",value:a.get("port_idx"),overwrite:!0}]},d.prototype.getEditPortPropertyPanelState=function(a){return[{state:"editPort",value:a.get("port_idx"),overwrite:!0}]},d.prototype.getActiveLinkStatusTranslationData=function(){var a=this.hasLinkStatusFilter()?this.getLinkStatusFilter():"all",b=this.linkStatuses.find(function(b){return b.id===a});return{status:this.$translate.instant(b.translationKey)}},d.prototype.clearSwitchFilter=function(){this.beginStateChange(),this.listState.removeFilter("device"),this.filter.clearSwitchFilter(),this.commitStateChange()},d.prototype.setSwitchFilter=function(a){this.beginStateChange(),this.listState.addFilter("device",a),this.filter.setSwitchFilter(a),this.commitStateChange()},d.prototype.clearLinkStatusFilter=function(){this.beginStateChange(),this.listState.removeFilter("linkStatus"),this.filter.clearLinkStatusFilter(),this.commitStateChange()},d.prototype.setLinkStatusFilter=function(a){this.beginStateChange(),this.listState.addFilter("linkStatus",a),this.filter.setLinkStatusFilter(a),this.commitStateChange()},d.prototype.getColumnGroup=function(){return this.columnGroup},d.prototype.setColumnGroup=function(a){this.beginStateChange(),this.listState.addFilter("view",a),this.columnGroup=a,this.commitStateChange()},d.prototype.isDeviceColumnVisible=function(){return!!this.isColumnVisible("device")&&(this.switchUtils.getAdoptedSwitches().length>1&&!this.filter.hasSwitchFilter()||this.isCustomized())},d.prototype.refreshColumns=function(){this.isStateChanging()||(this.columnStore.setColumnGroup(this.columnGroup),this.columnStore.setColumns())},d.prototype.refresh=function(a){return this.refreshColumns(),e.prototype.refresh.call(this,a)},d.prototype.clearCounters=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_SWITCH_CLEAR_COUNTERS_CONFIRM_TITLE",{deviceName:a.getDisplayName()})}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_SWITCH_CLEAR_COUNTERS_CONFIRM_MESSAGE",{deviceName:a.getDisplayName()})}.bind(this),options:angular.noop}).then(function(){return this.switches.clearCounters(a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))}.bind(this))},d.prototype.clearAllCounters=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_SWITCH_CLEAR_ALL_COUNTERS_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_ACTIONS_SWITCH_CLEAR_ALL_COUNTERS_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.switches.clearAllCounters().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))}.bind(this))},d.$inject=["$injector","$translate","devices","DEVICE_TYPES","INSIGHTS_DEFAULTS","CollectionView","frame","heyToasts","preferences","switches","switchStats","switchStatsComparator","switchStatsListColumnStore","SwitchStatsFilter","switchUtils"],angular.module("app-unifi-manage").controller("SwitchStatsListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],861:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div ng-init="switches = switchStatsListCtrl.switchUtils.getAdoptedSwitches();" class="appActionBar__left"><div class="appActionBarFilters visible--lgUp"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="switchStatsListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div><unifi-ui-list-filter-buttons unifi-ui-list-filter-buttons-config="switchStatsListCtrl.viewGroups"></unifi-ui-list-filter-buttons><div ng-if="switches.length &gt; 1" class="appActionBarFilter"><unifi-select-device-dropdown-list style="width: 270px" unifi-select-device-dropdown-list-selected-model="switchStatsListCtrl.selectedSwitch" unifi-select-device-dropdown-list-is-required="false" unifi-select-device-dropdown-list-device-filter="switchStatsListCtrl.isAdoptedSwitch(model)" unifi-select-device-dropdown-list-is-cozy="true" unifi-select-device-dropdown-list-on-select="switchStatsListCtrl.setSwitchFilter(model.id)"></unifi-select-device-dropdown-list></div><div class="appActionBarFilter"><div ng-click="switchStatsListCtrl.isLinkStatusDropdownVisible = !switchStatsListCtrl.isLinkStatusDropdownVisible" on-outside-element-click="switchStatsListCtrl.isLinkStatusDropdownVisible = false" class="appMainButton appMainButton--filter appMainButton--cozy appMainButton--withDropdown">{{\'SWITCH_STATS_FILTER_LINK_STATUS\' | translate:switchStatsListCtrl.getActiveLinkStatusTranslationData()}}<span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{\'is-dropdown-visible\': switchStatsListCtrl.isLinkStatusDropdownVisible}" class="appDropdown appDropdown--left appDropdown--inButton"><li ng-repeat="linkStatus in switchStatsListCtrl.linkStatuses" ng-click="linkStatus.id !== \'all\' ? switchStatsListCtrl.setLinkStatusFilter(linkStatus.id) : switchStatsListCtrl.clearLinkStatusFilter()" class="appDropdown__item">{{linkStatus.translationKey | translate}}</li></ul></div></div></div><div class="appActionBarFilters visible--mdDown"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="switchStatsListCtrl.INSIGHTS_DEFAULTS.STATES"></unifi-state-switcher></div><unifi-ui-list-filter-dropdown unifi-ui-list-filter-dropdown-config="switchStatsListCtrl.filterGroups" unifi-ui-list-filter-dropdown-filter-by-label="{{\'COMMON_LABEL_FILTER_BY\' | translate}}" unifi-ui-list-filter-dropdown-filter-by-all-label="{{\'COMMON_LABEL_FILTER_ALL\' | translate}}"></unifi-ui-list-filter-dropdown></div></div><div class="appActionBar__right"><div class="appActionBarFilters"><div class="appActionBarFilter"><button unifi-if-role-admin unifi-if-role-admin-and="switches.length === 1" ng-click="switchStatsListCtrl.clearAllCounters()" class="appMainButton appMainButton--primary appMainButton--cozy">{{\'SWITCH_STATS_FILTER_ACTIONS_CLEAR_COUNTERS_CLEAR_ALL\' | translate}}</button><div unifi-if-role-admin unifi-if-role-admin-and="switches.length &gt; 1" ng-click="switchStatsListCtrl.isClearCountersDropdownVisible = !switchStatsListCtrl.isClearCountersDropdownVisible" on-outside-element-click="switchStatsListCtrl.isClearCountersDropdownVisible = false" class="appMainButton appMainButton--primary appMainButton--cozy appMainButton--withDropdown">{{\'SWITCH_STATS_FILTER_ACTIONS_CLEAR_COUNTERS\' | translate}}<span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{\'is-dropdown-visible\': switchStatsListCtrl.isClearCountersDropdownVisible}" class="appDropdown appDropdown--left appDropdown--inButton"><li translate="SWITCH_STATS_FILTER_ACTIONS_CLEAR_COUNTERS_ALL" ng-click="switchStatsListCtrl.clearAllCounters()" class="appDropdown__item"></li><li ng-repeat="switch in switches" ng-click="switchStatsListCtrl.clearCounters(switch)" class="appDropdown__item">{{switch.getDisplayName()}}</li></ul></div></div><div class="appActionBarFilter appActionBarFilter--search"><unifi-search unifi-search-on-change="switchStatsListCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="switchStatsListCtrl.view.isRefreshing()"></unifi-search></div></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><table id="switchStatsListTable" collection-view-sort="switchStatsListCtrl.view" ng-class="{          \'is-not-responsive\': switchStatsListCtrl.columnStore.getCustomized() || !switchStatsListCtrl.isResponsive()        }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th class="switchStatsPortStateIcon">&nbsp;</th><th collection-view-sort-by="port_idx" class="switchStatsPort"><span translate="SWITCH_STATS_TABLE_HEADER_PORT"></span></th><th collection-view-sort-by="device" ng-if="switchStatsListCtrl.isDeviceColumnVisible()" class="switchStatsDevice"><span translate="SWITCH_STATS_TABLE_HEADER_DEVICE"></span></th><th collection-view-sort-by="name" ng-if="switchStatsListCtrl.isColumnVisible(\'name\')" class="switchStatsName"><span translate="SWITCH_STATS_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="poe_mode" ng-if="switchStatsListCtrl.isColumnVisible(\'poeMode\')" class="switchStatsPoeMode visible--mdUp"><span translate="SWITCH_STATS_TABLE_HEADER_POE_MODE"></span></th><th collection-view-sort-by="poe_detection" ng-if="switchStatsListCtrl.isColumnVisible(\'poeDetection\')" class="switchStatsPoeDetection"><span translate="SWITCH_STATS_TABLE_HEADER_POE_DETECTION"></span></th><th collection-view-sort-by="poe_class" ng-if="switchStatsListCtrl.isColumnVisible(\'poeClass\')" class="switchStatsPoeClass"><span translate="SWITCH_STATS_TABLE_HEADER_POE_CLASS"></span></th><th collection-view-sort-by="poe_power" ng-if="switchStatsListCtrl.isColumnVisible(\'poePower\')" class="switchStatsPoePower"><span translate="SWITCH_STATS_TABLE_HEADER_POE_POWER"></span></th><th collection-view-sort-by="poe_voltage" ng-if="switchStatsListCtrl.isColumnVisible(\'poeVoltage\')" class="switchStatsPoeVoltage"><span translate="SWITCH_STATS_TABLE_HEADER_POE_VOLTAGE"></span></th><th collection-view-sort-by="poe_current" ng-if="switchStatsListCtrl.isColumnVisible(\'poeCurrent\')" class="switchStatsPoeCurrent"><span translate="SWITCH_STATS_TABLE_HEADER_POE_CURRENT"></span></th><th collection-view-sort-by="op_mode" ng-if="switchStatsListCtrl.isColumnVisible(\'operationMode\')" class="switchStatsOperationMode visible--lgUp"><span translate="SWITCH_STATS_TABLE_HEADER_OPERATION_MODE"></span></th><th collection-view-sort-by="networks_vlans" ng-if="switchStatsListCtrl.isColumnVisible(\'networksVlans\')" class="switchStatsNetworksVlans visible--lgUp"><span translate="SWITCH_STATS_TABLE_HEADER_NETWORKS_VLANS"></span></th><th collection-view-sort-by="link_status" ng-if="switchStatsListCtrl.isColumnVisible(\'linkStatus\')" class="switchStatsLinkStatus visible--mdUp"><span translate="SWITCH_STATS_TABLE_HEADER_LINK_STATUS"></span></th><th collection-view-sort-by="stp_state" ng-if="switchStatsListCtrl.isColumnVisible(\'stp\')" class="switchStatsStp visible--lgUp"><span translate="SWITCH_STATS_TABLE_HEADER_STP"></span></th><th collection-view-sort-by="tx_bytes" ng-if="switchStatsListCtrl.isColumnVisible(\'tx\')" class="switchStatsTx"><span translate="SWITCH_STATS_TABLE_HEADER_TX"></span></th><th collection-view-sort-by="tx_bytes" ng-if="switchStatsListCtrl.isColumnVisible(\'txBytes\')" class="switchStatsTxBytes"><span translate="SWITCH_STATS_TABLE_HEADER_TX_BYTES"></span></th><th collection-view-sort-by="tx_packets" ng-if="switchStatsListCtrl.isColumnVisible(\'txPackets\')" class="switchStatsTxPackets"><span translate="SWITCH_STATS_TABLE_HEADER_TX_PACKETS"></span></th><th collection-view-sort-by="tx_multicast" ng-if="switchStatsListCtrl.isColumnVisible(\'txMulticast\')" class="switchStatsTxMulticast"><span translate="SWITCH_STATS_TABLE_HEADER_TX_MULTICAST"></span></th><th collection-view-sort-by="tx_broadcast" ng-if="switchStatsListCtrl.isColumnVisible(\'txBroadcast\')" class="switchStatsTxBroadcast"><span translate="SWITCH_STATS_TABLE_HEADER_TX_BROADCAST"></span></th><th collection-view-sort-by="tx_errors" ng-if="switchStatsListCtrl.isColumnVisible(\'txErrors\')" class="switchStatsTxErrors"><span translate="SWITCH_STATS_TABLE_HEADER_TX_ERRORS"></span></th><th collection-view-sort-by="rx_bytes" ng-if="switchStatsListCtrl.isColumnVisible(\'rx\')" class="switchStatsRx"><span translate="SWITCH_STATS_TABLE_HEADER_RX"></span></th><th collection-view-sort-by="rx_bytes" ng-if="switchStatsListCtrl.isColumnVisible(\'rxBytes\')" class="switchStatsRxBytes"><span translate="SWITCH_STATS_TABLE_HEADER_RX_BYTES"></span></th><th collection-view-sort-by="rx_packets" ng-if="switchStatsListCtrl.isColumnVisible(\'rxPackets\')" class="switchStatsRxPackets"><span translate="SWITCH_STATS_TABLE_HEADER_RX_PACKETS"></span></th><th collection-view-sort-by="rx_multicast" ng-if="switchStatsListCtrl.isColumnVisible(\'rxMulticast\')" class="switchStatsRxMulticast"><span translate="SWITCH_STATS_TABLE_HEADER_RX_MULTICAST"></span></th><th collection-view-sort-by="rx_broadcast" ng-if="switchStatsListCtrl.isColumnVisible(\'rxBroadcast\')" class="switchStatsRxBroadcast"><span translate="SWITCH_STATS_TABLE_HEADER_RX_BROADCAST"></span></th><th collection-view-sort-by="rx_errors" ng-if="switchStatsListCtrl.isColumnVisible(\'rxErrors\')" class="switchStatsRxErrors"><span translate="SWITCH_STATS_TABLE_HEADER_RX_ERRORS"></span></th><th collection-view-sort-by="tx_bytes-r" ng-if="switchStatsListCtrl.isColumnVisible(\'txRate\')" class="switchStatsTxRate"><span translate="SWITCH_STATS_TABLE_HEADER_TX_RATE"></span></th><th collection-view-sort-by="rx_bytes-r" ng-if="switchStatsListCtrl.isColumnVisible(\'rxRate\')" class="switchStatsRxRate"><span translate="SWITCH_STATS_TABLE_HEADER_RX_RATE"></span></th><th collection-view-sort-by="bytes-r" ng-if="switchStatsListCtrl.isColumnVisible(\'activity\')" class="switchStatsActivity visible--mdUp"><span translate="SWITCH_STATS_TABLE_HEADER_ACTIVITY"></span></th><th class="switchStatsActions appTableCell--withAction"><span translate="SWITCH_STATS_TABLE_HEADER_ACTIONS"></span><unifi-list-column-selector unifi-list-column-selector-column-store="switchStatsListCtrl.columnStore"></unifi-list-column-selector></th></tr></thead><tfoot ng-if="switchStatsListCtrl.view.getModels().length"><tr><td colspan="{{switchStatsListCtrl.columnStore.getColumns().length + 3}}"><unifi-list-pagination unifi-list-pagination-current-page="switchStatsListCtrl.currentPage" unifi-list-pagination-rows-per-page="switchStatsListCtrl.rowsPerPage" unifi-list-pagination-total-rows="switchStatsListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in switchStatsListCtrl.view.getModels(),              startFrom (switchStatsListCtrl.currentPage - 1) * switchStatsListCtrl.rowsPerPage,              limitTo switchStatsListCtrl.rowsPerPage" collection-view-repeat-watch="switchStatsListCtrl.columnStore.getColumns()" data-id="{{::model.id}}" ng-init="device = switchStatsListCtrl.getDevice(model); states = switchStatsListCtrl.getPortPropertyPanelState(model); isPowerDeviceDetected = switchStatsListCtrl.isPowerDeviceDetected(model);" unifi-open-panel="::device" unifi-open-panel-active-tab="\'ports\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="::states" class="clickable"><td class="switchStatsPortStateIcon appTableCell--smash noPaddingRight"><unifi-switch-port-diagram unifi-switch-port-diagram-port-model="::model" unifi-switch-port-diagram-fixed-size="cozy"></unifi-switch-port-diagram></td><td class="switchStatsPort">{{::model.get(\'port_idx\')}}</td><td ng-if="::switchStatsListCtrl.isDeviceColumnVisible()" class="switchStatsDevice">{{::device.getDisplayName()}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'name\')" class="switchStatsName">{{::model.get(\'name\')}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'poeMode\')" class="switchStatsPoeMode visible--mdUp">{{::switchStatsListCtrl.getSwitchPortPoeModeText(model)}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'poeDetection\')" class="switchStatsPoeDetection">{{::switchStatsListCtrl.getSwitchPortPoeDetection(model)}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'poeClass\')" class="switchStatsPoeClass"><span ng-if="::isPowerDeviceDetected">{{::model.get(\'poe_class\')}}</span></td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'poePower\')" class="switchStatsPoePower"><span ng-if="::isPowerDeviceDetected">{{::model.get(\'poe_power\')}}W</span></td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'poeVoltage\')" ng-init="voltage = switchStatsListCtrl.getSwitchPortPoeVoltage(model);" class="switchStatsPoeVoltage"><span ng-if="::voltage">{{::voltage}}V</span></td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'poeCurrent\')" class="switchStatsPoeCurrent"><span ng-if="::isPowerDeviceDetected">{{::model.get(\'poe_current\')}}mA</span></td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'operationMode\')" class="switchStatsOperationMode visible--lgUp">{{::switchStatsListCtrl.getSwitchPortOperationMode(model)}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'networksVlans\')" class="switchStatsNetworksVlans visible--lgUp">{{::switchStatsListCtrl.getSwitchPortNetworksVlans(model)}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'linkStatus\')" class="switchStatsLinkStatus visible--mdUp">{{::switchStatsListCtrl.getSwitchPortStatus(model)}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'stp\')" class="switchStatsStp visible--lgUp">{{::switchStatsListCtrl.getSwitchPortStpStatus(model)}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'tx\')" class="switchStatsTx">{{::model.get(\'tx_bytes\') | bytes}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'txBytes\')" class="switchStatsTxBytes">{{::model.get(\'tx_bytes\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'txPackets\')" class="switchStatsTxPackets">{{::model.get(\'tx_packets\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'txMulticast\')" class="switchStatsTxMulticast">{{::model.get(\'tx_multicast\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'txBroadcast\')" class="switchStatsTxBroadcast">{{::model.get(\'tx_broadcast\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'txErrors\')" class="switchStatsTxErrors">{{::model.get(\'tx_errors\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'rx\')" class="switchStatsRx">{{::model.get(\'rx_bytes\') | bytes}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'rxBytes\')" class="switchStatsRxBytes">{{::model.get(\'rx_bytes\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'rxPackets\')" class="switchStatsRxPackets">{{::model.get(\'rx_packets\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'rxMulticast\')" class="switchStatsRxMulticast">{{::model.get(\'rx_multicast\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'rxBroadcast\')" class="switchStatsRxBroadcast">{{::model.get(\'rx_broadcast\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'rxErrors\')" class="switchStatsRxErrors">{{::model.get(\'rx_errors\') | orEmpty}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'txRate\')" class="switchStatsTxRate">{{::model.get(\'tx_bytes-r\') | bps}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'rxRate\')" class="switchStatsRxRate">{{::model.get(\'rx_bytes-r\') | bps}}</td><td ng-if="::switchStatsListCtrl.isColumnVisible(\'activity\')" class="switchStatsActivity visible--mdUp noLineHeight"><div ng-if="::model.get(\'up\')"><div unifi-link-usage="::switchStatsListCtrl.getRxLinkUsage(model)" unifi-link-usage-label-key="SWITCH_STATS_LABEL_TX_ACTIVITY" unifi-link-usage-status-bar-class="appStatusBar--low"></div><div unifi-link-usage="::switchStatsListCtrl.getTxLinkUsage(model)" unifi-link-usage-label-key="SWITCH_STATS_LABEL_RX_ACTIVITY" unifi-link-usage-status-bar-class="appStatusBar--high" class="verticalRhythmTop--condensed"></div></div></td><td class="switchStatsActions appTableCell--actions"><button ng-init="editStates = switchStatsListCtrl.getEditPortPropertyPanelState(model);" data-id="{{::device.id}}" data-device-type="{{::device.get(\'type\')}}" unifi-open-panel="::device" unifi-open-panel-active-tab="\'ports\'" unifi-open-panel-change-tab="true" unifi-open-panel-states="::editStates" class="appMainButton appMainButton--tertiary"><div unifi-if-role-admin><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT" class="visible--lgUp"></span></div><div unifi-if-role-admin="false"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW" class="visible--lgUp"></span></div></button><button unifi-if-role-admin unifi-switch-port-button-clear-counters="::model" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button><button unifi-if-role-admin unifi-if-role-admin-and="model.get(\'poe_enable\') === true" unifi-switch-port-button-power-cycle="::model" unifi-switch-port-button-power-cycle-is-labeled="true" unifi-condensed="appMainButton--condensed" unifi-condensed-off="appMainButton--cozy" class="appMainButton appMainButton--tertiary"></button></td></tr></tbody></table><div ng-if="!switchStatsListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="SWITCH_STATS_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p ng-if="!switchStatsListCtrl.isFiltered()" translate="SWITCH_STATS_TABLE_EMPTY_NO_PORTS" class="noMarginBottom"></p><p ng-if="switchStatsListCtrl.isFiltered()" translate="SWITCH_STATS_TABLE_EMPTY_NO_MATCHES" class="noMarginBottom"></p></div></div></div></div></div></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],862:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSwitchStatsList",["PaginatedListDirective",function(b){return new b("switchStats",a("./switchStatsList.jade")())}])},{"./switchStatsList.jade":861}],863:[function(a,b,c){"use strict";function d(a,b,c){this.siteName=a.getActiveSite().getDisplayName(),this.settings=b,this.system=c}d.$inject=["siteUtils","settings","system"],angular.module("app-unifi-manage").controller("SystemConfigSiteController",d)},{}],864:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<tbody><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_VERSION' | translate}}</td><td class=\"columnValue\">{{systemConfigSiteCtrl.system.repository.model.get('version')}}</td></tr><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_DPI' | translate}}</td><td class=\"columnValue\">{{systemConfigSiteCtrl.settings.getSettingFromKey('dpi').get('enabled') | enabled}}</td></tr><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_CONN_MONITOR' | translate}}</td><td class=\"columnValue\">{{systemConfigSiteCtrl.settings.getSettingFromKey('connectivity').get('enabled') | enabled}}</td></tr><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_CLOUD_ACCESS' | translate}}</td><td class=\"columnValue\">{{systemConfigSiteCtrl.settings.getSettingFromKey('super_sdn').get('enabled') | enabled}}</td></tr><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_CURRENT_SITE' | translate}}</td><td class=\"columnValue\">{{systemConfigSiteCtrl.siteName}}</td></tr></tbody>"),b.join("")}},{"jade/runtime":232}],865:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiSystemConfigSite",[function(){return{controller:"SystemConfigSiteController",controllerAs:"systemConfigSiteCtrl",replace:!0,template:a("./systemConfigSite.jade")()}}])},{"./systemConfigSite.jade":864}],866:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiTerminalAdapter"></div>'),b.join("")}},{"jade/runtime":232}],867:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTerminalAdapter",["$q","SshTerminalBuilder","StunHost","system","turnCredentialsResolver","UseWebrtc",function(b,c,d,e,f,g){return{template:a("./terminalAdapter.jade")(),scope:{device:"=unifiTerminalAdapterDevice",setCloseHandler:"&unifiTerminalAdapterSetCloseHandler",setCopyHandler:"&unifiTerminalAdapterSetCopyHandler"},restrict:"E",link:function(a,h){a.$watch("device",function(){if(a.device){var i=function(b){return b.open().then(function(){a.setCloseHandler({closeHandler:b.close.bind(b)}),a.setCopyHandler({copyHandler:b.copyContent.bind(b)})})},j=function(){return k.withStunServer(d),f.resolve().then(function(a){k.withTurnCredentials(a)})},k=(new c).withDevice(a.device).withElement(h.find(".unifiTerminalAdapter")[0]),l=g||e.isUnifiGo()?j(k):b.when();l.then(function(){i(k.build())["catch"](function(){g||j(k).then(function(){i(k.build())})})})}})}}}])},{"./terminalAdapter.jade":866}],868:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$rootScope=a,this.$translate=b,this.clipboardUtils=c,this.heyToasts=d,this.windowPanels=f,this.TerminalAdapter=g,this.UNIFI_TERMINAL_EVENTS=h,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.close=function(){this.closeHandler&&this.closeHandler(),this.$rootScope.$broadcast(this.UNIFI_TERMINAL_EVENTS.TERMINAL_PANEL_CLOSE,this.model),this.windowPanels.removeItem(this.model)},d.prototype.setCloseHandler=function(a){this.closeHandler=a},d.prototype.setCopyHandler=function(a){this.copyHandler=a},d.prototype.onModelChange=function(){this.model&&!this.adapter&&(this.adapter=new this.TerminalAdapter({},{device:this.model}))},d.prototype.copyContent=function(){if(this.copyHandler){var a=this.copyHandler();a&&(this.clipboardUtils.copyToClipboard(a.trim()),this.heyToasts.pushSuccess(this.$translate.instant("TERMINAL_PANEL_LABEL_CONTENT_COPIED")))}},d.$inject=["$rootScope","$translate","clipboardUtils","heyToasts","windowPanels","TerminalAdapter","UNIFI_TERMINAL_EVENTS"],angular.module("app-unifi-manage").controller("TerminalPanelController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],869:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiPanelItem"><div class="unifiPanelItemHeader"><div class="unifiPanelItemHeader__avatar"><div unifi-device-icon="terminalPanelCtrl.model"></div></div><div class="unifiPanelItemHeader__title"><span unifi-device-status="terminalPanelCtrl.model" unifi-device-status-is-cozy="true" unifi-device-status-is-truncated="true" unifi-device-status-with-icons="true" unifi-device-status-label="terminalPanelCtrl.model.getDisplayName()"></span></div><div class="unifiPanelItemHeader__actions"><div class="appActionIconGroup"><div ng-click="terminalPanelCtrl.copyContent()" ng-disabled="!terminalPanelCtrl.copyHandler" title="{{\'TERMINAL_PANEL_ACTIONS_COPY_CONTENT\' | translate}}" class="appActionIcon"><span class="button__icon icon ubnt-icon--clipboard"></span></div><div ng-click="terminalPanelCtrl.close()" title="{{\'COMMON_ACTIONS_CLOSE\' | translate}}" class="appActionIcon"><span class="button__icon icon ubnt-icon--x"></span></div></div></div></div><div class="unifiPanelItemBody"><div class="unifiPanelItemBodySection unifiPanelItemBodySection--static"><div class="row verticalRhythmTop--cozy"><div class="col--xs12"><div unifi-terminal-status="terminalPanelCtrl.model"></div></div></div><div class="row row--comfy"><div class="col--xs12"><unifi-terminal-adapter unifi-terminal-adapter-device="terminalPanelCtrl.adapter" unifi-terminal-adapter-set-close-handler="terminalPanelCtrl.setCloseHandler(closeHandler)" unifi-terminal-adapter-set-copy-handler="terminalPanelCtrl.setCopyHandler(copyHandler)"></unifi-terminal-adapter></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],870:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTerminalPanel",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiTerminalPanel"},controller:"TerminalPanelController",controllerAs:"terminalPanelCtrl",template:a("./terminalPanel.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.close(),e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./terminalPanel.jade":869}],871:[function(a,b,c){"use strict";function d(a,b){Object.keys(b).forEach(function(b){a.$on(b,function(a,b){b.get("mac")===this.model.get("mac")&&(this.status="DEVICE_"+a.name)}.bind(this))}.bind(this))}d.$inject=["$scope","TERMINAL_EVENTS"],angular.module("app-unifi-manage").controller("TerminalStatusController",d)},{}],872:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-if="terminalStatusCtrl.status !== \'DEVICE_TERMINAL_CONNECTED\'"><div ng-class="{\'appInfoBox--danger\': terminalStatusCtrl.status === \'DEVICE_TERMINAL_CONNECTION_ERROR\'}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder"><div ng-if="terminalStatusCtrl.status === \'DEVICE_TERMINAL_CONNECTION_ERROR\'" class="appInfoBox__icon icon ubnt-icon--alert"></div><div ng-if="terminalStatusCtrl.status !== \'DEVICE_TERMINAL_CONNECTION_ERROR\' &amp;&amp; terminalStatusCtrl.status !== \'DEVICE_TERMINAL_CONNECTED\'" class="appInfoBox__icon"><div class="appSpinner appSpinner--inline"></div></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="{{terminalStatusCtrl.status}}" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],873:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTerminalStatus",[function(){return{scope:{model:"=unifiTerminalStatus"},controller:"TerminalStatusController",controllerAs:"terminalStatusCtrl",bindToController:!0,template:a("./terminalStatus.jade")()}}])},{"./terminalStatus.jade":872}],874:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$translate=a,this.$filter=b,this.binaryPrefix=c,this.URLS=d,this.dashboardStats=e,this.objectUtils=f,this.init(),this.collectDashboardStats()}var e=a("moment");d.prototype.init=function(){this.commonChartConfig={margin:{left:45,top:20,bottom:25,right:40},xProperty:"time",xAxisPadding:0,xAxisTickSize:2,xAxisTickResolution:e.duration(60,"minute").asMilliseconds(),left:{type:"bars"},right:{type:"plot"}},Object.defineProperties(this.commonChartConfig,{xBackgroundPadding:{get:function(){return this.xAxisTickResolution/2}}}),this.commonChartConfig.left.yAxisFormat=function(a){return parseFloat(a.toPrecision(3))},this.commonChartConfig.right.yAxisFormat=function(a){return a},this.commonChartConfig.right.yAxisLabel=[this.$translate.instant("DASHBOARD_LATENCY")," ","[",this.$translate.instant("COMMON_LATENCY_UNIT"),"]"].join(""),this.commonChartConfig.xAxisFormat=function(a,b,c){var d=Math.floor((c.xScaleDomain[1]-c.xScaleDomain[0])/c.xAxisTickResolution);switch(b){case 0:return"24 "+this.$filter("uppercase")(this.$translate.instant("DATETIME_HOURS_ABR"));case Math.floor(d/2):return"12 "+this.$filter("uppercase")(this.$translate.instant("DATETIME_HOURS_ABR"));case d:return this.$filter("uppercase")(this.$translate.instant("DATETIME_NOW"));default:return""}}.bind(this),this.downloadConfig=this.objectUtils.deepInherit(this.commonChartConfig),this.downloadConfig.left.yAxisLabel=function(){return this.$translate.instant("DASHBOARD_THROUGHPUT_Y_AXIS_LABEL",{prefix:this.downloadUnit})}.bind(this),this.downloadConfig.left.yProperty="download",this.downloadConfig.left.ySecondaryProperty="maxDownload",this.downloadConfig.right.yProperty="latencyMs",this.uploadConfig=this.objectUtils.deepInherit(this.commonChartConfig),this.uploadConfig.left.yAxisLabel=function(){return this.$translate.instant("DASHBOARD_THROUGHPUT_Y_AXIS_LABEL",{prefix:this.uploadUnit})}.bind(this),this.uploadConfig.left.yProperty="upload",this.uploadConfig.left.ySecondaryProperty="maxUpload",this.uploadConfig.right.yProperty="latencyMs"},d.prototype.addEventHandlers=function(){this.dashboardStats.repository.collection.on("sync",this.collectDashboardStats,this),this.dashboardStats.repository.register()},d.prototype.removeEventHandlers=function(){this.dashboardStats.repository.collection.off("sync",this.collectDashboardStats,this),this.dashboardStats.repository.unregister()},d.prototype.resolve=function(){this.dashboardStats.repository.fetch()},d.prototype.tooltipShownCallback=function(a){this.focusedDataTime=a?a.time:void 0},d.prototype.getFocusedData=function(){if(this.data.entries&&this.focusedDataTime)return this.data.entries.find(function(a){return a.time===this.focusedDataTime},this)},d.prototype.isNumber=angular.isNumber,d.prototype.parseBytes=function(a){return this.binaryPrefix.parse(a)},d.prototype.collectDashboardStats=function(){if(this.data=this.dashboardStats.getChartData(),this.data.notEmpty){var a=Math.max.apply(Math,this.data.entries.map(function(a){return a.maxDownload})),b=Math.max.apply(Math,this.data.entries.map(function(a){return a.maxUpload}));this.downloadUnit=this.binaryPrefix.parse(a).prefix,this.uploadUnit=this.binaryPrefix.parse(b).prefix,this.data.entries=this.data.entries.map(function(a){var b={download:a.download,upload:a.upload,maxDownload:a.maxDownload,maxUpload:a.maxUpload};return{time:a.time,latencyMs:a.latencyMs,raw:b,download:this.binaryPrefix.normalizeToPrefix(this.downloadUnit,b.download),maxDownload:this.binaryPrefix.normalizeToPrefix(this.downloadUnit,b.maxDownload),upload:this.binaryPrefix.normalizeToPrefix(this.uploadUnit,b.upload),maxUpload:this.binaryPrefix.normalizeToPrefix(this.uploadUnit,b.maxUpload)}},this),this.commonChartConfig.xScaleDomain=[this.data.entries[0].time-this.commonChartConfig.xAxisTickResolution/2,this.data.entries[23].time+this.commonChartConfig.xAxisTickResolution/2]}else this.commonChartConfig.xScaleDomain=[],this.commonChartConfig.xScaleDomain[1]=e().format("x"),this.commonChartConfig.xScaleDomain[0]=e().subtract(25,"hour").format("x")},d.$inject=["$translate","$filter","binaryPrefix","URLS","dashboardStats","objectUtils"],angular.module("app-unifi-manage").controller("ThroughputController",d)},{moment:238}],875:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'unifiThroughput--disabled\': !throughputCtrl.data.notEmpty}" class="unifiThroughput"><div translate="DASHBOARD_THROUGHPUT_GRAPH_DOWNLOAD" class="appSubHeading appSubHeading--standalone"></div><unifi-line-chart-with-tooltip unifi-line-chart-with-tooltip-config="throughputCtrl.downloadConfig" unifi-line-chart-with-tooltip-data="throughputCtrl.data.entries" unifi-line-chart-with-tooltip-callback="throughputCtrl.tooltipShownCallback(data)" unifi-line-chart-with-tooltip-external-source="throughputCtrl.getFocusedData()" class="unifiThroughputGraph"><div class="unifiChartTooltipHeader verticalRhythmQuarter">{{throughputCtrl.getFocusedData().time | moment: \'format\': \'datetime\'}}</div><div class="unifiChartTooltipBody"><div ng-if="!throughputCtrl.isNumber(throughputCtrl.getFocusedData().download) &amp;&amp; !throughputCtrl.isNumber(throughputCtrl.getFocusedData().latencyMs)" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--noBorder"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p class="noMarginBottom">{{\'DASHBOARD_THROUGHPUT_NO_DATA_AVAILABLE\' | translate}}</p></div></div></div><div ng-if="throughputCtrl.isNumber(throughputCtrl.getFocusedData().download) || throughputCtrl.isNumber(throughputCtrl.getFocusedData().maxDownload)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__title">{{\'DASHBOARD_AVG_AND_MAX_THROUGHPUT\' | translate}}</div></div><div ng-if="throughputCtrl.isNumber(throughputCtrl.getFocusedData().download) || throughputCtrl.isNumber(throughputCtrl.getFocusedData().maxDownload)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__number"><strong>{{throughputCtrl.parseBytes(throughputCtrl.getFocusedData().raw.download).value}}</strong>{{throughputCtrl.parseBytes(throughputCtrl.getFocusedData().raw.download).prefix}}{{\'DASHBOARD_THROUGHPUT_BPS\' | translate}}\n/&nbsp;<strong>{{throughputCtrl.parseBytes(throughputCtrl.getFocusedData().raw.maxDownload).value}}</strong>{{throughputCtrl.parseBytes(throughputCtrl.getFocusedData().raw.maxDownload).prefix}}{{\'DASHBOARD_THROUGHPUT_BPS\' | translate}}</div></div><div ng-if="throughputCtrl.isNumber(throughputCtrl.getFocusedData().latencyMs)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__title">{{\'DASHBOARD_LATENCY\' | translate}}</div></div><div ng-if="throughputCtrl.isNumber(throughputCtrl.getFocusedData().latencyMs)" class="noPadding"><div class="unifiChartTooltipBody__number"><strong>{{throughputCtrl.getFocusedData().latencyMs | latency}}</strong>{{\'COMMON_LATENCY_UNIT\' | translate}}</div></div></div></unifi-line-chart-with-tooltip><div class="unifiThroughput__legendContainer"><div class="unifiThroughput__legend"><div class="unifiThroughput__legendDescription"><div class="unifiThroughput__legendIcon"><div class="unifiThroughput__legendLine unifiThroughput__legendLine--avgTput"></div><div class="unifiThroughput__legendLine unifiThroughput__legendLine--maxTput"></div></div><div class="unifiThroughput__legendDefinition">{{\'DASHBOARD_AVG_AND_MAX_THROUGHPUT\' | translate}}</div></div><div class="unifiThroughput__legendDescription"><div class="unifiThroughput__legendIcon"><div class="unifiThroughput__legendLine unifiThroughput__legendLine--latency"></div></div><div class="unifiThroughput__legendDefinition">{{\'DASHBOARD_LATENCY\' | translate}}</div></div></div></div><div translate="DASHBOARD_THROUGHPUT_GRAPH_UPLOAD" class="appSubHeading appSubHeading--standalone"></div><unifi-line-chart-with-tooltip unifi-line-chart-with-tooltip-config="throughputCtrl.uploadConfig" unifi-line-chart-with-tooltip-data="throughputCtrl.data.entries" unifi-line-chart-with-tooltip-callback="throughputCtrl.tooltipShownCallback(data)" unifi-line-chart-with-tooltip-external-source="throughputCtrl.getFocusedData()" class="unifiThroughputGraph"><div class="unifiChartTooltipHeader verticalRhythmQuarter">{{throughputCtrl.getFocusedData().time | moment: \'format\': \'datetime\'}}</div><div class="unifiChartTooltipBody"><div ng-if="!throughputCtrl.isNumber(throughputCtrl.getFocusedData().upload) &amp;&amp; !throughputCtrl.isNumber(throughputCtrl.getFocusedData().latencyMs)" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--noBorder"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p class="noMarginBottom">{{\'DASHBOARD_THROUGHPUT_NO_DATA_AVAILABLE\' | translate}}</p></div></div></div><div ng-if="throughputCtrl.isNumber(throughputCtrl.getFocusedData().upload) || throughputCtrl.isNumber(throughputCtrl.getFocusedData().maxUpload)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__title">{{\'DASHBOARD_AVG_AND_MAX_THROUGHPUT\' | translate}}</div></div><div ng-if="throughputCtrl.isNumber(throughputCtrl.getFocusedData().upload) || throughputCtrl.isNumber(throughputCtrl.getFocusedData().maxUpload)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__number"><strong>{{throughputCtrl.parseBytes(throughputCtrl.getFocusedData().raw.upload).value}}</strong>{{throughputCtrl.parseBytes(throughputCtrl.getFocusedData().raw.upload).prefix}}{{\'DASHBOARD_THROUGHPUT_BPS\' | translate}}\n/&nbsp;<strong>{{throughputCtrl.parseBytes(throughputCtrl.getFocusedData().raw.maxUpload).value}}</strong>{{throughputCtrl.parseBytes(throughputCtrl.getFocusedData().raw.maxUpload).prefix}}{{\'DASHBOARD_THROUGHPUT_BPS\' | translate}}</div></div><div ng-if="throughputCtrl.isNumber(throughputCtrl.getFocusedData().latencyMs)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__title">{{\'DASHBOARD_LATENCY\' | translate}}</div></div><div ng-if="throughputCtrl.isNumber(throughputCtrl.getFocusedData().latencyMs)" class="verticalRhythmQuarter"><div class="unifiChartTooltipBody__number"><strong>{{throughputCtrl.getFocusedData().latencyMs | latency}}</strong>{{\'COMMON_LATENCY_UNIT\' | translate}}</div></div></div></unifi-line-chart-with-tooltip><div ng-if="!throughputCtrl.data.notEmpty" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--centered appInfoBox--solid appInfoBox--wide withLayerShadow"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="DASHBOARD_THROUGHPUT_GATEWAY_REQUIRED_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="DASHBOARD_THROUGHPUT_GATEWAY_REQUIRED" translate-values="{unifiGatewayLink: throughputCtrl.URLS.UNIFI_SECURITY_GATEWAY}" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],876:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiThroughput",[function(){return{controller:"ThroughputController",controllerAs:"throughputCtrl",template:a("./throughput.jade")(),replace:!0,link:function(a,b,c,d){d.addEventHandlers(),d.resolve(),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./throughput.jade":875}],877:[function(a,b,c){"use strict";function d(a,b,c,d){this.deviceUplinkUtils=a,this.mapDevices=b,this.mapFeatures=c,this.selectedMap=d.getSelectedMap(),e.call(this),this.isLinkVisible=function(a){return c.filterDevice(a.device)&&c.filterDevice(a.parentDevice)}}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){this.links=this.mapDevices.getAllLinks(this.selectedMap)},d.$inject=["deviceUplinkUtils","mapDevices","mapFeatures","mapUtils"],angular.module("app-unifi-manage").controller("TopologyController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],878:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<unifi-topology-link ng-repeat="link in topologyCtrl.links | filter: topologyCtrl.isLinkVisible track by link.device.id" link="link"></unifi-topology-link>'),b.join("")}},{"jade/runtime":232}],879:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTopology",["devices",function(b){return{controller:"TopologyController",controllerAs:"topologyCtrl",restrict:"E",template:a("./topology.jade")(),link:function(a,c,d,e){e.updateCollection(b.repository.collection),a.$on("$destroy",function(){e.removeEventHandlers()})}}}])},{"./topology.jade":878}],880:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$location=a,this.d3=b,this.domHelper=c,this.mergeDefaults=d,this.treeUtils=e,this.CHART=f,this.chart={},this.config={duration:250,margin:{top:10,right:160,bottom:10,left:80},zoomingRange:[.3,2.5],nodeHeight:50,minLevelWidth:150},this.handlers={},this.root={}}d.prototype.updateConfig=function(a){this.config=this.mergeDefaults(Object.create(a),this.config)},d.prototype.updateData=function(a){this.root=angular.copy(a),this.nodesPerLevel=this.treeUtils.countNodes(this.root,"children")},d.prototype.onZoom=function(){this.chart.canvas.attr("transform","translate("+this.zoomListener.translate()+")scale("+this.zoomListener.scale()+")")},d.prototype.setParentElement=function(a){this.svgElement=angular.element(a.find("svg")),this.chart.svg=this.d3.select(this.svgElement[0]),this.zoomListener=this.d3.behavior.zoom().scaleExtent(this.config.zoomingRange).on("zoom",this.onZoom.bind(this)),this.chart.svg.call(this.zoomListener),this.chart.svg.on("dblclick.zoom",null)},d.prototype.addHandler=function(a,b){angular.isArray(b)?b.forEach(function(b){this.addHandler(a,b)},this):(this.handlers[b]||(this.handlers[b]=[]),this.handlers[b].push(a))},d.prototype.removeHandler=function(a,b){angular.isArray(b)?b.forEach(function(b){this.removeHandler(a,b)},this):this.handlers[b]&&(this.handlers[b][this.handlers[b].indexOf(a)]=null)},d.prototype.trigger=function(a){angular.isArray(a)?a.forEach(function(a){this.trigger(a)},this):(this.handlers[a].forEach(function(a){angular.isFunction(a)&&a.call(this)},this),this.handlers[a]=this.handlers[a].filter(function(a){return angular.isFunction(a)}))},d.prototype.render=function(){this.addHandler(function(){this.config.plotArea={height:Math.max(0,this.svgElement.height()-(this.config.margin.top+this.config.margin.bottom)),width:Math.max(0,this.svgElement.width()-(this.config.margin.left+this.config.margin.right))}},this.CHART.EVENTS.RESIZE);var a=this.svgElement.height();this.addTree(),this.chart.canvas=this.chart.svg.append("g").attr("transform","translate("+this.config.margin.left+","+this.config.margin.top+")"),this.addHandler(function(){this.root.x0=a/2,this.root.y0=0},this.CHART.EVENTS.RESIZE),this.addHandler(function(){this.updateTree(this.root)},[this.CHART.EVENTS.RESIZE,this.CHART.EVENTS.UPDATE])},d.prototype.updateTree=function(a){this.addNodes(a),this.addLinks(a)},d.prototype.addTree=function(){this.chart.tree=this.d3.layout.tree(),angular.isFunction(this.config.separation)&&this.chart.tree.separation(this.config.separation);var a=(this.d3.max(this.nodesPerLevel)+1)*this.config.nodeHeight,b=this.nodesPerLevel.length*this.config.minLevelWidth,c=function(){this.zoomListener.translate([this.config.margin.left,this.config.margin.top]).scale(Math.min(this.config.plotArea.height/a,1)),this.onZoom(),this.removeHandler(c,this.CHART.EVENTS.RESIZE)}.bind(this);this.addHandler(c,this.CHART.EVENTS.RESIZE),this.addHandler(function(){var c=Math.max(this.config.plotArea.height,a),d=Math.max(this.config.plotArea.width,b);this.chart.tree.size([c,d])},this.CHART.EVENTS.RESIZE)},d.prototype.addNodes=function(a){this.chart.nodes=this.chart.tree.nodes(this.root).reverse(),this.chart.nodes.forEach(function(a){a.x0=a.x,a.y0=a.y});var b=this.chart.canvas.selectAll(".node"),c=b.data(this.chart.nodes,function(a){return a.id});b.classed("node--last",function(a){return!a.children});var d=c.enter().append("g");d.attr("class",this.config.getNodeClass).classed("node",!0).classed("node--last",function(a){return!(a.children||a._children)}).style("opacity",0).attr("transform",function(){return"translate("+a.y0+","+a.x0+")"});var e=c.transition().duration(this.config.duration).style("opacity",1).attr("transform",function(a){return"translate("+a.y+","+a.x+")"}),f=c.exit().transition().duration(this.config.duration).style("opacity",0).attr("transform",function(){return"translate("+a.y+","+a.x+")"}).remove();this.config.addNode(b,d,e,f),d.selectAll(".nodeSymbol").on("click",this.click.bind(this))},d.prototype.addLinks=function(a){var b=this.d3.svg.diagonal().source(function(a){return{x:a.source.x,y:a.source.y}}).target(function(a){return{x:a.target.x,y:a.target.y}}).projection(function(a){return[a.y,a.x]});this.chart.links=this.chart.tree.links(this.chart.nodes);var c=this.chart.canvas.selectAll("g.link").data(this.chart.links,function(a){return a.source.id+"_"+a.target.id}),d=c.enter().insert("g",".node").attr("class",this.config.getLinkClass).classed("link",!0).style("opacity",0);d.append("path").attr("d",function(){var c={x:a.x0,y:a.y0};return b({source:c,target:c})}).attr("class","linkBackground"),d.append("path").attr("id",function(a){return a.source.id+"_"+a.target.id}).attr("d",function(){var c={x:a.x0,y:a.y0};return b({source:c,target:c})}).attr("class","linkForeground"),d.append("text").attr("dy",-5).attr("class","linkDescription").append("textPath").attr("startOffset","90%").attr("xlink:href",function(a){return this.getHrefUrl(a.source.id+"_"+a.target.id)}.bind(this)).text(this.config.getLinkDescription),d.append("text").attr("dy",5).attr("class","linkDescription linkDescription__secondary").append("textPath").attr("startOffset","90%").attr("xlink:href",function(a){return this.getHrefUrl(a.source.id+"_"+a.target.id)}.bind(this)).text(this.config.getSecondaryLinkDescription),c.attr("class",this.config.getLinkClass).classed("link",!0),c.transition().duration(this.config.duration).style("opacity",1),c.select(".linkBackground").transition().duration(this.config.duration).attr("d",b),c.select(".linkForeground").transition().duration(this.config.duration).attr("d",b),c.exit().transition().duration(this.config.duration).style("opacity",0).remove()},d.prototype.click=function(a){var b=this.chart.nodes.find(function(b){return b.id===a.id});b.children?(b._children=b.children,b.children=null):(b.children=b._children,b._children=null),this.updateTree(b)},d.prototype.getHrefUrl=function(a){var b=this.$location.absUrl(),c=b.indexOf("#")>=0?b.substr(0,b.indexOf("#")):b;return c+"#"+a},d.$inject=["$location","d3","domHelper","mergeDefaults","treeUtils","CHART"],angular.module("app-unifi-manage").controller("TopologyChartController",d)},{}],881:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiTopologyChart"><svg width="0" xmlns:xlink="http://www.w3.org/1999/xlink"></svg></div>'),b.join("")}},{"jade/runtime":232}],882:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTopologyChart",["_","$timeout","$window","APP_EVENTS","CHART","domHelper","propertyPanel",function(b,c,d,e,f,g,h){return{template:a("./topologyChart.jade")(),scope:{config:"=unifiTopologyChartConfig",data:"=unifiTopologyChartData"},controller:"TopologyChartController",controllerAs:"topologyChartCtrl",replace:!0,link:function(a,g,i,j){j.setParentElement(g),j.updateConfig(a.config),j.updateData(a.data),j.render(),c(function(){j.trigger([f.EVENTS.RESIZE,f.EVENTS.UPDATE])},0),a.$watch("data",function(b,c){b!==c&&(j.updateConfig(a.config),j.updateData(b),j.trigger(f.EVENTS.UPDATE))});var k=angular.element(g.find("svg")),l={height:k.height(),width:k.width()},m=b.debounce(function(a){a=angular.isNumber(a)?a:h.isDockOpen()?h.openTransitionRate:0,c(function(){var a={height:k.height(),width:k.width()};angular.equals(a,l)||j.trigger(f.EVENTS.RESIZE),l=a},a)},10),n=angular.element(d);n.on("resize",m),a.$on("$destroy",function(){n.off("resize",m)}),a.$on(e.PROPERTY_PANEL_OPEN,function(a,b){m(b)}),a.$on(e.PROPERTY_PANEL_CLOSE,function(a,b){m(b)})}}}])},{"./topologyChart.jade":881}],883:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k,l,m){this.clients=a,this.clientUplinkUtils=b,this.clientUtils=c,this.devices=d,this.deviceStateUtils=e,this.deviceUplinkUtils=f,this.domHelper=g,this.gatewayUtils=h,this.DEVICE_TYPES=j,this.$filter=k,this.$translate=m,this.CLIENT_NAME_LIMIT=16,this.config={nodeSymbolRadius:16,onClick:function(b){var c;"device"===b.type?c=d.repository.collection.get(b.id):"client"===b.type&&(c=a.repository.collection.get(b.id)),c&&l.$apply(function(){i.addItem(c,[{state:"activeTab",value:"details"}])})},addNode:this.addNode.bind(this),getLinkClass:this.getLinkClass.bind(this),getLinkDescription:this.getLinkDescription.bind(this),getSecondaryLinkDescription:this.getSecondaryLinkDescription.bind(this),getNodeClass:function(a){return a.type},separation:function(a,b){var c={CLIENTS:1,DEVICES:1.5,DIFFERENT_TYPES:2};return a.type!==b.type?c.DIFFERENT_TYPES:"device"===a.type?c.DEVICES:c.CLIENTS}},this.collectData()}d.prototype.addNode=function(a,b){a.select(".nodeText").text(function(a){return a.name}),a.select(".nodeSymbol__icon").text(this.getIconMark.bind(this));var c=b.append("g").attr("class","nodeSymbol");c.filter(function(a){return"virtual"===a.type}).attr("opacity",0),c.filter(function(a){return"device"===a.type}).append("circle").attr("class","nodeSymbol__shape").attr("r",this.config.nodeSymbolRadius),c.filter(function(a){return"client"===a.type}).append("rect").attr("class","nodeSymbol__shape").attr("x",-this.config.nodeSymbolRadius).attr("rx",this.config.nodeSymbolRadius).attr("ry",this.config.nodeSymbolRadius).attr("transform","translate(0, "+-this.config.nodeSymbolRadius+")").attr("height",2*this.config.nodeSymbolRadius).attr("width",160),c.append("text").attr("class","nodeSymbol__icon").text(this.getIconMark.bind(this)),b.append("text").attr("class","nodeText").attr("y",function(a){return"device"===a.type?1.2*this.config.nodeSymbolRadius:0}.bind(this)).attr("x",function(a){return"client"===a.type?this.config.nodeSymbolRadius:0}.bind(this)).text(function(a){return a.name}).on("click",function(a){this.config.onClick(a)}.bind(this))},d.prototype.getConnectedClients=function(a){return this.clients.repository.collection.filter(function(b){return this.clientUplinkUtils.getUplinkMac(b)===a}.bind(this)).map(function(a){return{type:"client",id:a.id,name:this.$filter("truncate")(a.getDisplayName(),this.CLIENT_NAME_LIMIT)}}.bind(this))},d.prototype.getIconMark=function(a){var b;if("device"===a.type)switch(b=this.devices.repository.collection.get(a.id),b&&b.get("type")){case this.DEVICE_TYPES.GATEWAY:return this.domHelper.getIconMark("ubnt-icon--shield");case this.DEVICE_TYPES.AP:return this.domHelper.getIconMark("ubnt-icon--wifi-2");case this.DEVICE_TYPES.SWITCH:return this.domHelper.getIconMark("ubnt-icon--network");default:return this.domHelper.getIconMark("ubnt-icon--questionmark")}else if("client"===a.type)return b=this.clients.repository.collection.get(a.id),this.domHelper.getIconMark(this.clientUtils.getIconClassName(b).replace("icon ",""))},d.prototype.getLinkClass=function(a){var b=[a.target.type];"virtual"===a.target.linkType&&b.push("virtual"===a.target.type?"virtual--hidden":"virtual");var c;return"device"===a.target.type?(c=this.devices.repository.collection.get(a.target.id),b.push(c.get("uplink").type),a.target.aggregated&&b.push("aggregated")):"client"===a.target.type&&(c=this.clients.repository.collection.get(a.target.id),b.push(c&&!c.get("is_wired")?"wireless":"wire")),b.join(" ")},d.prototype.getLinkDescription=function(a){var b=[],c=this.devices.repository.collection.get(a.target.id);if(c){
var d=this.deviceUplinkUtils.getUplinkAttrs(c);d&&"wire"===d.type?b.push(this.$translate.instant(d.full_duplex?"DEVICE_STATE_FLAG_WIRED_FULL_DUPLEX":"DEVICE_STATE_FLAG_WIRED_HALF_DUPLEX",{speed:d.speed})):d&&"wireless"===d.type&&(b.push(this.$filter("rssi")(d.rssi)),b.push("("+this.$filter("rssiToDbm")(d.rssi)+")"),b.push(this.$filter("rxtx")(d.tx_rate)),b.push("/"),b.push(this.$filter("rxtx")(d.rx_rate)))}return b.join(" ").trim()},d.prototype.getSecondaryLinkDescription=function(a){var b,c=[];if("device"===a.target.type){var d=this.devices.repository.collection.get(a.target.id);if(d){var e=this.deviceUplinkUtils.getUplinkAttrs(d);b=e&&e.uplink_remote_port;var f=e&&e.port_idx;c.push(b?"#"+b:""),b&&f?c.push(this.domHelper.getIconMark("ubnt-icon--arrows-range")):b?c.push(this.domHelper.getIconMark("ubnt-icon--arrow-left-4")):f&&c.push(this.domHelper.getIconMark("ubnt-icon--arrow-right-4")),c.push(f?"#"+f:"")}}else if("client"===a.target.type){var g=this.clients.repository.collection.get(a.target.id);b=g.get("sw_port"),g&&g.get("is_wired")&&b?(c.push(b?"#"+b:""),c.push(this.domHelper.getIconMark("ubnt-icon--arrow-left-4"))):g&&!g.get("is_wired")&&(c.push(this.domHelper.getIconMark("ubnt-icon--wifi-2")),c.push(g.get("essid")))}return c.join(" ").trim()},d.prototype.collectData=function(){this.data=this.buildTree()},d.prototype.buildTree=function(){var a=this.devices.repository.collection.filter(function(a){return this.deviceStateUtils.isDeviceConnected(a)&&a.get("type")!==this.DEVICE_TYPES.GATEWAY},this).reduce(function(a,b){var c=this.deviceUplinkUtils.getUplink(b);return a[b.id]={name:b.getDisplayName(),id:b.id,type:"device",children:[],parentId:c&&c.id,linkType:c&&this.deviceStateUtils.isDeviceConnected(c)?"physical":"virtual",aggregated:this.deviceUplinkUtils.isUplinkAggregated(b)},a}.bind(this),{}),b={children:[]},c=this.gatewayUtils.getSiteGateway();return c&&this.deviceStateUtils.isDeviceConnected(c)?(b.id=c.id,b.name=c.getDisplayName(),b.type="device"):(b.id="virtualParent",b.type="virtual"),Object.keys(a).forEach(function(c){var d=a[c],e=a[d.parentId]?a[d.parentId]:b;delete d.parentId,e.children.push(d)}),this.withClients&&Object.keys(a).forEach(function(b){a[b].children=a[b].children.concat(this.getConnectedClients(b))},this),b},d.prototype.addEventHandlers=function(){this.clients.repository.collection.on("add remove sync change",this.collectData,this),this.devices.repository.collection.on("add remove sync change",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.clients.repository.collection.off("add remove sync change",this.collectData,this),this.devices.repository.collection.off("add remove sync change",this.collectData,this)},d.$inject=["clients","clientUplinkUtils","clientUtils","devices","deviceStateUtils","deviceUplinkUtils","domHelper","gatewayUtils","propertyPanel","DEVICE_TYPES","$filter","$scope","$translate"],angular.module("app-unifi-manage").controller("TopologyGraphController",d)},{}],884:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiTopologyGraph"><unifi-topology-chart unifi-topology-chart-config="topologyGraphCtrl.config" unifi-topology-chart-data="topologyGraphCtrl.data" class="unifiTopologyGraphChart"></unifi-topology-chart></div>'),b.join("")}},{"jade/runtime":232}],885:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTopologyGraph",[function(){return{controller:"TopologyGraphController",controllerAs:"topologyGraphCtrl",template:a("./topologyGraph.jade")(),scope:{withClients:"=unifiTopologyGraphWithClients"},bindToController:!0,replace:!0,link:function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()}),a.$watch("topologyGraphCtrl.withClients",function(a,b){a!==b&&d.collectData()})}}}])},{"./topologyGraph.jade":884}],886:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTopologyLink",["atlas","devices","deviceStateUtils","mapCoordinatesAssistant","mapDevices","mapUtils","$q","$window","TOPOLOGY_LINKS",function(a,b,c,d,e,f,g,h,i){return{require:["^atlasMap"],restrict:"E",scope:{link:"="},link:function(b,c,h,j){var k,l,m=j[0],n=f.getSelectedMap(),o=[a.getGoogleMaps(),m.getMap(),d.getAssistantForMap(n)];g.all(o).then(function(a){var c=a[0],d=a[1],f=a[2],g=new c.MVCArray,h={path:"M 0,-1 0,1",strokeOpacity:1,scale:i.WIRELESS_STYLE.STROKE},j={path:"M 0,-0.5 0,0.5",strokeOpacity:1,scale:i.WIRELESS_STYLE.STROKE+2*i.WIRELESS_STYLE.BG_STROKE},m=function(){k.set("strokeColor",e.getLinkColor(b.link))},o=function(){g.setAt(1,f.coordsToLatLng(b.link.device.getCoords())),g.setAt(0,f.coordsToLatLng(b.link.parentDevice.getCoords()))},p=function(){b.link.type===i.TYPE.WIRE?(l.setValues({icons:void 0,strokeOpacity:1}),k.setValues({icon:void 0,strokeOpacity:1})):(l.setValues({icons:[{icon:j,offset:"0",repeat:i.WIRELESS_STYLE.DASHARRAY[0]+i.WIRELESS_STYLE.DASHARRAY[1]+"px"}],strokeOpacity:0}),k.setValues({icons:[{icon:h,offset:"0",repeat:i.WIRELESS_STYLE.DASHARRAY[0]+i.WIRELESS_STYLE.DASHARRAY[1]+"px"}],strokeOpacity:0}))};l=new c.Polyline({path:g,strokeColor:i.COLORS.STROKE,strokeWeight:8,map:d}),k=new c.Polyline({path:g,strokeWeight:4,map:d}),o(),m(),p(),n.on("change:upp change:unit",o),b.link.device.on("change:x change:y",o),b.link.device.on("change:uplink change:state",m),b.link.parentDevice.on("change:x change:y",o),b.$on("$destroy",function(){b.link.device.off("change:x change:y",o),b.link.device.off("change:uplink change:state",m),b.link.parentDevice.off("change:x change:y",o),k.setMap(null),l.setMap(null)})})}}}])},{}],887:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){this.bypass=a,this.frame=b,this.preferences=c,this.ssoUserService=d,this.system=e,this.walkme=f,this.WALKME=g,this.visible=!1,this.hasAccount=!1}d.prototype.checkAvailability=function(){this.system.isDemoMode()&&this.ssoUserService.user.fetch().then(function(){window.walkme_user_id=this.ssoUserService.user.get("uuid"),this.hasAccount=!0,this.preferences.model.get(this.WALKME.PREFERENCES.KEEP_MODAL_OPEN)?this.open():this.visible=!0}.bind(this))["catch"](function(){this.visible=!0}.bind(this))},d.prototype.open=function(){this.hideTooltip(),this.hasAccount?(this.opening=!0,this.walkme.open(),this.keepTrainingModalOpen()):this.frame.show("trainingLogin").then(function(){this.keepTrainingModalOpen(),this.ssoUserService.redirectToAccountAndBack()}.bind(this))},d.prototype.keepTrainingModalOpen=function(){this.preferences.model.set(this.WALKME.PREFERENCES.KEEP_MODAL_OPEN,!0),this.preferences.model.save()},d.prototype.isOpeningTraining=function(){return this.opening},d.prototype.isTooltipVisible=function(){return!this.bypass.isEnabled(this.WALKME.BYPASS.TOOLTIP)},d.prototype.hideTooltip=function(){this.bypass.enable(this.WALKME.BYPASS.TOOLTIP)},d.$inject=["bypass","frame","preferences","ssoUserService","system","walkme","WALKME"],angular.module("app-unifi-manage").controller("TrainingButtonController",d)},{}],888:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="trainingButtonCtrl.visible" class="appTooltipContainer"><div ng-click="trainingButtonCtrl.open()" title="{{\'COMMON_ACTIONS_TRAINING\' | translate}}" class="unifiActionIcon visible--smUp"><div busy-toggle="trainingButtonCtrl.isOpeningTraining()" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered\']" class="ubnt-icon ubnt-icon--book-2"></div></div><div ng-show="trainingButtonCtrl.isTooltipVisible()" class="unifiEffect--bump visible--smUp"><div translate="TRAINING_BUTTON_TOOLTIP_CONTENT" ng-click="trainingButtonCtrl.hideTooltip()" class="appTooltip appTooltip--bottom appTooltip--brief"></div></div></div>'),b.join("")}},{"jade/runtime":232}],889:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTrainingButton",["$document","$rootScope","$timeout","system","WALKME",function(b,c,d,e,f){return{bindToController:!0,controller:"TrainingButtonController",controllerAs:"trainingButtonCtrl",replace:!0,scope:{},template:a("./trainingButton.jade")(),link:function(a,b,g,h){var i=a.$watch(function(){return e.repository.model.fetched},function(a){d(function(){a&&(i(),h.checkAvailability())},0)});c.$on(f.ON_LOAD_EVENT,function(){d(function(){h.opening=!1,h.visible=!1},0)})}}}])},{"./trainingButton.jade":888}],890:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTruthyCheckbox",[function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){var e=a.$eval(c.unifiTruthyCheckboxFalseValue);c.$observe("unifiTruthyCheckboxFalseValue",function(b){e=a.$eval(b)});var f=a.$eval(c.unifiTruthyCheckboxDefaultTrueValue);c.$observe("unifiTruthyCheckboxDefaultTrueValue",function(b){f=a.$eval(b)});var g=f;d.$formatters.push(function(a){var b=a!==e;return b&&angular.isDefined(a)&&(g=a),b}),d.$parsers.push(function(a){return a?g:e})}}}])},{}],891:[function(a,b,c){"use strict";function d(a){this.isAvailable=a.isAvailable(this.model,this.radio),this.isAvailable&&(this.values=a.getValues(this.model,this.radio),this.widths=a.getWidths(this.model,this.radio))}d.$inject=["txRateStatus"],angular.module("app-unifi-manage").controller("TxRateStatusController",d)},{}],892:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appTooltipContainer appTooltipContainer--hoverable noLineHeight fullWidth"><div ng-if="txRateStatusCtrl.isAvailable" class="appStatusBar appStatusBar--ratio appStatusBar--small"><div ng-if="txRateStatusCtrl.widths[0] &gt; 0" ng-style="{width: txRateStatusCtrl.widths[0] + \'%\'}" class="statusBar__inner appStatusBarInner--low appStatusBarInner--divider"></div><div ng-if="txRateStatusCtrl.widths[1] &gt; 0" ng-style="{width: txRateStatusCtrl.widths[1] + \'%\'}" class="statusBar__inner appStatusBarInner--medium appStatusBarInner--divider"></div><div ng-if="txRateStatusCtrl.widths[2] &gt; 0" ng-style="{width: txRateStatusCtrl.widths[2] + \'%\'}" class="statusBar__inner appStatusBarInner--high"></div></div><div class="appTooltip appTooltip--cozy appTooltip--brief appTooltip--bottom"><div class="appDescriptionList appDescriptionList--inline"><div class="appDescriptionListRow appDescriptionListRow--cozy timeout"><dt class="alignRight">{{\'DEVICE_TOOLTIP_TX_RATE_STATUS_TIMEOUT\' | translate}}</dt><dd class="alignLeft">{{::txRateStatusCtrl.values[0] | numberToString}}</dd></div><div class="appDescriptionListRow appDescriptionListRow--cozy retry"><dt class="alignRight">{{\'DEVICE_TOOLTIP_TX_RATE_STATUS_RETRY\' | translate}}</dt><dd class="alignLeft">{{::txRateStatusCtrl.values[1] | numberToString}}</dd></div><div class="appDescriptionListRow appDescriptionListRow--cozy total"><dt class="alignRight">{{\'DEVICE_TOOLTIP_TX_RATE_STATUS_TOTAL\' | translate}}</dt><dd class="alignLeft">{{::txRateStatusCtrl.values[2] | numberToString}}</dd></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],893:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiTxRateStatus",[function(){return{controller:"TxRateStatusController",controllerAs:"txRateStatusCtrl",template:a("./txRateStatus.jade")(),scope:{model:"=unifiTxRateStatusModel",radio:"@unifiTxRateStatusRadio"},bindToController:!0}}])},{"./txRateStatus.jade":892}],894:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-if="getCount() &gt; 0" class="count count--round appCount appCount--warning"><div class="count__value">{{getTruncatedCount()}}</div></div>'),b.join("")}},{"jade/runtime":232}],895:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiUnreadAlerts",["alerts",function(b){return{scope:!0,template:a("./unreadAlerts.jade")(),link:function(a){a.getCount=function(){return b.repositories.unread.model.get("count")},a.getTruncatedCount=function(){var a=this.getCount();return a>99?"99+":a+""}}}}])},{"./unreadAlerts.jade":894}],896:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-if="isUpgrading" class="unifiWhiteoutNotice unifiWhiteoutNotice--panelItem"><div class="unifiWhiteoutNotice__content"><div class="appInfoBox appInfoBox--warning appInfoBox--noBorder appInfoBox--flexible"><div class="appInfoBox__icon icon ubnt-icon--clock-2"></div><div class="appInfoBox__content"><div class="appInfoBox__body verticalRhythmTop--condensed"><p translate="COMMON_NOTICE_DISABLED_DURING_UPGRADE"></p></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],897:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiUpgradingWhiteoutNotice",["deviceStateUtils","DEVICE_STATES",function(b,c){return{scope:{model:"=unifiUpgradingWhiteoutNotice"},template:a("./upgradingWhiteoutNotice.jade")(),link:function(a){a.$watch(function(){return a.model?b.getRawDeviceState(a.model):void 0},function(b){a.isUpgrading=b===c.UPGRADING})}}}])},{"./upgradingWhiteoutNotice.jade":896}],898:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<span><button type="button" ngf-select="true" ngf-accept="\'image/*\'" ngf-change="select($files)" class="appTextButton">{{ (model ? labelChange : labelUpload) | translate }}</button></span>'),b.join("")}},{"jade/runtime":232}],899:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiUploadGuestPortalImage",["fileUtils",function(b){return{replace:!0,restrict:"E",require:"ngModel",scope:{model:"=ngModel",labelChange:"@unifiUploadGuestPortalImageLabelChange",labelUpload:"@unifiUploadGuestPortalImageLabelUpload"},template:a("./uploadGuestPortalImage.jade")(),link:function(a,c,d,e){a.select=function(a){var c=a[0];c&&c instanceof Blob&&b.readLocalToUrl(c).then(function(a){e.$setViewValue({file:c,url:a})})}}}}])},{"./uploadGuestPortalImage.jade":898}],900:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.heyToasts=b,this.userGroups=c,this.preferences=d,this.apiResults=g,this.patterns={name:h.NAME},e.call(this,f)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes,{qos_rate_max_down:this.isDownloadLimited?this.maxDownloadRate:-1,qos_rate_max_up:this.isUploadLimited?this.maxUploadRate:-1});return this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("SETTINGS_NAV_USER_GROUPS").toLowerCase()})),this.userGroups.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("SETTINGS_NAV_USER_GROUPS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setDefaultAttrs=function(a){var b=a?"Master":"";this["isDownloadLimited"+b]=!(!this.model||this.model.get("qos_rate_max_down")===-1),this["isUploadLimited"+b]=!(!this.model||this.model.get("qos_rate_max_up")===-1),this["maxDownloadRate"+b]=this.model&&this.model.get("qos_rate_max_down")!==-1?this.model.get("qos_rate_max_down"):null,this["maxUploadRate"+b]=this.model&&this.model.get("qos_rate_max_up")!==-1?this.model.get("qos_rate_max_up"):null},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","userGroups","preferences","modelDivergence","apiResults","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("UserGroupFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],901:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="userGroupFormCtrl.form" ng-class="{    \'appForm--dark\': userGroupFormCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': userGroupFormCtrl.showValidation,    \'is-validation-hidden\': !userGroupFormCtrl.showValidation  }" ng-submit="userGroupFormCtrl.form.$valid &amp;&amp; userGroupFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="userGroupFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="userGroupFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="userGroupFormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="userGroupFormCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{userGroupName: userGroupFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_USER_GROUP_SECTION_VIEW\' : (userGroupFormCtrl.model.id ? \'SETTINGS_USER_GROUP_SECTION_EDIT\' : \'SETTINGS_USER_GROUP_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_USER_GROUP_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="text" name="userGroupName" ng-model="userGroupFormCtrl.modelCopy.attributes.name" ng-model-master="userGroupFormCtrl.model.attributes.name" ng-pattern="userGroupFormCtrl.patterns.accountName" required class="input--full"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_USER_GROUP_LABEL_BANDWIDTH_LIMIT_DOWN" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="userGroupEnableLimitBandwidthDown" id="userGroupEnableLimitBandwidthDown" ng-model="userGroupFormCtrl.isDownloadLimited" ng-model-master="userGroupFormCtrl.isDownloadLimitedMaster"><label for="userGroupEnableLimitBandwidthDown" translate="SETTINGS_USER_GROUP_VALUES_BANDWIDTH_LIMIT_DOWN"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="userGroupLimitBandwidthDownSize" translate="SETTINGS_USER_GROUP_LABEL_LIMITED_TO" ng-class="{\'is-label-disabled\': !userGroupFormCtrl.isDownloadLimited}"></label><input type="number" name="userGroupLimitBandwidthDownSize" min="{{userGroupFormCtrl.isDownloadLimited ? 2 : \'\'}}" ng-model="userGroupFormCtrl.maxDownloadRate" ng-model-master="userGroupFormCtrl.maxDownloadRateMaster" ng-disabled="!userGroupFormCtrl.isDownloadLimited" ng-required="userGroupFormCtrl.isDownloadLimited" unifi-string-to-integer-input class="input--smallNumber"><label for="userGroupLimitBandwidthDownSize" ng-class="{\'is-label-disabled\': !userGroupFormCtrl.isDownloadLimited}">Kbps</label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_USER_GROUP_LABEL_BANDWIDTH_LIMIT_UP" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="userGroupEnableLimitBandwidthUp" id="userGroupEnableLimitBandwidthUp" ng-model="userGroupFormCtrl.isUploadLimited" ng-model-master="userGroupFormCtrl.isUploadLimitedMaster"><label for="userGroupEnableLimitBandwidthUp" translate="SETTINGS_USER_GROUP_VALUES_BANDWIDTH_LIMIT_UP"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="userGroupLimitBandwidthUpSize" translate="SETTINGS_USER_GROUP_LABEL_LIMITED_TO" ng-class="{\'is-label-disabled\': !userGroupFormCtrl.isUploadLimited}"></label><input type="number" name="userGroupLimitBandwidthUpSize" min="{{userGroupFormCtrl.isUploadLimited ? 2 : \'\'}}" ng-model="userGroupFormCtrl.maxUploadRate" ng-model-master="userGroupFormCtrl.maxUploadRateMaster" ng-disabled="!userGroupFormCtrl.isUploadLimited" ng-required="userGroupFormCtrl.isUploadLimited" unifi-string-to-integer-input class="input--smallNumber"><label for="userGroupLimitBandwidthUpSize" ng-class="{\'is-label-disabled\': !userGroupFormCtrl.isUploadLimited}">Kbps</label></div></div></div></div></div></fieldset><div ng-class="{\'appFormFooter--dark\': userGroupFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="userGroupFormCtrl.showValidation = true" busy-toggle="userGroupFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveUserGroup">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="userGroupFormCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],902:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiUserGroupForm",["SimpleFormDirective",function(b){return new b("userGroup",a("./userGroupForm.jade")())}])},{"./userGroupForm.jade":901}],903:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.$state=a,this.$translate=b,this.heyToasts=d,this.frame=f,this.userGroups=h,this.preferences=i,this.defaultSortBy="name",this.isRemoving={},e.call(this,c,g)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.userGroups.repository.collection},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_USER_GROUP_DELETE_CONFIRM_TITLE",{userGroupName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_USER_GROUP_DELETE_CONFIRM_MESSAGE",{userGroupName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("SETTINGS_USER_GROUP_DELETE_SUCCESS",{userGroupName:a.get("name")})),!0}.bind(this))["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("SETTINGS_USER_GROUP_DELETE_ERROR",{userGroupName:a.get("name")})),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.$inject=["$state","$translate","$q","heyToasts","frame","CollectionView","userGroups","preferences"],angular.module("app-unifi-manage").controller("UserGroupListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],904:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="userGroupsTable" collection-view-sort="userGroupListCtrl.view" ng-class="{      \'appTable--dark\': userGroupListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="userGroupName"><span translate="SETTINGS_USER_GROUP_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="qos_rate_max_down" class="userGroupBandwidthDown"><span translate="SETTINGS_USER_GROUP_TABLE_HEADER_BANDWIDTH_LIMIT_DOWN"></span></th><th collection-view-sort-by="qos_rate_max_up" class="userGroupBandwidthUp"><span translate="SETTINGS_USER_GROUP_TABLE_HEADER_BANDWIDTH_LIMIT_UP"></span></th><th class="userGroupActions"><span translate="SETTINGS_USER_GROUP_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in userGroupListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="userGroupName">{{::model.get(\'name\')}}</td><td class="userGroupBandwidthDown">{{::model.get(\'qos_rate_max_down\') === -1 ? (\'SETTINGS_USER_GROUP_TABLE_FLAGS_UNLIMITED\' | translate) : (model.get(\'qos_rate_max_down\') + \' Kbps\')}}</td><td class="userGroupBandwidthUp">{{::model.get(\'qos_rate_max_up\') === -1 ? (\'SETTINGS_USER_GROUP_TABLE_FLAGS_UNLIMITED\' | translate) : (model.get(\'qos_rate_max_up\') + \' Kbps\')}}</td><td class="userGroupActions appTableCell--actions"><button unifi-if-role-admin ng-click="userGroupListCtrl.edit(model)" ng-disabled="userGroupListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin="false" ng-click="userGroupListCtrl.edit(model)" ng-disabled="userGroupListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW"></span></button><button unifi-if-role-admin unifi-if-role-admin-and="!model.get(\'attr_no_delete\')" ng-click="userGroupListCtrl.remove(model)" ng-disabled="userGroupListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!userGroupListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': userGroupListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_USER_GROUP_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],905:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiUserGroupList",["ListDirective",function(b){return new b("userGroup",a("./userGroupList.jade")(),{onEdit:"&unifiUserGroupListOnEdit"})}])},{"./userGroupList.jade":904}],906:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiValidateIpInSubnet",["$parse","ipUtils","REGEX_PATTERNS",function(a,b,c){return{require:"ngModel",link:function(d,e,f,g){d.$watch(f.unifiValidateIpInSubnet,function(){g.$validate()}),g.$validators.ipInSubnet=function(e,g){if(!g)return!0;if(g.match(c.IP_ADDRESS)){var h=a(f.unifiValidateIpInSubnet)(d);return!h||b.subnetHasIp(h,g)}return!1}}}}])},{}],907:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiValidateIpRange",["REGEX_PATTERNS",function(a){return{require:"ngModel",link:function(b,c,d,e){e.$validators.ipRange=function(b,c){if(c){var d=!1,e="!"===c.charAt(0);if(e&&(c=c.substring(1)),d||(d=c.match(a.IP_ADDRESS)),!d){var f=c.split("-");d=f&&2===f.length&&f[0].match(a.IP_ADDRESS)&&f[1].match(a.IP_ADDRESS)}if(!d&&c.match(a.SUBNET)){var g=c.split("/");d=g[0].match(a.IP_ADDRESS)&&parseInt(g[1],10)<=32}return d}return!0}}}}])},{}],908:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiValidateNetmask",["$parse","ipUtils","REGEX_PATTERNS",function(a,b,c){return{require:"ngModel",link:function(d,e,f,g){g.$validators.netmask=function(e,g){if(!g)return!0;if(g.match(c.NETMASK)){var h=a(f.unifiValidateNetmask)(d);if(h){var i=b.ip2long(h),j=b.ip2long(g);return!!(i^i&j)}return!0}return!1}}}}])},{}],909:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiValidatePatterns",["$parse",function(a){return{require:"ngModel",link:function(b,c,d,e){e.$validators.patterns=function(c,e){if(e){var f=a(d.unifiValidatePatterns)(b),g=a(d.unifiValidatePatternsMatchAll)(b)?"every":"some";return!f||!f.length||f[g](function(a){return a.test(e)})}return!0}}}}])},{}],910:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiValidatePortRange",[function(){return{require:"ngModel",link:function(a,b,c,d){var e=function(a){return a&&(""+a).match(/^\d+$/)};d.$validators.portRange=function(a,b){if(b){var c=b.split(/[,-]+/g),d=b.match(/\d*-\d*/g),f=c.length<=15;return f&&angular.forEach(c,function(a){(!e(a)||isNaN(a=parseInt(a,10))||a<1||a>65535)&&(f=!1)}),f&&angular.forEach(d,function(a){var b=a.split("-");(!e(b[0])||!e(b[1])||parseInt(b[0],10)>=parseInt(b[1],10))&&(f=!1)}),f}return!0}}}}])},{}],911:[function(a,b,c){"use strict";function d(a,b){e.call(this,a,b)}var e=a("../../../base-unifi/controllers/BasePanelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getItemType=function(a){if(this.panels.itemState.getItemState(a,"debugTerminal"))return"debugTerminal"},d.prototype.setItemCoords=function(a,b,c){this.panels.getItemById(a).then(function(a){this.panels.addItem(a,[{state:"x",value:b+"px",overwrite:!0},{state:"y",value:c+"px",overwrite:!0}],0)}.bind(this))},d.$inject=["$timeout","windowPanels"],angular.module("app-unifi-manage").controller("WindowPanelsController",d)},{"../../../base-unifi/controllers/BasePanelController":1666}],912:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="windowPanels"><div ng-repeat="item in windowPanelsCtrl.getItems()" ng-switch="windowPanelsCtrl.getItemType(item)" ng-init="itemId = windowPanelsCtrl.panels.getItemAndTypeId(item)" unifi-draggable-item unifi-draggable-item-handle=".unifiPanelItemHeader" unifi-draggable-item-on-drag-start="windowPanelsCtrl.onItemDragStart(itemId)" unifi-draggable-item-on-drag-stop="windowPanelsCtrl.onItemDragStop(itemId, elementX, elementY)" unifi-constrain-position unifi-constrain-position-selector="#contentContainer &gt; .appViewCenterPanel" unifi-constrain-position-is-disabled="!dockedItemCtrl.isUndocked" ng-style="{      \'left\': windowPanelsCtrl.panels.getItemState(item, \'x\') || (100 + \'px\'),      \'top\': windowPanelsCtrl.panels.getItemState(item, \'y\') || (100 + \'px\'),      \'width\': windowPanelsCtrl.panels.getItemState(item, \'width\') || \'auto\',      \'z-index\': windowPanelsCtrl.getItems().length - $index + 700    }" class="unifiDndItem is-undocked"><div ng-switch-when="debugTerminal" unifi-terminal-panel="item" data-id="{{item.id}}" class="unifiPanelItemContainer"></div></div></div>'),b.join("")}},{"jade/runtime":232}],913:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiWindowPanels",[function(){return{controller:"WindowPanelsController",controllerAs:"windowPanelsCtrl",replace:!0,restrict:"E",template:a("./windowPanels.jade")()}}])},{"./windowPanels.jade":912}],914:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s){this._=a,this.$translate=b,this.clients=c,this.frame=d,this.heyToasts=f,this.wirelessNetworkGroups=g,this.wirelessNetworks=h,this.userGroups=i,this.preferences=k,this.apiResults=m,this.FLAGS=o,this.RADIUS_VLAN_OPTIONS=p,this.MINRATE_SETTINGS=r,this.URLS=s,this.wpaModeOptions={auto:"SETTINGS_WLAN_VALUES_BOTH",wpa1:"SETTINGS_WLAN_VALUES_WPA1_ONLY",wpa2:"SETTINGS_WLAN_VALUES_WPA2_ONLY"},this.encryptionOptions={auto:"SETTINGS_WLAN_VALUES_AUTO",tkip:"SETTINGS_WLAN_VALUES_TKIP_ONLY",ccmp:"SETTINGS_WLAN_VALUES_AES_CCMP_ONLY"},this.minrateSliderLabel={ng:"SETTINGS_WLAN_LABEL_MINRATE_NG_MODE",na:"SETTINGS_WLAN_LABEL_MINRATE_NA_MODE"},this.patterns={name:q.NAME,macAddress:n.exact(q.MAC_ADDRESS),vlan:q.VLAN,wep:q.WEP,
password:q.PASSWORD},this.radiusAuthServerMin=1,this.radiusAuthServerMax=4,this.radiusAcctServerMin=0,this.radiusAcctServerMax=4,this.hotspot2Profiles=j.repository.collection.models,this.minratePredefined={ngDefault:this.getPredefinedMinrateValues("DEFAULT",this.MINRATE_SETTINGS.RATECTRL_NG.OPTIONS),naDefault:this.getPredefinedMinrateValues("DEFAULT",this.MINRATE_SETTINGS.RATECTRL_NA.OPTIONS),ngLegacy:this.getPredefinedMinrateValues("LEGACY",this.MINRATE_SETTINGS.RATECTRL_NG.OPTIONS)},this.macFilterMax=128,this.bcFilterMax=16,e.call(this,l)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.canSave=function(){return this.modelCopy&&this.modelCopy.attributes&&this.modelCopy.attributes.mac_filter_list&&this.modelCopy.attributes.mac_filter_list.length<=this.macFilterMax&&this.modelCopy.attributes.bc_filter_list&&this.modelCopy.attributes.bc_filter_list.length<=this.bcFilterMax},d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes,{wlangroup_id:this.wlanGroupId});return a.vlan_enabled||delete a.vlan,"wep"!==a.security&&(delete a.x_wep,delete a.wep_idx),"wpapsk"!==a.security&&delete a.x_passphrase,"wpaeap"!==a.security&&(delete a.radius_vlan,delete a.radiusprofile_id),a.schedule=a.schedule_enabled?this.schedule:[],this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("SETTINGS_NAV_WIRELESS_NETWORKS").toLowerCase()})),this.wirelessNetworks.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("SETTINGS_NAV_WIRELESS_NETWORKS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.setWlanGroupId=function(a){this.wlanGroupId=a,this.wlanGroup=this.wirelessNetworkGroups.repository.collection.get(this.wlanGroupId),this.isWlanGroupRoaming=!!this.wlanGroup&&this.wlanGroup.get("roam_enabled")},d.prototype.isLegacySupportEnabled=function(){return this.wlanGroup=this.wirelessNetworkGroups.repository.collection.get(this.wlanGroupId),!!this.wlanGroup.get("b_supported")},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";if(this["model"+b]){var c=this["model"+b].attributes;c.enabled=!this.model||!this.model.id||this.model.get("enabled"),c.security=(this.model?this.model.get("security"):void 0)||(this.isWlanGroupRoaming?"wpapsk":"open"),c.wep_idx=(this.model?this.model.get("wep_idx"):void 0)||1,c.wpa_mode=(this.model?this.model.get("wpa_mode"):void 0)||"wpa2",c.wpa_enc=(this.model?this.model.get("wpa_enc"):void 0)||"ccmp",c.usergroup_id=(this.model?this.model.get("usergroup_id"):void 0)||(this.userGroups.repository.collection.getDefault()||{}).id,c.ratectrl_ng_mode=(this.model?this.model.get("ratectrl_ng_mode"):void 0)||(this.isLegacySupportEnabled()?"legacy":"default"),c.ratectrl_na_mode=(this.model?this.model.get("ratectrl_na_mode"):void 0)||"default",["ratectrl_ng_cck_1","ratectrl_ng_cck_2","ratectrl_ng_cck_5_5","ratectrl_ng_cck_11","ratectrl_ng_6","ratectrl_ng_9","ratectrl_ng_12","ratectrl_ng_18","ratectrl_ng_24","ratectrl_ng_36","ratectrl_ng_48","ratectrl_ng_54","ratectrl_na_6","ratectrl_na_9","ratectrl_na_12","ratectrl_na_18","ratectrl_na_24","ratectrl_na_36","ratectrl_na_48","ratectrl_na_54"].forEach(function(a){c[a]=(this.model?this.model.get(a):void 0)||this.getDefaultMinrateOption(a)}.bind(this)),c.dtim_mode=(this.model?this.model.get("dtim_mode"):void 0)||"default",c.dtim_ng=(this.model?this.model.get("dtim_ng"):void 0)||this.MINRATE_SETTINGS.DTIM.DEFAULT,c.dtim_na=(this.model?this.model.get("dtim_na"):void 0)||this.MINRATE_SETTINGS.DTIM.DEFAULT,c.mac_filter_enabled=(this.model?this.model.get("mac_filter_enabled"):void 0)||!1,c.mac_filter_policy=(this.model?this.model.get("mac_filter_policy"):void 0)||"deny",c.mac_filter_list=(this.model?this.model.get("mac_filter_list"):void 0)||[],c.bc_filter_enabled=(this.model?this.model.get("bc_filter_enabled"):void 0)||!1,c.bc_filter_list=(this.model?this.model.get("bc_filter_list"):void 0)||[],this.bcFilterGatewayAutoDetectEnabled=c.bc_filter_enabled===!1}},d.prototype.setAdvancedExpanded=function(){this.model&&((this.model.get("dtim_mode")&&"default"!==this.model.get("dtim_mode")||this.model.get("ratectrl_ng_mode")&&this.model.get("ratectrl_ng_mode")!==(this.isLegacySupportEnabled()?"legacy":"default")||this.model.get("ratectrl_ng_mode")&&"default"!==this.model.get("ratectrl_na_mode"))&&(this.isMinrateExpanded=!0),(this.model.get("mac_filter_enabled")&&this.model.get("mac_filter_enabled")!==!1||this.model.get("mac_filter_policy")&&"deny"!==this.model.get("mac_filter_policy")||this.model.get("mac_filter_list")&&this.model.get("mac_filter_list").length)&&(this.isMacFilterExpanded=!0),(this.model.get("vlan_enabled")||this.model.get("radius_vlan")===this.RADIUS_VLAN_OPTIONS.ENABLED||this.model.get("hide_ssid")||this.model.get("wpa_mode")&&"wpa2"!==this.model.get("wpa_mode")||this.model.get("wpa_enc")&&"ccmp"!==this.model.get("wpa_enc")||this.model.get("usergroup_id")&&this.model.get("usergroup_id")!==(this.userGroups.repository.collection.getDefault()||{}).id||this.model.get("uapsd_enabled")||this.model.get("schedule_enabled")||this.model.get("bc_filter_enabled")&&this.model.get("bc_filter_enabled")!==!1||this.isMinrateExpanded||this.isMacFilterExpanded)&&(this.isAdvancedExpanded=!0))},d.prototype.getPredefinedMinrateValues=function(a,b){var c={};return b.forEach(function(b){b[a]&&(c[b.KEY]=b[a])}),c},d.prototype.getDefaultMinrateOption=function(a){var b=[].concat(this.MINRATE_SETTINGS.RATECTRL_NG.OPTIONS,this.MINRATE_SETTINGS.RATECTRL_NA.OPTIONS).find(function(b){return b.KEY===a});if(b)return this.isLegacySupportEnabled()&&b.LEGACY?b.LEGACY:b.DEFAULT},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0),this.setAdvancedExpanded()},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["_","$translate","clients","frame","heyToasts","wirelessNetworkGroups","wirelessNetworks","userGroups","hotspot2","preferences","modelDivergence","apiResults","regexUtils","FLAGS","RADIUS_VLAN_OPTIONS","REGEX_PATTERNS","WLAN_MINRATE_SETTINGS","URLS"],angular.module("app-unifi-manage").controller("WirelessNetworkFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],915:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="wirelessNetworkFormCtrl.form" ng-class="{    \'appForm--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': wirelessNetworkFormCtrl.showValidation,    \'is-validation-hidden\': !wirelessNetworkFormCtrl.showValidation  }" ng-submit="wirelessNetworkFormCtrl.form.$valid &amp;&amp; wirelessNetworkFormCtrl.canSave() &amp;&amp; wirelessNetworkFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="wirelessNetworkFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="wirelessNetworkFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="wirelessNetworkFormCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{wlanName: wirelessNetworkFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_WLAN_SECTION_VIEW\' : (wirelessNetworkFormCtrl.model.id ? \'SETTINGS_WLAN_SECTION_EDIT\' : \'SETTINGS_WLAN_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_NAME_SSID" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="wirelessNetworkName" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.name" ng-model-master="wirelessNetworkFormCtrl.model.attributes.name" ng-pattern="wirelessNetworkFormCtrl.patterns.name" required class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_ENABLED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wirelessNetworkEnabled" id="wirelessNetworkEnabled" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.enabled" ng-model-master="wirelessNetworkFormCtrl.model.attributes.enabled"><label for="wirelessNetworkEnabled" translate="SETTINGS_WLAN_VALUES_ENABLED"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_SECURITY" class="appLabel--primary"></label></div><div class="col--sm7 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-if="!wirelessNetworkFormCtrl.isWlanGroupRoaming" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="wirelessNetworkSecurity" id="wirelessNetworkSecurityOpen" value="open" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.security" ng-model-master="wirelessNetworkFormCtrl.model.attributes.security"><label for="wirelessNetworkSecurityOpen" translate="SETTINGS_WLAN_VALUES_SECURITY_OPEN"></label></div><div ng-if="!wirelessNetworkFormCtrl.isWlanGroupRoaming" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="wirelessNetworkSecurity" id="wirelessNetworkSecurityWep" value="wep" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.security" ng-model-master="wirelessNetworkFormCtrl.model.attributes.security"><label for="wirelessNetworkSecurityWep" translate="SETTINGS_WLAN_VALUES_SECURITY_WEP"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="wirelessNetworkSecurity" id="wirelessNetworkSecurityWpaPersonal" value="wpapsk" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.security" ng-model-master="wirelessNetworkFormCtrl.model.attributes.security"><label for="wirelessNetworkSecurityWpaPersonal" translate="SETTINGS_WLAN_VALUES_SECURITY_WPA_PERSONAL"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="wirelessNetworkSecurity" id="wirelessNetworkSecurityWpaEnterprise" value="wpaeap" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.security" ng-model-master="wirelessNetworkFormCtrl.model.attributes.security"><label for="wirelessNetworkSecurityWpaEnterprise" translate="SETTINGS_WLAN_VALUES_SECURITY_WPA_ENTERPRISE"></label></div></div><div ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.security === \'wep\'" ng-class="{\'appInfoBox--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_WLAN_SECURITY_WEP_THROUGHPUT_NOTE" class="noMarginBottom"></p></div><div class="appInfoBox__footer"><a ng-href="{{wirelessNetworkFormCtrl.URLS.WLAN_SECURITY_WEP_THROUGHPUT_NOTE}}" target="_blank" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--info"></span><span translate="SETTINGS_WLAN_SECURITY_WPA2_THROUGHPUT_NOTE_LEARN_MORE"></span></a></div></div></div></div></div><div ng-show="wirelessNetworkFormCtrl.setVisibility(\'wep\', wirelessNetworkFormCtrl.modelCopy.attributes.security === \'wep\')" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_WEP_KEY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="password" name="wirelessNetworkWepKey" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.x_wep" ng-model-master="wirelessNetworkFormCtrl.model.attributes.x_wep" ng-pattern="wirelessNetworkFormCtrl.getVisibility(\'wep\') ? wirelessNetworkFormCtrl.patterns.wep : \'\'" ng-required="wirelessNetworkFormCtrl.getVisibility(\'wep\')" unifi-password-reveal class="input--full"><div ng-if="wirelessNetworkFormCtrl.form.wirelessNetworkWepKey.$invalid" translate="VALIDATION_HINT_WEP_KEY" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="col--sm4 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><label for="wirelessNetworkWepKeyIndex" translate="SETTINGS_WLAN_LABEL_WEP_KEY_INDEX" class="appLabel--boxInline"></label><select name="wirelessNetworkWepKeyIndex" id="wirelessNetworkWepKeyIndex" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.wep_idx" ng-model-master="wirelessNetworkFormCtrl.model.attributes.wep_idx"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option></select></div></div></div><div ng-show="wirelessNetworkFormCtrl.setVisibility(\'wpapsk\', wirelessNetworkFormCtrl.modelCopy.attributes.security === \'wpapsk\')" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_SECURITY_KEY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="password" name="wirelessNetworkWpaPskKey" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.x_passphrase" ng-model-master="wirelessNetworkFormCtrl.model.attributes.x_passphrase" ng-pattern="wirelessNetworkFormCtrl.getVisibility(\'wpapsk\') ? wirelessNetworkFormCtrl.patterns.password : \'\'" ng-required="wirelessNetworkFormCtrl.getVisibility(\'wpapsk\')" unifi-password-reveal class="input--full"><div ng-if="wirelessNetworkFormCtrl.form.wirelessNetworkWpaPskKey.$invalid" translate="VALIDATION_HINT_WPA_PSK" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><fieldset ng-show="wirelessNetworkFormCtrl.setVisibility(\'wpaeap\', wirelessNetworkFormCtrl.modelCopy.attributes.security === \'wpaeap\')" class="appFieldset appFieldset--quiet"><div unifi-feature-flag-disable="withRadiusProfilesEndpoint" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_RADIUS_AUTH_SERVER" class="appLabel--primary"></label></div><div unifi-legacy-radius-auth-server-form-group unifi-legacy-radius-auth-server-form-group-model="wirelessNetworkFormCtrl.modelCopy" unifi-legacy-radius-auth-server-form-group-min="wirelessNetworkFormCtrl.radiusAuthServerMin" unifi-legacy-radius-auth-server-form-group-max="wirelessNetworkFormCtrl.radiusAuthServerMax" unifi-legacy-radius-auth-server-form-group-is-required="wirelessNetworkFormCtrl.modelCopy &amp;&amp; wirelessNetworkFormCtrl.getVisibility(\'wpaeap\')" unifi-legacy-radius-auth-server-form-group-is-read-only="isReadOnly" class="col--sm9"></div></div><div unifi-feature-flag-disable="withRadiusProfilesEndpoint" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_RADIUS_ACCOUNTING_SERVER" class="appLabel--primary"></label></div><div unifi-legacy-radius-acct-server-form-group unifi-legacy-radius-acct-server-form-group-model="wirelessNetworkFormCtrl.modelCopy" unifi-legacy-radius-acct-server-form-group-min="wirelessNetworkFormCtrl.radiusAcctServerMin" unifi-legacy-radius-acct-server-form-group-max="wirelessNetworkFormCtrl.radiusAcctServerMax" unifi-legacy-radius-acct-server-form-group-is-required="wirelessNetworkFormCtrl.modelCopy &amp;&amp; wirelessNetworkFormCtrl.getVisibility(\'wpaeap\')" unifi-legacy-radius-acct-server-form-group-is-read-only="isReadOnly" class="col--sm9"></div></div><div unifi-feature-flag-enable="withRadiusProfilesEndpoint" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_RADIUS_PROFILE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><unifi-radius-selector unifi-radius-selector-radius-profile-id="wirelessNetworkFormCtrl.modelCopy.attributes.radiusprofile_id" unifi-radius-selector-is-required="wirelessNetworkFormCtrl.modelCopy.attributes.security === \'wpaeap\'"></unifi-radius-selector></div></div><div unifi-feature-flag-enable="enableHotspot2" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_HOTSPOT2" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="wirelessNetworkHotspot2Enabled" id="wirelessNetworkHotspot2Enabled" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.hotspot2conf_enabled" ng-model-master="wirelessNetworkFormCtrl.model.attributes.hotspot2conf_enabled"><label translate="SETTINGS_WLAN_VALUES_HOTSPOT2_ENABLED" for="wirelessNetworkHotspot2Enabled"></label><span unifi-notify-device-requirement="gen2" unifi-notify-device-requirement-is-dark="wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')"></span></div><div ng-show="wirelessNetworkFormCtrl.modelCopy.attributes.hotspot2conf_enabled" class="appInputGroup inlineBlock"><label translate="SETTINGS_WLAN_VALUES_HOTSPOT2_WITH_PROFILE" for="wirelessNetworkHotspot2Id"></label><select name="wirelessNetworkHotspot2Id" id="wirelessNetworkHotspot2Id" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.hotspot2conf_id" ng-model-master="wirelessNetworkFormCtrl.model.attributes.hotspot2conf_id" ng-options="hs2.attributes._id as hs2.attributes.name for hs2 in wirelessNetworkFormCtrl.hotspot2Profiles" ng-required="wirelessNetworkFormCtrl.modelCopy.attributes.hotspot2conf_enabled"><option unifi-option-placeholder></option></select></div></div></div></div></fieldset><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_GUEST_POLICY" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup"><div class="appInputGroup"><input type="checkbox" name="wirelessNetworkGuestPolicy" id="wirelessNetworkGuestPolicy" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.is_guest" ng-model-master="wirelessNetworkFormCtrl.model.attributes.is_guest"><label for="wirelessNetworkGuestPolicy" translate="SETTINGS_WLAN_VALUES_GUEST_POLICY"></label></div></div></div></div><div class="unifiSettingsSection"><div ng-click="wirelessNetworkFormCtrl.isAdvancedExpanded = !wirelessNetworkFormCtrl.isAdvancedExpanded" ng-class="wirelessNetworkFormCtrl.isAdvancedExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="COMMON_SECTION_ADVANCED_OPTIONS" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="wirelessNetworkFormCtrl.isAdvancedExpanded" class="appFieldset appFieldset--quiet"><div unifi-feature-flag-enable="enableBcFilter" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_BC_FILTER_ENABLED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wlanBcFilterEnabled" id="wlanBcFilterEnabled" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.bc_filter_enabled" ng-model-master="wirelessNetworkFormCtrl.model.attributes.bc_filter_enabled"><label for="wlanBcFilterEnabled" translate="SETTINGS_WLAN_VALUES_BC_FILTER_ENABLED_LABEL"></label><div class="appTooltipContainer appTooltipContainer--hoverable appTooltipContainer--prompt"><div ng-class="{\'appTooltip--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><div class="verticalRhythmQuarter">{{"SETTINGS_WLAN_VALUES_BC_FILTER_ENABLED_TOOLTIP_INFO" | translate }}</div><div>{{"SETTINGS_WLAN_VALUES_BC_FILTER_ENABLED_TOOLTIP_DISABLE" | translate }}</div></div></div></div></div></div><div unifi-feature-flag-enable="enableBcFilter" ng-show="wirelessNetworkFormCtrl.modelCopy.attributes.bc_filter_enabled" class="row"><div class="col--sm9 col--smOffset3 appFormGroup"><label translate="SETTINGS_WLAN_VALUES_BC_FILTER_EXCEPTED_DEVICES_LABEL"></label><div class="appTooltipContainer appTooltipContainer--hoverable appTooltipContainer--prompt"><div ng-class="{\'appTooltip--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><div class="verticalRhythmQuarter">{{"SETTINGS_WLAN_VALUES_BC_FILTER_EXCEPTED_DEVICES_TOOLTIP_SERVICES" | translate }}</div><div class="verticalRhythmQuarter">{{"SETTINGS_WLAN_VALUES_BC_FILTER_EXCEPTED_DEVICES_TOOLTIP_GATEWAY" | translate }}</div><div>{{"SETTINGS_WLAN_VALUES_BC_FILTER_EXCEPTED_DEVICES_TOOLTIP_OTHER_DEVICES" | translate }}</div></div></div><unifi-wireless-network-mac-address-filter-list unifi-wireless-network-mac-address-filter-list-filter-enabled="wirelessNetworkFormCtrl.modelCopy.attributes.bc_filter_enabled" unifi-wireless-network-mac-address-filter-list-filter-list="wirelessNetworkFormCtrl.modelCopy.attributes.bc_filter_list" unifi-wireless-network-mac-address-filter-list-filter-max="wirelessNetworkFormCtrl.bcFilterMax" unifi-wireless-network-mac-address-filter-list-gateway-auto-detect-enabled="wirelessNetworkFormCtrl.bcFilterGatewayAutoDetectEnabled" unifi-wireless-network-mac-address-filter-list-wireless-clients-only="false"></unifi-wireless-network-mac-address-filter-list></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_VLAN" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="wirelessNetworkEnableVlan" id="wirelessNetworkEnableVlan" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.vlan_enabled" ng-model-master="wirelessNetworkFormCtrl.model.attributes.vlan_enabled"><label for="wirelessNetworkEnableVlan" translate="SETTINGS_WLAN_VALUES_USE_VLAN"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="wirelessNetworkVlanId" translate="SETTINGS_WLAN_LABEL_VLAN_ID" ng-class="{\'is-label-disabled\': !wirelessNetworkFormCtrl.modelCopy.attributes.vlan_enabled}"></label><input type="text" name="wirelessNetworkVlanId" id="wirelessNetworkVlanId" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.vlan" ng-model-master="wirelessNetworkFormCtrl.model.attributes.vlan" ng-disabled="!wirelessNetworkFormCtrl.modelCopy.attributes.vlan_enabled" ng-required="wirelessNetworkFormCtrl.modelCopy.attributes.vlan_enabled" ng-pattern="wirelessNetworkFormCtrl.modelCopy.attributes.vlan_enabled ? wirelessNetworkFormCtrl.patterns.vlan : \'\'" class="input--smallNumber"></div></div><div ng-show="wirelessNetworkFormCtrl.getVisibility(\'wpaeap\')" unifi-feature-flag-disabled="withRadiusVlanModes" class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="wirelessNetworkEnableRadiusVlan" id="wirelessNetworkEnableRadiusVlan" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.radius_vlan" ng-model-master="wirelessNetworkFormCtrl.model.attributes.radius_vlan" ng-true-value="\'{{wirelessNetworkFormCtrl.RADIUS_VLAN_OPTIONS.ENABLED}}\'" ng-false-value="\'{{wirelessNetworkFormCtrl.RADIUS_VLAN_OPTIONS.DISABLED}}\'"><label for="wirelessNetworkEnableRadiusVlan" translate="SETTINGS_WLAN_VALUES_ENABLE_RADIUS_ASSIGNED_VLAN"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div></div></div></div><div ng-if="!wirelessNetworkFormCtrl.isWlanGroupRoaming" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_HIDE_SSID" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wirelessNetworkHideSsid" id="wirelessNetworkHideSsid" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.hide_ssid" ng-model-master="wirelessNetworkFormCtrl.model.attributes.hide_ssid"><label for="wirelessNetworkHideSsid" translate="SETTINGS_WLAN_VALUES_HIDE_SSID"></label></div></div></div><div ng-if="!wirelessNetworkFormCtrl.isWlanGroupRoaming &amp;&amp; (        wirelessNetworkFormCtrl.modelCopy.attributes.security === \'wpapsk\' ||        wirelessNetworkFormCtrl.modelCopy.attributes.security === \'wpaeap\'      )" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_WPA_MODE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><select name="wirelessNetworkWpaMode" id="wirelessNetworkWpaMode" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.wpa_mode" ng-model-master="wirelessNetworkFormCtrl.model.attributes.wpa_mode" ng-model-master-cleanup="true" ng-options="key as value | translate for (key, value) in wirelessNetworkFormCtrl.wpaModeOptions"></select></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="wirelessNetworkWpaEncryption" translate="SETTINGS_WLAN_LABEL_WPA_ENCRYPTION"></label><select name="wirelessNetworkWpaEncryption" id="wirelessNetworkWpaEncryption" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.wpa_enc" ng-model-master="wirelessNetworkFormCtrl.model.attributes.wpa_enc" ng-model-master-cleanup="true" ng-options="key as value | translate for (key, value) in wirelessNetworkFormCtrl.encryptionOptions"></select></div></div><div ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.wpa_mode !== \'wpa2\' || wirelessNetworkFormCtrl.modelCopy.attributes.wpa_enc !== \'ccmp\' " ng-class="{\'appInfoBox--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_WLAN_SECURITY_WPA2_THROUGHPUT_NOTE" class="noMarginBottom"></p></div><div class="appInfoBox__footer"><a ng-href="{{wirelessNetworkFormCtrl.URLS.WLAN_SECURITY_WEP_THROUGHPUT_NOTE}}" target="_blank" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--info"></span><span translate="SETTINGS_WLAN_SECURITY_WPA2_THROUGHPUT_NOTE_LEARN_MORE"></span></a></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_USER_GROUP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="wirelessNetworkUserGroupId" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.usergroup_id" ng-model-master="wirelessNetworkFormCtrl.model.attributes.usergroup_id" ng-options="userGroup.id as userGroup.get(\'name\') for userGroup in wirelessNetworkFormCtrl.userGroups.repository.collection.models" class="select--full"></select></div><div ng-class="{\'appInfoBox--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_WLAN_USER_GROUP_NOTE" class="noMarginBottom"></p></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_UAPSD" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wirelessNetworkEnableUapsd" id="wirelessNetworkEnableUapsd" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.uapsd_enabled" ng-model-master="wirelessNetworkFormCtrl.model.attributes.uapsd_enabled"><label for="wirelessNetworkEnableUapsd" translate="SETTINGS_WLAN_VALUES_UAPSD"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_SCHEDULED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wirelessNetworkEnableSchedule" id="wirelessNetworkEnableSchedule" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.schedule_enabled" ng-model-master="wirelessNetworkFormCtrl.model.attributes.schedule_enabled"><label for="wirelessNetworkEnableSchedule" translate="SETTINGS_WLAN_VALUES_SCHEDULED"></label></div></div></div></fieldset></div><div ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.schedule_enabled &amp;&amp; wirelessNetworkFormCtrl.isAdvancedExpanded" class="unifiSettingsSection"><div translate="SETTINGS_WLAN_SECTION_WLAN_SCHEDULE" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><unifi-wireless-network-schedule unifi-schedule="wirelessNetworkFormCtrl.schedule" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.schedule" ng-model-master="wirelessNetworkFormCtrl.model.attributes.schedule"></unifi-wireless-network-schedule></div></div><div ng-show="wirelessNetworkFormCtrl.isAdvancedExpanded" class="unifiSettingsSection"><div ng-click="wirelessNetworkFormCtrl.isMinrateExpanded = !wirelessNetworkFormCtrl.isMinrateExpanded" ng-class="wirelessNetworkFormCtrl.isMinrateExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="SETTINGS_WLAN_SECTION_WLAN_RATE_AND_BEACON" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="wirelessNetworkFormCtrl.isMinrateExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_DTIM_PERIOD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wirelessNetworkDtim" id="wirelessNetworkDtim" ng-true-value="\'default\'" ng-false-value="\'custom\'" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.dtim_mode" ng-model-master="wirelessNetworkFormCtrl.model.attributes.dtim_mode"><label for="wirelessNetworkDtim" translate="SETTINGS_WLAN_LABEL_DTIM_PERIOD_DEFAULT"></label></div></div></div><div ng-repeat="dtimCustom in [\'ng\', \'na\']" class="row"><div class="col--sm3"><label translate="{{\'SETTINGS_WLAN_LABEL_DTIM_PERIOD_\' + dtimCustom | toTranslationKey}}" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup inlineBlock"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.dtim_mode === \'default\'" type="number" ng-value="wirelessNetworkFormCtrl.MINRATE_SETTINGS.DTIM.DEFAULT" ng-disabled="true"><input ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.dtim_mode === \'custom\'" type="number" min="wirelessNetworkFormCtrl.MINRATE_SETTINGS.DTIM.MIN" max="wirelessNetworkFormCtrl.MINRATE_SETTINGS.DTIM.MAX" name="wirelessNetworkDtimCustom" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes[\'dtim_\' + dtimCustom]" ng-model-master="wirelessNetworkFormCtrl.model.attributes[\'dtim_\' + dtimCustom]" ng-required="wirelessNetworkFormCtrl.modelCopy.attributes.dtim_mode === \'custom\'"></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_MINRATE_NG_MODE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="value in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NG.MODE" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="wirelessMinrateModeNg" id="wirelessMinrateModeNg{{value}}" ng-value="value" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.ratectrl_ng_mode" ng-model-master="wirelessNetworkFormCtrl.model.attributes.ratectrl_ng_mode"><label for="wirelessMinrateModeNg{{value}}">{{ \'SETTINGS_WLAN_VALUES_MODE_\' + value | toTranslationKey | translate }}</label></div></div></div></div><div class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="option in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NG.OPTIONS" class="appInputGroup appInputGroup--cozy col--xs4 noMarginRight noPaddingLeft unifiSettingsWirelessNetworkMinrateOption"><label for="wirelessMinrateNg{{option.KEY}}" class="unifiSettingsWirelessNetworkMinrateLabel">{{ \'SETTINGS_WLAN_VALUES_SPEED\' | translate:{speed: option.SPEED} }}</label><select ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.ratectrl_ng_mode === \'default\'" ng-disabled="true" ng-model="wirelessNetworkFormCtrl.minratePredefined.ngDefault[option.KEY]" ng-options="value as \'SETTINGS_WLAN_VALUES_OPTION_\' + value | toTranslationKey | translate for value in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NG.VALUES track by value"></select><select ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.ratectrl_ng_mode === \'legacy\'" ng-disabled="true" ng-model="wirelessNetworkFormCtrl.minratePredefined.ngLegacy[option.KEY]" ng-options="value as \'SETTINGS_WLAN_VALUES_OPTION_\' + value | toTranslationKey | translate for value in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NG.VALUES track by value"></select><select ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.ratectrl_ng_mode === \'custom\'" name="wirelessMinrateNg{{option.KEY}}" id="wirelessMinrateNg{{option.KEY}}" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes[option.KEY]" ng-model-master="wirelessNetworkFormCtrl.model.attributes[option.KEY]" ng-options="value as \'SETTINGS_WLAN_VALUES_OPTION_\' + value | toTranslationKey | translate for value in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NG.VALUES track by value"></select><div ng-if="$first" class="appTooltipContainer appTooltipContainer--prompt appTooltip--boxAlign appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><div class="verticalRhythmQuarter">{{ \'SETTINGS_WLAN_VALUES_OPTION_BASIC_DESCRIPTION\' | translate }}</div><div>{{ \'SETTINGS_WLAN_VALUES_OPTION_SUPPORTED_DESCRIPTION\' | translate }}</div></div></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_MINRATE_NA_MODE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="value in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NA.MODE" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="wirelessMinrateModeNa" id="wirelessMinrateModeNa{{value}}" ng-value="value" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.ratectrl_na_mode" ng-model-master="wirelessNetworkFormCtrl.model.attributes.ratectrl_na_mode"><label for="wirelessMinrateModeNa{{value}}">{{ \'SETTINGS_WLAN_VALUES_MODE_\' + value | toTranslationKey | translate }}</label></div></div></div></div><div class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div ng-repeat="option in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NA.OPTIONS" class="appInputGroup appInputGroup--cozy col--xs4 noMarginRight noPaddingLeft unifiSettingsWirelessNetworkMinrateOption"><label for="wirelessMinrateNa{{option.KEY}}" class="unifiSettingsWirelessNetworkMinrateLabel">{{ \'SETTINGS_WLAN_VALUES_SPEED\' | translate:{speed: option.SPEED} }}</label><select ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.ratectrl_na_mode === \'default\'" ng-disabled="true" ng-model="wirelessNetworkFormCtrl.minratePredefined.naDefault[option.KEY]" ng-options="value as \'SETTINGS_WLAN_VALUES_OPTION_\' + value | toTranslationKey | translate for value in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NA.VALUES track by value"></select><select ng-if="wirelessNetworkFormCtrl.modelCopy.attributes.ratectrl_na_mode === \'custom\'" name="wirelessMinrateNa{{option.KEY}}" id="wirelessMinrateNa{{option.KEY}}" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes[option.KEY]" ng-model-master="wirelessNetworkFormCtrl.model.attributes[option.KEY]" ng-options="value as \'SETTINGS_WLAN_VALUES_OPTION_\' + value | toTranslationKey | translate for value in wirelessNetworkFormCtrl.MINRATE_SETTINGS.RATECTRL_NA.VALUES track by value"></select><div ng-if="$first" class="appTooltipContainer appTooltipContainer--prompt appTooltip--boxAlign appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><div class="verticalRhythmQuarter">{{ \'SETTINGS_WLAN_VALUES_OPTION_BASIC_DESCRIPTION\' | translate }}</div><div>{{ \'SETTINGS_WLAN_VALUES_OPTION_SUPPORTED_DESCRIPTION\' | translate }}</div></div></div></div></div></div></div><div unifi-feature-flag-enable="enableMinrateSlider" ng-repeat="radio in [\'ng\', \'na\']" class="row"><div class="col--sm3"><label translate="{{wirelessNetworkFormCtrl.minrateSliderLabel[radio]}}" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm7 appFormGroup appFormGroup--cozy"><div class="appInputGroup verticalRhythm verticalRhythmTopHalf"><unifi-wireless-network-minrate-slider unifi-wireless-network-minrate-slider-model="wirelessNetworkFormCtrl.modelCopy.attributes[\'minrate_value_\' + radio]" unifi-wireless-network-minrate-slider-mcs-frequencies="wirelessNetworkFormCtrl.MINRATE_SETTINGS.MCS[radio]"></unifi-wireless-network-minrate-slider></div><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wirelessMinrateRequireClients_{{radio}}" id="wirelessMinrateRequireClients_{{radio}}" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes[\'minrate_require_clients_\' + radio]" ng-model-master="wirelessNetworkFormCtrl.model.attributes[\'minrate_require_clients_\' + radio]"><label for="wirelessMinrateRequireClients_{{radio}}" translate="SETTINGS_WLAN_LABEL_MINRATE_REQUIRE_CLIENTS"></label></div><div ng-if="radio === \'ng\'" class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wirelessMinrateSendBeacons_{{radio}}" id="wirelessMinrateSendBeacons_{{radio}}" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes[\'minrate_send_beacons_\' + radio]" ng-model-master="wirelessNetworkFormCtrl.model.attributes[\'minrate_send_beacons_\' + radio]"><label for="wirelessMinrateSendBeacons_{{radio}}" translate="SETTINGS_WLAN_LABEL_MINRATE_SEND_BEACONS_1_MBPS"></label></div></div></div></fieldset></div><div unifi-feature-flag-enable="enableMacFilter" ng-show="wirelessNetworkFormCtrl.isAdvancedExpanded" class="unifiSettingsSection"><div ng-click="wirelessNetworkFormCtrl.isMacFilterExpanded = !wirelessNetworkFormCtrl.isMacFilterExpanded" ng-class="wirelessNetworkFormCtrl.isMacFilterExpanded ? [\'appCollapserType\', \'appSubHeading--standalone\'] : \'appExpanderType\'" translate="SETTINGS_WLAN_SECTION_WLAN_MAC_FILTER" class="appSubHeading appSubHeading--comfy"></div><fieldset ng-show="wirelessNetworkFormCtrl.isMacFilterExpanded" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_MAC_FILTER_ENABLED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wlanMacFilterEnabled" id="wlanMacFilterEnabled" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.mac_filter_enabled" ng-model-master="wirelessNetworkFormCtrl.model.attributes.mac_filter_enabled"><label for="wlanMacFilterEnabled" translate="SETTINGS_WLAN_VALUES_MAC_FILTER_ENABLED"></label></div></div></div><div unifi-feature-flag-enable="enableMacFilterPolicyAllowEnabled" class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_MAC_FILTER_POLICY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div ng-repeat="macFilterPolicy in [\'deny\', \'allow\']" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="wlanMacFilterPolicy" id="wlanMacFilterPolicy-{{macFilterPolicy}}" value="{{macFilterPolicy}}" ng-model="wirelessNetworkFormCtrl.modelCopy.attributes.mac_filter_policy" ng-model-master="wirelessNetworkFormCtrl.model.attributes.mac_filter_policy"><label for="wlanMacFilterPolicy-{{macFilterPolicy}}">{{ \'SETTINGS_WLAN_VALUES_MAC_FILTER_POLICY_\' + macFilterPolicy | uppercase | translate  }}</label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_LABEL_MAC_FILTER_LIST" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup noMarginBottom"><unifi-wireless-network-mac-address-filter-list unifi-wireless-network-mac-address-filter-list-filter-list="wirelessNetworkFormCtrl.modelCopy.attributes.mac_filter_list" unifi-wireless-network-mac-address-filter-list-filter-max="wirelessNetworkFormCtrl.macFilterMax" unifi-wireless-network-mac-address-filter-list-wireless-clients-only="true"></unifi-wireless-network-mac-address-filter-list></div></div></fieldset></div></fieldset><div ng-class="{\'appFormFooter--dark\': wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="wirelessNetworkFormCtrl.showValidation = true" busy-toggle="wirelessNetworkFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveWirelessNetwork">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="wirelessNetworkFormCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),
b.join("")}},{"jade/runtime":232}],916:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiWirelessNetworkForm",["$timeout",function(b){return{scope:{model:"=?unifiWirelessNetworkForm",wlanGroupId:"=unifiWirelessNetworkFormWlanGroupId",onSave:"&unifiWirelessNetworkFormOnSave",onCancel:"&unifiWirelessNetworkFormOnCancel",isReadOnly:"=unifiWirelessNetworkFormIsReadOnly"},controller:"WirelessNetworkFormController",controllerAs:"wirelessNetworkFormCtrl",template:a("./wirelessNetworkForm.jade")(),link:function(a,c,d,e){e.setWlanGroupId(a.wlanGroupId),a.onSubmit=function(b){b===!0&&a.onSave()},a.$watch(function(){return e.modelCopy?e.modelCopy.attributes.vlan_enabled:void 0},function(a){a&&e.modelCopy.attributes.radius_vlan===e.RADIUS_VLAN_OPTIONS.ENABLED&&(e.modelCopy.attributes.radius_vlan=e.RADIUS_VLAN_OPTIONS.DISABLED)}),a.$watch(function(){return e.modelCopy?e.modelCopy.attributes.radius_vlan:void 0},function(a){a===e.RADIUS_VLAN_OPTIONS.ENABLED&&(e.modelCopy.attributes.vlan_enabled=!1)}),a.$watch("model",function(a){e.updateModel(a)}),a.$on("$destroy",function(){e.removeEventHandlers()}),b(function(){a.isLoaded=!0},0)}}}])},{"./wirelessNetworkForm.jade":915}],917:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j){this.$translate=a,this.heyToasts=b,this.wirelessNetworkGroups=c,this.countryChannels=d,this.preferences=f,this.apiResults=h,this.URLS=j,this.radioOptions={ng:"SETTINGS_WLAN_GROUP_VALUES_RADIO_NG",na:"SETTINGS_WLAN_GROUP_VALUES_RADIO_NA"},this.patterns={name:i.NAME},e.call(this,g)}var e=a("../../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=angular.extend({},this.modelCopy.attributes);return this.model.save(a,{wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("SETTINGS_NAV_WIRELESS_NETWORKS").toLowerCase()})),this.wirelessNetworkGroups.repository.collection.add(this.model,{merge:!0}),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("SETTINGS_NAV_WIRELESS_NETWORKS").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.getRadioChannels=function(a){switch(a){case"na":return(this.countryChannels.repository.model.get("channels_na")||[]).filter(function(a){return(this.countryChannels.repository.model.get("channels_na_dfs")||[]).indexOf(a)===-1}.bind(this));case"ng":return this.countryChannels.repository.model.get("channels_ng")}},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy";this["model"+b]&&(this["model"+b].attributes.roam_radio=(this.model?this.model.get("roam_radio"):void 0)||"ng",this["model"+b].attributes.roam_channel_na=(this.model?this.model.get("roam_channel_na"):void 0)||(this.getRadioChannels("na")||[])[0],this["model"+b].attributes.roam_channel_ng=(this.model?this.model.get("roam_channel_ng"):void 0)||(this.getRadioChannels("ng")||[])[0])},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","wirelessNetworkGroups","countryChannels","preferences","modelDivergence","apiResults","REGEX_PATTERNS","URLS"],angular.module("app-unifi-manage").controller("WirelessNetworkGroupFormController",d)},{"../../../base-unifi/controllers/BaseFormController":1661}],918:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form novalidate autocomplete="off" name="wirelessNetworkGroupFormCtrl.form" ng-class="{    \'appForm--dark\': wirelessNetworkGroupFormCtrl.preferences.model.get(\'isSettingsDark\'),    \'appForm--isLoading\': !isLoaded,    \'is-form-validation-visible\': wirelessNetworkGroupFormCtrl.showValidation,    \'is-validation-hidden\': !wirelessNetworkGroupFormCtrl.showValidation  }" ng-submit="wirelessNetworkGroupFormCtrl.form.$valid &amp;&amp; wirelessNetworkGroupFormCtrl.save().then(onSubmit)" class="appForm appForm--cozy"><fieldset ng-disabled="isReadOnly" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="wirelessNetworkGroupFormCtrl.resolveDivergence()" unifi-config-changed-on-ignore="wirelessNetworkGroupFormCtrl.ignoreDivergence()" unifi-config-changed-is-dark="wirelessNetworkGroupFormCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="wirelessNetworkGroupFormCtrl.form.$error.divergent"></unifi-config-changed><div class="unifiSettingsSection"><div translate translate-values="{wlanGroupName: wirelessNetworkGroupFormCtrl.model.attributes.name}" class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{isReadOnly ? \'SETTINGS_WLAN_GROUP_SECTION_VIEW\' : (wirelessNetworkGroupFormCtrl.model.id ? \'SETTINGS_WLAN_GROUP_SECTION_EDIT\' : \'SETTINGS_WLAN_GROUP_SECTION_CREATE\')}}</div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_GROUP_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="wirelessNetworkGroupName" ng-model="wirelessNetworkGroupFormCtrl.modelCopy.attributes.name" ng-model-master="wirelessNetworkGroupFormCtrl.model.attributes.name" ng-pattern="wirelessNetworkGroupFormCtrl.patterns.name" required class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_GROUP_LABEL_ROAMING" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wirelessNetworkGroupEnableRoaming" id="wirelessNetworkGroupEnableRoaming" ng-model="wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_enabled" ng-model-master="wirelessNetworkGroupFormCtrl.model.attributes.roam_enabled" ng-disabled="!!wirelessNetworkGroupFormCtrl.model.id"><label for="wirelessNetworkGroupEnableRoaming" translate="SETTINGS_WLAN_GROUP_VALUES_ROAMING"></label><div ng-if="wirelessNetworkGroupFormCtrl.model.attributes.attr_hidden_id === \'Default\'" class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': wirelessNetworkGroupFormCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_WLAN_GROUP_TOOLTIP_ROAMING_DISABLED" class="appTooltip appTooltip--rightSide"></div></div></div></div></div><fieldset ng-show="wirelessNetworkGroupFormCtrl.setVisibility(\'roaming\', wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_enabled)" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_GROUP_LABEL_RADIO" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><select name="wirelessNetworkGroupRadio" id="wirelessNetworkGroupRadio" ng-model="wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_radio" ng-model-master="wirelessNetworkGroupFormCtrl.model.attributes.roam_radio" ng-options="key as value | translate for (key, value) in wirelessNetworkGroupFormCtrl.radioOptions" ng-disabled="!!wirelessNetworkGroupFormCtrl.model.id"></select></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_GROUP_LABEL_CHANNEL" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div ng-if="wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_radio === \'na\'" class="appInputGroup"><select ng-if="wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_radio === \'na\'" name="wirelessNetworkGroupChannel" id="wirelessNetworkGroupChannel" ng-model="wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_channel_na" ng-model-master="wirelessNetworkGroupFormCtrl.model.attributes.roam_channel_na" ng-model-master-cleanup="true" ng-options="channel for channel in wirelessNetworkGroupFormCtrl.getRadioChannels(\'na\') track by channel.toString()"></select></div><div ng-if="wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_radio === \'ng\'" class="appInputGroup"><select name="wirelessNetworkGroupChannel" id="wirelessNetworkGroupChannel" ng-model="wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_channel_ng" ng-model-master="wirelessNetworkGroupFormCtrl.model.attributes.roam_channel_ng" ng-model-master-cleanup="true" ng-options="channel for channel in wirelessNetworkGroupFormCtrl.getRadioChannels(\'ng\') track by channel.toString()"></select></div></div></div></fieldset><fieldset ng-show="wirelessNetworkGroupFormCtrl.setVisibility(\'not-roaming\', !wirelessNetworkGroupFormCtrl.modelCopy.attributes.roam_enabled)" class="appFieldset appFieldset--quiet"><div unifi-if-advanced-features class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_GROUP_LABEL_LOAD_BALANCING" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="wirelessNetworkGroupEnableLoadBalancing" id="wirelessNetworkGroupEnableLoadBalancing" ng-model="wirelessNetworkGroupFormCtrl.modelCopy.attributes.loadbalance_enabled" ng-model-master="wirelessNetworkGroupFormCtrl.model.attributes.loadbalance_enabled"><label for="wirelessNetworkGroupEnableLoadBalancing" translate="SETTINGS_WLAN_GROUP_VALUES_LOAD_BALANCING"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="number" name="wirelessNetworkGroupLoadBalancingMaxSta" min="1" max="128" placeholder="30" ng-model="wirelessNetworkGroupFormCtrl.modelCopy.attributes.maxsta" ng-model-master="wirelessNetworkGroupFormCtrl.model.attributes.maxsta" ng-disabled="!wirelessNetworkGroupFormCtrl.modelCopy.attributes.loadbalance_enabled" ng-required="wirelessNetworkGroupFormCtrl.getVisibility(\'not-roaming\') &amp;&amp; wirelessNetworkGroupFormCtrl.modelCopy.attributes.loadbalance_enabled" unifi-string-to-integer-input class="input--smallNumber"></div></div><div ng-if="wirelessNetworkGroupFormCtrl.form.wirelessNetworkGroupLoadBalancingMaxSta.$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: 1, max: 128}" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_WLAN_GROUP_LABEL_LEGACY_SUPPORT" class="appLabel--primary"></label></div><div class="col--sm7 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="checkbox" name="wirelessNetworkGroupEnableLegacySupport" id="wirelessNetworkGroupEnableLegacySupport" ng-model="wirelessNetworkGroupFormCtrl.modelCopy.attributes.b_supported" ng-model-master="wirelessNetworkGroupFormCtrl.model.attributes.b_supported"><label for="wirelessNetworkGroupEnableLegacySupport" translate="SETTINGS_WLAN_GROUP_VALUES_LEGACY_SUPPORT"></label></div><div ng-if="wirelessNetworkGroupFormCtrl.modelCopy.attributes.b_supported" ng-class="{\'appInfoBox--dark\': wirelessNetworkGroupFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_WLAN_GROUP_LEGACY_NOTE" class="noMarginBottom"></p></div><div class="appInfoBox__footer"><a ng-href="{{wirelessNetworkGroupFormCtrl.URLS.WLAN_GROUP_LEGACY_NOTE}}" target="_blank" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--info"></span><span translate="SETTINGS_WLAN_GROUP_LEGACY_NOTE_LEARN_MORE"></span></a></div></div></div></div></div></fieldset></div></fieldset><div ng-class="{\'appFormFooter--dark\': wirelessNetworkGroupFormCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-if="!isReadOnly" ng-click="wirelessNetworkGroupFormCtrl.showValidation = true" busy-toggle="wirelessNetworkGroupFormCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success saveWirelessNetworkGroup">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button><button type="button" ng-if="!isReadOnly" ng-click="onCancel()" ng-class="wirelessNetworkGroupFormCtrl.preferences.model.get(\'isSettingsDark\') ?           \'appMainButton--transparentDark\' :           \'appMainButton--transparent\'        " class="appMainButton cancelSave">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-if="isReadOnly" ng-click="onCancel()" class="appMainButton appMainButton--primary cancelView">{{\'COMMON_ACTIONS_BACK\' | translate}}</button></div></div></form>'),b.join("")}},{"jade/runtime":232}],919:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiWirelessNetworkGroupForm",["$timeout",function(b){return{scope:{model:"=unifiWirelessNetworkGroupForm",onSave:"&unifiWirelessNetworkGroupFormOnSave",onCancel:"&unifiWirelessNetworkGroupFormOnCancel",isReadOnly:"=unifiWirelessNetworkGroupFormIsReadOnly"},controller:"WirelessNetworkGroupFormController",controllerAs:"wirelessNetworkGroupFormCtrl",template:a("./wirelessNetworkGroupForm.jade")(),link:function(a,c,d,e){a.onSubmit=function(b){b===!0&&a.onSave({wlanGroupId:a.model.id})},a.$watch("model",function(a){e.updateModel(a)}),a.$on("$destroy",function(){e.removeEventHandlers()}),b(function(){a.isLoaded=!0},0)}}}])},{"./wirelessNetworkGroupForm.jade":918}],920:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.$state=a,this.$translate=b,this.heyToasts=d,this.frame=f,this.comparator=g,this.wirelessNetworks=i,this.preferences=j,this.RADIUS_VLAN_OPTIONS=k,this.defaultSortBy="name",this.isRemoving={},e.call(this,c,h)}var e=a("../../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){var a=this.wlanGroupId;this.filter={getTest:function(){return function(b){return b.get("wlangroup_id")===a}}}},d.prototype.getCollection=function(){return this.wirelessNetworks.repository.collection},d.prototype.edit=function(a){if(!this.onEdit)throw new Error("You must pass an onEdit function to the directive");this.onEdit({model:a})},d.prototype.remove=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_WLAN_DELETE_CONFIRM_TITLE",{wlanName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_WLAN_DELETE_CONFIRM_MESSAGE",{wlanName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("SETTINGS_WLAN_DELETE_SUCCESS",{wlanName:a.get("name")})),!0}.bind(this))["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("SETTINGS_WLAN_DELETE_ERROR",{wlanName:a.get("name")})),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.$inject=["$state","$translate","$q","heyToasts","frame","wirelessNetworksComparator","CollectionView","wirelessNetworks","preferences","RADIUS_VLAN_OPTIONS"],angular.module("app-unifi-manage").controller("WirelessNetworkListController",d)},{"../../../base-unifi/controllers/BaseListController":1662}],921:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="wirelessNetworksTable" collection-view-sort="wirelessNetworkListCtrl.view" ng-class="{      \'appTable--dark\': wirelessNetworkListCtrl.preferences.model.get(\'isSettingsDark\')    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="name" class="wlanName"><span translate="SETTINGS_WLAN_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="security" class="wlanSecurity"><span translate="SETTINGS_WLAN_TABLE_HEADER_SECURITY"></span></th><th collection-view-sort-by="is_guest" class="wlanGuestNetwork"><span translate="SETTINGS_WLAN_TABLE_HEADER_GUEST_NETWORK"></span></th><th collection-view-sort-by="vlan" class="wlanVlan"><span translate="SETTINGS_WLAN_TABLE_HEADER_VLAN"></span></th><th class="wlanActions"><span translate="SETTINGS_WLAN_TABLE_HEADER_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in wirelessNetworkListCtrl.view.getModels()" data-id="{{::model.id}}"><td class="wlanName">{{::model.get(\'name\')}}</td><td class="wlanSecurity">{{::model.get(\'security\')}}</td><td ng-bind-html="model.get(\'is_guest\') | enabledIcon" class="wlanGuestNetwork"></td><td class="wlanVlan"><span ng-if="model.get(\'vlan_enabled\')">{{model.get(\'vlan\')}}</span><span ng-if="model.get(\'radius_vlan\') === wirelessNetworkListCtrl.RADIUS_VLAN_OPTIONS.ENABLED">{{\'SETTINGS_WLAN_TABLE_VALUE_VLAN_RADIUS_ASSIGNED\' | translate}}</span></td><td class="wlanActions appTableCell--actions"><button unifi-if-role-admin ng-click="wirelessNetworkListCtrl.edit(model)" ng-disabled="wirelessNetworkListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button unifi-if-role-admin="false" ng-click="wirelessNetworkListCtrl.edit(model)" ng-disabled="wirelessNetworkListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--eye2"></span><span translate="COMMON_ACTIONS_VIEW"></span></button><button unifi-if-role-admin ng-click="wirelessNetworkListCtrl.remove(model)" ng-disabled="wirelessNetworkListCtrl.isRemoving[model.id]" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table><div ng-if="!wirelessNetworkListCtrl.view.getModels().length" ng-class="{\'appInfoBox--dark\': wirelessNetworkListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_WLAN_TABLE_EMPTY" class="noMarginBottom"></p></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],922:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiWirelessNetworkList",["ListDirective",function(b){return new b("wirelessNetwork",a("./wirelessNetworkList.jade")(),{wlanGroupId:"=unifiWirelessNetworkListWlanGroupId",onEdit:"&unifiWirelessNetworkListOnEdit"})}])},{"./wirelessNetworkList.jade":921}],923:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j){this._=a,this.$translate=b,this.clients=c,this.devices=d,this.frame=e,this.gateway=f.getSiteGateway(),this.knownClientsCache=g,this.preferences=h,this.patterns={macAddress:i.exact(j.MAC_ADDRESS)},this.filterListCurrentPage=1,this.filterListRowsPerPage=10,this.filterListPristine=!0,this.knownClientsCacheIds=[]}d.prototype.removeEventHandlers=function(){this.knownClientsCacheIds.forEach(function(a){this.knownClientsCache.repository.unregisterItem(a)},this)},d.prototype.addAutoGateway=function(){var a=this.getGatewayMac();if(this.gatewayAutoDetectEnabled&&this.filterListPristine&&a&&!this.hasMacAddress(a)){var b=new String(a);b.autoDeteted=!0,this.filterList.unshift(b)}},d.prototype.removeAutoGateway=function(){var a=this.getGatewayMac();if(this.gatewayAutoDetectEnabled&&this.filterListPristine&&a){var b=this.findMacAddressIndex(a);b!==-1&&this.filterList[b].autoDeteted===!0&&this.filterList.splice(b,1)}},d.prototype.isGateway=function(a){return this.getGatewayMac()===a.toString()},d.prototype.getGatewayMac=function(){return this.gateway&&this.gateway.get("mac")||void 0},d.prototype.addBatchMacAddress=function(){this.frame.show("wirelessNetworkMacFilterAddBatch").then(function(a){if(a.macFilterOverride)this.filterList=a.macFilterList;else{var b=this.getUniqueMacAddresses(a.macFilterList);this.filterList.push.apply(this.filterList,b)}this.filterListPristine=!1}.bind(this))},d.prototype.addClientsMacAddress=function(){this.frame.show("wirelessNetworkMacFilterAddClients",{macFilterList:function(){return this.filterList}.bind(this),wirelessClientsOnly:function(){return this.wirelessClientsOnly}.bind(this)}).then(function(a){var b=this.getUniqueMacAddresses(a.macFilterList);this.filterList.push.apply(this.filterList,b),this.filterListPristine=!1}.bind(this))},d.prototype.getUniqueMacAddresses=function(a){return this._.difference(a,this.filterList.map(function(a){return a.toString()}))},d.prototype.addMacAddress=function(){var a=this.macAddressToAdd;this.isMacAddressValid(a)?(this.hasMacAddress(a)||(this.filterList.push(a),this.filterListPristine=!1),this.macAddressToAdd="",this.showMacAddressToAddValidation=!1):this.showMacAddressToAddValidation=!0},d.prototype.onAddMacAddress=function(a){var b=13===a.keyCode;if(b)return a.preventDefault(),this.addMacAddress()},d.prototype.removeMacAddress=function(a){var b=this.findMacAddressIndex(a);b!==-1&&this.filterList.splice(b,1),this.filterListPristine=!1},d.prototype.findMacAddressIndex=function(a){return this.filterList.findIndex(function(b){return b.toString()===a.toString()})},d.prototype.hasMacAddress=function(a){return this.findMacAddressIndex(a)!==-1},d.prototype.isMacAddressValid=function(a){return this.patterns.macAddress.test(a)},d.prototype.getMacFilterLimits=function(){var a=this.filterList?this.filterList.length:0,b=this.filterMax-a;return{max:this.filterMax,exceeded:b<0?-b:0}},d.prototype.getHostnameByMac=function(a){var b=this.devices.repository.collection.get(a),c=b&&b.get("name");if(c)return c;var d=this.clients.repository.collection.get(a),e=d&&d.get("hostname");if(e)return e;var f=this.knownClientsCache.repository.collection.get(a),g=f&&f.get("hostname");return g?g:(this.knownClientsCacheIds.indexOf(a)===-1&&(this.knownClientsCacheIds.push(a),this.knownClientsCache.repository.registerItem(a).fetchItem(a)),this.isGateway(a)?this.$translate.instant("SETTINGS_WLAN_TABLE_FILTER_LIST_DEFAULT_GATEWAY"):this.$translate.instant("SETTINGS_WLAN_TABLE_FILTER_LIST_UNKNOWN_HOSTNAME"))},d.$inject=["_","$translate","clients","devices","frame","gatewayUtils","knownClientsCache","preferences","regexUtils","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("WirelessNetworkMacAddressFilterListController",d)},{}],924:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="wirelessNetworkMacAddressFilterList"><div ng-class="{\'appInfoBox--dark\': wirelessNetworkMacAddressFilterListCtrl.preferences.model.get(\'isSettingsDark\')}" ng-show="wirelessNetworkMacAddressFilterListCtrl.getMacFilterLimits().exceeded" class="wirelessNetworkMacAddressFilterListLimitsExceeded appInfoBox appInfoBox--cozy appInfoBox--danger verticalRhythmHalf"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_WLAN_VALUES_FILTER_LIST_LIMITS_EXCEEDED" translate-values="wirelessNetworkMacAddressFilterListCtrl.getMacFilterLimits()" class="noMarginBottom"></p></div></div></div><table ng-if="wirelessNetworkMacAddressFilterListCtrl.filterList.length" ng-class="{      \'appTable--dark\': wirelessNetworkMacAddressFilterListCtrl.preferences.model.get(\'isSettingsDark\'),      \'appTable--hoverable\': wirelessNetworkMacAddressFilterListCtrl.filterList.length    }" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--minor verticalRhythmHalf"><thead><tr><th class="wlanMacAddress"><span translate="SETTINGS_WLAN_TABLE_FILTER_LIST_HEADER_MAC"></span></th><th class="wlanClientHostname"><span translate="SETTINGS_WLAN_TABLE_FILTER_LIST_HEADER_HOSTNAME"></span></th><th class="wlanAction"><span translate="SETTINGS_WLAN_TABLE_FILTER_LIST_HEADER_ACTION"></span></th></tr></thead><tfoot ng-if="wirelessNetworkMacAddressFilterListCtrl.filterList.length"><tr><td colspan="3"><unifi-list-pagination unifi-list-pagination-current-page="wirelessNetworkMacAddressFilterListCtrl.filterListCurrentPage" unifi-list-pagination-rows-per-page="wirelessNetworkMacAddressFilterListCtrl.filterListRowsPerPage" unifi-list-pagination-total-rows="wirelessNetworkMacAddressFilterListCtrl.filterList.length" unifi-list-pagination-total-links="5" unifi-list-pagination-is-dark="wirelessNetworkMacAddressFilterListCtrl.preferences.model.get(\'isSettingsDark\')" class="noMarginBottom"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="macAddress in wirelessNetworkMacAddressFilterListCtrl.filterList.sort(),          startFrom (wirelessNetworkMacAddressFilterListCtrl.filterListCurrentPage - 1) * wirelessNetworkMacAddressFilterListCtrl.filterListRowsPerPage,          limitTo wirelessNetworkMacAddressFilterListCtrl.filterListRowsPerPage" collection-view-repeat-watch="wirelessNetworkMacAddressFilterListCtrl.filterList.length" data-id="{{::macAddress}}" class="clickable"><td class="wlanMacAddress">{{::macAddress}}</td><td class="wlanClientHostname">{{wirelessNetworkMacAddressFilterListCtrl.getHostnameByMac(macAddress)}}<span ng-if="macAddress.autoDeteted" translate="SETTINGS_WLAN_TABLE_FILTER_LIST_AUTO_DETECTED_GATEWAY" class="horizontalRhythmLeft--smash"></span></td><td class="wlanAction"><button unifi-if-role-admin type="button" ng-click="wirelessNetworkMacAddressFilterListCtrl.removeMacAddress(macAddress)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--x-circle"></span><span translate="COMMON_ACTIONS_REMOVE"></span></button></td></tr></tbody></table><div ng-if="!wirelessNetworkMacAddressFilterListCtrl.filterList.length" ng-class="{\'appInfoBox--dark\': wirelessNetworkMacAddressFilterListCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmHalf noHorizontalPadding"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_WLAN_TABLE_FILTER_LIST_EMPTY" class="noMarginBottom"></p></div></div></div><div class="appInputGroup appInputGroup--cozy verticalRhythmHalf is-form-validation-visible"><input type="text" ng-class="{\'ng-invalid\': wirelessNetworkMacAddressFilterListCtrl.showMacAddressToAddValidation &amp;&amp; wirelessNetworkMacAddressFilterListCtrl.macAddressToAdd &amp;&amp; !wirelessNetworkMacAddressFilterListCtrl.isMacAddressValid(wirelessNetworkMacAddressFilterListCtrl.macAddressToAdd)}" ng-model="wirelessNetworkMacAddressFilterListCtrl.macAddressToAdd" ng-keydown="wirelessNetworkMacAddressFilterListCtrl.onAddMacAddress($event)" unifi-mac-address><button type="button" ng-click="wirelessNetworkMacAddressFilterListCtrl.addMacAddress()" ng-disabled="!wirelessNetworkMacAddressFilterListCtrl.macAddressToAdd" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_WLAN_BUTTON_FILTER_LIST_ADD_MAC"></span></button></div><div class="appInputGroup appInputGroup--cozy"><button type="button" ng-click="wirelessNetworkMacAddressFilterListCtrl.addBatchMacAddress()" ng-class="wirelessNetworkMacAddressFilterListCtrl.preferences.model.get(\'isSettingsDark\') ? \'appMainButton--inputDark\' : \'appMainButton--input\'" class="appMainButton appMainButton--cozy"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_WLAN_BUTTON_FILTER_LIST_ADD_BATCH"></span></button><button type="button" ng-click="wirelessNetworkMacAddressFilterListCtrl.addClientsMacAddress(wirelessNetworkMacAddressFilterListCtrl.filterList)" ng-class="wirelessNetworkMacAddressFilterListCtrl.preferences.model.get(\'isSettingsDark\') ? \'appMainButton--inputDark\' : \'appMainButton--input\'" class="appMainButton appMainButton--cozy"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_WLAN_BUTTON_FILTER_LIST_ADD_CLIENTS"></span></button></div></div>'),b.join("")}},{"jade/runtime":232}],925:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiWirelessNetworkMacAddressFilterList",[function(){return{scope:{filterEnabled:"=unifiWirelessNetworkMacAddressFilterListFilterEnabled",filterList:"=unifiWirelessNetworkMacAddressFilterListFilterList",filterMax:"=unifiWirelessNetworkMacAddressFilterListFilterMax",gatewayAutoDetectEnabled:"=unifiWirelessNetworkMacAddressFilterListGatewayAutoDetectEnabled",wirelessClientsOnly:"=unifiWirelessNetworkMacAddressFilterListWirelessClientsOnly"},controller:"WirelessNetworkMacAddressFilterListController",controllerAs:"wirelessNetworkMacAddressFilterListCtrl",template:a("./wirelessNetworkMacAddressFilterList.jade")(),bindToController:!0,link:function(a,b,c,d){a.$watch(function(){return d.filterEnabled},function(a,b){void 0!==b&&(a?d.addAutoGateway():d.removeAutoGateway())}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./wirelessNetworkMacAddressFilterList.jade":924}],926:[function(a,b,c){"use strict";function d(a){this.mbpsUnit=" "+a.instant("SETTINGS_WLAN_LABEL_MINRATE_MBPS_UNIT"),this.translateLabel=function(a){return a+this.mbpsUnit}.bind(this)}d.$inject=["$translate"],angular.module("app-unifi-manage").controller("WirelessNetworkMinrateSliderController",d)},{}],927:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><rzslider rz-slider-model="wirelessNetworkMinrateSliderControllerCtrl.model" rz-slider-options="{      stepsArray: wirelessNetworkMinrateSliderControllerCtrl.mcsFrequencies,      showSelectionBarEnd: true,      translate: wirelessNetworkMinrateSliderControllerCtrl.translateLabel,      hideLimitLabels: false,      hidePointerLabels: false    }"></rzslider></div>'),b.join("")}},{"jade/runtime":232}],928:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiWirelessNetworkMinrateSlider",[function(){return{controller:"WirelessNetworkMinrateSliderController",controllerAs:"wirelessNetworkMinrateSliderControllerCtrl",template:a("./wirelessNetworkMinrateSlider.jade")(),scope:{model:"=unifiWirelessNetworkMinrateSliderModel",mcsFrequencies:"=unifiWirelessNetworkMinrateSliderMcsFrequencies"},bindToController:!0,replace:!0}}])},{"./wirelessNetworkMinrateSlider.jade":927}],929:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-repeat="daySchedule in days"><div class="col--xs12 appFormGroup appFormGroup--cozy"><unifi-wireless-network-schedule-day unifi-day-schedule="daySchedule"></unifi-wireless-network-schedule-day></div></div>'),b.join("")}},{"jade/runtime":232}],930:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiWirelessNetworkSchedule",["scheduleConverter","DEFAULT_WLAN_SCHEDULE",function(b,c){return{template:a("./wirelessNetworkSchedule.jade")(),require:"ngModel",scope:{schedule:"=unifiSchedule"},link:function(a,d,e,f){a.$parent.$watch(e.ngModel,function(){var d=f.$modelValue&&f.$modelValue.length>0?f.$modelValue:[c];a.days=b.convertFromHHMM(d)},!0),a.$watch(function(){return a.days},function(){a.schedule=b.convertToHHMM(a.days)},!0)}}}])},{"./wirelessNetworkSchedule.jade":929}],931:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="row"><div class="col--xs6 col--sm3 appInputGroup appInputGroup--cozy"><input type="checkbox" name="schedule_{{daySchedule.name}}" ng-attr-id="schedule_{{daySchedule.name}}" ng-model="daySchedule.enabled"><label for="schedule_{{daySchedule.name}}" translate="{{\'DATETIME_DAYS_\' + daySchedule.name.toUpperCase()}}" class="appLabel--primary"></label></div><div ng-if="daySchedule.enabled" class="col--xs6 col--sm3 alignRight"><strong>{{daySchedule.values[0] | minutesToMoment | moment: \'format\': \'h:mma\' }}-{{ daySchedule.values[1] | minutesToMoment | moment: \'format\': \'h:mma\'}}</strong></div><div ng-if="daySchedule.enabled" class="col--xs12 col--sm5"><rzslider rz-slider-model="daySchedule.values[0]" rz-slider-high="daySchedule.values[1]" rz-slider-options="{        floor: 0,        ceil: 1440,        step: 15,        precision: 1,        hideLimitLabels: true,        hidePointerLabels: true      }"></rzslider></div></div>'),
b.join("")}},{"jade/runtime":232}],932:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiWirelessNetworkScheduleDay",[function(){return{template:a("./wirelessNetworkScheduleDay.jade")(),replace:!0,scope:{daySchedule:"=unifiDaySchedule"}}}])},{"./wirelessNetworkScheduleDay.jade":931}],933:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<span ng-if="model === true || model === false" ng-class="{      \'appBadge--success\': model === true,      \'appBadge--danger\': model === false    }" class="appBadge">{{::model | yesOrNo}}</span>'),b.join("")}},{"jade/runtime":232}],934:[function(a,b,c){"use strict";angular.module("app-unifi-manage").directive("unifiYesOrNoBadge",[function(){return{template:a("./yesOrNoBadge.jade")(),scope:{model:"=unifiYesOrNoBadgeModel"}}}])},{"./yesOrNoBadge.jade":933}],935:[function(a,b,c){"use strict";angular.module("app-unifi-manage").config(["atlasProvider",function(a){a.addQueryParams({libraries:"places"})}])},{}],936:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("FLAGS",{enableApCopyConfig:">=5.3.3",enableApDisable:">=5.3.3",enableApTagging:">=5.5.1",enableAdvancedFeaturesToggle:">=5.3.8",enableBcFilter:">=5.4.9",enableDevicesBatchEdit:">=5.3.3",enableDevicesBatchForget:">=5.4.2",enableDevicesBatchUpgrade:">=5.4.0",enableDpiBlocking:!1,enableDpiSsidFiltering:!1,enableEmptyLan2Vlan:">=5.4.0",enableFacebookAuth:">=5.4.0",enableFirewallMultipleGroups:">=5.4.0",enableGoogleAuth:">=5.4.0",enableHotspot2:">=5.3.3",enableL3Adoption:">=5.4.4",enableMacFilter:!1,enableMacFilterPolicyAllowEnabled:!1,enableMinrateSlider:!1,enableMinRssiStrictMode:">=5.5.1",enablePortalHttpsRedirect:">=5.4.2",enableRadiusServer:">=5.5.1",enableRfEnvironment:!0,enableSettingsAdminsEdit:">=5.4.2",enableSiteImportExport:">=5.4.0",enableSwitchStatistics:">=5.3.3",enableUplinkAutomaticFailover:">=5.3.7",enableWalledGarden:">=5.4.0",withBackupMgrForBackupEndpoint:">=5.4.0",withCloudKeySdCardCheck:">=5.4.4",withHtmlEmailTemplatesAndAlerts:">=5.4.3",withHostnameSetting:">=5.4.4",withOverrideSiteInformUrl:!1,withRadiusProfilesEndpoint:">=5.4.2",withRadiusVlanModes:">=5.4.4",withStatAlarmEndpoint:">=5.3.3",withTurnCredentialsEndpoint:">=5.4.2"})},{}],937:[function(a,b,c){"use strict";angular.module("app-unifi-manage").config(["frameProvider",function(b){b.when("addSite",{controller:"AddSiteController",controllerAs:"addSiteCtrl",layout:"addSiteLayout",template:a("../views/frames/addSite.jade")()}).when("alerts",{controller:"AlertsController",controllerAs:"alertsCtrl",layout:"alertsLayout",template:a("../views/frames/alerts.jade")()}).when("cloudKeySdCardCheck",{controller:"CloudKeySdCardCheckController",controllerAs:"cloudKeySdCardCheckCtrl",layout:"confirmLayout",template:a("../views/frames/cloudKeySdCardCheck.jade")()}).when("configureDpiCategoryGraph",{controller:"ConfigureDpiCategoryGraphController",controllerAs:"configureDpiCategoryGraphCtrl",layout:"addDpiCategoryGraphLayout",template:a("../views/frames/configureDpiCategoryGraph.jade")()}).when("configureMaps",{controller:"ConfigureMapsController",controllerAs:"configureMapsCtrl",layout:"configureMapsLayout",template:a("../views/frames/configureMaps.jade")()}).when("confirmRestart",{controller:"ConfirmRestartController",controllerAs:"confirmRestartCtrl",layout:"confirmLayout",template:a("../../base-unifi-device/views/frames/confirmRestart.jade")()}).when("confirmUpgradeOverrides",{controller:"ConfirmUpgradeOverridesController",controllerAs:"confirmUpgradeOverridesCtrl",layout:"confirmLayout",template:a("../views/frames/confirmUpgradeOverrides.jade")()}).when("radiusProfile",{controller:"RadiusProfileController",controllerAs:"radiusProfileCtrl",layout:"radiusProfileLayout",template:a("../views/frames/radiusProfile.jade")()}).when("updateDataRetentionDays",{controller:"UpdateDataRetentionDaysController",controllerAs:"updateDataRetentionDaysCtrl",layout:"confirmLayout",template:a("../views/frames/updateDataRetentionDays.jade")()}).when("dashboardWidgets",{controller:"DashboardWidgetsController",controllerAs:"dashboardWidgetsCtrl",layout:"dashboardWidgetsLayout",template:a("../views/frames/dashboardWidgets.jade")()}).when("dpiRestriction",{controller:"DpiRestrictionController",controllerAs:"dpiRestrictionCtrl",layout:"dpiRestrictionLayout",template:a("../views/frames/dpiRestriction.jade")()}).when("dpiRestrictionNetworkAssignment",{controller:"DpiRestrictionNetworkAssignmentFrameController",controllerAs:"dpiRestrictionNetworkAssignmentFrameCtrl",layout:"dpiRestrictionNetworkAssignmentLayout",template:a("../views/frames/dpiRestrictionNetworkAssignment.jade")()}).when("editTextField",{controller:"EditTextFieldController",controllerAs:"editTextFieldCtrl",layout:"editTextFieldLayout",template:a("../views/frames/editTextField.jade")()}).when("editMap",{controller:"EditMapController",controllerAs:"editMapCtrl",layout:"editMapLayout",template:a("../views/frames/editMap.jade")()}).when("events",{controller:"EventsController",controllerAs:"eventsCtrl",layout:"eventsLayout",template:a("../views/frames/events.jade")()}).when("exportSite",{controller:"ExportSiteController",controllerAs:"exportSiteCtrl",layout:"exportSiteLayout",template:a("../views/frames/exportSite.jade")()}).when("firewallGroupsCreate",{controller:"FirewallGroupsCreateController",controllerAs:"firewallGroupsCreateCtrl",template:a("../views/frames/firewallGroupsCreate.jade")(),layout:"firewallGroupsCreateLayout"}).when("hotspot2NaiRealmListEntry",{controller:"Hotspot2NaiRealmListEntryController",controllerAs:"hotspot2NaiRealmListEntryCtrl",template:a("../views/frames/hotspot2NaiRealmListEntry.jade")(),layout:"hotspot2NaiRealmListEntryLayout"}).when("hotspotPackage",{controller:"HotspotPackageController",controllerAs:"hotspotPackageCtrl",layout:"hotspotPackageLayout",template:a("../views/frames/hotspotPackage.jade")()}).when("importSite",{controller:"ImportSiteController",controllerAs:"importSiteCtrl",layout:"importSiteLayout",template:a("../views/frames/importSite.jade")()}).when("preferences",{controller:"PreferencesController",controllerAs:"preferencesCtrl",layout:"preferencesLayout",template:a("../views/frames/preferences.jade")()}).when("sitesOverview",{controller:"SitesOverviewController",controllerAs:"sitesOverviewCtrl",layout:"sitesOverviewLayout",template:a("../views/frames/sitesOverview.jade")()}).when("sdnUser",{controller:"SdnUserController",controllerAs:"sdnUserCtrl",layout:"sdnUserLayout",template:a("../views/frames/sdnUser.jade")()}).when("speedTest",{controller:"SpeedTestController",controllerAs:"speedTestCtrl",layout:"speedTestLayout",template:a("../views/frames/speedTest.jade")()}).when("simpleTextEditor",{controller:"SimpleTextEditorController",controllerAs:"simpleTextEditorCtrl",layout:"simpleTextEditorLayout",template:a("../views/frames/simpleTextEditor.jade")()}).when("statisticsDpiFilters",{controller:"StatisticsDpiFiltersController",controllerAs:"statisticsDpiFiltersCtrl",layout:"statisticsDpiFiltersLayout",template:a("../views/frames/statisticsDpiFilters.jade")()}).when("systemConfig",{controller:"SystemConfigController",controllerAs:"systemConfigCtrl",layout:"systemConfigLayout",template:a("../views/frames/systemConfig.jade")()}).when("trainingLogin",{controller:"TrainingLoginController",controllerAs:"trainingLoginCtrl",layout:"trainingLoginLayout",template:a("../views/frames/trainingLogin.jade")()}).when("webrtcError",{controller:"WebrtcErrorController",controllerAs:"webrtcErrorCtrl",layout:"webrtcErrorLayout",template:a("../views/frames/webrtcError.jade")()}).when("webrtcFailed",{controller:"WebrtcFailedController",controllerAs:"webrtcFailedCtrl",layout:"webrtcFailedLayout",template:a("../views/frames/webrtcFailed.jade")()}).when("wirelessNetworkMacFilterAddBatch",{controller:"WirelessNetworkMacFilterAddBatchController",controllerAs:"wirelessNetworkMacFilterAddBatchCtrl",layout:"wirelessNetworkMacFilterAddBatchLayout",template:a("../views/frames/wirelessNetworkMacFilterAddBatch.jade")()}).when("wirelessNetworkMacFilterAddClients",{controller:"WirelessNetworkMacFilterAddClientsController",controllerAs:"wirelessNetworkMacFilterAddClientsCtrl",layout:"wirelessNetworkMacFilterAddClientsLayout",template:a("../views/frames/wirelessNetworkMacFilterAddClients.jade")()})}])},{"../../base-unifi-device/views/frames/confirmRestart.jade":1514,"../views/frames/addSite.jade":1352,"../views/frames/alerts.jade":1353,"../views/frames/cloudKeySdCardCheck.jade":1354,"../views/frames/configureDpiCategoryGraph.jade":1355,"../views/frames/configureMaps.jade":1356,"../views/frames/confirmUpgradeOverrides.jade":1357,"../views/frames/dashboardWidgets.jade":1358,"../views/frames/dpiRestriction.jade":1359,"../views/frames/dpiRestrictionNetworkAssignment.jade":1360,"../views/frames/editMap.jade":1361,"../views/frames/editTextField.jade":1362,"../views/frames/events.jade":1363,"../views/frames/exportSite.jade":1364,"../views/frames/firewallGroupsCreate.jade":1365,"../views/frames/hotspot2NaiRealmListEntry.jade":1366,"../views/frames/hotspotPackage.jade":1367,"../views/frames/importSite.jade":1368,"../views/frames/preferences.jade":1369,"../views/frames/radiusProfile.jade":1370,"../views/frames/sdnUser.jade":1371,"../views/frames/simpleTextEditor.jade":1372,"../views/frames/sitesOverview.jade":1373,"../views/frames/speedTest.jade":1374,"../views/frames/statisticsDpiFilters.jade":1375,"../views/frames/systemConfig.jade":1376,"../views/frames/trainingLogin.jade":1377,"../views/frames/updateDataRetentionDays.jade":1378,"../views/frames/webrtcError.jade":1379,"../views/frames/webrtcFailed.jade":1380,"../views/frames/wirelessNetworkMacFilterAddBatch.jade":1381,"../views/frames/wirelessNetworkMacFilterAddClients.jade":1382}],938:[function(a,b,c){"use strict";angular.module("app-unifi-manage").config(["panelProvider",function(a){a.setImplementation("propertyPanel")}])},{}],939:[function(a,b,c){"use strict";angular.module("app-unifi-manage").config(["$urlRouterProvider","$locationProvider",function(a,b){a.otherwise("/"),b.html5Mode(!0)}])},{}],940:[function(a,b,c){"use strict";angular.module("app-unifi-manage").config(["$sceDelegateProvider",function(a){a.resourceUrlWhitelist(["self","https://maps.googleapis.com/**","https://localhost:4443/**"])}])},{}],941:[function(a,b,c){"use strict";angular.module("app-unifi-manage").config(["frameProvider",function(a){a.define("sideNavPopover",["layout","placeholder","content"],["$q","elements",function(a,b){var c,d;return{onShowStart:function(){return b.content&&b.content.isDisplayed()?void b.content.leave(!0):(c=a.defer(),void b.layout.enter(!0).then(function(){b.placeholder.enter(!0),b.layout.addClass("is-side-nav-popover-visible"),c.resolve()}))},onShowSuccess:function(a){c.promise.then(function(){b.content.enter(!0).then(function(){d=a(function(a){return b.content.manipulate(function(b){return b.html(a),b})}),b.placeholder.isDisplayed()&&b.placeholder.leave(!0)})})},onClose:function(){d&&(d(),d=null),b.layout.removeClass("is-side-nav-popover-visible").then(function(){b.layout.leave(!0)})}}}])}])},{}],942:[function(a,b,c){"use strict";var d=a("../lib/resolve"),e=a("moment");angular.module("app-unifi-manage").config(["$stateProvider",function(b){var c=["routeDeps",function(a){a.onEnterCallback&&a.onEnterCallback(a.onEnterArgs)}],f=["routeDeps",function(a){a.onExitCallback&&a.onExitCallback(a.onExitArgs)}];b.state("manage",{"abstract":!0,template:a("../views/index.jade")(),resolve:d.manage}).state("manage.home",{controller:"HomeController",controllerAs:"homeCtrl",url:"/",template:a("../views/home.jade")(),resolve:d.home,onEnter:c,onExit:f}).state("manage.account",{controller:"AccountController",controllerAs:"accountCtrl",url:"/account",template:a("../../base-unifi/views/account.jade")(),resolve:d.account}).state("manage.account.login",{controller:"LoginController",controllerAs:"loginCtrl",url:"/login?redirect",template:a("../../base-unifi/views/login.jade")(),params:{redirect:{value:null,squash:!0}}}).state("manage.account.verify",{controller:"AccountVerifyController",controllerAs:"accountVerifyCtrl",url:"/verify?email&t",template:a("../views/account/verify.jade")(),params:{email:{value:null,squash:!0},t:{value:null,squash:!0}}}).state("manage.account.forgotpassword",{controller:"ForgotPasswordController",controllerAs:"forgotPasswordCtrl",url:"/forgotpassword",template:a("../../base-unifi/views/forgotPassword.jade")()}).state("manage.ssologin",{url:"/sso_login/:sso_token/:ubic_uuid/:site_id",template:a("../../base-unifi/views/ssoLogin.jade")(),resolve:d.ssoLogin}).state("manage.site",{controller:"SiteController",controllerAs:"siteCtrl",url:"/site/:site",template:a("../views/manageSite.jade")(),resolve:d.site,defaultChildState:".dashboard",onEnter:c,onExit:f}).state("manage.site.dashboard",{controller:"DashboardController",controllerAs:"dashboardCtrl",url:"/dashboard",template:a("../views/site/dashboard.jade")(),resolve:d.dashboard}).state("manage.site.statistics",{controller:"StatisticsController",controllerAs:"statisticsCtrl",url:"/statistics",template:a("../views/site/statistics.jade")(),resolve:d.statistics,defaultChildState:".overview"}).state("manage.site.statistics.overview",{controller:"StatisticsOverviewController",controllerAs:"statisticsOverviewCtrl",url:"/overview/:interval/:start",template:a("../views/statistics/overview.jade")(),resolve:d.statisticsOverview,params:{interval:{value:null,squash:!0},start:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.statistics.dpi",{controller:"DpiController",controllerAs:"dpiCtrl",url:"/dpi/{view:overview|apps|users|category}/:categoryId/:applicationId",template:a("../views/statistics/dpi.jade")(),resolve:d.statisticsDpi,params:{view:{value:"overview",squash:!0},categoryId:{value:null,squash:!0},applicationId:{value:null,squash:!0}},onEnter:["dpiFilters","dpiStats","routeDeps",function(a,b,c){a.addEventHandlers(),b.addEventHandlers(),b.parse(),c.onEnterCallback(c.onEnterArgs)}],onExit:["dpiFilters","dpiStats","routeDeps",function(a,b,c){a.removeEventHandlers(),b.removeEventHandlers(),c.onExitCallback(c.onExitArgs)}]}).state("manage.site.statistics.switch",{controller:"StatisticsSwitchController",controllerAs:"statisticsSwitchCtrl",url:"/switch/:switchId/:interval/:start",template:a("../views/statistics/switch.jade")(),resolve:d.statisticsSwitch,params:{switchId:{value:null,squash:!0},interval:{value:"daily"},start:{value:e().startOf("day").format("x")}},onEnter:c,onExit:f}).state("manage.site.maps",{url:"/maps",template:a("../views/site/maps.jade")(),resolve:d.maps,defaultChildState:".physical"}).state("manage.site.maps.physical",{controller:"MapController",controllerAs:"mapCtrl",template:a("../views/maps/physical.jade")(),url:"/physical/:mapId/:deviceId",resolve:d.physicalMaps,params:{mapId:{value:null,squash:!0},deviceId:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.maps.topology",{controller:"TopologyViewController",controllerAs:"topologyViewCtrl",url:"/topology",resolve:d.topology,template:a("../views/maps/topology.jade")(),onEnter:c,onExit:f}).state("manage.site.devices",{controller:"DevicesController",controllerAs:"devicesCtrl",url:"/devices/{page:[0-9]+}/{pageSize:[0-9]+}/:type/:view",template:a("../views/site/devices.jade")(),resolve:d.devices,params:{pageSize:["preferences",function(a){return(a.model.getRowsPerPage("device")||a.model.getRowsPerPage()).toString()}],page:{value:"1",squash:!1},type:{value:null,squash:!0},view:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.clients",{controller:"ClientsController",controllerAs:"clientsCtrl",url:"/clients/{page:[0-9]+}/{pageSize:[0-9]+}/{wired:all|wired|wireless}/{guest:all|guests|users}/{radio:all|na|ng}",template:a("../views/site/clients.jade")(),resolve:d.clients,params:{pageSize:["preferences",function(a){return(a.model.getRowsPerPage("client")||a.model.getRowsPerPage()).toString()}],page:{value:"1",squash:!1},wired:{value:"all",squash:!0},guest:{value:"all",squash:!0},radio:{value:"all",squash:!0}},onEnter:c,onExit:f}).state("manage.site.insights",{controller:"InsightsController",controllerAs:"insightsCtrl",url:"/insights",template:a("../views/site/insights.jade")(),resolve:d.insights,defaultChildState:".knownclients"}).state("manage.site.insights.dynamicdns",{url:"/dynamicdns/{page:[0-9]+}/{pageSize:[0-9]+}",template:a("../views/insights/dynamicDns.jade")(),resolve:d.dynamicDns,params:{page:{value:"1",squash:!1},pageSize:["preferences",function(a){return(a.model.getRowsPerPage("dynamicDns")||a.model.getRowsPerPage()).toString()}]},onEnter:c,onExit:f}).state("manage.site.insights.knownclients",{url:"/knownclients/{page:[0-9]+}/{pageSize:[0-9]+}/{within:[0-9]+}/{wired:all|wired|wireless}/{guest:all|guests|users}/{blocked:blocked}/{noted:noted}/{staticIp:static-ip}",template:a("../views/insights/knownClients.jade")(),resolve:d.knownClients,params:{pageSize:["preferences",function(a){return(a.model.getRowsPerPage("knownClient")||a.model.getRowsPerPage()).toString()}],page:{value:"1",squash:!1},within:{value:"24",squash:!1},wired:{value:"all",squash:!0},guest:{value:"all",squash:!0},blocked:{value:null,squash:!0},noted:{value:null,squash:!0},staticIp:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.insights.neighboringaps",{url:"/neighboraps/{page:[0-9]+}/{pageSize:[0-9]+}/{within:[0-9]+}/{radioType:all|na|ng}",template:a("../views/insights/neighboringAccessPoints.jade")(),resolve:d.neighboringAccessPoints,params:{pageSize:["preferences",function(a){return(a.model.getRowsPerPage("neighboringAps")||a.model.getRowsPerPage()).toString()}],page:{value:"1",squash:!1},within:{value:"24",squash:!1},radioType:{value:"all",squash:!0}},onEnter:c,onExit:f}).state("manage.site.insights.pastconnections",{url:"/pastconnections/{page:[0-9]+}/{pageSize:[0-9]+}/:interval/:start/{guest:all|guests|users}",template:a("../views/insights/pastConnections.jade")(),resolve:d.pastConnections,params:{page:{value:"1",squash:!1},pageSize:["preferences",function(a){return(a.model.getRowsPerPage("pastConnections")||a.model.getRowsPerPage()).toString()}],interval:{value:"day"},start:{value:e().subtract(24,"hours").startOf("hour").format("x")},guest:{value:"all",squash:!0}},onEnter:c,onExit:f}).state("manage.site.insights.pastguests",{url:"/pastguests/{page:[0-9]+}/{pageSize:[0-9]+}/:interval/:start",resolve:d.pastGuestAuthorizations,template:a("../views/insights/pastGuestAuthorizations.jade")(),params:{page:{value:"1",squash:!1},pageSize:["preferences",function(a){return(a.model.getRowsPerPage("pastGuestAuthorizations")||a.model.getRowsPerPage()).toString()}],interval:{value:"day"},start:{value:e().subtract(24,"hours").startOf("hour").format("x")}},onEnter:c,onExit:f}).state("manage.site.insights.portforwardstats",{url:"/portforwardstats/{page:[0-9]+}/{pageSize:[0-9]+}/{view:all|upnp|userdefined}",template:a("../views/insights/portForwardStats.jade")(),resolve:d.portForwardStats,params:{page:{value:"1",squash:!1},pageSize:["preferences",function(a){return(a.model.getRowsPerPage("portForwardStats")||a.model.getRowsPerPage()).toString()}],view:{value:"all",squash:!0}},onEnter:c,onExit:f}).state("manage.site.insights.staticrouting",{url:"/staticrouting/{page:[0-9]+}/{pageSize:[0-9]+}",template:a("../views/insights/routing.jade")(),resolve:d.routingStats,params:{page:{value:"1",squash:!1},pageSize:["preferences",function(a){return(a.model.getRowsPerPage("routingStats")||a.model.getRowsPerPage()).toString()}]},onEnter:c,onExit:f}).state("manage.site.insights.streams",{url:"/streams/{page:[0-9]+}/{pageSize:[0-9]+}/{stream:all|[0-9a-z-]+}",template:a("../views/insights/streams.jade")(),resolve:d.streams,params:{page:{value:"1",squash:!1},pageSize:["preferences",function(a){return(a.model.getRowsPerPage("streams")||a.model.getRowsPerPage()).toString()}],stream:{value:"all",squash:!0}},onEnter:c,onExit:f}).state("manage.site.insights.switchstats",{url:"/switchstats/{page:[0-9]+}/{pageSize:[0-9]+}/{device:all|(?:[0-9a-fA-F][0-9a-fA-F]:){5}(?:[0-9a-fA-F][0-9a-fA-F])}/{linkStatus:all|connected|disconnected}/{view:overview|poe|counters}",template:a("../views/insights/switchStats.jade")(),resolve:d.switchStats,params:{page:{value:"1",squash:!1},pageSize:["preferences",function(a){return(a.model.getRowsPerPage("switchStats")||a.model.getRowsPerPage()).toString()}],device:{value:"all",squash:!0},linkStatus:{value:"all",squash:!0},view:{value:"overview",squash:!0}},onEnter:c,onExit:f}).state("manage.site.insights.remoteuservpn",{url:"/remoteuservpn/{page:[0-9]+}/{pageSize:[0-9]+}",template:a("../views/insights/remoteUserVpn.jade")(),resolve:d.remoteUserVpn,params:{page:{value:"1",squash:!1},pageSize:["preferences",function(a){return(a.model.getRowsPerPage("remoteUserVpn")||a.model.getRowsPerPage()).toString()}]},onEnter:c,onExit:f}).state("manage.site.settings",{controller:"SettingsController",controllerAs:"settingsCtrl",url:"/settings",template:a("../views/site/settings.jade")(),resolve:d.settings,defaultChildState:".site",onEnter:c,onExit:f}).state("manage.site.settings.backup",{controller:"BackupSettingsController",controllerAs:"backupSettingsCtrl",url:"/backup",template:a("../views/settings/backup.jade")(),resolve:d.backup,onEnter:c,onExit:f}).state("manage.site.settings.site",{controller:"SiteSettingsController",controllerAs:"siteSettingsCtrl",url:"/site",template:a("../views/settings/site.jade")()}).state("manage.site.settings.wlans",{controller:"WirelessNetworksController",controllerAs:"wirelessNetworksCtrl",url:"/wlans/{wlanGroupAction:add|edit}/:wlanGroupId/{wlanAction:add|edit|list}/:wlanId",template:a("../views/settings/wirelessNetworks.jade")(),resolve:d.wirelessNetworks,params:{wlanGroupAction:{value:null,squash:!0},wlanGroupId:{value:null,squash:!0},wlanAction:{value:null,squash:!0},wlanId:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.settings.networks",{controller:"NetworksController",controllerAs:"networksCtrl",url:"/networks/{action:add|edit|list}/:id",template:a("../views/settings/networks.jade")(),resolve:d.networks,params:{action:{value:"list",squash:!1},id:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.settings.routingAndFirewall",{template:"<ui-view />",defaultChildState:".routing"}).state("manage.site.settings.routingAndFirewall.routing",{controller:"RoutingController",controllerAs:"routingCtrl",url:"/routing/{action:add|edit|list}/:id",template:a("../views/settings/routing.jade")(),resolve:d.routing,params:{action:{value:"list",squash:!1},id:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.settings.routingAndFirewall.firewall",{controller:"FirewallController",controllerAs:"firewallCtrl",url:"/firewall",template:a("../views/settings/firewall.jade")(),resolve:d.firewall,defaultChildState:".rules",onEnter:c,onExit:f}).state("manage.site.settings.routingAndFirewall.firewall.rules",{controller:"FirewallRulesController",controllerAs:"firewallRulesCtrl",url:"/rules/{action:add|edit|list}/:ruleset/:id",template:a("../views/settings/firewallRules.jade")(),params:{action:{value:"list",squash:!1},ruleset:["firewallUtils",function(a){return a.getDefaultRuleset()}],id:{value:null,squash:!0}}}).state("manage.site.settings.routingAndFirewall.firewall.groups",{controller:"FirewallGroupsController",controllerAs:"firewallGroupsCtrl",url:"/groups/{action:add|edit|list}/:id",template:a("../views/settings/firewallGroups.jade")(),params:{action:{value:"list",squash:!1},id:{value:null,squash:!0}}}).state("manage.site.settings.guestcontrol",{controller:"GuestControlSettingsController",controllerAs:"guestControlSettingsCtrl",url:"/guestcontrol",template:a("../views/settings/guestControl.jade")(),resolve:d.guestControl,onEnter:c,onExit:f}).state("manage.site.settings.radius",{url:"/radius",template:"<ui-view />",defaultChildState:".users"}).state("manage.site.settings.radius.users",{controller:"RadiusUsersController",controllerAs:"radiusUsersCtrl",url:"/users/{action:add|edit|list}/:id",template:a("../views/settings/radiusUsers.jade")(),resolve:d.radiusUsers,onEnter:c,onExit:f,params:{action:{value:"list",squash:!1},id:{value:null,squash:!0}}}).state("manage.site.settings.radius.server",{controller:"RadiusServerController",controllerAs:"radiusServerCtrl",url:"/server",template:a("../views/settings/radiusServer.jade")()}).state("manage.site.settings.hotspot2",{controller:"Hotspot2Controller",controllerAs:"hotspot2Ctrl",url:"/hotspot2/{action:add|edit|list}/:id",template:a("../views/settings/hotspot2.jade")(),resolve:d.hotspot2,params:{action:{value:"list",squash:!1},id:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.settings.profiles",{url:"/profiles",controller:"ProfilesController",controllerAs:"profilesCtrl",template:a("../views/settings/profiles.jade")(),resolve:d.profiles,onEnter:c,onExit:f}).state("manage.site.settings.admins",{controller:"AdminsController",controllerAs:"adminsCtrl",url:"/admins/{action:add|edit|list}/:id",template:a("../views/settings/admins.jade")(),resolve:d.admins,params:{action:{value:"list",squash:!1},id:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.settings.usergroups",{controller:"UserGroupsController",controllerAs:"userGroupsCtrl",url:"/usergroups/{action:add|edit|list}/:id",template:a("../views/settings/userGroups.jade")(),resolve:d.userGroups,params:{action:{value:"list",squash:!1},id:{value:null,squash:!0}},onEnter:c,onExit:f}).state("manage.site.settings.dpi",{controller:"DpiSettingsController",controllerAs:"dpiSettingsCtrl",url:"/dpi",template:a("../views/settings/dpi.jade")(),resolve:d.dpi,onEnter:c,onExit:f}).state("manage.site.settings.controller",{controller:"ControllerSettingsController",controllerAs:"controllerSettingsCtrl",url:"/controller",template:a("../views/settings/controller.jade")(),resolve:d.controller}).state("manage.site.settings.cloudaccess",{controller:"CloudAccessSettingsController",controllerAs:"cloudAccessSettingsCtrl",url:"/cloudaccess",template:a("../views/settings/cloudAccess.jade")()}).state("manage.site.settings.maintenance",{controller:"MaintenanceSettingsController",controllerAs:"maintenanceSettingsCtrl",url:"/maintenance",template:a("../views/settings/maintenance.jade")(),resolve:d.maintenance}).state("manage.fatal",{controller:"FatalController",controllerAs:"fatalCtrl",url:"/fatal/:error",template:a("../../base-unifi/views/fatal.jade")(),resolve:d.fatal,params:{error:{value:"400",squash:!0}}})}])},{"../../base-unifi/views/account.jade":1793,"../../base-unifi/views/fatal.jade":1794,"../../base-unifi/views/forgotPassword.jade":1795,"../../base-unifi/views/login.jade":1798,"../../base-unifi/views/ssoLogin.jade":1799,"../lib/resolve":1099,"../views/account/verify.jade":1351,"../views/home.jade":1383,"../views/index.jade":1384,"../views/insights/dynamicDns.jade":1385,"../views/insights/knownClients.jade":1386,"../views/insights/neighboringAccessPoints.jade":1387,"../views/insights/pastConnections.jade":1388,"../views/insights/pastGuestAuthorizations.jade":1389,"../views/insights/portForwardStats.jade":1390,"../views/insights/remoteUserVpn.jade":1391,"../views/insights/routing.jade":1392,"../views/insights/streams.jade":1393,"../views/insights/switchStats.jade":1394,"../views/manageSite.jade":1395,"../views/maps/physical.jade":1396,"../views/maps/topology.jade":1397,"../views/settings/admins.jade":1398,"../views/settings/backup.jade":1399,"../views/settings/cloudAccess.jade":1400,"../views/settings/controller.jade":1401,"../views/settings/dpi.jade":1402,"../views/settings/firewall.jade":1403,"../views/settings/firewallGroups.jade":1404,"../views/settings/firewallRules.jade":1405,"../views/settings/guestControl.jade":1406,"../views/settings/hotspot2.jade":1407,"../views/settings/maintenance.jade":1408,"../views/settings/networks.jade":1409,"../views/settings/profiles.jade":1410,"../views/settings/radiusServer.jade":1411,"../views/settings/radiusUsers.jade":1412,"../views/settings/routing.jade":1413,"../views/settings/site.jade":1414,"../views/settings/userGroups.jade":1415,"../views/settings/wirelessNetworks.jade":1416,"../views/site/clients.jade":1417,"../views/site/dashboard.jade":1418,"../views/site/devices.jade":1419,"../views/site/insights.jade":1420,"../views/site/maps.jade":1421,"../views/site/settings.jade":1422,"../views/site/statistics.jade":1423,"../views/statistics/dpi.jade":1424,"../views/statistics/overview.jade":1425,"../views/statistics/switch.jade":1426,moment:238}],943:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("ALERTS_DEFAULTS",{FETCH_PACK_SIZE:3e3,REFRESH_PACK_SIZE:200,SORT_BY:"datetime",SORT_ASC:!1})},{}],944:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("CHAT_DEPARTMENTS",{PRE_SALES:"Pre-Sales",UNIFI_CONTROLLER:"UniFi Controller"})},{}],945:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("CHAT_LEVELS",{SUPER_ONLY:"super-only",EVERYONE:"everyone",DISABLED:"disabled"})},{}],946:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("CLIENT_FETCH_DEFAULTS",{DEBOUNCE_WAIT:200,THRESHOLD:5,THROTTLE_WAIT:3e3})},{}],947:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("DASHBOARD_WIDGETS",{TYPES:{throughput:{sizeX:2,sizeY:4},occupancy:{sizeX:1,sizeY:4},devices:{sizeX:1,sizeY:2,onResize:function(a){a<320?this.sizeY=3:this.sizeY=2}},clients:{sizeX:1,sizeY:2,onResize:function(a){a<320?this.sizeY=3:this.sizeY=2}},dpi:{sizeX:1,sizeY:2,onResize:function(a){a<320?this.sizeY=3:this.sizeY=2}}},DEFAULT_CONFIG:[{type:"throughput",row:0,col:0},{type:"occupancy",row:0,col:2},{type:"devices",row:4,col:0},{type:"clients",row:4,col:1},{type:"dpi",row:4,col:2}]})},{}],948:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("DEFAULT_WLAN_SCHEDULE","mon-sun|0800-1800")},{}],949:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("EASTER_EGGS",{ELITE_TEASER_VERSION:"v0.1"})},{}],950:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("ELEMENTS",{PANEL_STICKY_TITLE_HEIGHT:35})},{}],951:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("ENV",{APP:"app-unifi-manage",APP_STATE_PREFIX:"manage.",LOGIN_STATE:"manage.account.login",HOME_STATE:"manage.home",FATAL_STATE:"manage.fatal",STORE_ACTIVE_SITE:!0})},{}],952:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("EVENTS_DEFAULTS",{FETCH_PACK_SIZE:3e3,REFRESH_PACK_SIZE:200})},{}],953:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("EVENT_KEYS",{EVT_AD_Login:"EVT_AD_LOGIN",EVT_AD_LoginFailed:"EVT_AD_LOGIN_FAILED",EVT_AP_DiscoveredPending:"EVT_AP_DISCOVERED_PENDING",EVT_SW_DiscoveredPending:"EVT_SW_DISCOVERED_PENDING",EVT_GW_DiscoveredPending:"EVT_GW_DISCOVERED_PENDING",EVT_PH_DiscoveredPending:"EVT_PH_DISCOVERED_PENDING",EVT_AP_RediscoveredPending:"EVT_AP_REDISCOVERED_PENDING",EVT_AP_Adopted:"EVT_AP_ADOPTED",EVT_SW_Adopted:"EVT_SW_ADOPTED",EVT_GW_Adopted:"EVT_GW_ADOPTED",EVT_PH_Adopted:"EVT_PH_ADOPTED",EVT_AP_Deleted:"EVT_AP_DELETED",EVT_SW_Deleted:"EVT_SW_DELETED",EVT_GW_Deleted:"EVT_GW_DELETED",EVT_PH_Deleted:"EVT_PH_DELETED",EVT_AP_Restarted:"EVT_AP_RESTARTED",EVT_SW_Restarted:"EVT_SW_RESTARTED",EVT_GW_Restarted:"EVT_GW_RESTARTED",EVT_PH_Restarted:"EVT_PH_RESTARTED",EVT_AP_RestartedUnknown:"EVT_AP_RESTARTED_UNKNOWN",EVT_SW_RestartedUnknown:"EVT_SW_RESTARTED_UNKNOWN",EVT_GW_RestartedUnknown:"EVT_GW_RESTARTED_UNKNOWN",EVT_PH_RestartedUnknown:"EVT_PH_RESTARTED_UNKNOWN",EVT_AP_AutoReadopted:"EVT_AP_AUTO_READOPTED",EVT_SW_AutoReadopted:"EVT_SW_AUTO_READOPTED",EVT_GW_AutoReadopted:"EVT_GW_AUTO_READOPTED",EVT_PH_AutoReadopted:"EVT_PH_AUTO_READOPTED",EVT_AP_Configured:"EVT_AP_CONFIGURED",EVT_AP_Connected:"EVT_AP_CONNECTED",EVT_SW_Connected:"EVT_SW_CONNECTED",EVT_GW_Connected:"EVT_GW_CONNECTED",EVT_PH_Connected:"EVT_PH_CONNECTED",EVT_AP_ChannelChanged:"EVT_AP_CHANNEL_CHANGED",EVT_AP_PossibleInterference:"EVT_AP_POSSIBLE_INTERFERENCE",
EVT_AP_RollUpgrade:"EVT_AP_ROLL_UPGRADE",EVT_AP_Upgraded:"EVT_AP_UPGRADED",EVT_SW_Upgraded:"EVT_SW_UPGRADED",EVT_GW_Upgraded:"EVT_GW_UPGRADED",EVT_PH_Upgraded:"EVT_PH_UPGRADED",EVT_AP_UpgradeScheduled:"EVT_AP_UPGRADE_SCHEDULED",EVT_SW_UpgradeScheduled:"EVT_SW_UPGRADE_SCHEDULED",EVT_GW_UpgradeScheduled:"EVT_GW_UPGRADE_SCHEDULED",EVT_PH_UpgradeScheduled:"EVT_PH_UPGRADE_SCHEDULED",EVT_AP_Lost_Contact:"EVT_AP_LOST_CONTACT",EVT_SW_Lost_Contact:"EVT_SW_LOST_CONTACT",EVT_GW_Lost_Contact:"EVT_GW_LOST_CONTACT",EVT_PH_Lost_Contact:"EVT_PH_LOST_CONTACT",EVT_AP_HostKeyMismatch:"EVT_AP_HOST_KEY_MISMATCH",EVT_SW_HostKeyMismatch:"EVT_SW_HOST_KEY_MISMATCH",EVT_GW_HostKeyMismatch:"EVT_GW_HOST_KEY_MISMATCH",EVT_PH_HostKeyMismatch:"EVT_PH_HOST_KEY_MISMATCH",EVT_AP_Isolated:"EVT_AP_ISOLATED",EVT_WU_Connected:"EVT_WU_CONNECTED",EVT_WU_Disconnected:"EVT_WU_DISCONNECTED",EVT_LU_Connected:"EVT_LU_CONNECTED",EVT_LU_Disconnected:"EVT_LU_DISCONNECTED",EVT_WU_Roam:"EVT_WU_ROAM",EVT_WU_RoamRadio:"EVT_WU_ROAM_RADIO",EVT_WC_Blocked:"EVT_WC_BLOCKED",EVT_WC_Unblocked:"EVT_WC_UNBLOCKED",EVT_LC_Blocked:"EVT_LC_BLOCKED",EVT_LC_Unblocked:"EVT_LC_UNBLOCKED",EVT_WG_Connected:"EVT_WG_CONNECTED",EVT_WG_Disconnected:"EVT_WG_DISCONNECTED",EVT_LG_Connected:"EVT_LG_CONNECTED",EVT_LG_Disconnected:"EVT_LG_DISCONNECTED",EVT_WG_Roam:"EVT_WG_ROAM",EVT_WG_RoamRadio:"EVT_WG_ROAM_RADIO",EVT_WG_AuthorizationEnded:"EVT_WG_AUTHORIZATION_ENDED",EVT_WG_AuthorizationEndedByQuota:"EVT_WG_AUTHORIZATION_ENDED_BY_QUOTA",EVT_AD_UpdateAvailable:"EVT_AD_UPDATE_AVAILABLE",EVT_AD_PhoneUpdateAvailable:"EVT_AD_PHONE_UPDATE_AVAILABLE",EVT_AD_PhoneAppUpdateAvailable:"EVT_AD_PHONE_APP_UPDATE_AVAILABLE",EVT_AD_GuestUnauthorized:"EVT_AD_GUEST_UNAUTHORIZED",EVT_AD_GuestExtended:"EVT_AD_GUEST_EXTENDED",EVT_AD_PaymentRefunded:"EVT_AD_PAYMENT_REFUNDED",EVT_AD_VoucherCreated:"EVT_AD_VOUCHER_CREATED",EVT_AD_VoucherDeleted:"EVT_AD_VOUCHER_DELETED",EVT_AD_GuestAuthorizedFor:"EVT_AD_GUEST_AUTHORIZED_FOR",EVT_HS_AuthedByNoAuth:"EVT_HS_AUTHED_BY_NO_AUTH",EVT_HS_AuthedByPassword:"EVT_HS_AUTHED_BY_PASSWORD",EVT_HS_PaymentProcessed:"EVT_HS_PAYMENT_PROCESSED",EVT_HS_VoucherUsed:"EVT_HS_VOUCHER_USED",EVT_CF_VwireSet:"EVT_CF_VWIRE_SET",EVT_CF_VwireUnset:"EVT_CF_VWIRE_UNSET",EVT_SW_DetectRogueDHCP:"EVT_SW_DETECT_ROGUE_DHCP",EVT_SW_LoopDetected:"EVT_SW_LOOP_DETECTED",EVT_SW_Overheat:"EVT_SW_OVERHEAT",EVT_PA_ScheduledStreamFailed:"EVT_PA_SCHEDULED_STREAM_FAILED",EVT_PA_IncorrectStreamConfiguration:"EVT_PA_INCORRECT_STREAM_CONFIGURATION",EVT_AP_DetectRogueAP:"EVT_AP_DETECT_ROGUE_AP"})},{}],954:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT2_AUTH_IDS",{2:"SETTINGS_HOTSPOT2_VALUES_AUTH_NON_EAP",3:"SETTINGS_HOTSPOT2_VALUES_AUTH_INNER_EAP",5:"SETTINGS_HOTSPOT2_VALUES_AUTH_CREDENTIAL"})},{}],955:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT2_AUTH_VALUES",{0:{0:"SETTINGS_HOTSPOT2_VALUES_AUTH_NONE"},2:{1:"SETTINGS_HOTSPOT2_VALUES_AUTH_PAP",2:"SETTINGS_HOTSPOT2_VALUES_AUTH_CHAP",3:"SETTINGS_HOTSPOT2_VALUES_AUTH_MSCHAP",4:"SETTINGS_HOTSPOT2_VALUES_AUTH_MSCHAPV2"},3:{0:"SETTINGS_HOTSPOT2_VALUES_AUTH_NONE"},5:{1:"SETTINGS_HOTSPOT2_VALUES_AUTH_SIM",2:"SETTINGS_HOTSPOT2_VALUES_AUTH_USIM",3:"SETTINGS_HOTSPOT2_VALUES_AUTH_NFC",4:"SETTINGS_HOTSPOT2_VALUES_AUTH_HW_TOKEN",5:"SETTINGS_HOTSPOT2_VALUES_AUTH_SOFTOKEN",6:"SETTINGS_HOTSPOT2_VALUES_AUTH_CERTIFICATE",7:"SETTINGS_HOTSPOT2_VALUES_AUTH_USERNAME_PW",9:"SETTINGS_HOTSPOT2_VALUES_AUTH_ANONYMOUS",10:"SETTINGS_HOTSPOT2_VALUES_AUTH_VENDOR"}})},{}],956:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT2_EAP_METHODS",{13:"EAP-TLS",21:"EAP-TTLS",18:"EAP-SIM",23:"EAP-AKA",50:"EAP-AKA'"})},{}],957:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT2_NETWORK_TYPES",{0:"SETTINGS_HOTSPOT2_VALUES_PRIVATE_NETWORK",1:"SETTINGS_HOTSPOT2_VALUES_PRIVATE_NETWORK_WITH_GUEST_ACCESS",2:"SETTINGS_HOTSPOT2_VALUES_CHARGABLE_PUBLIC_NETWORK",3:"SETTINGS_HOTSPOT2_VALUES_FREE_PUBLIC_NETWORK",4:"SETTINGS_HOTSPOT2_VALUES_PERSONAL_DEVICE_NETWORK",5:"SETTINGS_HOTSPOT2_VALUES_EMERGENCY_SERVICES_ONLY_NETWORK",14:"SETTINGS_HOTSPOT2_VALUES_TEST_OR_EXPERIMENTAL",15:"SETTINGS_HOTSPOT2_VALUES_WILDCARD"})},{}],958:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT2_VENUE_GROUPS",{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_ASSEMBLY",2:"SETTINGS_HOTSPOT2_VALUES_BUSINESS",3:"SETTINGS_HOTSPOT2_VALUES_EDUCATIONAL",4:"SETTINGS_HOTSPOT2_VALUES_FACTORY_AND_INDUSTRIAL",5:"SETTINGS_HOTSPOT2_VALUES_INSTITUTIONAL",6:"SETTINGS_HOTSPOT2_VALUES_MERCANTILE",7:"SETTINGS_HOTSPOT2_VALUES_RESIDENTIAL",8:"SETTINGS_HOTSPOT2_VALUES_STORAGE",9:"SETTINGS_HOTSPOT2_VALUES_UTILITY_AND_MISCELLANEOUS",10:"SETTINGS_HOTSPOT2_VALUES_VEHICULAR",11:"SETTINGS_HOTSPOT2_VALUES_OUTDOOR"})},{}],959:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT2_VENUE_TYPES",{0:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED"},1:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_ARENA",2:"SETTINGS_HOTSPOT2_VALUES_STADIUM",3:"SETTINGS_HOTSPOT2_VALUES_PASSENGER_TERMINAL",4:"SETTINGS_HOTSPOT2_VALUES_AMPHITHEATER",5:"SETTINGS_HOTSPOT2_VALUES_AMUSEMENT_PARK",6:"SETTINGS_HOTSPOT2_VALUES_PLACE_OF_WORSHIP",7:"SETTINGS_HOTSPOT2_VALUES_CONVENTION_CENTER",8:"SETTINGS_HOTSPOT2_VALUES_LIBRARY",9:"SETTINGS_HOTSPOT2_VALUES_MUSEUM",10:"SETTINGS_HOTSPOT2_VALUES_RESTAURANT",11:"SETTINGS_HOTSPOT2_VALUES_THEATER",12:"SETTINGS_HOTSPOT2_VALUES_BAR",13:"SETTINGS_HOTSPOT2_VALUES_COFFEE_SHOP",14:"SETTINGS_HOTSPOT2_VALUES_ZOO_OR_AQUARIUM",15:"SETTINGS_HOTSPOT2_VALUES_EMERGANCY_COORDINATION_CENTER"},2:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_DOCTOR_OR_DENTIST_OFFICE",2:"SETTINGS_HOTSPOT2_VALUES_BANK",3:"SETTINGS_HOTSPOT2_VALUES_FIRE_STATION",4:"SETTINGS_HOTSPOT2_VALUES_POLICE_STATION",6:"SETTINGS_HOTSPOT2_VALUES_POST_OFFICE",7:"SETTINGS_HOTSPOT2_VALUES_PROFESSIONAL_OFFICE",8:"SETTINGS_HOTSPOT2_VALUES_RESEARCH_AND_DEVELOPMENT_FACILITY",9:"SETTINGS_HOTSPOT2_VALUES_ATTORNEY_OFFICE"},3:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_PRIMARY_SCHOOL",2:"SETTINGS_HOTSPOT2_VALUES_SECONDARY_SCHOOL",3:"SETTINGS_HOTSPOT2_VALUES_UNIVERSITY_OR_COLLEGE"},4:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_FACTORY"},5:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_HOSPITAL",2:"SETTINGS_HOTSPOT2_VALUES_LONG_TERM_CARE",3:"SETTINGS_HOTSPOT2_VALUES_REHAB_CENTER",4:"SETTINGS_HOTSPOT2_VALUES_GROUP_HOME",5:"SETTINGS_HOTSPOT2_VALUES_PRISON_OR_JAIL"},6:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_RETAIL_STORE",2:"SETTINGS_HOTSPOT2_VALUES_GROCERY_MARKET",3:"SETTINGS_HOTSPOT2_VALUES_AUTOMOTIVE_SERVICE_STATION",4:"SETTINGS_HOTSPOT2_VALUES_SHOPPING_MALL",5:"SETTINGS_HOTSPOT2_VALUES_GAS_STATION"},7:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_PRIVATE_RESIDENCE",2:"SETTINGS_HOTSPOT2_VALUES_HOTEL_OR_MOTEL",3:"SETTINGS_HOTSPOT2_VALUES_DORMITORY",4:"SETTINGS_HOTSPOT2_VALUES_BOARDING_HOUSE"},8:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED"},9:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED"},10:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_AUTOMOBILE_OR_TRUCK",2:"SETTINGS_HOTSPOT2_VALUES_AIRPLANE",3:"SETTINGS_HOTSPOT2_VALUES_BUS",4:"SETTINGS_HOTSPOT2_VALUES_FERRY",5:"SETTINGS_HOTSPOT2_VALUES_SHIP_OR_BOAT",6:"SETTINGS_HOTSPOT2_VALUES_TRAIN",7:"SETTINGS_HOTSPOT2_VALUES_MOTOR_BIKE"},11:{0:"SETTINGS_HOTSPOT2_VALUES_UNSPECIFIED",1:"SETTINGS_HOTSPOT2_VALUES_MUNI_MESH_NETWORK",2:"SETTINGS_HOTSPOT2_VALUES_CITY_PARK",3:"SETTINGS_HOTSPOT2_VALUES_REST_AREA",4:"SETTINGS_HOTSPOT2_VALUES_TRAFFIC_CONTROL",5:"SETTINGS_HOTSPOT2_VALUES_BUS_STOP",6:"SETTINGS_HOTSPOT2_VALUES_KIOSK"}})},{}],960:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT_LANGUAGES",{BUILT_IN_LANGUAGES:["cs","da","de_DE","el","en","es_ES","fr","id","it","nl","no","pl","pt_BR","pt_PT","sv","tr","zh_CN"],ALL_LANGUAGES:a("../../../../node_modules/constant-unifi/src/json/hotspotLanguages.json")})},{"../../../../node_modules/constant-unifi/src/json/hotspotLanguages.json":231}],961:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT_PAYMENT_FIELDS_DEFAULTS",{payment_fields_address_enabled:!0,payment_fields_address_required:!0,payment_fields_city_enabled:!0,payment_fields_city_required:!0,payment_fields_country_default:"",payment_fields_country_enabled:!0,payment_fields_country_required:!0,payment_fields_first_name_enabled:!0,payment_fields_first_name_required:!0,payment_fields_last_name_enabled:!0,payment_fields_last_name_required:!0,payment_fields_state_enabled:!0,payment_fields_state_required:!0,payment_fields_zip_enabled:!0,payment_fields_zip_required:!0})},{}],962:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT_PORTAL_CUSTOMIZED_DEFAULTS",{portal_customized_bg_color:"#233041",portal_customized_bg_image_enabled:!0,portal_customized_bg_image_filename:void 0,portal_customized_bg_image_tile:!1,portal_customized_box_color:"#ffffff",portal_customized_box_link_color:"#1379b7",portal_customized_box_text_color:"#000000",portal_customized_box_opacity:90,portal_customized_button_color:"#1379b7",portal_customized_button_text_color:"#ffffff",portal_customized_link_color:"#00db9e",portal_customized_logo_enabled:!0,portal_customized_logo_filename:void 0,portal_customized_text_color:"#ffffff"})},{}],963:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT_PORTAL_CUSTOMIZED_LANGUAGES_DEFAULTS",{portal_customized_languages:["en"]})},{}],964:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("HOTSPOT_PORTAL_OVERRIDE_TEMPLATE_HELP",{jsp:"https://help.ubnt.com/hc/en-us/articles/205143830-UniFi-Hotspot-portal-customization",angular:"https://help.ubnt.com"})},{}],965:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("INSIGHTS_DEFAULTS",{INTERVAL:{DAY:{name:"day",value:1,unit:"day",translationKey:"DATETIME_HOURS_FULL_PARAMETERIZED",translationParams:{hours:24}},WEEK:{name:"week",value:1,unit:"week",translationKey:"DATETIME_WEEK"},MONTH:{name:"month",value:1,unit:"month",translationKey:"DATETIME_MONTH"}},STATES:[{state:"manage.site.insights.knownclients",translationKey:"INSIGHTS_NAV_KNOWN_CLIENTS"},{state:"manage.site.insights.neighboringaps",translationKey:"INSIGHTS_NAV_NEIGHBORING_ACCESS_POINTS"},{state:"manage.site.insights.pastconnections",translationKey:"INSIGHTS_NAV_PAST_CONNECTIONS"},{state:"manage.site.insights.pastguests",translationKey:"INSIGHTS_NAV_PAST_GUEST_AUTHORIZATIONS"},{state:"manage.site.insights.switchstats",translationKey:"INSIGHTS_NAV_SWITCH_STATS"},{state:"manage.site.insights.portforwardstats",translationKey:"INSIGHTS_NAV_PORT_FORWARD_STATS"},{state:"manage.site.insights.dynamicdns",translationKey:"INSIGHTS_NAV_DYNAMIC_DNS"},{state:"manage.site.insights.remoteuservpn",translationKey:"INSIGHTS_NAV_REMOTE_USER_VPN"},{state:"manage.site.insights.streams",translationKey:"INSIGHTS_NAV_STREAMS"}]})},{}],966:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("KNOWN_CLIENT_FIELDS",["_id","blocked","hostname","is_guest","is_wired","last_seen","mac","name","noted","oui","rx_bytes","tx_bytes","use_fixedip"])},{}],967:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("MAP_DEFAULTS",{API_LOAD_TIMEOUT:5e3,EARTH_RADIUS:6378137,FEET_TO_METERS_RATIO:.3048,METERS_PER_PIXEL_AT_ZOOM_0:156543.03392,MAX_RULER_VALUE:999999,MAX_ZOOM_OFFSET:2,MIN_ZOOM_OFFSET:-3,RECEIVER_SENSITIVITY:-90,UPP:.5,ZOOM_MAPPING:{V4:{1:-3,2:-2,4:-1,9:0,16:1,20:2},GOOGLE:{"-3":1,"-2":2,"-1":3,0:7,1:13,2:20}},MAP_EDITED_EVENT:"mapEdited",EMPTY_MAP_TYPE:"empty",DEFAULT_MAP:{lat:37.411146,lng:-121.943083,name:"Default",unit:"m",zoom:14,type:"googleMap",mapTypeId:"roadmap"},STATES:[{state:"manage.site.maps.physical",translationKey:"MAPS_LABEL_GOOGLE"},{state:"manage.site.maps.topology",translationKey:"MAPS_LABEL_TOPOLOGY",beta:!0}]})},{}],968:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("MAP_FEATURES",{COVERAGE:"coverage",TOPOLOGY:"topology",SMALL_ICONS:"smallIcons",CHANGED_EVENT:"mapFeaturesChanged",LABELS:{NONE:"MAP_LABELS_TYPE_NONE",SIMPLE:"MAP_LABELS_TYPE_SIMPLE",DETAILED:"MAP_LABELS_TYPE_DETAILED"}})},{}],969:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("MAP_TYPES",{IMAGE:"imageMap",GOOGLE:"googleMap"})},{}],970:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("MAP_UNITS",{FOOT:"f",METER:"m"})},{}],971:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("NETWORK_PURPOSE",{corporate:"SETTINGS_NETWORK_VALUES_PURPOSE_CORPORATE",guest:"SETTINGS_NETWORK_VALUES_PURPOSE_GUEST","remote-user-vpn":"SETTINGS_NETWORK_VALUES_PURPOSE_REMOTE_USER_VPN","site-vpn":"SETTINGS_NETWORK_VALUES_PURPOSE_SITE_TO_SITE_VPN",voip:"SETTINGS_NETWORK_VALUES_PURPOSE_VOICE","vlan-only":"SETTINGS_NETWORK_VALUES_PURPOSE_VLAN_ONLY","vpn-client":"SETTINGS_NETWORK_VALUES_PURPOSE_VPN_CLIENT"})},{}],972:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("OCCUPANCY_GRAPH",{boxMarginInPts:1,minBoxesInRow:3,selector:{bbox:"unifiOccupancyGraph__bbox",box:"unifiOccupancyGraph__box",boxes:"unifiOccupancyGraph__boxes",graph:"unifiOccupancyGraph__graph",plot:"unifiOccupancyGraph__plot",xAxis:"unifiOccupancyGraph__xAxis"},xAxisHeightInPx:25,xAxisLineSize:1,xAxisPadding:.4,xAxisTickSize:2})},{}],973:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("OUI",{UBIQUITI:"Ubiquiti",APPLE:"Apple"})},{}],974:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("RADIUS_VLAN_OPTIONS",{ENABLED:"optional",DISABLED:"disabled",REQUIRED:"required"})},{}],975:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("RF_ENVIRONMENT_CHART_OPTIONS",{channelLabelRegularFontSizeInPx:9,channelLabelSmallFontSizeInPx:6,channelTrapezoidBottomMarginInPx:15,channelTrapezoidNaCutInMHz:3,channelTrapezoidNaHeightInPx:40,channelTrapezoidNgCutInMHz:1,channelTrapezoidNgHeightInPx:15,domainIntervalMarginInPx:10,htLabelMarginTopInPx:-7,htLabelMarginLeftInPx:4,marginBottomInPx:0,marginLeftInPx:5,marginRightInPx:5,marginTopInPx:0,rowMarginBottomInPx:0,rowMarginTopInPx:20,tickIntervalNa:80,tickIntervalNg:10,warningUtilizationLevel:70}),angular.module("app-unifi-manage").constant("RF_ENVIRONMENT_CHART_SELECTORS",{channel:"unifiRfEnvironmentChart__channel",channelBbox:"unifiRfEnvironmentChart__channelBbox",channelLabel:"unifiRfEnvironmentChart__channelLabel",channelMark:"unifiRfEnvironmentChart__channelMark",channelMarkBg:"unifiRfEnvironmentChart__channelMarkBg",channelTrapezoid:"unifiRfEnvironmentChart__channelTrapezoid",channelTrapezoidBg:"unifiRfEnvironmentChart__channelTrapezoidBg",currentChannel:"unifiRfEnvironmentChart__currentChannel",currentChannelRect:"unifiRfEnvironmentChart__currentChannelRect",htLabel:"unifiRfEnvironmentChart__htLabel",htRow:"unifiRfEnvironmentChart__htRow",plot:"unifiRfEnvironmentChart__plot",xAxis:"unifiRfEnvironmentChart__xAxis"})},{}],976:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("RF_ENVIRONMENT_INTERFERENCE_INTERVAL",{80:[-90,-26],40:[-93,-29],20:[-96,-32]})},{}],977:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("RF_ENVIRONMENT_SETTINGS",{DEVICE_FETCH:{INTERVAL_DELAY:25e3,INTERVAL_COUNT:25,HEY_TOAST_DELAY:6e4}})},{}],978:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("SPANNING_TREE_PRIORITIES",["0","4096","8192","12288","16384","20480","24576","28672","32768","36864","40960","45056","49152","53248","57344","61440"])},{}],979:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("SPEED_TEST_SETTINGS",{POLLING_INTERVAL:1e3,POLLING_MAX_COUNT:600,REFRESHING_INTERVAL:50,DONUT_CHART:{SCALE_MAX:700,SCALE_SPACE:1},LINE_CHART:{TICKS_FACTOR:3,TICKS_ON_SCALE:65,X_AXIS_NATURAL_DIRECTION_DOWNLOAD:!0,X_AXIS_NATURAL_DIRECTION_UPLOAD:!0}})},{}],980:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("SPEED_TEST_STATUSES",{UNKNOWN:-1,PENDING_TEST:0,IN_PROGRESS:1,IS_COMPLETED:2})},{}],981:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("STATS_DEFAULTS",{DATE_FORMAT:"YYYY/MM/DD",MAX_FILTERED_ITEMS:5,MAX_DONUT_ITEMS:5,STATES:[{state:"manage.site.statistics.overview",translationKey:"STATISTICS_OVERVIEW"},{state:"manage.site.statistics.dpi",translationKey:"STATISTICS_TRAFFIC"},{state:"manage.site.statistics.switch",translationKey:"STATISTICS_SWITCH"}],DPI:{QUERY_DPI_STATS_INTERVAL:6e4,GRAPH_MAX_ITEMS:6,APPLICATION_GRAPH_MAX_ITEMS:7,CATEGORY_GRAPH_MAX_ITEMS:7,FILTER:{SSID:"SSID",DEVICE:"DEVICE"}},INVENTORY_CLIENTS_MAX_ITEMS:6,UNKNOWN_ICON_CSS:"fa fa-question",CATEGORY_STATISTIC_VIEWS:["overview","apps","users"],APPLICATION_STATISTIC_VIEWS:["category"]})},{}],982:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("UNIFI_TERMINAL_EVENTS",{TERMINAL_PANEL_CLOSE:"terminal-panel-close"})},{}],983:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("TERMS_OF_SERVICE_DEFAULT",'Terms of Use\n\nBy accessing the wireless network, you acknowledge that you\'re of legal age, you have read and understood and agree to be bound by this agreement.\n\nThe wireless network service is provided by the property owners and is completely at their discretion. Your access to the network may be blocked, suspended, or terminated at any time for any reason.\n\nYou agree not to use the wireless network for any purpose that is unlawful and take full responsibility of your acts.\n\nThe wireless network is provided "as is" without warranties of any kind, either expressed or implied.')},{}],984:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("TOPOLOGY_LINKS",{QUALITY:{LOW:20,MEDIUM:30,HIGH:45},COLORS:{LOW:"#FF0000",MEDIUM:"#F09300",HIGH:"#13BB72",ACTIVE:"#01A0DF",DISCONNECTED:"#636363",STROKE:"#FFFFFF"},TYPE:{WIRELESS:"wireless",WIRE:"wire"},WIRELESS_STYLE:{DASHARRAY:[8,14],STROKE:4,BG_STROKE:2}})},{}],985:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("UBNT_CLIENT_TYPES",[{className:"icon ubnt-icon--cloud-key",match:function(a){return"UniFi-CloudKey"===a.get("hostname")}},{className:"unifiDeviceIcon unifiDeviceIcon--UAS",match:function(a){return"UAS-Pro"===a.get("hostname")}},{className:"icon ubnt-icon--camera-2",match:function(a){return a.get("hostname")&&a.get("hostname").indexOf("UVC")!==-1}}])},{}],986:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("URLS",{UNIFI_SECURITY_GATEWAY:"https://www.ubnt.com/enterprise/#unifi-gateway:overview",UNIFI_AP:"https://www.ubnt.com/enterprise/#unifi:overview",MOMENTJS_FORMATS:"http://momentjs.com/docs/#/displaying/format/",WLAN_GROUP_LEGACY_NOTE:"https://www.cwnp.com/uploads/protection_ripple_in_erp_802-11_wlans.pdf",WLAN_SECURITY_WEP_THROUGHPUT_NOTE:"http://www.wi-fi.org/file/technical-note-removal-of-tkip-from-wi-fi-devices"})},{}],987:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("WALKME",{ON_LOAD_EVENT:"walkme-on-load-event",PREFERENCES:{KEEP_MODAL_OPEN:"openTrainingModel"},BYPASS:{TOOLTIP:"bypassTrainingButtonTooltip"}})},{}],988:[function(a,b,c){"use strict";angular.module("app-unifi-manage").constant("WLAN_MINRATE_SETTINGS",{DTIM:{MODE:{DEFAULT:"default",CUSTOM:"custom"},MIN:1,MAX:255,DEFAULT:1},RATECTRL_NG:{MODE:["default","legacy","custom"],VALUES:["disabled","basic","supported"],OPTIONS:[{KEY:"ratectrl_ng_cck_1",SPEED:1,DEFAULT:"disabled",LEGACY:"basic"},{KEY:"ratectrl_ng_cck_2",SPEED:2,DEFAULT:"disabled",LEGACY:"basic"},{KEY:"ratectrl_ng_cck_5_5",SPEED:5.5,DEFAULT:"disabled",LEGACY:"basic"},{KEY:"ratectrl_ng_cck_11",SPEED:11,DEFAULT:"disabled",LEGACY:"basic"},{KEY:"ratectrl_ng_6",SPEED:6,DEFAULT:"basic",LEGACY:"supported"},{KEY:"ratectrl_ng_9",SPEED:9,DEFAULT:"supported",LEGACY:"supported"},{KEY:"ratectrl_ng_12",SPEED:12,DEFAULT:"basic",LEGACY:"supported"},{KEY:"ratectrl_ng_18",SPEED:18,DEFAULT:"supported",LEGACY:"supported"},{KEY:"ratectrl_ng_24",SPEED:24,DEFAULT:"basic",LEGACY:"supported"},{KEY:"ratectrl_ng_36",SPEED:36,DEFAULT:"supported",LEGACY:"supported"},{KEY:"ratectrl_ng_48",SPEED:48,DEFAULT:"supported",LEGACY:"supported"},{KEY:"ratectrl_ng_54",SPEED:54,DEFAULT:"supported",LEGACY:"supported"}]},RATECTRL_NA:{MODE:["default","custom"],VALUES:["disabled","basic","supported"],OPTIONS:[{KEY:"ratectrl_na_6",SPEED:6,DEFAULT:"basic"},{KEY:"ratectrl_na_9",SPEED:9,DEFAULT:"supported"},{KEY:"ratectrl_na_12",SPEED:12,DEFAULT:"basic"},{KEY:"ratectrl_na_18",SPEED:18,DEFAULT:"supported"},{KEY:"ratectrl_na_24",SPEED:24,DEFAULT:"basic"},{KEY:"ratectrl_na_36",SPEED:36,DEFAULT:"supported"},{KEY:"ratectrl_na_48",SPEED:48,DEFAULT:"supported"},{KEY:"ratectrl_na_54",SPEED:54,DEFAULT:"supported"}]},MCS:{na:[6,6.5,13,19.5,26,39,52,58.5],ng:[1,2,6,6.5,13,19.5,26,39,52,58.5],FREQUENCIES:{BASIC:[1,2,6,6.5,13,19.5,26,39,52,58.5],GI20:[6.5,13,19.5,26,39,52,58.5,65,78,104,117,130,156,175.5,195,208,234,260,312],SGI20:[7.2,14.4,21.7,28.9,43.3,57.8,65,72.2,86.7,115.6,130,130.3,144.4,173.3,195,216.7,231.1,260,288.9,346.7],GI40:[13.5,27,40.5,54,81,108,121.5,135,162,180,216,243,270,324,360,364.5,405,432,486,540,648,720],SGI40:[15,30,45,60,90,120,135,150,180,200,240,270,300,360,400,405,450,480,540,600,720,800],GI80:[29.3,58.5,87.8,117,146.3,175.5,204.8,234,263.3,292.5,351,390,409.5,438.8,468,526.5,585,614.3,702,780,819,877.5,936,1053,1170,1228.5,1316.3,1404,1462.5,1560,1579.5,1638,1755,1872,1950,2047.5,2106,2340,2457,2730,2808,3120],SGI80:[32.5,65,97.5,130,162.5,195,227.5,260,292.5,325,390,433.3,455,487.5,520,585,650,682.5,780,866.7,910,975,1040,1170,1300,1365,1462.5,1560,1625,1733.3,1755,1820,1950,2080,2166.7,2275,2340,2600,2730,3033.3,3120,3466.7],GI160:[58.5,117,175.5,234,292.5,351,409.5,468,526.5,585,702,780,819,877.5,936,1053,1170,1228.5,1404,1560,1579.5,1638,1755,1872,2106,2340,2457,2632.5,2808,2925,3120,3159,3276,3510,3685.5,3744,3900,4095,4212,4680,4914,5460,5616,6240],SGI160:[65,130,195,260,325,390,455,520,585,650,780,866.7,910,975,1040,1170,1300,1365,1560,1733.3,1755,1820,1950,2080,2340,2600,2730,2925,3120,3250,3466.7,3510,3640,3900,4095,4160,4333.3,4550,4680,5200,5460,6066.7,6240,6933.3]}}})},{}],989:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.account=c,this.queryString=d,this.$state=a,this.VerifyMgrModel=e,this.ENV=f,b.email&&b.t?this.verifyAccount(b.email,b.t):this.verificationError=!0}d.prototype.verifyAccount=function(a,b){this.verificationError=!1;var c=new this.VerifyMgrModel;c.set({email:a,token:b}),this.account.verifyAccount(c).then(function(){this.$state.go(this.ENV.HOME_STATE).then(function(){this.queryString.clear()}.bind(this))}.bind(this))["catch"](function(){this.verificationError=!0}.bind(this))},d.$inject=["$state","$stateParams","account","queryString","VerifyMgrModel","ENV"],angular.module("app-unifi-manage").controller("AccountVerifyController",d)},{}],990:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$state=a,this.frame=b,this.heyToasts=c,this.siteUtils=d,this.model=new e,this.patterns={name:f.NAME}}d.prototype.save=function(){return this.isSubmitting=!0,this.siteUtils.addSite(this.model).then(function(a){return this.frame.getLayout("addSiteLayout").resolve(),this.heyToasts.pushSuccess(a),this.$state.go("manage.site.dashboard",{site:this.model.get("name")}),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.$inject=["$state","frame","heyToasts","siteUtils","SiteModel","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("AddSiteController",d)},{}],991:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.collection=d.repository.collection,e.call(this,a,b,c,f,g)}var e=a("./BaseListAndFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["$state","$stateParams","account","admins","ENV","preferences"],angular.module("app-unifi-manage").controller("AdminsController",d)},{"./BaseListAndFormController":1e3}],992:[function(a,b,c){"use strict";function d(a,b){e.call(this,a,b)}var e=a("./AlertsLinkController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["alerts","alertFrameUtils"],angular.module("app-unifi-manage").controller("AlertsController",d)},{"./AlertsLinkController":993}],993:[function(a,b,c){"use strict";function d(a,b){this.alerts=a,this.alertFrameUtils=b}d.prototype.getUnreadCount=function(){return this.alerts.repositories.unread.model.get("count")},d.prototype.closeAlerts=function(){this.alertFrameUtils.close()},d.prototype.toggleAlerts=function(){this.alertFrameUtils.toggle()},d.prototype.isAlertsOpen=function(){return this.alertFrameUtils.isOpen()},d.$inject=["alerts","alertFrameUtils"],b.exports=d},{}],994:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q){this.featureFlag=d,this.frame=f,this.system=l,this.preferences=n,this.settingsSection="autobackup",this.backup=h,this.backupUtils=i,this.cronConfig={options:{allowMinute:!1}},this.timezones=m,this.MONTHLY_OCCURANCE=q.MONTHLY_OCCURANCE,e.call(this,a,b,c,g,j,k,o,p)}var e=a("./BaseSettingsController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.backup.repository.collection},d.prototype.save=function(){var a=[];return this.isSubmitting=!0,angular.forEach(["super_mgmt"],function(b){a.push(this.saveSection(this.getSettingFromKey(b),this.forms[b].modelCopy.attributes,b))}.bind(this)),this.afterSave(a)},d.prototype.isCloudKeySdCardCheckAvailable=function(){return this.featureFlag.isEnabled("withCloudKeySdCardCheck")&&this.system.isCloudKey()&&!this.system.isCloudKeySdCardMounted()},d.$inject=["$q","$translate","heyToasts","featureFlag","frame","account","backup","backupUtils","settings","siteUtils","system","timezones","preferences","reload","modelDivergence","BACKUP_DEFAULTS"],angular.module("app-unifi-manage").controller("BackupSettingsController",d)},{"./BaseSettingsController":1003}],995:[function(a,b,c){"use strict";function d(){this.handlers={}}d.prototype.addHandlerOnce=function(a,b){var c=function(){a.call(this),this.removeHandler(c,b)}.bind(this);this.addHandler(c,b)},d.prototype.addHandler=function(a,b){angular.isArray(b)?b.forEach(function(b){this.addHandler(a,b)},this):(this.handlers[b]||(this.handlers[b]=[]),this.handlers[b].push(a))},d.prototype.removeHandler=function(a,b){angular.isArray(b)?b.forEach(function(b){this.removeHandler(a,b)},this):this.handlers[b]&&(this.handlers[b][this.handlers[b].indexOf(a)]=null)},d.prototype.trigger=function(a){angular.isArray(a)?a.forEach(function(a){this.trigger(a)},this):((this.handlers[a]||[]).forEach(function(a){angular.isFunction(a)&&a.call(this)},this),this.handlers[a]=(this.handlers[a]||[]).filter(function(a){return angular.isFunction(a)}))},d.$inject=[],b.exports=d},{}],996:[function(a,b,c){"use strict";function d(a,b,c){this.defaultSortBy=this.defaultSortBy||"name",e.call(this,a,b,c)}var e=a("../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){var a=this.listState.getFilter("wired");this.filter.setWiredFilter(a&&"all"!==a?"wired"===a:void 0);var b=this.listState.getFilter("guest");this.filter.setGuestFilter(b&&"all"!==b?"guests"===b:void 0),this.isFiltered=this.filter.isFiltered.bind(this.filter),this.getWiredFilter=this.filter.getWiredFilter.bind(this.filter),this.hasWiredFilter=this.filter.hasWiredFilter.bind(this.filter),this.getGuestFilter=this.filter.getGuestFilter.bind(this.filter),this.hasGuestFilter=this.filter.hasGuestFilter.bind(this.filter)},d.prototype.setWiredFilter=function(a){this.beginStateChange(),this.listState.addFilter("wired",a?"wired":"wireless"),this.filter.setWiredFilter(a),this.commitStateChange()},d.prototype.clearWiredFilter=function(){this.beginStateChange(),this.listState.removeFilter("wired"),this.filter.clearWiredFilter(),this.commitStateChange()},d.prototype.setGuestFilter=function(a){this.beginStateChange(),this.listState.addFilter("guest",a?"guests":"users"),this.filter.setGuestFilter(a),this.commitStateChange()},d.prototype.clearGuestFilter=function(){this.beginStateChange(),this.listState.removeFilter("guest"),this.filter.clearGuestFilter(),this.commitStateChange()},d.$inject=["$injector","CollectionView","preferences"],b.exports=d},{"../../base-unifi/controllers/BasePaginatedListController":1665}],997:[function(a,b,c){"use strict";function d(a,b,c,d){this.$translate=a,this.heyToasts=b,this.propertyName=this.propertyName||"config_network",this.defaultConnectionType="dhcp",this.patterns=this.patterns||{},this.patterns.ipAddress=d.IP_ADDRESS,this.onTypeChange=this.onTypeChange.bind(this),e.call(this,c)}var e=a("../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getAttrsToSave=function(){var a={};return a[this.propertyName]=this.modelCopy.attributes[this.propertyName],a},d.prototype.setDefaultAttrs=function(a){var b=a?"":"Copy",c=a||!this.isSaveQueued?void 0:{delegateTo:"pending"};this["model"+b]&&(this["model"+b].attributes[this.propertyName]=(this.model?angular.copy(this.model.get(this.propertyName,c)):void 0)||{},this["model"+b].attributes[this.propertyName].type=this["model"+b].attributes[this.propertyName].type||this.defaultConnectionType)},d.prototype.onModelChange=function(){this.setDefaultAttrs(!0)},d.prototype.onTypeChange=function(a,b){if(b){var c=new RegExp("^"+b);angular.forEach(this.form,function(a,b){"object"==typeof a&&a.hasOwnProperty("$modelValue")&&c.test(b)&&this.form.$removeControl(a)}.bind(this))}this.showTypeForm=a},d.prototype.reset=function(){e.prototype.reset.call(this),this.setDefaultAttrs(!1)},d.$inject=["$translate","heyToasts","modelDivergence","REGEX_PATTERNS"],b.exports=d},{"../../base-unifi/controllers/BaseFormController":1661}],998:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=a,this.deviceUtils=b,this.heyToasts=c,this.networks=d,this.networkUtils=f,this.apiResults=h,e.call(this,g)}var e=a("../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.addEventHandlers=function(){e.prototype.addEventHandlers.call(this),this.networks.repository.collection.on("add remove change reset",this.onNetworksChange,this),this.onNetworksChange()},d.prototype.removeEventHandlers=function(){e.prototype.removeEventHandlers.call(this),this.networks.repository.collection.off("add remove change reset",this.onNetworksChange,this)},d.prototype.save=function(){this.isSubmitting=!0;var a=this.getAttrsToSave(),b=this.isSaveQueued?"pending":void 0;return this.deviceUtils.saveDevice(this.model,a,{wait:!0,delegateTo:b,pendingGroup:this.pendingGroup}).then(function(){return this.isSaveQueued||this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_SERVICES").toLowerCase()})),this.reset(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("DEVICE_PROPERTIES_SECTION_CONFIGURE_SERVICES").toLowerCase()}),a)),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.getAttrsToSave=function(){return{mgmt_network_id:this.mgmtNetworkId}},d.prototype.getMgmtNetworkId=function(a){var b,c,d,e=a||!this.isSaveQueued?void 0:{delegateTo:"pending"};return this.model&&(b=this.model.get("mgmt_network_id",e),c=this.model.get("networkgroup",e)),b||(d=this.networks.repository.collection.findWhere({attr_no_delete:!0,networkgroup:c||"LAN"}),d&&(b=d.id)),b},d.prototype.onNetworksChange=function(){this.nativeNetworks=this.networks.repository.collection.filter(function(a){
return this.networkUtils.nativeNetworkTypes.indexOf(a.get("purpose"))!==-1}.bind(this)),this.mgmtNetworkId&&this.mgmtNetworkIdMaster||(this.mgmtNetworkId=this.mgmtNetworkId||this.getMgmtNetworkId(),this.mgmtNetworkIdMaster=this.mgmtNetworkIdMaster||this.getMgmtNetworkId(!0))},d.prototype.onModelChange=function(){this.mgmtNetworkIdMaster=this.getMgmtNetworkId(!0)},d.prototype.resetModelCopyAttrs=function(a){e.prototype.resetModelCopyAttrs.call(this,a),a&&a.indexOf("mgmt_network_id")!==-1&&(this.mgmtNetworkId=this.getMgmtNetworkId())},d.prototype.reset=function(){e.prototype.reset.call(this),this.mgmtNetworkId=this.getMgmtNetworkId()},d.$inject=["$translate","deviceUtils","heyToasts","networks","networksUtils","modelDivergence","apiResults"],b.exports=d},{"../../base-unifi/controllers/BaseFormController":1661}],999:[function(a,b,c){"use strict";function d(a,b,c,d){this.$timeout=b,this.isDropdownVisible=!1,this.rowsPerPage=this.rowsPerPage||10,e.call(this,a,c,d)}var e=a("../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initFilters=function(){var a=this.$injector.get("BaseSearchableModelFilter");this.filter=new a,this.filter.searchableAttributes=this.searchableAttributes},d.prototype.openDropdown=function(){this.isDropdownVisible=!0},d.prototype.closeDropdown=function(){this.isDropdownVisible=!1},d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.selectModel=function(a){this.selectedModel===a?this.selectedModel=void 0:(this.selectedModel=a,this.closeDropdown()),this.onSelect&&this.$timeout(function(){this.onSelect({model:this.selectedModel})}.bind(this),0)},d.prototype.onSearchQueryChange=function(a){e.prototype.onSearchQueryChange.call(this,a),this.onChange&&this.onChange({searchQuery:a}),a&&this.openDropdown()},d.prototype.clearSearchQuery=function(){this.filter&&(this.filter.searchQuery=void 0)},d.prototype.setSupplementalFilter=function(a){if(!this.isSupplementalFilterAllowed())throw new Error("The filter does not support supplemental functions");this.beginStateChange(),this.filter.setSupplementalFunction(a),this.commitStateChange()},d.prototype.clearSupplementalFilter=function(){if(!this.isSupplementalFilterAllowed())throw new Error("The filter does not support supplemental functions");this.beginStateChange(),this.filter.clearSupplementalFunction(),this.commitStateChange()},d.prototype.isSupplementalFilterAllowed=function(){return!!(this.filter&&this.filter.setSupplementalFunction&&this.filter.clearSupplementalFunction)},d.$inject=["$injector","$timeout","CollectionView","preferences"],b.exports=d},{"../../base-unifi/controllers/BasePaginatedListController":1665}],1e3:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.ERROR_EDIT_NOT_FOUND="Missing or invalid item ID",this.$state=a,this.$stateParams=b,this.preferences=e,this.ENV=d,this.isAdmin=c.isAdmin.bind(c),this.isSuperAdmin=c.isSuperAdmin.bind(c),this.initView()}d.prototype.initView=function(){try{if("edit"===this.$stateParams.action){if(this.model=this.collection.get(this.$stateParams.id),!this.model)throw new Error(this.ERROR_EDIT_NOT_FOUND);this.view="form"}else if("add"===this.$stateParams.action){var a=this.collection.model;this.model=new a,this.view="form"}else this.view="list"}catch(b){this.onInitViewError(b)}},d.prototype.onInitViewError=function(a){this.errorMsg=a.message,this.$state.go(this.ENV.FATAL_STATE,{error:404})},d.prototype.list=function(){this.$state.go(this.$state.current.name,{action:"list",id:null})},d.prototype.add=function(){this.$state.go(this.$state.current.name,{action:"add",id:null})},d.prototype.edit=function(a){this.$state.go(this.$state.current.name,{action:"edit",id:a.id})},d.$inject=["$state","$stateParams","account","ENV","preferences"],b.exports=d},{}],1001:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=c,this.propertyPanel=d,this.frame=g,this.isAdmin=f.isAdmin.bind(f),e.call(this,a,b,d)}var e=a("../../base-unifi/controllers/BasePanelItemController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.removePanel=function(){var a=this.getPanelModel();if(!a)return this.$q.reject();var b;return b=this.isSaveQueued&&this.model.hasPendingChanges()?this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_PROPERTIES_PENDING_CHANGES_FORGET_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_PROPERTIES_PENDING_CHANGES_FORGET_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}):this.$q.when(),b.then(function(){this.propertyPanel.removeItem(a)}.bind(this))},d.$inject=["$q","$timeout","$translate","propertyPanel","account","frame"],b.exports=d},{"../../base-unifi/controllers/BasePanelItemController":1667}],1002:[function(a,b,c){"use strict";function d(a){this.formUtils=a,this.count=0}d.prototype.addItem=function(){if(this.isAddAllowed())return this.count++,!0},d.prototype.removeItem=function(){throw new Error("You must override removeItem")},d.prototype.isAddAllowed=function(){return!this.max||this.count<this.max},d.prototype.isRemoveAllowed=function(){return!this.min||this.count>this.min},d.prototype.getOptions=function(){return this.formUtils.range(this.count)},d.$inject=["formUtils"],b.exports=d},{}],1003:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h){this.$q=a,this.$translate=b,this.heyToasts=c,this.settings=e,this.siteUtils=f,this.reload=g,this.modelDivergence=h,this.site=this.siteUtils.getActiveSite(),this.isAdmin=d.isAdmin.bind(d),this.defaultSettings={},this.forms={}}d.prototype.getSettingFromKey=function(a,b,c){var d=this.settings.getSettingFromKey(a,c?void 0:this.site.id);if(d)b&&angular.forEach(b,function(a,b){void 0===d.get(b)&&d.set(b,a)});else if(!this.defaultSettings[a]){var e=this.settings.repository.collection.model;this.defaultSettings[a]=new e(angular.extend({key:a},b||{})),c||this.defaultSettings[a].set("site_id",this.site.id)}return d||this.defaultSettings[a]},d.prototype.haveFormsDiverged=function(){var a=!1;return angular.forEach(this.forms,function(b){b&&b.$error&&b.$error.divergent&&(a=!0)}),a},d.prototype.resolveDivergence=function(){angular.forEach(this.forms,function(a){this.modelDivergence.resolveDivergence(a)}.bind(this))},d.prototype.ignoreDivergence=function(){angular.forEach(this.forms,function(a){this.modelDivergence.ignoreDivergence(a)}.bind(this))},d.prototype.saveSection=function(a,b,c){var d=c?"SETTINGS_"+this.settingsSection.toUpperCase()+"_KEY_"+c.toUpperCase():"SETTINGS_NAV_"+this.settingsSection.toUpperCase();return this.settings.saveSettings(a,b,d).then(function(){return!0})["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))},d.prototype.afterSave=function(a){return this.$q.all(a).then(function(a){var b=a.filter(function(a){return a}).length,c=a.length-b;b&&(c?this.heyToasts.pushWarning(this.$translate.instant("COMMON_NOTICE_SAVE_MIXED",{section:this.$translate.instant("SETTINGS_NAV_"+this.settingsSection.toUpperCase()).toLowerCase()})):this.heyToasts.pushSuccess(this.$translate.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:this.$translate.instant("SETTINGS_NAV_"+this.settingsSection.toUpperCase()).toLowerCase()})))}.bind(this))["catch"](function(){this.heyToasts.pushError(this.$translate.instant("COMMON_NOTICE_SAVE_ERROR",{section:this.$translate.instant("SETTINGS_NAV_"+this.settingsSection.toUpperCase()).toLowerCase()}))}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.reset=function(){this.reload.reloadState()},d.$inject=["$q","$translate","heyToasts","account","settings","siteUtils","reload","modelDivergence"],b.exports=d},{}],1004:[function(a,b,c){"use strict";function d(){}d.$inject=[],angular.module("app-unifi-manage").controller("ClientsController",d)},{}],1005:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m){this.frame=c,this.account=f,this.sdn=i,this.preferences=k,this.system=j,this.settingsSection="cloud_access",e.call(this,a,b,d,f,g,h,l,m)}var e=a("./BaseSettingsController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){this.isSubmitting=!0;var a=[],b=this.saveSection(this.getSettingFromKey("super_sdn"),{enabled:this.forms.sdn.modelCopy.attributes.enabled}).then(function(){return this.sdn.fetchWithPolling()}.bind(this));return a.push(b),this.afterSave(a)},d.prototype.onCloudAccessEnabledChange=function(){!this.account.hasEnabledFor()&&this.forms.sdn.modelCopy.attributes.enabled&&this.registerUser()},d.prototype.unregisterSuperAdmin=function(){this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_CLOUD_ACCESS_UNREGISTER_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_CLOUD_ACCESS_UNREGISTER_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.forms.sdn.modelCopy.attributes.enabled=!1,this.unregisterUser()["catch"](function(a){return this.heyToasts.pushError(a),this.reset(),!1}.bind(this))}.bind(this))},d.prototype.unregisterUser=function(){return this.isSubmitting=!0,this.sdn.unregister()["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.registerUser=function(){this.frame.show("sdnUser").then(function(a){return this.isSubmitting=!0,this.sdn.register(a)["catch"](function(a){return this.account.isSuperAdmin()&&(this.forms.sdn.modelCopy.attributes.enabled=!1),this.heyToasts.pushError(a),!1}.bind(this))}.bind(this))["catch"](function(){this.account.isSuperAdmin()&&(this.forms.sdn.modelCopy.attributes.enabled=!1)}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.isUsernameVisible=function(){return this.account.hasEnabledFor()},d.prototype.isUnregisterVisible=function(){return this.account.hasEnabledFor()&&this.account.isSuperAdmin()&&!this.system.isUnifiGo()},d.prototype.isUnregisterUserVisible=function(){return this.account.hasEnabledFor()&&!this.account.isSuperAdmin()},d.prototype.isRegisterUserVisible=function(){return!this.account.hasEnabledFor()&&!this.account.isSuperAdmin()&&this.sdn.isRegistered()&&this.sdn.isEnabled()},d.prototype.isActionVisible=function(){return this.account.isSuperAdmin()&&!this.system.isUnifiGo()},d.prototype.isConnecting=function(){return this.sdn.isConnecting()},d.$inject=["$q","$translate","frame","heyToasts","account","settings","siteUtils","sdn","system","preferences","reload","modelDivergence"],angular.module("app-unifi-manage").controller("CloudAccessSettingsController",d)},{"./BaseSettingsController":1003}],1006:[function(a,b,c){"use strict";function d(a,b,c,d){e.call(this,a,b,c,d)}var e=a("../../base-unifi/controllers/BaseConfirmController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["$rootScope","$timeout","frame","options"],angular.module("app-unifi-manage").controller("CloudKeySdCardCheckController",d)},{"../../base-unifi/controllers/BaseConfirmController":1658}],1007:[function(a,b,c){"use strict";function d(a,b,c,d){this.bowser=a,this.dpi=b,this.frame=c,this.availableCategories=b.getAllAppCategories().filter(function(a){return d.indexOf(a.name)===-1})}d.prototype.resolve=function(){this.frame.getLayout("addDpiCategoryGraphLayout").resolve(this.categories)},d.prototype.isAndroid4x=function(){return parseInt(this.bowser.osversion)<5&&this.bowser.android},d.$inject=["bowser","dpi","frame","excludedCategories"],angular.module("app-unifi-manage").controller("ConfigureDpiCategoryGraphController",d)},{}],1008:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$translate=b,this.frame=f,this.maps=g,this.mapUtils=h;var i=a.$on("$frameClose:configureMaps",function(){this.destroyView(),i()}.bind(this));e.call(this,c,d)}var e=a("../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.maps.repository.collection},d.prototype.addOrEditMap=function(a){this.frame.close("configureMaps"),this.frame.show("editMap",{map:function(){return a}})},d.prototype.deleteMap=function(a){var b=this.mapUtils.getSelectedMap()&&a.id===this.mapUtils.getSelectedMap().id;this.frame.show("confirm",{title:function(){return this.$translate.instant("MAP_CONFIGURE_DELETE_HEADER")}.bind(this),message:function(){return this.$translate.instant("MAP_CONFIGURE_DELETE_CONFIRM",{mapName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){a.destroy()})["finally"](function(){b&&this.mapUtils.changeMap()}.bind(this))},d.$inject=["$rootScope","$translate","$q","CollectionView","frame","maps","mapUtils"],angular.module("app-unifi-manage").controller("ConfigureMapsController",d)},{"../../base-unifi/controllers/BaseListController":1662}],1009:[function(a,b,c){"use strict";function d(a,b,c,d,f){this.modifiedFiles=d,e.call(this,a,b,c,f)}var e=a("../../base-unifi/controllers/BaseConfirmController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["$rootScope","$timeout","frame","modifiedFiles","options"],angular.module("app-unifi-manage").controller("ConfirmUpgradeOverridesController",d)},{"../../base-unifi/controllers/BaseConfirmController":1658}],1010:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o){this.frame=d,this.system=i,this.preferences=j,this.settingsSection="controller",this.EASTER_EGGS=m,this.patterns={name:n.NAME,hostname:n.HOSTNAME,ipAddress:n.IP_ADDRESS,portNumber:n.PORT_NUMBER},this.chatOptions=[{id:o.SUPER_ONLY,translationKey:"SETTINGS_CONTROLLER_VALUES_CHAT_SUPER_ONLY"},{id:o.EVERYONE,translationKey:"SETTINGS_CONTROLLER_VALUES_CHAT_ENABLED"},{id:o.DISABLED,translationKey:"SETTINGS_CONTROLLER_VALUES_CHAT_DISABLED"}],e.call(this,a,b,c,f,g,h,k,l)}var e=a("./BaseSettingsController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.confirmOverrideInformHost=function(){this.forms.super_mgmt1.modelCopy.attributes.override_inform_host&&this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_CONTROLLER_CONFIRM_OVERRIDE_INFORM_HOST_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_CONTROLLER_CONFIRM_OVERRIDE_INFORM_HOST_MESSAGE")}.bind(this),options:angular.noop})["catch"](function(){this.forms.super_mgmt1.modelCopy.attributes.override_inform_host=!1}.bind(this))},d.prototype.sendTestEmail=function(a){this.forms.super_smtp.$valid?(this.isSendingTestEmail=!0,this.settings.sendTestEmail(this.forms.super_smtp.modelCopy,a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSendingTestEmail=!1}.bind(this))):this.showValidation=!0},d.prototype.save=function(){var a=[];return this.isSubmitting=!0,angular.forEach(["super_smtp","super_identity"],function(b){this.forms[b]&&this.forms[b].modelCopy&&a.push(this.saveSection(this.getSettingFromKey(b),this.forms[b].modelCopy.attributes,b))}.bind(this)),a.push(this.saveSection(this.getSettingFromKey("super_mgmt"),this.getSuperMgmtAttributes(),"super_mgmt")),this.afterSave(a)["finally"](function(){this.system.repository.refresh()}.bind(this))},d.prototype.getSuperMgmtAttributes=function(){var a={};return this.forms.super_mgmt1&&this.forms.super_mgmt1.modelCopy&&angular.extend(a,{override_inform_host:this.forms.super_mgmt1.modelCopy.attributes.override_inform_host,discoverable:this.forms.super_mgmt1.modelCopy.attributes.discoverable,live_chat:this.forms.super_mgmt1.modelCopy.attributes.live_chat}),this.forms.super_mgmt2&&this.forms.super_mgmt2.modelCopy&&angular.extend(a,{google_maps_api_key:this.forms.super_mgmt2.modelCopy.attributes.google_maps_api_key,image_maps_use_google_engine:this.forms.super_mgmt2.modelCopy.attributes.image_maps_use_google_engine}),a},d.$inject=["$q","$translate","heyToasts","frame","account","settings","siteUtils","system","preferences","reload","modelDivergence","EASTER_EGGS","REGEX_PATTERNS","CHAT_LEVELS"],angular.module("app-unifi-manage").controller("ControllerSettingsController",d)},{"./BaseSettingsController":1003}],1011:[function(a,b,c){"use strict";function d(a){this.preferences=a}d.$inject=["preferences"],angular.module("app-unifi-manage").controller("DashboardController",d)},{}],1012:[function(a,b,c){"use strict";function d(){}d.$inject=[],angular.module("app-unifi-manage").controller("DevicesController",d)},{}],1013:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.devices=a,this.wlanDpi=d,this.defaultSortBy="totalBytes",this.defaultSortDesc=!0,this.collection=new g.Collection,this.knownClientsCache=b,this.cachedKnownClientIds=[],e.call(this,f,h,c)}var e=a("../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.collection},d.prototype.addEventHandlers=function(){this.devices.repository.collection.on("sync",this.collectData,this),this.wlanDpi.repository.collection.on("sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.cachedKnownClientIds.forEach(function(a){this.knownClientsCache.repository.unregisterItem(a)},this),this.devices.repository.collection.off("sync",this.collectData,this),this.wlanDpi.repository.collection.off("sync",this.collectData,this)},d.prototype.getClientModel=function(a){var b=this.clients.repository.collection.get(a)||this.knownClientsCache.repository.collection.get(a);return b},d.prototype.collectData=function(){throw new Error("You must override collectData")},d.prototype.knownClientFetched=function(a){throw new Error("You must override knownClientFetched")},d.prototype.fetchKnownClient=function(a){this.cachedKnownClientIds.indexOf(a)===-1&&(this.cachedKnownClientIds.push(a),this.knownClientsCache.repository.registerItem(a).fetchItem(a)["finally"](function(){this.knownClientFetched(a)}.bind(this)))},d.$inject=["devices","knownClientsCache","preferences","wlanDpi","$injector","Backbone","CollectionView"],b.exports=d},{"../../base-unifi/controllers/BasePaginatedListController":1665}],1014:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.devices=a,this.$stateParams=d,this.STATS_DEFAULTS=e,this.clearSelectedApplications=b.clear.bind(b),this.clearSelectedCategories=c.clear.bind(c)}d.prototype.showCategoryStatistics=function(){return this.STATS_DEFAULTS.CATEGORY_STATISTIC_VIEWS.indexOf(this.$stateParams.view)!==-1},d.prototype.showApplicationStatistics=function(){return this.STATS_DEFAULTS.APPLICATION_STATISTIC_VIEWS.indexOf(this.$stateParams.view)!==-1},d.$inject=["devices","selectedDpiApplications","selectedDpiCategories","$stateParams","STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("DpiController",d)},{}],1015:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$state=a,this.frame=d,this.restrictionGroup=e,this.model=f,this.model||(this.model=new c,this.model.set({enabled:!0,cats:[]}),this.isNew=!0),this.availableCategories=b.getAllAppCategories();var g=this.model.get("cats");if(this.excludedPrefixes=[""],g&&g.length>0){var h=b.getCategoryName(g[0]);this.dpiCategory=this.availableCategories.find(function(a){return a.name===h})}this.downLimitEnabled=!1,this.model.get("qos_rate_max_down")!==-1&&(this.downLimitEnabled=!0,this.downLimit=this.model.get("qos_rate_max_down")),this.upLimitEnabled=!1,this.model.get("qos_rate_max_up")!==-1&&(this.upLimitEnabled=!0,this.upLimit=this.model.get("qos_rate_max_up"))}d.prototype.resolve=function(){return this.model.set({cats:this.dpiCategory.categoryIds}),this.model.get("blocked")||this.model.set({qos_rate_max_down:this.downLimitEnabled?this.downLimit:-1,qos_rate_max_up:this.upLimitEnabled?this.upLimit:-1}),this.frame.getLayout("dpiRestrictionLayout").resolve(this.model)},d.prototype.reject=function(){return this.frame.getLayout("dpiRestrictionLayout").reject()},d.$inject=["$state","dpi","DpiAppModel","frame","restrictionGroup","model"],angular.module("app-unifi-manage").controller("DpiRestrictionController",d)},{}],1016:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){this.$translate=a,this.apiResults=b,this.dpiGroups=c,this.frame=d,this.heyToasts=e,this.networks=f.repository.collection.map(function(a){return{name:a.get("name"),type:this.$translate.instant("SETTINGS_NAV_NETWORKS"),model:a}},this).concat(g.repository.collection.map(function(a){return{name:a.get("name"),type:this.$translate.instant("SETTINGS_NAV_WIRELESS_NETWORKS"),model:a}},this)),this.networks=this.networks.filter(function(a){var b=a.model.get("dpigroup_id");return!(b&&c.repository.collection.get(b))})}d.prototype.resolve=function(){this.network.model.save({dpi_enabled:!0,dpigroup_id:this.restrictionGroupId}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_SAVE_SUCCESS")),this.frame.getLayout("dpiRestrictionNetworkAssignmentLayout").resolve()}.bind(this))["catch"](function(a){this.heyToasts.pushError(this.apiResults.appendErrorMsg(this.$translate.instant("DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_SAVE_ERROR"),a))}.bind(this))},d.prototype.reject=function(){return this.frame.getLayout("dpiRestrictionNetworkAssignmentLayout").reject()},d.$inject=["$translate","apiResults","dpiGroups","frame","heyToasts","networks","wirelessNetworks"],angular.module("app-unifi-manage").controller("DpiRestrictionNetworkAssignmentFrameController",d)},{}],1017:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o){this.dpiGroups=f,this.$translate=b,this.frame=c,this.preferences=l,this.statistics=k,this.CollectionView=n,this.DpiGroupModel=o,this.settingsSection="dpi",this.forms={},this.initRestrictionGroupsView(),e.call(this,a,b,g,d,i,j,h,m),this.showFrame=function(a){return c.show("editTextField",{text:function(){return a?a:""},title:function(){return b.instant(a?"DPI_RESTRICTION_GROUP_EDIT_MODAL_TITLE":"DPI_RESTRICTION_GROUP_CREATE_MODAL_TITLE")},label:function(){return b.instant("DPI_RESTRICTION_GROUP_NAME")},resolveButtonLabel:function(){return b.instant(a?"COMMON_ACTIONS_SAVE":"COMMON_ACTIONS_CREATE")}})}}var e=a("./BaseSettingsController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.clearDpiCounters=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_SITE_RESET_DPI_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_SITE_RESET_DPI_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isClearingDpiCounters=!0,this.statistics.resetDpiCounters().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isClearingDpiCounters=!1}.bind(this))}.bind(this))},d.prototype.createRestrictionGroup=function(){this.showFrame().then(function(a){var b=new this.DpiGroupModel;b.save({name:a},{wait:!0}).then(function(){this.dpiGroups.repository.collection.add(b,{merge:!0})}.bind(this))}.bind(this))},d.prototype.initRestrictionGroupsView=function(){this.restrictionGroupsView=new this.CollectionView(this.dpiGroups.repository.collection),this.restrictionGroupsView.refresh()},d.prototype.destroyRestrictionGroupsView=function(){this.restrictionGroupsView&&(this.restrictionGroupsView.dispose(),this.restrictionGroupsView=null)},d.prototype.save=function(){var a=[];this.isSubmitting=!0;var b=["config"];return angular.forEach(b,function(b){a.push(this.saveSection(this.getSettingFromKey(b),this.forms[b].modelCopy.attributes,b))}.bind(this)),this.afterSave(a)["finally"](function(){this.isSubmitting=!1}.bind(this))},d.$inject=["$q","$translate","frame","account","dpiGroups","heyToasts","reload","settings","siteUtils","statistics","preferences","modelDivergence","CollectionView","DpiGroupModel"],angular.module("app-unifi-manage").controller("DpiSettingsController",d)},{"./BaseSettingsController":1003}],1018:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k,l){this.atlas=a,this.frame_=b,this.map=c,this.maps=d,this.mapDevices=e,this.MapEditor=f,this.mapUtils=g,this.imageUrlUtils=h,this.$translate=j,this.MAP_DEFAULTS=k,this.MAP_TYPES=l,this.apiKey=i.getGoogleMapsApiKey(),this.unplaceDevices=!1,this.initDefaults()}d.prototype.startGettingCurrentPosition=function(){this.mapOptions.google.center||this.mapUtils.getCurrentPosition().then(function(a){this.mapOptions.google.center=[a.coords.latitude,a.coords.longitude]}.bind(this))["catch"](function(){this.mapOptions.google.center=[this.MAP_DEFAULTS.DEFAULT_MAP.lat,this.MAP_DEFAULTS.DEFAULT_MAP.lng]}.bind(this))["finally"](function(){this.newMapOptions.google.center=this.mapOptions.google.center}.bind(this))},d.prototype.initDefaults=function(){this.mapOptions={type:this.map?this.map.get("type"):this.MAP_TYPES.GOOGLE,image:{},google:{}},this.mapOptions.type||(this.mapOptions.type=this.MAP_TYPES.IMAGE),this.map?(this.mapOptions.name=this.map.get("name"),this.map.isGoogleMap()?this.mapOptions.google={center:[this.map.get("lat"),this.map.get("lng")],mapTypeId:this.map.get("mapTypeId"),zoom:this.map.get("zoom")}:this.mapOptions.image={center:[this.map.get("lat"),this.map.get("lng")],zoom:this.map.get("zoom")},this.mapUtils.checkImageExists(this.map).then(function(a){return this.imageUrlUtils.convertImageUrl(a)}.bind(this)).then(function(a){this.mapOptions.url=a,this.newMapOptions.url=a}.bind(this))):(this.mapOptions.google={mapTypeId:this.MAP_DEFAULTS.DEFAULT_MAP.mapTypeId,zoom:this.MAP_DEFAULTS.DEFAULT_MAP.zoom},this.startGettingCurrentPosition()),this.newMapOptions=angular.copy(this.mapOptions),this.updateGoogleMapOptions=function(a){angular.extend(this.newMapOptions.google,a)}.bind(this)},d.prototype.onSearchBoxChange=function(a){var b=this.mapUtils.getGoogleMapPlaceParams(a);b&&(this.mapOptions.google.center=[b.center.lat(),b.center.lng()],this.mapOptions.google.bounds=b.bounds,this.unplaceDevices=!0)},d.prototype.editCompleted=function(){this.unplaceDevices&&this.map&&(this.mapDevices.unplaceAllDevices(this.map),this.unplaceDevices=!1),(new this.MapEditor).withMap(this.map).withMapOptions(this.newMapOptions).save().then(function(a){this.map?this.frame_.show("configureMaps"):this.mapUtils.changeMap(a)}.bind(this))},d.prototype.cancel=function(){this.frame_.show("configureMaps")},d.prototype.isStateValid=function(){var a=this.newMapOptions.type===this.MAP_TYPES.GOOGLE&&!!this.newMapOptions.google.center,b=this.newMapOptions.type===this.MAP_TYPES.IMAGE&&(this.map&&this.map.get("type")===this.MAP_TYPES.IMAGE||!!this.mapOptions.url||!!this.newMapOptions.image.file);return!!this.newMapOptions.name&&(b||a)},d.prototype.setMapType=function(a){this.newMapOptions.type=a,this.unplaceDevices=!0},d.prototype.onFileSelect=function(a){this.newMapOptions.image.file=a[0],this.unplaceDevices=!0},d.$inject=["atlas","frame","map","maps","mapDevices","MapEditor","mapUtils","imageUrlUtils","system","$translate","MAP_DEFAULTS","MAP_TYPES"],angular.module("app-unifi-manage").controller("EditMapController",d)},{}],1019:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$state=a,this.frame=b,this.title=c,this.label=d,this.resolveButtonLabel=e,this.text=f}d.prototype.resolve=function(){return this.frame.getLayout("editTextFieldLayout").resolve(this.text)},d.prototype.reject=function(){return this.frame.getLayout("editTextFieldLayout").reject()},d.$inject=["$state","frame","title","label","resolveButtonLabel","text"],angular.module("app-unifi-manage").controller("EditTextFieldController",d)},{}],1020:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./EventsLinkController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["eventFrameUtils"],angular.module("app-unifi-manage").controller("EventsController",d)},{"./EventsLinkController":1021}],1021:[function(a,b,c){"use strict";function d(a){this.eventFrameUtils=a}d.prototype.closeEvents=function(){this.eventFrameUtils.close()},d.prototype.toggleEvents=function(){this.eventFrameUtils.toggle()},d.prototype.isEventsOpen=function(){return this.eventFrameUtils.isOpen()},d.$inject=["eventFrameUtils"],b.exports=d},{}],1022:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i){this.BaseModel=a,this.deviceBatchUtils=b,this.deviceUtils=d,this.frame=e,this.heyToasts=f,this.siteUtils=g,this.DEVICE_INFORM=h,this.patterns={hostname:i.HOSTNAME,portNumber:i.PORT_NUMBER,ipAddress:i.IP_ADDRESS},this.migrate_hostname="",this.migrate_port=h.DEFAULT_PORT,this.adoptedDevicesFilter=new c,this.adoptedDevicesFilter.setDeviceAdoptedFilter(!0),this.selectAllAdoptedTest=function(a){return!!a.get("adopted")}}d.$inject=["BaseModel","deviceBatchUtils","DeviceFilter","deviceUtils","frame","heyToasts","siteUtils","DEVICE_INFORM","REGEX_PATTERNS"],d.prototype.getInformHostWithPort=function(){return[this.migrate_hostname,this.migrate_port].join(":")},d.prototype.gotoNextStep=function(){this.step++},d.prototype["export"]=function(){return this.isExporting=!0,this.siteUtils.generateSiteExport().then(function(a){return this.heyToasts.pushSuccess(a),this.gotoNextStep(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isExporting=!1}.bind(this))},d.prototype.importConfirm=function(){this.gotoNextStep()},d.prototype.onSelectDevicesToMigrate=function(a){this.selectedDevicesToMigrate=a},d.prototype.migrateDevices=function(){this.isMigrating=!0;var a=[this.DEVICE_INFORM.PROTOCOL,this.getInformHostWithPort(),this.DEVICE_INFORM.ENDPOINT].join("");return this.deviceUtils.migrateDevices(this.selectedDevicesToMigrate,a).then(function(a){return this.heyToasts.pushSuccess(a),this.gotoNextStep(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isMigrating=!1}.bind(this))},d.prototype.onSelectDevicesToForget=function(a){this.selectedDevicesToForget=a},d.prototype.forgetDevices=function(){this.isMigrating=!0;var a=new this.BaseModel({collection:this.selectedDevicesToForget});return this.deviceBatchUtils.forgetDevices(a).then(function(a){return this.heyToasts.pushSuccess(a),this.frame.getLayout("exportSiteLayout").resolve(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isMigrating=!1}.bind(this))},angular.module("app-unifi-manage").controller("ExportSiteController",d)},{}],1023:[function(a,b,c){"use strict";function d(a,b,c){this.$state=a,this.firewallUtils=b,this.preferences=c,this.RULES_STATE="manage.site.settings.routingAndFirewall.firewall.rules",this.GROUPS_STATE="manage.site.settings.routingAndFirewall.firewall.groups"}d.prototype.isRulesState=function(){return this.RULES_STATE===this.$state.current.name},d.prototype.isGroupsState=function(){return this.GROUPS_STATE===this.$state.current.name},d.prototype.isRulesetDefined=function(){return null!==this.firewallUtils.getDefaultRuleset()},d.$inject=["$state","firewallUtils","preferences"],angular.module("app-unifi-manage").controller("FirewallController",d)},{}],1024:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.collection=g.repository.collection,e.call(this,a,b,c,d,f)}var e=a("./BaseListAndFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onInitViewError=function(a){a.message===this.ERROR_EDIT_NOT_FOUND?(this.errorMsg=a.message,this.$state.go(".",{action:"list",id:void 0})):e.prototype.onInitViewError.call(this,a)},d.$inject=["$state","$stateParams","account","ENV","preferences","firewallGroups"],angular.module("app-unifi-manage").controller("FirewallGroupsController",d)},{"./BaseListAndFormController":1e3}],1025:[function(a,b,c){"use strict";function d(a,b,c,d){this.isAdmin=b.isAdmin.bind(b),this.frame=c,this.model=new a,d&&(this.model.attributes.group_type=d)}d.prototype.onSave=function(){this.frame.getLayout("firewallGroupsCreateLayout").resolve(this.model)},d.prototype.onCancel=function(){
this.frame.getLayout("firewallGroupsCreateLayout").reject()},d.$inject=["FirewallGroupModel","account","frame","groupType"],angular.module("app-unifi-manage").controller("FirewallGroupsCreateController",d)},{}],1026:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$stateParams=b,this.collection=f.repository.collection,e.call(this,a,b,d,c,g)}var e=a("./BaseListAndFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onInitViewError=function(a){a.message===this.ERROR_EDIT_NOT_FOUND?(this.errorMsg=a.message,this.$state.go(".",{action:"list",ruleset:void 0,id:void 0})):e.prototype.onInitViewError.call(this,a)},d.prototype.isRulesetDefined=function(){return!!this.$stateParams.ruleset},d.$inject=["$state","$stateParams","ENV","account","firewallRules","preferences"],angular.module("app-unifi-manage").controller("FirewallRulesController",d)},{"./BaseListAndFormController":1e3}],1027:[function(a,b,c){"use strict";function d(a){return i+a+"_enabled"}function e(a){return i+a+"_filename"}function f(a,b,c,d,e,f,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y){this._=a,this.appUrl=e,this.countryCodes=f.getCountryCodes(),this.countryNamesMap=f.getCountryNamesMap(),this.currencyUtils=h,this.customPortalPreview=i,this.featureFlag=j,this.frame=k,this.guestPortalImage=l,this.HotspotPackageModel=n,this.preferences=q,this.UseWebrtc=u,this.HOTSPOT_LANGUAGES=v,this.HOTSPOT_PORTAL_OVERRIDE_TEMPLATE_HELP=w,this.TERMS_OF_SERVICE_DEFAULT=y,this.settingsSection="guest_control",this.hotspotPackages=o.repository.collection,this.hotspotPackagesCopy=o.clonePackagesWithDefaults(),this.hotspotPackagesToRemove=[],this.patterns={hostname:x.HOSTNAME,hostnameOrSubnet:x.HOSTNAME_OR_SUBNET,ipAddress:x.IP_ADDRESS,subnet:x.SUBNET},this.restrictedSubnetMin=0,this.restrictedSubnetMax=1e3,this.allowedSubnetMin=0,this.allowedSubnetMax=1e3,this.gatewayOptions=[{id:"paypal",translationKey:"SETTINGS_GUEST_CONTROL_GATEWAY_PAYPAL"},{id:"stripe",translationKey:"SETTINGS_GUEST_CONTROL_GATEWAY_STRIPE"},{id:"quickpay",translationKey:"SETTINGS_GUEST_CONTROL_GATEWAY_QUICKPAY"},{id:"authorize",translationKey:"SETTINGS_GUEST_CONTROL_GATEWAY_AUTHORIZE"},{id:"merchantwarrior",translationKey:"SETTINGS_GUEST_CONTROL_GATEWAY_MERCHANT_WARRIOR"},{id:"ippay",translationKey:"SETTINGS_GUEST_CONTROL_GATEWAY_IP_PAY"}],this.welcomeTextPositionOptions=[{id:"under_logo",translationKey:"SETTINGS_GUEST_CONTROL_PACKAGE_OPTIONS_WELCOME_TEXT_POSITION_UNDER_LOGO"},{id:"above_boxes",translationKey:"SETTINGS_GUEST_CONTROL_PACKAGE_OPTIONS_WELCOME_TEXT_POSITION_ABOVE_BOXES"}],this.sortablePackagesConfig={animation:100,sort:!0,handle:".unifiSettingsPackageHandle",ghostClass:"unifiSettingsPackageSortablePlaceholder",onEnd:this.updatePackagesOrder.bind(this)},g.call(this,b,c,m,d,s,t,r,p)}var g=a("./BaseSettingsController"),h=["logo","bg_image"],i="portal_customized_";f.prototype=Object.create(g.prototype),f.prototype.constructor=f,f.prototype.getLanguages=function(){var a=this.forms.guest_access||{};return a&&a.modelCopy?a.modelCopy.attributes.portal_customized_languages||[]:[]},f.prototype.getAvailableLanguages=function(){var a,b=this.getLanguages(),c=this.forms.guest_access;return a=c&&c.modelCopy&&c.modelCopy.attributes.portal_customized?this.HOTSPOT_LANGUAGES.ALL_LANGUAGES:this.HOTSPOT_LANGUAGES.BUILT_IN_LANGUAGES,a.filter(function(a){return b.indexOf(a)===-1})},f.prototype.addLanguage=function(a){this.forms.guest_access.modelCopy.attributes.portal_customized_languages.push(a)},f.prototype.removeLanguage=function(a){var b=this.forms.guest_access.modelCopy.attributes.portal_customized_languages;b.splice(b.indexOf(a),1)},f.prototype.isBuiltInLanguage=function(a){return this.HOTSPOT_LANGUAGES.BUILT_IN_LANGUAGES.indexOf(a)!==-1},f.prototype.filterLanguages=function(){var a=this.forms.guest_access.modelCopy.attributes.portal_customized;if(!a){var b=this.forms.guest_access.modelCopy.attributes.portal_customized_languages;this.forms.guest_access.modelCopy.attributes.portal_customized_languages=this._.intersection(b,this.HOTSPOT_LANGUAGES.BUILT_IN_LANGUAGES)}},f.prototype.getHotspotManagerUrl=function(){return this.appUrl.buildUrl(["hotspot","site",this.site.get("name")])},f.prototype.getPortalPreviewModel=function(){if(this.forms.guest_access&&this.forms.guest_access.modelCopy)return this.customPortalPreview.getPreviewModel(this.forms.guest_access.modelCopy,this.hotspotPackagesCopy)},f.prototype.save=function(){this.isSubmitting=!0;var a=this.getSettingFromKey("guest_access"),b=this.forms.guest_access.modelCopy;return this.beforeSave().then(function(){var c=[this.saveSection(a,b.attributes)];return b.get("payment_enabled")&&(this.hotspotPackagesCopy.models.forEach(function(a){c.push(a.save())}),this.hotspotPackagesToRemove.forEach(function(a){c.push(a.destroy())})),this.afterSave(c).then(function(){this.hotspotPackages.set(this.hotspotPackagesCopy.models)}.bind(this))}.bind(this))["finally"](function(){this.isSubmitting=!1,this.hotspotPackagesToRemove=[]}.bind(this))},f.prototype.beforeSave=function(){return this.savePortalImages()},f.prototype.savePortalImages=function(){return"angular"===this.forms.guest_access.modelCopy.attributes.template_engine?this.removeOldCustomPortalImages().then(this.uploadNewCustomPortalImages.bind(this)):this.$q.when()},f.prototype.removeOldCustomPortalImages=function(){var a=[],b=this.getSettingFromKey("guest_access"),c=this.forms.guest_access.modelCopy;return h.forEach(function(f){var g=c.get(d(f)),h=b.get(e(f)),i=c.get(e(f)),j=!g&&!!h,k=g&&angular.isObject(i),l=!!h&&k,m=!!h&&g&&!i;if(j||l||m){var n=this.guestPortalImage.removeFile(h)["catch"](function(){}).then(function(){(j||m)&&c.set(e(f),"")});a.push(n)}}.bind(this)),this.$q.all(a)},f.prototype.uploadNewCustomPortalImages=function(){var a=[],b=this.forms.guest_access.modelCopy;return h.forEach(function(c){var f=b.get(d(c)),g=b.get(e(c)),h=f&&angular.isObject(g);if(h){var i=this.guestPortalImage.uploadFile(g.file).then(function(a){b.set(e(c),a)})["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("COMMON_NOTICE_UPLOAD_ERROR")),this.$q.reject()}.bind(this));a.push(i)}}.bind(this)),this.$q.all(a)},f.prototype.resetPortalCustomization=function(){var a=this.forms.guest_access.modelCopy;a.resetPortalCustomization()},f.prototype.formatHotspotPackage=function(a){var b=[a.get("name")];return 0!==a.get("amount")&&b.push("("+this.currencyUtils.formatAmount(a.get("amount"),a.get("currency"))+")"),b.join(" ")},f.prototype.removeHotspotPackage=function(a){this.hotspotPackagesCopy.remove(a),a.isNew()||this.hotspotPackagesToRemove.push(a)},f.prototype.editHotspotPackage=function(a){this.frame.show("hotspotPackage",{model:function(){return a.deepCopy()},freePackageExists:this.freePackageExists(a)}).then(function(b){a.set(b.attributes)})},f.prototype.addHotspotPackage=function(){this.frame.show("hotspotPackage",{model:function(){return new this.HotspotPackageModel}.bind(this),freePackageExists:this.freePackageExists()}).then(function(a){this.hotspotPackagesCopy.add(a)}.bind(this))},f.prototype.freePackageExists=function(a){return function(){return this.hotspotPackagesCopy.models.filter(function(b){return b!==a}).some(function(a){return 0===a.get("amount")})}.bind(this)},f.prototype.editTermsOfService=function(a){return a.get("portal_customized_tos_enabled")?(a.get("portal_customized_tos")||a.set("portal_customized_tos",this.TERMS_OF_SERVICE_DEFAULT),this.frame.show("simpleTextEditor",{title:function(){return this.$translate.instant("SETTINGS_GUEST_CONTROL_TERMS_OF_SERVICE_MODAL_TITLE")}.bind(this),text:function(){return a.get("portal_customized_tos")}}).then(function(b){a.set("portal_customized_tos",b)})):void a.set("portal_customized_tos",null)},f.prototype.editWelcomeText=function(a){return a.get("portal_customized_welcome_text_enabled")?this.frame.show("simpleTextEditor",{title:function(){return this.$translate.instant("SETTINGS_GUEST_CONTROL_WELCOME_TEXT_MODAL_TITLE")}.bind(this),text:function(){return a.get("portal_customized_welcome_text")}}).then(function(b){a.set("portal_customized_welcome_text",b)}):void a.set("portal_customized_welcome_text",null)},f.prototype.updatePackagesOrder=function(){this.hotspotPackagesCopy.each(function(a,b){a.set("index",b)})},f.prototype.isAnyJspAuthenticationMethodEnabled=function(){var a=this.forms.guest_access&&this.forms.guest_access.modelCopy?this.forms.guest_access.modelCopy.attributes:{};return a.voucher_enabled||a.payment_enabled},f.prototype.isAnySocialAuthenticationMethodEnabled=function(){var a=this.forms.guest_access&&this.forms.guest_access.modelCopy?this.forms.guest_access.modelCopy.attributes:{};return a.facebook_enabled||a.google_enabled},f.$inject=["_","$q","$translate","account","appUrl","countries","currencyUtils","customPortalPreview","featureFlag","frame","guestPortalImage","heyToasts","HotspotPackageModel","hotspotPackages","modelDivergence","preferences","reload","settings","siteUtils","UseWebrtc","HOTSPOT_LANGUAGES","HOTSPOT_PORTAL_OVERRIDE_TEMPLATE_HELP","REGEX_PATTERNS","TERMS_OF_SERVICE_DEFAULT"],angular.module("app-unifi-manage").controller("GuestControlSettingsController",f)},{"./BaseSettingsController":1003}],1028:[function(a,b,c){"use strict";function d(a,b,c,d){this.$state=a,this.site=b,this.siteUtils=c,this.ENV=d,this.redirectToDashboard()}d.prototype.redirectToDashboard=function(){var a=this.site.getActiveSite()||this.siteUtils.getDefaultSiteName();a?this.$state.go("manage.site.dashboard",{site:a}):this.$state.go(this.ENV.FATAL_STATE,{error:404})},d.$inject=["$state","site","siteUtils","ENV"],angular.module("app-unifi-manage").controller("HomeController",d)},{}],1029:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.collection=f.repository.collection,e.call(this,a,b,c,d,g)}var e=a("./BaseListAndFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["$state","$stateParams","account","ENV","hotspot2","preferences"],angular.module("app-unifi-manage").controller("Hotspot2Controller",d)},{"./BaseListAndFormController":1e3}],1030:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){if(this.$rootScope=a,this.$timeout=b,this.frame=d,this.entry=c,this.title=c.name,this.entry.auth_ids&&this.entry.auth_vals){this.entry.auth_ids=this.entry.auth_ids.split(","),this.entry.auth_vals=this.entry.auth_vals.split(","),this.auths=[];for(var h=0;h<this.entry.auth_ids.length;h++)this.auths.push({id:this.entry.auth_ids[h],val:this.entry.auth_vals[h]})}this.HOTSPOT2_EAP_METHODS=g,this.HOTSPOT2_AUTH_IDS=e,this.HOTSPOT2_AUTH_VALUES=f,this.maxAuths=10;var i=a.$on("$frameClose:hotspot2NaiRealmListEntry",function(){this.removeEventHandlers(),i()}.bind(this));this.addEventHandlers()}d.prototype.constructor=d,d.prototype.resolve=function(){var a=this.entry;return a.auth_ids&&a.auth_vals&&(a.auth_ids=a.auth_ids.toString(),a.auth_vals=a.auth_vals.toString()),this.frame.getLayout("hotspot2NaiRealmListEntryLayout").resolve(a)},d.prototype.reject=function(){return this.frame.getLayout("hotspot2NaiRealmListEntryLayout").reject()},d.prototype.removeEventHandlers=function(){this.events&&angular.forEach(this.events,function(a){a()})},d.prototype.addEventHandlers=function(){this.removeEventHandlers(),this.events=[this.$rootScope.$on("keypress:enter",function(){this.$timeout(function(){return this.isSubmitAllowed()?void this.save():void(this.showValidation=!0)}.bind(this),0)}.bind(this))]},d.prototype.save=function(){return this.isSubmitting=!0,this.resolve(),!0},d.prototype.removeAuth=function(a){this.form.$setDirty(),this.entry.auth_ids.splice(a,1),this.entry.auth_vals.splice(a,1),this.auths.splice(a,1)},d.prototype.addAuth=function(){if(this.authId&&this.authVal){if(this.form.$setDirty(),this.entry.auth_ids&&this.entry.auth_vals&&this.auths||(this.entry.auth_ids=[],this.entry.auth_vals=[],this.auths=[]),this.auths.length>=this.maxAuths)return;this.auths.push({id:this.authId,val:this.authVal}),this.entry.auth_ids.push(this.authId),this.entry.auth_vals.push(this.authVal),this.authId=null,this.authVal=null}},d.prototype.isSubmitAllowed=function(){return this.form.$valid&&!this.form.$pristine},d.$inject=["$rootScope","$timeout","entry","frame","HOTSPOT2_AUTH_IDS","HOTSPOT2_AUTH_VALUES","HOTSPOT2_EAP_METHODS"],angular.module("app-unifi-manage").controller("Hotspot2NaiRealmListEntryController",d)},{}],1031:[function(a,b,c){"use strict";function d(a,b,c,d){this.frame=a,this.model=c,this.freePackageExists=b,this.currencies=Object.keys(d),0===this.model.get("amount")&&(this.freePackage=!0)}d.prototype.isSubmitAllowed=function(){return this.form.$valid&&!this.form.$pristine},d.prototype.save=function(){this.frame.getLayout("hotspotPackageLayout").resolve(this.model)},d.prototype.isFreePackageCheckboxDisabled=function(){return this.freePackageExists},d.prototype.adjustAmountAndCurrency=function(){this.freePackage&&(this.model.set("amount",0),this.model.set("currency",void 0))},d.$inject=["frame","freePackageExists","model","CURRENCY_MAP"],angular.module("app-unifi-manage").controller("HotspotPackageController",d)},{}],1032:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){this.$state=a,this.frame=b,this.heyToasts=c,this.siteUtils=d,this.systemBackupUtils=f,this.model=new e,this.patterns={name:g.NAME}}d.prototype.importSite=function(a){if(a&&a[0])return this.isImporting=!0,this.systemBackupUtils.uploadBackupFile(a[0],this.importProgress).then(function(a){return this.siteUtils.importSite(this.model,a.backup_id).then(function(a){return this.frame.getLayout("importSiteLayout").resolve(),this.heyToasts.pushSuccess(a),this.$state.go("manage.site.dashboard",{site:this.model.get("name")}),!0}.bind(this))}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isImporting=!1,this.importProgress=void 0}.bind(this))},d.$inject=["$state","frame","heyToasts","siteUtils","SiteModel","systemBackupUtils","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("ImportSiteController",d)},{}],1033:[function(a,b,c){"use strict";function d(){}d.$inject=[],angular.module("app-unifi-manage").controller("InsightsController",d)},{}],1034:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){e.call(this,a,b,c,d,f,g,h),this.remember=f.isRememberMeEnabled()}var e=a("../../base-unifi/controllers/BaseLoginController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype._appLogin=function(a,b,c){return this.account.loginToManage(a,b,c)},d.prototype._appRedirect=function(){return this.$state.go(this.ENV.HOME_STATE)},d.$inject=["$state","$stateParams","$location","queryString","account","frame","ENV"],angular.module("app-unifi-manage").controller("LoginController",d)},{"../../base-unifi/controllers/BaseLoginController":1663}],1035:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){this.$filter=a,this.$q=b,this.$timeout=c,this.$translate=d,this.backupUtils=e,this.heyToasts=f,this.settings=h,this.system=i,this.systemConfig=j,this.systemBackupUtils=k,this.status=l,this.preferences=m,this.frame=n,this.Upload=o,this.UnifiFileBasePath=p,this.forms={},this.isCloudKey=g.isCloudKey(),this.logLevelOptions=[{id:"warn",translationKey:"SETTINGS_MAINTENANCE_VALUES_LOG_LEVEL_WARN"},{id:"info",translationKey:"SETTINGS_MAINTENANCE_VALUES_LOG_LEVEL_INFO"},{id:"debug",translationKey:"SETTINGS_MAINTENANCE_VALUES_LOG_LEVEL_DEBUG"}],this.maintenanceDataRetentionOptions=[7,30,60,90,180,365].map(function(a){return{days:a,translationKey:"DATETIME_DAYS_FULL_PARAMETERIZED",translationParams:{days:a}}}).concat({days:-1,translationKey:"SETTINGS_MAINTENANCE_VALUES_DATA_RETENTION_DISABLED"}),this.downloadBackupOptions=[{days:0,translationKey:"SETTINGS_MAINTENANCE_VALUES_DOWNLOAD_SETTINGS_ONLY"}].concat([7,30,60,90,180,365].map(function(a){return{days:a,translationKey:"DATETIME_DAYS_FULL_PARAMETERIZED",translationParams:{days:a}}})).concat({days:-1,translationKey:"SETTINGS_MAINTENANCE_VALUES_DOWNLOAD_ALL_TIME"})}d.prototype.updateLogLevel=function(){var a=[];return this.isUpdatingLogLevel=!0,angular.forEach(["device","mgmt","system","sdn"],function(b){this.forms.services.modelCopy.attributes["debug_"+b]!==this.system.repository.model.get("debug_"+b)&&a.push(this.system.setDebugLevel(b,this.forms.services.modelCopy.attributes["debug_"+b]).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this)))}.bind(this)),this.$q.all(a).then(function(a){return a.every(function(a){return a})})["finally"](function(){this.isUpdatingLogLevel=!1}.bind(this))},d.prototype.updateDataRetention=function(){return this.isUpdatingDataRetention=!0,this.system.setDataRetention(this.forms.services.modelCopy.attributes.data_retention_days).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isUpdatingDataRetention=!1}.bind(this))},d.prototype.compactDatabase=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_COMPACT_DATABASE_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_COMPACT_DATABASE_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isCompactingDatabase=!0,this.system.compactDatabase().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isCompactingDatabase=!1}.bind(this))}.bind(this))},d.prototype.downloadBackup=function(){return this.isDownloadingBackup=!0,this.systemBackupUtils.generateBackupFile(this.downloadBackupDays,!0).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isDownloadingBackup=!1}.bind(this))},d.prototype.downloadSupportInfo=function(){return this.isDownloadingSupportInfo=!0,this.system.generateSupportFile(!0).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isDownloadingSupportInfo=!1}.bind(this))},d.prototype.restoreSettings=function(a){return a&&a[0]?(this.isRestoringFromBackup=!0,this.restoreProgress={},this.systemBackupUtils.uploadBackupFile(a[0],this.restoreProgress).then(function(a){return this.isRestoringFromBackup=!1,this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_BACKUP_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_BACKUP_CONFIRM_MESSAGE",{file:a.filename,version:a.version,date:this.$filter("moment")(parseInt(a.timestamp),"format","datetime")})}.bind(this),options:function(){return{allowHtml:!0}}}).then(function(){return this.isRestoringFromBackup=!0,this.backupUtils.restoreAndRestart(a.backup_id)}.bind(this))["catch"](function(){this.systemBackupUtils.cancelRestoreFromBackup(a.backup_id)}.bind(this))}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isRestoringFromBackup=!1,this.restoreProgress=void 0}.bind(this))):this.$q.reject()},d.prototype.checkDevicesFirmwareUpdate=function(){return this.isCheckingDevicesFirmwareUpdate=!0,this.system.checkDevicesFirmwareUpdate().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isCheckingDevicesFirmwareUpdate=!1}.bind(this))},d.prototype.checkForCloudKeyFirmwareUpdate=function(){return this.isCheckingForCloudKeyFirmwareUpdate=!0,this.system.isCloudKeyFirmwareUpdateAvailable().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isCheckingForCloudKeyFirmwareUpdate=!1}.bind(this))},d.prototype.updateCloudKeyFirmware=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_UPDATE_CLOUD_KEY_FIRMWARE_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_UPDATE_CLOUD_KEY_FIRMWARE_CONFIRM_MESSAGE")}.bind(this),options:function(){return{warnings:[this.$translate.instant("SETTINGS_MAINTENANCE_UNIFI_UPDATE_WARNING")]}}.bind(this)}).then(function(){return this.isUpdatingCloudKeyFirmware=!0,this.system.updateCloudKeyFirmware().then(function(a){return this.heyToasts.pushSuccess(a),this.system.waitForUpdateFinish(),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isUpdatingCloudKeyFirmware=!1}.bind(this))}.bind(this))},d.prototype.checkForCloudKeyControllerUpdate=function(){return this.isCheckingForCloudKeyControllerUpdate=!0,this.system.isCloudKeyControllerUpdateAvailable().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isCheckingForCloudKeyControllerUpdate=!1}.bind(this))},d.prototype.updateCloudKeyController=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_UPDATE_CLOUD_KEY_CONTROLLER_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_UPDATE_CLOUD_KEY_CONTROLLER_CONFIRM_MESSAGE")}.bind(this),options:function(){return{warnings:[this.$translate.instant("SETTINGS_MAINTENANCE_UNIFI_UPDATE_WARNING")]}}.bind(this)}).then(function(){return this.isUpdatingCloudKeyController=!0,this.system.updateCloudKeyController().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isUpdatingCloudKeyController=!1}.bind(this))}.bind(this))},d.prototype.restartCloudKey=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_RESTART_CLOUD_KEY_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_RESTART_CLOUD_KEY_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isRestartingCloudKey=!0,this.system.restartCloudKey().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isRestartingCloudKey=!1}.bind(this))}.bind(this))},d.prototype.shutdownCloudKey=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_SHUTDOWN_CLOUD_KEY_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_SHUTDOWN_CLOUD_KEY_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isShuttingDownCloudKey=!0,this.system.shutdownCloudKey().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isShuttingDownCloudKey=!1}.bind(this))}.bind(this))},d.prototype.resetCloudKey=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_RESET_CLOUD_KEY_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_RESET_CLOUD_KEY_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isResettingCloudKey=!0,this.system.resetCloudKey().then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isResettingCloudKey=!1}.bind(this))}.bind(this))},d.prototype.showSystemConfig=function(){this.isPreparingConfig=!0,this.systemConfig.resolve().then(function(){this.isPreparingConfig=!1,this.frame.show("systemConfig")}.bind(this))},d.$inject=["$filter","$q","$timeout","$translate","backupUtils","heyToasts","sdn","settings","system","systemConfig","systemBackupUtils","status","preferences","frame","Upload","UnifiFileBasePath"],angular.module("app-unifi-manage").controller("MaintenanceSettingsController",d)},{}],1036:[function(a,b,c){"use strict";function d(a,b,c){this.site=b,this.ENV=c,a.fetchPreferences()}d.$inject=["preferences","site","ENV","queryString"],angular.module("app-unifi-manage").controller("ManageController",d)},{}],1037:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.atlas=a,this.apiKey=c.getGoogleMapsApiKey(),this.MAP_DEFAULTS=d,this.$timeout=e,this.selectedMap=b.getSelectedMap(),this.selectedMap?(this.isGoogleMap=c.useGoogleEngineForImageMaps()||this.selectedMap.isGoogleMap(),this.isGoogleMap?this.initLoading():this.apiLoadSuccess=!0):b.changeMap()}d.prototype.initLoading=function(){var a=this.$timeout(function(){this.apiLoadFailure=!0}.bind(this),this.MAP_DEFAULTS.API_LOAD_TIMEOUT);this.atlas.getGoogleMaps().then(function(){this.$timeout.cancel(a),this.apiLoadSuccess=!0}.bind(this))},d.$inject=["atlas","mapUtils","system","MAP_DEFAULTS","$timeout"],angular.module("app-unifi-manage").controller("MapController",d)},{}],1038:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.collection=f.repository.collection,e.call(this,a,b,c,d,g)}var e=a("./BaseListAndFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["$state","$stateParams","account","ENV","networks","preferences"],angular.module("app-unifi-manage").controller("NetworksController",d)},{"./BaseListAndFormController":1e3}],1039:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q){this.$window=b,this.$translate=c,this.$timeout=d,this.frame=g,this.preferences=h,this.account=i,this.refresh=l,this.reload=m,this.DEFAULT_PREFERENCES=n,this.LANGUAGES=o,this.REFRESH_RATES=p,this.URLS=q,this.selectedLanguage=j.get()||"en",this.selectedRefreshRate=(this.refresh.getRefreshRate()||{}).id,this.alertPositionOptions=[{value:"top_left",translationKey:"PREFERENCES_MODAL_VALUES_POSITION_TOP_LEFT"},{value:"top_center",translationKey:"PREFERENCES_MODAL_VALUES_POSITION_TOP_CENTER"},{value:"top_right",translationKey:"PREFERENCES_MODAL_VALUES_POSITION_TOP_RIGHT"},{value:"bottom_left",translationKey:"PREFERENCES_MODAL_VALUES_POSITION_BOTTOM_LEFT"},{value:"bottom_center",translationKey:"PREFERENCES_MODAL_VALUES_POSITION_BOTTOM_CENTER"},{value:"bottom_right",translationKey:"PREFERENCES_MODAL_VALUES_POSITION_BOTTOM_RIGHT"}],e.call(this,k);var r=a.$on("$frameClose:preferences",function(){this.removeEventHandlers(),r()}.bind(this));d(this.init.bind(this),0),this.findDevicesIsVisible=f.findDevicesIsVisible.bind(f)}var e=a("../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.resolve=function(){return this.frame.getLayout("preferencesLayout").resolve()},d.prototype.reject=function(){return this.frame.getLayout("preferencesLayout").reject()},d.prototype.init=function(){this.updateModel(this.preferences.model),this.previousAttrs=this.model.deepAttributes(),this.previousAttrsRefreshRate=(this.refresh.getRefreshRate()||{}).id,delete this.previousAttrs.refreshRate},d.prototype.showHiddenPreferences=function(){return this.$window.showHiddenPreferences},d.prototype.resetToDefaults=function(){this.preferences.reset(!0).then(function(){this.onSuccess(),this.reset()}.bind(this))},d.prototype.resetToPrevious=function(){this.model.save(this.previousAttrs).then(function(){this.selectedRefreshRate!==this.previousAttrsRefreshRate&&(this.selectedRefreshRate=this.previousAttrsRefreshRate,this.changeRefreshRate()),this.onSuccess(!0),this.reset()}.bind(this))},d.prototype.save=function(){return this.model.save(this.modelCopy.attributes).then(function(){this.onSuccess()}.bind(this))},d.prototype.changeLanguage=function(){this.selectedLanguage&&(this.$translate.use(this.selectedLanguage),this.onSuccess())},d.prototype.changeRefreshRate=function(){this.selectedRefreshRate&&(this.refresh.updateRefreshRate(this.selectedRefreshRate),this.onSuccess())},d.prototype.toggleReadOnly=function(){this.account.isAdmin()&&this.account.repository.refresh()},d.prototype.toggleTimeFormat=function(){this.modelCopy.attributes.use24HourTime?this.modelCopy.attributes.timeFormat&&this.modelCopy.attributes.timeFormat!==this.DEFAULT_PREFERENCES.TIME_FORMAT_12HR||(this.modelCopy.attributes.timeFormat=this.DEFAULT_PREFERENCES.TIME_FORMAT_24HR):this.modelCopy.attributes.timeFormat&&this.modelCopy.attributes.timeFormat!==this.DEFAULT_PREFERENCES.TIME_FORMAT_24HR||(this.modelCopy.attributes.timeFormat=this.DEFAULT_PREFERENCES.TIME_FORMAT_12HR)},d.prototype.saveAndReload=function(){this.save().then(function(){this.$timeout(function(){this.reload.reloadPage()}.bind(this),300)}.bind(this))},d.prototype.onSuccess=function(a){this.clearNotification&&this.$timeout.cancel(this.clearNotification),a?(this.isSaveSuccessful=void 0,this.isCancelSuccessful=!0):(this.isSaveSuccessful=!0,this.isCancelSuccessful=void 0),this.clearNotification=this.$timeout(function(){this.isSaveSuccessful=void 0,this.isCancelSuccessful=void 0}.bind(this),2e3)},d.$inject=["$rootScope","$window","$translate","$timeout","deviceDiscoveryUtils","frame","preferences","account","i18nLocalStorage","modelDivergence","refresh","reload","DEFAULT_PREFERENCES","LANGUAGES","REFRESH_RATES","URLS"],angular.module("app-unifi-manage").controller("PreferencesController",d)},{"../../base-unifi/controllers/BaseFormController":1661}],1040:[function(a,b,c){"use strict";function d(a,b,c,d){this.frame=b,this.preferences=c,this.RadiusProfileModel=d,this.isAdmin=a.isAdmin.bind(a)}d.prototype.editRadiusProfile=function(a){this.frame.show("radiusProfile",{model:function(){return a}})},d.prototype.addRadiusProfile=function(){this.frame.show("radiusProfile",{model:function(){return new this.RadiusProfileModel}.bind(this)})},d.$inject=["account","frame","preferences","RadiusProfileModel"],angular.module("app-unifi-manage").controller("ProfilesController",d)},{}],1041:[function(a,b,c){"use strict";function d(a,b,c){this.frame=b,this.model=c,this.isAdmin=a.isAdmin.bind(a)}d.prototype.close=function(){return this.frame.getLayout("radiusProfileLayout").reject()},d.prototype.onSaveOverride=function(){return this.frame.getLayout("radiusProfileLayout").resolve(this.model)},d.$inject=["account","frame","model","RadiusProfileModel"],angular.module("app-unifi-manage").controller("RadiusProfileController",d)},{}],1042:[function(a,b,c){"use strict";function d(a,b,c){this.preferences=b,this.patterns={ipAddress:c.IP_ADDRESS,portNumber:c.PORT_NUMBER,secret:c.RADIUS_SECRET},e.call(this,a)}var e=a("./BaseRepeatableController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateModel=function(a){this.model=a,this.syncCount()},d.prototype.syncCount=function(){if(this.model&&this.model.attributes[this.attributeName]&&this.model.attributes[this.attributeName].length&&(this.count=this.model.attributes[this.attributeName].length),this.min>this.count)for(var a=0;a<this.min;a++)this.addItem()},d.prototype.removeItem=function(a){this.model&&(this.model.attributes[this.attributeName].splice(a-1,1),this.count--)},d.prototype.addItem=function(){if(this.model&&e.prototype.addItem.call(this))return this.model.attributes[this.attributeName].push({}),!0},d.$inject=["formUtils","preferences","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("RadiusRepeatableFormController",d)},{"./BaseRepeatableController":1002}],1043:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l){this.gatewayUtils=f,this.preferences=h,this.settingsSection="radius",this.interimUpdateIntervalMin=60,this.interimUpdateIntervalMax=86400,this.isSuperAdmin=c.isSuperAdmin.bind(c),
this.patterns={ipAddress:l.IP_ADDRESS,portNumber:l.PORT_NUMBER,secret:l.RADIUS_SECRET},e.call(this,a,b,d,c,j,k,i,g)}var e=a("./BaseSettingsController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.save=function(){var a=[];this.isSubmitting=!0;var b=["radius"];return angular.forEach(b,function(b){a.push(this.saveSection(this.getSettingFromKey(b),this.forms[b].modelCopy.attributes,b))}.bind(this)),this.afterSave(a)["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.hasSiteGateway=function(){return!!this.gatewayUtils.getSiteGateway()},d.$inject=["$q","$translate","account","heyToasts","gatewayUtils","modelDivergence","preferences","reload","settings","siteUtils","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("RadiusServerController",d)},{"./BaseSettingsController":1003}],1044:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.gatewayUtils=d,this.collection=g.repository.collection,this.isAdmin=c.isAdmin.bind(c),e.call(this,a,b,c,h,f)}var e=a("./BaseListAndFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.hasSiteGateway=function(){return!!this.gatewayUtils.getSiteGateway()},d.$inject=["$state","$stateParams","account","gatewayUtils","preferences","radiusUsers","ENV"],angular.module("app-unifi-manage").controller("RadiusUsersController",d)},{"./BaseListAndFormController":1e3}],1045:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.gatewayUtils=f,this.activeTab="staticRoutes",this.collection=h.repository.collection,e.call(this,a,b,c,d,g)}var e=a("./BaseListAndFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.hasSiteGateway=function(){return!!this.gatewayUtils.getSiteGateway()},d.$inject=["$state","$stateParams","account","ENV","gatewayUtils","preferences","routing"],angular.module("app-unifi-manage").controller("RoutingController",d)},{"./BaseListAndFormController":1e3}],1046:[function(a,b,c){"use strict";function d(a,b){this.frame=a,this.ssoUrl="https://"+b}d.prototype.submit=function(){this.frame.getLayout("sdnUserLayout").resolve({username:this.username,password:this.password})},d.prototype.isSubmitAllowed=function(){return this.form.$valid&&!this.form.$pristine},d.prototype.close=function(){return this.frame.getLayout("sdnUserLayout").reject()},d.$inject=["frame","AccountHostname"],angular.module("app-unifi-manage").controller("SdnUserController",d)},{}],1047:[function(a,b,c){"use strict";function d(a){this.preferences=a}d.$inject=["preferences"],angular.module("app-unifi-manage").controller("SettingsController",d)},{}],1048:[function(a,b,c){"use strict";function d(a,b,c){this.frame=a,this.text=b,this.title=c}d.prototype.submit=function(){this.frame.getLayout("simpleTextEditorLayout").resolve(this.text)},d.$inject=["frame","text","title"],angular.module("app-unifi-manage").controller("SimpleTextEditorController",d)},{}],1049:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$state=a,this.site=b,this.siteUtils=c,this.preferences=d,this.propertyPanel=e,this.ENV=f,this.isPropertyPanelOpen=e.isDockOpen.bind(e),this.validateSite()}d.prototype.validateSite=function(){var a,b=this.site.getActiveSite();b&&(a=this.siteUtils.doesSiteExist(b),a||this.site.clearActiveSite()),a||this.$state.go(this.ENV.FATAL_STATE,{error:404})},d.prototype.isPropertyPanelInline=function(){return!!this.preferences.model.get("isPropertyPanelInline")},d.prototype.isPropertyPanelAvailable=function(){return!this.propertyPanel.isEmpty()},d.$inject=["$state","site","siteUtils","preferences","propertyPanel","ENV"],angular.module("app-unifi-manage").controller("SiteController",d)},{}],1050:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q){this.$state=b,this.frame=h,this.timezones=p,this.preferences=k,this.countries=f,this.countryChannels=g,this.settingsSection="site",this.statistics=o,this.isSuperAdmin=d.isSuperAdmin.bind(d),this.patterns={name:q.NAME,ipAddress:q.IP_ADDRESS,portNumber:q.PORT_NUMBER,deviceAccountName:q.DEVICE_ACCOUNT_NAME},e.call(this,a,c,i,d,m,n,l,j)}var e=a("./BaseSettingsController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.saveSite=function(a){return this.siteUtils.updateActiveSiteDesc(a.desc).then(function(){return!0})["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))},d.prototype.save=function(){var a=[];this.isSubmitting=!0,a.push(this.saveSite(this.forms.site.modelCopy.attributes)),a.push(this.saveSection(this.getSettingFromKey("mgmt"),{advanced_feature_enabled:this.forms.mgmt1.modelCopy.attributes.advanced_feature_enabled,auto_upgrade:this.forms.mgmt1.modelCopy.attributes.auto_upgrade,led_enabled:this.forms.mgmt1.modelCopy.attributes.led_enabled,alert_enabled:this.forms.mgmt1.modelCopy.attributes.alert_enabled,x_ssh_username:this.forms.mgmt2.modelCopy.attributes.x_ssh_username,x_ssh_password:this.forms.mgmt2.modelCopy.attributes.x_ssh_password},"mgmt"));var b=["country","locale","connectivity","snmp","rsyslogd","auto_speedtest","porta"];return angular.forEach(b,function(b){a.push(this.saveSection(this.getSettingFromKey(b),this.forms[b].modelCopy.attributes,b))}.bind(this)),this.afterSave(a)["finally"](function(){this.countryChannels.repository.refresh()}.bind(this))},d.prototype.deleteSite=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_SITE_DELETE_CONFIRM_TITLE",{siteDesc:this.site.get("desc")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_SITE_DELETE_CONFIRM_MESSAGE",{siteDesc:this.site.get("desc")})}.bind(this),options:angular.noop}).then(function(){return this.isDeleting=!0,this.siteUtils.deleteSite(this.site).then(function(a){this.heyToasts.pushSuccess(a);var b=this.siteUtils.getDefaultSiteName();return b&&this.$state.go("manage.site.dashboard",{site:b}),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))}.bind(this))["finally"](function(){this.isDeleting=!1}.bind(this))},d.prototype.exportSite=function(){this.frame.show("exportSite")},d.prototype.canDeleteSite=function(){return this.isSuperAdmin()&&!this.site.get("attr_no_delete")},d.prototype.getCountries=function(){return this.countries.repository.collection.models},d.prototype.confirmOverrideInformUrl=function(){this.forms.connectivity.modelCopy.attributes.override_inform_url&&this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_SITE_CONFIRM_OVERRIDE_INFORM_URL_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_SITE_CONFIRM_OVERRIDE_INFORM_URL_MESSAGE")}.bind(this),options:angular.noop})["catch"](function(){this.forms.connectivity.modelCopy.attributes.override_inform_url=!1}.bind(this))},d.$inject=["$q","$state","$translate","account","countries","countryChannels","frame","heyToasts","modelDivergence","preferences","reload","settings","siteUtils","statistics","timezones","REGEX_PATTERNS"],angular.module("app-unifi-manage").controller("SiteSettingsController",d)},{"./BaseSettingsController":1003}],1051:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.$window=b,this.appUrl=c,this.frame=d,this.sitesOverview=e;var f=a.$on("$frameClose:sitesOverview",function(){this.sitesOverview.repository.unregister(),f()}.bind(this));this.init()}d.prototype.init=function(){this.isLoading=!0,this.failedToLoad=!1,this.sitesOverview.repository.register().fetch({forceFetch:!0})["catch"](function(){this.failedToLoad=!0}.bind(this))["finally"](function(){this.isLoading=!1}.bind(this))},d.prototype.resolve=function(){return this.frame.getLayout("sitesOverviewLayout").resolve()},d.prototype.reject=function(){return this.frame.getLayout("sitesOverviewLayout").reject()},d.prototype.onSearchQueryChange=function(a){this.searchQuery=a},d.prototype.getOverviewUrl=function(){return this.appUrl.buildUrl(["overview","sites"])},d.prototype.openOverviewWindow=function(){this.$window.open(this.getOverviewUrl())},d.$inject=["$rootScope","$window","appUrl","frame","sitesOverview"],angular.module("app-unifi-manage").controller("SitesOverviewController",d)},{}],1052:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){this.$interval=a,this.binaryPrefix=c,this.siteHealth=d,this.speedTest=e,this.SETTINGS=f,this.STATUS=g,this.inProgress=!1,this.chartSeries={},b.$on("$frameClose:speedTest",this.onFrameClose.bind(this)),this.startTest()}d.prototype.onFrameClose=function(){this.stopTest(),this.siteHealth.repository.isRefreshable()&&this.siteHealth.repository.refresh()},d.prototype.startTest=function(){this.stopTest(),this.executeTest()},d.prototype.executeTest=function(){this.inProgress=!0,this.speedTest.startTest(),this.chartSeries={valueDownload:0,valueUpload:0,seriesDownload:[],seriesUpload:[]},this.testInterval=this.$interval(function(){var a=this.speedTest.getNextDownloadTick();a&&(this.chartSeries.valueDownload=a.valueDownload,this.chartSeries.seriesDownload.push(a));var b=this.speedTest.getNextUploadTick();b&&(this.chartSeries.valueUpload=b.valueUpload,this.chartSeries.seriesUpload.push(b)),this.chartSeries.statusDownload=this.speedTest.getDownloadStatusResult(),this.chartSeries.statusDownload===this.STATUS.IS_COMPLETED&&this.speedTest.hasNextDownloadTick()&&(this.chartSeries.statusDownload=this.STATUS.IN_PROGRESS),this.chartSeries.statusUpload=this.speedTest.getUploadStatusResult(),this.chartSeries.statusUpload===this.STATUS.IS_COMPLETED&&this.speedTest.hasNextUploadTick()&&(this.chartSeries.statusUpload=this.STATUS.IN_PROGRESS),this.speedTest.isTestInProgress()||this.speedTest.hasNextDownloadTick()||this.speedTest.hasNextUploadTick()||this.stopTest()}.bind(this),this.SETTINGS.REFRESHING_INTERVAL)},d.prototype.stopTest=function(){this.testInterval&&this.$interval.cancel(this.testInterval),this.chartSeries.valueDownload=this.speedTest.getDownloadValueResult(),this.chartSeries.valueUpload=this.speedTest.getUploadValueResult(),this.inProgress=!1},d.prototype.getPingResult=function(){return{status:this.speedTest.getPingStatusResult(),value:this.speedTest.getPingValueResult(),unit:"COMMON_LATENCY_UNIT"}},d.prototype.getDownloadResult=function(){var a=this.speedTest.getDownloadValueResult()*Math.pow(10,6),b=this.binaryPrefix.parse(a,"SI");return{status:this.speedTest.getDownloadStatusResult(),value:b.fixed,unit:b.prefix+"bps"}},d.prototype.getUploadResult=function(){var a=this.speedTest.getUploadValueResult()*Math.pow(10,6),b=this.binaryPrefix.parse(a,"SI");return{status:this.speedTest.getUploadStatusResult(),value:b.fixed,unit:b.prefix+"bps"}},d.$inject=["$interval","$rootScope","binaryPrefix","siteHealth","speedTest","SPEED_TEST_SETTINGS","SPEED_TEST_STATUSES"],angular.module("app-unifi-manage").controller("SpeedTestController",d)},{}],1053:[function(a,b,c){"use strict";function d(a){this.STATS_DEFAULTS=a}d.$inject=["STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("StatisticsController",d)},{}],1054:[function(a,b,c){"use strict";function d(a,b,c){this.dpiFilters=a,this.frame=b,this.STATS_DEFAULTS=c,this.enabled=a.isEnabled(),this.allFilters=a.getAllFilters(),this.availableFilters=a.getAvailableFilters(),this.filtersToAdd=[],this.filtersToRemove=[]}d.prototype.saveAndResolve=function(){this.enabled!==this.dpiFilters.isEnabled()&&this.dpiFilters.toggleFiltering(),this.dpiFilters.selectFilters(this.filtersToAdd),this.dpiFilters.deselectFilters(this.filtersToRemove),this.frame.getLayout("statisticsDpiFiltersLayout").resolve()},d.prototype.toggleFiltering=function(){this.enabled=!this.enabled},d.prototype.isEnabled=function(){return this.enabled},d.prototype.toggleFilter=function(a){this.filtersToAdd.indexOf(a)!==-1?(this.filtersToAdd.splice(this.filtersToAdd.indexOf(a),1),this.filtersToRemove.push(a)):this.filtersToRemove.indexOf(a)!==-1?(this.filtersToRemove.splice(this.filtersToRemove.indexOf(a),1),this.filtersToAdd.push(a)):this.dpiFilters.isSelected(a)?this.filtersToRemove.push(a):this.filtersToAdd.push(a)},d.$inject=["dpiFilters","frame","STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("StatisticsDpiFiltersController",d)},{}],1055:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.frame=a,this.heyToasts=b,this.statistics=c,this.$translate=d,this.STATS_DEFAULTS=e}d.prototype.clearCurrentStats=function(){return this.frame.show("confirm",{title:function(){return this.$translate.instant("STATISTICS_CLEAR_CURRENT_STATS_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("STATISTICS_CLEAR_CURRENT_STATS_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isClearingStats=!0,this.statistics.resetCurrentStats().then(function(a){this.heyToasts.pushSuccess(a)}.bind(this))["catch"](function(a){this.heyToasts.pushError(a)}.bind(this))}.bind(this))["finally"](function(){this.isClearingStats=!1}.bind(this))},d.$inject=["frame","heyToasts","statistics","$translate","STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("StatisticsOverviewController",d)},{}],1056:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i){this.devices=a,this.preferences=b,this.switchReports=c,this.switchUtils=d,this.$filter=e,this.$state=f,this.$stateParams=g,this.$translate=h,this.STATS_DEFAULTS=i,this.selectedPorts={},this.sortOrders=[{value:"natural",translationKey:"STATISTICS_ORDER_BY_NATURAL"},{value:"tx",translationKey:"STATISTICS_ORDER_BY_TX"},{value:"rx",translationKey:"STATISTICS_ORDER_BY_RX"},{value:"total",translationKey:"STATISTICS_ORDER_BY_TOTAL"}],this.init()}d.prototype.init=function(){var a=this.switchReports.repository.collection.getMac();a&&(this.device=this.devices.repository.collection.get(a),this.interval=this.switchReports.getInterval(),this.ports=this.device.get("port_table").models,this.start=this.switchReports.getStart(),this.end=this.switchReports.getEnd(),this.order=this.sortOrders[0],this.selectConnectedPorts())},d.prototype.selectAllPorts=function(){this.ports.forEach(function(a){this.selectedPorts[a.get("port_idx")]=!0},this)},d.prototype.selectNone=function(){this.selectedPorts={}},d.prototype.selectConnectedPorts=function(){this.ports.filter(function(a){return a.get("enable")&&a.get("up")}).forEach(function(a){this.selectedPorts[a.get("port_idx")]=!0},this)},d.prototype.setInterval=function(a){this.interval=a},d.prototype.toggleSortDropdown=function(){this.isSortDropdownVisible=!this.isSortDropdownVisible},d.prototype.closeSortDropdown=function(){this.isSortDropdownVisible=!1},d.prototype.isDeviceAvailable=function(a){return this.switchUtils.isAdoptedSwitch(a)&&a!==this.device},d.prototype.changeSwitch=function(a){if(a){var b=angular.extend({},this.$state.params);b.switchId=a.id,this.$state.go(this.$state.current.name,b)}},d.prototype.togglePortSelection=function(a){var b=a.get("port_idx");return this.selectedPorts[b]=!this.selectedPorts[b],this.selectedPorts[b]},d.prototype.isPortSelected=function(a){return a&&this.selectedPorts[a.get("port_idx")]===!0},d.prototype.filter=function(){return this.isPortSelected.bind(this)},d.prototype.orderBy=function(){return function(a){switch(this.order.value){default:case"natural":return a.get("port_idx");case"tx":return-a.get("tx_bytes")||0;case"rx":return-a.get("rx_bytes")||0;case"total":return-(a.get("tx_bytes")||0)-(a.get("rx_bytes")||0)}}.bind(this)},d.prototype.updateReports=function(a,b){this.switchReports.setInterval(this.interval),this.switchReports.setDateInterval(a,b);var c=angular.extend({},this.$state.params);c.switchId=this.$stateParams.switchId,c.start=a,c.interval=this.switchReports.getInterval().name,this.$state.go(this.$state.current.name,c,{notify:!1}),this.switchReports.repository.refresh()},d.$inject=["devices","preferences","switchReports","switchUtils","$filter","$state","$stateParams","$translate","STATS_DEFAULTS"],angular.module("app-unifi-manage").controller("StatisticsSwitchController",d)},{}],1057:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j,k,l){this.frame=a,this.activeTab="system",this.settings=b,this.networks=c,this.wirelessNetworks=d,this.userGroups=e,this.system=f,this.devicesCollection=h.getSystemConfigDevices(),this.deviceModels=h.getSystemConfigModelsCount(),this.guestPortal=b.getSettingFromKey("guest_access",g.getActiveSite().id),this.getDeviceModel=i.getDeviceModelShort.bind(i),this.isAtfEnabled=j.isAtfEnabled.bind(j),this.getChannelConfigString=k.getChannelConfigString.bind(k),this.getChannelMode=k.getChannelMode.bind(k),this.getTransmitPowerString=k.getTransmitPowerString.bind(k),this.getTransmitPowerMode=k.getTransmitPowerMode.bind(k),this.getMinRssiString=k.getMinRssiString.bind(k),this.getUplinkDisplayName=l.getUplinkDisplayName.bind(l),this.getLoadBalance=h.getLoadBalance.bind(h)}d.prototype.isDisplaySiteOnLeft=function(){return this.deviceModels.length<this.networks.repository.collection.models.length+this.wirelessNetworks.repository.collection.models.length},d.$inject=["frame","settings","networks","wirelessNetworks","userGroups","system","siteUtils","systemConfig","deviceStateUtils","deviceFeatureUtils","deviceRadioUtils","deviceUplinkUtils"],angular.module("app-unifi-manage").controller("SystemConfigController",d)},{}],1058:[function(a,b,c){"use strict";function d(a,b,c){this.MAP_DEFAULTS=c,this.storage=new b(a,"TOPOLOGY_VIEW_SETTINGS"),this.storage.hydrate(),this.loadSettings()}d.prototype.loadSettings=function(){this.settings=this.storage.getValue(),void 0===this.storage.getValue()&&(this.settings={linkLabelsEnabled:!1,clientsVisible:!1})},d.prototype.saveSettings=function(){this.storage.setValue(this.settings)},d.prototype.toggleLinkLabels=function(){this.settings.linkLabelsEnabled=!this.settings.linkLabelsEnabled,this.saveSettings()},d.prototype.toggleClientsVisibility=function(){this.settings.clientsVisible=!this.settings.clientsVisible,this.saveSettings()},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","MAP_DEFAULTS"],angular.module("app-unifi-manage").controller("TopologyViewController",d)},{}],1059:[function(a,b,c){"use strict";function d(a){this.frame=a}d.prototype.resolve=function(){return this.frame.getLayout("trainingLoginLayout").resolve()},d.$inject=["frame"],angular.module("app-unifi-manage").controller("TrainingLoginController",d)},{}],1060:[function(a,b,c){"use strict";function d(a,b,c,d){e.call(this,a,b,c,d)}var e=a("../../base-unifi/controllers/BaseConfirmController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["$rootScope","$timeout","frame","options"],angular.module("app-unifi-manage").controller("UpdateDataRetentionDaysController",d)},{"../../base-unifi/controllers/BaseConfirmController":1658}],1061:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.collection=g.repository.collection,e.call(this,a,b,c,d,f)}var e=a("./BaseListAndFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["$state","$stateParams","account","ENV","preferences","userGroups"],angular.module("app-unifi-manage").controller("UserGroupsController",d)},{"./BaseListAndFormController":1e3}],1062:[function(a,b,c){"use strict";function d(a,b){this.frame=a,this.message=b}d.$inject=["frame","message"],d.prototype.gotoDashboard=function(){this.frame.getLayout("webrtcErrorLayout").resolve()},angular.module("app-unifi-manage").controller("WebrtcErrorController",d)},{}],1063:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i){this.$q=a,this.$timeout=b,this.$translate=c,this.$window=d,this.CloudDashboardHost=e,this.deviceId=f,this.frame=g,this.heyToasts=h,this.unifiWebRtcConnector=i,this.isGeneratingReport=!1,this.reportBrowserUrl=null,this.reportControllerUrl=null}d.$inject=["$q","$timeout","$translate","$window","CloudDashboardHost","deviceId","frame","heyToasts","unifiWebRtcConnector"],d.prototype.isReportGenerated=function(){return this.reportBrowserUrl&&this.reportControllerUrl},d.prototype.getReport=function(){this.isGeneratingReport=!0,this.getReportBrowserUrl().then(function(a){this.reportBrowserUrl=a}.bind(this)).then(function(){return this.getReportControllerUrl(this.deviceId)}.bind(this)).then(function(a){this.reportControllerUrl=a}.bind(this))["catch"](function(){this.heyToasts.pushError(this.$translate.instant("WEBRTC_FAILED_TOOLTIP_GET_REPORT_FAILED"))}.bind(this))["finally"](function(){this.isGeneratingReport=!1}.bind(this))},d.prototype.getReportBrowserUrl=function(){return this.$q.when(this.unifiWebRtcConnector.getBrowserLog()).then(function(a){return URL.createObjectURL(a)})},d.prototype.getReportControllerUrl=function(a){return this.unifiWebRtcConnector.getControllerLog(a).then(function(a){return URL.createObjectURL(new Blob([a]))})},d.prototype.gotoDashboard=function(){this.$timeout(function(){this.$window.location.href=this.CloudDashboardHost}.bind(this),0),this.frame.getLayout("webrtcFailedLayout").reject()},d.prototype.retry=function(){this.frame.getLayout("webrtcFailedLayout").resolve()},angular.module("app-unifi-manage").controller("WebrtcFailedController",d)},{}],1064:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){this._=a,this.$q=b,this.$translate=c,this.frame=e,this.heyToasts=f,this.macFilterList="",this.macFilterOverride=!1,this.patterns={macAddress:g.exact(d.MAC_ADDRESS),macAddressList:/^[\s]*(([0-9A-F]{2}[:-]){5}[0-9A-F]{2})([\s]*[\n]+[\s]*((([0-9A-F]{2}[:-]){5}[0-9A-F]{2})))*[\s]*$/i}}d.prototype.onSave=function(){var a=this.macFilterList.split("\n").map(function(a){return a.trim()}).filter(function(a){return""!==a});this.frame.getLayout("wirelessNetworkMacFilterAddBatchLayout").resolve({macFilterList:this._.uniq(a),macFilterOverride:this.macFilterOverride})},d.prototype.getShowedMacAddress=function(){var a=this.form.wlanMacFilterList.$viewValue;return a?a.split("\n"):[]},d.prototype.isMacAddressValid=function(a){return a=a.trim(),""===a||this.patterns.macAddress.test(a)},d.prototype.readCsvFile=function(a){var b=this.$q.defer();if(a&&a[0]){var c=new FileReader;c.readAsText(a[0]),c.onload=function(a){var c=a.target.result,d=c?c.split(/[\s,;]+/):[];b.resolve(d)}}return b.promise},d.prototype.onCsvImport=function(a){this.readCsvFile(a).then(function(a){if(a.length){var b=this.getShowedMacAddress();b=[].concat(b,a),this.macFilterList=b.join("\n"),this.heyToasts.pushSuccess(this.$translate.instant("SETTINGS_WLAN_FILTER_LIST_UPLOAD_CSV_UPDATE_SUCCESS",{uploaded:a.length}))}}.bind(this))},d.$inject=["_","$q","$translate","REGEX_PATTERNS","frame","heyToasts","regexUtils"],angular.module("app-unifi-manage").controller("WirelessNetworkMacFilterAddBatchController",d)},{}],1065:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.ClientFilter=a,this.CollectionView=b,this.clients=c,this.frame=d,this.macFilterList=angular.copy(e),this.macFilterClients={},this.macFilterSearch="",this.clientsCurrentPage=1,this.clientsRowsPerPage=10,this.clientsFilter=new this.ClientFilter,this.clientsFilter.searchableAttributes=["hostname","mac"],f===!0&&this.clientsFilter.setWiredFilter(!1),this.clientsFilter.setExcludedMacsFilter(this.macFilterList),this.clientsView=new this.CollectionView(this.clients.repository.collection),this.clientsView.setFilters([this.clientsFilter.getTest()]),this.clientsView.setSortBy("mac"),this.clientsView.refresh()}d.prototype.onSave=function(){var a=Object.keys(this.macFilterClients).filter(function(a){return this.macFilterClients[a]}.bind(this));this.frame.getLayout("wirelessNetworkMacFilterAddClientsLayout").resolve({macFilterList:a})},d.prototype.onMacFilterSearchChange=function(){this.clientsFilter.updateSearchQuery(this.macFilterSearch),this.clientsView.refresh()},d.prototype.onMacFilterSearchBlockEnter=function(a){var b=13===a.keyCode;b&&a.preventDefault()},d.prototype.getClientsCnt=function(){return this.clientsView.getModels()&&this.clientsView.getModels().length||0},d.prototype.getClients=function(){return this.clientsView.getModels()},d.$inject=["ClientFilter","CollectionView","clients","frame","macFilterList","wirelessClientsOnly"],angular.module("app-unifi-manage").controller("WirelessNetworkMacFilterAddClientsController",d)},{}],1066:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h,i,j){this.$state=a,this.$stateParams=b,this.$translate=c,this.heyToasts=d,this.frame=e,this.wirelessNetworkGroups=f,this.wirelessNetworks=g,this.preferences=i,this.ENV=j,this.isAdmin=h.isAdmin.bind(h),this.isRemoving={},this.wlansPerGroupMax=4,this.initView()}d.prototype.shouldRedirectToWlans=function(){return this.$stateParams.wlanGroupId||"edit"===this.$stateParams.wlanAction&&this.$stateParams.wlanId},d.prototype.initView=function(){try{if(!(this.view=this.initWlanGroupView()||this.initWlanView()))throw new Error("Missing view")}catch(a){this.errorMsg=a.message,this.shouldRedirectToWlans()?this.$state.go("manage.site.settings.wlans",{wlanGroupAction:void 0,wlanGroupId:void 0,wlanAction:void 0,wlanId:void 0}):this.$state.go(this.ENV.FATAL_STATE,{error:404})}},d.prototype.initWlanGroupView=function(){var a;if(this.$stateParams.wlanGroupAction){if("edit"===this.$stateParams.wlanGroupAction){if(this.getCurrentWlanGroup(),!this.wlanGroupId)throw new Error("Unable to edit invalid WLAN group ID");a="group:form"}else if("add"===this.$stateParams.wlanGroupAction){var b=this.wirelessNetworkGroups.repository.collection.model;this.wlanGroupModel=new b,a="group:form"}return a}},d.prototype.initWlanView=function(){var a;if(this.getCurrentWlanGroup(!0),!this.wlanGroupId)throw new Error("Missing or invalid WLAN group ID");if("edit"===this.$stateParams.wlanAction){if(this.wlanModel=this.wirelessNetworks.repository.collection.get(this.$stateParams.wlanId),!this.wlanModel)throw new Error("Missing or invalid WLAN ID");if(this.wlanModel.get("wlangroup_id")!==this.wlanGroupId)throw new Error("Mismatched WLAN group IDs");a="network:form"}else if("add"===this.$stateParams.wlanAction){var b=this.wirelessNetworks.repository.collection.model;this.wlanModel=new b,a="network:form"}else a="network:list";return a},d.prototype.isWlanGroupAtCapacity=function(){return this.wirelessNetworks.repository.collection.where({wlangroup_id:this.wlanGroupId}).length>=this.wlansPerGroupMax},d.prototype.getCurrentWlanGroup=function(a){this.$stateParams.wlanGroupId?this.wlanGroupModel=this.wirelessNetworkGroups.repository.collection.get(this.$stateParams.wlanGroupId):a?this.wlanGroupModel=this.wirelessNetworkGroups.repository.collection.getDefault():this.wlanGroupModel=void 0,this.wlanGroupId=this.wlanGroupModel?this.wlanGroupModel.id:void 0},d.prototype.getWlanGroupOptions=function(){return this.wirelessNetworkGroups.repository.collection.filter(function(a){return!a.get("attr_hidden")})},d.prototype.onWlanGroupIdChange=function(){this.wlanGroupId&&this.listWlans()},d.prototype.listWlans=function(a){this.$state.go("manage.site.settings.wlans",{wlanGroupAction:null,wlanGroupId:a||this.wlanGroupId,wlanAction:null,wlanId:null})},d.prototype.addWlanGroup=function(){this.$state.go("manage.site.settings.wlans",{wlanGroupAction:"add",wlanGroupId:null,wlanAction:null,wlanId:null})},d.prototype.editWlanGroup=function(){this.$state.go("manage.site.settings.wlans",{wlanGroupAction:"edit",wlanGroupId:this.wlanGroupId,wlanAction:null,wlanId:null})},d.prototype.removeWlanGroup=function(){var a=this.wlanGroupModel;return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_WLAN_GROUP_DELETE_CONFIRM_TITLE",{wlanGroupName:a.get("name")})}.bind(this),message:function(){return this.$translate.instant("SETTINGS_WLAN_GROUP_DELETE_CONFIRM_MESSAGE",{wlanGroupName:a.get("name")})}.bind(this),options:angular.noop}).then(function(){return this.isRemoving[a.id]=!0,a.destroy({wait:!0}).then(function(){return this.heyToasts.pushSuccess(this.$translate.instant("SETTINGS_WLAN_GROUP_DELETE_SUCCESS",{wlanGroupName:a.get("name")})),this.wlanGroupId=null,this.listWlans(),!0}.bind(this))["catch"](function(){return this.heyToasts.pushError(this.$translate.instant("SETTINGS_WLAN_GROUP_DELETE_ERROR",{wlanGroupName:a.get("name")})),!1}.bind(this))["finally"](function(){this.isRemoving[a.id]=!1}.bind(this))}.bind(this))},d.prototype.addWlan=function(){this.$state.go("manage.site.settings.wlans",{wlanGroupAction:null,wlanGroupId:this.wlanGroupId,wlanAction:"add",wlanId:null})},d.prototype.editWlan=function(a){this.$state.go("manage.site.settings.wlans",{wlanGroupAction:null,wlanGroupId:this.wlanGroupId,wlanAction:"edit",wlanId:a.id})},d.$inject=["$state","$stateParams","$translate","heyToasts","frame","wirelessNetworkGroups","wirelessNetworks","account","preferences","ENV"],angular.module("app-unifi-manage").controller("WirelessNetworksController",d)},{}],1067:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("channel",["deviceChannelUtils",function(a){return function(b){return a.getChannel(b)}}])},{}],1068:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("channelUtilization",["deviceRadioUtils",function(a){return function(b,c){var d=a.getChannelUtilization(b,c);return"undefined"==typeof d?"":d.total+"% / "+d.selfRx+"% / "+d.selfTx+"%"}}])},{}],1069:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("clientRadio",["RADIO_TYPES",function(a){return function(b){if(b.get("is_wired"))return"";var c="11"+b.get("radio_proto"),d=(a[b.get("radio").toUpperCase()]||{}).frequency;return d?c+" ("+d+")":c}}])},{}],1070:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("deviceName",["devices",function(a){return function(b){var c=a.repository.collection.get(b);return c?c.getDisplayName():b}}])},{}],1071:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("duplex",["BaseModel","$translate","$filter",function(a,b,c){return function(d){var e,f;return d instanceof a?(e=d.get("full_duplex"),f=d.get("speed")):(e=d.full_duplex,f=d.speed),b.instant(e?"DEVICE_STATE_FLAG_WIRED_FULL_DUPLEX":"DEVICE_STATE_FLAG_WIRED_HALF_DUPLEX",{speed:c("numberToString")(f)})}}])},{}],1072:[function(a,b,c){"use strict";var d=a("moment");a("moment-duration-format"),angular.module("app-unifi-manage").filter("duration",[function(){return function(a,b,c){return d.duration(a,b).format(c)}}])},{moment:238,"moment-duration-format":235}],1073:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("enabled",["$translate",function(a){return function(b){return"boolean"==typeof b||void 0===b||null===b?a.instant(b?"COMMON_LABEL_ENABLED":"COMMON_LABEL_DISABLED"):b}}])},{}],1074:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("enabledIcon",[function(){return function(a){return a?'<span class="icon ubnt-icon--check-2" />':""}}])},{}],1075:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("essid",["$translate",function(a){return function(b){return b||a.instant("AP_ESSID_HIDDEN")}}])},{}],1076:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("latency",[function(){return function(a){return a=Number(a),a<1e3?Number(a.toPrecision(3)):Math.round(a)}}])},{}],1077:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("minutesToMoment",[function(){return function(a){var b=a>=1440?1439:a,c=Math.floor(b/60),d=b-60*c;return{hour:c,minute:d}}}])},{}],1078:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("neighboringApLocation",["$translate","devices",function(a,b){return function(c,d){var e=d||{},f=b.repository.collection.get(c);return a.instant(e.isNearest?"NEIGHBORING_ACCESS_POINT_NEAREST":"NEIGHBORING_ACCESS_POINT_NEAR",{ap:f?f.getDisplayName():c})}}])},{}],1079:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("networkPurpose",["$translate","NETWORK_PURPOSE",function(a,b){return function(c){return a.instant(b[c])}}])},{}],1080:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("networkSubnet",[function(){return function(a){switch(a.get("purpose")){case"site-vpn":return"auto"===(a.get("vpn_type")||"auto")?(a.get("remote_site_subnets")||[]).join(", "):(a.get("remote_vpn_subnets")||[]).join(", ");
case"vpn-client":return(a.get("remote_vpn_subnets")||[]).join(", ");default:return a.get("ip_subnet")}}}])},{}],1081:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("networkVlan",["networks",function(a){return function(b,c){var d,e=b.get("name");if(c){var f=a.repository.collection.get(b.get(c));f&&(d=f.get("vlan"))}else d=b.get("vlan");return e+(d?" ("+d+")":"")}}])},{}],1082:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("orEmpty",[function(){return function(a){return a||0===a?a:""}}])},{}],1083:[function(a,b,c){"use strict";var d=a("pluralize");angular.module("app-unifi-manage").filter("pluralize",[function(){return function(a,b){return d(a,b)}}])},{pluralize:240}],1084:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("portForwardProtocol",["$translate",function(a){return function(b){return"tcp_udp"===b?a.instant("PORT_FORWARD_STATS_VALUE_PROTOCOL_BOTH"):b.toUpperCase()}}])},{}],1085:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("portForwardSource",["$translate",function(a){return function(b){return b&&"any"!==b?b:a.instant("PORT_FORWARD_STATS_VALUE_SOURCE_ANY")}}])},{}],1086:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("radioChannelAndPower",["$translate","deviceRadioUtils",function(a,b){return function(c,d,e){var f=c&&c.get("radio_"+d);if(!f)return"";var g;if(f.channel&&!isNaN(f.channel))g=parseInt(f.channel,10);else if(g=a.instant("COMMON_VALUE_AUTO"),e){var h=b.getChannelStateString(c,d);h&&(g+=" ("+h+")")}var i;if("custom"===f.tx_power_mode)i=f.builtin_antenna===!0?parseInt(f.tx_power,10)+parseInt(f.builtin_ant_gain,10)+" "+a.instant("DEVICE_RADIO_TRANSMIT_POWER_DBM"):parseInt(f.tx_power,10)+parseInt(f.antenna_gain,10)+" "+a.instant("DEVICE_RADIO_TRANSMIT_POWER_DBM");else if(i=f.tx_power_mode?a.instant("DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_"+f.tx_power_mode.toUpperCase()):a.instant("COMMON_VALUE_AUTO"),e){var j=b.getTransmitPower(c,d);j&&(i+=" ("+j+" "+a.instant("DEVICE_RADIO_TRANSMIT_POWER_DBM")+")")}return g+" / "+i}}])},{}],1087:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("roaming",["$translate",function(a){return function(b,c){var d=b.get("name")||a.instant("COMMON_FILTER_ROAMING_UNLABELED"),e="";return b.get("roam_enabled")&&(e=" ("+a.instant(c?"COMMON_FILTER_ROAMING_DETAILS_ABBR":"COMMON_FILTER_ROAMING_DETAILS",{radio:b.get("roam_radio"),channel:b.get("roam_channel_"+b.get("roam_radio"))})+")"),d+e}}])},{}],1088:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("rssi",[function(){return function(a){return a=parseFloat(a),a?(a=Math.min(45,Math.max(a,5)),a=(a-5)/40*99,(0===a?"0":a.toPrecision(2))+"%"):""}}])},{}],1089:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("rssiToDbm",["$translate",function(a){return function(b){if(void 0!==b&&null!==b){var c=b-95;return c+" "+a.instant("DEVICE_RADIO_TRANSMIT_POWER_DBM")}return""}}])},{}],1090:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("rxtx",["binaryPrefix",function(a){return function(b){var c=a.parse(1e3*b,"SI");return c.value||0===c.value?c.value+" "+c.prefix+"bps":""}}])},{}],1091:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("streamEncodingQuality",["$translate",function(a){var b={LOW:4,HIGH:7};return function(c){return c?c<b.LOW?a.instant("STREAM_PROPERTIES_LABEL_QUALITY_LOW"):c<b.HIGH?a.instant("STREAM_PROPERTIES_LABEL_QUALITY_MEDIUM"):c>=b.HIGH?a.instant("STREAM_PROPERTIES_LABEL_QUALITY_HIGH"):void 0:""}}])},{}],1092:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("temperature",[function(){return function(a){return a=parseInt(a,10),isNaN(a)?"":a+"℃"}}])},{}],1093:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("truncate",[function(){return function(a,b){return a&&b&&a.length>b+2?a.slice(0,b)+(a.length>=b?"...":""):a}}])},{}],1094:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("unifiCronDayName",["$translate",function(a){var b={0:"SUN",1:"MON",2:"TUE",3:"WED",4:"THU",5:"FRI",6:"SAT"};return function(c){return null!==c&&angular.isDefined(b[c])?a.instant("DATETIME_DAYS_"+b[c]):null}}])},{}],1095:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("unifiCronMonthName",["$translate",function(a){return function(b){return null!==b&&b>0&&b<=12?a.instant("DATETIME_MONTHS_"+b):null}}])},{}],1096:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("wlanGroup",["deviceWlanGroupUtils",function(a){return function(b,c){return a.getWlanGroupName(b,c)}}])},{}],1097:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("wlanOverride",["$translate",function(a){return function(b,c){var d=[],e=!1;if(b){var f=void 0!==b.get("enabled")?b.get("enabled"):c.get("enabled");if(f!==c.get("enabled")&&(d.push(a.instant(f?"DEVICE_PROPERTIES_AP_WLAN_OVERRIDES_ENABLED":"DEVICE_PROPERTIES_AP_WLAN_OVERRIDES_DISABLED")),f||(e=!0)),!e){var g=b.get("name");g&&g!==c.get("name")&&d.push(a.instant("DEVICE_PROPERTIES_AP_WLAN_OVERRIDES_SSID")+": "+g);var h=b.get("vlan_enabled");if(void 0!==h&&h!==c.get("vlan_enabled"))d.push(a.instant("DEVICE_PROPERTIES_AP_WLAN_OVERRIDES_VLAN")+": "+a.instant(h?"DEVICE_PROPERTIES_AP_WLAN_OVERRIDES_ENABLED":"DEVICE_PROPERTIES_AP_WLAN_OVERRIDES_DISABLED"));else{var i=b.get("vlan");i&&i!==c.get("vlan")&&d.push(a.instant("DEVICE_PROPERTIES_AP_WLAN_OVERRIDES_VLAN")+": "+i)}var j=b.get("x_passphrase");j&&j!==c.get("x_passphrase")&&"wpapsk"===c.get("security")&&d.push(a.instant("DEVICE_PROPERTIES_AP_WLAN_OVERRIDES_PSK"))}}return d.join(", ")}}])},{}],1098:[function(a,b,c){"use strict";angular.module("app-unifi-manage").filter("yesOrNo",["$translate",function(a){return function(b){return void 0===b||null===b?"":a.instant(b===!0?"COMMON_VALUE_YES":"COMMON_VALUE_NO")}}])},{}],1099:[function(a,b,c){"use strict";var d={};d.knownClients=a("./routeInitializers/initializeKnownClients"),d.neighboringAccessPoints=a("./routeInitializers/initializeNeighboringAccessPoints"),d.pastConnections=a("./routeInitializers/initializePastConnections"),d.pastGuestAuthorizations=a("./routeInitializers/initializePastGuestAuthorizations"),d.statisticsOverview=a("./routeInitializers/initializeStatisticsOverview"),d.statisticsSwitch=a("./routeInitializers/initializeStatisticsSwitch");var e={};e.allowSuperAdminAccess=a("./routeResolvers/resolveAllowSuperAdminAccess"),e.propertyPanel=a("./routeResolvers/resolvePropertyPanel"),e.allowAdminAccess=a("../../base-unifi/lib/routeResolvers/resolveAllowAdminAccess"),e.login=a("../../base-unifi/lib/routeResolvers/resolveLogin"),e.ssoLogin=a("../../base-unifi/lib/routeResolvers/resolveSsoLogin"),b.exports={},b.exports.account={routeDeps:["$injector","$q",function(a,b){return a.get("manageResolver").resolve().then(function(){return b.all([a.get("translateResolver").resolve("account"),a.get("status").repository.model.fetch()])})}]},b.exports.admins={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["admins"];return b.get("manageResolver").resolve().then(function(){return e.login(b).then(function(){return e.allowAdminAccess(b)})}).then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.backup={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["backup"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.clients={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["networks","clients","devices","userGroups"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("clients")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.controller={routeDeps:["$injector",function(a){return a.get("manageResolver").resolve().then(function(){return e.login(a)})}]},b.exports.dashboard={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["devices","settings","siteHealth","system"],e=["clients"];return b.get("manageResolver").resolve().then(function(){return a.fetchRepositories(e),c.all(a.fetchRepositories(d).concat(b.get("translateResolver").resolve("dashboard")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d.concat(e),onExitCallback:a.unregisterGroup,onExitArgs:d.concat(e)}})}]},b.exports.devices={routeDeps:["repositoryUtils","$injector","$q","routeDeps",function(a,b,c){var d=b.get("featureFlag"),e=["clients","devices","status","wirelessNetworkGroups","wirelessNetworks"];return d.isEnabled("enableApTagging")&&e.push("tags"),d.isEnabled("withRadiusProfilesEndpoint")&&e.push("radius"),b.get("manageResolver").resolve().then(function(){return c.all(e.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("devices"),a.getRepository("discoveredDevices").fetch()))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:e,onExitCallback:function(){a.unregisterGroup.apply(a,arguments)},onExitArgs:e}})}]},b.exports.dpi={routeDeps:["$injector","$q","repositoryUtils",function(a,b,c){var d=["dpiApps","dpiGroups","networks","wirelessNetworks"];return a.get("manageResolver").resolve().then(function(){return b.all(d.map(function(a){return c.getRepository(a).fetch()}).concat(a.get("translateResolver").resolve("languages")))}).then(function(){return{onEnterCallback:c.registerGroup,onEnterArgs:d,onExitCallback:c.unregisterGroup,onExitArgs:d}})}]},b.exports.dynamicDns={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["dynamicDnsStats"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("dynamicDns")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.fatal={routeDeps:["$injector",function(a){return a.get("translateResolver").resolve("fatal")}]},b.exports.firewall={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["devices","firewallGroups","firewallRules","networks"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("firewall")))}).then(function(){return b.get("devices").repository.fetchGatewayDetails().then(function(){return b.get("firewallRules").repository.fetch()})}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.guestControl={routeDeps:["$injector","$q","repositoryUtils",function(a,b,c){var d=["countries","hotspotPackages"];return a.get("manageResolver").resolve().then(function(){return b.all(d.map(function(a){return c.getRepository(a).fetch()}).concat(a.get("translateResolver").resolve("languages")))}).then(function(){return{onEnterCallback:c.registerGroup,onEnterArgs:d,onExitCallback:c.unregisterGroup,onExitArgs:d}})}]},b.exports.home={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["sites"];return b.get("manageResolver").resolve().then(function(){return e.login(b).then(function(){return b.get("wsRegisterMessageHandlers").resolve()}).then(function(){return b.get("wsResolver").resolve()}).then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("overview")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})})}]},b.exports.hotspot2={routeDeps:["$injector","$q","repositoryUtils",function(a,b,c){var d=["hotspot2"];return a.get("manageResolver").resolve().then(function(){return b.all(d.map(function(a){return c.getRepository(a).fetch()}).concat(a.get("translateResolver").resolve("languages")))}).then(function(){return{onEnterCallback:c.registerGroup,onEnterArgs:d,onExitCallback:c.unregisterGroup,onExitArgs:d}})}]},b.exports.insights={routeDeps:["$injector",function(a){return a.get("translateResolver").resolve("insights")}]},b.exports.knownClients={routeDeps:["repositoryUtils","$injector","$stateParams","$q",function(a,b,c,e){var f=["clients","knownClients"];return b.get("manageResolver").resolve().then(function(){return d.knownClients(b,c)}).then(function(){return e.all(f.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("knownClients")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:f,onExitCallback:a.unregisterGroup,onExitArgs:f}})}]},b.exports.maintenance={routeDeps:["$injector",function(a){return a.get("manageResolver").resolve().then(function(){return e.login(a).then(function(){return e.allowSuperAdminAccess(a)})})}]},b.exports.manage={routeDeps:["$injector",function(a){return a.get("translateResolver").resolve("common")}]},b.exports.maps={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["devices"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("maps")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.physicalMaps={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["maps"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.topology={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["clients"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.neighboringAccessPoints={routeDeps:["repositoryUtils","$injector","$stateParams","$q",function(a,b,c,e){var f=["devices","neighboringAccessPoints"];return b.get("manageResolver").resolve().then(function(){return d.neighboringAccessPoints(b,c)}).then(function(){return e.all(f.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("neighboringAccessPoints")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:f,onExitCallback:a.unregisterGroup,onExitArgs:f}})}]},b.exports.networks={routeDeps:["repositoryUtils","$injector","$q","routeDeps",function(a,b,c){var d=b.get("featureFlag"),e=["networks"];return d.isEnabled("withRadiusProfilesEndpoint")&&e.push("radius"),b.get("manageResolver").resolve().then(function(){return c.all(e.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:e,onExitCallback:a.unregisterGroup,onExitArgs:e}})}]},b.exports.pastConnections={routeDeps:["repositoryUtils","$injector","$stateParams","$q",function(a,b,c,e){var f=["clients","devices","knownClients","pastConnections"];return b.get("manageResolver").resolve().then(function(){return d.pastConnections(b,c)}).then(function(){return e.all(f.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("pastConnections")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:f,onExitCallback:a.unregisterGroup,onExitArgs:f}})}]},b.exports.pastGuestAuthorizations={routeDeps:["repositoryUtils","$injector","$stateParams","$q",function(a,b,c,e){var f=["clients","devices","pastGuestAuthorizations"];return b.get("manageResolver").resolve().then(function(){return d.pastGuestAuthorizations(b,c)}).then(function(){return e.all(f.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("pastGuestAuthorizations")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:f,onExitCallback:a.unregisterGroup,onExitArgs:f}})}]},b.exports.portForwardStats={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["portForwards","portForwardStats"];return b.get("manageResolver").resolve().then(function(){return c.all([b.get("portForwards").repository.fetch(),b.get("translateResolver").resolve("portForwardStats")])}).then(function(){return b.get("portForwardStats").repository.fetch()}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.profiles={routeDeps:["$injector","$q","repositoryUtils",function(a,b,c){var d=["radius"];return a.get("manageResolver").resolve().then(function(){return b.all(d.map(function(a){return c.getRepository(a).fetch()}))}).then(function(){return{onEnterCallback:c.registerGroup,onEnterArgs:d,onExitCallback:c.unregisterGroup,onExitArgs:d}})}]},b.exports.radiusUsers={routeDeps:["$injector","$q","repositoryUtils",function(a,b,c){var d=["networks","radiusUsers"];return a.get("manageResolver").resolve().then(function(){return b.all(d.map(function(a){return c.getRepository(a).fetch()}))}).then(function(){return{onEnterCallback:c.registerGroup,onEnterArgs:d,onExitCallback:c.unregisterGroup,onExitArgs:d}})}]},b.exports.remoteUserVpn={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["remoteUserVpn"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("remoteUserVpn")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.routing={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["networks","routing"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("routing")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.routingStats={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["routingStats"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("routing")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.settings={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["countries","countryChannels","sdn","settings","sites","system"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("overview","settings","dpiRestrictions")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.site={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=[{service:"alerts",repository:"unread"},"countryChannels","devices","settings","sites","system"];return b.get("manageResolver").resolve().then(function(){return e.login(b).then(function(){return b.get("wsRegisterMessageHandlers").resolve()}).then(function(){return b.get("wsResolver").resolve()}).then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("overview","alerts","events","eventStrings")))}).then(function(){return e.propertyPanel(b)}).then(function(){return b.get("dataRetentionUpdate").resolve()}).then(function(){return b.get("cloudKeySdCardCheck").resolve()}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})})}]},b.exports.ssoLogin={routeDeps:["account","$state","$stateParams","site","translateResolver","ENV",function(a,b,c,d,f,g){return e.ssoLogin(a,b,c,d,f,g)}]},b.exports.statistics={routeDeps:["repositoryUtils","$injector","$q","routeDeps",function(a,b,c){var d=["system"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("statistics","dpiOverview","dpiApps","dpiUsers","dpiApplicationStatistics")))}).then(function(){var a=b.get("featureFlag"),c=b.get("STATS_DEFAULTS");a.isEnabled("enableSwitchStatistics")||(c.STATES=c.STATES.splice(0,2))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.statisticsDpi={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["dpiStats","wlanDpi"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.statisticsSwitch={routeDeps:["repositoryUtils","$injector","$stateParams","$q",function(a,b,c,e){var f=["devices"],g=["switchReports"];return b.get("manageResolver").resolve().then(function(){return e.all(f.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return d.statisticsSwitch(b,c)?(f=f.concat(g),e.all(g.map(function(b){return a.getRepository(b).refresh()}))):e.when()}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:f,onExitCallback:a.unregisterGroup,onExitArgs:f}})}]},b.exports.statisticsOverview={routeDeps:["repositoryUtils","$injector","$stateParams","$q",function(a,b,c,e){var f=["clients","devices",{service:"activityReports",repository:"ap"},{service:"activityReports",repository:"user"},{service:"activityReports",repository:"site"}];return b.get("manageResolver").resolve().then(function(){return d.statisticsOverview(b,c)}).then(function(){return e.all(f.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:f,onExitCallback:a.unregisterGroup,onExitArgs:f}})}]},b.exports.streams={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["devices","streams"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("streams")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.switchStats={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["devices","switches","switchStats"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}).concat(b.get("translateResolver").resolve("switchStats")))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.userGroups={routeDeps:["repositoryUtils","$injector","$q",function(a,b,c){var d=["userGroups"];return b.get("manageResolver").resolve().then(function(){return c.all(d.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:d,onExitCallback:a.unregisterGroup,onExitArgs:d}})}]},b.exports.wirelessNetworks={routeDeps:["repositoryUtils","$injector","$q","routeDeps",function(a,b,c){var d=b.get("featureFlag"),e=["countryChannels","devices","clients","userGroups","wirelessNetworkGroups","wirelessNetworks"];return d.isEnabled("enableHotspot2")&&e.push("hotspot2"),d.isEnabled("withRadiusProfilesEndpoint")&&e.push("radius"),b.get("manageResolver").resolve().then(function(){return c.all(e.map(function(b){return a.getRepository(b).fetch()}))}).then(function(){return{onEnterCallback:a.registerGroup,onEnterArgs:e,onExitCallback:a.unregisterGroup,onExitArgs:e}})}]},b.exports.initializers=d,b.exports.resolvers=e},{"../../base-unifi/lib/routeResolvers/resolveAllowAdminAccess":1682,"../../base-unifi/lib/routeResolvers/resolveLogin":1683,"../../base-unifi/lib/routeResolvers/resolveSsoLogin":1684,"./routeInitializers/initializeKnownClients":1100,"./routeInitializers/initializeNeighboringAccessPoints":1101,"./routeInitializers/initializePastConnections":1102,"./routeInitializers/initializePastGuestAuthorizations":1103,"./routeInitializers/initializeStatisticsOverview":1104,"./routeInitializers/initializeStatisticsSwitch":1105,"./routeResolvers/resolveAllowSuperAdminAccess":1106,"./routeResolvers/resolvePropertyPanel":1107}],1100:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.get("knownClients"),d=a.get("$q");return c.updateWithin(parseInt(b.within)),d.when()}},{}],1101:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.get("neighboringAccessPoints"),d=a.get("$q");return c.updateWithin(parseInt(b.within)),d.when()}},{}],1102:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.get("_"),d=a.get("dateIntervalUtils"),e=a.get("pastConnections"),f=a.get("INSIGHTS_DEFAULTS"),g=a.get("$q"),h=c.find(f.INTERVAL,function(a){return a.name===b.interval});if(h){var i=b.start,j=d.calculateEnd(i,h);e.setInterval(h),e.updateDateInterval(i,j)}return g.when()}},{}],1103:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.get("_"),d=a.get("dateIntervalUtils"),e=a.get("pastGuestAuthorizations"),f=a.get("INSIGHTS_DEFAULTS"),g=a.get("$q"),h=c.find(f.INTERVAL,function(a){return a.name===b.interval});if(h){var i=b.start,j=d.calculateEnd(i,h);e.setInterval(h),e.updateDateInterval(i,j)}return g.when()}},{}],1104:[function(a,b,c){"use strict";var d=a("moment");b.exports=function(a,b){var c=a.get("activityReports"),e=a.get("dateIntervalUtils"),f=a.get("TIME_INTERVALS"),g=a.get("$q"),h=a.get("_"),i=a.get("localStorageFailSafe"),j=a.get("LocalStorageValue"),k=new j(i,"STATISTICS_OVERVIEW_LAST_INTERVAL");k.hydrate(),b.interval=b.interval||k.getValue();var l=h.find(f,function(a){return a.name===b.interval})||f.DAILY;k.setValue(l.name);var m=b.start||d().startOf("day").format("x");m=e.preventFuture(m,l),b.start=m;var n=e.calculateEnd(m,l);return c.setInterval(l),c.setDateInterval(m,n),g.when()}},{moment:238}],1105:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.get("_"),d=a.get("dateIntervalUtils"),e=a.get("devices"),f=a.get("switchReports"),g=a.get("switchUtils"),h=a.get("TIME_INTERVALS"),i=c.find(h,function(a){return a.name===b.interval})||h.DAILY;f.setInterval(i);var j=b.start,k=d.calculateEnd(j,i);f.setDateInterval(j,k);var l,m=g.getAdoptedSwitches();return b.switchId?(l=e.repository.collection.get(b.switchId),m.indexOf(l)!==-1&&f.setSwitch(l)):l=m.length?m[0]:void 0,f.setSwitch(l),!!l}},{}],1106:[function(a,b,c){"use strict";b.exports=function(a){var b=a.get("$q"),c=a.get("account"),d=a.get("$state"),e=a.get("ENV");return c.isSuperAdmin()?b.when():void d.go(e.FATAL_STATE,{error:403})}},{}],1107:[function(a,b,c){"use strict";b.exports=function(a){var b=a.get("$q"),c=a.get("$rootScope"),d=a.get("propertyPanel"),e=c.$on("$stateChangeSuccess",function(){e(),d.initFromQueryString()});return b.when()}},{}],1108:[function(a,b,c){"use strict";a("../base-unifi-device/main"),a("../base-unifi-maintenance/main"),a("../base-unifi-overview/main"),a("../shared-unifi-manage/main"),a("../shared-unifi-map/main"),a("../shared-unifi-panel/main"),angular.module("app-unifi-manage",["angular-cron-jobs","base-unifi","base-unifi-device","base-unifi-maintenance","base-unifi-overview","atlas","event","gridster","ng-dpi","ng-sortable","ng-terminal","ng-timezone","ng-unifi-charts","ng-unifi-health-graph","ng-unifi-health-stats","ng-unifi-heatmap","ng-unifi-zopim","number-validator","onLastRepeat","pikaday","rzModule","shared-unifi-manage","shared-unifi-map","shared-unifi-panel","tinycolor","unifi-models"]),a("./components/accordionGroupState/accordionGroupState.js"),a("./components/adminForm/AdminFormController.js"),a("./components/adminForm/adminForm.js"),a("./components/adminList/AdminListController.js"),a("./components/adminList/adminList.js"),a("./components/alertList/AlertListController.js"),a("./components/alertList/alertList.js"),a("./components/alertsSideNav/AlertsSideNavController.js"),a("./components/alertsSideNav/alertsSideNav.js"),a("./components/apProperties/ApPropertiesController.js"),a("./components/apProperties/apProperties.js"),a("./components/apPropertiesBatch/ApPropertiesBatchController.js"),a("./components/apPropertiesBatch/apPropertiesBatch.js"),a("./components/apPropertiesBatchConfigure/apPropertiesBatchConfigure.js"),a("./components/apPropertiesBatchList/ApPropertiesBatchListController.js"),a("./components/apPropertiesBatchList/apPropertiesBatchList.js"),a("./components/apPropertiesBatchWarnings/ApPropertiesBatchWarningsController.js"),a("./components/apPropertiesBatchWarnings/apPropertiesBatchWarnings.js"),a("./components/apPropertiesConfigure/apPropertiesConfigure.js"),a("./components/apPropertiesConfigureAirtimeFairness/ApPropertiesConfigureAirtimeFairnessController.js"),a("./components/apPropertiesConfigureAirtimeFairness/apPropertiesConfigureAirtimeFairness.js"),a("./components/apPropertiesConfigureBandSteering/ApPropertiesConfigureBandSteeringController.js"),a("./components/apPropertiesConfigureBandSteering/apPropertiesConfigureBandSteering.js"),a("./components/apPropertiesConfigureRadios/ApPropertiesConfigureRadiosController.js"),a("./components/apPropertiesConfigureRadios/apPropertiesConfigureRadios.js"),a("./components/apPropertiesConfigureWlanForm/ApPropertiesConfigureWlanFormController.js"),a("./components/apPropertiesConfigureWlanForm/apPropertiesConfigureWlanForm.js"),a("./components/apPropertiesConfigureWlanList/ApPropertiesConfigureWlanListController.js"),a("./components/apPropertiesConfigureWlanList/apPropertiesConfigureWlanList.js"),a("./components/apPropertiesConfigureWlans/ApPropertiesConfigureWlansController.js"),a("./components/apPropertiesConfigureWlans/apPropertiesConfigureWlans.js"),a("./components/apPropertiesCopyConfiguration/ApPropertiesCopyConfigurationController.js"),a("./components/apPropertiesCopyConfiguration/apPropertiesCopyConfiguration.js"),a("./components/apPropertiesDetails/apPropertiesDetails.js"),a("./components/apPropertiesDetailsRadio/ApPropertiesDetailsRadioController.js"),a("./components/apPropertiesDetailsRadio/apPropertiesDetailsRadio.js"),a("./components/apPropertiesDownlinkList/ApPropertiesDownlinkListController.js"),a("./components/apPropertiesDownlinkList/apPropertiesDownlinkList.js"),a("./components/apPropertiesRfEnvironment/ApPropertiesRfEnvironmentController.js"),a("./components/apPropertiesRfEnvironment/apPropertiesRfEnvironment.js"),a("./components/apPropertiesUplinkList/ApPropertiesUplinkListController.js"),a("./components/apPropertiesUplinkList/apPropertiesUplinkList.js"),a("./components/apSwitchProperties/ApSwitchPropertiesController.js"),a("./components/apSwitchProperties/apSwitchProperties.js"),a("./components/apSwitchPropertiesConfigure/apSwitchPropertiesConfigure.js"),a("./components/apSwitchPropertiesConfigureResetButton/ApSwitchPropertiesConfigureResetButtonController.js"),a("./components/apSwitchPropertiesConfigureResetButton/apSwitchPropertiesConfigureResetButton.js"),a("./components/apSwitchPropertiesConfigureServices/ApSwitchPropertiesConfigureServicesController.js"),a("./components/apSwitchPropertiesConfigureServices/apSwitchPropertiesConfigureServices.js"),a("./components/apSwitchPropertiesDetails/apSwitchPropertiesDetails.js"),a("./components/atlasCoverage/AtlasCoverageController.js"),a("./components/atlasCoverage/atlasCoverage.js"),a("./components/atlasMarkerMousedown/atlasMarkerMousedown.js"),
a("./components/atlasMarkerMouseup/atlasMarkerMouseup.js"),a("./components/autocomplete/AutocompleteController.js"),a("./components/autocomplete/autocomplete.js"),a("./components/batchDeviceIcon/batchDeviceIcon.js"),a("./components/binaryInput/binaryInput.js"),a("./components/chatSideNav/ChatSideNavController.js"),a("./components/chatSideNav/chatSideNav.js"),a("./components/clientActivityStatus/clientActivityStatus.js"),a("./components/clientButtonAuthorize/ClientButtonAuthorizeController.js"),a("./components/clientButtonAuthorize/clientButtonAuthorize.js"),a("./components/clientButtonBlock/ClientButtonBlockController.js"),a("./components/clientButtonBlock/clientButtonBlock.js"),a("./components/clientButtonReconnect/ClientButtonReconnectController.js"),a("./components/clientButtonReconnect/clientButtonReconnect.js"),a("./components/clientIcon/ClientIconController.js"),a("./components/clientIcon/clientIcon.js"),a("./components/clientList/ClientListController.js"),a("./components/clientList/clientList.js"),a("./components/clientProperties/ClientPropertiesController.js"),a("./components/clientProperties/clientProperties.js"),a("./components/clientPropertiesConfigure/clientPropertiesConfigure.js"),a("./components/clientPropertiesConfigureGeneral/ClientPropertiesConfigureGeneralController.js"),a("./components/clientPropertiesConfigureGeneral/clientPropertiesConfigureGeneral.js"),a("./components/clientPropertiesConfigureNetwork/ClientPropertiesConfigureNetworkController.js"),a("./components/clientPropertiesConfigureNetwork/clientPropertiesConfigureNetwork.js"),a("./components/clientPropertiesDetails/clientPropertiesDetails.js"),a("./components/clientPropertiesDpiList/ClientPropertiesDpiListController.js"),a("./components/clientPropertiesDpiList/clientPropertiesDpiList.js"),a("./components/clientPropertiesHistoryList/ClientPropertiesHistoryListController.js"),a("./components/clientPropertiesHistoryList/clientPropertiesHistoryList.js"),a("./components/collectionButtonDropdown/CollectionButtonDropdownController.js"),a("./components/collectionButtonDropdown/collectionButtonDropdown.js"),a("./components/collectionViewRow/collectionViewRow.js"),a("./components/colorPicker/colorPicker.js"),a("./components/colorToolHsvSpace/colorToolHsvSpace.js"),a("./components/colorToolHueSpace/colorToolHueSpace.js"),a("./components/colorToolSvSpace/colorToolSvSpace.js"),a("./components/configChanged/configChanged.js"),a("./components/customPortalPreview/customPortalPreview.js"),a("./components/dashboard/dashboard.js"),a("./components/dashboardWidget/DashboardWidgetController.js"),a("./components/dashboardWidget/dashboardWidget.js"),a("./components/deviceList/DeviceListController.js"),a("./components/deviceList/deviceList.js"),a("./components/deviceMarker/DeviceMarkerController.js"),a("./components/deviceMarker/deviceMarker.js"),a("./components/deviceMarkerLabel/DeviceMarkerLabelController.js"),a("./components/deviceMarkerLabel/deviceMarkerLabel.js"),a("./components/deviceMarkerMenu/DeviceMarkerMenuController.js"),a("./components/deviceMarkerMenu/deviceMarkerMenu.js"),a("./components/devicePropertiesAdopt/DevicePropertiesAdoptController.js"),a("./components/devicePropertiesAdopt/devicePropertiesAdopt.js"),a("./components/devicePropertiesBatchError/devicePropertiesBatchError.js"),a("./components/devicePropertiesClientList/DevicePropertiesClientListController.js"),a("./components/devicePropertiesClientList/devicePropertiesClientList.js"),a("./components/devicePropertiesConfigureCustomUpgrade/DevicePropertiesConfigureCustomUpgradeController.js"),a("./components/devicePropertiesConfigureCustomUpgrade/devicePropertiesConfigureCustomUpgrade.js"),a("./components/devicePropertiesConfigureDebugTerminal/DevicePropertiesConfigureDebugTerminalController.js"),a("./components/devicePropertiesConfigureDebugTerminal/devicePropertiesConfigureDebugTerminal.js"),a("./components/devicePropertiesConfigureDisable/DevicePropertiesConfigureDisableController.js"),a("./components/devicePropertiesConfigureDisable/devicePropertiesConfigureDisable.js"),a("./components/devicePropertiesConfigureForget/DevicePropertiesConfigureForgetController.js"),a("./components/devicePropertiesConfigureForget/devicePropertiesConfigureForget.js"),a("./components/devicePropertiesConfigureGeneral/DevicePropertiesConfigureGeneralController.js"),a("./components/devicePropertiesConfigureGeneral/devicePropertiesConfigureGeneral.js"),a("./components/devicePropertiesConfigureNetwork/DevicePropertiesConfigureNetworkController.js"),a("./components/devicePropertiesConfigureNetwork/devicePropertiesConfigureNetwork.js"),a("./components/devicePropertiesConfigureWarnings/DevicePropertiesConfigureWarningsValidator.js"),a("./components/devicePropertiesConfigureWarnings/devicePropertiesConfigureWarnings.js"),a("./components/devicePropertiesLicenseWarning/DevicePropertiesLicenseWarningController.js"),a("./components/devicePropertiesLicenseWarning/devicePropertiesLicenseWarning.js"),a("./components/devicePropertiesTags/DevicePropertiesTagsController.js"),a("./components/devicePropertiesTags/devicePropertiesTags.js"),a("./components/deviceSearchWithTagsDropdownList/DeviceSearchWithTagsDropdownListController.js"),a("./components/deviceSearchWithTagsDropdownList/deviceSearchWithTagsDropdownList.js"),a("./components/deviceSelectList/DeviceSelectListController.js"),a("./components/deviceSelectList/deviceSelectList.js"),a("./components/dpiApplicationStatistics/DpiApplicationStatisticsController.js"),a("./components/dpiApplicationStatistics/dpiApplicationStatistics.js"),a("./components/dpiApplicationUsageGraph/DpiApplicationUsageGraphController.js"),a("./components/dpiApplicationUsageGraph/dpiApplicationUsageGraph.js"),a("./components/dpiApps/DpiAppsController.js"),a("./components/dpiApps/dpiApps.js"),a("./components/dpiCategoryStatistics/DpiCategoryStatisticsController.js"),a("./components/dpiCategoryStatistics/dpiCategoryStatistics.js"),a("./components/dpiCategoryUsageGraph/DpiCategoryUsageGraphController.js"),a("./components/dpiCategoryUsageGraph/dpiCategoryUsageGraph.js"),a("./components/dpiDrillDown/DpiDrillDownController.js"),a("./components/dpiDrillDown/dpiDrillDown.js"),a("./components/dpiOverview/DpiOverviewController.js"),a("./components/dpiOverview/dpiOverview.js"),a("./components/dpiRestrictionAssignments/DpiRestrictionAssignmentsController.js"),a("./components/dpiRestrictionAssignments/dpiRestrictionAssignments.js"),a("./components/dpiRestrictionGroup/DpiRestrictionGroupController.js"),a("./components/dpiRestrictionGroup/dpiRestrictionGroup.js"),a("./components/dpiRestrictionNetworkAssignmentsList/DpiRestrictionNetworkAssignmentsListController.js"),a("./components/dpiRestrictionNetworkAssignmentsList/dpiRestrictionNetworkAssignmentsList.js"),a("./components/dpiRestrictionWirelessNetworkAssignmentsList/DpiRestrictionWirelessNetworkAssignmentsListController.js"),a("./components/dpiRestrictionWirelessNetworkAssignmentsList/dpiRestrictionWirelessNetworkAssignmentsList.js"),a("./components/dpiRestrictionsList/DpiRestrictionsListController.js"),a("./components/dpiRestrictionsList/dpiRestrictionsList.js"),a("./components/dpiSelector/DpiSelectorController.js"),a("./components/dpiSelector/dpiSelector.js"),a("./components/dpiUsers/DpiUsersController.js"),a("./components/dpiUsers/dpiUsers.js"),a("./components/dynamicDashboard/DynamicDashboardController.js"),a("./components/dynamicDashboard/dynamicDashboard.js"),a("./components/dynamicDnsList/DynamicDnsListController.js"),a("./components/dynamicDnsList/dynamicDnsList.js"),a("./components/eventIcon/eventIcon.js"),a("./components/eventList/EventListController.js"),a("./components/eventList/eventList.js"),a("./components/eventMessage/EventMessageController.js"),a("./components/eventMessage/eventMessage.js"),a("./components/eventMessageItem/eventMessageItem.js"),a("./components/eventsSideNav/EventsSideNavController.js"),a("./components/eventsSideNav/eventsSideNav.js"),a("./components/firewallGroupsForm/FirewallGroupsFormController.js"),a("./components/firewallGroupsForm/firewallGroupsForm.js"),a("./components/firewallGroupsList/FirewallGroupsListController.js"),a("./components/firewallGroupsList/firewallGroupsList.js"),a("./components/firewallRulesForm/FirewallRulesFormController.js"),a("./components/firewallRulesForm/firewallRulesForm.js"),a("./components/firewallRulesList/FirewallRulesListController.js"),a("./components/firewallRulesList/firewallRulesList.js"),a("./components/formGroupWarnings/FormGroupWarningsController.js"),a("./components/formGroupWarnings/formGroupWarnings.js"),a("./components/formGroupWarnings/formGroupWarningsInput.js"),a("./components/gatewayDiagram/GatewayDiagramController.js"),a("./components/gatewayDiagram/gatewayDiagram.js"),a("./components/gatewayDiagramKeys/gatewayDiagramKeys.js"),a("./components/gatewayProperties/GatewayPropertiesController.js"),a("./components/gatewayProperties/gatewayProperties.js"),a("./components/gatewayPropertiesConfigure/gatewayPropertiesConfigure.js"),a("./components/gatewayPropertiesConfigureWan/GatewayPropertiesConfigureWanController.js"),a("./components/gatewayPropertiesConfigureWan/gatewayPropertiesConfigureWan.js"),a("./components/gatewayPropertiesDetails/gatewayPropertiesDetails.js"),a("./components/gatewayPropertiesDynamicDnsForm/GatewayPropertiesDynamicDnsFormController.js"),a("./components/gatewayPropertiesDynamicDnsForm/gatewayPropertiesDynamicDnsForm.js"),a("./components/gatewayPropertiesDynamicDnsList/GatewayPropertiesDynamicDnsListController.js"),a("./components/gatewayPropertiesDynamicDnsList/gatewayPropertiesDynamicDnsList.js"),a("./components/gatewayPropertiesNetworkList/GatewayPropertiesNetworkListController.js"),a("./components/gatewayPropertiesNetworkList/gatewayPropertiesNetworkList.js"),a("./components/gatewayPropertiesPortForwardForm/GatewayPropertiesPortForwardFormController.js"),a("./components/gatewayPropertiesPortForwardForm/gatewayPropertiesPortForwardForm.js"),a("./components/gatewayPropertiesPortForwardList/GatewayPropertiesPortForwardListController.js"),a("./components/gatewayPropertiesPortForwardList/gatewayPropertiesPortForwardList.js"),a("./components/globalSideNav/globalSideNav.js"),a("./components/googleImageMapRuler/GoogleImageMapRulerController.js"),a("./components/googleImageMapRuler/googleImageMapRuler.js"),a("./components/gridsterItemOnResize/gridsterItemOnResize.js"),a("./components/health/HealthController.js"),a("./components/health/health.js"),a("./components/hexColorInput/hexColorInput.js"),a("./components/highlightedTextarea/highlightedTextarea.js"),a("./components/hotspot2Form/Hotspot2FormController.js"),a("./components/hotspot2Form/hotspot2Form.js"),a("./components/hotspot2List/Hotspot2ListController.js"),a("./components/hotspot2List/hotspot2List.js"),a("./components/hotspot2SectionCellularNetwork/Hotspot2SectionCellularNetworkController.js"),a("./components/hotspot2SectionCellularNetwork/hotspot2SectionCellularNetwork.js"),a("./components/hotspot2SectionDomainName/Hotspot2SectionDomainNameController.js"),a("./components/hotspot2SectionDomainName/hotspot2SectionDomainName.js"),a("./components/hotspot2SectionInterworking/Hotspot2SectionInterworkingController.js"),a("./components/hotspot2SectionInterworking/hotspot2SectionInterworking.js"),a("./components/hotspot2SectionInterworkingVenueName/Hotspot2SectionInterworkingVenueNameController.js"),a("./components/hotspot2SectionInterworkingVenueName/hotspot2SectionInterworkingVenueName.js"),a("./components/hotspot2SectionNaiRealm/Hotspot2SectionNaiRealmController.js"),a("./components/hotspot2SectionNaiRealm/hotspot2SectionNaiRealm.js"),a("./components/hotspot2SectionRoamingConsortium/Hotspot2SectionRoamingConsortiumController.js"),a("./components/hotspot2SectionRoamingConsortium/hotspot2SectionRoamingConsortium.js"),a("./components/hotspotOverridesUpgrade/HotspotOverridesUpgradeController.js"),a("./components/hotspotOverridesUpgrade/hotspotOverridesUpgrade.js"),a("./components/ifAdvanceFeatures/ifAdvancedFeatures.js"),a("./components/iframePostMessage/iframePostMessage.js"),a("./components/imageMap/imageMap.js"),a("./components/imageMapRuler/ImageMapRulerController.js"),a("./components/imageMapRuler/imageMapRuler.js"),a("./components/inventoryClientsGraph/InventoryClientsGraphController.js"),a("./components/inventoryClientsGraph/inventoryClientsGraph.js"),a("./components/inventoryDevicesGraph/InventoryDevicesGraphController.js"),a("./components/inventoryDevicesGraph/inventoryDevicesGraph.js"),a("./components/inventoryDpiGraph/InventoryDpiGraphController.js"),a("./components/inventoryDpiGraph/inventoryDpiGraph.js"),a("./components/knownClientList/KnownClientListController.js"),a("./components/knownClientList/knownClientList.js"),a("./components/legacyRadiusAcctServerFormGroup/legacyRadiusAcctServerFormGroup.js"),a("./components/legacyRadiusAuthServerFormGroup/legacyRadiusAuthServerFormGroup.js"),a("./components/linkUsage/linkUsage.js"),a("./components/macAddress/macAddress.js"),a("./components/mapActionBar/MapActionBarController.js"),a("./components/mapActionBar/mapActionBar.js"),a("./components/mapEditPanel/MapEditPanelController.js"),a("./components/mapEditPanel/mapEditPanel.js"),a("./components/mapGoogle/MapGoogleController.js"),a("./components/mapGoogle/mapGoogle.js"),a("./components/mapGoogleClearSearch/MapGoogleClearSearchController.js"),a("./components/mapGoogleClearSearch/mapGoogleClearSearch.js"),a("./components/mapMenu/MapMenuController.js"),a("./components/mapMenu/mapMenu.js"),a("./components/mapTypeSwitcher/mapTypeSwitcher.js"),a("./components/neighboringAccessPointList/NeighboringAccessPointListController.js"),a("./components/neighboringAccessPointList/neighboringAccessPointList.js"),a("./components/networkFormDetailsNetwork/NetworkFormDetailsNetworkController.js"),a("./components/networkFormDetailsNetwork/networkFormDetailsNetwork.js"),a("./components/networkFormInputPurpose/NetworkFormInputPurposeController.js"),a("./components/networkFormInputPurpose/networkFormInputPurpose.js"),a("./components/networkFormInputRemoteSubnets/NetworkFormInputRemoteSubnetsController.js"),a("./components/networkFormInputRemoteSubnets/networkFormInputRemoteSubnets.js"),a("./components/networkFormLan/NetworkFormLanController.js"),a("./components/networkFormLan/networkFormLan.js"),a("./components/networkFormRemoteUserVpn/NetworkFormRemoteUserVpnController.js"),a("./components/networkFormRemoteUserVpn/networkFormRemoteUserVpn.js"),a("./components/networkFormSiteVpn/NetworkFormSiteVpnController.js"),a("./components/networkFormSiteVpn/networkFormSiteVpn.js"),a("./components/networkFormVlanOnly/NetworkFormVlanOnlyController.js"),a("./components/networkFormVlanOnly/networkFormVlanOnly.js"),a("./components/networkFormVpnClient/NetworkFormVpnClientController.js"),a("./components/networkFormVpnClient/networkFormVpnClient.js"),a("./components/networkList/NetworkListController.js"),a("./components/networkList/networkList.js"),a("./components/notifyDeviceRequirement/NotifyDeviceRequirementController.js"),a("./components/notifyDeviceRequirement/notifyDeviceRequirement.js"),a("./components/occupancy/OccupancyController.js"),a("./components/occupancy/occupancy.js"),a("./components/occupancyGraph/OccupancyGraphController.js"),a("./components/occupancyGraph/occupancyGraph.js"),a("./components/pastConnectionList/PastConnectionListController.js"),a("./components/pastConnectionList/pastConnectionList.js"),a("./components/pastGuestAuthorizationList/PastGuestAuthorizationListController.js"),a("./components/pastGuestAuthorizationList/pastGuestAuthorizationList.js"),a("./components/pendingChangesIcon/pendingChangesIcon.js"),a("./components/pendingChangesList/pendingChangesList.js"),a("./components/pendingDeviceChanges/PendingDeviceChangesController.js"),a("./components/pendingDeviceChanges/pendingDeviceChanges.js"),a("./components/phoneProperties/PhonePropertiesController.js"),a("./components/phoneProperties/phoneProperties.js"),a("./components/phonePropertiesConfigure/phonePropertiesConfigure.js"),a("./components/phonePropertiesDetails/phonePropertiesDetails.js"),a("./components/portForwardStatsList/PortForwardStatsListController.js"),a("./components/portForwardStatsList/portForwardStatsList.js"),a("./components/powerSaveIcon/powerSaveIcon.js"),a("./components/propertyPanel/PropertyPanelController.js"),a("./components/propertyPanel/propertyPanel.js"),a("./components/radiusAcctServerFormGroup/radiusAcctServerFormGroup.js"),a("./components/radiusAuthServerFormGroup/radiusAuthServerFormGroup.js"),a("./components/radiusProfileForm/RadiusProfileFormController.js"),a("./components/radiusProfileForm/radiusProfileForm.js"),a("./components/radiusProfilesList/RadiusProfilesListController.js"),a("./components/radiusProfilesList/radiusProfilesList.js"),a("./components/radiusSelector/RadiusSelectorController.js"),a("./components/radiusSelector/radiusSelector.js"),a("./components/radiusUserForm/RadiusUserFormController.js"),a("./components/radiusUserForm/radiusUserForm.js"),a("./components/radiusUsersList/RadiusUsersListController.js"),a("./components/radiusUsersList/radiusUsersList.js"),a("./components/remoteUserVpnList/RemoteUserVpnListController.js"),a("./components/remoteUserVpnList/remoteUserVpnList.js"),a("./components/repeatableForm/RepeatableFormController.js"),a("./components/repeatableForm/repeatableForm.js"),a("./components/repeatableInput/RepeatableInputController.js"),a("./components/repeatableInput/repeatableInput.js"),a("./components/rfEnvironmentChart/RfEnvironmentChartController.js"),a("./components/rfEnvironmentChart/rfEnvironmentChart.js"),a("./components/rfEnvironmentLegend/RfEnvironmentLegendController.js"),a("./components/rfEnvironmentLegend/rfEnvironmentLegend.js"),a("./components/rfEnvironmentRssiHistogram/RfEnvironmentRssiHistogramController.js"),a("./components/rfEnvironmentRssiHistogram/rfEnvironmentRssiHistogram.js"),a("./components/rfEnvironmentTooltip/rfEnvironmentTooltip.js"),a("./components/routingForm/RoutingFormController.js"),a("./components/routingForm/routingForm.js"),a("./components/routingList/RoutingListController.js"),a("./components/routingList/routingList.js"),a("./components/routingStatsList/RoutingStatsListController.js"),a("./components/routingStatsList/routingStatsList.js"),a("./components/screenshotDownload/ScreenshotDownloadController.js"),a("./components/screenshotDownload/screenshotDownload.js"),a("./components/sdnStatus/SdnStatusController.js"),a("./components/sdnStatus/sdnStatus.js"),a("./components/selectDeviceDropdownList/SelectDeviceDropdownListController.js"),a("./components/selectDeviceDropdownList/selectDeviceDropdownList.js"),a("./components/selectSimpleDropdownList/SelectSimpleDropdownListController.js"),a("./components/selectSimpleDropdownList/selectSimpleDropdownList.js"),a("./components/settingsNav/SettingsNavController.js"),a("./components/settingsNav/settingsNav.js"),a("./components/settingsSecurityGatewayIsRequired/SettingsSecurityGatewayIsRequiredController.js"),a("./components/settingsSecurityGatewayIsRequired/settingsSecurityGatewayIsRequired.js"),a("./components/settingsSideNav/settingsSideNav.js"),a("./components/settingsSubMenuRadius/SettingsSubMenuRadiusController.js"),a("./components/settingsSubMenuRadius/settingsSubMenuRadius.js"),a("./components/settingsSubMenuRoutingAndFirewall/SettingsSubMenuRoutingAndFirewallController.js"),a("./components/settingsSubMenuRoutingAndFirewall/settingsSubMenuRoutingAndFirewall.js"),a("./components/settingsTabsHeader/settingsTabsHeader.js"),a("./components/speedTestDashboard/speedTestDashboard.js"),a("./components/speedTestDonutChart/SpeedTestDonutChartController.js"),a("./components/speedTestDonutChart/speedTestDonutChart.js"),a("./components/speedTestLineChart/SpeedTestLineChartController.js"),a("./components/speedTestLineChart/speedTestLineChart.js"),a("./components/speedTestResult/speedTestResult.js"),a("./components/stateSwitcher/StateSwitcherController.js"),a("./components/stateSwitcher/stateSwitcher.js"),a("./components/statsClientsPerEssid/StatsClientsPerEssidController.js"),a("./components/statsClientsPerEssid/statsClientsPerEssid.js"),a("./components/statsCurrentUsage/StatsCurrentUsageController.js"),a("./components/statsCurrentUsage/statsCurrentUsage.js"),a("./components/statsQuickLook/StatsQuickLookController.js"),a("./components/statsQuickLook/statsQuickLook.js"),a("./components/statsRecentActivities/StatsRecentActivitiesController.js"),a("./components/statsRecentActivities/statsRecentActivities.js"),a("./components/stopEvent/stopEvent.js"),a("./components/streamIcon/StreamIconController.js"),a("./components/streamIcon/streamIcon.js"),a("./components/streamProperties/StreamPropertiesController.js"),a("./components/streamProperties/streamProperties.js"),a("./components/streamPropertiesDetails/streamPropertiesDetails.js"),a("./components/streamPropertiesDeviceList/StreamPropertiesDeviceListController.js"),a("./components/streamPropertiesDeviceList/streamPropertiesDeviceList.js"),a("./components/streamsList/StreamsListController.js"),a("./components/streamsList/streamsList.js"),a("./components/stringToIntegerInput/stringToIntegerInput.js"),a("./components/svgMap/BaseSvgMapController.js"),a("./components/svgMap/MeasurableSvgMapController.js"),a("./components/svgMap/SvgMapController.js"),a("./components/svgMap/svgMap.js"),a("./components/switchDiagram/switchDiagram.js"),a("./components/switchDiagramKeys/switchDiagramKeys.js"),a("./components/switchPortButtonClearCounters/SwitchPortButtonClearCountersController.js"),a("./components/switchPortButtonClearCounters/switchPortButtonClearCounters.js"),a("./components/switchPortButtonPowerCycle/SwitchPortButtonPowerCycleController.js"),a("./components/switchPortButtonPowerCycle/switchPortButtonPowerCycle.js"),a("./components/switchPortDiagram/switchPortDiagram.js"),a("./components/switchPortTooltip/SwitchPortTooltipController.js"),a("./components/switchPortTooltip/switchPortTooltip.js"),a("./components/switchPortUsage/SwitchPortUsageController.js"),a("./components/switchPortUsage/switchPortUsage.js"),a("./components/switchProperties/SwitchPropertiesController.js"),a("./components/switchProperties/switchProperties.js"),a("./components/switchPropertiesConfigure/switchPropertiesConfigure.js"),a("./components/switchPropertiesConfigureServices/SwitchPropertiesConfigureServicesController.js"),a("./components/switchPropertiesConfigureServices/switchPropertiesConfigureServices.js"),a("./components/switchPropertiesCopyConfiguration/SwitchPropertiesCopyConfigurationController.js"),a("./components/switchPropertiesCopyConfiguration/switchPropertiesCopyConfiguration.js"),a("./components/switchPropertiesDetails/switchPropertiesDetails.js"),a("./components/switchPropertiesDownlinkList/SwitchPropertiesDownlinkListController.js"),a("./components/switchPropertiesDownlinkList/switchPropertiesDownlinkList.js"),a("./components/switchPropertiesNetworksVlansForm/SwitchPropertiesNetworksVlansFormController.js"),a("./components/switchPropertiesNetworksVlansForm/switchPropertiesNetworksVlansForm.js"),a("./components/switchPropertiesNetworksVlansList/SwitchPropertiesNetworksVlansListController.js"),a("./components/switchPropertiesNetworksVlansList/switchPropertiesNetworksVlansList.js"),a("./components/switchPropertiesPortForm/SwitchPropertiesPortFormController.js"),a("./components/switchPropertiesPortForm/switchPropertiesPortForm.js"),a("./components/switchPropertiesPortList/SwitchPropertiesPortListController.js"),a("./components/switchPropertiesPortList/switchPropertiesPortList.js"),a("./components/switchStatsList/SwitchStatsListController.js"),a("./components/switchStatsList/switchStatsList.js"),a("./components/systemConfigSite/SystemConfigSiteController.js"),a("./components/systemConfigSite/systemConfigSite.js"),a("./components/terminalAdapter/terminalAdapter.js"),a("./components/terminalPanel/TerminalPanelController.js"),a("./components/terminalPanel/terminalPanel.js"),a("./components/terminalStatus/TerminalStatusController.js"),a("./components/terminalStatus/terminalStatus.js"),a("./components/throughput/ThroughputController.js"),a("./components/throughput/throughput.js"),a("./components/topology/TopologyController.js"),a("./components/topology/topology.js"),a("./components/topologyChart/TopologyChartController.js"),a("./components/topologyChart/topologyChart.js"),a("./components/topologyGraph/TopologyGraphController.js"),a("./components/topologyGraph/topologyGraph.js"),a("./components/topologyLink/topologyLink.js"),a("./components/trainingButton/TrainingButtonController.js"),a("./components/trainingButton/trainingButton.js"),a("./components/truthyCheckbox/truthyCheckbox.js"),a("./components/txRateStatus/TxRateStatusController.js"),a("./components/txRateStatus/txRateStatus.js"),a("./components/unreadAlerts/unreadAlerts.js"),a("./components/upgradingWhiteoutNotice/upgradingWhiteoutNotice.js"),a("./components/uploadGuestPortalImage/uploadGuestPortalImage.js"),a("./components/userGroupForm/UserGroupFormController.js"),a("./components/userGroupForm/userGroupForm.js"),a("./components/userGroupList/UserGroupListController.js"),a("./components/userGroupList/userGroupList.js"),a("./components/validateIpInSubnet/validateIpInSubnet.js"),a("./components/validateIpRange/validateIpRange.js"),a("./components/validateNetmask/validateNetmask.js"),a("./components/validatePatterns/validatePatterns.js"),a("./components/validatePortRange/validatePortRange.js"),a("./components/windowPanels/WindowPanelsController.js"),a("./components/windowPanels/windowPanels.js"),a("./components/wirelessNetworkForm/WirelessNetworkFormController.js"),a("./components/wirelessNetworkForm/wirelessNetworkForm.js"),a("./components/wirelessNetworkGroupForm/WirelessNetworkGroupFormController.js"),a("./components/wirelessNetworkGroupForm/wirelessNetworkGroupForm.js"),a("./components/wirelessNetworkList/WirelessNetworkListController.js"),a("./components/wirelessNetworkList/wirelessNetworkList.js"),a("./components/wirelessNetworkMacAddressFilterList/WirelessNetworkMacAddressFilterListController.js"),a("./components/wirelessNetworkMacAddressFilterList/wirelessNetworkMacAddressFilterList.js"),a("./components/wirelessNetworkMinrateSlider/WirelessNetworkMinrateSliderController.js"),a("./components/wirelessNetworkMinrateSlider/wirelessNetworkMinrateSlider.js"),a("./components/wirelessNetworkSchedule/wirelessNetworkSchedule.js"),a("./components/wirelessNetworkScheduleDay/wirelessNetworkScheduleDay.js"),a("./components/yesOrNoBadge/yesOrNoBadge.js"),a("./config/atlas.js"),a("./config/flags.js"),a("./config/frames.js"),a("./config/panel.js"),a("./config/routes.js"),a("./config/sce.js"),a("./config/sideNavPopover.js"),a("./config/states.js"),a("./constants/ALERTS_DEFAULTS.js"),a("./constants/CHAT_DEPARTMENTS.js"),a("./constants/CHAT_LEVELS.js"),a("./constants/CLIENT_FETCH_DEFAULTS.js"),a("./constants/DASHBOARD_WIDGETS.js"),a("./constants/DEFAULT_WLAN_SCHEDULE.js"),a("./constants/EASTER_EGGS.js"),a("./constants/ELEMENTS.js"),a("./constants/ENV.js"),a("./constants/EVENTS_DEFAULTS.js"),a("./constants/EVENT_KEYS.js"),a("./constants/HOTSPOT2_AUTH_IDS.js"),a("./constants/HOTSPOT2_AUTH_VALUES.js"),a("./constants/HOTSPOT2_EAP_METHODS.js"),a("./constants/HOTSPOT2_NETWORK_TYPES.js"),a("./constants/HOTSPOT2_VENUE_GROUPS.js"),a("./constants/HOTSPOT2_VENUE_TYPES.js"),a("./constants/HOTSPOT_LANGUAGES.js"),a("./constants/HOTSPOT_PAYMENT_FIELDS_DEFAULTS.js"),a("./constants/HOTSPOT_PORTAL_CUSTOMIZED_DEFAULTS.js"),a("./constants/HOTSPOT_PORTAL_CUSTOMIZED_LANGUAGES_DEFAULTS.js"),a("./constants/HOTSPOT_PORTAL_OVERRIDE_TEMPLATE_HELP.js"),a("./constants/INSIGHTS_DEFAULTS.js"),a("./constants/KNOWN_CLIENT_FIELDS.js"),a("./constants/MAP_DEFAULTS.js"),a("./constants/MAP_FEATURES.js"),a("./constants/MAP_TYPES.js"),a("./constants/MAP_UNITS.js"),a("./constants/NETWORK_PURPOSE.js"),a("./constants/OCCUPANCY_GRAPH.js"),a("./constants/OUI.js"),a("./constants/RADIUS_VLAN_OPTIONS.js"),a("./constants/RF_ENVIRONMENT_CHART_OPTIONS.js"),a("./constants/RF_ENVIRONMENT_INTERFERENCE_INTERVAL.js"),a("./constants/RF_ENVIRONMENT_SETTINGS.js"),a("./constants/SPANNING_TREE_PRIORITIES.js"),a("./constants/SPEED_TEST_SETTINGS.js"),a("./constants/SPEED_TEST_STATUSES.js"),a("./constants/STATS_DEFAULTS.js"),a("./constants/TERMINAL_EVENTS.js"),a("./constants/TERMS_OF_SERVICE_DEFAULT.js"),a("./constants/TOPOLOGY_LINKS.js"),a("./constants/UBNT_CLIENT_TYPES.js"),a("./constants/URLS.js"),a("./constants/WALKME.js"),a("./constants/WLAN_MINRATE_SETTINGS.js"),a("./controllers/AccountVerifyController.js"),a("./controllers/AddSiteController.js"),a("./controllers/AdminsController.js"),a("./controllers/AlertsController.js"),a("./controllers/AlertsLinkController.js"),a("./controllers/BackupSettingsController.js"),a("./controllers/BaseChartController.js"),a("./controllers/BaseClientListController.js"),a("./controllers/BaseConfigureNetworkController.js"),a("./controllers/BaseConfigureServicesController.js"),a("./controllers/BaseDropdownListController.js"),a("./controllers/BaseListAndFormController.js"),a("./controllers/BasePropertiesController.js"),a("./controllers/BaseRepeatableController.js"),a("./controllers/BaseSettingsController.js"),a("./controllers/ClientsController.js"),a("./controllers/CloudAccessSettingsController.js"),a("./controllers/CloudKeySdCardCheckController.js"),a("./controllers/ConfigureDpiCategoryGraphController.js"),a("./controllers/ConfigureMapsController.js"),a("./controllers/ConfirmUpgradeOverridesController.js"),a("./controllers/ControllerSettingsController.js"),a("./controllers/DashboardController.js"),a("./controllers/DevicesController.js"),a("./controllers/DpiBaseUsersController.js"),a("./controllers/DpiController.js"),a("./controllers/DpiRestrictionController.js"),a("./controllers/DpiRestrictionNetworkAssignmentFrameController.js"),a("./controllers/DpiSettingsController.js"),a("./controllers/EditMapController.js"),a("./controllers/EditTextFieldController.js"),a("./controllers/EventsController.js"),a("./controllers/EventsLinkController.js"),a("./controllers/ExportSiteController.js"),a("./controllers/FirewallController.js"),a("./controllers/FirewallGroupsController.js"),a("./controllers/FirewallGroupsCreateController.js"),a("./controllers/FirewallRulesController.js"),a("./controllers/GuestControlSettingsController.js"),a("./controllers/HomeController.js"),a("./controllers/Hotspot2Controller.js"),a("./controllers/Hotspot2NaiRealmListEntryController.js"),a("./controllers/HotspotPackageController.js"),a("./controllers/ImportSiteController.js"),a("./controllers/InsightsController.js"),a("./controllers/LoginController.js"),a("./controllers/MaintenanceSettingsController.js"),a("./controllers/ManageController.js"),a("./controllers/MapController.js"),a("./controllers/NetworksController.js"),a("./controllers/PreferencesController.js"),a("./controllers/ProfilesController.js"),a("./controllers/RadiusProfileController.js"),a("./controllers/RadiusRepeatableFormController.js"),a("./controllers/RadiusServerController.js"),a("./controllers/RadiusUsersController.js"),a("./controllers/RoutingController.js"),a("./controllers/SdnUserController.js"),a("./controllers/SettingsController.js"),a("./controllers/SimpleTextEditorController.js"),a("./controllers/SiteController.js"),a("./controllers/SiteSettingsController.js"),a("./controllers/SitesOverviewController.js"),a("./controllers/SpeedTestController.js"),a("./controllers/StatisticsController.js"),a("./controllers/StatisticsDpiFiltersController.js"),a("./controllers/StatisticsOverviewController.js"),a("./controllers/StatisticsSwitchController.js"),a("./controllers/SystemConfigController.js"),a("./controllers/TopologyViewController.js"),a("./controllers/TrainingLoginController.js"),a("./controllers/UpdateDataRetentionDaysController.js"),a("./controllers/UserGroupsController.js"),a("./controllers/WebrtcErrorController.js"),a("./controllers/WebrtcFailedController.js"),a("./controllers/WirelessNetworkMacFilterAddBatchController.js"),
a("./controllers/WirelessNetworkMacFilterAddClientsController.js"),a("./controllers/WirelessNetworksController.js"),a("./filters/channel.js"),a("./filters/channelUtilization.js"),a("./filters/clientRadio.js"),a("./filters/deviceName.js"),a("./filters/duplex.js"),a("./filters/duration.js"),a("./filters/enabled.js"),a("./filters/enabledIcon.js"),a("./filters/essid.js"),a("./filters/latency.js"),a("./filters/minutesToMoment.js"),a("./filters/neighboringApLocation.js"),a("./filters/networkPurpose.js"),a("./filters/networkSubnet.js"),a("./filters/networkVlan.js"),a("./filters/orEmpty.js"),a("./filters/pluralize.js"),a("./filters/portForwardProtocol.js"),a("./filters/portForwardSource.js"),a("./filters/radioChannelAndPower.js"),a("./filters/roaming.js"),a("./filters/rssi.js"),a("./filters/rssiToDbm.js"),a("./filters/rxtx.js"),a("./filters/streamEncodingQuality.js"),a("./filters/temperature.js"),a("./filters/truncate.js"),a("./filters/unifiCronDayName.js"),a("./filters/unifiCronMonthName.js"),a("./filters/wlanGroup.js"),a("./filters/wlanOverride.js"),a("./filters/yesOrNo.js"),a("./lib/resolve.js"),a("./lib/routeInitializers/initializeKnownClients.js"),a("./lib/routeInitializers/initializeNeighboringAccessPoints.js"),a("./lib/routeInitializers/initializePastConnections.js"),a("./lib/routeInitializers/initializePastGuestAuthorizations.js"),a("./lib/routeInitializers/initializeStatisticsOverview.js"),a("./lib/routeInitializers/initializeStatisticsSwitch.js"),a("./lib/routeResolvers/resolveAllowSuperAdminAccess.js"),a("./lib/routeResolvers/resolvePropertyPanel.js"),a("./run/clientSync.js"),a("./run/deviceSync.js"),a("./run/templateCache.js"),a("./services/activityReports.js"),a("./services/admins.js"),a("./services/alertFrameUtils.js"),a("./services/alertUtils.js"),a("./services/alerts.js"),a("./services/arrayUtils.js"),a("./services/atlasCoverageCalculator.js"),a("./services/builderFactories/SimpleFormDirective.js"),a("./services/clientListColumnStore.js"),a("./services/clientStateUtils.js"),a("./services/clientUplinkUtils.js"),a("./services/clientUtils.js"),a("./services/clients.js"),a("./services/cloudKeySdCardCheck.js"),a("./services/collections/AdminCollection.js"),a("./services/collections/AlertCollection.js"),a("./services/collections/ClientCollection.js"),a("./services/collections/ClientHistoryCollection.js"),a("./services/collections/DashboardStatsCollection.js"),a("./services/collections/DpiAppCollection.js"),a("./services/collections/DpiGroupCollection.js"),a("./services/collections/DynamicDnsCollection.js"),a("./services/collections/DynamicDnsStatsCollection.js"),a("./services/collections/EventCollection.js"),a("./services/collections/FirewallGroupCollection.js"),a("./services/collections/FirewallRuleCollection.js"),a("./services/collections/Hotspot2Collection.js"),a("./services/collections/KnownClientCacheCollection.js"),a("./services/collections/KnownClientCollection.js"),a("./services/collections/MapCollection.js"),a("./services/collections/NeighboringAccessPointCollection.js"),a("./services/collections/NetworkCollection.js"),a("./services/collections/PastConnectionCollection.js"),a("./services/collections/PastGuestAuthorizationCollection.js"),a("./services/collections/PortForwardCollection.js"),a("./services/collections/PortForwardStatsCollection.js"),a("./services/collections/RadiusProfileCollection.js"),a("./services/collections/RadiusUserCollection.js"),a("./services/collections/RemoteUserVpnCollection.js"),a("./services/collections/RoutingCollection.js"),a("./services/collections/RoutingStatsCollection.js"),a("./services/collections/StreamCollection.js"),a("./services/collections/StreamDeviceCollection.js"),a("./services/collections/SwitchPortCollection.js"),a("./services/collections/SwitchStatsPortCollection.js"),a("./services/collections/TagCollection.js"),a("./services/collections/UserGroupCollection.js"),a("./services/collections/WlanDpiCollection.js"),a("./services/comparators/alertsComparator.js"),a("./services/comparators/clientsComparator.js"),a("./services/comparators/eventsComparator.js"),a("./services/comparators/knownClientsComparator.js"),a("./services/comparators/manageDevicesComparator.js"),a("./services/comparators/neighboringAccessPointsComparator.js"),a("./services/comparators/pastConnectionsComparator.js"),a("./services/comparators/portForwardStatsComparator.js"),a("./services/comparators/streamDevicesComparator.js"),a("./services/comparators/switchStatsComparator.js"),a("./services/comparators/wirelessNetworksComparator.js"),a("./services/controllerMixins/devicePropertiesPortsControllerMixin.js"),a("./services/controllerMixins/listBatchEditControllerMixin.js"),a("./services/customPortalPreview.js"),a("./services/d3ChannelTrapezoidPoints.js"),a("./services/d3RfEnvironmentInterferenceScale.js"),a("./services/d3RfEnvironmentRssiInterferenceScale.js"),a("./services/dashboardStats.js"),a("./services/dataConverter.js"),a("./services/dataRetentionUpdate.js"),a("./services/deviceBatchUtils.js"),a("./services/deviceCoverageCalculator.js"),a("./services/deviceListColumnStore.js"),a("./services/deviceUplinkUtils.js"),a("./services/deviceWsMessageHandler.js"),a("./services/devices.js"),a("./services/directiveMixins/devicePropertiesActiveAccordionDirectiveMixin.js"),a("./services/directiveMixins/devicePropertiesConfigureBatchDirectiveMixin.js"),a("./services/directiveMixins/devicePropertiesConfigureWithPendingDirectiveMixin.js"),a("./services/directiveMixins/devicePropertiesPendingActionsDirectiveMixin.js"),a("./services/directiveMixins/devicePropertiesPortsDirectiveMixin.js"),a("./services/directiveMixins/gatewayPropertiesDynamicDnsListDirectiveMixin.js"),a("./services/directiveMixins/gatewayPropertiesPortForwardListDirectiveMixin.js"),a("./services/directiveMixins/listBatchEditDirectiveMixin.js"),a("./services/directiveMixins/sharedAttrsDirectiveMixin.js"),a("./services/dpiApps.js"),a("./services/dpiFilters.js"),a("./services/dpiGroups.js"),a("./services/dpiStats.js"),a("./services/dpiUtils.js"),a("./services/dynamicDns.js"),a("./services/dynamicDnsListColumnStore.js"),a("./services/dynamicDnsStats.js"),a("./services/eventFilterUtils.js"),a("./services/eventFrameUtils.js"),a("./services/events.js"),a("./services/eventsWsMessageHandler.js"),a("./services/factories/SettingsModelFactory.js"),a("./services/filters/AlertFilter.js"),a("./services/filters/BaseClientFilter.js"),a("./services/filters/ClientFilter.js"),a("./services/filters/DeviceFilter.js"),a("./services/filters/DynamicDnsFilter.js"),a("./services/filters/EventFilter.js"),a("./services/filters/FirewallRulesetFilter.js"),a("./services/filters/KnownClientFilter.js"),a("./services/filters/MapFilter.js"),a("./services/filters/NeighboringAccessPointFilter.js"),a("./services/filters/PastConnectionFilter.js"),a("./services/filters/PastGuestAuthorizationFilter.js"),a("./services/filters/PortForwardStatsFilter.js"),a("./services/filters/RemoteUserVpnFilter.js"),a("./services/filters/RoutingStatsFilter.js"),a("./services/filters/SimpleModelFilter.js"),a("./services/filters/StreamDeviceFilter.js"),a("./services/filters/SwitchStatsFilter.js"),a("./services/firewallGroups.js"),a("./services/firewallRules.js"),a("./services/firewallUtils.js"),a("./services/formUtils.js"),a("./services/gatewayUtils.js"),a("./services/gateways.js"),a("./services/geometryUtils.js"),a("./services/guestPortalImage.js"),a("./services/health.js"),a("./services/hotspot2.js"),a("./services/hotspotOverrides.js"),a("./services/imageMapUtils.js"),a("./services/imageUrlUtils.js"),a("./services/knownClients.js"),a("./services/knownClientsCache.js"),a("./services/mapCoordinatesAssistant.js"),a("./services/mapDevices.js"),a("./services/mapFeatures.js"),a("./services/mapUtils.js"),a("./services/maps.js"),a("./services/maps/EmptyMapType.js"),a("./services/maps/ImageOverlay.js"),a("./services/models/AdminModel.js"),a("./services/models/AlertModel.js"),a("./services/models/BaseClientModel.js"),a("./services/models/BatchDeviceModel.js"),a("./services/models/ClientHistoryModel.js"),a("./services/models/ClientMgrModel.js"),a("./services/models/ClientModel.js"),a("./services/models/ConfigMgrModel.js"),a("./services/models/DpiAppModel.js"),a("./services/models/DpiGroupModel.js"),a("./services/models/DynamicDnsModel.js"),a("./services/models/DynamicDnsStatsModel.js"),a("./services/models/EventMgrModel.js"),a("./services/models/EventModel.js"),a("./services/models/FirewallGroupModel.js"),a("./services/models/FirewallRuleModel.js"),a("./services/models/GuestPortalImageModel.js"),a("./services/models/Hotspot2Model.js"),a("./services/models/HotspotOverridesModel.js"),a("./services/models/KnownClientModel.js"),a("./services/models/MapEditorModel.js"),a("./services/models/MapModel.js"),a("./services/models/NeighboringAccessPointModel.js"),a("./services/models/NetworkModel.js"),a("./services/models/PastConnectionModel.js"),a("./services/models/PastGuestAuthorizationModel.js"),a("./services/models/PortForwardModel.js"),a("./services/models/PortForwardStatsModel.js"),a("./services/models/RadiusProfileModel.js"),a("./services/models/RadiusUserModel.js"),a("./services/models/RemoteUserVpnModel.js"),a("./services/models/RoutingModel.js"),a("./services/models/RoutingStatsModel.js"),a("./services/models/SettingsGuestAccessModel.js"),a("./services/models/StatisticsMgrModel.js"),a("./services/models/StreamDeviceModel.js"),a("./services/models/StreamMgrModel.js"),a("./services/models/StreamModel.js"),a("./services/models/SwitchPortModel.js"),a("./services/models/SwitchStatsPortModel.js"),a("./services/models/TagModel.js"),a("./services/models/TerminalAdapterModel.js"),a("./services/models/UnreadAlertsModel.js"),a("./services/models/UserGroupModel.js"),a("./services/models/VerifyMgrModel.js"),a("./services/neighboringAccessPoints.js"),a("./services/networkUtils.js"),a("./services/networks.js"),a("./services/objectUtils.js"),a("./services/occupancy.js"),a("./services/ouiIcons.js"),a("./services/pastConnections.js"),a("./services/pastGuestAuthorizations.js"),a("./services/portForwardStats.js"),a("./services/portForwardStatsListColumnStore.js"),a("./services/portForwards.js"),a("./services/postMessage.js"),a("./services/propertyPanel.js"),a("./services/radius.js"),a("./services/radiusUsers.js"),a("./services/regexUtils.js"),a("./services/reload.js"),a("./services/remoteUserVpn.js"),a("./services/remoteUserVpnListColumnStore.js"),a("./services/remoteUserVpnUtils.js"),a("./services/resolvers/manageResolver.js"),a("./services/resolvers/turnCredentialsResolver.js"),a("./services/resolvers/wsRegisterMessageHandlers.js"),a("./services/resolvers/wsResolver.js"),a("./services/rfEnvironment.js"),a("./services/rfEnvironmentChart.js"),a("./services/routing.js"),a("./services/routingStats.js"),a("./services/scheduleConverter.js"),a("./services/selectedDpiApplications.js"),a("./services/selectedDpiCategories.js"),a("./services/settings.js"),a("./services/speedTest.js"),a("./services/statistics.js"),a("./services/streams.js"),a("./services/streamsListColumnStore.js"),a("./services/switchReports.js"),a("./services/switchStats.js"),a("./services/switchStatsListColumnStore.js"),a("./services/switchUtils.js"),a("./services/switches.js"),a("./services/systemConfig.js"),a("./services/tags.js"),a("./services/topologyUtils.js"),a("./services/treeUtils.js"),a("./services/txRateStatus.js"),a("./services/userGroups.js"),a("./services/walkme.js"),a("./services/widgets.js"),a("./services/windowPanels.js"),a("./services/wlanDpi.js"),a("./values/APP_EVENTS.js")},{"../base-unifi-device/main":1479,"../base-unifi-maintenance/main":1520,"../base-unifi-overview/main":1529,"../shared-unifi-manage/main":1826,"../shared-unifi-map/main":1833,"../shared-unifi-panel/main":1837,"./components/accordionGroupState/accordionGroupState.js":243,"./components/adminForm/AdminFormController.js":244,"./components/adminForm/adminForm.js":246,"./components/adminList/AdminListController.js":247,"./components/adminList/adminList.js":249,"./components/alertList/AlertListController.js":250,"./components/alertList/alertList.js":252,"./components/alertsSideNav/AlertsSideNavController.js":253,"./components/alertsSideNav/alertsSideNav.js":255,"./components/apProperties/ApPropertiesController.js":256,"./components/apProperties/apProperties.js":258,"./components/apPropertiesBatch/ApPropertiesBatchController.js":259,"./components/apPropertiesBatch/apPropertiesBatch.js":261,"./components/apPropertiesBatchConfigure/apPropertiesBatchConfigure.js":263,"./components/apPropertiesBatchList/ApPropertiesBatchListController.js":264,"./components/apPropertiesBatchList/apPropertiesBatchList.js":266,"./components/apPropertiesBatchWarnings/ApPropertiesBatchWarningsController.js":267,"./components/apPropertiesBatchWarnings/apPropertiesBatchWarnings.js":269,"./components/apPropertiesConfigure/apPropertiesConfigure.js":271,"./components/apPropertiesConfigureAirtimeFairness/ApPropertiesConfigureAirtimeFairnessController.js":272,"./components/apPropertiesConfigureAirtimeFairness/apPropertiesConfigureAirtimeFairness.js":274,"./components/apPropertiesConfigureBandSteering/ApPropertiesConfigureBandSteeringController.js":275,"./components/apPropertiesConfigureBandSteering/apPropertiesConfigureBandSteering.js":277,"./components/apPropertiesConfigureRadios/ApPropertiesConfigureRadiosController.js":278,"./components/apPropertiesConfigureRadios/apPropertiesConfigureRadios.js":280,"./components/apPropertiesConfigureWlanForm/ApPropertiesConfigureWlanFormController.js":281,"./components/apPropertiesConfigureWlanForm/apPropertiesConfigureWlanForm.js":283,"./components/apPropertiesConfigureWlanList/ApPropertiesConfigureWlanListController.js":284,"./components/apPropertiesConfigureWlanList/apPropertiesConfigureWlanList.js":286,"./components/apPropertiesConfigureWlans/ApPropertiesConfigureWlansController.js":287,"./components/apPropertiesConfigureWlans/apPropertiesConfigureWlans.js":289,"./components/apPropertiesCopyConfiguration/ApPropertiesCopyConfigurationController.js":290,"./components/apPropertiesCopyConfiguration/apPropertiesCopyConfiguration.js":292,"./components/apPropertiesDetails/apPropertiesDetails.js":294,"./components/apPropertiesDetailsRadio/ApPropertiesDetailsRadioController.js":295,"./components/apPropertiesDetailsRadio/apPropertiesDetailsRadio.js":297,"./components/apPropertiesDownlinkList/ApPropertiesDownlinkListController.js":298,"./components/apPropertiesDownlinkList/apPropertiesDownlinkList.js":300,"./components/apPropertiesRfEnvironment/ApPropertiesRfEnvironmentController.js":301,"./components/apPropertiesRfEnvironment/apPropertiesRfEnvironment.js":303,"./components/apPropertiesUplinkList/ApPropertiesUplinkListController.js":304,"./components/apPropertiesUplinkList/apPropertiesUplinkList.js":306,"./components/apSwitchProperties/ApSwitchPropertiesController.js":307,"./components/apSwitchProperties/apSwitchProperties.js":309,"./components/apSwitchPropertiesConfigure/apSwitchPropertiesConfigure.js":311,"./components/apSwitchPropertiesConfigureResetButton/ApSwitchPropertiesConfigureResetButtonController.js":312,"./components/apSwitchPropertiesConfigureResetButton/apSwitchPropertiesConfigureResetButton.js":314,"./components/apSwitchPropertiesConfigureServices/ApSwitchPropertiesConfigureServicesController.js":315,"./components/apSwitchPropertiesConfigureServices/apSwitchPropertiesConfigureServices.js":317,"./components/apSwitchPropertiesDetails/apSwitchPropertiesDetails.js":319,"./components/atlasCoverage/AtlasCoverageController.js":320,"./components/atlasCoverage/atlasCoverage.js":321,"./components/atlasMarkerMousedown/atlasMarkerMousedown.js":322,"./components/atlasMarkerMouseup/atlasMarkerMouseup.js":323,"./components/autocomplete/AutocompleteController.js":324,"./components/autocomplete/autocomplete.js":326,"./components/batchDeviceIcon/batchDeviceIcon.js":328,"./components/binaryInput/binaryInput.js":330,"./components/chatSideNav/ChatSideNavController.js":331,"./components/chatSideNav/chatSideNav.js":333,"./components/clientActivityStatus/clientActivityStatus.js":335,"./components/clientButtonAuthorize/ClientButtonAuthorizeController.js":336,"./components/clientButtonAuthorize/clientButtonAuthorize.js":338,"./components/clientButtonBlock/ClientButtonBlockController.js":339,"./components/clientButtonBlock/clientButtonBlock.js":341,"./components/clientButtonReconnect/ClientButtonReconnectController.js":342,"./components/clientButtonReconnect/clientButtonReconnect.js":344,"./components/clientIcon/ClientIconController.js":345,"./components/clientIcon/clientIcon.js":347,"./components/clientList/ClientListController.js":348,"./components/clientList/clientList.js":350,"./components/clientProperties/ClientPropertiesController.js":351,"./components/clientProperties/clientProperties.js":353,"./components/clientPropertiesConfigure/clientPropertiesConfigure.js":355,"./components/clientPropertiesConfigureGeneral/ClientPropertiesConfigureGeneralController.js":356,"./components/clientPropertiesConfigureGeneral/clientPropertiesConfigureGeneral.js":358,"./components/clientPropertiesConfigureNetwork/ClientPropertiesConfigureNetworkController.js":359,"./components/clientPropertiesConfigureNetwork/clientPropertiesConfigureNetwork.js":361,"./components/clientPropertiesDetails/clientPropertiesDetails.js":363,"./components/clientPropertiesDpiList/ClientPropertiesDpiListController.js":364,"./components/clientPropertiesDpiList/clientPropertiesDpiList.js":366,"./components/clientPropertiesHistoryList/ClientPropertiesHistoryListController.js":367,"./components/clientPropertiesHistoryList/clientPropertiesHistoryList.js":369,"./components/collectionButtonDropdown/CollectionButtonDropdownController.js":370,"./components/collectionButtonDropdown/collectionButtonDropdown.js":372,"./components/collectionViewRow/collectionViewRow.js":373,"./components/colorPicker/colorPicker.js":375,"./components/colorToolHsvSpace/colorToolHsvSpace.js":377,"./components/colorToolHueSpace/colorToolHueSpace.js":379,"./components/colorToolSvSpace/colorToolSvSpace.js":381,"./components/configChanged/configChanged.js":383,"./components/customPortalPreview/customPortalPreview.js":385,"./components/dashboard/dashboard.js":387,"./components/dashboardWidget/DashboardWidgetController.js":388,"./components/dashboardWidget/dashboardWidget.js":390,"./components/deviceList/DeviceListController.js":391,"./components/deviceList/deviceList.js":393,"./components/deviceMarker/DeviceMarkerController.js":394,"./components/deviceMarker/deviceMarker.js":396,"./components/deviceMarkerLabel/DeviceMarkerLabelController.js":397,"./components/deviceMarkerLabel/deviceMarkerLabel.js":399,"./components/deviceMarkerMenu/DeviceMarkerMenuController.js":400,"./components/deviceMarkerMenu/deviceMarkerMenu.js":402,"./components/devicePropertiesAdopt/DevicePropertiesAdoptController.js":403,"./components/devicePropertiesAdopt/devicePropertiesAdopt.js":405,"./components/devicePropertiesBatchError/devicePropertiesBatchError.js":407,"./components/devicePropertiesClientList/DevicePropertiesClientListController.js":408,"./components/devicePropertiesClientList/devicePropertiesClientList.js":410,"./components/devicePropertiesConfigureCustomUpgrade/DevicePropertiesConfigureCustomUpgradeController.js":411,"./components/devicePropertiesConfigureCustomUpgrade/devicePropertiesConfigureCustomUpgrade.js":413,"./components/devicePropertiesConfigureDebugTerminal/DevicePropertiesConfigureDebugTerminalController.js":414,"./components/devicePropertiesConfigureDebugTerminal/devicePropertiesConfigureDebugTerminal.js":416,"./components/devicePropertiesConfigureDisable/DevicePropertiesConfigureDisableController.js":417,"./components/devicePropertiesConfigureDisable/devicePropertiesConfigureDisable.js":419,"./components/devicePropertiesConfigureForget/DevicePropertiesConfigureForgetController.js":420,"./components/devicePropertiesConfigureForget/devicePropertiesConfigureForget.js":422,"./components/devicePropertiesConfigureGeneral/DevicePropertiesConfigureGeneralController.js":423,"./components/devicePropertiesConfigureGeneral/devicePropertiesConfigureGeneral.js":425,"./components/devicePropertiesConfigureNetwork/DevicePropertiesConfigureNetworkController.js":426,"./components/devicePropertiesConfigureNetwork/devicePropertiesConfigureNetwork.js":428,"./components/devicePropertiesConfigureWarnings/DevicePropertiesConfigureWarningsValidator.js":429,"./components/devicePropertiesConfigureWarnings/devicePropertiesConfigureWarnings.js":431,"./components/devicePropertiesLicenseWarning/DevicePropertiesLicenseWarningController.js":432,"./components/devicePropertiesLicenseWarning/devicePropertiesLicenseWarning.js":434,"./components/devicePropertiesTags/DevicePropertiesTagsController.js":435,"./components/devicePropertiesTags/devicePropertiesTags.js":437,"./components/deviceSearchWithTagsDropdownList/DeviceSearchWithTagsDropdownListController.js":438,"./components/deviceSearchWithTagsDropdownList/deviceSearchWithTagsDropdownList.js":440,"./components/deviceSelectList/DeviceSelectListController.js":441,"./components/deviceSelectList/deviceSelectList.js":443,"./components/dpiApplicationStatistics/DpiApplicationStatisticsController.js":444,"./components/dpiApplicationStatistics/dpiApplicationStatistics.js":446,"./components/dpiApplicationUsageGraph/DpiApplicationUsageGraphController.js":447,"./components/dpiApplicationUsageGraph/dpiApplicationUsageGraph.js":449,"./components/dpiApps/DpiAppsController.js":450,"./components/dpiApps/dpiApps.js":452,"./components/dpiCategoryStatistics/DpiCategoryStatisticsController.js":453,"./components/dpiCategoryStatistics/dpiCategoryStatistics.js":455,"./components/dpiCategoryUsageGraph/DpiCategoryUsageGraphController.js":456,"./components/dpiCategoryUsageGraph/dpiCategoryUsageGraph.js":458,"./components/dpiDrillDown/DpiDrillDownController.js":459,"./components/dpiDrillDown/dpiDrillDown.js":461,"./components/dpiOverview/DpiOverviewController.js":462,"./components/dpiOverview/dpiOverview.js":464,"./components/dpiRestrictionAssignments/DpiRestrictionAssignmentsController.js":465,"./components/dpiRestrictionAssignments/dpiRestrictionAssignments.js":467,"./components/dpiRestrictionGroup/DpiRestrictionGroupController.js":468,"./components/dpiRestrictionGroup/dpiRestrictionGroup.js":470,"./components/dpiRestrictionNetworkAssignmentsList/DpiRestrictionNetworkAssignmentsListController.js":471,"./components/dpiRestrictionNetworkAssignmentsList/dpiRestrictionNetworkAssignmentsList.js":473,"./components/dpiRestrictionWirelessNetworkAssignmentsList/DpiRestrictionWirelessNetworkAssignmentsListController.js":474,"./components/dpiRestrictionWirelessNetworkAssignmentsList/dpiRestrictionWirelessNetworkAssignmentsList.js":476,"./components/dpiRestrictionsList/DpiRestrictionsListController.js":477,"./components/dpiRestrictionsList/dpiRestrictionsList.js":479,"./components/dpiSelector/DpiSelectorController.js":480,"./components/dpiSelector/dpiSelector.js":482,"./components/dpiUsers/DpiUsersController.js":483,"./components/dpiUsers/dpiUsers.js":485,"./components/dynamicDashboard/DynamicDashboardController.js":486,"./components/dynamicDashboard/dynamicDashboard.js":488,"./components/dynamicDnsList/DynamicDnsListController.js":489,"./components/dynamicDnsList/dynamicDnsList.js":491,"./components/eventIcon/eventIcon.js":492,"./components/eventList/EventListController.js":493,"./components/eventList/eventList.js":495,"./components/eventMessage/EventMessageController.js":496,"./components/eventMessage/eventMessage.js":497,"./components/eventMessageItem/eventMessageItem.js":499,"./components/eventsSideNav/EventsSideNavController.js":500,"./components/eventsSideNav/eventsSideNav.js":502,"./components/firewallGroupsForm/FirewallGroupsFormController.js":503,"./components/firewallGroupsForm/firewallGroupsForm.js":505,"./components/firewallGroupsList/FirewallGroupsListController.js":506,"./components/firewallGroupsList/firewallGroupsList.js":508,"./components/firewallRulesForm/FirewallRulesFormController.js":509,"./components/firewallRulesForm/firewallRulesForm.js":511,"./components/firewallRulesList/FirewallRulesListController.js":512,"./components/firewallRulesList/firewallRulesList.js":514,"./components/formGroupWarnings/FormGroupWarningsController.js":515,"./components/formGroupWarnings/formGroupWarnings.js":516,"./components/formGroupWarnings/formGroupWarningsInput.js":517,"./components/gatewayDiagram/GatewayDiagramController.js":518,"./components/gatewayDiagram/gatewayDiagram.js":520,"./components/gatewayDiagramKeys/gatewayDiagramKeys.js":522,"./components/gatewayProperties/GatewayPropertiesController.js":523,"./components/gatewayProperties/gatewayProperties.js":525,"./components/gatewayPropertiesConfigure/gatewayPropertiesConfigure.js":527,"./components/gatewayPropertiesConfigureWan/GatewayPropertiesConfigureWanController.js":528,"./components/gatewayPropertiesConfigureWan/gatewayPropertiesConfigureWan.js":530,"./components/gatewayPropertiesDetails/gatewayPropertiesDetails.js":532,"./components/gatewayPropertiesDynamicDnsForm/GatewayPropertiesDynamicDnsFormController.js":533,"./components/gatewayPropertiesDynamicDnsForm/gatewayPropertiesDynamicDnsForm.js":535,"./components/gatewayPropertiesDynamicDnsList/GatewayPropertiesDynamicDnsListController.js":536,"./components/gatewayPropertiesDynamicDnsList/gatewayPropertiesDynamicDnsList.js":538,"./components/gatewayPropertiesNetworkList/GatewayPropertiesNetworkListController.js":539,"./components/gatewayPropertiesNetworkList/gatewayPropertiesNetworkList.js":541,"./components/gatewayPropertiesPortForwardForm/GatewayPropertiesPortForwardFormController.js":542,"./components/gatewayPropertiesPortForwardForm/gatewayPropertiesPortForwardForm.js":544,"./components/gatewayPropertiesPortForwardList/GatewayPropertiesPortForwardListController.js":545,"./components/gatewayPropertiesPortForwardList/gatewayPropertiesPortForwardList.js":547,"./components/globalSideNav/globalSideNav.js":549,"./components/googleImageMapRuler/GoogleImageMapRulerController.js":550,"./components/googleImageMapRuler/googleImageMapRuler.js":552,"./components/gridsterItemOnResize/gridsterItemOnResize.js":553,"./components/health/HealthController.js":554,"./components/health/health.js":556,"./components/hexColorInput/hexColorInput.js":557,"./components/highlightedTextarea/highlightedTextarea.js":558,"./components/hotspot2Form/Hotspot2FormController.js":559,"./components/hotspot2Form/hotspot2Form.js":561,"./components/hotspot2List/Hotspot2ListController.js":562,"./components/hotspot2List/hotspot2List.js":564,"./components/hotspot2SectionCellularNetwork/Hotspot2SectionCellularNetworkController.js":565,"./components/hotspot2SectionCellularNetwork/hotspot2SectionCellularNetwork.js":567,"./components/hotspot2SectionDomainName/Hotspot2SectionDomainNameController.js":568,"./components/hotspot2SectionDomainName/hotspot2SectionDomainName.js":570,"./components/hotspot2SectionInterworking/Hotspot2SectionInterworkingController.js":571,"./components/hotspot2SectionInterworking/hotspot2SectionInterworking.js":573,"./components/hotspot2SectionInterworkingVenueName/Hotspot2SectionInterworkingVenueNameController.js":574,"./components/hotspot2SectionInterworkingVenueName/hotspot2SectionInterworkingVenueName.js":576,"./components/hotspot2SectionNaiRealm/Hotspot2SectionNaiRealmController.js":577,"./components/hotspot2SectionNaiRealm/hotspot2SectionNaiRealm.js":579,"./components/hotspot2SectionRoamingConsortium/Hotspot2SectionRoamingConsortiumController.js":580,"./components/hotspot2SectionRoamingConsortium/hotspot2SectionRoamingConsortium.js":582,"./components/hotspotOverridesUpgrade/HotspotOverridesUpgradeController.js":583,"./components/hotspotOverridesUpgrade/hotspotOverridesUpgrade.js":585,"./components/ifAdvanceFeatures/ifAdvancedFeatures.js":586,"./components/iframePostMessage/iframePostMessage.js":587,"./components/imageMap/imageMap.js":589,"./components/imageMapRuler/ImageMapRulerController.js":590,"./components/imageMapRuler/imageMapRuler.js":592,"./components/inventoryClientsGraph/InventoryClientsGraphController.js":593,"./components/inventoryClientsGraph/inventoryClientsGraph.js":595,"./components/inventoryDevicesGraph/InventoryDevicesGraphController.js":596,"./components/inventoryDevicesGraph/inventoryDevicesGraph.js":598,"./components/inventoryDpiGraph/InventoryDpiGraphController.js":599,"./components/inventoryDpiGraph/inventoryDpiGraph.js":601,"./components/knownClientList/KnownClientListController.js":602,"./components/knownClientList/knownClientList.js":604,"./components/legacyRadiusAcctServerFormGroup/legacyRadiusAcctServerFormGroup.js":606,"./components/legacyRadiusAuthServerFormGroup/legacyRadiusAuthServerFormGroup.js":608,"./components/linkUsage/linkUsage.js":610,"./components/macAddress/macAddress.js":611,"./components/mapActionBar/MapActionBarController.js":612,"./components/mapActionBar/mapActionBar.js":614,"./components/mapEditPanel/MapEditPanelController.js":615,"./components/mapEditPanel/mapEditPanel.js":617,"./components/mapGoogle/MapGoogleController.js":618,"./components/mapGoogle/mapGoogle.js":620,"./components/mapGoogleClearSearch/MapGoogleClearSearchController.js":621,"./components/mapGoogleClearSearch/mapGoogleClearSearch.js":623,"./components/mapMenu/MapMenuController.js":624,"./components/mapMenu/mapMenu.js":626,"./components/mapTypeSwitcher/mapTypeSwitcher.js":627,"./components/neighboringAccessPointList/NeighboringAccessPointListController.js":628,"./components/neighboringAccessPointList/neighboringAccessPointList.js":630,"./components/networkFormDetailsNetwork/NetworkFormDetailsNetworkController.js":631,"./components/networkFormDetailsNetwork/networkFormDetailsNetwork.js":633,"./components/networkFormInputPurpose/NetworkFormInputPurposeController.js":634,"./components/networkFormInputPurpose/networkFormInputPurpose.js":636,"./components/networkFormInputRemoteSubnets/NetworkFormInputRemoteSubnetsController.js":637,"./components/networkFormInputRemoteSubnets/networkFormInputRemoteSubnets.js":639,"./components/networkFormLan/NetworkFormLanController.js":640,"./components/networkFormLan/networkFormLan.js":642,"./components/networkFormRemoteUserVpn/NetworkFormRemoteUserVpnController.js":643,"./components/networkFormRemoteUserVpn/networkFormRemoteUserVpn.js":645,"./components/networkFormSiteVpn/NetworkFormSiteVpnController.js":646,"./components/networkFormSiteVpn/networkFormSiteVpn.js":648,"./components/networkFormVlanOnly/NetworkFormVlanOnlyController.js":649,"./components/networkFormVlanOnly/networkFormVlanOnly.js":651,"./components/networkFormVpnClient/NetworkFormVpnClientController.js":652,"./components/networkFormVpnClient/networkFormVpnClient.js":654,"./components/networkList/NetworkListController.js":655,"./components/networkList/networkList.js":657,"./components/notifyDeviceRequirement/NotifyDeviceRequirementController.js":658,"./components/notifyDeviceRequirement/notifyDeviceRequirement.js":660,"./components/occupancy/OccupancyController.js":661,"./components/occupancy/occupancy.js":663,"./components/occupancyGraph/OccupancyGraphController.js":664,"./components/occupancyGraph/occupancyGraph.js":666,"./components/pastConnectionList/PastConnectionListController.js":667,"./components/pastConnectionList/pastConnectionList.js":669,"./components/pastGuestAuthorizationList/PastGuestAuthorizationListController.js":670,"./components/pastGuestAuthorizationList/pastGuestAuthorizationList.js":672,"./components/pendingChangesIcon/pendingChangesIcon.js":674,"./components/pendingChangesList/pendingChangesList.js":676,"./components/pendingDeviceChanges/PendingDeviceChangesController.js":677,"./components/pendingDeviceChanges/pendingDeviceChanges.js":679,"./components/phoneProperties/PhonePropertiesController.js":680,"./components/phoneProperties/phoneProperties.js":682,"./components/phonePropertiesConfigure/phonePropertiesConfigure.js":684,"./components/phonePropertiesDetails/phonePropertiesDetails.js":686,
"./components/portForwardStatsList/PortForwardStatsListController.js":687,"./components/portForwardStatsList/portForwardStatsList.js":689,"./components/powerSaveIcon/powerSaveIcon.js":691,"./components/propertyPanel/PropertyPanelController.js":692,"./components/propertyPanel/propertyPanel.js":694,"./components/radiusAcctServerFormGroup/radiusAcctServerFormGroup.js":696,"./components/radiusAuthServerFormGroup/radiusAuthServerFormGroup.js":698,"./components/radiusProfileForm/RadiusProfileFormController.js":699,"./components/radiusProfileForm/radiusProfileForm.js":701,"./components/radiusProfilesList/RadiusProfilesListController.js":702,"./components/radiusProfilesList/radiusProfilesList.js":704,"./components/radiusSelector/RadiusSelectorController.js":705,"./components/radiusSelector/radiusSelector.js":707,"./components/radiusUserForm/RadiusUserFormController.js":708,"./components/radiusUserForm/radiusUserForm.js":710,"./components/radiusUsersList/RadiusUsersListController.js":711,"./components/radiusUsersList/radiusUsersList.js":713,"./components/remoteUserVpnList/RemoteUserVpnListController.js":714,"./components/remoteUserVpnList/remoteUserVpnList.js":716,"./components/repeatableForm/RepeatableFormController.js":717,"./components/repeatableForm/repeatableForm.js":718,"./components/repeatableInput/RepeatableInputController.js":719,"./components/repeatableInput/repeatableInput.js":720,"./components/rfEnvironmentChart/RfEnvironmentChartController.js":721,"./components/rfEnvironmentChart/rfEnvironmentChart.js":723,"./components/rfEnvironmentLegend/RfEnvironmentLegendController.js":724,"./components/rfEnvironmentLegend/rfEnvironmentLegend.js":726,"./components/rfEnvironmentRssiHistogram/RfEnvironmentRssiHistogramController.js":727,"./components/rfEnvironmentRssiHistogram/rfEnvironmentRssiHistogram.js":729,"./components/rfEnvironmentTooltip/rfEnvironmentTooltip.js":731,"./components/routingForm/RoutingFormController.js":732,"./components/routingForm/routingForm.js":734,"./components/routingList/RoutingListController.js":735,"./components/routingList/routingList.js":737,"./components/routingStatsList/RoutingStatsListController.js":738,"./components/routingStatsList/routingStatsList.js":740,"./components/screenshotDownload/ScreenshotDownloadController.js":741,"./components/screenshotDownload/screenshotDownload.js":742,"./components/sdnStatus/SdnStatusController.js":743,"./components/sdnStatus/sdnStatus.js":745,"./components/selectDeviceDropdownList/SelectDeviceDropdownListController.js":746,"./components/selectDeviceDropdownList/selectDeviceDropdownList.js":748,"./components/selectSimpleDropdownList/SelectSimpleDropdownListController.js":749,"./components/selectSimpleDropdownList/selectSimpleDropdownList.js":751,"./components/settingsNav/SettingsNavController.js":752,"./components/settingsNav/settingsNav.js":754,"./components/settingsSecurityGatewayIsRequired/SettingsSecurityGatewayIsRequiredController.js":755,"./components/settingsSecurityGatewayIsRequired/settingsSecurityGatewayIsRequired.js":757,"./components/settingsSideNav/settingsSideNav.js":759,"./components/settingsSubMenuRadius/SettingsSubMenuRadiusController.js":760,"./components/settingsSubMenuRadius/settingsSubMenuRadius.js":762,"./components/settingsSubMenuRoutingAndFirewall/SettingsSubMenuRoutingAndFirewallController.js":763,"./components/settingsSubMenuRoutingAndFirewall/settingsSubMenuRoutingAndFirewall.js":765,"./components/settingsTabsHeader/settingsTabsHeader.js":767,"./components/speedTestDashboard/speedTestDashboard.js":769,"./components/speedTestDonutChart/SpeedTestDonutChartController.js":770,"./components/speedTestDonutChart/speedTestDonutChart.js":772,"./components/speedTestLineChart/SpeedTestLineChartController.js":773,"./components/speedTestLineChart/speedTestLineChart.js":775,"./components/speedTestResult/speedTestResult.js":777,"./components/stateSwitcher/StateSwitcherController.js":778,"./components/stateSwitcher/stateSwitcher.js":780,"./components/statsClientsPerEssid/StatsClientsPerEssidController.js":781,"./components/statsClientsPerEssid/statsClientsPerEssid.js":783,"./components/statsCurrentUsage/StatsCurrentUsageController.js":784,"./components/statsCurrentUsage/statsCurrentUsage.js":786,"./components/statsQuickLook/StatsQuickLookController.js":787,"./components/statsQuickLook/statsQuickLook.js":789,"./components/statsRecentActivities/StatsRecentActivitiesController.js":790,"./components/statsRecentActivities/statsRecentActivities.js":792,"./components/stopEvent/stopEvent.js":793,"./components/streamIcon/StreamIconController.js":794,"./components/streamIcon/streamIcon.js":796,"./components/streamProperties/StreamPropertiesController.js":797,"./components/streamProperties/streamProperties.js":799,"./components/streamPropertiesDetails/streamPropertiesDetails.js":801,"./components/streamPropertiesDeviceList/StreamPropertiesDeviceListController.js":802,"./components/streamPropertiesDeviceList/streamPropertiesDeviceList.js":804,"./components/streamsList/StreamsListController.js":805,"./components/streamsList/streamsList.js":807,"./components/stringToIntegerInput/stringToIntegerInput.js":808,"./components/svgMap/BaseSvgMapController.js":809,"./components/svgMap/MeasurableSvgMapController.js":810,"./components/svgMap/SvgMapController.js":811,"./components/svgMap/svgMap.js":813,"./components/switchDiagram/switchDiagram.js":815,"./components/switchDiagramKeys/switchDiagramKeys.js":817,"./components/switchPortButtonClearCounters/SwitchPortButtonClearCountersController.js":818,"./components/switchPortButtonClearCounters/switchPortButtonClearCounters.js":820,"./components/switchPortButtonPowerCycle/SwitchPortButtonPowerCycleController.js":821,"./components/switchPortButtonPowerCycle/switchPortButtonPowerCycle.js":823,"./components/switchPortDiagram/switchPortDiagram.js":825,"./components/switchPortTooltip/SwitchPortTooltipController.js":826,"./components/switchPortTooltip/switchPortTooltip.js":828,"./components/switchPortUsage/SwitchPortUsageController.js":829,"./components/switchPortUsage/switchPortUsage.js":831,"./components/switchProperties/SwitchPropertiesController.js":832,"./components/switchProperties/switchProperties.js":834,"./components/switchPropertiesConfigure/switchPropertiesConfigure.js":836,"./components/switchPropertiesConfigureServices/SwitchPropertiesConfigureServicesController.js":837,"./components/switchPropertiesConfigureServices/switchPropertiesConfigureServices.js":839,"./components/switchPropertiesCopyConfiguration/SwitchPropertiesCopyConfigurationController.js":840,"./components/switchPropertiesCopyConfiguration/switchPropertiesCopyConfiguration.js":842,"./components/switchPropertiesDetails/switchPropertiesDetails.js":844,"./components/switchPropertiesDownlinkList/SwitchPropertiesDownlinkListController.js":845,"./components/switchPropertiesDownlinkList/switchPropertiesDownlinkList.js":847,"./components/switchPropertiesNetworksVlansForm/SwitchPropertiesNetworksVlansFormController.js":848,"./components/switchPropertiesNetworksVlansForm/switchPropertiesNetworksVlansForm.js":850,"./components/switchPropertiesNetworksVlansList/SwitchPropertiesNetworksVlansListController.js":851,"./components/switchPropertiesNetworksVlansList/switchPropertiesNetworksVlansList.js":853,"./components/switchPropertiesPortForm/SwitchPropertiesPortFormController.js":854,"./components/switchPropertiesPortForm/switchPropertiesPortForm.js":856,"./components/switchPropertiesPortList/SwitchPropertiesPortListController.js":857,"./components/switchPropertiesPortList/switchPropertiesPortList.js":859,"./components/switchStatsList/SwitchStatsListController.js":860,"./components/switchStatsList/switchStatsList.js":862,"./components/systemConfigSite/SystemConfigSiteController.js":863,"./components/systemConfigSite/systemConfigSite.js":865,"./components/terminalAdapter/terminalAdapter.js":867,"./components/terminalPanel/TerminalPanelController.js":868,"./components/terminalPanel/terminalPanel.js":870,"./components/terminalStatus/TerminalStatusController.js":871,"./components/terminalStatus/terminalStatus.js":873,"./components/throughput/ThroughputController.js":874,"./components/throughput/throughput.js":876,"./components/topology/TopologyController.js":877,"./components/topology/topology.js":879,"./components/topologyChart/TopologyChartController.js":880,"./components/topologyChart/topologyChart.js":882,"./components/topologyGraph/TopologyGraphController.js":883,"./components/topologyGraph/topologyGraph.js":885,"./components/topologyLink/topologyLink.js":886,"./components/trainingButton/TrainingButtonController.js":887,"./components/trainingButton/trainingButton.js":889,"./components/truthyCheckbox/truthyCheckbox.js":890,"./components/txRateStatus/TxRateStatusController.js":891,"./components/txRateStatus/txRateStatus.js":893,"./components/unreadAlerts/unreadAlerts.js":895,"./components/upgradingWhiteoutNotice/upgradingWhiteoutNotice.js":897,"./components/uploadGuestPortalImage/uploadGuestPortalImage.js":899,"./components/userGroupForm/UserGroupFormController.js":900,"./components/userGroupForm/userGroupForm.js":902,"./components/userGroupList/UserGroupListController.js":903,"./components/userGroupList/userGroupList.js":905,"./components/validateIpInSubnet/validateIpInSubnet.js":906,"./components/validateIpRange/validateIpRange.js":907,"./components/validateNetmask/validateNetmask.js":908,"./components/validatePatterns/validatePatterns.js":909,"./components/validatePortRange/validatePortRange.js":910,"./components/windowPanels/WindowPanelsController.js":911,"./components/windowPanels/windowPanels.js":913,"./components/wirelessNetworkForm/WirelessNetworkFormController.js":914,"./components/wirelessNetworkForm/wirelessNetworkForm.js":916,"./components/wirelessNetworkGroupForm/WirelessNetworkGroupFormController.js":917,"./components/wirelessNetworkGroupForm/wirelessNetworkGroupForm.js":919,"./components/wirelessNetworkList/WirelessNetworkListController.js":920,"./components/wirelessNetworkList/wirelessNetworkList.js":922,"./components/wirelessNetworkMacAddressFilterList/WirelessNetworkMacAddressFilterListController.js":923,"./components/wirelessNetworkMacAddressFilterList/wirelessNetworkMacAddressFilterList.js":925,"./components/wirelessNetworkMinrateSlider/WirelessNetworkMinrateSliderController.js":926,"./components/wirelessNetworkMinrateSlider/wirelessNetworkMinrateSlider.js":928,"./components/wirelessNetworkSchedule/wirelessNetworkSchedule.js":930,"./components/wirelessNetworkScheduleDay/wirelessNetworkScheduleDay.js":932,"./components/yesOrNoBadge/yesOrNoBadge.js":934,"./config/atlas.js":935,"./config/flags.js":936,"./config/frames.js":937,"./config/panel.js":938,"./config/routes.js":939,"./config/sce.js":940,"./config/sideNavPopover.js":941,"./config/states.js":942,"./constants/ALERTS_DEFAULTS.js":943,"./constants/CHAT_DEPARTMENTS.js":944,"./constants/CHAT_LEVELS.js":945,"./constants/CLIENT_FETCH_DEFAULTS.js":946,"./constants/DASHBOARD_WIDGETS.js":947,"./constants/DEFAULT_WLAN_SCHEDULE.js":948,"./constants/EASTER_EGGS.js":949,"./constants/ELEMENTS.js":950,"./constants/ENV.js":951,"./constants/EVENTS_DEFAULTS.js":952,"./constants/EVENT_KEYS.js":953,"./constants/HOTSPOT2_AUTH_IDS.js":954,"./constants/HOTSPOT2_AUTH_VALUES.js":955,"./constants/HOTSPOT2_EAP_METHODS.js":956,"./constants/HOTSPOT2_NETWORK_TYPES.js":957,"./constants/HOTSPOT2_VENUE_GROUPS.js":958,"./constants/HOTSPOT2_VENUE_TYPES.js":959,"./constants/HOTSPOT_LANGUAGES.js":960,"./constants/HOTSPOT_PAYMENT_FIELDS_DEFAULTS.js":961,"./constants/HOTSPOT_PORTAL_CUSTOMIZED_DEFAULTS.js":962,"./constants/HOTSPOT_PORTAL_CUSTOMIZED_LANGUAGES_DEFAULTS.js":963,"./constants/HOTSPOT_PORTAL_OVERRIDE_TEMPLATE_HELP.js":964,"./constants/INSIGHTS_DEFAULTS.js":965,"./constants/KNOWN_CLIENT_FIELDS.js":966,"./constants/MAP_DEFAULTS.js":967,"./constants/MAP_FEATURES.js":968,"./constants/MAP_TYPES.js":969,"./constants/MAP_UNITS.js":970,"./constants/NETWORK_PURPOSE.js":971,"./constants/OCCUPANCY_GRAPH.js":972,"./constants/OUI.js":973,"./constants/RADIUS_VLAN_OPTIONS.js":974,"./constants/RF_ENVIRONMENT_CHART_OPTIONS.js":975,"./constants/RF_ENVIRONMENT_INTERFERENCE_INTERVAL.js":976,"./constants/RF_ENVIRONMENT_SETTINGS.js":977,"./constants/SPANNING_TREE_PRIORITIES.js":978,"./constants/SPEED_TEST_SETTINGS.js":979,"./constants/SPEED_TEST_STATUSES.js":980,"./constants/STATS_DEFAULTS.js":981,"./constants/TERMINAL_EVENTS.js":982,"./constants/TERMS_OF_SERVICE_DEFAULT.js":983,"./constants/TOPOLOGY_LINKS.js":984,"./constants/UBNT_CLIENT_TYPES.js":985,"./constants/URLS.js":986,"./constants/WALKME.js":987,"./constants/WLAN_MINRATE_SETTINGS.js":988,"./controllers/AccountVerifyController.js":989,"./controllers/AddSiteController.js":990,"./controllers/AdminsController.js":991,"./controllers/AlertsController.js":992,"./controllers/AlertsLinkController.js":993,"./controllers/BackupSettingsController.js":994,"./controllers/BaseChartController.js":995,"./controllers/BaseClientListController.js":996,"./controllers/BaseConfigureNetworkController.js":997,"./controllers/BaseConfigureServicesController.js":998,"./controllers/BaseDropdownListController.js":999,"./controllers/BaseListAndFormController.js":1e3,"./controllers/BasePropertiesController.js":1001,"./controllers/BaseRepeatableController.js":1002,"./controllers/BaseSettingsController.js":1003,"./controllers/ClientsController.js":1004,"./controllers/CloudAccessSettingsController.js":1005,"./controllers/CloudKeySdCardCheckController.js":1006,"./controllers/ConfigureDpiCategoryGraphController.js":1007,"./controllers/ConfigureMapsController.js":1008,"./controllers/ConfirmUpgradeOverridesController.js":1009,"./controllers/ControllerSettingsController.js":1010,"./controllers/DashboardController.js":1011,"./controllers/DevicesController.js":1012,"./controllers/DpiBaseUsersController.js":1013,"./controllers/DpiController.js":1014,"./controllers/DpiRestrictionController.js":1015,"./controllers/DpiRestrictionNetworkAssignmentFrameController.js":1016,"./controllers/DpiSettingsController.js":1017,"./controllers/EditMapController.js":1018,"./controllers/EditTextFieldController.js":1019,"./controllers/EventsController.js":1020,"./controllers/EventsLinkController.js":1021,"./controllers/ExportSiteController.js":1022,"./controllers/FirewallController.js":1023,"./controllers/FirewallGroupsController.js":1024,"./controllers/FirewallGroupsCreateController.js":1025,"./controllers/FirewallRulesController.js":1026,"./controllers/GuestControlSettingsController.js":1027,"./controllers/HomeController.js":1028,"./controllers/Hotspot2Controller.js":1029,"./controllers/Hotspot2NaiRealmListEntryController.js":1030,"./controllers/HotspotPackageController.js":1031,"./controllers/ImportSiteController.js":1032,"./controllers/InsightsController.js":1033,"./controllers/LoginController.js":1034,"./controllers/MaintenanceSettingsController.js":1035,"./controllers/ManageController.js":1036,"./controllers/MapController.js":1037,"./controllers/NetworksController.js":1038,"./controllers/PreferencesController.js":1039,"./controllers/ProfilesController.js":1040,"./controllers/RadiusProfileController.js":1041,"./controllers/RadiusRepeatableFormController.js":1042,"./controllers/RadiusServerController.js":1043,"./controllers/RadiusUsersController.js":1044,"./controllers/RoutingController.js":1045,"./controllers/SdnUserController.js":1046,"./controllers/SettingsController.js":1047,"./controllers/SimpleTextEditorController.js":1048,"./controllers/SiteController.js":1049,"./controllers/SiteSettingsController.js":1050,"./controllers/SitesOverviewController.js":1051,"./controllers/SpeedTestController.js":1052,"./controllers/StatisticsController.js":1053,"./controllers/StatisticsDpiFiltersController.js":1054,"./controllers/StatisticsOverviewController.js":1055,"./controllers/StatisticsSwitchController.js":1056,"./controllers/SystemConfigController.js":1057,"./controllers/TopologyViewController.js":1058,"./controllers/TrainingLoginController.js":1059,"./controllers/UpdateDataRetentionDaysController.js":1060,"./controllers/UserGroupsController.js":1061,"./controllers/WebrtcErrorController.js":1062,"./controllers/WebrtcFailedController.js":1063,"./controllers/WirelessNetworkMacFilterAddBatchController.js":1064,"./controllers/WirelessNetworkMacFilterAddClientsController.js":1065,"./controllers/WirelessNetworksController.js":1066,"./filters/channel.js":1067,"./filters/channelUtilization.js":1068,"./filters/clientRadio.js":1069,"./filters/deviceName.js":1070,"./filters/duplex.js":1071,"./filters/duration.js":1072,"./filters/enabled.js":1073,"./filters/enabledIcon.js":1074,"./filters/essid.js":1075,"./filters/latency.js":1076,"./filters/minutesToMoment.js":1077,"./filters/neighboringApLocation.js":1078,"./filters/networkPurpose.js":1079,"./filters/networkSubnet.js":1080,"./filters/networkVlan.js":1081,"./filters/orEmpty.js":1082,"./filters/pluralize.js":1083,"./filters/portForwardProtocol.js":1084,"./filters/portForwardSource.js":1085,"./filters/radioChannelAndPower.js":1086,"./filters/roaming.js":1087,"./filters/rssi.js":1088,"./filters/rssiToDbm.js":1089,"./filters/rxtx.js":1090,"./filters/streamEncodingQuality.js":1091,"./filters/temperature.js":1092,"./filters/truncate.js":1093,"./filters/unifiCronDayName.js":1094,"./filters/unifiCronMonthName.js":1095,"./filters/wlanGroup.js":1096,"./filters/wlanOverride.js":1097,"./filters/yesOrNo.js":1098,"./lib/resolve.js":1099,"./lib/routeInitializers/initializeKnownClients.js":1100,"./lib/routeInitializers/initializeNeighboringAccessPoints.js":1101,"./lib/routeInitializers/initializePastConnections.js":1102,"./lib/routeInitializers/initializePastGuestAuthorizations.js":1103,"./lib/routeInitializers/initializeStatisticsOverview.js":1104,"./lib/routeInitializers/initializeStatisticsSwitch.js":1105,"./lib/routeResolvers/resolveAllowSuperAdminAccess.js":1106,"./lib/routeResolvers/resolvePropertyPanel.js":1107,"./run/clientSync.js":1115,"./run/deviceSync.js":1116,"./run/templateCache.js":1117,"./services/activityReports.js":1118,"./services/admins.js":1119,"./services/alertFrameUtils.js":1120,"./services/alertUtils.js":1121,"./services/alerts.js":1122,"./services/arrayUtils.js":1123,"./services/atlasCoverageCalculator.js":1124,"./services/builderFactories/SimpleFormDirective.js":1125,"./services/clientListColumnStore.js":1126,"./services/clientStateUtils.js":1127,"./services/clientUplinkUtils.js":1128,"./services/clientUtils.js":1129,"./services/clients.js":1130,"./services/cloudKeySdCardCheck.js":1131,"./services/collections/AdminCollection.js":1132,"./services/collections/AlertCollection.js":1133,"./services/collections/ClientCollection.js":1134,"./services/collections/ClientHistoryCollection.js":1135,"./services/collections/DashboardStatsCollection.js":1136,"./services/collections/DpiAppCollection.js":1137,"./services/collections/DpiGroupCollection.js":1138,"./services/collections/DynamicDnsCollection.js":1139,"./services/collections/DynamicDnsStatsCollection.js":1140,"./services/collections/EventCollection.js":1141,"./services/collections/FirewallGroupCollection.js":1142,"./services/collections/FirewallRuleCollection.js":1143,"./services/collections/Hotspot2Collection.js":1144,"./services/collections/KnownClientCacheCollection.js":1145,"./services/collections/KnownClientCollection.js":1146,"./services/collections/MapCollection.js":1147,"./services/collections/NeighboringAccessPointCollection.js":1148,"./services/collections/NetworkCollection.js":1149,"./services/collections/PastConnectionCollection.js":1150,"./services/collections/PastGuestAuthorizationCollection.js":1151,"./services/collections/PortForwardCollection.js":1152,"./services/collections/PortForwardStatsCollection.js":1153,"./services/collections/RadiusProfileCollection.js":1154,"./services/collections/RadiusUserCollection.js":1155,"./services/collections/RemoteUserVpnCollection.js":1156,"./services/collections/RoutingCollection.js":1157,"./services/collections/RoutingStatsCollection.js":1158,"./services/collections/StreamCollection.js":1159,"./services/collections/StreamDeviceCollection.js":1160,"./services/collections/SwitchPortCollection.js":1161,"./services/collections/SwitchStatsPortCollection.js":1162,"./services/collections/TagCollection.js":1163,"./services/collections/UserGroupCollection.js":1164,"./services/collections/WlanDpiCollection.js":1165,"./services/comparators/alertsComparator.js":1166,"./services/comparators/clientsComparator.js":1167,"./services/comparators/eventsComparator.js":1168,"./services/comparators/knownClientsComparator.js":1169,"./services/comparators/manageDevicesComparator.js":1170,"./services/comparators/neighboringAccessPointsComparator.js":1171,"./services/comparators/pastConnectionsComparator.js":1172,"./services/comparators/portForwardStatsComparator.js":1173,"./services/comparators/streamDevicesComparator.js":1174,"./services/comparators/switchStatsComparator.js":1175,"./services/comparators/wirelessNetworksComparator.js":1176,"./services/controllerMixins/devicePropertiesPortsControllerMixin.js":1177,"./services/controllerMixins/listBatchEditControllerMixin.js":1178,"./services/customPortalPreview.js":1179,"./services/d3ChannelTrapezoidPoints.js":1180,"./services/d3RfEnvironmentInterferenceScale.js":1181,"./services/d3RfEnvironmentRssiInterferenceScale.js":1182,"./services/dashboardStats.js":1183,"./services/dataConverter.js":1184,"./services/dataRetentionUpdate.js":1185,"./services/deviceBatchUtils.js":1186,"./services/deviceCoverageCalculator.js":1187,"./services/deviceListColumnStore.js":1188,"./services/deviceUplinkUtils.js":1189,"./services/deviceWsMessageHandler.js":1190,"./services/devices.js":1191,"./services/directiveMixins/devicePropertiesActiveAccordionDirectiveMixin.js":1192,"./services/directiveMixins/devicePropertiesConfigureBatchDirectiveMixin.js":1193,"./services/directiveMixins/devicePropertiesConfigureWithPendingDirectiveMixin.js":1194,"./services/directiveMixins/devicePropertiesPendingActionsDirectiveMixin.js":1195,"./services/directiveMixins/devicePropertiesPortsDirectiveMixin.js":1196,"./services/directiveMixins/gatewayPropertiesDynamicDnsListDirectiveMixin.js":1197,"./services/directiveMixins/gatewayPropertiesPortForwardListDirectiveMixin.js":1198,"./services/directiveMixins/listBatchEditDirectiveMixin.js":1199,"./services/directiveMixins/sharedAttrsDirectiveMixin.js":1200,"./services/dpiApps.js":1201,"./services/dpiFilters.js":1202,"./services/dpiGroups.js":1203,"./services/dpiStats.js":1204,"./services/dpiUtils.js":1205,"./services/dynamicDns.js":1206,"./services/dynamicDnsListColumnStore.js":1207,"./services/dynamicDnsStats.js":1208,"./services/eventFilterUtils.js":1209,"./services/eventFrameUtils.js":1210,"./services/events.js":1211,"./services/eventsWsMessageHandler.js":1212,"./services/factories/SettingsModelFactory.js":1213,"./services/filters/AlertFilter.js":1214,"./services/filters/BaseClientFilter.js":1215,"./services/filters/ClientFilter.js":1216,"./services/filters/DeviceFilter.js":1217,"./services/filters/DynamicDnsFilter.js":1218,"./services/filters/EventFilter.js":1219,"./services/filters/FirewallRulesetFilter.js":1220,"./services/filters/KnownClientFilter.js":1221,"./services/filters/MapFilter.js":1222,"./services/filters/NeighboringAccessPointFilter.js":1223,"./services/filters/PastConnectionFilter.js":1224,"./services/filters/PastGuestAuthorizationFilter.js":1225,"./services/filters/PortForwardStatsFilter.js":1226,"./services/filters/RemoteUserVpnFilter.js":1227,"./services/filters/RoutingStatsFilter.js":1228,"./services/filters/SimpleModelFilter.js":1229,"./services/filters/StreamDeviceFilter.js":1230,"./services/filters/SwitchStatsFilter.js":1231,"./services/firewallGroups.js":1232,"./services/firewallRules.js":1233,"./services/firewallUtils.js":1234,"./services/formUtils.js":1235,"./services/gatewayUtils.js":1236,"./services/gateways.js":1237,"./services/geometryUtils.js":1238,"./services/guestPortalImage.js":1239,"./services/health.js":1240,"./services/hotspot2.js":1241,"./services/hotspotOverrides.js":1242,"./services/imageMapUtils.js":1243,"./services/imageUrlUtils.js":1244,"./services/knownClients.js":1245,"./services/knownClientsCache.js":1246,"./services/mapCoordinatesAssistant.js":1247,"./services/mapDevices.js":1248,"./services/mapFeatures.js":1249,"./services/mapUtils.js":1250,"./services/maps.js":1251,"./services/maps/EmptyMapType.js":1252,"./services/maps/ImageOverlay.js":1253,"./services/models/AdminModel.js":1254,"./services/models/AlertModel.js":1255,"./services/models/BaseClientModel.js":1256,"./services/models/BatchDeviceModel.js":1257,"./services/models/ClientHistoryModel.js":1258,"./services/models/ClientMgrModel.js":1259,"./services/models/ClientModel.js":1260,"./services/models/ConfigMgrModel.js":1261,"./services/models/DpiAppModel.js":1262,"./services/models/DpiGroupModel.js":1263,"./services/models/DynamicDnsModel.js":1264,"./services/models/DynamicDnsStatsModel.js":1265,"./services/models/EventMgrModel.js":1266,"./services/models/EventModel.js":1267,"./services/models/FirewallGroupModel.js":1268,"./services/models/FirewallRuleModel.js":1269,"./services/models/GuestPortalImageModel.js":1270,"./services/models/Hotspot2Model.js":1271,"./services/models/HotspotOverridesModel.js":1272,"./services/models/KnownClientModel.js":1273,"./services/models/MapEditorModel.js":1274,"./services/models/MapModel.js":1275,"./services/models/NeighboringAccessPointModel.js":1276,"./services/models/NetworkModel.js":1277,"./services/models/PastConnectionModel.js":1278,"./services/models/PastGuestAuthorizationModel.js":1279,"./services/models/PortForwardModel.js":1280,"./services/models/PortForwardStatsModel.js":1281,"./services/models/RadiusProfileModel.js":1282,"./services/models/RadiusUserModel.js":1283,"./services/models/RemoteUserVpnModel.js":1284,"./services/models/RoutingModel.js":1285,"./services/models/RoutingStatsModel.js":1286,"./services/models/SettingsGuestAccessModel.js":1287,"./services/models/StatisticsMgrModel.js":1288,"./services/models/StreamDeviceModel.js":1289,"./services/models/StreamMgrModel.js":1290,"./services/models/StreamModel.js":1291,"./services/models/SwitchPortModel.js":1292,"./services/models/SwitchStatsPortModel.js":1293,"./services/models/TagModel.js":1294,"./services/models/TerminalAdapterModel.js":1295,"./services/models/UnreadAlertsModel.js":1296,"./services/models/UserGroupModel.js":1297,"./services/models/VerifyMgrModel.js":1298,"./services/neighboringAccessPoints.js":1299,"./services/networkUtils.js":1300,"./services/networks.js":1301,"./services/objectUtils.js":1302,"./services/occupancy.js":1303,"./services/ouiIcons.js":1304,"./services/pastConnections.js":1305,"./services/pastGuestAuthorizations.js":1306,"./services/portForwardStats.js":1307,"./services/portForwardStatsListColumnStore.js":1308,"./services/portForwards.js":1309,"./services/postMessage.js":1310,"./services/propertyPanel.js":1311,"./services/radius.js":1312,"./services/radiusUsers.js":1313,"./services/regexUtils.js":1314,"./services/reload.js":1315,"./services/remoteUserVpn.js":1316,"./services/remoteUserVpnListColumnStore.js":1317,"./services/remoteUserVpnUtils.js":1318,"./services/resolvers/manageResolver.js":1319,"./services/resolvers/turnCredentialsResolver.js":1320,"./services/resolvers/wsRegisterMessageHandlers.js":1321,"./services/resolvers/wsResolver.js":1322,"./services/rfEnvironment.js":1323,"./services/rfEnvironmentChart.js":1324,"./services/routing.js":1325,"./services/routingStats.js":1326,"./services/scheduleConverter.js":1327,"./services/selectedDpiApplications.js":1328,"./services/selectedDpiCategories.js":1329,"./services/settings.js":1330,"./services/speedTest.js":1331,"./services/statistics.js":1332,"./services/streams.js":1333,"./services/streamsListColumnStore.js":1334,"./services/switchReports.js":1335,"./services/switchStats.js":1336,"./services/switchStatsListColumnStore.js":1337,"./services/switchUtils.js":1338,"./services/switches.js":1339,"./services/systemConfig.js":1340,"./services/tags.js":1341,"./services/topologyUtils.js":1342,"./services/treeUtils.js":1343,"./services/txRateStatus.js":1344,"./services/userGroups.js":1345,"./services/walkme.js":1346,"./services/widgets.js":1347,"./services/windowPanels.js":1348,"./services/wlanDpi.js":1349,"./values/APP_EVENTS.js":1350}],1109:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appInputGroup"><div class="appInputGroup inlineBlock">{{\'SETTINGS_BACKUP_LABEL_AUTOBACKUP_OCCURRENCE_EVERY\' | translate}}</div><div class="appInputGroup inlineBlock"><select ng-model="myFrequency.base" ng-options="item.value as item.label for item in frequency" class="cron-select"></select></div><span ng-show="myFrequency.base == 4">{{\'SETTINGS_BACKUP_LABEL_AUTOBACKUP_OCCURRENCE_ON\' | translate}}</span><div ng-show="myFrequency.base == 4" class="appInputGroup inlineBlock"><select ng-model="myFrequency.dayValues" ng-options="(value | unifiCronDayName) for value in dayValues" class="cron-select day-value"></select></div><span ng-show="myFrequency.base &gt;= 5">{{\'SETTINGS_BACKUP_LABEL_AUTOBACKUP_OCCURRENCE_ON_THE\' | translate}}</span><div ng-show="myFrequency.base &gt;= 5" class="appInputGroup inlineBlock"><select ng-model="myFrequency.dayOfMonthValues" ng-options="value for value in dayOfMonthValues" class="cron-select day-of-month-value"></select></div><span ng-show="myFrequency.base == 6">{{\'SETTINGS_BACKUP_LABEL_AUTOBACKUP_OCCURRENCE_OF\' | translate}}</span><div ng-show="myFrequency.base == 6" class="appInputGroup inlineBlock"><select ng-model="myFrequency.monthValues" ng-options="(value | unifiCronMonthName) for value in monthValues" class="cron-select month-value"></select></div><span ng-show="myFrequency.base &gt;= 2">{{\'SETTINGS_BACKUP_LABEL_AUTOBACKUP_OCCURRENCE_AT\' | translate}}</span><div ng-show="myFrequency.base &gt;= 3" class="appInputGroup inlineBlock"><select ng-model="myFrequency.hourValues" ng-options="value for value in hourValues" class="cron-select hour-value"></select></div><span ng-show="myFrequency.base &gt;= 3"> :</span><div ng-show="myFrequency.base &gt;= 2" class="appInputGroup inlineBlock"><select ng-model="myFrequency.minuteValues" ng-options="value for value in minuteValues" class="cron-select minute-value"></select></div><span ng-show="myFrequency.base == 2">{{\'SETTINGS_BACKUP_LABEL_AUTOBACKUP_OCCURRENCE_PAST_THE_HOUR\' | translate}}</span></div>'),b.join("")}},{"jade/runtime":232}],1110:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiDndPlaceholder"><div class="icon ubnt-icon--ellipsis"></div></div>'),b.join("")}},{"jade/runtime":232}],1111:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="attrs.isVisible &amp;&amp; attrs.model" class="unifiPanelItemHeader unifiViewSidePanelStickyTitle"><div ng-if="[\'device\', \'knownclient\', \'stream\', \'batch:uap\'].indexOf(attrs.itemType) !== -1" ng-switch="attrs.itemType" class="unifiPanelItemHeader__avatar"><div ng-switch-when="device" unifi-device-icon="attrs.model"></div><div ng-switch-when="knownclient" unifi-client-icon="attrs.model"></div><div ng-switch-when="stream" unifi-stream-icon="attrs.model"></div><div ng-switch-when="batch:uap" unifi-batch-device-icon="attrs.model"></div></div><div class="unifiPanelItemHeader__title truncate"><span ng-class="{\'horizontalRhythmLeft--cozy\': attrs.model.isBatch}">{{attrs.model.getDisplayName()}}</span></div></div>'),b.join("")}},{"jade/runtime":232}],1112:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<td class="displayName"><div class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--map-2"></span><span class="iconText__text">{{::model.get(\'name\')}}</span></div></td>'),b.join("")}},{"jade/runtime":232}],1113:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];
return b.push('<td ng-repeat="attr in collectionViewRowCtrl.config" data-attr="{{::attr}}">{{model.get(attr)}}</td>'),b.join("")}},{"jade/runtime":232}],1114:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<td class="deviceStateIcon unifiDevicesTable__statusBall"><span unifi-device-status="::model" unifi-device-status-with-icons="true" class="horizontalRhythmLeft--condensed"></span></td><td class="displayName">{{::model.getDisplayName()}}</td><td class="deviceActions appTableCell--actions noVerticalPadding"><button ng-if="::model.get(\'state\')" unifi-open-panel="model" unifi-open-panel-active-tab="\'details\'" title="{{\'COMMON_PROPERTY_PANEL_OPEN\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--panels"></span></button></td>'),b.join("")}},{"jade/runtime":232}],1115:[function(a,b,c){"use strict";angular.module("app-unifi-manage").run(["clients","knownClients","knownClientsCache",function(a,b,c){var d=function(a){return"action:"===a.substring(0,7)},e=function(a,b,c){var d=c.repository.collection.get(a.id);d&&d.set(b||a.attributes)},f=function(a,b,f){d(a)&&(f?e(b,f,c):c.repository.refreshItem(b.id))},g=function(c,f,g){("save"===c||d(c))&&(a.repository.isRegistered()&&e(f,g,a),b.repository.isRegistered()&&e(f,g,b))};a.repository.collection.on("all",f),b.repository.collection.on("all",f),c.repository.collection.on("all",g)}])},{}],1116:[function(a,b,c){"use strict";angular.module("app-unifi-manage").run(["devices","batchEdit",function(a,b){var c=function(){return b.collection.filter(function(a){return"batch:uap"===a.modelType})},d=function(a){c().forEach(function(b){b.get("collection").remove(a)})},e=function(){c().forEach(function(a){a.get("collection").reset()})},f=function(){c().forEach(function(b){var c=[];b.get("collection").each(function(b){a.repository.collection.get(b)||c.push(b)}),c.length&&b.get("collection").remove(c)})},g=function(a){a.get("adopted")||c().forEach(function(b){b.get("collection").remove(a)})};a.repository.collection.on("remove",d),a.repository.collection.on("reset",e),a.repository.collection.on("sync",f),a.repository.collection.on("change:adopted",g)}])},{}],1117:[function(a,b,c){"use strict";angular.module("app-unifi-manage").run(["$templateCache",function(b){b.put("partials/cronSelection.html",a("../partials/cronSelection.jade")()),b.put("partials/propertyPanelDndPlaceholder.html",a("../partials/propertyPanelDndPlaceholder.jade")()),b.put("partials/propertyPanelStickyTitle.html",a("../partials/propertyPanelStickyTitle.jade")()),b.put("partials/selectedMapTableRow.html",a("../partials/selectedMapTableRow.jade")()),b.put("partials/simpleAttributesTableRow.html",a("../partials/simpleAttributesTableRow.jade")()),b.put("partials/statsRecentActivitiesSelectDeviceTableRow.html",a("../partials/statsRecentActivitiesSelectDeviceTableRow.jade")()),b.put("partials/eventMessageItem.html",a("../components/eventMessageItem/eventMessageItem.jade")())}])},{"../components/eventMessageItem/eventMessageItem.jade":498,"../partials/cronSelection.jade":1109,"../partials/propertyPanelDndPlaceholder.jade":1110,"../partials/propertyPanelStickyTitle.jade":1111,"../partials/selectedMapTableRow.jade":1112,"../partials/simpleAttributesTableRow.jade":1113,"../partials/statsRecentActivitiesSelectDeviceTableRow.jade":1114}],1118:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("activityReports",["BaseCollectionRepository","ReportCollection",function(a,b){this.repositories={ap:new a(new b("ap")),user:new a(new b("user")),site:new a(new b("site"))},this.repositories.ap.collection.setAttrs(["bytes","num_sta","time"]),this.repositories.user.collection.setAttrs(["bytes","num_sta","time"]),this.repositories.site.collection.setAttrs(["wlan_bytes","wlan-num_sta","time"]),this.setInterval=function(a){this.interval=a,Object.keys(this.repositories).forEach(function(b){this.repositories[b].collection.setInterval(a)}.bind(this))},this.setDateInterval=function(a,b){this.start=a,this.end=b,Object.keys(this.repositories).forEach(function(c){this.repositories[c].collection.setDateInterval(a,b)}.bind(this))},this.getInterval=function(){return this.interval},this.getStart=function(){return this.start},this.getEnd=function(){return this.end}}])},{}],1119:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("admins",["$q","$translate","BaseCollectionRepository","AdminCollection","SiteMgrModel","apiResults",function(a,b,c,d,e,f){this.repository=new c(new d),this.createAdmin=function(c,d){var g=this.repository.collection;return d=d||c.attributes,(new e).save({cmd:"create-admin",email:d.email,name:d.name,requires_new_password:d.requires_new_password||!1,role:d.role,x_password:d.x_password}).then(function(e){return c.set(c.parse(e.data)),g.add(c,{merge:!0}),a.when(b.instant("ADMIN_ACTIONS_CREATE_SUCCESS",{adminName:d.name}))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("ADMIN_ACTIONS_CREATE_ERROR",{adminName:d.name}),c))})},this.inviteAdmin=function(c,d){var g=this.repository.collection;return d=d||c.attributes,(new e).save({cmd:"invite-admin",email:d.email,for_sso:d.for_sso||!1,name:d.name,role:d.role}).then(function(e){return c.set(c.parse(e.data)),g.add(c,{merge:!0}),a.when(b.instant("ADMIN_ACTIONS_INVITE_SUCCESS",{adminName:d.name}))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("ADMIN_ACTIONS_INVITE_ERROR",{adminName:d.name}),c))})},this.editAdmin=function(c,d){var g=this.repository.collection;return d=d||c.attributes,(new e).save({cmd:"update-admin",admin:c.id,name:d.name,x_password:d.x_password,email:d.email,email_alert_enabled:!!d.email_alert_enabled,email_alert_grouping_enabled:!!d.email_alert_grouping_enabled,email_alert_grouping_delay:angular.isNumber(d.email_alert_grouping_delay)?d.email_alert_grouping_delay:void 0}).then(function(e){return c.set(c.parse(e.data)),g.add(c,{merge:!0}),a.when(b.instant("ADMIN_ACTIONS_EDIT_SUCCESS",{adminName:d.name}))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("ADMIN_ACTIONS_EDIT_ERROR",{adminName:d.name}),c))})},this.grantAdmin=function(c,d){var g=this.repository.collection;return d=d||c.attributes,(new e).save({cmd:"grant-admin",admin:c.id,role:d.role}).then(function(e){return c.set(c.parse(e.data)),g.add(c,{merge:!0}),a.when(b.instant("ADMIN_ACTIONS_GRANT_SUCCESS",{adminName:d.name}))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("ADMIN_ACTIONS_GRANT_ERROR",{adminName:d.name}),c))})},this.revokeAdmin=function(c){var d=this.repository.collection;return(new e).save({admin:c.id,cmd:"revoke-admin"}).then(function(){return d.remove(c.id),a.when(b.instant("ADMIN_ACTIONS_REVOKE_SUCCESS",{adminName:c.get("name")}))})["catch"](function(d){return a.reject(f.appendErrorMsg(b.instant("ADMIN_ACTIONS_REVOKE_ERROR",{adminName:c.get("name")}),d))})},this.grantSuperAdmin=function(c,d){var g=this.repository.collection;return d=d||c.attributes,(new e).save({cmd:"grant-super-admin",admin:c.id}).then(function(e){return c.set(c.parse(e.data)),g.add(c,{merge:!0}),a.when(b.instant("ADMIN_ACTIONS_GRANT_SUPER_SUCCESS",{adminName:d.name}))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("ADMIN_ACTIONS_GRANT_SUPER_ERROR",{adminName:d.name}),c))})},this.revokeSuperAdmin=function(c,d){var g=this.repository.collection;return d=d||c.attributes,(new e).save({cmd:"revoke-super-admin",admin:c.id}).then(function(e){return c.set(c.parse(e.data)),g.add(c,{merge:!0}),a.when(b.instant("ADMIN_ACTIONS_REVOKE_SUPER_SUCCESS",{adminName:d.name}))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("ADMIN_ACTIONS_REVOKE_SUPER_ERROR",{adminName:d.name}),c))})}}])},{}],1120:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("alertFrameUtils",["$rootScope","contextSwitchStates","frame","alerts","EVENTS",function(a,b,c,d,e){this.isOpen=function(){var a=c.getLayout("alertsLayout");return a&&a.showing},this.open=function(b){b&&b.stopPropagation(),a.$broadcast(e.CLOSE_SIDE_NAV_POPOVERS),this.isOpen()||(d.repositories.alerts.register().fetch(),c.show("alerts"))},this.close=function(){this.isOpen()&&(c.close("alerts"),d.repositories.alerts.unregister())},this.toggle=function(a){a&&a.stopPropagation(),this.isOpen()?this.close():this.open()},a.$on(e.CLOSE_SIDE_NAV_POPOVERS,function(){this.close()}.bind(this)),a.$on(b.getSuccess(),function(){this.close()}.bind(this))}])},{}],1121:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("alertUtils",["alerts","EventMgrModel",function(a,b){this.archiveAlert=function(c){return(new b).save({_id:c.get("_id"),cmd:"archive-alarm"}).then(function(){c.set("archived",!0),a.repositories.unread.model.decrementCount(),a.repositories.alerts.collection.getWithArchived()||(a.repositories.alerts.collection.remove(c),a.repositories.alerts.collection.setTotalAlerts(-1,!0))})},this.archiveAllAlerts=function(){return(new b).save({cmd:"archive-all-alarms"}).then(function(){a.repositories.unread.model.clearCount(),a.repositories.alerts.refresh({reset:!0})})}}])},{}],1122:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("alerts",["BaseCollectionRepository","BaseModelRepository","AlertCollection","UnreadAlertsModel",function(a,b,c,d){this.repositories={alerts:new a(new c),unread:new b(new d)},this.repositories.alerts.fetchMore=function(a){return this.collection.resolveMore(a)}}])},{}],1123:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("arrayUtils",[function(){this.sumArrays=function(){var a=Array.from(arguments),b=a.reduce(function(a,b){return Math.max(a,b.length)},0);return new Array(b).fill().map(function(b,c){return a.reduce(function(a,b){return a+(b[c]||0)},0)})}}])},{}],1124:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("atlasCoverageCalculator",["deviceCoverageCalculator","deviceRadioUtils","DEVICE_STATE_IDS","MAP_DEFAULTS",function(a,b,c,d){this.meterToPixels=function(a,b){var c=b.getZoom(),e=Math.pow(2,c),f=d.METERS_PER_PIXEL_AT_ZOOM_0*Math.cos(b.getCenter().lat()*Math.PI/180)/e;return a/f},this.calculateRadius=function(d,e,f,g){var h=b.getTransmitPower(d,f),i=b.getTransmitFrequency(d,f);if(d.get("state")===c.CONNECTED&&h>=0){var j=a.calculateMetricRadius(h,g,i),k=Math.max(this.meterToPixels(j,e),1);return Math.floor(k)}}}])},{}],1125:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SimpleFormDirective",["$timeout",function(a){var b=function(b,c,d){var e=b.charAt(0).toUpperCase()+b.slice(1);return{scope:angular.extend({},d||{},{model:"=unifi"+e+"Form",isDark:"=unifi"+e+"FormIsDark",isModal:"=unifi"+e+"FormIsModal",onSave:"&unifi"+e+"FormOnSave",onCancel:"&unifi"+e+"FormOnCancel",isReadOnly:"=unifi"+e+"FormIsReadOnly"}),controller:e+"FormController",controllerAs:b+"FormCtrl",template:c,link:function(b,c,d,e){b.directiveId=b.$id,b.onSubmit=function(a){a===!0&&b.onSave()},b.$watch("model",function(a){e.updateModel(a)}),b.$on("$destroy",function(){e.removeEventHandlers()}),a(function(){b.isLoaded=!0},0)}}};return b}])},{}],1126:[function(a,b,c){"use strict";function d(a,b,c){this.localStorageKey="columnStore:client",this.columnOptions=[{id:"name",translationKey:"CLIENT_TABLE_HEADER_NAME"},{id:"hostname",translationKey:"CLIENT_TABLE_HEADER_HOSTNAME"},{id:"mac",translationKey:"CLIENT_TABLE_HEADER_MAC_ADDRESS"},{id:"ip",translationKey:"CLIENT_TABLE_HEADER_IP"},{id:"1x_identity",translationKey:"CLIENT_TABLE_HEADER_8021X_IDENTITY"},{id:"vlan",translationKey:"CLIENT_TABLE_HEADER_8021X_VLAN"},{id:"status",translationKey:"CLIENT_TABLE_HEADER_STATUS"},{id:"usergroup_id",translationKey:"CLIENT_TABLE_HEADER_USER_GROUP"},{id:"connection",translationKey:"CLIENT_TABLE_HEADER_CONNECTION_WIRED"},{id:"uplink",translationKey:"CLIENT_TABLE_HEADER_AP_PORT"},{id:"channel",translationKey:"CLIENT_TABLE_HEADER_CHANNEL"},{id:"phy_mode",translationKey:"CLIENT_TABLE_HEADER_PHY_MODE"},{id:"signal",translationKey:"CLIENT_TABLE_HEADER_SIGNAL"},{id:"tx_rate",translationKey:"CLIENT_TABLE_HEADER_TX_RATE"},{id:"rx_rate",translationKey:"CLIENT_TABLE_HEADER_RX_RATE"},{id:"activity",translationKey:"CLIENT_TABLE_HEADER_ACTIVITY"},{id:"down",translationKey:"CLIENT_TABLE_HEADER_DOWN"},{id:"up",translationKey:"CLIENT_TABLE_HEADER_UP"},{id:"uptime",translationKey:"CLIENT_TABLE_HEADER_UPTIME"},{id:"actions",translationKey:"CLIENT_TABLE_HEADER_ACTIONS",isPermanent:!0}],this.views={"default":["name","ip","connection","uplink","activity","down","up","uptime"]},e.call(this,a,b,c)}var e=a("../../base-unifi/services/BaseListColumnStore");d.prototype=Object.create(e.prototype),d.constructor=d,d.prototype.setWiredFilter=function(a){this.isWired=a},d.prototype.setGuestFilter=function(a){this.isGuest=a},d.prototype.getPredefinedColumns=function(){var a=angular.copy(this.views["default"]);return this.isWired===!1&&(a.push("channel"),a.push("phy_mode"),a.push("signal")),this.isGuest&&a.push("status"),a},d.prototype.setColumns=function(){this.isCustomized?e.prototype.setColumns.call(this):this.columns=this.getPredefinedColumns()},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","LocalStorageBooleanValue"],angular.module("app-unifi-manage").service("clientListColumnStore",d)},{"../../base-unifi/services/BaseListColumnStore":1698}],1127:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("clientStateUtils",[function(){this.isClientConnected=function(a){return!(!a.get("mac")||a.get("blocked")||!a.get("uptime"))},this.isClientAuthorizable=function(a){return!(!a.get("is_guest")||!(!a.get("is_wired")||a.get("is_wired")&&a.get("gw_mac")))}}])},{}],1128:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("clientUplinkUtils",["devices",function(a){this.getUplink=function(b){return a.repository.collection.get(this.getUplinkMac(b))},this.getUplinkMac=function(a){return a.get("ap_mac")?a.get("ap_mac"):a.get("sw_mac")?a.get("sw_mac"):a.get("gw_mac")?a.get("gw_mac"):void 0},this.getUplinkDisplayName=function(a){var b=this.getUplink(a);return b?b.getDisplayName()+("usw"===b.get("type")&&a.get("sw_port")?" #"+a.get("sw_port"):""):""},this.getUplinkPropertyPanelState=function(a,b){if(b=b||this.getUplink(a),b&&"usw"===b.get("type"))return[{state:"port",value:a.get("sw_port"),overwrite:!0}]}}])},{}],1129:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("clientUtils",["$q","$translate","ClientHistoryCollection","ClientMgrModel","DeviceMgrModel","apiResults","OUI","UBNT_CLIENT_TYPES",function(a,b,c,d,e,f,g,h){function i(a,b,c){a.set(c),a.collection&&a.collection.trigger(b,a,c)}this.fetchClientHistory=function(a,b,d){return d=d||{},d.params={mac:a.get("mac"),_limit:b||50,_sort:"-assoc_time"},(new c).resolve(d)},this.saveClient=function(a,b,c){return a.savePartial(b,c).then(function(){a.collection&&a.collection.trigger("save",a,b)})},this.reconnectClient=function(c){return(new d).save({mac:c.get("mac"),cmd:"kick-sta"}).then(function(){return i(c,"action:reconnect",{uptime:void 0}),a.when(b.instant("CLIENT_ACTIONS_RECONNECT_NOTICE",{clientName:c.getDisplayName()}))})["catch"](function(d){return a.reject(f.appendErrorMsg(b.instant("CLIENT_ACTIONS_RECONNECT_ERROR",{clientName:c.getDisplayName()}),d))})},this.blockClient=function(c){return(new d).save({mac:c.get("mac"),cmd:"block-sta"}).then(function(){return i(c,"action:block",{blocked:!0}),a.when(b.instant("CLIENT_ACTIONS_BLOCK_NOTICE",{clientName:c.getDisplayName()}))})["catch"](function(d){return a.reject(f.appendErrorMsg(b.instant("CLIENT_ACTIONS_BLOCK_ERROR",{clientName:c.getDisplayName()}),d))})},this.unblockClient=function(c){return(new d).save({mac:c.get("mac"),cmd:"unblock-sta"}).then(function(){return i(c,"action:unblock",{blocked:!1}),a.when(b.instant("CLIENT_ACTIONS_UNBLOCK_NOTICE",{clientName:c.getDisplayName()}))})["catch"](function(d){return a.reject(f.appendErrorMsg(b.instant("CLIENT_ACTIONS_UNBLOCK_ERROR",{clientName:c.getDisplayName()}),d))})},this.authorizeGuest=function(c){return(new d).save({mac:c.get("mac"),cmd:"authorize-guest"}).then(function(){return i(c,"action:authorize",{authorized:!0}),a.when(b.instant("CLIENT_ACTIONS_AUTHORIZE_NOTICE",{clientName:c.getDisplayName()}))})["catch"](function(d){return a.reject(f.appendErrorMsg(b.instant("CLIENT_ACTIONS_AUTHORIZE_ERROR",{clientName:c.getDisplayName()}),d))})},this.unauthorizeGuest=function(c){return(new d).save({mac:c.get("mac"),cmd:"unauthorize-guest"}).then(function(){return i(c,"action:unauthorize",{authorized:!1}),a.when(b.instant("CLIENT_ACTIONS_UNAUTHORIZE_NOTICE",{clientName:c.getDisplayName()}))})["catch"](function(d){return a.reject(f.appendErrorMsg(b.instant("CLIENT_ACTIONS_UNAUTHORIZE_ERROR",{clientName:c.getDisplayName()}),d))})},this.queryDpiStats=function(a){return(new e).save({mac:a.get("mac"),cmd:"query-dpi-stats"})},this.getIconClassName=function(a){if(!a)return"";var b;return a.get("oui")===g.UBIQUITI&&(b=h.find(function(b){return b.match(a)},this)),b?b.className:a.get("is_guest")?a.get("is_wired")?"icon ubnt-icon--guest-wired":"icon ubnt-icon--guest-wireless":a.get("is_wired")?"icon ubnt-icon--user-wired":"icon ubnt-icon--user-wireless"}}])},{}],1130:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("clients",["BaseCollectionRepository","ClientCollection","inhibitor","CLIENT_FETCH_DEFAULTS",function(a,b,c,d){this.repository=new a(new b),this.repository.register();var e={},f=function(){var a=Object.keys(e);a.length>d.THRESHOLD?this.repository.collection.fetch():a.forEach(function(a){e[a].fetch()}),e={}}.bind(this),g=c(f,{debounceWait:d.DEBOUNCE_WAIT,leading:!0,throttleWait:d.THROTTLE_WAIT});this.fetchClient=function(a){e[a.get("mac")]=a,g()}}])},{}],1131:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("cloudKeySdCardCheck",["$q","account","featureFlag","frame","settings","system",function(a,b,c,d,e,f){this.resolve=function(){if(!c.isEnabled("withCloudKeySdCardCheck"))return a.when();if(!b.isSuperAdmin())return a.when();var g=e.getSettingFromKey("super_mgmt");return f.isCloudKey()&&!f.isCloudKeySdCardMounted()&&g.get("autobackup_enabled")?d.show("cloudKeySdCardCheck",{options:angular.noop}).then(function(){return e.saveSettings(g,{autobackup_enabled:!1},"mgmt")}):a.when()}}])},{}],1132:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("AdminCollection",["CORSCollection","AdminModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"cmd/sitemgr",sync:function(b,c,d){return d=d||{},"read"===b&&(d.type="POST",d.data=JSON.stringify({cmd:"get-admins"})),a.prototype.sync.call(this,b,c,d)}})}])},{}],1133:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("AlertCollection",["CORSCollection","AlertModel","featureFlag","resolveMixin","siteUrlMixin","structureMixin","webrtcMixin","ALERTS_DEFAULTS",function(a,b,c,d,e,f,g,h){return a.extend(d).extend(e).extend(f).extend(g).extend({model:b,siteUrl:function(){return c.isEnabled("withStatAlarmEndpoint")?"stat/alarm":"list/alarm"},meta:{count:0},getWithArchived:function(){return this._withArchived},setWithArchived:function(a){this._withArchived=a},getTotalAlerts:function(){return this.meta.count},setTotalAlerts:function(a,b){this.meta.count=b?this.meta.count+a:a},resolveMore:function(a){return a=a||{},a.params=a.params||{},a.params._limit=h.FETCH_PACK_SIZE,a.params._start=a.params._limit*Math.floor(this.length/a.params._limit),a.forceFetch=!0,this.resolve(a)},resolve:function(a){return a=a||{},a.params=a.params||{},a.params._limit=a.params._limit||h.REFRESH_PACK_SIZE,a.params._start=a.params._start||0,a.params._withcount=!0,c.isEnabled("withStatAlarmEndpoint")||(a.params._sortby=h.SORT_BY,a.params._sortasc=h.SORT_ASC),this._withArchived||(a.params.archived=!1),this.length&&!a.reset?(a.merge=!0,a.remove=!1):a.reset=!0,d.resolve.call(this,a)},reset:function(){return this.setTotalAlerts(0),a.prototype.reset.apply(this,arguments)},sync:function(b,c,d){return d=d||{},"read"===b&&d.params&&(d.type="POST",d.data=JSON.stringify(d.params),delete d.params),a.prototype.sync.call(this,b,c,d)}})}])},{}],1134:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("ClientCollection",["CORSCollection","ClientModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/sta"})}])},{}],1135:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("ClientHistoryCollection",["CORSCollection","ClientHistoryModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/session",sync:function(b,c,d){return d=d||{},"read"===b&&d.params&&(d.type="POST",d.data=JSON.stringify(d.params),delete d.params),a.prototype.sync.call(this,b,c,d)}})}])},{}],1136:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DashboardStatsCollection",["CORSCollection","CORSModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/dashboard",comparator:function(a){return[a.get("time")]},parse:function(a){if(a.data.length>24)for(var b=0;b<a.data.length-24;b++)a.data.shift();return a.data}})}])},{}],1137:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DpiAppCollection",["CORSCollection","DpiAppModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/dpiapp"})}])},{}],1138:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DpiGroupCollection",["CORSCollection","DpiGroupModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/dpigroup"})}])},{}],1139:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DynamicDnsCollection",["CORSCollection","DynamicDnsModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/dynamicdns"})}])},{}],1140:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DynamicDnsStatsCollection",["CORSCollection","DynamicDnsStatsModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/dynamicdns"})}])},{}],1141:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("EventCollection",["CORSCollection","EventModel","resolveMixin","siteUrlMixin","structureMixin","webrtcMixin","EVENTS_DEFAULTS",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/event",meta:{count:0,admin:0,lan:0,wlan:0},getWithin:function(){return this._within||1},setWithin:function(a){this._within=a},getTotalEvents:function(){return this.meta.count},setTotalEvents:function(a){this.meta.count=a},resetCounts:function(){this.meta.admin=0,this.meta.lan=0,this.meta.wlan=0},updateCounts:function(){this.resetCounts(),this.each(function(a){a.get("is_admin")&&this.meta.admin++,"wlan"===a.get("subsystem")&&this.meta.wlan++,"lan"===a.get("subsystem")&&this.meta.lan++}.bind(this)),this.meta.all=this.length},resolveMore:function(a){return a=a||{},a.params=a.params||{},a.params._limit=g.FETCH_PACK_SIZE,a.params._start=a.params._limit*Math.floor(this.length/a.params._limit),a.forceFetch=!0,this.resolve(a).then(this.updateCounts.bind(this))},resolve:function(a){return a=a||{},a.params=a.params||{},a.params._limit=a.params._limit||g.REFRESH_PACK_SIZE,a.params._start=a.params._start||0,a.params.within=this.getWithin(),this.length&&!a.reset?(a.merge=!0,a.remove=!1):a.reset=!0,c.resolve.call(this,a).then(this.updateCounts.bind(this))},reset:function(){return this.resetCounts(0),this.setTotalEvents(0),a.prototype.reset.apply(this,arguments)},sync:function(b,c,d){return d=d||{},"read"===b&&d.params&&(d.type="POST",d.data=JSON.stringify(d.params),delete d.params),a.prototype.sync.call(this,b,c,d)}})}])},{}],1142:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("FirewallGroupCollection",["CORSCollection","FirewallGroupModel","deepCopyMixin","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend(g).extend({model:b,siteUrl:"rest/firewallgroup"})}])},{}],1143:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("FirewallRuleCollection",["CORSCollection","FirewallRuleModel","deepCopyMixin","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend(g).extend({model:b,siteUrl:"rest/firewallrule"})}])},{}],1144:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("Hotspot2Collection",["CORSCollection","Hotspot2Model","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/hotspot2conf"})}])},{}],1145:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("KnownClientCacheCollection",["CORSCollection","KnownClientModel",function(a,b){return a.extend({model:b})}])},{}],1146:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("KnownClientCollection",["CORSCollection","KnownClientModel","siteUrlMixin","siteUrlWithinMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend(g).extend({model:b,siteUrl:"stat/alluser"})}])},{}],1147:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("MapCollection",["CORSCollection","MapModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"list/map",comparator:function(a){return[!a.get("attr_no_delete"),a.get("name")]}})}])},{}],1148:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("NeighboringAccessPointCollection",["CORSCollection","NeighboringAccessPointModel","siteUrlMixin","siteUrlWithinMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend(g).extend({within:null,model:b,siteUrl:"stat/rogueap"})}])},{}],1149:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("NetworkCollection",["CORSCollection","NetworkModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/networkconf"})}])},{}],1150:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PastConnectionCollection",["$q","CORSCollection","PastConnectionModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){var h=1e3;return b.extend(d).extend(e).extend(f).extend(g).extend({model:c,start:0,end:0,siteUrl:function(){return"stat/session?type=all&start="+this.start+"&end="+this.end},updateDateInterval:function(a,b){this.start=a/h,this.end=b/h},getStart:function(){return this.start*h},getEnd:function(){return this.end*h}})}])},{}],1151:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PastGuestAuthorizationCollection",["CORSCollection","PastGuestAuthorizationModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){var g=1e3;return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,start:0,end:0,siteUrl:function(){return"stat/authorization?start="+this.start+"&end="+this.end},updateDateInterval:function(a,b){this.start=a/g,this.end=b/g},getStart:function(){return this.start*g},getEnd:function(){return this.end*g}})}])},{}],1152:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PortForwardCollection",["CORSCollection","deepCopyMixin","PortForwardModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(b).extend(d).extend(e).extend(f).extend(g).extend({model:c,siteUrl:"rest/portforward"})}])},{}],1153:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PortForwardStatsCollection",["CORSCollection","PortForwardStatsModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/portforward"})}])},{}],1154:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RadiusProfileCollection",["CORSCollection","RadiusProfileModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/radiusprofile"})}])},{}],1155:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RadiusUserCollection",["CORSCollection","RadiusUserModel","resolveMixin","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(d).extend(e).extend(c).extend(f).extend({model:b,siteUrl:"rest/account"})}])},{}],1156:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RemoteUserVpnCollection",["CORSCollection","RemoteUserVpnModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/remoteuservpn"})}])},{}],1157:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RoutingCollection",["CORSCollection","RoutingModel","deepCopyMixin","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend(g).extend({model:b,siteUrl:"rest/routing"})}])},{}],1158:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RoutingStatsCollection",["CORSCollection","RoutingStatsModel","deepCopyMixin","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend(g).extend({model:b,siteUrl:"stat/routing"})}])},{}],1159:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("StreamCollection",["CORSCollection","siteUrlMixin","StreamModel","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(b).extend(d).extend(e).extend(f).extend({model:c,siteUrl:"stat/stream"})}])},{}],1160:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("StreamDeviceCollection",["CORSCollection","StreamDeviceModel",function(a,b){return a.extend({model:b})}])},{}],1161:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SwitchPortCollection",["CORSCollection","SwitchPortModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/portconf"})}])},{}],1162:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SwitchStatsPortCollection",["SwitchPortCollection","SwitchStatsPortModel",function(a,b){return a.extend({model:b})}])},{}],1163:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("TagCollection",["CORSCollection","TagModel","deepCopyMixin","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend(g).extend({model:b,siteUrl:"rest/tag"})}])},{}],1164:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("UserGroupCollection",["CORSCollection","UserGroupModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){
return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/usergroup",getDefault:function(){return this.findWhere({attr_hidden_id:"Default"})}})}])},{}],1165:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("WlanDpiCollection",["CORSCollection","CORSModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/wlandpi"})}])},{}],1166:[function(a,b,c){"use strict";var d=a("moment-twitter");angular.module("app-unifi-manage").service("alertsComparator",["collectionViewComparator",function(a){return{datetime:function(b,c){var e=+d(b.get("datetime")).format("YYYYMMDDHHmm"),f=+d(c.get("datetime")).format("YYYYMMDDHHmm");return a(e,f)}}}])},{"moment-twitter":236}],1167:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("clientsComparator",["collectionViewComparator","clientUplinkUtils","ipUtils","userGroups",function(a,b,c,d){var e={undefined:1,"false":1,"true":2},f={undefined:1,"false":1,"true":2};return{state:function(b,c){return e[b.get("is_wired")]===e[c.get("is_wired")]?f[b.get("is_guest")]===f[c.get("is_guest")]?a(b.getDisplayName(),c.getDisplayName()):a(f[b.get("is_guest")],f[c.get("is_guest")]):a(e[b.get("is_wired")],e[c.get("is_wired")])},ip:function(b,d){var e=c.ip2long(b.get("ip")),f=c.ip2long(d.get("ip"));return a(e,f)},name:function(b,c){var d=b.getDisplayName(),e=c.getDisplayName();return a(d,e)},connection:function(b,c){var d=b.getConnection(),e=c.getConnection();return a(d,e)},uplink:function(c,d){var e=b.getUplinkMac(c),f=b.getUplinkMac(d);if(e===f){var g=b.getUplink(c);return g&&"usw"===g.get("type")?a(c.get("sw_port"),d.get("sw_port")):0}return a(b.getUplinkDisplayName(c),b.getUplinkDisplayName(d))},phy_mode:function(b,c){var d=b.get("radio_proto"),e=c.get("radio_proto");return d===e?a(b.get("powersave_enabled"),c.get("powersave_enabled")):a(d,e)},usergroup_id:function(b,c){var e=b.get("usergroup_id"),f=c.get("usergroup_id");if(e&&f){var g=d.repository.collection.get(e),h=d.repository.collection.get(f);return a(g&&g.get("name"),h&&h.get("name"))}return e?-1:f?1:0}}}])},{}],1168:[function(a,b,c){"use strict";var d=a("moment-twitter");angular.module("app-unifi-manage").service("eventsComparator",["collectionViewComparator",function(a){return{datetime:function(b,c){var e=+d(b.get("datetime")).format("YYYYMMDDHHmm"),f=+d(c.get("datetime")).format("YYYYMMDDHHmm");return a(e,f)}}}])},{"moment-twitter":236}],1169:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("knownClientsComparator",["collectionViewComparator",function(a){return{name:function(b,c){var d=b.getDisplayName(),e=c.getDisplayName();return a(d,e)}}}])},{}],1170:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("manageDevicesComparator",["collectionViewComparator","devicesComparator","gatewayUtils","ipUtils","DEVICE_TYPES",function(a,b,c,d,e){return angular.extend({},b,{ip:function(b,f){var g=(b.get("type")===e.GATEWAY?c.getIpByPortId("lan",b):null)||b.get("ip"),h=(f.get("type")===e.GATEWAY?c.getIpByPortId("lan",f):null)||f.get("ip");return a(d.ip2long(g),d.ip2long(h))}})}])},{}],1171:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("neighboringAccessPointsComparator",["collectionViewComparator",function(a){return{aps_count:function(b,c){return a((b.get("aps")||[]).length,(c.get("aps")||[]).length)},is_rogue:function(b,c){var d=b.get("is_rogue"),e=c.get("is_rogue");return d!==e?a(d,e):a(b.get("last_seen"),c.get("last_seen"))}}}])},{}],1172:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("pastConnectionsComparator",["clients","collectionViewComparator",function(a,b){return{name:function(c,d){var e=a.repository.collection.get(c.get("mac")),f=a.repository.collection.get(d.get("mac")),g=e?e.getDisplayName():c.getDisplayName(),h=f?f.getDisplayName():d.getDisplayName();return b(g,h)}}}])},{}],1173:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("portForwardStatsComparator",["collectionViewComparator",function(a){return{proto:function(b,c){var d=b.get("proto"),e=c.get("proto");return"tcp_udp"!==d&&"tcp_udp"!==e||d===e?a(d,e):"tcp_udp"===d?1:-1},src:function(b,c){var d=b.get("src")||"any",e=c.get("src")||"any";return"any"!==d&&"any"!==e||d===e?a(d,e):"any"===d?-1:1}}}])},{}],1174:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("streamDevicesComparator",["collectionViewComparator","devices",function(a,b){return{device:function(c,d){var e=b.repository.collection.get(c.get("mac")),f=b.repository.collection.get(d.get("mac")),g=e?e.getDisplayName():c.get("mac"),h=f?f.getDisplayName():d.get("mac");return a(g,h)}}}])},{}],1175:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("switchStatsComparator",["collectionViewComparator","switchUtils",function(a,b){return{device:function(c,d){var e=b.getPortDevice(c),f=b.getPortDevice(d);return e===f?a(c.get("port_idx"),d.get("port_idx")):a(e.getDisplayName(),f.getDisplayName())},link_status:function(c,d){return a(b.getPortStatus(c),b.getPortStatus(d))},networks_vlans:function(c,d){return a(b.getPortNetworksVlans(c),b.getPortNetworksVlans(d))},op_mode:function(c,d){return a(b.getPortOperationMode(c),b.getPortOperationMode(d))},poe_class:function(c,d){var e=b.isPowerDeviceDetected(c),f=b.isPowerDeviceDetected(d);return e||f?e&&f?a(c.get("poe_class"),d.get("poe_class")):e?1:-1:0},poe_detection:function(c,d){return a(b.getPortPoeDetection(c),b.getPortPoeDetection(d))},poe_mode:function(c,d){var e=b.getPortPoeMode(c),f=b.getPortPoeMode(d);if((""===e||""===f)&&e!==f)return""===e?-1:1;if(("off"===e||"off"===f)&&e!==f)return"off"===e?-1:1;if("auto"===e&&"auto"===f)return a(parseFloat(c.get("poe_power")),parseFloat(d.get("poe_power")));if("pasv24"===e||"pasv24"===f){if("auto"===f)return-1;if("auto"===e)return 1}return a(e,f)},stp_state:function(c,d){return a(b.getPortStpStatus(c),b.getPortStpStatus(d))}}}])},{}],1176:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("wirelessNetworksComparator",["collectionViewComparator","RADIUS_VLAN_OPTIONS",function(a,b){var c={};return c[b.ENABLED]=1,c[b.REQUIRED]=2,c[b.DISABLED]=3,c[void 0]=3,{vlan:function(b,d){var e=b.get("vlan")||5e3,f=d.get("vlan")||5e3;return e===f?a(c[b.get("radius_vlan")],c[d.get("radius_vlan")]):a(e,f)}}}])},{}],1177:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("devicePropertiesPortsControllerMixin",["$timeout","scroller","ELEMENTS",function(a,b,c){return function(d){angular.extend(d,{selectedPorts:{},editedPort:null,isEditingPorts:!1,highlightPort:function(d,e){this.isEditingPorts||(this.setActiveTab("ports"),this.highlightedPort=d.get("port_idx"),e&&a(function(){b.transitionToElement("portRow"+this.model.get("_id")+"-"+d.get("port_idx"),-c.PANEL_STICKY_TITLE_HEIGHT)}.bind(this),0))},togglePortSelection:function(a,b){return this.isEditingPorts?b=this.selectedPorts[a.get("port_idx")]:(this.isPortSelectable(a)?void 0===b&&(b=!this.selectedPorts[a.get("port_idx")]):b=!1,b?this.selectedPorts[a.get("port_idx")]=!0:delete this.selectedPorts[a.get("port_idx")]),b},isPortSelectable:function(a){return a&&!a.get("aggregated_by")&&"switch"===a.get("op_mode")},isPortSelected:function(a){return a&&this.selectedPorts[a.get("port_idx")]===!0},editPort:function(a){this.editedPort=a},cancelEditPort:function(){this.editedPort=null}})}}])},{}],1178:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("listBatchEditControllerMixin",["batchEdit",function(a){return function(b,c,d,e,f,g){angular.extend(b,{getBatchEditModel:function(){return a.getBatch(c)||a.addBatch(c,d,{collection:e?new e:void 0,batchModel:f?new f:void 0,model:g})},getBatchEditCollection:function(){return this.getBatchEditModel().get("collection")},getBatchEditableModels:function(){return this.view.getModels().filter(this.isBatchEditAllowed.bind(this))},isBatchEditable:function(){return this.columnStore.getBatchEditable()},isBatchEditSelected:function(a){return!!this.getBatchEditCollection().get(a)},toggleBatchEdit:function(a){this.isBatchEditSelected(a)?this.getBatchEditCollection().remove(a):this.getBatchEditCollection().add(a)},toggleSelectAllBatchEdit:function(a,b){(this.selectAllBatchEdit=angular.isUndefined(a)?!this.selectAllBatchEdit:a)?b||(this.isBatchEditAllowed?this.getBatchEditCollection().reset(this.getBatchEditableModels()):this.getBatchEditCollection().reset(this.view.getModels())):b||this.getBatchEditCollection().reset()}})}}])},{}],1179:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("customPortalPreview",[function(){function a(a){return a}function b(a){return angular.isObject(a)?a.url:a}function c(a){var b={};if(a)return b=Object.keys(f).reduce(function(b,c){var d=c.replace("portal_customized_","");return b[d]=f[c](a.get(c)),b},{}),angular.extend(e.hotspotConfig,b)}function d(a){return a.map(function(a){return a.attributes})}var e={hotspotConfig:{},hotspotPackages:[]},f={auth:a,facebook_enabled:a,google_enabled:a,payment_enabled:a,portal_customized_bg_color:a,portal_customized_bg_image_enabled:a,portal_customized_bg_image_filename:b,portal_customized_bg_image_tile:a,portal_customized_box_color:a,portal_customized_box_link_color:a,portal_customized_box_text_color:a,portal_customized_box_opacity:a,portal_customized_button_color:a,portal_customized_button_text_color:a,portal_customized_languages:a,portal_customized_link_color:a,portal_customized_logo_enabled:a,portal_customized_logo_filename:b,portal_customized_text_color:a,portal_customized_tos:a,portal_customized_tos_enabled:a,portal_customized_welcome_text:a,portal_customized_welcome_text_enabled:a,portal_customized_welcome_text_position:a,voucher_enabled:a};this.getPreviewModel=function(a,b){return e.hotspotConfig=c(a),e.hotspotPackages=d(b),e}}])},{}],1180:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("d3ChannelTrapezoidPoints",[function(){function a(a){a=angular.extend({},b,a);var c=a.scaleHeight*a.height,d=c/a.height,e=a.cutRight*d,f=a.cutLeft*d;return[[0,a.height],[a.width,a.height],[a.width-e,a.height-c],[f,a.height-c],[0,a.height]]}var b={scaleHeight:1,cutLeft:0,cutRight:0};return a}])},{}],1181:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("d3RfEnvironmentInterferenceScale",["d3",function(a){return a.scale.linear().domain([-120,-92,-78,-64,-50,0]).range(["hsl(34, 98%, 61%)","hsl(34, 98%, 61%)","hsl(34, 98%, 51%)","hsl(15, 83%, 51%)","hsl(15, 83%, 41%)","hsl(15, 83%, 41%)"])}])},{}],1182:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("d3RfEnvironmentRssiInterferenceScale",["d3",function(a){return a.scale.linear().domain([-120,-92,-78,-64,-50,0]).range(["hsl(34, 98%, 61%)","hsl(34, 98%, 61%)","hsl(34, 98%, 51%)","hsl(15, 83%, 51%)","hsl(15, 83%, 41%)","hsl(15, 83%, 41%)"])}])},{}],1183:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dashboardStats",["BaseCollectionRepository","DashboardStatsCollection",function(a,b){function c(a){return a}function d(a){return 8*a}function e(a,b,c){var d={label:c};return Object.keys(f).forEach(function(c){var e=f[c],g=b.get(c);d[e.to]=g?e.transpose(g):null,e.value&&g&&(a.notEmpty=!0)}),a.entries.push(d),a}this.repository=new a(new b);var f={latency_avg:{to:"latencyMs",transpose:c,value:!0},"tx_bytes-r":{to:"upload",transpose:d,value:!0},"rx_bytes-r":{to:"download",transpose:d,value:!0},"max_tx_bytes-r":{to:"maxUpload",transpose:d,value:!0},"max_rx_bytes-r":{to:"maxDownload",transpose:d,value:!0},time:{to:"time",transpose:c,value:!1}};this.getChartData=function(){var a=this.repository.collection.reduce(e,{entries:[],notEmpty:!1});return a}}])},{}],1184:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DataConverter",["binaryPrefix","mergeDefaults","objectUtils",function(a,b,c){var d=function(){};return d.prototype.withMap=function(a,b){return this.map=function(c){var d=b?c:{};return Object.keys(a).forEach(function(b){d[b]=c[a[b]],b!==a[b]&&delete d[a[b]]}),d},this},d.prototype.sortedBy=function(a,b){return this.sort=function(c,d){var e=c[a]-d[a];return b?-e:e},this},d.prototype.withUnknownDefaults=function(a){return this.unknownDefaults=a,this},d.prototype.withOtherDefaults=function(a){return this.otherDefaults=a,this},d.prototype.compactUnknown=function(a,b){return this.processUnknown=function(){this.unknown=c.appendAll(this.data.filter(function(b){return a(b)},this),b),this.unknown&&(this.unknown.generated=!0),this.data=this.data.filter(function(b){return!a(b)},this)},this},d.prototype.countTotal=function(a){return this.processTotal=function(){this.total=c.appendAll(this.data,a)||{}},this},d.prototype.withBinaryNormalization=function(a,b){return this.normalize=!0,this.useSamePrefix=b,this.normalizeExclusions=a||[],this},d.prototype.withLimit=function(a,b,d){return this.applyLimit=function(){var e=a;(this.unknown||b&&this.data.length>e)&&e--,!b&&this.data.length>=e&&e--,this.other=c.appendAll(this.data.slice(e),d),this.other&&(this.other.generated=!0),this.data=this.data.splice(0,e),b&&(this.unknown=this.unknown?c.append(this.unknown,this.other):this.other,this.other=void 0)},this},d.prototype.deduplicatedBy=function(a,b){return this.processUnique=function(){this.data=c.reduceDuplicates(this.data,a,b)},this},d.prototype.withPadding=function(a){return this.doPadding=function(){if(0!==this.data.length){for(var b=0,c=[],d=parseInt(a.start);d<=parseInt(a.end);d+=a.grain)if(d=a.normalize?a.normalize(d):d,b===this.data.length-1&&d>=this.data[b][a.property]+a.grain||d<=this.data[b][a.property]-a.grain){var e={};e[a.property]=d,c.push(e)}else b<this.data.length-1&&b++;this.data=this.data.concat(c)}},this},d.prototype.apply=function(a){return a=this.process(a),this.unknown&&a.push(b(Object.create(this.unknownDefaults||{}),this.unknown)),this.other&&a.push(b(Object.create(this.otherDefaults||{}),this.other)),{data:a,units:this.units,total:this.total}},d.prototype.process=function(b){if(this.data=b,this.map&&(this.data=this.data.map(this.map)),this.normalize){this.maxValues=this.data.reduce(function(a,b){return Object.keys(b).forEach(function(c){this.normalizeExclusions.indexOf(c)===-1&&(void 0===a[c]||b[c]>a[c])&&(a[c]=b[c])},this),a}.bind(this),{});var c=Math.max.apply(null,Object.keys(this.maxValues).map(function(a){return this.maxValues[a]||0},this));this.units=Object.keys(this.maxValues).reduce(function(b,d){return b[d]=a.parse(this.useSamePrefix?c:this.maxValues[d]).prefix,b}.bind(this),{}),this.data=this.data.map(function(b){return b.raw=b.raw||{},Object.keys(this.units).forEach(function(c){b.raw[c]=b[c],b[c]=a.normalizeToPrefix(this.units[c],b[c])},this),b},this)}return this.sort&&(this.data=this.data.sort(this.sort)),this.processTotal&&this.processTotal(),this.processUnique&&this.processUnique(),this.processUnknown&&this.processUnknown(),this.sort&&(this.data=this.data.sort(this.sort)),this.applyLimit&&this.applyLimit(),this.doPadding&&(this.doPadding(),this.sort&&(this.data=this.data.sort(this.sort))),this.data},d}])},{}],1185:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dataRetentionUpdate",["$q","frame","localStorageFailSafe","LocalStorageBooleanValue","system",function(a,b,c,d,e){this.dataRetentionDaysStorage=new d(c,"data_retention_days_check"),this.dataRetentionDaysStorage.hydrate(),this.isDataRetentionDaysChecked=this.dataRetentionDaysStorage.getValue(),this.resolve=function(){if(!this.isDataRetentionDaysChecked&&e.isCloudKey()){var c=e.repository.model.get("data_retention_days");if(!c||c===-1)return b.show("updateDataRetentionDays",{options:angular.noop}).then(function(a){return e.setDataRetention(a)})["catch"](function(){return a.when()})["finally"](function(){this.dataRetentionDaysStorage.setValue(!0)}.bind(this))}return a.when()}}])},{}],1186:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("deviceBatchUtils",["$q","$translate","DeviceMgrModel","SiteMgrModel","apiResults","repositoryUtils","DEVICE_STATE_IDS",function(a,b,c,d,e,f,g){this._executeDeviceCommand=function(a,b,d){var e=new c;return d&&(e._forceSite=d.get("name")),b=b||{},b.cmd=a,e.save(b)},this._executeSiteCommand=function(a,b){var c=new d;return b=b||{},b.cmd=a,c.save(b)},this.saveDevices=function(c,d,g){var h={id:c.get("collection").pluck("_id"),data:d};return c.savePartial(h,g).then(function(){return f.getRepository("devices").refresh(),c.get("model").clear(),(c.get("success")||[]).length?(c.get("error")||[]).length?a.when(b.instant("DEVICE_PROPERTIES_CHANGES_BATCH_APPLY_MIXED")):a.when(b.instant("DEVICE_PROPERTIES_CHANGES_BATCH_APPLY_SUCCESS")):a.when(b.instant("DEVICE_PROPERTIES_CHANGES_BATCH_APPLY_NONE"))})["catch"](function(c){return a.reject(e.appendErrorMsg(b.instant("DEVICE_PROPERTIES_CHANGES_BATCH_APPLY_ERROR"),c))})},this.savePendingChanges=function(c,d){var g={id:c.get("collection").pluck("_id"),data:c.get("model").getPendingAttributes()};return c.savePartial(g,d).then(function(){return f.getRepository("devices").refresh(),c.get("model").clearPendingChanges(),(c.get("success")||[]).length?(c.get("error")||[]).length?a.when(b.instant("DEVICE_PROPERTIES_PENDING_CHANGES_BATCH_APPLY_MIXED")):a.when(b.instant("DEVICE_PROPERTIES_PENDING_CHANGES_BATCH_APPLY_SUCCESS")):a.when(b.instant("DEVICE_PROPERTIES_PENDING_CHANGES_BATCH_APPLY_NONE"))})["catch"](function(c){return a.reject(e.appendErrorMsg(b.instant("DEVICE_PROPERTIES_PENDING_CHANGES_BATCH_APPLY_ERROR"),c))})},this.upgradeDevices=function(c,d){var h={macs:c.get("collection").pluck("mac")};return d&&(h.url=d),this._executeDeviceCommand(d?"upgrade-external":"upgrade",h).then(function(){return c.get("collection").each(function(a){a.set({state:g.UPGRADING})}),a.when(b.instant("DEVICE_ACTIONS_BATCH_UPGRADE_NOTICE",{count:h.macs.length}))})["catch"](function(c){return f.getRepository("devices").refresh(),a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_BATCH_UPGRADE_ERROR"),c))})},this.forgetDevices=function(c){var d={macs:c.get("collection").pluck("mac")};return this._executeSiteCommand("delete-device",d).then(function(){return f.getRepository("devices").collection.remove(c.get("collection").models),a.when(b.instant("DEVICE_ACTIONS_BATCH_FORGET_SUCCESS",{count:d.macs.length},"messageformat"))})["catch"](function(c){return f.getRepository("devices").refresh(),a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_BATCH_FORGET_ERROR"),c))})}}])},{}],1187:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("deviceCoverageCalculator",["deviceRadioUtils","DEVICE_STATE_IDS","DEVICE_TYPES","mapFeatures",function(a,b,c,d){this.calculateMetricRadius=function(a,b,c){var d=40,e=a-d-b;return Math.pow(10,(e+27.55)/20)/c},this.calculateDeviceMetricRadius=function(e){var f=0;if(e.get("type")===c.AP){var g=d.getCoverageRadioType(),h=a.getTransmitPower(e,g);if(e.get("state")===b.CONNECTED&&h>=0){var i=a.getTransmitFrequency(e,g),j=d.getReceiverSensitivity();f=this.calculateMetricRadius(h,j,i)}}return f}}])},{}],1188:[function(a,b,c){"use strict";function d(a,b,c){this.localStorageKey="columnStore:device",this.columnOptions=[{id:"state",translationKey:"DEVICE_TABLE_HEADER_ICON",isPermanent:!0},{id:"name",translationKey:"DEVICE_TABLE_HEADER_NAME"},{id:"mac",translationKey:"DEVICE_TABLE_HEADER_MAC_ADDRESS"},{id:"ip",translationKey:"DEVICE_TABLE_HEADER_IP"},{id:"stateString",translationKey:"DEVICE_TABLE_HEADER_STATUS"},{id:"model",translationKey:"DEVICE_TABLE_HEADER_MODEL"},{id:"version",translationKey:"DEVICE_TABLE_HEADER_VERSION"},{id:"uptime",translationKey:"DEVICE_TABLE_HEADER_UPTIME"},{id:"clients",translationKey:"DEVICE_TABLE_HEADER_CLIENTS"},{id:"down",translationKey:"DEVICE_TABLE_HEADER_DOWN"},{id:"up",translationKey:"DEVICE_TABLE_HEADER_UP"},{id:"wlan2g",translationKey:"DEVICE_TABLE_HEADER_WLAN2G"},{id:"wlan5g",translationKey:"DEVICE_TABLE_HEADER_WLAN5G"},{id:"radio2g",translationKey:"DEVICE_TABLE_HEADER_RADIO2G"},{id:"radio5g",translationKey:"DEVICE_TABLE_HEADER_RADIO5G"},{id:"clients2g",translationKey:"DEVICE_TABLE_HEADER_2G_CLIENTS"},{id:"clients5g",translationKey:"DEVICE_TABLE_HEADER_5G_CLIENTS"},{id:"tx",translationKey:"DEVICE_TABLE_HEADER_TX"},{id:"rx",translationKey:"DEVICE_TABLE_HEADER_RX"},{id:"tx2g",translationKey:"DEVICE_TABLE_HEADER_TX2G"},{id:"tx5g",translationKey:"DEVICE_TABLE_HEADER_TX5G"},{id:"channel",translationKey:"DEVICE_TABLE_HEADER_CHANNEL"},{id:"chutil2g",translationKey:"DEVICE_TABLE_HEADER_CHUTIL2G"},{id:"chutil5g",translationKey:"DEVICE_TABLE_HEADER_CHUTIL5G"},{id:"actions",translationKey:"DEVICE_TABLE_HEADER_ACTIONS",isPermanent:!0}],this.columnPresets=[{id:"default",translationKey:"DEVICE_COLUMNS_PRESET_DEFAULT"},{id:"ugw_usw",translationKey:"DEVICE_COLUMNS_PRESET_GATEWAY_SWITCHES"},{id:"uap",translationKey:"DEVICE_COLUMNS_PRESET_AP_OVERVIEW"},{id:"uap:performance",translationKey:"DEVICE_COLUMNS_PRESET_AP_PERFORMANCE"},{id:"uap:config",translationKey:"DEVICE_COLUMNS_PRESET_AP_CONFIG"},{id:"all",translationKey:"DEVICE_COLUMNS_PRESET_ALL"}],this.views={"default":["name","ip","stateString","model","version","uptime"],ugw_usw:["name","ip","stateString","model","down","up"],uap:["name","ip","stateString","model","clients","down","up","channel"],"uap:performance":["name","ip","stateString","clients2g","clients5g","tx","rx","tx2g","tx5g","channel"],"uap:config":["name","stateString","version","wlan2g","wlan5g","radio2g","radio5g"]},e.call(this,a,b,c)}var e=a("../../base-unifi/services/BaseListColumnStore");d.prototype=Object.create(e.prototype),d.constructor=d,d.prototype.setDeviceTypes=function(a){this.deviceTypes=a},d.prototype.setColumnGroup=function(a){this.columnGroup=a},d.prototype.getPredefinedColumns=function(){var a=[];return this.deviceTypes&&a.push(angular.isArray(this.deviceTypes)?this.deviceTypes.join("_"):this.deviceTypes),this.columnGroup&&a.push(this.columnGroup),this.views[a.join(":")]||this.views["default"]},d.prototype.setColumns=function(){this.isCustomized?e.prototype.setColumns.call(this):this.columns=this.getPredefinedColumns()},d.prototype.setColumnPreset=function(a){var b="all"===a?this.getAllColumns():this.views[a];b&&b.length&&(this.clearSelectedColumns(),this.columns=b,this.setCustomized(!0),this.saveColumns())},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","LocalStorageBooleanValue"],angular.module("app-unifi-manage").service("deviceListColumnStore",d)},{"../../base-unifi/services/BaseListColumnStore":1698}],1189:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("deviceUplinkUtils",["devices","deviceStateUtils",function(a,b){this.getUplinkAttrs=function(a,c){var d=c||"uplink";return b.isDeviceConnected(a)?a.get(d):a.get("last_"+d)||a.get(d)},this.getUplink=function(b,c){var d=this.getUplinkAttrs(b,c);if(d){if(d.hasOwnProperty("uplink_mac"))return a.repository.collection.get(d.uplink_mac);if(d.hasOwnProperty("ap_mac")&&"wireless"===d.type)return a.repository.collection.get(d.ap_mac)}},this.getUplinkDisplayName=function(a,b){var c=this.getUplink(a,b),d=this.getUplinkAttrs(a);return c?c.getDisplayName()+(d.uplink_remote_port?" #"+d.uplink_remote_port:""):""},this.isWirelessUplinkAvailable=function(a){return!!a.get("vwireEnabled")&&(!b.isDeviceConnected(a)||"wireless"===a.getNested("uplink.type")||a.get("uplink_table").where({configured:!0}).length>0)},this.getDevicesWithUplink=function(b){return a.repository.collection.filter(function(a){return a.getNested("uplink.type")===b})},this.isUplinkAggregated=function(a){var b=this.getUplinkAttrs(a);if(b){var c=b.port_idx,d=a.get("port_table");if(d&&c){var e=d.findWhere({port_idx:c});return e.get("aggregated_by")!==!1}}return!1}}])},{}],1190:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("deviceWsMessageHandler",["devices","DeviceModel","wsAdapter",function(a,b,c){this.register=function(){c.on("device:update",function(c){if(c.data){var d=a.repository.collection.get(c.meta.mac)||new b({mac:c.meta.mac});d.set(c.data[0]),a.repository.collection.add(d,{merge:!0})}})}}])},{}],1191:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("devices",["$q","BaseCollectionRepository","DeviceCollection","deviceStateUtils","deviceUtils","discoveredDevices","DEVICE_STATES","DEVICE_TYPES",function(a,b,c,d,e,f,g,h){this.repository=new b(new c);var i=function(b){return b.filter(function(a){return a.get("type")===h.SWITCH&&a.get("adopted")&&a.get("port_table")}).forEach(function(a){a.get("port_table").each(function(b){b.set("device",a.id)})}),a.when(this.repository.collection)}.bind(this),j=function(){return f.mergeToDevicesCollection(this.repository.collection),a.when(this.repository.collection)}.bind(this);this.repository.fetch=function(){return b.prototype.fetch.apply(this,arguments).then(i).then(j)},f.repository.collection.onUpdate(j.bind(this)),this.repository.fetchGatewayDetails=function(){var b=e.getSiteGateway(this.collection);return b?b.resolve({cfg:!0}):a.when()},this.repository.register()}])},{}],1192:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("devicePropertiesActiveAccordionDirectiveMixin",["$timeout","propertyPanel",function(a,b){this.init=function(c,d,e,f,g){f.accordions[g]=f.accordions[g]||{},a(function(){c.$watch(function(){if(f.model)return b.getItemState(f.model,"activeAccordionGroup")},function(a){a&&(f.accordions[g][a]=!0,b.unsetItemState(f.model,"activeAccordionGroup",!1))})},0,!1)}}])},{}],1193:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("devicePropertiesConfigureBatchDirectiveMixin",[function(){this.init=function(a,b,c,d){a.withBatch&&d.initBatchEdit()}}])},{}],1194:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("devicePropertiesConfigureWithPendingDirectiveMixin",["EVENTS",function(a){this.init=function(b,c,d,e){e.isSaveQueued=b.isSaveQueued,e.pendingGroup=b.group,b.$on([a.PENDING_CHANGES_CANCELLED,b.group].join(":"),function(a,b){e.resetModelCopyAttrs(b)}),b.$on(a.PENDING_CHANGES_CANCELLED,function(a,b){e.resetModelCopyAttrs(b)})}}])},{}],1195:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("devicePropertiesPendingActionsDirectiveMixin",["deviceUtils","heyToasts","EVENTS",function(a,b,c){this.init=function(d,e,f,g){function h(a,b,e){d.$broadcast([c.PENDING_CHANGES_CANCELLED,b].join(":"),e)}function i(a,b){d.$broadcast(c.PENDING_CHANGES_CANCELLED,b)}function j(a,b){d.$broadcast(c.PENDING_CHANGES_APPLIED,b)}function k(a){a&&(a.on("pending:group:clear",h),a.on("pending:clear",i),a.on("pending:save",j))}function l(a){a&&(a.off("pending:group:clear",h),a.off("pending:clear",i),a.off("pending:save",j))}d.applyPendingChanges=function(c){return a.savePendingChanges(c,{wait:!0}).then(function(a){b.pushSuccess(a)})["catch"](function(a){b.pushError(a)})},d.$watch(function(){return g.model},function(a,b){l(b),k(a)}),d.$on("$destroy",function(){l(g.model)})}}])},{}],1196:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("devicePropertiesPortsDirectiveMixin",[function(){this.init=function(a,b,c,d){this.onSelectedPortsChange(a,d),this.onSelectedPortItemStateChange(a,d),this.onEditPortItemStateChange(a,d)},this.onSelectedPortsChange=function(a,b){a.$watchCollection(function(){return b.selectedPorts},function(){a.$broadcast("portSelectionChange")})},this.onSelectedPortItemStateChange=function(a,b){a.$watch(function(){if(a.model)return b.propertyPanel.getItemState(a.model,"port")},function(c){if(c){b.cancelEditPort();var d=a.model.get("port_table").findWhere({port_idx:c});d&&(b.togglePortSelection(d,!0),b.highlightPort(d,!0),b.propertyPanel.unsetItemState(a.model,"port"))}})},this.onEditPortItemStateChange=function(a,b){a.$watch(function(){if(a.model)return b.propertyPanel.getItemState(a.model,"editPort")},function(c){if(c){var d=a.model.get("port_table").findWhere({port_idx:c});d&&b.editPort(d)}})}}])},{}],1197:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("gatewayPropertiesDynamicDnsListDirectiveMixin",["propertyPanel",function(a){this.init=function(a,b,c,d){this.onEditDynamicDnsItemStateChange(a,d)},this.onEditDynamicDnsItemStateChange=function(b,c){b.$watch(function(){if(c.model)return a.getItemState(c.model,"editDynamicDns")},function(b){if(b){var d=c.dynamicDns.get(b);d&&(c.edit(d),a.unsetItemState(c.model,"editDynamicDns",!1))}})}}])},{}],1198:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("gatewayPropertiesPortForwardListDirectiveMixin",["propertyPanel",function(a){this.init=function(a,b,c,d){this.onEditPortForwardItemStateChange(a,d)},this.onEditPortForwardItemStateChange=function(b,c){b.$watch(function(){if(c.model)return a.getItemState(c.model,"editPortForward")},function(b){if(b){var d=c.portForwards.get(b);d&&(c.edit(d),a.unsetItemState(c.model,"editPortForward",!1))}})}}])},{}],1199:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("listBatchEditDirectiveMixin",[function(){this.init=function(a,b,c,d){a.$watch(function(){return d.getBatchEditCollection().length},function(a){0===a&&d.selectAllBatchEdit===!0&&d.toggleSelectAllBatchEdit(!1,!0)});var e=a.$watch(function(){return d.getBatchEditCollection().length},function(a){a&&a===d.getBatchEditableModels().length&&d.toggleSelectAllBatchEdit(!0,!0),e()})}}])},{}],1200:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("sharedAttrsDirectiveMixin",[function(){this.init=function(a,b,c,d,e){this.onModelCopyChange(a,d,e),this.onFormChange(a,d,e)},this.onModelCopyChange=function(a,b,c){a.$watch(function(){return b.modelCopy},function(b){b&&a.attrs&&angular.forEach(c,function(c){b.attributes[c]=a.attrs[c]})})},this.onFormChange=function(a,b,c){a.$watch(function(){if(b.modelCopy){var a={};return angular.forEach(c,function(c){a[c]=b.modelCopy.attributes[c]}),a}},function(b){b&&a.attrs&&angular.forEach(c,function(c){a.attrs[c]=b[c]})},!0)}}])},{}],1201:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dpiApps",["$q","BaseCollectionRepository","DpiAppCollection","featureFlag",function(a,b,c,d){this.repository=new b(new c),this.repository.fetch=function(c){return d.isEnabled("enableDpiBlocking")?b.prototype.fetch.call(this,c):a.when(this.collection)}}])},{}],1202:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dpiFilters",["devices","deviceFeatureUtils","objectUtils","wlanDpi","DEVICE_TYPES","STATS_DEFAULTS",function(a,b,c,d,e,f){var g,h=[],i=[],j=!1,k=function(){var c=d.repository.collection.map(function(a){return{name:a.get("name"),type:f.DPI.FILTER.SSID}}),h=a.repository.collection.where({type:e.AP}).filter(b.isDpiSupported,b).map(function(a){return{name:a.getDisplayName(),id:a.id,type:f.DPI.FILTER.DEVICE}});i=[].concat(c,h),g=void 0};this.getAllFilters=function(){return i},this.getSelectedFilters=function(){return h},this.getAvailableFilters=function(){return g||(g=i.filter(function(a){return!h.find(function(b){return angular.equals(b,a)})})),g},this.getActiveFilters=function(){return j?h.filter(function(a){return!!i.find(function(b){return angular.equals(a,b)})}).sort(function(a,b){return a.name.localeCompare(b.name)}):[]},this.selectFilters=function(a){a&&(a.forEach(function(a){var b=!!i.find(function(b){return angular.equals(a,b)});b&&h.push(a)}),g=void 0)},this.deselectFilters=function(a){a&&(h=h.filter(function(b){return!a.find(function(a){return angular.equals(b,a)})}),g=void 0)},this.isSelected=function(a){return h.some(function(b){return angular.equals(b,a)})},this.resetFilters=function(){h=[],k()},this.toggleFiltering=function(){j=!j},this.isEnabled=function(){return j},this.addEventHandlers=function(){d.repository.collection.on("sync",k)},this.removeEventHandlers=function(){d.repository.collection.off("sync",k)},k()}])},{}],1203:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dpiGroups",["$q","BaseCollectionRepository","DpiGroupCollection","featureFlag",function(a,b,c,d){
this.repository=new b(new c),this.repository.fetch=function(c){return d.isEnabled("enableDpiBlocking")?b.prototype.fetch.call(this,c):a.when(this.collection)}}])},{}],1204:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dpiStats",["BaseModelRepository","contextSwitchStates","devices","dpi","dpiFilters","DpiStatsModel","objectUtils","settings","sites","wlanDpi","STATS_DEFAULTS",function(a,b,c,d,e,f,g,h,i,j,k){this.repository=new a(new f);var l=[],m=[];this.dpiStatsTables=[];var n=0;this.addEventHandlers=function(){0===n++&&(this.repository.model.on("sync",this.parse,this),j.repository.collection.on("sync",this.parse,this))},this.removeEventHandlers=function(){0===--n&&(this.repository.model.off("sync",this.parse,this),j.repository.collection.off("sync",this.parse,this),this.clear())},this.isDpiDataAvailable=function(){return this.repository.model&&this.repository.model.get("last_updated")};var o=function(){var a=[],b=e.getActiveFilters();return b.some(function(a){return a.type===k.DPI.FILTER.SSID})&&(a=j.repository.collection.filter(function(a){return!!b.find(function(b){return b.type===k.DPI.FILTER.SSID&&b.name===a.get("name")})}).map(function(a){return a.get("dpistats_table")})),a},p=function(){var a=[],b=e.getActiveFilters();return b.some(function(a){return a.type===k.DPI.FILTER.DEVICE})&&(a=c.repository.collection.filter(function(a){return!!b.find(function(b){return b.type===k.DPI.FILTER.DEVICE&&b.id===a.id})}).map(function(a){return a.get("dpistats_table")})),a},q=function(){var a=[],b=e.getActiveFilters();return 0===b.length?this.isDpiDataAvailable()&&a.push(this.repository.model.toJSON()):a=a.concat(o(),p()),a.filter(function(a){return!!a})}.bind(this);this.clear=function(){l=[],m=[]},this.parse=function(){this.clear(),this.dpiStatsTables=q(),this.categoriesTotal=0,this.appsTotal=0,this.dpiStatsTables.forEach(function(a){a.by_app&&(a.by_app.forEach(function(a){this.appsTotal+=a.tx_bytes+a.rx_bytes},this),l.push(a.by_app)),a.by_cat&&(a.by_cat.forEach(function(a){this.categoriesTotal+=a.tx_bytes+a.rx_bytes},this),m.push(a.by_cat))},this)},this.getDpiByCategory=function(){return Array.prototype.concat.apply([],m)||[]},this.getDpiByApp=function(){return Array.prototype.concat.apply([],l)},this.getStatsForCategoryFromTable=function(a,b){if(a=parseInt(a),b.by_cat&&d.getAppCategory(a)){var c=b.by_cat.find(function(b){return b.cat===a});return c?(c=angular.copy(c),c.name=d.getAppCategory(c.cat).name,c.appsData=[],c.apps.forEach(function(e){var f=b.by_app.find(function(b){return b.app===e&&b.cat===a});f.name=d.getAppName(d.getCompoundId(f.cat,f.app)),c.appsData.push(f)},this),c.appsData.sort(function(a,b){return b.rx_bytes+b.tx_bytes-(a.rx_bytes+a.tx_bytes)}),c):{name:d.getAppCategory(a).name}}},this.getStatsForCategory=function(a){if(a=parseInt(a),this.dpiStatsTables.length&&d.getAppCategory(a)){var b=this.dpiStatsTables.map(function(b){return this.getStatsForCategoryFromTable(a,b)},this),c=g.appendAll(b,["cat"]);return c}}}])},{}],1205:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dpiUtils",["dpi","dpiGroups","dpiIcons","dpiStats","gatewayUtils","settings","DataConverter","$translate",function(a,b,c,d,e,f,g,h){this.getIdsForCategoryName=function(b){var c=a.getAllAppCategories().find(function(a){return a.name===b}),d=c?c.categoryIds:[];return d.map(function(a){return parseInt(a)})},this.isDpiEnabled=function(){var a=f.getSettingFromKey("dpi");return!!a&&a.get("enabled")},this.isDpiDataAvailable=function(){return this.isDpiEnabled()&&d.isDpiDataAvailable()},this.categoriesSortedByTraffic=function(){var b=(new g).deduplicatedBy("name").sortedBy("bytes",!0).countTotal().compactUnknown(function(a){return!a.name||"unknown"===a.name.toLowerCase()}).withUnknownDefaults({name:h.instant("STATISTICS_DPI_UNKNOWN")}),c=[];return this.isDpiEnabled()&&(c=a.getAllAppCategories().map(function(a){return{bytes:0,name:a.name}}),c=c.concat(d.getDpiByCategory().map(function(b){return{bytes:b.rx_bytes+b.tx_bytes,name:a.getCategoryName(b.cat)}}))),b.apply(c)},this.applicationsSortedByTraffic=function(b,e){var f=this.getIdsForCategoryName(b),i=e||(new g).deduplicatedBy("name").sortedBy("bytes",!0).countTotal().compactUnknown(function(a){return!a.name||"unknown"===a.name.toLowerCase()}).withUnknownDefaults({name:h.instant("STATISTICS_DPI_UNKNOWN")}),j=[];return f.map(function(a){return d.getStatsForCategory(a)}).filter(function(a){return a&&a.appsData}).forEach(function(b){j=j.concat(b.appsData.map(function(b){return{bytes:b.rx_bytes+b.tx_bytes,name:b.name,icon:c.getIconForApplication(a.getCompoundId(b.cat,b.app)),appId:b.app,catId:b.cat}}))},this),i.apply(j)},this.getNetworksWithDpiGroups=function(a){return a.toJSON().filter(function(a){var c=a.dpigroup_id;return a.dpi_enabled&&c&&b.repository.collection.get(c)},this).map(function(a){return a.id=a._id,a.restrictionGroupName=b.repository.collection.get(a.dpigroup_id).get("name"),a},this)}}])},{}],1206:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dynamicDns",["BaseCollectionRepository","DynamicDnsCollection",function(a,b){this.repository=new a(new b)}])},{}],1207:[function(a,b,c){"use strict";function d(a,b,c){this.localStorageKey="columnStore:dynamicDns",this.columnOptions=[{id:"service",translationKey:"DYNAMIC_DNS_TABLE_HEADER_SERVICE"},{id:"status",translationKey:"DYNAMIC_DNS_TABLE_HEADER_STATUS"},{id:"host_name",translationKey:"DYNAMIC_DNS_TABLE_HEADER_HOSTNAME"},{id:"login",translationKey:"DYNAMIC_DNS_TABLE_HEADER_USERNAME"},{id:"server",translationKey:"DYNAMIC_DNS_TABLE_HEADER_SERVER"},{id:"ip",translationKey:"DYNAMIC_DNS_TABLE_HEADER_IP"},{id:"last_updated",translationKey:"DYNAMIC_DNS_TABLE_HEADER_LAST_UPDATED"},{id:"actions",translationKey:"DYNAMIC_DNS_TABLE_HEADER_ACTIONS",isPermanent:!0}],this.views={"default":["service","status","host_name","login","server","ip","last_updated","actions"]},e.call(this,a,b,c)}var e=a("../../base-unifi/services/BaseListColumnStore");d.prototype=Object.create(e.prototype),d.constructor=d,d.prototype.setColumns=function(){this.isCustomized?e.prototype.setColumns.call(this):this.columns=this.views["default"]},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","LocalStorageBooleanValue"],angular.module("app-unifi-manage").service("dynamicDnsListColumnStore",d)},{"../../base-unifi/services/BaseListColumnStore":1698}],1208:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("dynamicDnsStats",["BaseCollectionRepository","DynamicDnsStatsCollection",function(a,b){this.repository=new a(new b)}])},{}],1209:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("eventFilterUtils",["BaseModelFilter","devices","clients",function(a,b,c){function d(b,d){var e=b.get("user");if(e){var f=c.repository.collection.findWhere({mac:e});if(f)return a.prototype.testModelAttributes(f,["ip","mac","model","name"],d)}return!1}function e(c,d){return["gw","sw","ap"].some(function(e){var f=c.get(e);if(f){var g=b.repository.collection.findWhere({mac:f});if(g)return a.prototype.testModelAttributes(g,["ip","mac","model","name"],d)}return!1})}this.checkDetails=function(a,b){return e(a,b)||d(a,b)}}])},{}],1210:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("eventFrameUtils",["$rootScope","contextSwitchStates","frame","events","EVENTS",function(a,b,c,d,e){this.isOpen=function(){var a=c.getLayout("eventsLayout");return a&&a.showing},this.open=function(b){b&&b.stopPropagation(),a.$broadcast(e.CLOSE_SIDE_NAV_POPOVERS),this.isOpen()||(d.repository.register().fetch(),c.show("events"))},this.close=function(){this.isOpen()&&(c.close("events"),d.repository.unregister())},this.toggle=function(a){a&&a.stopPropagation(),this.isOpen()?this.close():this.open()},a.$on(e.CLOSE_SIDE_NAV_POPOVERS,function(){this.close()}.bind(this)),a.$on(b.getSuccess(),function(){this.close()}.bind(this))}])},{}],1211:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("events",["BaseCollectionRepository","BaseModelRepository","EventCollection",function(a,b,c){this.repository=new a(new c),this.repository.fetchMore=function(a){return this.collection.resolveMore(a)}}])},{}],1212:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("eventsWsMessageHandler",["ClientModel","clients","devices","DeviceModel","wsAdapter",function(a,b,c,d,e){function f(a,b){return a[Object.keys(a).find(function(a){return b.indexOf(a)>=0})]}var g=["ap","gw","sw","ph"],h=["user","client","guest"],i=[{keys:["EVT_AP_Adopted","EVT_GW_Adopted","EVT_PH_Adopted","EVT_SW_Adopted","EVT_AP_AutoReadopted","EVT_GW_AutoReadopted","EVT_PH_AutoReadopted","EVT_SW_AutoReadopted","EVT_AP_Connected","EVT_GW_Connected","EVT_PH_Connected","EVT_SW_Connected","EVT_AP_Isolated","EVT_AP_Lost_Contact","EVT_GW_Lost_Contact","EVT_PH_Lost_Contact","EVT_SW_Lost_Contact","EVT_AP_Restarted","EVT_GW_Restarted","EVT_PH_Restarted","EVT_SW_Restarted","EVT_AP_RestartedUnknown","EVT_GW_RestartedUnknown","EVT_PH_RestartedUnknown","EVT_SW_RestartedUnknown","EVT_AP_Upgraded","EVT_GW_Upgraded","EVT_PH_Upgraded","EVT_SW_Upgraded","EVT_AP_UpgradeScheduled","EVT_GW_UpgradeScheduled","EVT_PH_UpgradeScheduled","EVT_SW_UpgradeScheduled","EVT_SW_HostKeyMismatch","EVT_AP_HostKeyMismatch","EVT_GW_HostKeyMismatch","EVT_PH_HostKeyMismatch"],execute:function(){}},{keys:["EVT_LU_Connected","EVT_WU_Connected","EVT_LG_Connected","EVT_WG_Connected"],execute:function(c){var d=f(c,h),e=new a({mac:d});e.fetch().then(function(){b.repository.collection.add(e)})}},{keys:["EVT_LU_Disconnected","EVT_WU_Disconnected","EVT_LG_Disconnected","EVT_WG_Disconnected","EVT_LC_Blocked","EVT_WC_Blocked"],execute:function(a){var c=f(a,h);b.repository.collection.remove(c)}},{keys:["EVT_WU_Roam","EVT_WG_Roam","EVT_WU_RoamRadio","EVT_WG_RoamRadio","EVT_WG_AuthorizationEnded","EVT_WG_AuthorizationEndedByQuota","EVT_AD_GuestUnauthorized","EVT_AD_GuestExtended","EVT_AD_GuestAuthorizedFor","EVT_HS_AuthedByNoAuth","EVT_HS_AuthedByPassword"],execute:function(a){var c=f(a,h),d=b.repository.collection.get(c);d&&b.fetchClient(d)}},{keys:["EVT_AP_PossibleInterference","EVT_SW_DetectRogueDHCP","EVT_SW_LoopDetected","EVT_SW_Overheat"],execute:function(a){var b=f(a,g),e=c.repository.collection.get(b)||new d({mac:b});e.fetch().then(function(){c.repository.collection.add(e,{merge:!0})})}},{keys:["EVT_AP_Deleted","EVT_GW_Deleted","EVT_PH_Deleted","EVT_SW_Deleted"],execute:function(a){var b=f(a,g);c.repository.collection.remove(b)}},{keys:["EVT_AP_RollUpgrade"],execute:function(){c.repository.collection.invalidate()}},{keys:["EVT_AP_RediscoveredPending","EVT_AP_DiscoveredPending","EVT_GW_DiscoveredPending","EVT_PH_DiscoveredPending","EVT_SW_DiscoveredPending"],execute:function(a){var b=f(a,g),e=new d({mac:b});e.fetch().then(function(){c.repository.collection.add(e)})}}];this.register=function(){e.on("events",function(a){a.data.forEach(function(a){var b=i.find(function(b){return b.keys.indexOf(a.key)!==-1});b&&b.execute(a)})})}}])},{}],1213:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SettingsModelFactory",["SettingsGuestAccessModel","SettingsModel",function(a,b){function c(c,d){switch(c.key){case"guest_access":return new a(c,d);default:return new b(c,d)}}return c.prototype.idAttribute="_id",c}])},{}],1214:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("AlertFilter",["BaseSearchableModelFilter","eventFilterUtils",function(a,b){var c=function(){a.call(this),this.searchableAttributes=["msg","gw_name","sw_name","ap_name"]};return c.prototype=Object.create(a.prototype),c.prototype.constructor=c,c.prototype.test=function(a){if(this.search(a))return!0;var c=this.searchQuery?this.searchQuery.toLowerCase().split(" "):void 0;return!c||b.checkDetails(a,c)},c}])},{}],1215:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("BaseClientFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.isWiredFilter=null,this.isGuestFilter=null};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b.prototype.test=function(){throw new Error("You must override test")},b.prototype.isFiltered=function(){throw new Error("You must override isFiltered")},b.prototype.getWiredFilter=function(){return this.isWiredFilter},b.prototype.hasWiredFilter=function(){return this.isWiredFilter===!0||this.isWiredFilter===!1},b.prototype.setWiredFilter=function(a){this.isWiredFilter=a},b.prototype.clearWiredFilter=function(){this.isWiredFilter=void 0},b.prototype.getGuestFilter=function(){return this.isGuestFilter},b.prototype.hasGuestFilter=function(){return this.isGuestFilter===!0||this.isGuestFilter===!1},b.prototype.setGuestFilter=function(a){this.isGuestFilter=a},b.prototype.clearGuestFilter=function(){this.isGuestFilter=void 0},b}])},{}],1216:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("ClientFilter",["BaseClientFilter","clientUplinkUtils",function(a,b){var c=function(){a.call(this),this.radioTypeFilter=null,this.macFilter=null,this.networkFilter=null,this.excludedMacsFilter=[],this.matchAnyToken=!0,this.searchableAttributes=["name","hostname","mac","ap_mac","ip","essid"]};return c.prototype=Object.create(a.prototype),c.prototype.constructor=a,c.prototype.test=function(a){if(this.isWiredFilter===!0&&!a.get("is_wired"))return!1;if(this.isWiredFilter===!1&&a.get("is_wired"))return!1;if(this.isGuestFilter===!0&&!a.get("is_guest"))return!1;if(this.isGuestFilter===!1&&a.get("is_guest"))return!1;if(this.hasRadioTypeFilter()&&this.radioTypeFilter!==a.get("radio"))return!1;if(this.hasMacFilter()&&this.macFilter!==b.getUplinkMac(a))return!1;if(this.hasExcludedMacsFilter()&&this.excludedMacsFilter.indexOf(a.get("mac"))!==-1)return!1;if(this.hasNetworkFilter()&&this.networkFilter!==a.get("network_id"))return!1;if(this.search(a))return!0;var c=this.searchQuery?this.searchQuery.toLowerCase().split(" "):[];if(c.length){var d=b.getUplinkDisplayName(a).toLowerCase();return c.some(function(a){return d.indexOf(a)>-1})}return!0},c.prototype.isFiltered=function(){return this.hasWiredFilter()||this.hasGuestFilter()||this.hasRadioTypeFilter()||this.hasMacFilter()||this.hasNetworkFilter()||this.hasExcludedMacsFilter()||this.searchQuery.length>0},c.prototype.getRadioTypeFilter=function(){return this.radioTypeFilter},c.prototype.hasRadioTypeFilter=function(){return!!this.radioTypeFilter},c.prototype.setRadioTypeFilter=function(a){this.radioTypeFilter=a},c.prototype.clearRadioTypeFilter=function(){this.radioTypeFilter=void 0},c.prototype.getMacFilter=function(){return this.macFilter},c.prototype.hasMacFilter=function(){return!!this.macFilter},c.prototype.setMacFilter=function(a){this.macFilter=a},c.prototype.clearMacFilter=function(){this.macFilter=void 0},c.prototype.getExcludedMacsFilter=function(){return this.excludedMacsFilter},c.prototype.hasExcludedMacsFilter=function(){return!(!this.excludedMacsFilter||!this.excludedMacsFilter.length)},c.prototype.setExcludedMacsFilter=function(a){this.excludedMacsFilter=a||[]},c.prototype.clearExcludedMacsFilter=function(){this.excludedMacsFilter=[]},c.prototype.getNetworkFilter=function(){return this.networkFilter},c.prototype.hasNetworkFilter=function(){return!!this.networkFilter},c.prototype.setNetworkFilter=function(a){this.networkFilter=a},c.prototype.clearNetworkFilter=function(){this.networkFilter=void 0},c}])},{}],1217:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DeviceFilter",["BaseSearchableModelFilter","deviceStateUtils",function(a,b){var c=function(){a.call(this),this.deviceTypeFilter=null,this.deviceAdoptedFilter=null,this.searchableAttributes=["name","mac","ip"]};return c.prototype=Object.create(a.prototype),c.prototype.constructor=c,c.prototype.test=function(a){if(this.deviceTypeFilter&&this.deviceTypeFilter.indexOf(a.get("type"))===-1)return!1;if(this.deviceTagFilter){var c=this.deviceTagFilter.get("member_table");if(!c||c.indexOf(a.get("mac"))===-1)return!1}if(null!==this.deviceAdoptedFilter&&a.get("adopted")!==this.deviceAdoptedFilter)return!1;if(this.supplementalFunction&&!this.supplementalFunction(a))return!1;if(this.search(a))return!0;var d=this.searchQuery?this.searchQuery.toLowerCase().split(" "):[];if(d.length){var e=b.getDeviceModel(a).toLowerCase(),f=d.some(function(a){return e.indexOf(a)>-1});if(f)return!0;var g=b.getDeviceStateString(a).toLowerCase(),h=d.some(function(a){return g.indexOf(a)>-1});return!!h}return!0},c.prototype.isFiltered=function(){return!!this.deviceTypeFilter||!!this.deviceTagFilter||this.hasDeviceAdoptedFilter()||this.searchQuery.length>0},c.prototype.getDeviceTypeFilter=function(){return this.deviceTypeFilter},c.prototype.hasDeviceTypeFilter=function(a){return this.deviceTypeFilter?angular.isArray(a)?angular.equals(this.deviceTypeFilter,a):this.deviceTypeFilter.indexOf(a)!==-1:!a},c.prototype.setDeviceTypeFilter=function(a){a&&(a=angular.isArray(a)?a:[a],this.deviceTypeFilter=a)},c.prototype.clearDeviceTypeFilter=function(){this.deviceTypeFilter=null},c.prototype.setDeviceTagFilter=function(a){this.deviceTagFilter=a},c.prototype.hasDeviceTagFilter=function(){return!!this.deviceTagFilter},c.prototype.setDeviceAdoptedFilter=function(a){this.deviceAdoptedFilter=a},c.prototype.clearDeviceAdoptedFilter=function(){this.deviceAdoptedFilter=null},c.prototype.hasDeviceAdoptedFilter=function(){return null!==this.deviceAdoptedFilter},c}])},{}],1218:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DynamicDnsFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.searchableAttributes=["host_name","ip","login","server","service"]};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}])},{}],1219:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("EventFilter",["BaseSearchableModelFilter","eventFilterUtils",function(a,b){var c=function(){a.call(this),this.eventTypeFilter=null,this.searchableAttributes=["msg","gw_name","sw_name","ap_name","hostname"]};return c.prototype=Object.create(a.prototype),c.prototype.constructor=c,c.prototype.test=function(a){if(this.eventTypeFilter)if("admin"===this.eventTypeFilter){if(!a.get("is_admin"))return!1}else if(a.get("subsystem")!==this.eventTypeFilter)return!1;if(this.search(a))return!0;var c=this.searchQuery?this.searchQuery.toLowerCase().split(" "):void 0;return!c||b.checkDetails(a,c)},c.prototype.isFiltered=function(){return!!this.eventTypeFilter||this.searchQuery.length>0},c.prototype.setEventType=function(a){this.eventTypeFilter=a},c.prototype.isEventTypeActive=function(a){return this.eventTypeFilter===a},c}])},{}],1220:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("FirewallRulesetFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.rulesetType="",this.searchableAttributes=["name"]};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b.prototype.test=function(b){return(!this.rulesetType||b.get("ruleset")===this.rulesetType)&&a.prototype.test.call(this,b)},b.prototype.isFiltered=function(){return this.searchQuery.length+this.rulesetType.length>0},b.prototype.updateRuleset=function(a){this.rulesetType=a?a.trim():""},b}])},{}],1221:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("KnownClientFilter",["BaseClientFilter","BaseSearchableModelFilter",function(a,b){var c=function(){a.call(this),this.isNotedFilter=null,this.isBlockedFilter=null,this.isStaticIpFilter=null,this.matchAnyToken=!0,this.searchableAttributes=["name","hostname","mac","oui"]};return c.prototype=Object.create(a.prototype),c.prototype.constructor=a,c.prototype.test=function(a){return!(this.isWiredFilter===!0&&!a.get("is_wired"))&&((this.isWiredFilter!==!1||!a.get("is_wired"))&&(!(this.isGuestFilter===!0&&!a.get("is_guest"))&&((this.isGuestFilter!==!1||!a.get("is_guest"))&&(!(this.hasBlockedFilter()&&!a.get("blocked"))&&(!(this.hasNotedFilter()&&!a.get("noted"))&&(!(this.hasStaticIpFilter()&&!a.get("use_fixedip"))&&b.prototype.test.call(this,a)))))))},c.prototype.isFiltered=function(){return this.hasWiredFilter()||this.hasGuestFilter()||this.hasBlockedFilter()||this.hasNotedFilter()||this.hasStaticIpFilter()||this.searchQuery.length>0},c.prototype.hasBlockedFilter=function(){return this.isBlockedFilter===!0},c.prototype.setBlockedFilter=function(a){this.isBlockedFilter=a},c.prototype.hasNotedFilter=function(){return this.isNotedFilter===!0},c.prototype.setNotedFilter=function(a){this.isNotedFilter=a},c.prototype.hasStaticIpFilter=function(){return this.isStaticIpFilter===!0},c.prototype.setStaticIpFilter=function(a){this.isStaticIpFilter=a},c}])},{}],1222:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("MapFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.searchableAttributes=["name"]};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}])},{}],1223:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("NeighboringAccessPointFilter",["BaseSearchableModelFilter","$filter",function(a,b){var c=function(){a.call(this),this.radioTypeFilter=null,this.searchableAttributes=["essid","bssid","channel","radio","security","oui"]};return c.prototype=Object.create(a.prototype),c.prototype.constructor=c,c.prototype.test=function(a){if(this.radioTypeFilter&&this.radioTypeFilter!==a.get("radio"))return!1;if(this.search(a))return!0;var c=this.searchQuery?this.searchQuery.toLowerCase().split(" "):[];if(c.length){var d=a.get("rssi");if(this.testPhrase(b("rssiToDbm")(d),c))return!0;var e=1e3*a.get("last_seen");if(this.testPhrase(b("moment")(e,"format","datetime"),c))return!0;var f=a.get("ap_mac");return!!this.testPhrase(b("neighboringApLocation")(f),c)}return!0},c.prototype.isFiltered=function(){return this.searchQuery.length>0||this.hasRadioTypeFilter()},c.prototype.getRadioTypeFilter=function(){return this.radioTypeFilter},c.prototype.hasRadioTypeFilter=function(){return null!==this.radioTypeFilter},c.prototype.setRadioTypeFilter=function(a){this.radioTypeFilter=a},c.prototype.clearRadioTypeFilter=function(){this.radioTypeFilter=null},c}])},{}],1224:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PastConnectionFilter",["BaseClientFilter","clients",function(a,b){var c=function(){a.call(this),this.searchQuery="",this.radioTypeFilter=null,this.clients=b,this.test=this.test.bind(this)};return c.prototype=Object.create(a.prototype),c.prototype.constructor=c,c.prototype.getTest=function(){return this.test},c.prototype.test=function(a){if(this.isGuestFilter===!0&&!a.get("is_guest"))return!1;if(this.isGuestFilter===!1&&a.get("is_guest"))return!1;var b=this.searchQuery?this.searchQuery.toLowerCase().split(" "):[];if(b.length){if(this.testModelAttributes(a,["ip","hostname","name","mac"],b))return!0;var c=this.clients.repository.collection.get(a.get("mac"));return!(!c||!this.testPhrase(c.getDisplayName(),b))}return!0},c.prototype.isFiltered=function(){return this.searchQuery.length>0||this.hasGuestFilter()},c.prototype.updateSearchQuery=function(a){this.searchQuery=a?a.trim():""},c}])},{}],1225:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PastGuestAuthorizationFilter",["BaseSearchableModelFilter","$filter",function(a,b){var c=function(){a.call(this),this.radioTypeFilter=null,this.searchableAttributes=["hostname","name","mac","package","ip"]};return c.prototype=Object.create(a.prototype),c.prototype.constructor=c,c.prototype.test=function(a){if(this.search(a))return!0;var c=this.searchQuery?this.searchQuery.toLowerCase().split(" "):[];return!c.length||(!!this.testPhrase(b("currency")(a),c)||!!this.testPhrase(b("guestAuthorization")(a),c))},c}])},{}],1226:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PortForwardStatsFilter",["$filter","BaseSearchableModelFilter",function(a,b){var c=function(){b.call(this),this.viewFilter=null,this.searchableAttributes=["name","dst_port","fwd","fwd_port"]};return c.prototype=Object.create(b.prototype),c.prototype.constructor=c,c.prototype.test=function(b){var c=!!b.get("is_upnp");if("upnp"===this.viewFilter&&!c)return!1;if("userdefined"===this.viewFilter&&c)return!1;if(this.search(b))return!0;var d=this.searchQuery?this.searchQuery.toLowerCase().split(" "):[];return!d.length||(!!this.testPhrase(a("portForwardProtocol")(b.get("proto")),d)||!!this.testPhrase(a("portForwardSource")(b.get("src")),d))},c.prototype.isFiltered=function(){return this.searchQuery.length>0||this.hasViewFilter()},c.prototype.getViewFilter=function(){return this.viewFilter},c.prototype.hasViewFilter=function(){return null!==this.viewFilter},c.prototype.setViewFilter=function(a){this.viewFilter=a},c.prototype.clearViewFilter=function(){this.viewFilter=null},c}])},{}],1227:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RemoteUserVpnFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.searchableAttributes=["interface","remote_ip","user"]};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}])},{}],1228:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RoutingStatsFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.searchableAttributes=["prefix","type","interface","metric","via"]};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}])},{}],1229:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SimpleModelFilter",[function(){var a=function(){this.filters=[],this.matchAnyAttribute=!1,this.test=this.test.bind(this)};return a.prototype.getTest=function(){return this.test},a.prototype.test=function(a){return this.filters[this.matchAnyAttribute?"some":"every"](function(b){if(b.options.negate){if(this._match(a.get(b.attr),b.value,b.options))return!1}else if(!this._match(a.get(b.attr),b.value,b.options))return!1;return!0}.bind(this))},a.prototype.addAttributeFilter=function(a,b,c){this.filters.push({attr:a,value:b,options:c||{}})},a.prototype.removeAttributeFilter=function(a){for(var b,c=function(b){return b.attr===a};(b=this.filters.findIndex(c))!==-1;)this.filters.splice(b,1)},a.prototype.clearAttributeFilters=function(){this.filters=[]},a.prototype.isFiltered=function(){return this.filters.length>0},a.prototype._match=function(a,b,c){return b===!0||b===!1||c.exact?a===b:Number.isFinite(b)?parseInt(a,10)===b:a&&a.toLowerCase().indexOf(b.toLowerCase())>-1},a}])},{}],1230:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("StreamDeviceFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.streamFilter=null,this.searchableAttributes=["streamId"]};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b.prototype.test=function(b){var c=this.streamFilter;return(null===c||c===b.get("streamId"))&&a.prototype.test.call(this,b)},b.prototype.getStreamFilter=function(){return this.streamFilter},b.prototype.hasStreamFilter=function(){return null!==this.streamFilter},b.prototype.setStreamFilter=function(a){this.streamFilter=a},b.prototype.clearStreamFilter=function(){this.streamFilter=null},b.prototype.isFiltered=function(){return null!==this.streamFilter||this.searchQuery.length>0},b}])},{}],1231:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SwitchStatsFilter",["BaseSearchableModelFilter","switchUtils",function(a,b){var c=function(){a.call(this),this.switchFilter=null,this.linkStatusFilter=null,this.searchableAttributes=["port_idx","name"]};return c.prototype=Object.create(a.prototype),c.prototype.constructor=c,c.prototype.test=function(a){if(this.switchFilter&&this.switchFilter!==a.get("device"))return!1;if(this.linkStatusFilter){var c="connected"===this.linkStatusFilter,d=!!a.get("up");if(c!==d)return!1}if(this.search(a))return!0;var e=this.searchQuery?this.searchQuery.toLowerCase().split(" "):[];return!e.length||["getPortOperationMode","getPortPoeModeText","getPortNetworksVlans","getPortStatus","getPortStpStatus","getPortPoeDetection"].find(function(c){return this.testPhrase(b[c](a),e)}.bind(this))},c.prototype.isFiltered=function(){return this.searchQuery.length>0||this.hasSwitchFilter()||this.hasLinkStatusFilter()},c.prototype.getLinkStatusFilter=function(){return this.linkStatusFilter},c.prototype.hasLinkStatusFilter=function(){return null!==this.linkStatusFilter},c.prototype.setLinkStatusFilter=function(a){this.linkStatusFilter=a},c.prototype.clearLinkStatusFilter=function(){this.linkStatusFilter=null},c.prototype.getSwitchFilter=function(){return this.switchFilter},c.prototype.hasSwitchFilter=function(){return null!==this.switchFilter},c.prototype.setSwitchFilter=function(a){this.switchFilter=a},c.prototype.clearSwitchFilter=function(){this.switchFilter=null},c}])},{}],1232:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("firewallGroups",["BaseCollectionRepository","FirewallGroupCollection",function(a,b){this.repository=new a(new b)}])},{}],1233:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("firewallRules",["BaseCollectionRepository","FirewallRuleCollection","firewallUtils",function(a,b,c){this.repository=new a(new b),this.repository.fetch=function(b){return a.prototype.fetch.call(this.repository,b).then(function(){return c.getPredefinedRules(this.repository.collection)}.bind(this))}.bind(this)}])},{}],1234:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("firewallUtils",["$q","gatewayUtils","FirewallRuleModel",function(a,b,c){this.$q=a,this.gatewayUtils=b,this.RULESETS=["WAN_IN","WAN_OUT","WAN_LOCAL","LAN_IN","LAN_OUT","LAN_LOCAL","GUEST_IN","GUEST_OUT","GUEST_LOCAL"],this.HIGH_PRIORITY=2,this.LOW_PRIORITY=4,this.getGatewayDetails=function(){var a=this.gatewayUtils.getSiteGateway();if(a)return a.get("system_cfg")},this.getNextIndex=function(a,b,c){var d=this.getPriorityScope(c),e=a.filter(function(a){return a.get("ruleset")===b&&a.get("rule_index")>=d[0]&&a.get("rule_index")<=d[1]}).map(function(a){return Number(a.get("rule_index"))});e.push(d[0]-1);var f=Math.max.apply(null,e)+1,g=Math.min(f,d[1]);return String(g)},this.getNextHighIndex=function(a,b){return this.getNextIndex(a,b,this.HIGH_PRIORITY)},this.getNextLowIndex=function(a,b){return this.getNextIndex(a,b,this.LOW_PRIORITY)},this.getDefaultRuleset=function(){return this.RULESETS[0]},this.getPredefinedRules=function(a){var b=this.getGatewayDetails();b&&this.RULESETS.forEach(function(d){var e=b.firewall.name[d]||{};Object.keys(e.rule||[]).forEach(function(b){var f=e.rule[b],g=new c({ruleset:d,rule_index:b,name:f.description,enabled:!0,action:f.action,protocol:f.protocol?f.protocol.replace("!",""):"all",protocol_match_excepted:!!f.protocol&&0===f.protocol.indexOf("!")});if(this.isPredefinedRule(g)){var h=function(a){return a.get("ruleset")===d&&a.get("rule_index")===b};a.find(h)||a.add(g)}}.bind(this))}.bind(this))},this.getPriority=function(a){return Math.floor(a/1e3)},this.isHighPriority=function(a){return this.getPriority(a)===this.HIGH_PRIORITY},this.isLowPriority=function(a){return this.getPriority(a)===this.LOW_PRIORITY},this.getPriorityScope=function(a){var b=1e3*a,c=b+999;return[b,c]},this.isPredefinedRule=function(a){var b=a&&a.get("rule_index")||0,c=this.getPriority(b);return[this.HIGH_PRIORITY,this.LOW_PRIORITY].indexOf(c)===-1},this.saveRulesOrder=function(b){var c=[];return[this.HIGH_PRIORITY,this.LOW_PRIORITY].forEach(function(a){var d=this.getPriorityScope(a),e=1e3*a;b.filter(function(b){return this.getPriority(b.get("rule_index"))===a}.bind(this)).forEach(function(a){if(Number(a.get("rule_index"))!==e){var b=a.save({rule_index:String(e)},{wait:!0});c.push(b)}e=Math.min(++e,d[1])})}.bind(this)),a.all(c)}}])},{}],1235:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("formUtils",["_",function(a){this.range=a.memoize(function(a){return new Array(a)})}])},{}],
1236:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("gatewayUtils",["$translate","siteUtils","devices","settings","DEVICE_MODELS","DEVICE_TYPES",function(a,b,c,d,e,f){this.getSiteGateway=function(){var a=b.getActiveSite();if(a)return c.repository.collection.findWhere({type:f.GATEWAY,site_id:a.id})},this.getIpByPortId=function(a,b){var c=b.get("port_table");if(c){var d=this.getUnmappedPortId(a,b),e=c.findWhere({name:d});if(e)return e.get("ip")}},this.getPortLabel=function(b,c){var d=this.getMappedPorts(c),e=this.getUnmappedPorts(c),f=d[e.indexOf(b)]||b,g=f.replace(/[0-9]/g,""),h=f.replace(/[^0-9]/g,"");return h||d.indexOf(g+"2")===-1||(h=1),a.instant("DEVICE_GATEWAY_PORT_TYPE_"+g.toUpperCase())+(h?" "+h:"")},this.getUnmappedPorts=function(a){var b=e[a.get("model")],c=b?b.ports:[];return c},this.getMappedPorts=function(a,c){var f=this.getUnmappedPorts(a),g=d.getSettingFromKey("porta",a.get("site_id")||b.getActiveSite().id),h=e[a.get("model")]||{};return f.length&&h.remap&&(f=f.map(function(a){var b=h.remap[a];return!b||c&&b.superficial||b.pref&&!(b.pref&&g&&g.get(b.pref))?a:b.to})),f},this.getUnmappedPortId=function(a,b){var c=this.getUnmappedPorts(b),d=this.getMappedPorts(b),e=d.indexOf(a);return c[e]||a},this.getMappedPortId=function(a,b){var c=this.getUnmappedPorts(b),d=this.getMappedPorts(b),e=c.indexOf(a);return d[e]||a},this.getPortTypeCount=function(a,b){var c=this.getMappedPorts(b);return c.filter(function(b){return b.replace(/[0-9]/g,"")===a}).length}}])},{}],1237:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("gateways",["DeviceMgrModel",function(a){this.startSpeedTest=function(){return(new a).save({cmd:"speedtest"})},this.fetchSpeedTestResult=function(){return(new a).save({cmd:"speedtest-status"}).then(function(a){return a.data&&a.data.data&&a.data.data[0]||{}})}}])},{}],1238:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("geometryUtils",[function(){this.limitRectPosition=function(a,b,c,d,e){return[Math.max(Math.min(a,e[0]),e[0]-c),Math.max(Math.min(b,e[1]),e[1]-d)]},this.rescaleRect=function(a,b,c,d,e){var f=[a+c/2,b+d/2];return{width:c*e,height:d*e,x:f[0]-c*e/2,y:f[1]-d*e/2}},this.getLength=function(a,b){return Math.sqrt(Math.pow(b[0]-a[0],2)+Math.pow(b[1]-a[1],2))},this.lineAsPath=function(a,b,c){for(var d=(b[0]-a[0])/c,e=(b[1]-a[1])/c,f=[],g=0;g<=c;g++)f.push([a[0]+d*g,a[1]+e*g]);return f}}])},{}],1239:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("guestPortalImage",["$q","$http","GuestPortalImageModel","siteUtils","UnifiFileBasePath","UnifiAPIBasePath","Upload","UseWebrtc",function(a,b,c,d,e,f,g,h){this.removeFile=function(a){return new c({id:a}).destroy()},this.uploadFile=function(b){var c=d.getActiveSite().get("name"),f=[e,"upload","s",c,"portalfile"];return a(function(a,c){g.upload({url:f.join("/"),fileFormDataName:"Filedata",file:b,withCredentials:!0,withWebRTC:h,headers:{"X-Requested-With":"XMLHttpRequest"}}).success(function(b){var c=b.data[0]._id;a(c)}).abort(function(){c(arguments)}).error(function(){c(arguments)})})}}])},{}],1240:[function(a,b,c){"use strict";function d(a){return a?a/1024/1024*8:0}function e(a,b){var c=b.repository.collection.findWhere({mac:a.get("gw_mac")}),e=c&&c.get("uplink")||{};return{id:a.get("subsystem"),status:{ok:"dark",warning:"warning",error:"error"}[a.get("status")]||"disabled",gauges:[{id:"latency",entries:[{id:"latency",value:e.latency||0}]},{id:"throughput",entries:[{id:"download",value:d(e["rx_bytes-r"])},{id:"upload",value:d(e["tx_bytes-r"])}]}]}}function f(a){return{id:a.get("subsystem"),status:{ok:"success",warning:"warning",error:"error"}[a.get("status")]||"disabled",gauges:[{id:"devices",active:a.get({wan:"num_gw",lan:"num_sw",wlan:"num_ap"}[a.get("subsystem")])||0,inactive:a.get("num_disconnected")||0,pending:a.get("num_pending")||0}]}}angular.module("app-unifi-manage").service("health",["devices","siteHealth",function(a,b){this.getNodes=function(){return["www","wan","lan","wlan"].map(function(a){return b.repository.collection.findWhere({subsystem:a})}).filter(function(a){return!!a}).map(function(b){switch(b.get("subsystem")){case"www":return e(b,a);default:return f(b)}})}}])},{}],1241:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("hotspot2",["BaseCollectionRepository","Hotspot2Collection",function(a,b){this.repository=new a(new b)}])},{}],1242:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("hotspotOverrides",["$q","$translate","BaseModelRepository","HotspotMgrModel","HotspotOverridesModel",function(a,b,c,d,e){this.repository=new c(new e),this.upgrade=function(){var c=new d;return c.save({cmd:"upgrade-portal"}).then(function(){return this.repository.refresh()}.bind(this)).then(function(){return a.when(b.instant("SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_SUCCESS"))})["catch"](function(){return a.reject(b.instant("SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_ERROR"))})}}])},{}],1243:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("imageMapUtils",["propertyPanel","MAP_DEFAULTS","MAP_UNITS",function(a,b,c){this.meterToPixels=function(a,d,e){var f=1;return d===c.FOOT&&(f=b.FEET_TO_METERS_RATIO),a/(e*f)},this.openPropertyPanel=function(b,c,d){a.addItem(b,[{state:"activeTab",value:c,overwrite:!0},{state:"activeAccordionGroup",value:d,overwrite:!0}])}}])},{}],1244:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("imageUrlUtils",["$q","$http","$window","UseWebrtc",function(a,b,c,d){this.convertImageUrl=function(c){var e=a.defer();return!d||c&&c.indexOf("base64")!==-1?e.resolve(c):b.get(c,{withWebRTC:!0}).then(function(a){var b=window.URL.createObjectURL(new Blob([a.arraybuffer]));e.resolve(b)})["catch"](function(){e.reject()}),e.promise},this.loadImage=function(b){var d=a.defer();return this.convertImageUrl(b).then(function(a){var b=new c.Image;b.onerror=function(){d.reject()},b.onload=function(){d.resolve({size:{width:b.width,height:b.height},url:a})},b.src=a}),d.promise}}])},{}],1245:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("knownClients",["$q","BaseCollectionRepository","KnownClientCollection","clients","KNOWN_CLIENT_FIELDS",function(a,b,c,d,e){this.repository=new b(new c);var f=function(){return this.repository.collection.add(d.repository.collection.invoke("pick",e),{merge:!0}),a.when(this.repository.collection)}.bind(this);this.repository.fetch=function(a){return b.prototype.fetch.call(this,a).then(f)},this.updateWithin=function(a){this.repository.collection.updateWithin(a)},this.getWithin=function(){return this.repository.collection.getWithin()}}])},{}],1246:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("knownClientsCache",["$rootScope","BaseIndependentCollectionRepository","KnownClientCacheCollection","contextSwitchStates","KNOWN_CLIENT_FIELDS",function(a,b,c,d,e){this.repository=new b(new c,"mac"),this.cacheConnectedClient=function(a){return this.repository.collection.add(a.pick(e),{merge:!0})},a.$on(d.getSuccess(),function(){this.repository.collection.reset()}.bind(this))}])},{}],1247:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("mapCoordinatesAssistant",["atlas","imageUrlUtils","$q","$window","$http","MAP_DEFAULTS","MAP_TYPES","MAP_UNITS",function(a,b,c,d,e,f,g,h){var i=function(a,b,c){this.imageSize=a.size,this.imageUrl=a.url,this.params={upp:b||1,unit:c||h.METER},this.init()};i.prototype.init=function(){var a=f.EARTH_RADIUS,b=1;this.params.unit===h.FOOT&&(b=f.FEET_TO_METERS_RATIO);var c={width:this.imageSize.width*this.params.upp*b/10,height:this.imageSize.height*this.params.upp*b/10};this.bounds=[new d.google.maps.LatLng(180*-c.height/(a*Math.PI),0),new d.google.maps.LatLng(0,180*c.width/(a*Math.PI))],this.preferredZoom=Math.floor(Math.log2(10*f.METERS_PER_PIXEL_AT_ZOOM_0/(this.params.upp*b)))},i.prototype.updateParams=function(a){this.params=angular.extend(this.params,a),this.init()},i.prototype.normalizeZoomToGoogleMap=function(a){if(!a)return this.preferredZoom;var b=f.ZOOM_MAPPING.V4;if(a>20)a=20;else for(;void 0===b[a];)a++;return b[a]+this.preferredZoom},i.prototype.normalizeZoomToV4=function(a){a-=this.preferredZoom,a<f.MIN_ZOOM_OFFSET?a=f.MIN_ZOOM_OFFSET:a>f.MAX_ZOOM_OFFSET&&(a=f.MAX_ZOOM_OFFSET);var b=f.ZOOM_MAPPING.GOOGLE;return b[a]},i.prototype.coordsToLatLng=function(a){var b=a[1]/this.imageSize.height*this.bounds[0].lat(),c=a[0]/this.imageSize.width*this.bounds[1].lng(),e=new d.google.maps.LatLng(b,c);return e},i.prototype.latLngToCoords=function(a){var b=[this.imageSize.width*a.lng()/this.bounds[1].lng(),this.imageSize.height*a.lat()/this.bounds[0].lat()];return b},i.buildAssistant=function(c,d,e){return a.getGoogleMaps().then(function(){return b.loadImage(c).then(function(a){return new i(a,d||f.UPP,e||h.METER)})})};var j={};return{invalidateAssistantForMap:function(a){j[a.id]=void 0},getAssistant:function(a){return i.buildAssistant(a)},getAssistantForMap:function(b){return j[b.id]||(b.get("type")===g.GOOGLE?j[b.id]=a.getGoogleMaps().then(function(a){return{coordsToLatLng:function(b){return new a.LatLng(b[0],b[1])},latLngToCoords:function(a){return[a.lat(),a.lng()]},normalizeZoomToGoogleMap:function(a){return a},normalizeZoomToV4:function(a){return a}}}):j[b.id]=i.buildAssistant(b.getMapImageUrl(),b.get("upp"),b.get("unit"))),j[b.id]}}}])},{}],1248:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("mapDevices",["$q","deviceStateUtils","deviceUplinkUtils","deviceUtils","devices","maps","TOPOLOGY_LINKS",function(a,b,c,d,e,f,g){this.placeDevice=function(a,b,c){return d.saveDevice(b,{map_id:a.id,x:c[0],y:c[1]})},this.unplaceDevice=function(a){return d.saveDevice(a,{map_id:null,x:null,y:null},{wait:!0})},this.unplaceAllDevices=function(a){var b=this.getPlacedDevices(a);b.forEach(function(a){d.saveDevice(a,{map_id:null,x:null,y:null})})},this.getUnplacedDevices=function(){return e.repository.collection.filter(function(a){var b=a.get("map_id");return(!b||!f.repository.collection.get(b))&&a.get("_id")&&a.get("adopted")})},this.getPlacedDevices=function(a){return a?e.repository.collection.where({map_id:a.id}):[]},this.getLinks=function(a,b){return this.getAllLinks(a).filter(function(a){return a.type===b})},this.getAllLinks=function(a){var b=function(b){return b&&b.get("map_id")===a.id};return e.repository.collection.filter(function(a){return void 0!==a.getNested("uplink.type")}).filter(b).map(function(a){var d=c.getUplink(a);return b(d)?{device:a,parentDevice:d,type:a.getNested("uplink.type")}:void 0}).filter(function(a){return void 0!==a})},this.getLinkColor=function(a){var c,d=a.device.get("uplink");return c=b.isDeviceConnected(a.device)&&d.up?a.type===g.TYPE.WIRE?g.COLORS.ACTIVE:d.rssi<g.QUALITY.LOW?g.COLORS.LOW:d.rssi<g.QUALITY.MEDIUM?g.COLORS.MEDIUM:g.COLORS.HIGH:g.COLORS.DISCONNECTED}}])},{}],1249:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("mapFeatures",["deviceRadioUtils","localStorageFailSafe","LocalStorageObjectValue","MAP_DEFAULTS","MAP_FEATURES","RADIO_TYPES","$rootScope",function(a,b,c,d,e,f,g){var h=new c(b,"MAP_FEATURES");h.hydrate();var i,j=f.NG.type,k=d.RECEIVER_SENSITIVITY,l=[e.LABELS.NONE,e.LABELS.SIMPLE,e.LABELS.DETAILED],m=h.getValue()||{labelTypeIndex:1,enabledFeatures:[]},n=function(){h.setValue(m)};this.toggle=function(a){this.isEnabled(a)?m.enabledFeatures.splice(m.enabledFeatures.indexOf(a),1):m.enabledFeatures.push(a),n(),g.$broadcast(e.CHANGED_EVENT)}.bind(this),this.nextLabelType=function(){m.labelTypeIndex=(m.labelTypeIndex+1)%l.length,n(),g.$broadcast(e.CHANGED_EVENT)},this.getLabelType=function(){return l[m.labelTypeIndex]},this.isEnabled=function(a){return m.enabledFeatures.indexOf(a)!==-1},this.setCoverageRadioType=function(a){j=a,g.$broadcast(e.CHANGED_EVENT)},this.getCoverageRadioType=function(){return j},this.setReceiverSensitivity=function(a){k=a,g.$broadcast(e.CHANGED_EVENT)},this.getReceiverSensitivity=function(){return k},this.toggleDeviceFilter=function(a){i=i===a?void 0:a,g.$broadcast(e.CHANGED_EVENT)},this.getDeviceFilter=function(){return i},this.filterDevice=function(b){return void 0===i||a.hasRadioType(b,i.type)}}])},{}],1250:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("mapUtils",["apiResults","devices","heyToasts","localStorageFailSafe","LocalStorageValue","maps","mapDevices","mapCoordinatesAssistant","MapModel","propertyPanel","UnifiFileBasePath","MAP_DEFAULTS","$http","$q","$state","$stateParams","$translate","$window",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var s="manage.site.maps.physical",t=new e(d,"LAST_MAP_ID");t.hydrate(),this.getSelectedMap=function(){var a;return p.mapId?a=f.repository.collection.get(p.mapId):(t.getValue()&&(a=f.repository.collection.get(t.getValue())),a||(a=f.repository.collection.findWhere({selected:!0})),a||(a=f.repository.collection.findWhere({attr_hidden_id:"default"})),a||f.repository.collection.length>0&&(a=f.repository.collection.at(0))),a},this._getSelectedMap=function(){var a;return p.mapId?a=f.repository.collection.get(p.mapId):t.getValue()&&(a=f.repository.collection.get(t.getValue())),p.mapId||a||(a=f.repository.collection.findWhere({selected:!0})),a},this.getSelectedDevice=function(){return p.deviceId&&b.repository.collection.get(p.deviceId)},this.getCoordinatesAssistantForSelectedMap=function(){return h.getAssistantForMap(this.getSelectedMap())},this.getPlacedDevicesForSelectedMap=function(){return g.getPlacedDevices(this.getSelectedMap())},this.changeMap=function(a){var b="";if(a&&(t.setValue(a.id),b=a.id),0===f.repository.collection.length){var c=new i(l.DEFAULT_MAP);c.save().then(function(){f.repository.collection.add(c),this.changeMap()}.bind(this))}else o.go(s,{mapId:b},{reload:!p.mapId&&!b||p.mapId===b})},this.locateDevice=function(a){if(a.get("map_id")){var b=o.current.name!==s||this.getSelectedMap().id!==a.get("map_id");o.go(s,{mapId:a.get("map_id"),deviceId:a.id},{notify:b}).then(function(){b||j.updateQueryString()})}},this.getGoogleMapPlaceParams=function(a){if(0!==a.length){var b={};b.center=a[0].geometry.location;var c=a[0].geometry.viewport;return angular.isDefined(c)||(c=new r.google.maps.LatLngBounds,c.extend(a[0].geometry.location)),b.bounds=c,b}},this.getImageUrl=function(a){return k+a.get("url")},this.checkImageExists=function(a){var b=n.defer(),c=a.get("url");if(c){var d=this.getImageUrl(a);m.get(d,{withWebRTC:!0}).then(function(){b.resolve(d)})["catch"](function(){b.reject()})}else b.reject();return b.promise},this.removeDevice=function(b){return g.unplaceDevice(b)["catch"](function(b){return c.pushError(a.appendErrorMsg(q.instant("MAP_DEVICE_REMOVE_FAILED"),b)),n.reject()})},this.trimPointToBounds=function(a,b){if(b.contains(a))return a;var c=a.lat(),d=b.getSouthWest().lat(),e=b.getNorthEast().lat();c<d?c=d:c>e&&(c=e);var f=a.lng(),g=b.getSouthWest().lng(),h=b.getNorthEast().lng();return f<g?f=g:f>h&&(f=h),new r.google.maps.LatLng(c,f)},this.getCurrentPosition=function(a){var b=n.defer();return r.navigator.geolocation?r.navigator.geolocation.getCurrentPosition(function(a){b.resolve(a)},function(a){b.reject(a)},a):b.reject(),b.promise}}])},{}],1251:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("maps",["BaseCollectionRepository","MapCollection",function(a,b){this.repository=new a(new b)}])},{}],1252:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("EmptyMapType",["$window","atlas",function(a,b){var c=256,d="#ffffff",e=function(){};return e.prototype.minZoom=0,e.prototype.maxZoom=30,e.prototype.name="Empty Google Map Type",b.getGoogleMaps().then(function(){e.prototype.tileSize=new a.google.maps.Size(c,c)}),e.prototype.getTile=function(a,b,c){var e=c.createElement("div");return e.style.width=this.tileSize.width+"px",e.style.height=this.tileSize.height+"px",e.style.backgroundColor=d,e},e}])},{}],1253:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("ImageOverlay",["atlas","$q",function(a,b){var c=b.defer(),d=function(a){var b=function(a,b){this.bounds_=a,this.image_=b,this.div_=null};return b.prototype=new a.OverlayView,b.prototype.onAdd=function(){var a=document.createElement("div");a.classList.add("unifiMapImageOverlay");var b=document.createElement("img");b.src=this.image_,a.appendChild(b),this.div_=a;var c=this.getPanes();c.overlayLayer.appendChild(this.div_)},b.prototype.draw=function(){var a=this.getProjection(),b=a.fromLatLngToDivPixel(this.bounds_.getSouthWest()),c=a.fromLatLngToDivPixel(this.bounds_.getNorthEast()),d=this.div_;d.style.left=b.x+"px",d.style.top=c.y+"px",d.style.width=c.x-b.x+"px",d.style.height=b.y-c.y+"px"},b.prototype.onRemove=function(){this.div_.parentNode.removeChild(this.div_)},b};return a.getGoogleMaps().then(function(a){var b=d(a);c.resolve(b)}),c.promise}])},{}],1254:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("AdminModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"cmd/sitemgr",defaults:{role:"readonly"},sync:function(){throw new Error("All sync methods use the SiteMgr model via the admins service")}})}])},{}],1255:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("AlertModel",["CORSModel","webrtcMixin",function(a,b){return a.extend(b).extend({idAttribute:"_id"})}])},{}],1256:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("BaseClientModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","savePartialMixin","getNestedMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(b).extend(c).extend(d).extend(e).extend(f).extend(g).extend({idAttribute:"mac",modelType:"client",siteUrl:"rest/user",getDisplayName:function(){return this.get("name")||this.get("hostname")||this.get("mac")},getConnection:function(){return this.get("is_wired")?this.get("network"):this.get("essid")}})}])},{}],1257:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("BatchDeviceModel",["$translate","BatchModel",function(a,b){return b.extend({siteUrl:"group/device",_getResponseByModel:function(a,b){return a[b.get("_id")]},getDisplayName:function(){return a.instant(function(a){switch(a){case"batch:uap":return"DEVICE_PROPERTIES_AP_BATCH_PROPERTY_PANEL_TITLE";default:return"DEVICE_PROPERTIES_DEFAULT_BATCH_PROPERTY_PANEL_TITLE"}}(this.modelType))},getCollectionAttrValues:function(a,b){var c=this.get("collection");return c?b?c.pluck(a):Array.from(new Set(c.pluck(a))):[]},hasCollectionAttrValue:function(a,b,c){return this.getCollectionAttrValues(a).some(angular.isFunction(b)?b:function(a){return!(!c||void 0!==a)||b===a})},countCollectionAttrValue:function(a,b,c){return this.getCollectionAttrValues(a,!0).filter(angular.isFunction(b)?b:function(a){return!(!c||void 0!==a)||b===a}).length}})}])},{}],1258:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("ClientHistoryModel",["CORSModel","webrtcMixin",function(a,b){return a.extend(b).extend({idAttribute:"_id"})}])},{}],1259:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("ClientMgrModel",["CORSModel","siteUrlMixin","webrtcMixin",function(a,b,c){return a.extend(b).extend(c).extend({siteUrl:"cmd/stamgr"})}])},{}],1260:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("ClientModel",["BaseClientModel","savePartialMixin",function(a,b){return a.extend(b).extend({idAttribute:"mac",modelType:"client",siteUrl:"rest/user",url:function(){return this.buildUrl({id:this.get("_id")})},sync:function(b,c,d){return d=d||{},"read"===b&&(d.url=this.buildUrl({siteUrl:"stat/sta"})),a.prototype.sync.call(this,b,c,d)}})}])},{}],1261:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("ConfigMgrModel",["CORSModel","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d){return a.extend(b).extend(c).extend(d).extend({siteUrl:"cmd/cfgmgr"})}])},{}],1262:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DpiAppModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/dpiapp"})}])},{}],1263:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DpiGroupModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/dpigroup"})}])},{}],1264:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DynamicDnsModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/dynamicdns"})}])},{}],1265:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("DynamicDnsStatsModel",["CORSModel","webrtcMixin",function(a,b){return a.extend(b).extend({idAttribute:"_id"})}])},{}],1266:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("EventMgrModel",["CORSModel","siteUrlMixin","webrtcMixin",function(a,b,c){return a.extend(b).extend(c).extend({siteUrl:"cmd/evtmgr"})}])},{}],1267:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("EventModel",["CORSModel","webrtcMixin",function(a,b){return a.extend(b).extend({idAttribute:"_id"})}])},{}],1268:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("FirewallGroupModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/firewallgroup"})}])},{}],1269:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("FirewallRuleModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/firewallrule"})}])},{}],1270:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("GuestPortalImageModel",["CORSModel","siteUrlMixin","webrtcMixin",function(a,b,c){return a.extend(b).extend(c).extend({siteUrl:"rest/portalfile"})}])},{}],1271:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("Hotspot2Model",["CORSModel","structureMixin","webrtcMixin","savePartialMixin","deepCopyMixin","siteUrlMixin",function(a,b,c,d,e,f){return a.extend(b).extend(c).extend(d).extend(e).extend(f).extend({defaults:{venue_group:"0",venue_type:"0",network_type:"0"},idAttribute:"_id",siteUrl:"rest/hotspot2conf"})}])},{}],1272:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("HotspotOverridesModel",["CORSModel","resolveMixin","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({siteUrl:"stat/hotspotoverrides"})}])},{}],1273:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("KnownClientModel",["BaseClientModel","resolveMixin",function(a,b){return a.extend(b).extend({idAttribute:"mac",modelType:"knownclient",siteUrl:"stat/user",sync:function(b,c,d){return d=d||{},"update"===b&&(d.url=this.buildUrl({id:this.get("_id"),siteUrl:"rest/user"})),a.prototype.sync.call(this,b,c,d)}})}])},{}],1274:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("MapEditor",["maps","site","mapCoordinatesAssistant","imageUrlUtils","MapModel","UnifiFileBasePath","Upload","fileUtils","$q","MAP_DEFAULTS","MAP_TYPES","UseWebrtc",function(a,b,c,d,e,f,g,h,i,j,k,l){var m=function(){};return m.prototype.withMap=function(a){return this.map=a,this},m.prototype.withMapOptions=function(a){return this.mapOptions=a,this},m.prototype.save=function(){var b;switch(this.map||(this.map=new e),this.map.set({name:this.mapOptions.name,type:this.mapOptions.type}),c.invalidateAssistantForMap(this.map),this.mapOptions.type){case k.GOOGLE:b=this.saveGoogleMap();break;case k.IMAGE:b=this.saveImageMap();break;default:return i.reject("invalid map type")}return b.then(function(){return a.repository.collection.add(this.map),this.map.trigger(j.MAP_EDITED_EVENT),this.map}.bind(this))},m.prototype.saveGoogleMap=function(){var a=this.mapOptions.google;return this.map.set({lat:a.center[0],lng:a.center[1],mapTypeId:a.mapTypeId,zoom:a.zoom}),this.map.save()},m.prototype.saveImageMap=function(){if(this.mapOptions.image.file){var a=b.getActiveSite(),c=[f,"upload","s",a,"map"];return l&&c.push(this.mapOptions.type,encodeURI(this.mapOptions.name)),this.map.id&&c.push(this.map.id),this.getFileDataUrl(this.mapOptions.image.file).then(function(a){return d.loadImage(a).then(function(a){return g.upload({url:c.join("/"),fields:{name:this.mapOptions.name,type:this.mapOptions.type},fileFormDataName:"Filedata",file:this.mapOptions.image.file,withCredentials:!0,withWebRTC:l,headers:{"X-Requested-With":"XMLHttpRequest"}}).then(function(b){return this.map.savePartial({_id:b.data.data[0]._id,offset_top:-a.size.height/2,offset_left:-a.size.width/2,zoom:j.DEFAULT_MAP.zoom}).then(function(){this.map.set("url",b.data.data[0].url)}.bind(this))}.bind(this))}.bind(this))}.bind(this))}var e=this.mapOptions.image;return e.center?(this.map.set({lat:e.center[0],lng:e.center[1],zoom:e.zoom}),this.map.savePartial({name:this.map.get("name")})):d.loadImage(this.map.getMapImageUrl()).then(function(a){return this.map.savePartial({offset_top:-a.size.height/2,offset_left:-a.size.width/2,zoom:j.DEFAULT_MAP.zoom})}.bind(this))},m.prototype.getFileDataUrl=function(a){return h.readLocalToUrl(a)},m}])},{}],1275:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("MapModel",["$q","CORSModel","atlas","siteUrlMixin","structureMixin","deepCopyMixin","getNestedMixin","savePartialMixin","webrtcMixin","UnifiFileBasePath","MAP_TYPES",function(a,b,c,d,e,f,g,h,i,j,k){return b.extend(d).extend(e).extend(f).extend(g).extend(h).extend(i).extend({idAttribute:"_id",siteUrl:"rest/map",isGoogleMap:function(){return this.get("type")===k.GOOGLE},isImageMap:function(){return this.get("type")===k.IMAGE||!this.get("type")},getMapImageUrl:function(){return j+this.get("url")},parse:function(a){return a=e.parse.call(this,a),a&&(a.lat&&angular.isString(a.lat)&&(a.lat=parseFloat(a.lat)),a.lng&&angular.isString(a.lng)&&(a.lng=parseFloat(a.lng))),a}})}])},{}],1276:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("NeighboringAccessPointModel",["CORSAssociatedModel","siteUrlMixin","deepCopyMixin","getNestedMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",isGrouped:function(){var a=this.get("aps");return a&&a.length>1}})}])},{}],1277:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("NetworkModel",["CORSModel","siteUrlMixin","structureMixin","savePartialMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(b).extend(c).extend(d).extend(e).extend(f).extend({idAttribute:"_id",siteUrl:"rest/networkconf"})}])},{}],1278:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PastConnectionModel",["CORSAssociatedModel","siteUrlMixin","deepCopyMixin","getNestedMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",getDisplayName:function(){return this.get("name")||this.get("hostname")||this.get("mac")}})}])},{}],1279:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PastGuestAuthorizationModel",["CORSAssociatedModel","siteUrlMixin","deepCopyMixin","getNestedMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",getDisplayName:function(){return this.get("hostname")||this.get("mac")}})}])},{}],1280:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PortForwardModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/portforward"})}])},{}],1281:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("PortForwardStatsModel",["CORSAssociatedModel","siteUrlMixin","deepCopyMixin","getNestedMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id"})}])},{}],1282:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RadiusProfileModel",["CORSModel","siteUrlMixin","structureMixin","savePartialMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(b).extend(c).extend(d).extend(e).extend(f).extend({defaults:{acct_servers:[],auth_servers:[]},idAttribute:"_id",siteUrl:"rest/radiusprofile"})}])},{}],1283:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RadiusUserModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d){return a.extend(b).extend(c).extend(d).extend({idAttribute:"_id",siteUrl:"rest/account"})}])},{}],1284:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RemoteUserVpnModel",["CORSModel","webrtcMixin",function(a,b){return a.extend(b).extend({idAttribute:"_id"})}])},{}],1285:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RoutingModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/routing"})}])},{}],1286:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("RoutingStatsModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"stat/routing",parse:function(a){var b={};return a.nh&&a.nh[0]&&(b.prefix=a.pfx,b["interface"]=a.nh[0].intf,b.metric=a.nh[0].metric,b.type=a.nh[0].t,b.via=a.nh[0].via),b}})}])},{}],1287:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SettingsGuestAccessModel",["HOTSPOT_PAYMENT_FIELDS_DEFAULTS","HOTSPOT_PORTAL_CUSTOMIZED_DEFAULTS","HOTSPOT_PORTAL_CUSTOMIZED_LANGUAGES_DEFAULTS","SettingsModel",function(a,b,c,d){return d.extend({defaults:angular.extend({portal_customized_title:"Hotspot portal",voucher_enabled:!0},a,b,c),resetPortalCustomization:function(){this.set(b)}})}])},{}],1288:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("StatisticsMgrModel",["CORSModel","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d){return a.extend(b).extend(c).extend(d).extend({siteUrl:"cmd/stat"})}])},{}],1289:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("StreamDeviceModel",["CORSAssociatedModel",function(a){return a.extend({idAttribute:"mac"})}])},{}],1290:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("StreamMgrModel",["CORSModel","siteUrlMixin","webrtcMixin",function(a,b,c){return a.extend(b).extend(c).extend({siteUrl:"cmd/streammgr"})}])},{}],1291:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("StreamModel",["CORSAssociatedModel","siteUrlMixin","deepCopyMixin","getNestedMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"streamId",modelType:"stream",getDisplayName:function(){return this.id}})}])},{}],1292:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SwitchPortModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/portconf"})}])},{}],1293:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("SwitchStatsPortModel",["SwitchPortModel",function(a){
return a.extend({idAttribute:void 0})}])},{}],1294:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("TagModel",["CORSModel","siteUrlMixin","structureMixin","savePartialMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/tag"})}])},{}],1295:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("TerminalAdapter",["$q","$interval","BaseModel","DeviceMgrModel",function(a,b,c,d){return c.extend({idAttribute:"mac",modelType:"terminal",turnCredentialsForDevice:{},initialize:function(a,b){this.set("name",b.device.getDisplayName()),this.set("mac",b.device.get("mac"))},getDisplayName:function(){return this.get("name")},buildSshSession:function(a,b,c){var e=this.extractTurnCredentialsForDevice(c);return(new d).save({cmd:"build-ssh-session",mac:this.get("mac"),uuid:a,stun:e.stunServer||b,turn:e.turnServer,username:e.username,password:e.password,ttl:"-1"})},extractTurnCredentialsForDevice:function(a){return a?{stunServer:a.uris.find(function(a){return a.indexOf("stun:")!==-1}).replace("stun:","").replace("?transport=udp",""),turnServer:a.uris.find(function(a){return a.indexOf("turn:")!==-1}).replace("turn:","").replace("?transport=udp",""),username:a.username,password:a.password}:{}},getSdpOffer:function(c){var e=a.defer(),f=0,g=b(function(){f++,(new d).save({cmd:"get-sdp-offer",mac:this.get("mac"),uuid:c}).then(function(a){if(a.data&&a.data.meta&&"ok"===a.data.meta.rc&&a.data.data&&a.data.data.length>0){var c=a.data.data[0].ssh_sdp_offer;null!==c&&(b.cancel(g),e.resolve(c))}}),f>30&&(b.cancel(g),e.reject("UnableToConnectTimeout"))}.bind(this),1e3);return e.promise},sendSdpAnswer:function(a,b){return(new d).save({cmd:"ssh-sdp-answer",mac:this.get("mac"),uuid:a,sdpanswer:b})},closeSshSession:function(a){return(new d).save({cmd:"close-ssh-session",mac:this.get("mac"),uuid:a})}})}])},{}],1296:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("UnreadAlertsModel",["CORSModel","resolveMixin","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({siteUrl:"cnt/alarm?archived=false",defaults:{count:0},incrementCount:function(){this.set("count",this.get("count")+1)},decrementCount:function(){this.set("count",this.get("count")-1)},clearCount:function(){this.set("count",0)}})}])},{}],1297:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("UserGroupModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/usergroup",defaults:{qos_rate_max_down:-1,qos_rate_max_up:-1},parse:function(a){return a=c.parse.call(this,a),a&&(a.qos_rate_max_down&&angular.isString(a.qos_rate_max_down)&&(a.qos_rate_max_down=parseInt(a.qos_rate_max_down,10)),a.qos_rate_max_up&&angular.isString(a.qos_rate_max_up)&&(a.qos_rate_max_up=parseInt(a.qos_rate_max_up,10))),a}})}])},{}],1298:[function(a,b,c){"use strict";angular.module("app-unifi-manage").factory("VerifyMgrModel",["CORSModel","structureMixin","deepCopyMixin","UnifiAPIBasePath",function(a,b,c,d){return a.extend(b).extend(c).extend({url:d+"/verify"})}])},{}],1299:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("neighboringAccessPoints",["$q","BaseCollectionRepository","NeighboringAccessPointCollection",function(a,b,c){this.repository=new b(new c);var d=function(b,c){if(c)return a.when(this.repository.collection);var d=b.models.reduce(function(a,b){var c,d=b.get("ap_mac"),e=b.get("bssid"),f=b.get("last_seen"),g=b.get("rssi"),h=b.get("rssi_age");a[e]?(c=a[e],f>c.get("last_seen")&&c.set("last_seen",f),(g>c.get("rssi")||g===c.get("rssi")&&h<c.get("rssi_age"))&&c.set({rssi:g,rssi_age:h,ap_mac:d})):(c=b.deepCopy(),c.set("aps",[]),a[e]=c);var i={ap_mac:d,rssi:g,rssi_age:h,last_seen:f};return c.get("aps").push(i),a},{}),e=Object.keys(d).map(function(a){return d[a]});return this.repository.collection.reset(e),a.when(this.repository.collection)}.bind(this);this.repository.fetch=function(){var a=!!this.collection.fetched||!!this.collection.isLoading;return b.prototype.fetch.apply(this,arguments).then(function(b){return d.call(this,b,a)})},this.updateWithin=function(a){this.repository.collection.updateWithin(a)},this.getWithin=function(){return this.repository.collection.getWithin()}}])},{}],1300:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("networkUtils",["$q","$translate","SiteMgrModel","networks","sites","apiResults",function(a,b,c,d,e,f){this.nativeNetworkTypes=["corporate","guest","voip","vlan-only"],this.saveNetwork=function(e,g){var h;return h="site-vpn"===g.purpose&&"auto"===(g.vpn_type||"auto")?(new c).save({name:g.name,site:g.remote_site_id,cmd:"add-site-vpn"}):e.savePartial(g,{wait:!0}),h.then(function(){return d.repository.refresh().then(function(){return a.when(b.instant("SETTINGS_NETWORK_SAVE_SUCCESS",{networkName:g.name}))})["catch"](function(){return a.when(b.instant("SETTINGS_NETWORK_SAVE_SUCCESS_FETCH_ERROR",{networkName:g.name}))})})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_NETWORK_SAVE_ERROR",{networkName:g.name}),c))})},this.removeNetwork=function(e){var g;return g="site-vpn"===e.get("purpose")&&"auto"===(e.get("vpn_type")||"auto")?(new c).save({site:e.get("remote_site_id"),cmd:"delete-site-vpn"}):e.destroy({wait:!0}),g.then(function(){return d.repository.refresh().then(function(){return a.when(b.instant("SETTINGS_NETWORK_DELETE_SUCCESS",{networkName:e.get("name")}))})["catch"](function(){return a.when(b.instant("SETTINGS_NETWORK_DELETE_SUCCESS_FETCH_ERROR",{networkName:e.get("name")}))})})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_NETWORK_DELETE_ERROR",{networkName:e.get("name")}),c))})},this.isRemoteSiteVpn=function(a){return"site-vpn"===a.get("purpose")&&"auto"===(a.get("vpn_type")||"auto")},this.getRemoteSite=function(a){if(this.isRemoteSiteVpn(a)){var b=e.repository.collection.get(a.get("remote_site_id"));if(b&&"admin"===b.get("role"))return b}}}])},{}],1301:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("networks",["BaseCollectionRepository","NetworkCollection",function(a,b){this.repository=new a(new b)}])},{}],1302:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("objectUtils",["_",function(a){this.deepInherit=function(a){var b=Object.create(a);for(var c in a)a.hasOwnProperty(c)&&"object"==typeof a[c]&&(b[c]=this.deepInherit(a[c]));return b},this.append=function(a,b,c){return angular.isObject(b)&&Object.keys(b).forEach(function(d){void 0===a[d]||c&&c.indexOf(d)!==-1?a[d]=b[d]:angular.isNumber(a[d])?a[d]=(a[d]||0)+b[d]:angular.isArray(a[d])?a[d]=a[d].concat(b[d]):angular.isObject(a[d])&&this.append(a[d],b[d])},this),a},this.appendAll=function(a,b){var c=function(a,c){return a?this.append(a,c,b):a=angular.copy(c),a}.bind(this),d=a.reduce(c,void 0);return d},this.reduceDuplicates=function(b,c,d){var e=a.values(a.groupBy(b,c)).map(function(a){return this.appendAll(a,d)},this);return e}}])},{}],1303:[function(a,b,c){"use strict";var d=["ng","na"],e={20:1,40:2,80:4},f={na:4,ng:1};angular.module("app-unifi-manage").service("occupancy",["countryChannels","devices","deviceRadioUtils",function(a,b,c){function g(a,b){var d=[],g=c.getPrimaryChannel(b,a);if(g)for(var h=c.getExtChannelIndicator(b,a),i=c.getHt(b,a),j=h>0?1:h<0?-1:0,k=e[i],l=c.getUnfilteredChannelOptions(a,i).map(function(a){return a.channel}),m=0;m<k;m++){var n=g+m*f[a]*j;l.indexOf(n)!==-1&&d.push(n)}return d}this.getOccupiedChannels=function(){function c(c,d){var e=a.repository.model.get("channels_"+d);if(!e)return c;var f=b.repository.collection.reduce(function(a,b){var c=g(d,b);return c.forEach(function(b){a[b]=a[b]?a[b]+1:1}),a},{}),h=e.map(function(a){var b=f[a]||0;return c.maxValue=Math.max(c.maxValue,b),{label:a,value:b}});return c.radios[d]=h,c}return d.reduce(c,{radios:{},maxValue:0})}}])},{}],1304:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("ouiIcons",["OUI",function(a){this.getIconForOuiName=function(b){switch(b){case a.UBIQUITI:return"ubnt-icon--u";case a.APPLE:return"ubnt-icon--apple";default:return"ubnt-icon--chipset"}}}])},{}],1305:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("pastConnections",["BaseCollectionRepository","PastConnectionCollection","knownClientsCache",function(a,b,c){this.repository=new a(new b),this.interval=null,this.setInterval=function(a){this.interval=a},this.updateDateInterval=function(a,b){a=parseInt(a),b=parseInt(b);var c=a!==this.getStart()||b!==this.getEnd();this.repository.collection.updateDateInterval(a,b),c&&this.repository.invalidate()},this.getStart=function(){return this.repository.collection.getStart()},this.getEnd=function(){return this.repository.collection.getEnd()},this.getInterval=function(){return this.interval},c.repository.collection.on("save",function(){this.repository.collection.trigger("change")}.bind(this))}])},{}],1306:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("pastGuestAuthorizations",["BaseCollectionRepository","PastGuestAuthorizationCollection",function(a,b){this.repository=new a(new b),this.interval=null,this.setInterval=function(a){this.interval=a},this.updateDateInterval=function(a,b){a=parseInt(a),b=parseInt(b);var c=a!==this.getStart()||b!==this.getEnd();c&&(this.repository.collection.updateDateInterval(a,b),this.repository.invalidate())},this.getStart=function(){return this.repository.collection.getStart()},this.getEnd=function(){return this.repository.collection.getEnd()},this.getInterval=function(){return this.interval}}])},{}],1307:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("portForwardStats",["BaseCollectionRepository","portForwards","PortForwardStatsCollection",function(a,b,c){this.repository=new a(new c),this.repository.fetch=function(c){return a.prototype.fetch.call(this.repository,c).then(function(){var a=this.repository.collection.filter(function(a){return b.repository.collection.get(a.id)||a.get("is_upnp")});this.repository.collection.reset(a)}.bind(this)).then(function(){this.repository.collection.add(b.repository.collection.deepAttributes(),{merge:!0})}.bind(this))}.bind(this),b.repository.collection.on("add change",function(){this.repository.isRegistered()&&this.repository.collection.add(b.repository.collection.deepAttributes(),{merge:!0})}.bind(this)),b.repository.collection.on("remove",function(a){this.repository.isRegistered()&&this.repository.collection.remove(a.id)}.bind(this))}])},{}],1308:[function(a,b,c){"use strict";function d(a,b,c){this.localStorageKey="columnStore:portForwardStats",this.columnOptions=[{id:"name",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_NAME"},{id:"src",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_SRC"},{id:"proto",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_PROTOCOL"},{id:"dst_port",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_DST_PORT"},{id:"fwd",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_FORWARD_IP"},{id:"fwd_port",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_FORWARD_PORT"},{id:"rx_packets",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_RX_PACKETS"},{id:"rx_bytes",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_RX_BYTES"},{id:"lease_duration",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_LEASE_DURATION"},{id:"actions",translationKey:"PORT_FORWARD_STATS_TABLE_HEADER_ACTIONS"}],this.columnPresets=[{id:"all",translationKey:"PORT_FORWARD_STATS_VIEW_ALL"},{id:"userdefined",translationKey:"PORT_FORWARD_STATS_VIEW_USER_DEFINED"},{id:"upnp",translationKey:"PORT_FORWARD_STATS_VIEW_UPNP"}],this.views={all:["name","src","proto","dst_port","fwd","fwd_port","rx_packets","rx_bytes","actions"],userdefined:["name","src","proto","dst_port","fwd","fwd_port","rx_packets","rx_bytes","actions"],upnp:["name","proto","dst_port","fwd","fwd_port","rx_packets","rx_bytes","lease_duration"]},e.call(this,a,b,c)}var e=a("../../base-unifi/services/BaseListColumnStore");d.prototype=Object.create(e.prototype),d.constructor=d,d.prototype.setColumnGroup=function(a){this.columnGroup=a},d.prototype.getPredefinedColumns=function(){return this.columnGroup?this.views[this.columnGroup]:this.views.all},d.prototype.setColumns=function(){this.isCustomized?e.prototype.setColumns.call(this):this.columns=this.getPredefinedColumns()},d.prototype.setColumnPreset=function(a){var b="allColumns"===a?this.getAllColumns():this.views[a];b&&b.length&&(this.clearSelectedColumns(),this.columns=b,this.setCustomized(!0),this.saveColumns())},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","LocalStorageBooleanValue"],angular.module("app-unifi-manage").service("portForwardStatsListColumnStore",d)},{"../../base-unifi/services/BaseListColumnStore":1698}],1309:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("portForwards",["BaseCollectionRepository","PortForwardCollection",function(a,b){this.repository=new a(new b)}])},{}],1310:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("postMessage",["$window",function(a){var b=[];this.registerListener=function(a){b.push(a)},this.getListeners=function(){return b},this.unregisterListener=function(a){var c=b.indexOf(a);c!==-1&&b.splice(c,1)},this.send=function(a,b){a.postMessage(b,"*")},a.onmessage=function(a){b.forEach(function(b){b.call(b,a.data)})}}])},{}],1311:[function(a,b,c){"use strict";var d=a("../../base-unifi/services/BaseDockablePanels");angular.module("app-unifi-manage").service("propertyPanel",["$timeout","$q","$rootScope","$window","queryString","knownClientsCache","devices","streams","batchEdit","BaseCollection","ItemState","APP_EVENTS",function(a,b,c,e,f,g,h,i,j,k,l,m){var n=function(){this.queryStringKey="pp",this.dockOpenEvent=m.PROPERTY_PANEL_OPEN,this.dockCloseEvent=m.PROPERTY_PANEL_CLOSE,this.itemResizeEvent=m.PROPERTY_PANEL_ITEM_RESIZED,this.openTransitionRate=300,this.closeTransitionRate=300,this.addEventHandlers(),d.call(this,a,b,c,e,f,k,l)};return n.prototype=Object.create(d.prototype),n.prototype.constructor=n,n.prototype.addEventHandlers=function(){g.repository.collection.on("remove",this.removeItem,this),h.repository.collection.on("remove",this.removeItem,this),i.repository.collection.on("remove",this.removeItem,this),g.repository.collection.on("reset",this.removeKnownClients,this),h.repository.collection.on("reset",this.removeDevices,this),i.repository.collection.on("reset",this.removeStreams,this)},n.prototype.removeEventHandlers=function(){g.repository.collection.off("remove",this.removeItem,this),h.repository.collection.off("remove",this.removeItem,this),i.repository.collection.off("remove",this.removeItem,this),g.repository.collection.off("reset",this.removeKnownClients,this),h.repository.collection.off("reset",this.removeDevices,this),i.repository.collection.off("reset",this.removeStreams,this)},n.prototype.removeKnownClients=function(){return this.removeItemsByType(["knownclient"])},n.prototype.removeDevices=function(){return this.removeItemsByType(["device"])},n.prototype.removeStreams=function(){return this.removeItemsByType(["stream"])},n.prototype.getItemsWithPendingChanges=function(a){return this.getItemsByType(["device","batch:uap"]).filter(function(b){if(b.hasPendingChanges()&&(!a||!this.getItemState(b,"undocked")))return!0}.bind(this))},n.prototype.getItemTypeById=function(a){var b=a.split("|");if(b&&2===b.length)return b[0]},n.prototype.getItemById=function(a){var c=a.split("|");if(c&&2===c.length)switch(c[0]){case"knownclient":return g.repository.fetchItem(c[1]).then(function(a){return a?b.when(a):b.reject()});case"device":var d=h.repository.collection.get(c[1]);return d?b.when(d):b.reject();case"stream":return h.repository.fetch().then(function(){return i.repository.fetch()}).then(function(){return i.repository.collection.get(c[1])});case"batch:uap":return b.when(j.getBatch(c[1]))}return b.reject()},n.prototype.addItem=function(a,b,c,e){"client"!==a.modelType&&"knownclient"!==a.modelType||(a=g.cacheConnectedClient(a)),d.prototype.addItem.call(this,a,b,c,e)},n.prototype.removeItem=function(a,b){a._hasPendingMixin&&a.hasPendingChanges()&&a.clearPendingChanges(),d.prototype.removeItem.call(this,a,b)},n.prototype.canAddItemToQueryString=function(a){return a&&!a.isBatch},new n}])},{"../../base-unifi/services/BaseDockablePanels":1696}],1312:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("radius",["$q","$translate","apiResults","BaseCollectionRepository","RadiusProfileModel","RadiusProfileCollection",function(a,b,c,d,e,f){this.repository=new d(new f),this.save=function(d,f){var g=this.repository.collection;return d=d||new e,f=f||d.attributes,d.save(f).then(function(c){return d.set(d.parse(c.data)),g.add(d,{merge:!0}),a.when(b.instant("PROFILES_RADIUS_ACTIONS_SAVE_SUCCESS",{name:f.name}))})["catch"](function(d){return a.reject(c.appendErrorMsg(b.instant("PROFILES_RADIUS_ACTIONS_SAVE_ERROR",{name:f.name}),d))})},this.remove=function(d){return d.destroy().then(function(){return this.repository.collection.remove(d.id),a.when(b.instant("PROFILES_RADIUS_ACTIONS_DELETE_SUCCESS",{name:d.get("name")}))}.bind(this))["catch"](function(e){return a.reject(c.appendErrorMsg(b.instant("PROFILES_RADIUS_ACTIONS_DELETE_ERROR",{name:d.get("name")}),e))})}}])},{}],1313:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("radiusUsers",["$q","$translate","apiResults","BaseCollectionRepository","RadiusUserModel","RadiusUserCollection",function(a,b,c,d,e,f){this.repository=new d(new f),this.save=function(d,f){var g=this.repository.collection;return f=f||d.attributes,d=d||new e,d.save(f).then(function(c){return d.set(d.parse(c.data)),g.add(d,{merge:!0}),a.when(b.instant("RADIUS_USER_ACTIONS_SAVE_SUCCESS",{name:f.name}))})["catch"](function(d){return a.reject(c.appendErrorMsg(b.instant("RADIUS_USER_ACTIONS_SAVE_ERROR",{name:f.name}),d))})},this.removeUser=function(d){return d.destroy().then(function(){return this.repository.collection.remove(d.id),a.when(b.instant("RADIUS_USER_ACTIONS_REVOKE_SUCCESS",{name:d.get("name")}))}.bind(this))["catch"](function(e){return a.reject(c.appendErrorMsg(b.instant("RADIUS_USER_ACTIONS_REVOKE_ERROR",{name:d.get("name")}),e))})}}])},{}],1314:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("regexUtils",[function(){var a=function(a,b){var c=a.toString().substring(1).split(/\/([^\/]*)$/),d=c[0],e=c[1];return new RegExp(b.call(b,d),e)};this.exact=function(b){return a(b,function(a){if("^"===a.substring(0,1)||"$"===a.substring(a.length-1))throw new Error("Unable to modify - regex already contains one or more modifiers");return"^"+a+"$"})},this.contains=function(b){return a(b,function(a){var b="^"===a.substring(0,1),c="$"===a.substring(a.length-1);if(!b&&!c)throw new Error("Unable to modify - regex does not contain modifiers to remove");return a.substring(b?1:0,a.length-(c?1:0))})},this.captured=function(b){return a(b,function(a){return"("+a+")"})}}])},{}],1315:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("reload",["$window","$state","$stateParams",function(a,b,c){this.reloadState=function(){return b.go(b.current.name,c,{reload:!0})},this.reloadPage=function(b){a.location.reload(!!b)}}])},{}],1316:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("remoteUserVpn",["BaseCollectionRepository","RemoteUserVpnCollection",function(a,b){this.repository=new a(new b),this.refresh=this.repository.refresh.bind(this.repository)}])},{}],1317:[function(a,b,c){"use strict";function d(a,b,c){this.localStorageKey="columnStore:remoteUserVpn",this.columnOptions=[{id:"interface",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_INTERFACE"},{id:"remote_ip",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_REMOTE_IP"},{id:"user",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_USER"},{id:"rx_packets",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_DOWN_PKTS"},{id:"rx_bytes",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_DOWN_BYTES"},{id:"tx_packets",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_UP_PKTS"},{id:"tx_bytes",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_UP_BYTES"},{id:"uptime",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_UPTIME"},{id:"actions",translationKey:"REMOTE_USER_VPN_TABLE_HEADER_ACTIONS",isPermanent:!0}],this.views={"default":["interface","remote_ip","user","rx_packets","rx_bytes","tx_packets","tx_bytes","uptime","actions"]},e.call(this,a,b,c)}var e=a("../../base-unifi/services/BaseListColumnStore");d.prototype=Object.create(e.prototype),d.constructor=d,d.prototype.setColumns=function(){this.isCustomized?e.prototype.setColumns.call(this):this.columns=this.views["default"]},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","LocalStorageBooleanValue"],angular.module("app-unifi-manage").service("remoteUserVpnListColumnStore",d)},{"../../base-unifi/services/BaseListColumnStore":1698}],1318:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("remoteUserVpnUtils",["$q","$translate","apiResults","DeviceMgrModel","remoteUserVpn",function(a,b,c,d,e){this.terminate=function(f){var g=new d;return g.save({cmd:"terminate-remote-user-vpn","interface":f.get("interface"),user:f.get("user"),remote_ip:f.get("remote_ip")}).then(function(){return e.repository.refresh().then(function(){return a.when(b.instant("REMOTE_USER_VPN_TERMINATE_SUCCESS"))})})["catch"](function(d){return a.reject(c.appendErrorMsg(b.instant("REMOTE_USER_VPN_TERMINATE_ERROR"),d))})}}])},{}],1319:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("manageResolver",["$q","translateResolver","urlLocaleResolver","webrtcResolver",function(a,b,c,d){this.resolve=function(){return a.all([c.resolve(),b.resolve("modules"),d.resolve()])}}])},{}],1320:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("turnCredentialsResolver",["$http","$q","$translate","apiResults","featureFlag","SdnMgrModel","status","system","TurnCredentialsApiEndpoint","UnifiCloudHost",function(a,b,c,d,e,f,g,h,i,j){this.resolve=function(){return e.isEnabled("withTurnCredentialsEndpoint")&&!h.isUnifiGo()?(new f).save({cmd:"get-turn-credentials"}).then(function(a){return a.data.data[0]})["catch"](function(a){return b.reject(d.appendErrorMsg(c.instant("DEBUG_TERMINAL_GET_TURN_CREDENTIALS_ERROR"),a))}):a.get("https://"+j+i+g.repository.model.getNested("meta.uuid")).then(function(a){return a.data})}}])},{}],1321:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("wsRegisterMessageHandlers",["$q","deviceWsMessageHandler","eventsWsMessageHandler",function(a,b,c){this.resolve=function(){return b.register(),c.register(),a.when()}}])},{}],1322:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("wsResolver",["$q","bowser","deviceWsMessageHandler","eventsWsMessageHandler","preferences","UseWebrtc","wsConnector","WebSocketEnabled",function(a,b,c,d,e,f,g,h){this.resolve=function(){return b.safari||b.ios||!e.model.get("websocketEnabled")||!h?a.when():f?a.when():(g.isConnected()||g.connect(),a.when())}}])},{}],1323:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("rfEnvironment",["$interval","$q","RF_ENVIRONMENT_SETTINGS","DeviceMgrModel","deviceFeatureUtils","deviceStateUtils","polls","SpectrumScanModel",function(a,b,c,d,e,f,g,h){this.getSpectrumScan=function(a){return new h({mac:a})},this.startSpectrumScan=function(a){return(new d).save({cmd:"spectrum-scan",mac:a.get("mac")})},this._getPollName=function(a){return"rfEnvironment.refreshStatus."+a.get("mac").replace(/:/g,"")},this.stopRefreshingSpectrumScanResults=function(a){var b=this._getPollName(a);g.destroy(b)},this.refreshSpectrumScanResults=function(a){var d=b.defer(),e=this._getPollName(a);return a.resolve({forceFetch:!0}).then(function(){return g.createModelPoll(e,a,{delay:c.DEVICE_FETCH.INTERVAL_DELAY,count:c.DEVICE_FETCH.INTERVAL_COUNT,forceFetch:!0,onSuccess:function(){this.isScanning(a)||(d.resolve(),g.destroy(e))}.bind(this)}).then(function(a){return g.start(e).then(function(){d.reject(),a._isRunning=!0,g.destroy(e)})})}.bind(this)),d.promise},this.isAvailable=function(a){var b=e.isGen2(a),c=f.isDeviceConnected(a);return c&&b},this.isScanning=function(a){return a.get("spectrum_scanning")},this.getLastScanningTime=function(a,b){return 1e3*(a.get("spectrum_table_time_"+b)||0)}}])},{}],1324:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("rfEnvironmentChart",["deviceChannelUtils","mathUtils",function(a,b){var c=["interference","interference_type","rssi_histogram","utilization"];this.getCurrentChannelDescription=function(b,c){return a.getCurrentChannelDescription(b,c)},this.getData=function(a,b,c){var d=[20,40,80];return d.map(function(d){return{radioType:b,ht:d,channels:this.getChannels(a,b,d,c)}}.bind(this)).filter(function(a){return!!a.channels})},this.getChannels=function(b,d,e,f){var g=a.getChannelsDescriptions(b,d,e),h=a.getSpectrumTable(f,d);return g&&g.map(function(a){var b=this.getPrimaryChannel(a),f={radioType:d,ht:e},g=this.getSpectrum(h,b,e),i=c.reduce(function(a,b){return a[b]=g&&g[b],a},{});return angular.extend(f,a,i)}.bind(this))},this.getPrimaryChannel=function(a){var b=a.subChannels;return a.channel<=6?b[0]:b[b.length-1]},this.getSpectrum=function(a,b,c){return c=parseInt(c,10),a&&a.find(function(a){return a.channel===b&&parseInt(a.width,10)===c})||{}},this.getDomainIntervals=function(a){return a.reduce(function(a,b){return a.concat(b.channels)},[]).sort(function(a,b){var c=a.lowerFrequency-b.lowerFrequency;return c||a.upperFrequency-b.upperFrequency}).reduce(function(a,b){var c=a[a.length-1];return c&&b.lowerFrequency<=c.upperFrequency?c.upperFrequency=Math.max(c.upperFrequency,b.upperFrequency):a.push({lowerFrequency:b.lowerFrequency,upperFrequency:b.upperFrequency}),a},[]).map(function(a,c,d){return 0===c&&(a.lowerFrequency=b.floor10(a.lowerFrequency,1)),c===d.length-1&&(a.upperFrequency=b.ceil10(a.upperFrequency,1)),a})},this.getDomainLength=function(a){return a.reduce(function(a,b){return a+(b.upperFrequency-b.lowerFrequency)},0)},this.getTicks=function(a,b){return a.reduce(function(a,c){for(var d=c.lowerFrequency;d<=c.upperFrequency;d+=b)a.push(d);return a},[])}}])},{}],1325:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("routing",["BaseCollectionRepository","RoutingCollection",function(a,b){this.repository=new a(new b)}])},{}],1326:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("routingStats",["BaseCollectionRepository","RoutingStatsCollection",function(a,b){this.repository=new a(new b)}])},{}],1327:[function(a,b,c){"use strict";var d=a("moment");angular.module("app-unifi-manage").service("scheduleConverter",[function(){function a(a){var b=a>=1440?1439:a;return d({hour:Math.floor(b/60),minute:Math.round(60*(b/60%1))}).format("HHmm")}function b(a,b){return a.find(function(a){return a.name===b})}function c(){var a=[];return e.forEach(function(b){a.push({name:b,values:[0,0],enabled:!1})}),a}var e=["mon","tue","wed","thu","fri","sat","sun"];this.convertToHHMM=function(b){var c=[];return b.forEach(function(b){if(b.enabled){var d=a(b.values[0]),e=a(b.values[1]);c.push(b.name+"|"+d+"-"+e)}}),c},this.convertFromHHMM=function(a){var d=c();return a.forEach(function(a){var c=a.match(/([a-z]+)(-([a-z]+))?\|([\d]+)-([\d]+)/),f=c[1],g=c[3],h=parseInt(c[4].substr(0,2),10),i=parseInt(c[4].substr(2),10),j=parseInt(c[5].substr(0,2),10),k=parseInt(c[5].substr(2),10),l=e.slice(e.indexOf(f),e.indexOf(g||f)+1);l.forEach(function(a){var c=b(d,a);c.values=[60*h+i,60*j+k],c.enabled=!0})}),d}}])},{moment:238}],1328:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("selectedDpiApplications",["dpiUtils",function(a){var b=[],c=[],d=function(){c=a.applicationsSortedByTraffic(this.categoryName).data.slice(0,5),b=this.getNames()}.bind(this),e=function(){c=a.applicationsSortedByTraffic(this.categoryName).data.filter(function(a){return b.indexOf(a.name)!==-1}),b=this.getNames()}.bind(this);this.get=function(){return c},this.getNames=function(){return c.map(function(a){return a.name})},this.clear=function(){b=[],c=[]},this.isSelected=function(a){return this.getNames().indexOf(a)!==-1},this.toggleApplication=function(a){this.isSelected(a)?this.removeApplication(a):this.addApplication(a)},this.removeApplication=function(a){var d=this.indexOf(a);c.splice(d,1),b.splice(d,1)},this.addApplication=function(a){b.push(a),e()},this.indexOf=function(a){return this.getNames().indexOf(a)},this.setCategory=function(a){this.categoryName!==a&&(this.categoryName=a,d())}}])},{}],1329:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("selectedDpiCategories",["localStorageFailSafe","LocalStorageObjectValue","Backbone","dpi","dpiUtils",function(a,b,c,d,e){var f=new b(a,"SELECTED_DPI_CATEGORIES");f.hydrate();var g,h=!1,i=[];this.getNames=function(){return i.map(function(a){return a.name})};var j=function(){g=this.getNames(),h||f.setValue(g)}.bind(this);void 0===f.getValue()?(i=e.categoriesSortedByTraffic().data.slice(0,5),j()):g=f.getValue();var k=function(){i=e.categoriesSortedByTraffic().data.filter(function(a){return g.indexOf(a.name)!==-1})};k(),this.setTemporary=function(a){h=a,a||(g=f.getValue()||[],k())},this.get=function(){return i},this.getIds=function(){return i.reduce(function(a,b){return a.concat(e.getIdsForCategoryName(b.name))},[])},this.clear=function(){g=[],i=[],j()},this.isSelected=function(a){return this.getNames().indexOf(a)!==-1},this.toggleCategory=function(a){this.isSelected(a)?this.removeCategory(a):this.addCategory(a)},this.removeCategory=function(a){i.splice(this.indexOf(a),1),j()},this.addCategory=function(a){a&&(g.push(a),k(),j())},this.indexOf=function(a){return this.getNames().indexOf(a)},this.allCategoriesSelected=function(){return!d.getAllAppCategories().some(function(a){return!this.isSelected(a.name)},this)}}])},{}],1330:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("settings",["$q","$translate","BaseCollectionRepository","SettingsCollection","ConfigMgrModel","apiResults","CHAT_LEVELS",function(a,b,c,d,e,f,g){this.repository=new c(new d);var h=function(){var b=this.getSettingFromKey("super_mgmt");return b&&void 0===b.get("live_chat")&&b.set("live_chat",g.SUPER_ONLY),a.when(this.repository.collection)}.bind(this),i=function(){var a=this.getSettingFromKey("country");if(a){var b=a.get("code");angular.isNumber(b)&&a.set("code",b.toString())}}.bind(this);this.repository.fetch=function(a){return c.prototype.fetch.call(this,a).then(i).then(h)},this.getSettingFromKey=function(a,b){return this.repository.collection.find(function(c){if(c.get("key")===a)return!b||c.get("site_id")===b})},this.saveSettings=function(c,d,e){return c.save(d,{wait:!0}).then(function(d){return c instanceof this.repository.collection.baseModel&&d&&d.data&&d.data.data&&d.data.data[0]&&(c.set(d.data.data[0]),this.repository.collection.add(c,{merge:!0})),a.when(b.instant("COMMON_NOTICE_SAVE_SUCCESS",{section:b.instant(e)}))}.bind(this))["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("COMMON_NOTICE_SAVE_ERROR",{section:b.instant(e)}),c))})},this.sendTestEmail=function(c,d){return(new e).save({cmd:"test_mail",email:d,host:c.get("host"),port:c.get("port"),use_auth:c.get("use_auth"),use_sender:c.get("use_sender"),use_ssl:c.get("use_ssl"),sender:c.get("sender"),username:c.get("username"),x_password:c.get("x_password")}).then(function(){return a.when(b.instant("SETTINGS_CONTROLLER_TEST_EMAIL_SUCCESS",{email:d}))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_CONTROLLER_TEST_EMAIL_ERROR",{email:d}),c))})}}])},{}],1331:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("speedTest",["$interval","$q","gateways","SPEED_TEST_SETTINGS","SPEED_TEST_STATUSES",function(a,b,c,d,e){this.$interval=a,this._testDefered=null,
this._resetTestData=function(){this.downloadProgress=[],this.uploadProgress=[],this.downloadPushedElements=0,this.uploadPushedElements=0,this.result=null},this._resetTestData(),this.isTestInProgress=function(){return!!this._testDefered},this.getTestPromise=function(){return this.isTestInProgress()?this._testDefered.promise:b.when(this.result)},this.resolve=function(){return this.isTestInProgress()?this.getTestPromise():this.result?b.when(this.result):this.fetch()},this.fetch=function(){return c.fetchSpeedTestResult().then(function(a){return this.result=a,a}.bind(this))},this.startTest=function(){return this.isTestInProgress()?this.getTestPromise():(this._testDefered=b.defer(),this._resetTestData(),this._executeTest())},this.parseProgressResult=function(a,b){if(a&&a.length)for(var c=0;c<a.length;++c)b.push.apply(b,a[c].records)},this._executeTest=function(){return c.startSpeedTest().then(function(){var a=this.$interval(function(){this.fetch().then(function(b){this.parseProgressResult(b["download-progress"],this.downloadProgress),this.parseProgressResult(b["upload-progress"],this.uploadProgress),this.isTestCompleted(b)&&this.interruptTest(a,b)}.bind(this))}.bind(this),d.POLLING_INTERVAL,d.POLLING_MAX_COUNT);a.then(function(){this.interruptTest(a)}.bind(this))}.bind(this)),this.getTestPromise()},this.interruptTest=function(a,b){this.isTestInProgress()&&(b?this._testDefered.resolve(b):this._testDefered.reject()),this._testDefered=null,a&&this.$interval.cancel(a)},this.isTestCompleted=function(a){return Boolean(a&&a.status_summary===e.IS_COMPLETED&&a.status_download===e.IS_COMPLETED&&a.status_upload===e.IS_COMPLETED&&a.xput_download&&a.xput_upload)};var f=function(a,b){a=a||e.UNKNOWN,b=b||0;var c=a===e.IS_COMPLETED&&0===b;return c?e.IN_PROGRESS:a};this.getPingStatusResult=function(){return this.result&&this.result.status_ping||e.UNKNOWN},this.getDownloadStatusResult=function(){return f(this.result&&this.result.status_download,this.result&&this.result.xput_download)},this.getUploadStatusResult=function(){return f(this.result&&this.result.status_upload,this.result&&this.result.xput_upload)},this.getPingValueResult=function(){var a=this.result&&this.result.latency||0;return Number(a)},this.getDownloadValueResult=function(){return this.result&&this.result.xput_download||0},this.getUploadValueResult=function(){return this.result&&this.result.xput_upload||0};var g=function(a){return a&&{time:a[0]/1e3,value:a[1]/100}};this.getNextDownloadTick=function(){var a=g(this.downloadProgress.shift());if(a)return{index:this.downloadPushedElements++,time:a.time,value:a.value,valueDownload:a.value}},this.getNextUploadTick=function(){var a=g(this.uploadProgress.shift());if(a)return{index:this.uploadPushedElements++,time:a.time,value:a.value,valueUpload:a.value}},this.hasNextDownloadTick=function(){return this.downloadProgress.length},this.hasNextUploadTick=function(){return this.uploadProgress.length}}])},{}],1332:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("statistics",["StatisticsMgrModel","$translate","apiResults","activityReports","dpiStats","$q",function(a,b,c,d,e,f){this.resetDpiCounters=function(){return(new a).save({cmd:"reset-dpi"}).then(function(){return e.repository.refresh()}).then(function(){return f.when(b.instant("SETTINGS_SITE_RESET_DPI_SUCCESS"))})["catch"](function(a){return f.reject(c.appendErrorMsg(b.instant("SETTINGS_SITE_RESET_DPI_ERROR"),a))})},this.resetCurrentStats=function(){return(new a).save({cmd:"reset-current"}).then(function(){return f.all(Object.keys(d.repositories).map(function(a){return d.repositories[a].refresh()})).then(function(){return f.when(b.instant("STATISTICS_CLEAR_CURRENT_STATS_SUCCESS"))})})["catch"](function(a){return f.reject(c.appendErrorMsg(b.instant("STATISTICS_CLEAR_CURRENT_STATS_ERROR"),a))})}}])},{}],1333:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("streams",["$q","$translate","apiResults","BaseCollectionRepository","StreamCollection","StreamDeviceModel","StreamDeviceCollection","StreamMgrModel",function(a,b,c,d,e,f,g,h){function i(a,b){var c={};return b.forEach(function(b){c[b]=a.get(b)}),c}this.streamDevicesCollection=new g,this.repository=new d(new e);var j=function(b){var c=[];return b.each(function(a){a.get("devices").forEach(function(b){var d=new f(b);d.set(i(a,["streamId","ready","streaming"])),c.push(d)})}),this.streamDevicesCollection.reset(c),a.when(this.repository.collection)}.bind(this);this.repository.fetch=function(a){return d.prototype.fetch.call(this,a).then(j)},this.terminateStream=function(d){var e=new h;return e.save({streamId:d.id,cmd:"stop-stream"}).then(function(){return this.repository.refresh(),a.when(b.instant("STREAMS_ACTIONS_TERMINATE_SUCCESS",{streamId:d.get("streamId")}))}.bind(this))["catch"](function(e){return a.reject(c.appendErrorMsg(b.instant("STREAMS_ACTIONS_TERMINATE_ERROR",{streamId:d.get("streamId")}),e))})}}])},{}],1334:[function(a,b,c){"use strict";function d(a,b,c){this.localStorageKey="columnStore:streams",this.columnOptions=[{id:"device",translationKey:"STREAMS_TABLE_HEADER_DEVICE"},{id:"stream_id",translationKey:"STREAMS_TABLE_HEADER_STREAM_ID"},{id:"ready",translationKey:"STREAMS_TABLE_HEADER_READY"},{id:"streaming",translationKey:"STREAMS_TABLE_HEADER_STREAMING"},{id:"connected",translationKey:"STREAMS_TABLE_HEADER_CONNECTED"}],this.columnPresets=[{id:"all",translationKey:"STREAMS_VIEW_ALL"}],this.views={all:["device","stream_id","ready","streaming","connected"]},e.call(this,a,b,c)}var e=a("../../base-unifi/services/BaseListColumnStore");d.prototype=Object.create(e.prototype),d.constructor=d,d.prototype.setColumnPreset=function(a){var b=this.views[a];b&&b.length&&(this.clearSelectedColumns(),this.columns=b,this.setCustomized(!0),this.saveColumns())},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","LocalStorageBooleanValue"],angular.module("app-unifi-manage").service("streamsListColumnStore",d)},{"../../base-unifi/services/BaseListColumnStore":1698}],1335:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("switchReports",["$q","$translate","BaseCollectionRepository","ReportCollection",function(a,b,c,d){this.setInterval=function(a){this.interval=a,this.repository.collection.setInterval(a)},this.getInterval=function(){return this.interval},this.setDateInterval=function(a,b){this.start=a,this.end=b,this.repository.collection.setDateInterval(a,b)},this.setSwitch=function(a){if(a){var b=a.get("port_table"),c=b.map(function(a){return a.get("port_idx")}).reduce(function(a,b){return a.concat(["rx_bytes","tx_bytes","rx_packets","tx_packets"].map(function(a){return"port_"+b+"-"+a}))},[]);c=["num_sta","time"].concat(c),this.repository.collection.setAttrs(c),this.repository.collection.setMac(a.id)}else this.repository.collection.setMac(void 0)},this.getStart=function(){return this.start},this.getEnd=function(){return this.end},this.repository=new c(new d("sw")),this.repository.collection.setAttrs(["bytes","num_sta","time"])}])},{}],1336:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("switchStats",["$q","BaseCollectionRepository","SwitchStatsPortCollection","devices","DEVICE_TYPES",function(a,b,c,d,e){this.repository=new b(new c),this.repository.fetch=function(b){return d.repository.fetch().then(function(c){var d=c.filter(function(a){return a.get("type")===e.SWITCH&&a.get("adopted")&&a.get("port_table")}).map(function(a){return a.get("port_table")}).reduce(function(a,b){return a.concat(b.toJSON())},[]);return this.collection.reset(d,b),a.when(this.collection)}.bind(this))},d.repository.collection.on("change:port_table[*]",function(){this.repository.isRegistered()&&this.repository.refresh()}.bind(this))}])},{}],1337:[function(a,b,c){"use strict";function d(a,b,c){this.localStorageKey="columnStore:switchStats",this.columnOptions=[{id:"port",translationKey:"SWITCH_STATS_TABLE_HEADER_PORT",isPermanent:!0},{id:"device",translationKey:"SWITCH_STATS_TABLE_HEADER_DEVICE"},{id:"name",translationKey:"SWITCH_STATS_TABLE_HEADER_NAME"},{id:"poeMode",translationKey:"SWITCH_STATS_TABLE_HEADER_POE_MODE"},{id:"poeDetection",translationKey:"SWITCH_STATS_TABLE_HEADER_POE_DETECTION"},{id:"poeClass",translationKey:"SWITCH_STATS_TABLE_HEADER_POE_CLASS"},{id:"poePower",translationKey:"SWITCH_STATS_TABLE_HEADER_POE_POWER"},{id:"poeVoltage",translationKey:"SWITCH_STATS_TABLE_HEADER_POE_VOLTAGE"},{id:"poeCurrent",translationKey:"SWITCH_STATS_TABLE_HEADER_POE_CURRENT"},{id:"operationMode",translationKey:"SWITCH_STATS_TABLE_HEADER_OPERATION_MODE"},{id:"networksVlans",translationKey:"SWITCH_STATS_TABLE_HEADER_NETWORKS_VLANS"},{id:"linkStatus",translationKey:"SWITCH_STATS_TABLE_HEADER_LINK_STATUS"},{id:"stp",translationKey:"SWITCH_STATS_TABLE_HEADER_STP"},{id:"tx",translationKey:"SWITCH_STATS_TABLE_HEADER_TX"},{id:"txBytes",translationKey:"SWITCH_STATS_TABLE_HEADER_TX_BYTES"},{id:"txPackets",translationKey:"SWITCH_STATS_TABLE_HEADER_TX_PACKETS"},{id:"txMulticast",translationKey:"SWITCH_STATS_TABLE_HEADER_TX_MULTICAST"},{id:"txBroadcast",translationKey:"SWITCH_STATS_TABLE_HEADER_TX_BROADCAST"},{id:"txErrors",translationKey:"SWITCH_STATS_TABLE_HEADER_TX_ERRORS"},{id:"rx",translationKey:"SWITCH_STATS_TABLE_HEADER_RX"},{id:"rxBytes",translationKey:"SWITCH_STATS_TABLE_HEADER_RX_BYTES"},{id:"rxPackets",translationKey:"SWITCH_STATS_TABLE_HEADER_RX_PACKETS"},{id:"rxMulticast",translationKey:"SWITCH_STATS_TABLE_HEADER_RX_MULTICAST"},{id:"rxBroadcast",translationKey:"SWITCH_STATS_TABLE_HEADER_RX_BROADCAST"},{id:"rxErrors",translationKey:"SWITCH_STATS_TABLE_HEADER_RX_ERRORS"},{id:"txRate",translationKey:"SWITCH_STATS_TABLE_HEADER_TX_RATE"},{id:"rxRate",translationKey:"SWITCH_STATS_TABLE_HEADER_RX_RATE"},{id:"activity",translationKey:"SWITCH_STATS_TABLE_HEADER_ACTIVITY"},{id:"actions",translationKey:"SWITCH_STATS_TABLE_HEADER_ACTIONS",isPermanent:!0}],this.columnPresets=[{id:"overview",translationKey:"SWITCH_STATS_PRESET_OVERVIEW"},{id:"poe",translationKey:"SWITCH_STATS_PRESET_POE"},{id:"counters",translationKey:"SWITCH_STATS_PRESET_COUNTERS"}],this.views={overview:["device","name","poeMode","operationMode","networksVlans","linkStatus","stp","tx","rx","txRate","rxRate","activity"],poe:["device","name","poeMode","poeDetection","poeClass","poePower","poeVoltage","poeCurrent"],counters:["device","txBytes","txPackets","txMulticast","txBroadcast","txErrors","rxBytes","rxPackets","rxMulticast","rxBroadcast","rxErrors"]},e.call(this,a,b,c)}var e=a("../../base-unifi/services/BaseListColumnStore");d.prototype=Object.create(e.prototype),d.constructor=d,d.prototype.setColumnGroup=function(a){this.columnGroup=a},d.prototype.getPredefinedColumns=function(){return this.columnGroup?this.views[this.columnGroup]:this.views.overview},d.prototype.setColumns=function(){this.isCustomized?e.prototype.setColumns.call(this):this.columns=this.getPredefinedColumns()},d.prototype.setColumnPreset=function(a){var b="all"===a?this.getAllColumns():this.views[a];b&&b.length&&(this.clearSelectedColumns(),this.columns=b,this.setCustomized(!0),this.saveColumns())},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","LocalStorageBooleanValue"],angular.module("app-unifi-manage").service("switchStatsListColumnStore",d)},{"../../base-unifi/services/BaseListColumnStore":1698}],1338:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("switchUtils",["$translate","$filter","devices","switches","portFeatureUtils","DEVICE_MODELS","DEVICE_TYPES",function(a,b,c,d,e,f,g){function h(a){if(a){if(angular.isArray(a))return a;var b;if(/^[0-9]+$/.test(a)?b={start:1,end:parseInt(a,10)}:/^([0-9]+)-([0-9]+)$/.test(a)&&(b={start:parseInt(a.split("-")[0],10),end:parseInt(a.split("-")[1],10)}),b)return new Array(b.end-b.start+1).fill().map(function(a,c){return c+b.start})}return[]}function i(a,b){return a.get("up")?8*b*100/(1024*a.get("speed")*1024):0}this.getAdoptedSwitches=function(){return c.repository.collection.filter(this.isAdoptedSwitch)},this.isPowerDeviceDetected=function(a){return"auto"===a.get("poe_mode")&&!!a.get("poe_enable")},this.getPortDevice=function(a){return c.repository.collection.get(a.get("device"))},this.getPortIndex=function(a){var b;return a.get("masked")||(b=a.get("port_idx"),"aggregate"===a.get("op_mode")&&(b+="-"+(parseInt(b,10)+parseInt(a.get("aggregate_num_ports")-1,10)))),b},this.getPortOperationMode=function(b){var c=b.get("op_mode")||"switch";return"aggregate"===c||b.get("aggregated_by")?a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_OPERATION_AGGREGATE"):"switch"===c?a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_OPERATION_SWITCH"):"mirror"===c?a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_OPERATION_MIRROR"):""},this.getPortStatus=function(c){var d="";return c.get("up")&&(d+=b("duplex")(c),c.get("is_uplink")&&(d+=" ("+a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_UPLINK")+")"),"discarding"===c.get("stp_state")&&(d+=" ("+a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_BLOCKED")+")")),d},this.getPortPoeMode=function(a){return a.get("port_poe")&&"switch"===a.get("op_mode")&&!a.get("masked")?a.get("poe_mode")||"off":""},this.getPortPoeModeText=function(b){var c=this.getPortPoeMode(b);switch(c){case"auto":return b.get("poe_enable")?a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_POWER",{power:b.get("poe_power")}):e.isPoePlusSupported(b)?a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_PLUS"):a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE");case"pasv24":return a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_PASSIVE");case"off":return a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_POE_OFF");default:return""}},this.getPortPoeDetection=function(b){var c=this.getPortPoeMode(b);switch(c){case"auto":return a.instant(b.get("poe_enable")?b.get("poe_good")?"DEVICE_PORT_POE_GOOD":"DEVICE_PORT_POE_CPD_TOO_HIGH":"DEVICE_PORT_POE_NOT_DETECTED");case"pasv24":return a.instant("DEVICE_PORT_POE_PASSIVE");default:return""}},this.getPortPoeVoltage=function(a){var b=this.getPortPoeMode(a);return this.isPowerDeviceDetected(a)||"pasv24"===b?a.get("poe_voltage"):""},this.getPortNetworksVlans=function(b){var c;if(b.get("aggregated_by"))c=a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_AGGREGATING_PORT",{port:b.get("aggregated_by")});else if("mirror"===b.get("op_mode"))c=a.instant("DEVICE_PROPERTIES_SWITCH_PORT_VALUES_MIRRORING_PORT",{port:b.get("mirror_port_idx")});else if(b.get("portconf_id")){var e=d.repository.collection.get(b.get("portconf_id"));if(e)return e.get("name")}return c},this.getPortDownlink=function(a,b){var d=a.get("downlink_table");if(d&&d.length){var e=d.get(b.get("port_idx"));if(e)return c.repository.collection.get(e.get("mac"))}},this.getPortUplink=function(a,b){var d=a.get("uplink");if(d&&d.port_idx===b.get("port_idx"))return c.repository.collection.get(d.uplink_mac)},this.getPortStpStatus=function(b){var c=b.get("up")?b.get("stp_state"):void 0;switch(c){case"discarding":return a.instant("DEVICE_PORT_STP_STATE_DISCARDING");case"forwarding":return a.instant("DEVICE_PORT_STP_STATE_FORWARDING");case"disabled":return a.instant("DEVICE_PORT_STP_STATE_DISABLED");default:return""}},this.getTotalPower=function(a){var b=0;return a.get("port_table")&&a.get("port_table").each(function(a){b+=parseFloat(a.get("poe_power")||0,10)}),b.toFixed(2)},this.getTotalLinkUsage=function(a){return i(a,a.get("bytes-r"))},this.getRxLinkUsage=function(a){return i(a,a.get("rx_bytes-r"))},this.getTxLinkUsage=function(a){return i(a,a.get("tx_bytes-r"))},this.getPortNumbers=function(a){var b=(a?(f[a.get("model")]||{}).ports:void 0)||{};return{standard:h(b.standard),sfp:h(b.sfp),plus:h(b.plus)}},this.getPortTypeByNumber=function(a,b){if(a)return Object.keys(a).filter(function(c){if(a[c]&&a[c].indexOf(b)!==-1)return!0})[0]},this.getPortPoeAvailability=function(a){var b={};return["isPoePassthroughSupported","isPoePassive24Supported","isPoeAutoSupported","isPoePlusSupported"].forEach(function(c){b[c]=e[c](a)}),b},this.getUnanimousPortPoeAvailability=function(a){var b={};return["isPoePassthroughSupported","isPoePassive24Supported","isPoeAutoSupported","isPoePlusSupported"].forEach(function(c){b[c]=a.reduce(function(a,b,d){return 0===d?e[c](b):e[c](b)===a?a:void 0},void 0)}),b},this.getDevicePoeAvailability=function(a){var b={};return["isPoePassthroughSupported","isPoePassive24Supported","isPoeAutoSupported","isPoePlusSupported"].forEach(function(c){b[c]=a.has("port_table")&&a.get("port_table").reduce(function(a,b,d){return 0===d?e[c](b):e[c](b)||a},void 0)}),b},this.isAdoptedSwitch=function(a){return a.get("type")===g.SWITCH&&a.get("adopted")===!0}}])},{}],1339:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("switches",["$q","$translate","BaseCollectionRepository","SwitchPortCollection","devices","DeviceMgrModel","apiResults",function(a,b,c,d,e,f,g){this.repository=new c(new d),this.powerCyclePort=function(c,d){return(new f).save({mac:c.get("mac"),port_idx:d.get("port_idx"),cmd:"power-cycle"}).then(function(){return c.fetch(),a.when(b.instant("DEVICE_ACTIONS_SWITCH_PORT_POWER_CYCLE_NOTICE",{port:d.get("port_idx"),deviceName:c.getDisplayName()}))})["catch"](function(e){return a.reject(g.appendErrorMsg(b.instant("DEVICE_ACTIONS_SWITCH_PORT_POWER_CYCLE_ERROR",{port:d.get("port_idx"),deviceName:c.getDisplayName()}),e))})},this.clearPortCounters=function(c,d){return(new f).save({mac:c.get("mac"),port_idx:d.get("port_idx"),cmd:"clear-switch-port-counters"}).then(function(){return c.fetch(),a.when(b.instant("DEVICE_ACTIONS_SWITCH_PORT_CLEAR_COUNTERS_NOTICE",{port:d.get("port_idx"),deviceName:c.getDisplayName()}))})["catch"](function(e){return a.reject(g.appendErrorMsg(b.instant("DEVICE_ACTIONS_SWITCH_PORT_CLEAR_COUNTERS_ERROR",{port:d.get("port_idx"),deviceName:c.getDisplayName()}),e))})},this.clearCounters=function(c){return(new f).save({mac:c.get("mac"),cmd:"clear-switch-counters"}).then(function(){return c.fetch(),a.when(b.instant("DEVICE_ACTIONS_SWITCH_CLEAR_COUNTERS_NOTICE",{deviceName:c.getDisplayName()}))})["catch"](function(d){return a.reject(g.appendErrorMsg(b.instant("DEVICE_ACTIONS_SWITCH_CLEAR_COUNTERS_ERROR",{deviceName:c.getDisplayName()}),d))})},this.clearAllCounters=function(){return(new f).save({cmd:"clear-all-switch-counters"}).then(function(){return e.repository.refresh(),a.when(b.instant("DEVICE_ACTIONS_SWITCH_CLEAR_ALL_COUNTERS_NOTICE"))})["catch"](function(c){return a.reject(g.appendErrorMsg(b.instant("DEVICE_ACTIONS_SWITCH_CLEAR_ALL_COUNTERS_ERROR"),c))})}}])},{}],1340:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("systemConfig",["$q","settings","system","networks","devices","wirelessNetworkGroups","wirelessNetworks","deviceStateUtils","DEVICE_STATE_IDS","DEVICE_TYPES",function(a,b,c,d,e,f,g,h,i,j){function k(a){var b={};return a.forEach(function(a){b[a]=b[a]?b[a]+1:1}),b}this.resolve=function(){var h=[b.repository.fetch(),c.repository.fetch(),d.repository.fetch(),f.repository.fetch(),g.repository.fetch(),e.repository.fetch()];return a.all(h)},this.getSystemConfigDevices=function(){return e.repository.collection.models.filter(function(a){return a.get("type")===j.AP&&a.get("state")!==i.PENDING})},this.getSystemConfigModelsCount=function(){return k(this.getSystemConfigDevices().map(function(a){return h.getDeviceModelShort(a)}))},this.getLoadBalance=function(a){var b=f.repository.collection.get(a)||f.repository.collection.getDefault();return!!b.get("loadbalance_enabled")&&b.get("maxsta")}}])},{}],1341:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("tags",["$q","$translate","apiResults","BaseCollectionRepository","TagCollection",function(a,b,c,d,e){this.repository=new d(new e),this.getTagsByMac=function(a){return this.repository.collection.filter(function(b){return(b.get("member_table")||[]).indexOf(a)!==-1})},this.getTagModelByValue=function(a){return a&&this.repository.collection.filter(function(b){return b.get("name").toLowerCase()===a.trim().toLowerCase()})[0]},this.removeTagByMac=function(d,e,f){var g=angular.copy(e.get("member_table")||[]);g.splice(g.indexOf(d),1);var h;return h=g.length?e.savePartial({member_table:g},f):e.destroy(f),h.then(function(){return a.when(b.instant("DEVICE_PROPERTIES_REMOVE_TAG_SUCCESS",{tag:e.get("name")}))})["catch"](function(d){return a.reject(c.appendErrorMsg(b.instant("DEVICE_PROPERTIES_REMOVE_TAG_ERROR",{tag:e.get("name")}),d))})},this.addExistingTagByMac=function(d,e,f){var g=angular.copy(e.get("member_table")||[]);return g.push(d),e.savePartial({member_table:g},f).then(function(){return a.when(b.instant("DEVICE_PROPERTIES_ADD_TAG_SUCCESS",{tag:e.get("name")}))})["catch"](function(d){return a.reject(c.appendErrorMsg(b.instant("DEVICE_PROPERTIES_ADD_TAG_ERROR",{tag:e.get("name")}),d))})},this.addNewTagByMac=function(d,e,f){var g=this.getTagModelByValue(e);if(g)return this.addExistingTagByMac(d,g,f);g=new this.repository.collection.model;var h={member_table:[d],name:e};return g.save(h,f).then(function(){return this.repository.collection.add(g),a.when(b.instant("DEVICE_PROPERTIES_ADD_TAG_SUCCESS",{tag:g.get("name")}))}.bind(this))["catch"](function(d){return a.reject(c.appendErrorMsg(b.instant("DEVICE_PROPERTIES_ADD_TAG_ERROR",{tag:g.get("name")}),d))})}}])},{}],1342:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("topologyUtils",["deviceStateUtils","TOPOLOGY_LINKS",function(a,b){this.getWirelessUplinkQuality=function(c){var d=c.get("uplink");return a.isDeviceConnected(c)&&d.up?d.rssi<b.QUALITY.LOW?"low":d.rssi<b.QUALITY.MEDIUM?"medium":"high":"disconnected"}}])},{}],1343:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("treeUtils",["arrayUtils",function(a){this.countNodes=function(b,c){if(b[c]&&b[c].length){var d=a.sumArrays.apply(this,b[c].map(function(a){return this.countNodes(a,c)}.bind(this)));return d.unshift(1),d}return[1]}}])},{}],1344:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("txRateStatus",[function(){this.isAvailable=function(a,b){return!!a.get("adopted")&&1===a.get("state")&&!!a.get("radio_"+b)&&0!==this.getTotal(a,b)},this.getValues=function(a,b){var c=(parseInt(a.get(b+"_ast_txto"),10)||0)+(parseInt(a.get(b+"_ast_cst"),10)||0),d=parseInt(a.get(b+"_tx_retries"),10)||0,e=(parseInt(a.get(b+"_ast_be_xmit"),10)||0)+(parseInt(a.get(b+"_tx_packets"),10)||0);return[c,d,e]},this.getTotal=function(a,b){return this.getValues(a,b).reduce(function(a,b){return a+b},0)},this.getWidths=function(a,b){var c=[],d=this.getValues(a,b),e=100,f=this.getTotal(a,b);return angular.forEach(d,function(a,b){var g=Math.ceil(100*a/f);g>e&&(g=e),c.push(b+1===d.length?e:g),e-=g}),c}}])},{}],1345:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("userGroups",["BaseCollectionRepository","UserGroupCollection",function(a,b){this.repository=new a(new b)}])},{}],1346:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("walkme",["$rootScope","WALKME",function(a,b){var c=!1;this.open=function(){if(!c){c=!0;var d=document.createElement("script");switch(d.type="text/javascript",d.async=!0,d.onload=function(){a.$broadcast(b.ON_LOAD_EVENT)},document.domain){case"demo.ubnt.com":d.src="https://cdn.walkme.com/users/64fd910058624f799423a97a8333f341/walkme_64fd910058624f799423a97a8333f341_https.js";break;default:d.src="https://cdn.walkme.com/users/64fd910058624f799423a97a8333f341/test/walkme_64fd910058624f799423a97a8333f341_https.js"}var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(d,e),window._walkmeConfig={smartLoad:!0}}}}])},{}],1347:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("widgets",["localStorageFailSafe","LocalStorageObjectValue","site","DASHBOARD_WIDGETS",function(a,b,c,d){var e=new b(a,"SELECTED_DASHBOARD_WIDGETS");e.hydrate();var f=1e3,g=function(){i[c.getActiveSite()]=(h[c.getActiveSite()]||[]).sort(function(a,b){return void 0===a.row?1:void 0===b.row?-1:a.row*f+a.col-(b.row*f+b.col)}).map(function(a,b){return angular.extend({widgetIndex:b},a,d.TYPES[a.type])}),this.save()}.bind(this),h=e.getValue()||{};h[c.getActiveSite()]||(h[c.getActiveSite()]=d.DEFAULT_CONFIG);var i={};this.reset=function(){h[c.getActiveSite()]=d.DEFAULT_CONFIG,g(),this.save()},this.activateWidget=function(a){var b=h[c.getActiveSite()];b.some(function(b){return b.type===a})||(b.push({type:a}),g())},this.getActiveWidgets=function(){return void 0===h[c.getActiveSite()]&&(h[c.getActiveSite()]=d.DEFAULT_CONFIG),void 0===i[c.getActiveSite()]&&g(),i[c.getActiveSite()]},this.getAvailableWidgets=function(){h[c.getActiveSite()]||this.reset();var a=h[c.getActiveSite()].map(function(a){return a.type});return Object.keys(d.TYPES).filter(function(b){return a.indexOf(b)===-1})},this.deactivateWidget=function(a){h[c.getActiveSite()].splice(a,1),g()},this.save=function(){h[c.getActiveSite()]=i[c.getActiveSite()].map(function(a){return{type:a.type,row:a.row,col:a.col}}),e.setValue(h)},g()}])},{}],1348:[function(a,b,c){"use strict";var d=a("../../base-unifi/services/BasePanels");angular.module("app-unifi-manage").service("windowPanels",["$q","$rootScope","$window","queryString","devices","BaseCollection","ItemState",function(a,b,c,e,f,g,h){var i=function(){f.repository.collection.on("remove",function(a){this.removeItem(a)},this),this.addEventHandlers(),d.call(this,a,b,c,e,g,h)};return i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.prototype.addEventHandlers=function(){f.repository.collection.on("remove",this.removeItem,this),f.repository.collection.on("reset",this.removeDevices,this)},i.prototype.removeEventHandlers=function(){f.repository.collection.off("remove",this.removeItem,this),f.repository.collection.off("reset",this.removeDevices,this)},i.prototype.removeDevices=function(){return this.removeItemsByType(["devices"])},i.prototype.getItemById=function(b){var c=b.split("|");if(c&&2===c.length){var d=this.collection.get(c[1]);if(d)return a.when(d)}return a.reject()},new i}])},{"../../base-unifi/services/BasePanels":1700}],1349:[function(a,b,c){"use strict";angular.module("app-unifi-manage").service("wlanDpi",["$q","BaseCollectionRepository","WlanDpiCollection","featureFlag",function(a,b,c,d){this.repository=new b(new c),this.repository.fetch=function(c){return d.isEnabled("enableDpiSsidFiltering")?b.prototype.fetch.call(this,c):a.when(this.collection)}}])},{}],1350:[function(a,b,c){"use strict";angular.module("app-unifi-manage").value("APP_EVENTS",{PROPERTY_PANEL_OPEN:"property-panel-open",PROPERTY_PANEL_CLOSE:"property-panel-close",PROPERTY_PANEL_ITEM_RESIZED:"property-panel-item-resized",SELECT_DROPDOWN_LIST_OPEN:"select-dropdown-list-open",SELECT_DROPDOWN_LIST_CLOSE:"select-dropdown-list-close",SELECT_DROPDOWN_LIST_CLEAR:"select-dropdown-list-clear"})},{}],1351:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-switch="accountVerifyCtrl.verificationError" class="unifiVerify"><div ng-switch-when="true" class="appInfoBox appInfoBox--cozy appInfoBox--dark appInfoBox--danger"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div translate="ACCOUNT_NOTICE_VERIFY_ERROR_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p class="noMarginBottom"><span>{{\'ACCOUNT_NOTICE_VERIFY_ERROR_MESSAGE\' | translate}}&nbsp;</span><a ui-sref="manage.account.login">{{\'ACCOUNT_NOTICE_VERIFY_ERROR_MESSAGE_LOGIN\' | translate}}</a></p></div></div></div><div ng-switch-default class="appSpinner appSpinner--large autoMargin"></div></div>'),b.join("")}},{"jade/runtime":232}],1352:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiAddSite"><div id="addSiteModal" class="appControlModal appControlModal--tiny"><div frame-close="addSite" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="SITE_ADD_MODAL_TITLE" class="appControlModal__header"></div><div class="appControlModal__content"><form novalidate autocomplete="off" name="addSiteCtrl.form" ng-class="{          \'is-form-validation-visible\': addSiteCtrl.showValidation,          \'is-validation-hidden\': !addSiteCtrl.showValidation        }" ng-submit="addSiteCtrl.form.$valid &amp;&amp; addSiteCtrl.save()" class="appForm appForm--cozy appForm--dark"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs4 col--sm3 label--right"><label translate="SITE_ADD_LABEL_SITE_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--cozy"><input type="text" name="name" ng-model="addSiteCtrl.model.attributes.desc" ng-pattern="addSiteCtrl.patterns.name" required autofocus class="input--full"></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="addSite" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="addSiteCtrl.showValidation = true" busy-toggle="addSiteCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'COMMON_ACTIONS_SUBMIT\' | translate}}</button></div></div></div></div></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1353:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="alertsCtrl.closeAlerts()" class="appGlobalSideNavPopover__close"><div class="icon ubnt-icon--x"></div></div><div translate="COMMON_NAV_ALERTS" class="appGlobalSideNavPopover__header"></div><div ng-show="alertsCtrl.getUnreadCount() &gt; 0" class="unifiEvents__header visible--smUp"><div class="appCountLabelContainer"><div class="count count--round appCount appCount--warning unifiEvents__headerCount"><div class="count__value">{{alertsCtrl.getUnreadCount()}}</div></div><div translate="EVENT_TITLE_UNREAD_ALERTS" translate-values="{count: alertsCtrl.getUnreadCount()}" translate-interpolation="messageformat" class="appCountLabel appCountLabel--uppercase unifiEvents__headerLabel"></div></div></div><div class="appGlobalSideNavPopover__content noPaddingTop"><unifi-alert-list unifi-alert-list-local-state="true" unifi-alert-list-local-state-key="\'alerts\'"></unifi-alert-list></div>'),b.join("")}},{"jade/runtime":232}],1354:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div id="cloudKeySdCardCheckModal" class="appControlModal appControlModal--tiny"><div class="appControlModal__header">{{\'SETTINGS_BACKUP_CLOUD_KEY_SD_CARD_CHECK_TITLE\' | translate}}</div><div class="appControlModal__content"><p class="verticalRhythm--cozy">{{\'SETTINGS_BACKUP_CLOUD_KEY_SD_CARD_CHECK_MESSAGE\' | translate}}</p></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><div class="appInputGroup"><button ng-click="cloudKeySdCardCheckCtrl.resolve(cloudKeySdCardCheckCtrl.data_retention_days)" translate="SETTINGS_BACKUP_CLOUD_KEY_SD_CARD_CHECK_DISABLE" class="appMainButton appMainButton--cozy appMainButton--primary"></button></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1355:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiDpiCategoryPicker"><div id="configureDpiCategoryGraphModal" class="appControlModal appControlModal--tiny"><div class="appControlModal__header">{{\'STATISTICS_DPI_ADD_CATEGORY_TITLE\' | translate}}</div><div class="appControlModal__content"><form class="appForm--cozy appForm--dark"><div ng-if="!configureDpiCategoryGraphCtrl.isAndroid4x()" class="appFormGroup unifiDpiCategoryPicker__filter"><div class="appIconInput appIconInput--right appIconInput--full"><div ng-if="!configureDpiCategoryGraphCtrl.search" class="appIconInput__icon icon ubnt-icon--search-2"></div><a ng-if="configureDpiCategoryGraphCtrl.search" ng-click="configureDpiCategoryGraphCtrl.search = \'\'" class="appIconInput__icon icon ubnt-icon--x-circle"></a><input type="text" ng-change="configureDpiCategoryGraphCtrl.categories = []" ng-model="configureDpiCategoryGraphCtrl.search" placeholder="{{\'STATISTICS_DPI_SELECT_CATEGORIES_FILTER\' | translate}}" class="appIconInput__input input--full"></div></div><div class="row"><div ng-class="configureDpiCategoryGraphCtrl.isAndroid4x() ? \'col--xs6 label--right\' : \'col--xs12\'"><label class="appLabel--primary appLabel--boxAlign">{{\'STATISTICS_DPI_SELECT_CATEGORIES\' | translate}}</label></div><div class="appFormGroup"><select ng-options="category as category.name for category in (configureDpiCategoryGraphCtrl.availableCategories | filter:configureDpiCategoryGraphCtrl.search | orderBy: \'name\')" ng-model="configureDpiCategoryGraphCtrl.categories" multiple="true" ng-class="{\'unifiDpiCategoryPicker__select--tall col--xs12\': !configureDpiCategoryGraphCtrl.isAndroid4x(), \'unifiDpiCategoryPicker__select--initial col--xs6\': configureDpiCategoryGraphCtrl.isAndroid4x()}" class="select--full"></select></div></div></form></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><span><button frame-close="configureDpiCategoryGraph" translate="COMMON_ACTIONS_CANCEL" class="appMainButton appMainButton--cozy appMainButton--transparentDark"></button><button frame-close="configureDpiCategoryGraph" ng-click="configureDpiCategoryGraphCtrl.resolve()" ng-disabled="!configureDpiCategoryGraphCtrl.categories || configureDpiCategoryGraphCtrl.categories.length === 0" translate="COMMON_ACTIONS_SAVE" class="appMainButton appMainButton--cozy appMainButton--primary"></button></span></div></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],1356:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiMapConfigure"><div id="configureMapsModal" class="appControlModal"><div frame-close="configureMaps" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="MAP_CONFIGURE" class="appControlModal__header"></div><div class="unifiMapConfigureList"><table id="mapConfigureTable" collection-view-sort="configureMapsCtrl.view" class="verticalRhythmTop--cozy noMarginBottom appTable appTable--dark appTable--hoverable appTable--flexible appTable--striped appTable--cozy"><thead><tr><th collection-view-sort-by="name" class="mapName"><span translate="MAP_CONFIGURE_NAME"></span></th><th class="mapActions"><span translate="MAP_CONFIGURE_ACTIONS"></span></th></tr></thead><tbody><tr collection-view-repeat="model in configureMapsCtrl.view.getModels()"><td class="mapName">{{::model.get(\'name\')}}</td><td class="appTableCell--actions"><button ng-click="configureMapsCtrl.addOrEditMap(model)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button><button ng-click="configureMapsCtrl.deleteMap(model)" ng-disabled="model.get(\'attr_no_delete\')" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE"></span></button></td></tr></tbody></table></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--6 alignLeft"><button ng-click="configureMapsCtrl.addOrEditMap()" translate="MAP_CONFIGURE_ADD" class="appMainButton appMainButton--cozy appMainButton--success"></button></div><div class="flexCol--6 alignRight"><button frame-close="configureMaps" translate="MAP_CONFIGURE_DONE" class="appMainButton appMainButton--cozy appMainButton--primary"></button></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1357:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiConfirm"><div id="confirmUpgradeOverridesModal" class="appControlModal appControlModal--tiny"><div frame-close="confirm" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_CONFIRM_TITLE\' | translate}}</div><div class="appControlModal__content"><p class="verticalRhythm--cozy">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_CONFIRM_MESSAGE_FILES\' | translate}}</p><pre class="verticalRhythm--cozy"><ul class="list list--cozy"><li ng-repeat="file in confirmUpgradeOverridesCtrl.modifiedFiles">{{file}}</li></ul></pre><p class="verticalRhythm--cozy">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_CONFIRM_MESSAGE_WARNING\' | translate}}</p></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><div class="appInputGroup"><button ng-click="confirmUpgradeOverridesCtrl.reject()" translate="COMMON_ACTIONS_CANCEL" class="appMainButton appMainButton--cozy appMainButton--transparentDark"></button><button ng-click="confirmUpgradeOverridesCtrl.resolve()" translate="SETTINGS_GUEST_CONTROL_HOTSPOT_OVERRIDES_UPGRADE_CONFIRM_BUTTON" class="appMainButton appMainButton--cozy appMainButton--primary"></button></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1358:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiDashboardWidgets"><div id="editTextFieldModal" class="appControlModal appControlModal--tiny"><div frame-close="dashboardWidgets" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">{{\'DASHBORD_WIDGET_HEADER_ADD\' | translate}}</div><form name="dashboardWidgetsCtrl.form" ng-class="{\'is-form-validation-visible\': dashboardWidgetsCtrl.showValidation}" ng-submit="dashboardWidgetsCtrl.form.$valid &amp;&amp; dashboardWidgetsCtrl.resolve()" novalidate autocomplete="off" class="appForm appForm--cozy appForm--dark"><div class="appControlModal__content appControlModal__content--withBorder verticalRhythmQuarter"><div class="container container--centered container--fixed"><div class="row"><div class="col--xs4 col--sm3 label--right"><label translate="DASHBORD_WIDGET_SELECT" for="dashboardWidgetsSelect" class="appLabel--primary"></label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><select ng-options="type as (\'DASHBORD_WIDGET_\' + type.toUpperCase()) | translate for type in dashboardWidgetsCtrl.widgets.getAvailableWidgets()" ng-model="dashboardWidgetsCtrl.selectedWidget" name="dashboardWidgetsSelect" id="dashboardWidgetsSelect" ng-required="true"><option value="" disabled>{{\'COMMON_LABEL_CHOOSE_ONE\' | translate}}</option></select></div></div></div></div></div><div class="appControlModal__content"><div class="container container--centered container--fixed"><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="dashboardWidgets" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="dashboardWidgetsCtrl.showValidation = true" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button></div></div></div></div></div></form></div></div>'),b.join("")}},{"jade/runtime":232}],1359:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiDpiRestriction"><div id="editTextFieldModal" class="appControlModal appControlModal--tiny"><div frame-close="dpiRestriction" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">{{dpiRestrictionCtrl.isNew ? \'DPI_RESTRICTION_HEADER_ADD\' : \'DPI_RESTRICTION_HEADER_EDIT\' | translate}}</div><form name="dpiRestrictionCtrl.form" ng-class="{\'is-form-validation-visible\': dpiRestrictionCtrl.showValidation}" ng-submit="dpiRestrictionCtrl.form.$valid &amp;&amp; dpiRestrictionCtrl.resolve()" novalidate autocomplete="off" class="appForm appForm--cozy appForm--dark"><div class="appControlModal__content appControlModal__content--withBorder verticalRhythmQuarter"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs4 col--sm3 label--right"><label class="appLabel--primary appLabel--boxAlign">{{\'DPI_RESTRICTION_GROUP\' | translate}}</label></div><div class="col--xs8 col--sm9"><label class="appLabel--primary appLabel--boxAlign"> {{dpiRestrictionCtrl.restrictionGroup.get(\'name\')}}</label></div></div><div class="row"><div class="col--xs4 col--sm3 label--right"><label translate="DPI_RESTRICTION_ENABLE" class="appLabel--primary"></label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="dpiRestrictionBlock" id="dpiRestrictionBlock" ng-model="dpiRestrictionCtrl.model.attributes.enabled"></div></div></div></div></div><div class="appControlModal__content verticalRhythmTopQuarter"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs4 col--sm3 label--right"><label class="appLabel--primary appLabel--boxAlign">{{\'DPI_RESTRICTION_CATEGORY\' | translate}}</label></div><div class="col--xs8 col--sm9"><div class="appInputGroup appInputGroup--cozy"><select ng-model="dpiRestrictionCtrl.dpiCategory" ng-options="category as category.name for category in dpiRestrictionCtrl.availableCategories" ng-required="true"><option unifi-option-placeholder></option></select></div></div></div><div class="row"><div class="col--xs4 col--sm3 label--right"><label translate="DPI_RESTRICTION_BLOCK" class="appLabel--primary"></label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="dpiRestrictionBlock" id="dpiRestrictionBlock" ng-model="dpiRestrictionCtrl.model.attributes.blocked"></div></div></div><div class="row"><div class="col--xs4 col--sm3 label--right"><label translate="DPI_RESTRICTION_LIMIT_DOWN" class="appLabel--primary"></label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" ng-model="dpiRestrictionCtrl.downLimitEnabled" ng-disabled="dpiRestrictionCtrl.model.attributes.blocked"><label>{{\'COMMON_LABEL_ENABLED\' | translate}}</label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><unifi-binary-input ng-model="dpiRestrictionCtrl.downLimit" unifi-binary-input-suffix="\'B/s\'" unifi-binary-input-base-prefix="\'K\'" unifi-binary-input-standard="\'IEC\'" ng-disabled="dpiRestrictionCtrl.model.attributes.blocked || !dpiRestrictionCtrl.downLimitEnabled" ng-required="!dpiRestrictionCtrl.model.attributes.blocked &amp;&amp; dpiRestrictionCtrl.downLimitEnabled"></unifi-binary-input></div></div></div></div><div class="row"><div class="col--xs4 col--sm3 label--right"><label translate="DPI_RESTRICTION_LIMIT_UP" class="appLabel--primary"></label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" ng-model="dpiRestrictionCtrl.upLimitEnabled" ng-disabled="dpiRestrictionCtrl.model.attributes.blocked"><label>{{\'COMMON_LABEL_ENABLED\' | translate}}</label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><unifi-binary-input ng-model="dpiRestrictionCtrl.upLimit" unifi-binary-input-suffix="\'B/s\'" unifi-binary-input-base-prefix="\'K\'" unifi-binary-input-standard="\'IEC\'" ng-disabled="dpiRestrictionCtrl.model.attributes.blocked || !dpiRestrictionCtrl.upLimitEnabled" ng-required="!dpiRestrictionCtrl.model.attributes.blocked &amp;&amp; dpiRestrictionCtrl.upLimitEnabled"></unifi-binary-input></div></div></div></div></div></div><div class="appControlModal__content"><div class="container container--centered container--fixed"><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="dpiRestriction" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="dpiRestrictionCtrl.showValidation = true" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button></div></div></div></div></div></form></div></div>'),b.join("")}},{"jade/runtime":232}],1360:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiDpiRestrictionGroupNetworkAssignment"><div id="editTextFieldModal" class="appControlModal appControlModal--tiny"><div frame-close="dpiRestrictionNetworkAssignment" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header"><div class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--network"></span><span class="iconText__text">{{\'DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_HEADER\' | translate}}</span></div></div><form name="dpiRestrictionNetworkAssignmentFrameCtrl.form" ng-class="{\'is-form-validation-visible\': dpiRestrictionNetworkAssignmentFrameCtrl.showValidation}" ng-submit="dpiRestrictionNetworkAssignmentFrameCtrl.form.$valid &amp;&amp; dpiRestrictionNetworkAssignmentFrameCtrl.resolve()" novalidate autocomplete="off" class="appForm appForm--cozy appForm--dark"><div class="appControlModal__content"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs4 col--sm3 label--right"><label class="appLabel--primary appLabel--boxAlign">{{\'DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_NETWORK\' | translate}}</label></div><div class="col--xs8 col--sm9"><div class="appInputGroup appInputGroup--cozy"><select ng-model="dpiRestrictionNetworkAssignmentFrameCtrl.network" ng-options="network.name group by network.type for network in dpiRestrictionNetworkAssignmentFrameCtrl.networks" ng-required="true"><option unifi-option-placeholder="DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_SELECT_NETWORK"></option></select></div></div></div><div class="row row--comfy"><div class="col--xs4 col--sm3 label--right"><label class="appLabel--primary appLabel--boxAlign">{{\'DPI_RESTRICTION_GROUP\' | translate}}</label></div><div class="col--xs8 col--sm9"><div class="appInputGroup appInputGroup--cozy"><select ng-model="dpiRestrictionNetworkAssignmentFrameCtrl.restrictionGroupId" ng-options="group.id as group.get(\'name\') for group in dpiRestrictionNetworkAssignmentFrameCtrl.dpiGroups.repository.collection.models" ng-required="true"><option unifi-option-placeholder="DPI_RESTRICTION_GROUP_NETWORK_ASSIGNMENT_SELECT_GROUP"></option></select></div></div></div></div></div><div class="appControlModal__content"><div class="container container--centered container--fixed"><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="dpiRestrictionNetworkAssignment" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="dpiRestrictionNetworkAssignmentFrameCtrl.showValidation = true" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'COMMON_ACTIONS_SAVE\' | translate}}</button></div></div></div></div></div></form></div></div>'),b.join("")}},{"jade/runtime":232}],1361:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div id="editMapModal" class="appControlModal"><div frame-close="editMap" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="MAP_EDIT" class="appControlModal__header"></div><div class="appActionBar appActionBar--cozy appActionBar--dark appForm--dark appForm--cozy"><div class="appActionBar__inner"><div class="appActionBar__left"><input type="text" placeholder="{{\'MAP_EDIT_MAP_NAME\' | translate}}" ng-model="editMapCtrl.newMapOptions.name" autofocus class="input--full"></div><div class="appActionBar__right unifiMapEditActionBar__right"><ul class="buttonGroup buttonGroup--shrink appMainButtonGroup appMainButton--cozy unifiMapEditButtonGroup"><li ng-class="{\'is-button-selected\': editMapCtrl.newMapOptions.type === editMapCtrl.MAP_TYPES.IMAGE}" ng-click="editMapCtrl.setMapType(editMapCtrl.MAP_TYPES.IMAGE)" translate="MAP_EDIT_IMAGE" class="button appMainButton appMainButton--cozy"></li><li ng-class="{\'is-button-selected\': editMapCtrl.newMapOptions.type === editMapCtrl.MAP_TYPES.GOOGLE}" ng-click="editMapCtrl.setMapType(editMapCtrl.MAP_TYPES.GOOGLE); editMapCtrl.startGettingCurrentPosition()" translate="MAP_EDIT_GOOGLE" class="button appMainButton appMainButton--cozy"></li></ul></div></div></div><div class="appControlModal__content appControlModalScrollableContent appControlModalScrollableContent--withActionBar"><div class="unifiMapEdit"><div ng-if="editMapCtrl.newMapOptions.type === editMapCtrl.MAP_TYPES.IMAGE" class="unifiMapEdit__container"><img ng-if="editMapCtrl.newMapOptions.image.file" ngf-src="editMapCtrl.newMapOptions.image.file" class="unifiMapEdit__preview"><img ng-if="!editMapCtrl.newMapOptions.image.file &amp;&amp; editMapCtrl.mapOptions.url" ng-src="{{editMapCtrl.mapOptions.url}}" class="unifiMapEdit__preview"><div ng-if="editMapCtrl.newMapOptions.image.file || editMapCtrl.mapOptions.url" class="unifiMapEdit__hint">{{\'MAP_EDIT_IMAGE_SELECT_DIFFERENT_LABEL\' | translate}}<a ngf-select accept="image/x-png,image/gif,image/jpeg" ngf-change="editMapCtrl.onFileSelect($files)">{{\'MAP_EDIT_IMAGE_SELECT_DIFFERENT\' | translate}}</a></div><div ng-if="!editMapCtrl.newMapOptions.image.file &amp;&amp; !editMapCtrl.mapOptions.url" class="unifiMapEdit__hint"><a ngf-select accept="image/x-png,image/gif,image/jpeg" ngf-change="editMapCtrl.onFileSelect($files)">{{\'MAP_EDIT_IMAGE_SELECT\' | translate}}</a></div></div><div ng-if="!editMapCtrl.apiKey &amp;&amp; editMapCtrl.newMapOptions.type === editMapCtrl.MAP_TYPES.GOOGLE" class="unifiMapEdit__container"><div class="appInfoBox appInfoBox--centered appInfoBox--dark appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="MAP_API_KEY_NOT_DEFINED_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="MAP_EDIT_API_KEY_NOT_DEFINED_MESSAGE" translate-values="{helpLink: \'https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key\'}" translate-compile class="noMarginBottom"></p></div><div class="appInfoBox__footer"><a ui-sref="manage.site.settings.controller" frame-close="editMap" class="button appMainButton appMainButton--primary appMainButton--cozy">{{\'COMMON_NAV_SETTINGS\' | translate}} &gt; {{\'SETTINGS_NAV_CONTROLLER\' | translate}}</a></div></div></div></div><div ng-if="editMapCtrl.apiKey &amp;&amp; editMapCtrl.newMapOptions.type === editMapCtrl.MAP_TYPES.GOOGLE &amp;&amp; !editMapCtrl.mapOptions.google.center" class="unifiMapEdit__container"><div class="unifiMapEdit__hint"><span>{{\'MAP_EDIT_GOOGLE_FINDING_LOCATION\' | translate}}</span><a ng-click="editMapCtrl.currentLocationDeferred.reject()">{{\'MAP_EDIT_SKIP\' | translate}}</a></div></div><div ng-if="editMapCtrl.apiKey &amp;&amp; editMapCtrl.newMapOptions.type === editMapCtrl.MAP_TYPES.GOOGLE &amp;&amp; editMapCtrl.mapOptions.google.center" atlas-lazy-load-script="" atlas-lazy-load-script-api-key="::editMapCtrl.apiKey" atlas-map="" atlas-map-disable-default-ui="" atlas-map-center="editMapCtrl.mapOptions.google.center" atlas-map-options="editMapCtrl.mapOptions.google" class="unifiMapEdit__container"><unifi-atlas-event-handler event="idle" handler="editMapCtrl.updateGoogleMapOptions"></unifi-atlas-event-handler><unifi-atlas-event-handler event="maptypeid_changed" handler="editMapCtrl.updateGoogleMapOptions"></unifi-atlas-event-handler><unifi-map-type-switcher></unifi-map-type-switcher><div atlas-controls="" atlas-controls-position="\'TOP_LEFT\'" class="atlas-control-container"><div class="unifiMapCustomControls"><a href="javascript:void(0)" atlas-controls-zoom="\'in\'" class="unifiMapCustomControls__control unifiMapCustomControls__control--small unifiMapCustomControls__groupedItem"><div class="unifiMapCustomControls__icon icon ubnt-icon--plus"></div></a><a href="javascript:void(0)" atlas-controls-zoom="\'out\'" class="unifiMapCustomControls__control unifiMapCustomControls__control--small unifiMapCustomControls__groupedItem"><div class="unifiMapCustomControls__icon icon ubnt-icon--minus"></div></a></div></div><div atlas-controls="" atlas-controls-position="\'TOP_LEFT\'" class="atlas-control-container"><div class="appInputGroup unifiMapSearch"><div class="appIconInput appIconInput--right"><div ng-show="!editMapCtrl.searchBoxValue" class="appIconInput__icon icon ubnt-icon--search-2"></div><div unifi-map-google-clear-search="" unifi-map-google-clear-search-input="editMapCtrl.searchBoxValue" class="appIconInput__clearSearch"></div><input atlas-search-box="" atlas-search-box-bounds="editMapCtrl.bounds" atlas-search-box-change="editMapCtrl.onSearchBoxChange(places)" placeholder="{{\'MAP_GOOGLE_SEARCH_PLACEHOLDER\' | translate}}" type="text" ng-model="editMapCtrl.searchBoxValue" class="appIconInput__input unifiMapSearch__searchBox"></div></div></div></div></div></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><span><button frame-close="editMap" ng-click="editMapCtrl.cancel()" translate="COMMON_ACTIONS_CANCEL" class="appMainButton appMainButton--cozy appMainButton--transparentDark"></button><button frame-close="editMap" ng-click="editMapCtrl.editCompleted()" ng-disabled="!editMapCtrl.isStateValid()" translate="COMMON_ACTIONS_SAVE" class="appMainButton appMainButton--cozy appMainButton--primary"></button></span></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1362:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiEditDpiGroup"><div id="editTextFieldModal" class="appControlModal appControlModal--tiny"><div frame-close="editTextField" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">{{editTextFieldCtrl.title}}</div><div class="appControlModal__content"><form novalidate autocomplete="off" class="appForm appForm--cozy appForm--dark"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs4 col--sm3 label--right"><label class="appLabel--primary appLabel--boxAlign">{{editTextFieldCtrl.label}}</label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--cozy"><input type="text" name="text" ng-model="editTextFieldCtrl.text" required autofocus class="input--full"></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="editTextField" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="editTextFieldCtrl.resolve()" class="appMainButton appMainButton--cozy appMainButton--primary">{{editTextFieldCtrl.resolveButtonLabel}}</button></div></div></div></div></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1363:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="eventsCtrl.closeEvents()" class="appGlobalSideNavPopover__close"><div class="icon ubnt-icon--x"></div></div><div translate="COMMON_NAV_EVENTS" class="appGlobalSideNavPopover__header"></div><div class="appGlobalSideNavPopover__content noPaddingTop"><unifi-event-list unifi-event-list-local-state="true" unifi-event-list-local-state-key="\'events\'"></unifi-event-list></div>'),b.join("")}},{"jade/runtime":232}],1364:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiExportSite"><div id="exportSiteModal" ng-init="exportSiteCtrl.steps = 4; exportSiteCtrl.step = 1;" class="appControlModal"><div frame-close="exportSite" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header"><span ng-class="{\'inactive--dark\': exportSiteCtrl.step !== 1}" translate="SITE_EXPORT_MODAL_EXPORT_SITE_TITLE"></span><span class="inactive--dark icon--inline icon ubnt-icon--pointer-right"></span><span ng-class="{\'inactive--dark\': exportSiteCtrl.step !== 2}" translate="SITE_EXPORT_MODAL_MIGRATE_SITE_TITLE"></span><span class="inactive--dark icon--inline icon ubnt-icon--pointer-right"></span><span ng-class="{\'inactive--dark\': exportSiteCtrl.step !== 3}" translate="SITE_EXPORT_MODAL_MIGRATE_DEVICES_TITLE"></span><span class="inactive--dark icon--inline icon ubnt-icon--pointer-right"></span><span ng-class="{\'inactive--dark\': exportSiteCtrl.step !== 4}" translate="SITE_EXPORT_MODAL_MIGRATE_DEVICES_TITLE"></span></div><div class="statusBar appStatusBar appStatusBar--dark appStatusBar--high appStatusBar--small"><div ng-style="{\'width\': ((100 * exportSiteCtrl.step / exportSiteCtrl.steps) | number:0) + \'%\'}" class="statusBar__inner"></div></div><div ng-if="exportSiteCtrl.step === 1" class="step"><div class="appControlModal__content"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs12"><div class="appInfoBox appInfoBox--dark appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="SITE_EXPORT_MODAL_EXPORT_SITE_HELP_TITLE" class="appInfoBox__header"></div><div translate="SITE_EXPORT_MODAL_EXPORT_SITE_HELP" class="appInfoBox__body"></div></div></div></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="exportSite" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="exportSiteCtrl.export()" busy-toggle="exportSiteCtrl.isExporting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy exportSite">{{\'SITE_EXPORT_ACTIONS_DOWNLOAD_FILE\' | translate}}</button></div></div></div></div></div></div><div ng-if="exportSiteCtrl.step === 2" class="step"><div class="appControlModal__content"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="appInfoBox appInfoBox--warning appInfoBox--dark appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--eye2"></div><div class="appInfoBox__content"><div translate="SITE_EXPORT_MODAL_MIGRATE_SITE_HELP_TITLE" class="appInfoBox__header"></div><div translate="SITE_EXPORT_MODAL_MIGRATE_SITE_HELP" class="appInfoBox__body"></div></div></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="exportSite" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="exportSiteCtrl.importConfirm()" class="appMainButton appMainButton--primary appMainButton--cozy confirmImportSite">{{\'COMMON_ACTIONS_CONFIRM\' | translate}}</button></div></div></div></div></div></div><div ng-if="exportSiteCtrl.step === 3" class="step"><div class="appControlModal__content appControlModalScrollableContent noBorder"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs12"><div class="appInfoBox appInfoBox--dark appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="SITE_EXPORT_MODAL_MIGRATE_DEVICES_HELP_TITLE" class="appInfoBox__header"></div><div translate="SITE_EXPORT_MODAL_MIGRATE_DEVICES_HELP" class="appInfoBox__body"></div></div></div></div></div></div><form novalidate autocomplete="off" name="exportSiteCtrl.form" ng-class="{            \'is-form-validation-visible\': exportSiteCtrl.showValidation,            \'is-validation-hidden\': !exportSiteCtrl.showValidation          }" ng-submit="exportSiteCtrl.form.$valid &amp;&amp; exportSiteCtrl.selectedDevicesToMigrate.models.length &amp;&amp; exportSiteCtrl.migrateDevices()" class="appForm appForm--cozy appForm--dark"><div class="container container--centered container--fixed"><div class="row"><div class="col--xs4 col--sm3"><label translate="Controller Inform URL" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><label>{{exportSiteCtrl.DEVICE_INFORM.PROTOCOL}}</label><input type="text" name="migrate_hostname" ng-model="exportSiteCtrl.migrate_hostname" required size="50" autofocus placeholder="{{exportSiteCtrl.DEVICE_INFORM.DEFAULT_HOST}}" unifi-validate-patterns="[                        exportSiteCtrl.patterns.hostname,                        exportSiteCtrl.patterns.ipAddress                      ]"><label>:</label><input type="text" name="migrate_port" size="5" ng-model="exportSiteCtrl.migrate_port" ng-pattern="exportSiteCtrl.patterns.portNumber" required placeholder="{{exportSiteCtrl.DEVICE_INFORM.DEFAULT_PORT}}"><label>{{exportSiteCtrl.DEVICE_INFORM.ENDPOINT}}</label></div></div></div></div><unifi-device-select-list unifi-device-select-list-filter="exportSiteCtrl.adoptedDevicesFilter" unifi-device-select-list-is-dark="true" unifi-device-select-list-on-selection-change="exportSiteCtrl.onSelectDevicesToMigrate(selectedDevices)" unifi-device-select-list-select-all-test="exportSiteCtrl.selectAllAdoptedTest"></unifi-device-select-list><div class="container container--centered container--fixed"><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="exportSite" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="exportSiteCtrl.showValidation = true" busy-toggle="exportSiteCtrl.isMigrating" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="!exportSiteCtrl.selectedDevicesToMigrate.models.length" class="appMainButton appMainButton--primary appMainButton--cozy migrateDevices">{{\'SITE_EXPORT_ACTIONS_MIGRATE_DEVICES\' | translate}}</button></div></div></div></div></form></div></div><div ng-if="exportSiteCtrl.step === 4" class="step"><div class="appControlModal__content appControlModalScrollableContent noBorder"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs12"><div class="appInfoBox appInfoBox--warning appInfoBox--dark appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div translate="SITE_EXPORT_MODAL_FORGET_DEVICES_HELP_TITLE" class="appInfoBox__header"></div><div translate="SITE_EXPORT_MODAL_FORGET_DEVICES_HELP" class="appInfoBox__body"></div></div></div></div></div></div><form novalidate autocomplete="off" name="exportSiteCtrl.form2" ng-submit="exportSiteCtrl.selectedDevicesToForget.models.length &amp;&amp; exportSiteCtrl.forgetDevices()" class="appForm appForm--cozy appForm--dark"><unifi-device-select-list unifi-device-select-list-is-dark="true" unifi-device-select-list-on-selection-change="exportSiteCtrl.onSelectDevicesToForget(selectedDevices)" unifi-device-select-list-collection="exportSiteCtrl.selectedDevicesToMigrate"></unifi-device-select-list><div class="container container--centered container--fixed"><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="exportSite" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_SKIP\' | translate}}</button><button ng-click="exportSiteCtrl.showValidation = true" busy-toggle="exportSiteCtrl.isMigrating" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="!exportSiteCtrl.selectedDevicesToForget.models.length" class="appMainButton appMainButton--danger appMainButton--cozy forgetDevices">{{\'SITE_EXPORT_ACTIONS_FORGET_DEVICES\' | translate}}</button></div></div></div></div></form></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1365:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiFirewallGroupsCreateModal"><div id="firewallGroupsCreateModal" class="appControlModal appControlModal--tiny"><div frame-close="firewallGroupsCreate" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__content"><div unifi-firewall-groups-form="firewallGroupsCreateCtrl.model" unifi-firewall-groups-form-is-dark="true" unifi-firewall-groups-form-is-modal="true" unifi-firewall-groups-form-on-save="firewallGroupsCreateCtrl.onSave()" unifi-firewall-groups-form-on-cancel="firewallGroupsCreateCtrl.onCancel()" unifi-firewall-groups-form-is-read-only="!firewallGroupsCreateCtrl.isAdmin()"></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1366:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout hotspot2NaiRealmListEntry"><div id="hotspot2NaiRealmListEntryModal" class="appControlModal appControlModal--tiny"><div ng-click="hotspot2NaiRealmListEntryCtrl.reject()" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate translate-values="{name: hotspot2NaiRealmListEntryCtrl.title}" class="appControlModal__header">{{hotspot2NaiRealmListEntryCtrl.title ? \'SETTINGS_HOTSPOT2_NAI_REALM_LIST_ENTRY_EDIT\' : \'SETTINGS_HOTSPOT2_NAI_REALM_LIST_ENTRY_CREATE\'}}</div><div class="appControlModal__content"><form novalidate autocomplete="off" ng-class="{          \'is-form-validation-visible\': hotspot2NaiRealmListEntryCtrl.showValidation,          \'is-validation-hidden\': !hotspot2NaiRealmListEntryCtrl.showValidation        }" ng-submit="hotspot2NaiRealmListEntryCtrl.isSubmitAllowed() &amp;&amp; hotspot2NaiRealmListEntryCtrl.save()" name="hotspot2NaiRealmListEntryCtrl.form" class="appForm appForm--cozy appForm--dark"><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_NAI_REALM_LABEL_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><input type="text" name="entryName" ng-model="hotspot2NaiRealmListEntryCtrl.entry.name" required autofocus class="input--full"><div ng-show="hotspot2NaiRealmListEntryCtrl.form.entryName.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--sm8 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="naiRealmEnabled" id="naiRealmEnabled" ng-model="hotspot2NaiRealmListEntryCtrl.entry.status"><label translate="SETTINGS_HOTSPOT2_NAI_REALM_LABEL_ENABLED" for="naiRealmEnabled"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_NAI_REALM_LABEL_EAP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm8 appFormGroup appFormGroup--cozy"><select name="eapMethod" ng-model="hotspot2NaiRealmListEntryCtrl.entry.eap_method" ng-options="key as value | translate for (key, value) in hotspot2NaiRealmListEntryCtrl.HOTSPOT2_EAP_METHODS" required><option unifi-option-placeholder></option></select><div ng-show="hotspot2NaiRealmListEntryCtrl.form.eapMethod.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><table unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped appTable--dark"><thead><th class="authId"><span translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_HEADER_AUTH_ID"></span></th><th class="authVal"><span translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_HEADER_AUTH_VAL"></span></th><th unifi-if-role-admin class="authActions"><span translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_HEADER_ACTIONS"></span></th></thead><tbody><tr ng-repeat="auth in hotspot2NaiRealmListEntryCtrl.auths"><td class="authId">{{ hotspot2NaiRealmListEntryCtrl.HOTSPOT2_AUTH_IDS[auth.id] | translate }}</td><td class="authVal">{{ hotspot2NaiRealmListEntryCtrl.HOTSPOT2_AUTH_VALUES[auth.id][auth.val] | translate}}</td><td unifi-if-role-admin class="authActions appTableCell--actions"><button type="button" ng-click="hotspot2NaiRealmListEntryCtrl.removeAuth($index)" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table><div ng-if="!hotspot2NaiRealmListEntryCtrl.auths.length" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythm appInfoBox--dark"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_HOTSPOT2_NAI_REALM_TABLE_AUTH_EMPTY" class="noMarginBottom"></p></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_NAI_REALM_LIST_VALUES_AUTH_ID" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm3 appFormGroup appFormGroup--cozy"><select name="authId" ng-model="hotspot2NaiRealmListEntryCtrl.authId" ng-options="key as value | translate for (key, value) in hotspot2NaiRealmListEntryCtrl.HOTSPOT2_AUTH_IDS" ng-change="hotspot2NaiRealmListEntryCtrl.authVal = undefined" class="venueGroup"><option unifi-option-placeholder></option></select></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_HOTSPOT2_NAI_REALM_LIST_VALUES_AUTH_VAL" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm3 appFormGroup appFormGroup--cozy"><select name="authVal" ng-model="hotspot2NaiRealmListEntryCtrl.authVal" ng-options="key as value | translate for (key, value) in hotspot2NaiRealmListEntryCtrl.HOTSPOT2_AUTH_VALUES[hotspot2NaiRealmListEntryCtrl.authId || \'0\']"><option unifi-option-placeholder></option></select></div></div><div class="row"><div class="col--sm3 appFormGroup appFormGroup--cozy"><button type="button" ng-disabled="hotspot2NaiRealmListEntryCtrl.auths.length &gt;= hotspot2NaiRealmListEntryCtrl.maxAuths || !hotspot2NaiRealmListEntryCtrl.authId || !hotspot2NaiRealmListEntryCtrl.authVal" ng-click="hotspot2NaiRealmListEntryCtrl.addAuth()" class="appMainButton appMainButton--primary appMainButton--condensed"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_HOTSPOT2_NAI_REALM_LIST_ACTIONS_ADD_AUTH"></span></button></div></div><div class="container container--centered container--fixed"><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" ng-click="hotspot2NaiRealmListEntryCtrl.reject()" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="hotspot2NaiRealmListEntryCtrl.showValidation = true" ng-disabled="hotspot2NaiRealmListEntryCtrl.form.$pristine" busy-toggle="hotspot2NaiRealmListEntryCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'COMMON_ACTIONS_SUBMIT\' | translate}}</button></div></div></div></div></form></div></div></div>'),
b.join("")}},{"jade/runtime":232}],1367:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiHotspotPackage"><div id="hotspotPackageModal" class="appControlModal appControlModal--tiny"><div frame-close="hotspotPackage" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_TITLE" class="appControlModal__header"></div><div class="appControlModal__content"><form novalidate autocomplete="off" ng-class="{            \'is-form-validation-visible\': hotspotPackageCtrl.showValidation,            \'is-validation-hidden\': !hotspotPackageCtrl.showValidation          }" ng-submit="hotspotPackageCtrl.isSubmitAllowed() &amp;&amp; hotspotPackageCtrl.save()" class="appForm appForm--cozy appForm--dark"><ng-form name="hotspotPackageCtrl.form"><div class="container container--centered container--fixed"><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_NAME" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><input type="text" name="hotspotPackageName" ng-model="hotspotPackageCtrl.model.attributes.name" required autofocus class="input--full"><div ng-show="hotspotPackageCtrl.form.hotspotPackageName.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_PAYMENT" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup appTooltipContainer appTooltipContainer--hoverable"><input type="checkbox" id="hotspotPackageFreePackage" name="hotspotPackageFreePackage" ng-model="hotspotPackageCtrl.freePackage" ng-disabled="hotspotPackageCtrl.isFreePackageCheckboxDisabled()" ng-change="hotspotPackageCtrl.adjustAmountAndCurrency()"><label for="hotspotPackageFreePackage" translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_VALUES_PACKAGE_FREE"></label><div ng-if="hotspotPackageCtrl.isFreePackageCheckboxDisabled()" class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div class="appTooltip appTooltip--dark">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_TOOLTIP_PACKAGE_FREE_DISABLED\' | translate}}</div></div></div></div></div><div ng-if="!hotspotPackageCtrl.freePackage" class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_PRICE" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="row row--smash"><div class="col--xs4"><select name="hotspotPackageCurrency" ng-model="hotspotPackageCtrl.model.attributes.currency" ng-options="currency as currency for currency in hotspotPackageCtrl.currencies" required></select><div ng-show="hotspotPackageCtrl.form.hotspotPackageCurrency.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div><div class="col--xs8"><input type="number" id="hotspotPackageAmount" name="hotspotPackageAmount" ng-model="hotspotPackageCtrl.model.attributes.amount" required input-non-zero class="input--full"><div ng-show="hotspotPackageCtrl.form.hotspotPackageAmount.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div><div ng-show="hotspotPackageCtrl.form.hotspotPackageAmount.$error.nonZero" translate="VALIDATION_HINT_NON_ZERO" class="appInputFeedback appInputFeedback--danger"></div></div></div></div></div></div><div ng-if="!hotspotPackageCtrl.freePackage" class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_CHARGED_AS" class="appLabel--primary"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div class="appTooltip appTooltip--dark appTooltip--right">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_TOOLTIP_CHARGED_AS\' | translate}}</div></div></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><input type="text" name="hotspotPackageChargedAs" ng-model="hotspotPackageCtrl.model.attributes.charged_as" class="input--full"></div></div><div ng-if="hotspotPackageCtrl.freePackage" class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_TRIAL_RESET" class="appLabel--primary"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div class="appTooltip appTooltip--dark appTooltip--right">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_TOOLTIP_TRIAL_RESET\' | translate}}</div></div></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="number" name="hotspotPackageTrialReset" ng-model="hotspotPackageCtrl.model.attributes.trial_reset" required><label>{{\'DATETIME_HOURS_FULL\' | translate }}</label><div ng-show="hotspotPackageCtrl.form.hotspotPackageTrialReset.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_LIMIT_OVERWRITE" class="appLabel--primary"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div class="appTooltip appTooltip--dark appTooltip--right">{{\'SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_TOOLTIP_LIMIT_OVERWRITE\' | translate}}</div></div></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="checkbox" id="hotspotPackageLimitOverwrite" name="hotspotPackageLimitOverwrite" ng-model="hotspotPackageCtrl.model.attributes.limit_overwrite"><label for="hotspotPackageLimitOverwrite" translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_VALUES_ENABLE_LIMIT_OVERWRITE"></label></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_HOURS" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="number" name="hotspotPackageHours" ng-model="hotspotPackageCtrl.model.attributes.hours" required input-non-zero><div ng-show="hotspotPackageCtrl.form.hotspotPackageHours.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div><div ng-show="hotspotPackageCtrl.form.hotspotPackageHours.$error.nonZero" translate="VALIDATION_HINT_NON_ZERO" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_LIMIT_DOWN" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="number" name="hotspotPackageLimitDown" ng-model="hotspotPackageCtrl.model.attributes.limit_down"><label>kbps</label></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_LIMIT_UP" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="number" name="hotspotPackageLimitUp" ng-model="hotspotPackageCtrl.model.attributes.limit_up"><label>kbps</label></div></div></div><div class="row row--comfy"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_GUEST_CONTROL_HOTSPOT_PACKAGE_MODAL_LABEL_LIMIT_QUOTA" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="number" name="hotspotPackageLimitQuota" ng-model="hotspotPackageCtrl.model.attributes.limit_quota"><label>MBytes</label></div></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="hotspotPackage" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="hotspotPackageCtrl.showValidation = true" ng-disabled="hotspotPackageCtrl.form.$pristine" busy-toggle="hotspotPackageCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'COMMON_ACTIONS_SUBMIT\' | translate}}</button></div></div></div></div></ng-form></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1368:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiImportSite"><div id="importSiteModal" class="appControlModal appControlModal--tiny"><div frame-close="importSite" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="SITE_IMPORT_MODAL_TITLE" class="appControlModal__header"></div><div class="appControlModal__content"><form novalidate autocomplete="off" name="importSiteCtrl.form" ng-class="{          \'is-form-validation-visible\': importSiteCtrl.showValidation,          \'is-validation-hidden\': !importSiteCtrl.showValidation        }" ng-submit="importSiteCtrl.form.$valid &amp;&amp; importSiteCtrl.save()" class="appForm appForm--cozy appForm--dark"><div class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs4 col--sm3 label--right"><label translate="SITE_IMPORT_LABEL_SITE_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs8 col--sm9 appFormGroup appFormGroup--cozy"><input type="text" name="name" ng-model="importSiteCtrl.model.attributes.desc" ng-pattern="importSiteCtrl.patterns.name" required autofocus class="input--full"></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="importSite" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="importSiteCtrl.showValidation = true" type="file" ngf-select ngf-change="importSiteCtrl.importSite($files)" busy-toggle="importSiteCtrl.isImporting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-disabled="!importSiteCtrl.model.attributes.desc" class="appMainButton appMainButton--primary appMainButton--cozy importSite">{{\'SITE_IMPORT_ACTIONS_CHOOSE_FILE\' | translate}}</button><div ng-if="importSiteCtrl.importProgress &amp;&amp; importSiteCtrl.importProgress.hasOwnProperty(\'percent\')" class="appInputGroup inlineBlock"><label>{{importSiteCtrl.importProgress.percent || 0}}%</label></div></div></div></div></div></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1369:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiPreferences"><div id="preferencesModal" on-outside-element-click="preferencesCtrl.reject()" class="appControlModal appControlModal--light"><div frame-close="preferences" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="PREFERENCES_MODAL_TITLE" class="appControlModal__header"></div><form name="preferencesCtrl.form" class="appForm appForm--cozy fullWidth"><div class="appControlModal__content appControlModalScrollableContent verticalRhythmPaddingTop"><div class="container container--centered container--comfy container--fixed"><div class="row"><div class="col--md6 col--comfy"><div ng-if="preferencesCtrl.showHiddenPreferences()" class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__smallNumber"><input type="number" size="3" name="rowsPerPage" ng-model="preferencesCtrl.modelCopy.attributes.rowsPerPage" ng-change="preferencesCtrl.save()" min="1"><label translate="PREFERENCES_MODAL_LABEL_ROWS_PER_PAGE" class="appLabel--boxInline"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__smallNumber"><input type="number" size="3" name="rowsPerPropertyPanel" ng-model="preferencesCtrl.modelCopy.attributes.rowsPerPropertyPanel" ng-change="preferencesCtrl.save()" min="1"><label translate="PREFERENCES_MODAL_LABEL_ROWS_PER_PROPERTY_PANEL" class="appLabel--boxInline"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="PREFERENCES_MODAL_TOOLTIP_ROWS_PER_PROPERTY_PANEL" class="appTooltip appTooltip--bottom"></div></div></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesIsSettingsDark" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.isSettingsDark" ng-change="preferencesCtrl.save()"><label for="preferencesIsSettingsDark"></label></div><label translate="PREFERENCES_MODAL_LABEL_DARK_SETTINGS"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="PREFERENCES_MODAL_TOOLTIP_DARK_SETTINGS" class="appTooltip appTooltip--bottom"></div></div></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesIsCondensed" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.isCondensed" ng-change="preferencesCtrl.save()"><label for="preferencesIsCondensed"></label></div><label translate="PREFERENCES_MODAL_LABEL_CONDENSED_VIEW"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="PREFERENCES_MODAL_TOOLTIP_CONDENSED_VIEW" class="appTooltip appTooltip--bottom"></div></div></div></div><div ng-if="preferencesCtrl.showHiddenPreferences()" class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesIsMinimal" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.isMinimal" ng-change="preferencesCtrl.save()"><label for="preferencesIsMinimal"></label></div><label translate="PREFERENCES_MODAL_LABEL_MINIMAL_VIEW"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="PREFERENCES_MODAL_TOOLTIP_MINIMAL_VIEW" class="appTooltip appTooltip--bottom"></div></div></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesIsResponsive" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.isResponsive" ng-change="preferencesCtrl.save()"><label for="preferencesIsResponsive"></label></div><label translate="PREFERENCES_MODAL_LABEL_RESPONSIVE_TABLES"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="PREFERENCES_MODAL_TOOLTIP_RESPONSIVE_TABLES" class="appTooltip"></div></div></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesIsPropertyPanelInline" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.isPropertyPanelInline" ng-change="preferencesCtrl.save()"><label for="preferencesIsPropertyPanelInline"></label></div><label translate="PREFERENCES_MODAL_LABEL_INLINE_PROPERTY_PANEL"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="PREFERENCES_MODAL_TOOLTIP_INLINE_PROPERTY_PANEL" class="appTooltip"></div></div></div></div><div ng-if="preferencesCtrl.showHiddenPreferences()" class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesForceReadOnly" type="checkbox" ng-model="preferencesCtrl.account.repository.model.attributes.site_role" ng-true-value="\'read-only\'" ng-false-value="\'admin\'" ng-change="preferencesCtrl.toggleReadOnly()"><label for="preferencesForceReadOnly"></label></div><label translate="PREFERENCES_MODAL_LABEL_FORCE_READ_ONLY"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="PREFERENCES_MODAL_TOOLTIP_FORCE_READ_ONLY" class="appTooltip"></div></div></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesBypassConfirmBlock" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.bypassConfirmBlock" ng-true-value="undefined" ng-false-value="true" ng-change="preferencesCtrl.save()"><label for="preferencesBypassConfirmBlock"></label></div><label translate="PREFERENCES_MODAL_LABEL_BYPASS_CONFIRM_BLOCK_FLIPPED"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesBypassConfirmUpgrade" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.bypassConfirmUpgrade" ng-true-value="undefined" ng-false-value="true" ng-change="preferencesCtrl.save()"><label for="preferencesBypassConfirmUpgrade"></label></div><label translate="PREFERENCES_MODAL_LABEL_BYPASS_CONFIRM_UPGRADE_FLIPPED"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesBypassConfirmRestart" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.bypassConfirmRestart" ng-true-value="undefined" ng-false-value="true" ng-change="preferencesCtrl.save()"><label for="preferencesBypassConfirmRestart"></label></div><label translate="PREFERENCES_MODAL_LABEL_BYPASS_CONFIRM_RESTART_FLIPPED"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesDynamicDashboard" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.dynamicDashboard" ng-change="preferencesCtrl.saveAndReload()"><label for="preferencesDynamicDashboard"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="PREFERENCES_MODAL_LABEL_DYNAMIC_DASHBOARD_FLIPPED"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div></div></div></div><div class="col--md6 col--comfy"><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesBypassAutoFindDevices" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.bypassAutoFindDevices" ng-true-value="undefined" ng-false-value="true" ng-change="preferencesCtrl.save()"><label for="preferencesBypassAutoFindDevices"></label></div><label translate="PREFERENCES_MODAL_LABEL_BYPASS_AUTO_FIND_DEVICES_FLIPPED"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesRefreshRateRememberAll" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.refreshRateRememberAll" ng-change="preferencesCtrl.save()"><label for="preferencesRefreshRateRememberAll"></label></div><label translate="PREFERENCES_MODAL_LABEL_REMEMBER_ALL_REFRESH_RATES"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div translate="PREFERENCES_MODAL_TOOLTIP_REMEMBER_ALL_REFRESH_RATES" class="appTooltip appTooltip--bottomLeft"></div></div></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesWebsocketEnabled" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.websocketEnabled" ng-change="preferencesCtrl.save()"><label for="preferencesWebsocketEnabled"></label></div><label translate="PREFERENCES_MODAL_LABEL_WEBSOCKET_ENABLED"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesUse24HourTime" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.use24HourTime" ng-change="preferencesCtrl.toggleTimeFormat(); preferencesCtrl.save()"><label for="preferencesUse24HourTime"></label></div><label translate="PREFERENCES_MODAL_LABEL_24HR_TIME"></label></div></div><div ng-if="preferencesCtrl.showHiddenPreferences()" class="appFormGroup appFormGroup--cozy"><div class="appInputGroup unifiPreferences__toggle"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" class="toggle appToggle appToggle--inline"><input id="preferencesDebugTranslationKeys" type="checkbox" ng-model="preferencesCtrl.modelCopy.attributes.debugTranslationKeys" ng-change="preferencesCtrl.saveAndReload()"><label for="preferencesDebugTranslationKeys"></label></div><label translate="PREFERENCES_MODAL_LABEL_DEBUG_TRANSLATION_KEYS"></label></div></div><div ng-if="preferencesCtrl.showHiddenPreferences()" class="appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="text" size="20" name="timeFormat" ng-model="preferencesCtrl.modelCopy.attributes.timeFormat" ng-change="preferencesCtrl.save()" class="input--half"><label translate="PREFERENCES_MODAL_LABEL_TIME_FORMAT" class="appLabel--boxInline"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="text" size="20" name="dateFormat" ng-model="preferencesCtrl.modelCopy.attributes.dateFormat" ng-change="preferencesCtrl.save()" class="input--half"><label translate="PREFERENCES_MODAL_LABEL_DATE_FORMAT" class="appLabel--boxInline"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup"><select ng-model="preferencesCtrl.selectedLanguage" ng-change="preferencesCtrl.changeLanguage()" ng-options="language as preferencesCtrl.LANGUAGES.translationKeys[language] for language in preferencesCtrl.LANGUAGES.supportedLanguagesList" class="select--half"><option unifi-option-placeholder="PREFERENCES_MODAL_VALUES_SELECT_LANGUAGE"></option></select><label translate="PREFERENCES_MODAL_LABEL_LANGUAGE" class="appLabel--boxInline"></label><div ng-if="preferencesCtrl.selectedLanguage !== \'en\'" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTopHalf"><div class="appInfoBox__icon icon ubnt-icon--eye2"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="PREFERENCES_MODAL_INFO_BOX_LANGUAGE" translate-values="{communityLink: \'https://community.ubnt.com/t5/UniFi-Wireless/UniFi-Controller-Translation-Corrections/td-p/1771313\'}" class="noMarginBottom"></p></div></div></div></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup"><select ng-model="preferencesCtrl.modelCopy.attributes.alertsPosition" ng-change="preferencesCtrl.save()" ng-options="position.value as position.translationKey | translate for position in preferencesCtrl.alertPositionOptions" class="select--half"></select><label translate="PREFERENCES_MODAL_LABEL_ALERTS_POSITION" class="appLabel--boxInline"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup"><select ng-model="preferencesCtrl.selectedRefreshRate" ng-change="preferencesCtrl.changeRefreshRate()" ng-options="rate.id as rate.translationKey | translate for rate in preferencesCtrl.REFRESH_RATES" class="select--half"></select><label translate="PREFERENCES_MODAL_LABEL_REFRESH_RATE" class="appLabel--boxInline"></label></div></div><div class="appFormGroup appFormGroup--smash unifiPreferences__notes"><div class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--info primary"></span><span translate="PREFERENCES_MODAL_TOOLTIP_DATE_FORMAT" translate-values="{dateFormatLink: preferencesCtrl.URLS.MOMENTJS_FORMATS}" class="iconText__text"></span></div></div></div></div></div></div></form><div class="appControlModal__content"><div class="container container--centered container--comfy"><div class="row"><div class="col--sm6"><div ng-show="preferencesCtrl.isSaveSuccessful" class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--check-circle-fill success"></span><span translate="PREFERENCES_ACTIONS_SAVE_SUCCESS" class="iconText__text appInputFeedback appInputFeedback--simple appInputFeedback--success"></span></div><div ng-show="preferencesCtrl.isCancelSuccessful" class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--check-circle-fill success"></span><span translate="PREFERENCES_ACTIONS_CANCEL_SUCCESS" class="iconText__text appInputFeedback appInputFeedback--simple appInputFeedback--success"></span></div></div><div class="col--sm6 alignRight"><span class="appInputGroup"><button type="button" ng-if="preferencesCtrl.previousAttrs" ng-click="preferencesCtrl.resetToPrevious()" class="appMainButton appMainButton--cozy appMainButton--transparent">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button type="button" ng-click="preferencesCtrl.resetToDefaults()" class="appMainButton appMainButton--cozy appMainButton--danger">{{\'COMMON_ACTIONS_RESET_TO_DEFAULTS\' | translate}}</button></span></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1370:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiRadiusProfile"><div id="radiusProfileModal" class="appControlModal"><div frame-close="radiusProfile" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate translate-values="{name: radiusProfileCtrl.model.attributes.name}" class="appControlModal__header">{{radiusProfileCtrl.model.id ? \'PROFILES_RADIUS_FORM_TITLE_EDIT_RADIUS_PROFILE\' : \'PROFILES_RADIUS_FORM_TITLE_CREATE_RADIUS_PROFILE\'}}</div><div class="appControlModal__content"><div unifi-radius-profile-form="radiusProfileCtrl.model" unifi-radius-profile-form-on-save="radiusProfileCtrl.onSaveOverride(model)" unifi-radius-profile-form-on-cancel="radiusProfileCtrl.close()" unifi-radius-profile-form-is-read-only="!radiusProfileCtrl.isAdmin()" unifi-radius-profile-form-is-dark="true" unifi-radius-profile-form-is-modal="true"></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1371:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiSdnUser"><div id="sdnUserModal" class="appControlModal appControlModal--tiny"><div ng-click="sdnUserCtrl.close()" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="SETTINGS_CLOUD_ACCESS_TITLE" class="appControlModal__header"></div><div class="appControlModal__content"><form novalidate autocomplete="off" name="sdnUserCtrl.form" ng-class="{          \'is-form-validation-visible\': sdnUserCtrl.showValidation,          \'is-validation-hidden\': !sdnUserCtrl.showValidation        }" ng-submit="sdnUserCtrl.isSubmitAllowed() &amp;&amp; sdnUserCtrl.submit()" class="appForm appForm--cozy appForm--dark"><div class="container container--centered container--fixed"><div class="row"><div class="col--xs12"><p translate="SETTINGS_CLOUD_ACCESS_MESSAGE" class="noMarginBottom"></p><p translate="SETTINGS_CLOUD_ACCESS_MESSAGE_NOTE" class="appType--dark appType--micro italicized"></p></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_CLOUD_ACCESS_LABEL_EMAIL_OR_USERNAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy col--comfy"><input type="text" name="username" ng-model="sdnUserCtrl.username" required autofocus class="input--full"><div ng-show="sdnUserCtrl.form.username.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="SETTINGS_CLOUD_ACCESS_LABEL_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy col--comfy"><input type="password" name="password" ng-model="sdnUserCtrl.password" required class="input--full"><div ng-show="sdnUserCtrl.form.password.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row row--comfy"><div class="col--xs7 col--xsOffset5 col--sm8 col--smOffset4 col--comfy"><a href="{{sdnUserCtrl.ssoUrl}}" translate="SETTINGS_CLOUD_ACCESS_ACTIONS_WITHOUT_ACCOUNT" target="_blank" class="appLink--dark"></a></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="sdnUser" ng-click="sdnUserCtrl.close()" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="sdnUserCtrl.showValidation = true" busy-toggle="sdnUserCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'SETTINGS_CLOUD_ACCESS_LABEL_ENABLE\' | translate}}</button></div></div></div></div></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1372:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiSimpleTextEditor"><div id="simpleTextEditor" class="appControlModal"><div frame-close="simpleTextEditor" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">{{simpleTextEditorCtrl.title}}</div><div class="appControlModal__content"><form novalidate autocomplete="off" name="simpleTextEditorCtrl.form" ng-class="{          \'is-form-validation-visible\': simpleTextEditorCtrl.showValidation,          \'is-validation-hidden\': !simpleTextEditorCtrl.showValidation        }" ng-submit="simpleTextEditorCtrl.form.$valid &amp;&amp; simpleTextEditorCtrl.submit()" class="appForm appForm--cozy appForm--dark"><div class="container container--centered container--fixed"><div class="row"><div class="col--xs12"><p translate="SIMPLE_TEXT_EDITOR_MODAL_MESSAGE" class="appType--dark appType--micro italicized"></p></div></div><div class="row row--comfy"><div class="col--xs12"><textarea name="text" ng-model="simpleTextEditorCtrl.text" required autofocus class="textarea--full unifiSimpleTextEditor__textarea"></textarea><div ng-show="simpleTextEditorCtrl.form.text.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" frame-close="simpleTextEditor" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="simpleTextEditorCtrl.showValidation = true" busy-toggle="simpleTextEditorCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'COMMON_ACTIONS_SUBMIT\' | translate}}</button></div></div></div></div></form></div></div></div>'),
b.join("")}},{"jade/runtime":232}],1373:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiSitesOverview"><div id="sitesOverviewModal" on-outside-element-click="sitesOverviewCtrl.reject()" class="appControlModal appControlModal--wide appControlModal--light"><div class="flexRow"><div class="flexCol--6 unifiSitesOverview__titleCol"><div translate="SITES_OVERVIEW_MODAL_TITLE" class="appControlModal__header"></div></div><div class="flexCol--6 unifiSitesOverview__searchCol"><unifi-search unifi-search-on-change="sitesOverviewCtrl.onSearchQueryChange(searchQuery)" unifi-search-is-cozy="true" unifi-search-is-busy="sitesOverviewCtrl.isRefreshing"></unifi-search></div></div><a ng-click="sitesOverviewCtrl.openOverviewWindow()" class="appControlModal__window"><div class="icon ubnt-icon--popout"></div></a><div frame-close="sitesOverview" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__content appControlModalScrollableContent noHorizontalPadding"><unifi-loading-status unifi-loading-status-is-loading="sitesOverviewCtrl.isLoading" unifi-loading-status-failed="sitesOverviewCtrl.failedToLoad" unifi-loading-status-retry="sitesOverviewCtrl.init()" unifi-loading-status-is-opaque="true"></unifi-loading-status><unifi-site-overview-list ng-if="!sitesOverviewCtrl.isLoading &amp;&amp; !sitesOverviewCtrl.failedToLoad" unifi-site-overview-list-search-query="sitesOverviewCtrl.searchQuery" unifi-site-overview-list-is-refreshing="sitesOverviewCtrl.isRefreshing" unifi-site-overview-list-sort-key="\'sort:siteOverview\'"></unifi-site-overview-list></div></div></div>'),b.join("")}},{"jade/runtime":232}],1374:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'unifiSpeedTestModal--inProgress\': speedTestCtrl.inProgress}" class="blackout unifiSpeedTestModal"><div id="speedTestModal" class="appControlModal appControlModal--tiny"><div frame-close="speedTest" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">&nbsp;</div><div class="appControlModal__content appControlModalScrollableContent noPadding"><unifi-speed-test-donut-chart unifi-speed-test-donut-chart-series="speedTestCtrl.chartSeries"></unifi-speed-test-donut-chart><unifi-speed-test-result unifi-speed-test-result-value="speedTestCtrl.getPingResult().value" unifi-speed-test-result-status="speedTestCtrl.getPingResult().status" unifi-speed-test-result-unit="speedTestCtrl.getPingResult().unit" unifi-speed-test-result-label="\'SPEED_TEST_TOOLTIP_PING_LABEL\'"></unifi-speed-test-result><unifi-speed-test-line-chart unifi-speed-test-line-chart-series="speedTestCtrl.chartSeries"></unifi-speed-test-line-chart></div><div class="appControlModal__content"><div class="container"><div class="row"><div class="col--xs12 alignRight"><button frame-close="speedTest" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{ \'SPEED_TEST_TOOLTIP_ACTION_CLOSE\' | translate }}</button><button ng-disabled="speedTestCtrl.inProgress" busy-toggle="speedTestCtrl.inProgress" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" ng-click="speedTestCtrl.startTest()" class="appMainButton appMainButton--cozy appMainButton--primary">{{ \'SPEED_TEST_TOOLTIP_ACTION_RUN_SPEED_TEST\' | translate }}</button></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1375:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiStatisticsDpiFilters"><div id="configureDpiCategoryGraphModal" class="appControlModal"><div class="appControlModal__header"> <div class="row"><div class="col--sm4">{{\'STATISTICS_DPI_EDIT_FILTERS_TITLE\' | translate}}</div><div class="col--sm8 alignRight appForm--cozy"><label class="capitalize appLabel--primary">{{\'STATISTICS_DPI_EDIT_FILTERS_TOGGLE\' | translate}}</label><div data-on="on" data-off="off" class="toggle appToggle appToggle--dark appToggle--inline"><input id="enableFilteringToggle" type="checkbox" ng-checked="statisticsDpiFiltersCtrl.isEnabled()" ng-click="statisticsDpiFiltersCtrl.toggleFiltering()"><label for="enableFilteringToggle"></label></div></div></div></div><div class="appControlModal__content appControlModalScrollableContent"><div class="row"><div class="col--xs12 col--sm6 appForm--cozy appForm--dark unifiStatisticsDpiFilters__pane"><div class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{\'STATISTICS_DPI_EDIT_FILTERS_DEVICES\' | translate}}</div><div ng-repeat="filter in statisticsDpiFiltersCtrl.allFilters | filter: {type: statisticsDpiFiltersCtrl.STATS_DEFAULTS.DPI.FILTER.DEVICE}" class="appInputGroup appInputGroup--cram"><input type="checkbox" ng-checked="statisticsDpiFiltersCtrl.dpiFilters.isSelected(filter)" ng-click="statisticsDpiFiltersCtrl.toggleFilter(filter)" ng-disabled="!statisticsDpiFiltersCtrl.isEnabled()"><label>{{filter.name}}</label></div></div><div class="col--xs12 col--sm6 appForm--cozy appForm--dark unifiStatisticsDpiFilters__pane"><div class="appSubHeading appSubHeading--comfy appSubHeading--standalone">{{\'STATISTICS_DPI_EDIT_FILTERS_SSIDS\' | translate}}</div><div ng-repeat="filter in statisticsDpiFiltersCtrl.allFilters | filter: {type: statisticsDpiFiltersCtrl.STATS_DEFAULTS.DPI.FILTER.SSID}" class="appInputGroup appInputGroup--cram"><input type="checkbox" ng-checked="statisticsDpiFiltersCtrl.dpiFilters.isSelected(filter)" ng-click="statisticsDpiFiltersCtrl.toggleFilter(filter)" ng-disabled="!statisticsDpiFiltersCtrl.isEnabled()"><label>{{filter.name}}</label></div></div></div></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><span><button frame-close="statisticsDpiFilters" translate="COMMON_ACTIONS_CANCEL" class="appMainButton appMainButton--cozy appMainButton--transparentDark"></button><button frame-close="statisticsDpiFilters" ng-click="statisticsDpiFiltersCtrl.saveAndResolve()" translate="COMMON_ACTIONS_SAVE" class="appMainButton appMainButton--cozy appMainButton--primary"></button></span></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1376:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div class=\"blackout unifiSystemConfig\"><div id=\"systemConfigModal\" class=\"appControlModal appControlModal--wide appControlModal--light\"><div frame-close=\"systemConfig\" class=\"appControlModal__close\"><div class=\"icon ubnt-icon--x\"></div></div><div class=\"appControlModal__content noPaddingBottom\"><ul class=\"appTabs appTabs--cozy\"><li ng-click=\"systemConfigCtrl.activeTab = 'system'\" ng-class=\"{'is-tab-selected': systemConfigCtrl.activeTab === 'system'}\" translate=\"SETTINGS_MAINTENANCE_LABEL_SYSTEM_CONFIG\" class=\"tabs__item\"></li><li ng-click=\"systemConfigCtrl.activeTab = 'network'\" ng-class=\"{'is-tab-selected': systemConfigCtrl.activeTab === 'network'}\" translate=\"SETTINGS_MAINTENANCE_LABEL_NETWORK_CONFIG\" class=\"tabs__item\"></li></ul></div><div id=\"systemConfig\" class=\"appControlModal__content appControlModalScrollableContent\"><div ng-show=\"systemConfigCtrl.activeTab === 'system'\" class=\"unifiSystemConfigWrapper verticalRhythm--cozy\"><div class=\"unifiSystemConfigSection\"><table class=\"noMarginBottom\"><tbody ng-if=\"systemConfigCtrl.isDisplaySiteOnLeft()\" unifi-system-config-site></tbody><tbody><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_APS' | translate}}</td><td class=\"columnValue\"><div ng-repeat=\"(model, count) in systemConfigCtrl.deviceModels\">{{model}} ({{count}})</div></td></tr></tbody></table></div><div class=\"unifiSystemConfigSection\"><table class=\"noMarginBottom\"><tbody ng-if=\"!systemConfigCtrl.isDisplaySiteOnLeft()\" unifi-system-config-site></tbody><tbody><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_NETWORKS' | translate}}</td><td class=\"columnValue\"><div ng-repeat=\"network in systemConfigCtrl.networks.repository.collection.models\">{{network.get('name')}}</div></td></tr><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_WIRELESS_NETWORKS' | translate}}</td><td class=\"columnValue\"><div ng-repeat=\"network in systemConfigCtrl.wirelessNetworks.repository.collection.models\">{{network.get('name')}}</div></td></tr></tbody></table></div><div class=\"unifiSystemConfigSection\"><table class=\"noMarginBottom\"><tbody><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_GUEST_CONTROL' | translate}}</td><td class=\"columnValue\">{{systemConfigCtrl.guestPortal.get('portal_enabled') | enabled}}</td></tr><tr><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_AUTHENTICATION' | translate}}</td><td class=\"columnValue\">{{systemConfigCtrl.guestPortal.get('auth')}}</td></tr><tr ng-if=\"systemConfigCtrl.guestPortal.auth !== 'custom'\"><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_EXPIRATION' | translate}}</td><td class=\"columnValue\">{{systemConfigCtrl.guestPortal.get('expire') === 'custom' ? systemConfigCtrl.guestPortal.get('expire_number') * systemConfigCtrl.guestPortal.get('expire_unit') * 60 : systemConfigCtrl.guestPortal.get('expire') * 60 | seconds}}</td></tr><tr ng-if=\"systemConfigCtrl.guestPortal.auth !== 'custom'\"><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_LANDING_PAGE' | translate}}</td><td class=\"columnValue\">{{systemConfigCtrl.guestPortal.get('redirect_enabled') ? 'promotional' : 'original'}}</td></tr><tr ng-if=\"systemConfigCtrl.guestPortal.auth !== 'custom'\"><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_PORTAL_CUSTOMIZATION' | translate}}</td><td class=\"columnValue\">{{systemConfigCtrl.guestPortal.get('portal_customized') | enabled}}</td></tr><tr ng-if=\"systemConfigCtrl.guestPortal.auth === 'custom'\"><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_CUSTOM_PORTAL' | translate}}</td><td class=\"columnValue\">{{systemConfigCtrl.guestPortal.get('custom_ip')}}</td></tr><tr ng-if=\"systemConfigCtrl.guestPortal.portalHostname\"><td class=\"columnName\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_PORTAL_URL_HOSTNAME' | translate}}</td><td class=\"columnValue\">{{systemConfigCtrl.guestPortal.get('portal_hostname')}}</td></tr></tbody></table></div></div><table ng-show=\"systemConfigCtrl.activeTab === 'system' &amp;&amp; systemConfigCtrl.devicesCollection.length\" class=\"unifiDevicesTable appTable appTable--light appTable--flexible appTable--striped appTable--condensed appTable--minor unifiSystemConfigTable\"><thead><tr><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_NAME_MAC_ADDRESS' | translate}}</th><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_MODEL' | translate}}</th><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_VERSION' | translate}}</th><th colspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_CHANNEL' | translate}}</th><th colspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_POWER' | translate}}</th><th colspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_CLIENTS' | translate}}</th><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_BAND_STEERING' | translate}}</th><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_ATF' | translate}}</th><th colspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_LOAD_BALANCING' | translate}}</th><th colspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_MIN_RSSI' | translate}}</th><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_UPLINK_STATE' | translate}}</th><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_IP_ADDRESS' | translate}}</th><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_UPTIME' | translate}}</th><th rowspan=\"2\">{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_UPLINK' | translate}}</th></tr><tr><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_2G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_5G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_2G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_5G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_2G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_5G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_2G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_5G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_2G' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_5G' | translate}}</th></tr></thead><tbody><tr ng-repeat=\"model in systemConfigCtrl.devicesCollection\"><td>{{model.getDisplayName()}}</td><td>{{systemConfigCtrl.getDeviceModel(model)}}</td><td>{{model.get('version')}}</td><td>{{systemConfigCtrl.getChannelConfigString(model, 'ng')}}\n{{systemConfigCtrl.getChannelMode(model, 'ng')}}</td><td>{{systemConfigCtrl.getChannelConfigString(model, 'na')}}\n{{systemConfigCtrl.getChannelMode(model, 'na')}}</td><td>{{systemConfigCtrl.getTransmitPowerString(model, 'ng')}}\n{{systemConfigCtrl.getTransmitPowerMode(model, 'ng')}}</td><td>{{systemConfigCtrl.getTransmitPowerString(model, 'na')}}\n{{systemConfigCtrl.getTransmitPowerMode(model, 'na')}}</td><td>{{model.get('ng-num_sta')}}</td><td>{{model.get('na-num_sta')}}</td><td><span ng-if=\"!model.get('bandsteering_mode') || model.get('bandsteering_mode') === 'off'\" translate=\"SETTINGS_MAINTENANCE_SYSTEM_CONFIG_VALUES_BAND_STEERING_OFF\"></span><span ng-if=\"model.get('bandsteering_mode') === 'prefer_5g'\" translate=\"SETTINGS_MAINTENANCE_SYSTEM_CONFIG_VALUES_BAND_STEERING_PREFER_5G\"></span><span ng-if=\"model.get('bandsteering_mode') === 'equal'\" translate=\"SETTINGS_MAINTENANCE_SYSTEM_CONFIG_VALUES_BAND_STEERING_BALANCED\"></span></td><td ng-bind-html=\"systemConfigCtrl.isAtfEnabled(model) | enabledIcon\"></td><td>{{systemConfigCtrl.getLoadBalance(model.get('wlangroup_id_ng')) || ''}}</td><td>{{systemConfigCtrl.getLoadBalance(model.get('wlangroup_id_na')) || ''}}</td><td>{{systemConfigCtrl.getMinRssiString(model, 'ng')}}</td><td>{{systemConfigCtrl.getMinRssiString(model, 'na')}}</td><td><span ng-if=\"model.get('uplink')\">{{model.get('uplink').type}}, {{model.get('uplink') | duplex}}</span></td><td class=\"noWrap\">{{model.get('ip')}}</td><td>{{model.get('uptime') | seconds}}</td><td>{{systemConfigCtrl.getUplinkDisplayName(model)}}</td></tr></tbody></table><table ng-show=\"systemConfigCtrl.activeTab === 'network' &amp;&amp; systemConfigCtrl.networks.repository.collection.models.length\" class=\"unifiNetworksTable appTable appTable--light appTable--flexible appTable--striped appTable--condensed appTable--minor unifiSystemConfigTable\"><thead><tr><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_NAME' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_PURPOSE' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_SUBNET' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_DHCP_SERVER' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_DHCP_RANGE' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_DHCP_NAME_SERVER' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_DHCP_WINS_SERVER' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_DHCP_LEASE_TIME' | translate}}</th><th>{{'SETTINGS_MAINTENANCE_SYSTEM_CONFIG_LABEL_IGMP_SNOOPING' | translate}}</th></tr></thead><tbody><tr ng-repeat=\"model in systemConfigCtrl.networks.repository.collection.models\"><td>{{model | networkVlan}}</td><td>{{model.get('purpose') | networkPurpose}}</td><td>{{model | networkSubnet}}</td><td ng-bind-html=\"model.get('dhcpd_enabled') | enabledIcon\"></td><td>{{model.get('dhcpd_enabled') ? model.get('dhcpd_start') + ' - ' + model.get('dhcpd_stop') : ''}}</td><td>{{model.get('dhcpd_dns_1') && model.get('dhcpd_dns_enabled') ? model.get('dhcpd_dns_1') : ''}}{{model.get('dhcpd_dns_2') && model.get('dhcpd_dns_enabled') ? ', ' + model.get('dhcpd_dns_2') : ''}}</td><td>{{model.get('dhcpd_wins_1') && model.get('dhcpd_wins_enabled') ? model.get('dhcpd_wins_1') : ''}}{{model.get('dhcpd_wins_2') && model.get('dhcpd_wins_enabled') ? ', ' + model.get('dhcpd_wins_2') : ''}}</td><td>{{model.get('dhcpd_enabled') && model.get('dhcpd_leasetime') ? model.get('dhcpd_leasetime') : ''}}</td><td ng-bind-html=\"model.get('igmp_snooping') | enabledIcon\"></td></tr></tbody></table></div><div class=\"appControlModal__content\"><div class=\"container container--centered container--comfy\"><div class=\"row\"><div class=\"col--xs12 alignRight\"><div class=\"appInputGroup\"><button type=\"button\" frame-close=\"systemConfig\" class=\"appMainButton appMainButton--cozy appMainButton--transparent\">{{'COMMON_ACTIONS_CLOSE' | translate}}</button><button unifi-screenshot-download=\"systemConfigCtrl.activeTab\" unifi-screenshot-download-element-id=\"systemConfig\" unifi-screenshot-download-toggle-class=\"appControlModalScrollableContent--noMaxHeight\" class=\"appMainButton appMainButton--cozy appMainButton--primary\">{{'SETTINGS_MAINTENANCE_ACTIONS_DOWNLOAD' | translate}}</button></div></div></div></div></div></div></div>"),b.join("")}},{"jade/runtime":232}],1377:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiAddSite"><div id="addSiteModal" class="appControlModal appControlModal--tiny"><div frame-close="trainingLogin" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="TRAINING_LOGIN_MODAL_TITLE" class="appControlModal__header"></div><div translate="TRAINING_LOGIN_MODAL_CONTENT" class="appControlModal__content"></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><button ng-click="trainingLoginCtrl.resolve()" translate="COMMON_ACTIONS_SIGN_IN" class="appMainButton appMainButton--cozy appMainButton--primary confirm"></button></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1378:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div id="updateDataRetentionDaysModal" class="appControlModal appControlModal--tiny"><div ng-click="updateDataRetentionDaysCtrl.reject()" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">{{\'SETTINGS_MAINTENANCE_HISTORICAL_DATA_RETENTION_UPDATE_TITLE\' | translate}}</div><div class="appControlModal__content"><p class="verticalRhythm--cozy">{{\'SETTINGS_MAINTENANCE_HISTORICAL_DATA_RETENTION_UPDATE_MESSAGE\' | translate}}</p><div class="appForm appForm--cozy appForm--dark"><div class="row verticalRhythmTop--comfy"><div class="col--sm6"><label translate="SETTINGS_MAINTENANCE_LABEL_HISTORICAL_DATA_RETENTION" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm6 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup inlineBlock"><select name="maintenanceDataRetentionDays" id="maintenanceDataRetentionDays" ng-model="updateDataRetentionDaysCtrl.data_retention_days" ng-init="updateDataRetentionDaysCtrl.data_retention_days = \'30\'"><option value="7"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 7} }}</span></option><option value="30"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 30} }}</span></option><option value="60"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 60} }}</span></option><option value="90"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 90} }}</span></option><option value="180"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 180} }}</span></option><option value="365"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 365} }}</span></option></select></div></div></div></div></div></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><div class="appInputGroup"><button ng-click="updateDataRetentionDaysCtrl.reject()" translate="COMMON_ACTIONS_CANCEL" class="appMainButton appMainButton--cozy appMainButton--transparentDark"></button><button ng-click="updateDataRetentionDaysCtrl.resolve(updateDataRetentionDaysCtrl.data_retention_days)" translate="COMMON_ACTIONS_APPLY" class="appMainButton appMainButton--cozy appMainButton--primary"></button></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1379:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div id="webrtcFailedModal" class="appControlModal appControlModal--tiny"><div class="appControlModal__header">{{ webrtcErrorCtrl.message | translate }}</div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><span class="appInputGroup"><button ng-click="webrtcErrorCtrl.gotoDashboard()" class="appMainButton appMainButton--cozy appMainButton--primary">{{ \'WEBRTC_ERROR_TOOLTIP_ACTIONS_GOTO_DASHBOARD\' | translate }}</button></span></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1380:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div id="webrtcFailedModal" class="appControlModal appControlModal--tiny"><div translate="WEBRTC_FAILED_TOOLTIP_TITLE" class="appControlModal__header"></div><div translate="WEBRTC_FAILED_TOOLTIP_CONTENT" class="appControlModal__content"></div><div class="appControlModal__content"><div class="appInputGroup"><a download="report-browser.json" ng-href="{{webrtcFailedCtrl.reportBrowserUrl}}" ng-if="webrtcFailedCtrl.reportBrowserUrl" class="appMainButton appMainButton--cozy appMainButton--tertiary">{{ \'WEBRTC_FAILED_TOOLTIP_ACTIONS_GET_REPORT_BROWSER\' | translate }}</a></div><div class="appInputGroup"><a download="report-controller.zip.b64" ng-href="{{webrtcFailedCtrl.reportControllerUrl}}" ng-if="webrtcFailedCtrl.reportControllerUrl" class="appMainButton appMainButton--cozy appMainButton--tertiary">{{ \'WEBRTC_FAILED_TOOLTIP_ACTIONS_GET_REPORT_CONTROLLER\' | translate }}</a></div></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--6"><span class="appInputGroup"><button ng-click="webrtcFailedCtrl.gotoDashboard()" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{ \'WEBRTC_FAILED_TOOLTIP_ACTIONS_GOTO_DASHBOARD\' | translate }}</button></span></div><div class="flexCol--6 alignRight"><span class="appInputGroup"><button ng-if="!webrtcFailedCtrl.isReportGenerated()" busy-toggle="webrtcFailedCtrl.isGeneratingReport" busy-toggle-spinner-classes="[\'appSpinner appSpinner--dark appSpinner--centered appSpinner--small\']" ng-click="webrtcFailedCtrl.getReport($event)" class="appMainButton appMainButton--cozy appMainButton--secondary">{{ \'WEBRTC_FAILED_TOOLTIP_ACTIONS_GENERATE_REPORT\' | translate }}</button><button ng-click="webrtcFailedCtrl.retry()" class="appMainButton appMainButton--cozy appMainButton--primary">{{ \'COMMON_ACTIONS_RETRY\' | translate }}</button></span></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1381:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div class="appControlModal appControlModal--small"><form novalidate autocomplete="off" name="wirelessNetworkMacFilterAddBatchCtrl.form" ng-class="{        \'is-form-validation-visible\': wirelessNetworkMacFilterAddBatchCtrl.showValidation,        \'is-validation-hidden\': !wirelessNetworkMacFilterAddBatchCtrl.showValidation      }" ng-submit="wirelessNetworkMacFilterAddBatchCtrl.form.$valid &amp;&amp; wirelessNetworkMacFilterAddBatchCtrl.onSave()" class="appForm appForm--cozy appForm--dark"><div frame-close="wirelessNetworkMacFilterAddBatch" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="SETTINGS_WLAN_EDIT_MAC_FILTER_BATCH_HEADER" class="appControlModal__header"></div><div class="appControlModal__content appControlModalScrollableContent"><div unifi-highlighted-textarea class="appForm appForm--cozy appForm--dark verticalRhythmHalf unifiSettingsWirelessNetworkMacFilterHighlighted"><div class="highlighted highlighted--back"><div ng-repeat="mac in wirelessNetworkMacFilterAddBatchCtrl.getShowedMacAddress() track by $index" ng-class="{\'highlighted__line--invalid\': !wirelessNetworkMacFilterAddBatchCtrl.isMacAddressValid(mac)}" class="highlighted__line">&nbsp;</div></div><textarea name="wlanMacFilterList" ng-model="wirelessNetworkMacFilterAddBatchCtrl.macFilterList" ng-pattern="wirelessNetworkMacFilterAddBatchCtrl.patterns.macAddressList" ng-trim="false" required class="textarea--full verticalRhythmHalf highlighted highlighted--textarea"></textarea></div><div class="appFormGroup appFormGroup--cozy noMarginBottom"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="wlanMacFilterOverride" id="wlanMacFilterOverride" ng-model="wirelessNetworkMacFilterAddBatchCtrl.macFilterOverride"><label for="wlanMacFilterOverride" translate="SETTINGS_WLAN_VALUES_MAC_FILTER_OVERRIDE_LIST"></label></div></div></div><div class="appControlModal__content"><div class="container"><div class="row"><div class="col--xs6 alignLeft"><button type="button" ngf-select ngf-change="wirelessNetworkMacFilterAddBatchCtrl.onCsvImport($files)" accept="text/plain" class="appMainButton appMainButton--cozy appMainButton--inputDark"><span class="button__icon icon ubnt-icon--plus"></span><span translate="COMMON_ACTIONS_IMPORT"></span></button></div><div class="col--xs6 alignRight"><button type="button" frame-close="wirelessNetworkMacFilterAddBatch" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{ \'COMMON_ACTIONS_CLOSE\' | translate }}</button><button type="submit" ng-click="wirelessNetworkMacFilterAddBatchCtrl.showValidation = true" class="appMainButton appMainButton--cozy appMainButton--primary">{{ \'COMMON_ACTIONS_APPLY\' | translate }}</button></div></div></div></div></form></div></div>'),b.join("")}},{"jade/runtime":232}],1382:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiSettingsWirelessNetworkMacFilterAddClients"><div class="appControlModal appControlModal--small"><form novalidate autocomplete="off" name="wirelessNetworkMacFilterAddClientsCtrl.form" ng-class="{        \'is-form-validation-visible\': wirelessNetworkMacFilterAddClientsCtrl.showValidation,        \'is-validation-hidden\': !wirelessNetworkMacFilterAddClientsCtrl.showValidation      }" ng-submit="wirelessNetworkMacFilterAddClientsCtrl.form.$valid &amp;&amp; wirelessNetworkMacFilterAddClientsCtrl.onSave()" class="appForm appForm--cozy appForm--dark"><div frame-close="wirelessNetworkMacFilterAddClients" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="SETTINGS_WLAN_EDIT_MAC_FILTER_CLIENTS_HEADER" class="appControlModal__header"></div><div class="appControlModal__content appControlModalScrollableContent"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--dark appActionBar--transparent verticalRhythmHalf noBorder noPaddingRight"><div class="appActionBar__inner"><div class="appActionBar__left"></div><div class="appActionBar__right"><div class="appInputGroup"><div class="appIconInput appIconInput--right appIconInput--comfy"><div class="appIconInput__icon icon ubnt-icon--search-2"></div><input ng-model="wirelessNetworkMacFilterAddClientsCtrl.macFilterSearch" ng-change="wirelessNetworkMacFilterAddClientsCtrl.onMacFilterSearchChange()" ng-keydown="wirelessNetworkMacFilterAddClientsCtrl.onMacFilterSearchBlockEnter($event)" type="text" placeholder="{{ \'DEBUG_PANEL_FILTER_BY_PLACEHOLDER\' | translate }}" class="appIconInput__input"></div></div></div></div></div><table ng-if="wirelessNetworkMacFilterAddClientsCtrl.getClientsCnt()" ng-class="{\'appTable--hoverable\': wirelessNetworkMacFilterAddClientsCtrl.getClientsCnt()}" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--minor appTable--dark verticalRhythmHalf"><thead><tr><th class="wlanCheck"></th><th class="wlanMacAddress"><span translate="SETTINGS_WLAN_TABLE_FILTER_LIST_HEADER_MAC"></span></th><th class="wlanClientHostname"><span translate="SETTINGS_WLAN_TABLE_FILTER_LIST_HEADER_HOSTNAME"></span></th></tr></thead><tfoot ng-if="wirelessNetworkMacFilterAddClientsCtrl.getClientsCnt()"><tr><td colspan="3"><unifi-list-pagination unifi-list-pagination-current-page="wirelessNetworkMacFilterAddClientsCtrl.clientsCurrentPage" unifi-list-pagination-rows-per-page="wirelessNetworkMacFilterAddClientsCtrl.clientsRowsPerPage" unifi-list-pagination-total-rows="wirelessNetworkMacFilterAddClientsCtrl.getClientsCnt()" unifi-list-pagination-total-links="5" unifi-list-pagination-is-dark="true" class="noMarginBottom"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="client in wirelessNetworkMacFilterAddClientsCtrl.getClients(),                 startFrom (wirelessNetworkMacFilterAddClientsCtrl.clientsCurrentPage - 1) * wirelessNetworkMacFilterAddClientsCtrl.clientsRowsPerPage,                 limitTo wirelessNetworkMacFilterAddClientsCtrl.clientsRowsPerPage" data-id="{{::client.get(\'mac\')}}" class="clickable"><td class="wlanCheck"><input type="checkbox" id="macFilterClients[{{client.get(\'mac\')}}]" name="macFilterClients[{{client.get(\'mac\')}}]" value="{{client.get(\'mac\')}}" ng-model="wirelessNetworkMacFilterAddClientsCtrl.macFilterClients[client.get(\'mac\')]"></td><td class="wlanMacAddress"><label for="macFilterClients[{{client.get(\'mac\')}}]">{{::client.get(\'mac\')}}</label></td><td class="wlanClientHostname">{{::client.get(\'hostname\')}}</td></tr></tbody></table><div ng-if="!wirelessNetworkMacFilterAddClientsCtrl.getClientsCnt()" class="appInfoBox appInfoBox--cozy appInfoBox--dark appInfoBox--noBorder verticalRhythmTopHalf"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_WLAN_TABLE_FILTER_LIST_NO_CLIENTS" class="noMarginBottom"></p></div></div></div></div><div class="appControlModal__content"><div class="container"><div class="row"><div class="col--xs6 alignLeft"></div><div class="col--xs6 alignRight"><button type="button" frame-close="wirelessNetworkMacFilterAddClients" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{ \'COMMON_ACTIONS_CLOSE\' | translate }}</button><button type="submit" ng-click="wirelessNetworkMacFilterAddClientsCtrl.showValidation = true" class="appMainButton appMainButton--cozy appMainButton--primary">{{ \'COMMON_ACTIONS_APPLY\' | translate }}</button></div></div></div></div></form></div></div>'),b.join("")}},{"jade/runtime":232}],1383:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.join("")}},{"jade/runtime":232}],1384:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<ui-view></ui-view><unifi-browser-warning></unifi-browser-warning>"),b.join("")}},{"jade/runtime":232}],1385:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-dynamic-dns-list unifi-dynamic-dns-list-sort-key=\"'sort:dynamicdns'\"></unifi-dynamic-dns-list>"),b.join("")}},{"jade/runtime":232}],1386:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-known-client-list unifi-known-client-list-sort-key=\"'sort:knownclients'\"></unifi-known-client-list>"),b.join("")}},{"jade/runtime":232}],1387:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-neighboring-access-point-list unifi-neighboring-access-point-list-sort-key=\"'sort:neighboraps'\"></unifi-neighboring-access-point-list>"),b.join("")}},{"jade/runtime":232}],1388:[function(a,b,c){
a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-past-connection-list unifi-past-connection-list-sort-key=\"'sort:pastconnections'\"></unifi-past-connection-list>"),b.join("")}},{"jade/runtime":232}],1389:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-past-guest-authorization-list unifi-past-guest-authorization-list-sort-key=\"'sort:pastguests'\"></unifi-past-guest-authorization-list>"),b.join("")}},{"jade/runtime":232}],1390:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-port-forward-stats-list unifi-port-forward-stats-list-sort-key=\"'sort:portforwardstats'\"></unifi-port-forward-stats-list>"),b.join("")}},{"jade/runtime":232}],1391:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-remote-user-vpn-list unifi-remote-user-vpn-list-sort-key=\"'sort:remoteuservpn'\"></unifi-remote-user-vpn-list>"),b.join("")}},{"jade/runtime":232}],1392:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-routing-stats-list></unifi-routing-stats-list>"),b.join("")}},{"jade/runtime":232}],1393:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-streams-list unifi-streams-list-sort-key=\"'sort:streams'\"></unifi-streams-list>"),b.join("")}},{"jade/runtime":232}],1394:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-switch-stats-list unifi-switch-stats-list-sort-key=\"'sort:switchstats'\"></unifi-switch-stats-list>"),b.join("")}},{"jade/runtime":232}],1395:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div id=\"contentContainer\" class=\"appView appView--panelLayout\"><div ng-class=\"{      'is-property-panel-inline': siteCtrl.isPropertyPanelInline(),      'is-property-panel-open': siteCtrl.isPropertyPanelOpen(),      'is-property-panel-closed': !siteCtrl.isPropertyPanelOpen(),      'is-property-panel-available': siteCtrl.isPropertyPanelAvailable()    }\" class=\"appViewCenterPanel appScrollable\"><ui-view></ui-view></div><unifi-property-panel unifi-requires-site-context></unifi-property-panel><unifi-window-panels unifi-requires-site-context></unifi-window-panels></div>"),b.join("")}},{"jade/runtime":232}],1396:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><unifi-map-action-bar></unifi-map-action-bar><unifi-image-map ng-if="!mapCtrl.isGoogleMap" class="flexFlag__body fullWidth"></unifi-image-map><div ng-if="mapCtrl.isGoogleMap &amp;&amp; mapCtrl.apiKey" class="flexFlag__body fullWidth positionRelative flexFlag flexFlag--vertical"><div atlas-lazy-load-script atlas-lazy-load-script-api-key="::mapCtrl.apiKey"></div><unifi-map-google ng-if="mapCtrl.apiLoadSuccess" class="flexFlag__body fullWidth"></unifi-map-google><div ng-if="mapCtrl.isGoogleMap &amp;&amp; mapCtrl.apiLoadFailure &amp;&amp; mapCtrl.apiKey &amp;&amp; !mapCtrl.apiLoadSuccess" unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox appInfoBox--cozy appInfoBox--centered"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="MAP_API_LOAD_FAILURE_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="MAP_API_LOAD_FAILURE_MESSAGE" class="noMarginBottom"></p></div></div></div></div><div ng-if="mapCtrl.isGoogleMap &amp;&amp; mapCtrl.apiLoadFailure &amp;&amp; !mapCtrl.apiKey" class="flexFlag__body fullWidth positionRelative"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox appInfoBox--centered"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="MAP_API_KEY_NOT_DEFINED_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="MAP_API_KEY_NOT_DEFINED_MESSAGE" translate-values="{helpLink: \'https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key\', state: \'manage.site.settings.controller\'}" translate-compile class="noMarginBottom"></p></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1397:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="topologyViewCtrl.MAP_DEFAULTS.STATES"></unifi-state-switcher></div><div class="appActionBarFilter"><ul class="buttonGroup buttonGroup--shrink appMainButtonGroup appMainButtonGroup--filter appMainButtonGroup--cozy"><li ng-click="topologyViewCtrl.toggleLinkLabels()" ng-class="{\'is-button-selected\': topologyViewCtrl.settings.linkLabelsEnabled}" class="button appMainButton appMainButton--cozy">{{\'TOPOLOGY_LINK_LABELS\' | translate}}</li><li ng-click="topologyViewCtrl.toggleClientsVisibility()" ng-class="{\'is-button-selected\': topologyViewCtrl.settings.clientsVisible}" class="button appMainButton appMainButton--cozy">{{\'TOPOLOGY_SHOW_CLIENTS\' | translate}}</li></ul></div></div></div></div></div><unifi-topology-graph ng-class="{\'unifiTopologyGraph__withLinkLabels\': topologyViewCtrl.settings.linkLabelsEnabled}" unifi-topology-graph-with-clients="topologyViewCtrl.settings.clientsVisible" class="flexFlag__body fullWidth"></unifi-topology-graph></div></div>'),b.join("")}},{"jade/runtime":232}],1398:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="adminSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_ADMINS" class="unifiSettingsHeader__title"></div></div><div ng-switch="adminsCtrl.view"><div ng-switch-when="form" unifi-admin-form="adminsCtrl.model" unifi-admin-form-on-save="adminsCtrl.list()" unifi-admin-form-on-cancel="adminsCtrl.list()" unifi-admin-form-is-read-only="!(adminsCtrl.isSuperAdmin() || adminsCtrl.isAdmin() &amp;&amp; adminsCtrl.$stateParams.action === \'add\')"></div><div ng-switch-when="list"><unifi-admin-list unifi-admin-list-on-edit="adminsCtrl.edit(model)"></unifi-admin-list><div unifi-if-role-admin class="unifiSettingsFooter"><button ng-click="adminsCtrl.add()" ng-class="adminsCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--inputDark\' :                 \'appMainButton--input\'              " class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_ADMIN_BUTTON_ADD"></span></button></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1399:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="backupSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="backupSettingsCtrl.form" ng-class="{          \'appForm--dark\': backupSettingsCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': backupSettingsCtrl.showValidation,          \'is-validation-hidden\': !backupSettingsCtrl.showValidation        }" ng-submit="backupSettingsCtrl.form.$valid &amp;&amp; backupSettingsCtrl.save()" class="appForm appForm--cozy"><fieldset ng-disabled="!backupSettingsCtrl.isAdmin()" class="appFieldset appFieldset--quiet"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_AUTOBACKUP" class="unifiSettingsHeader__title"></div></div><unifi-config-changed unifi-config-changed-on-reset="backupSettingsCtrl.resolveDivergence()" unifi-config-changed-on-ignore="backupSettingsCtrl.ignoreDivergence()" unifi-config-changed-is-dark="backupSettingsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="backupSettingsCtrl.haveFormsDiverged()"></unifi-config-changed><div class="unifiSettingsSection"><div translate="SETTINGS_BACKUP_SECTION_AUTOBACKUP_CONFIGURATION" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><ng-form name="backupSettingsCtrl.forms.super_mgmt" unifi-model-form="backupSettingsCtrl.getSettingFromKey(\'super_mgmt\', null, true)"><div class="row"><div class="col--sm3"><label for="autoBackupEnable" translate="SETTINGS_BACKUP_LABEL_AUTOBACKUP_ENABLE" class="appLabel--primary"></label><div ng-if="backupSettingsCtrl.isCloudKeySdCardCheckAvailable()" class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': backupSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><span translate="SETTINGS_BACKUP_LABEL_AUTOBACKUP_DISABLED_TOOLTIP"></span></div></div></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" ng-class="{\'appToggle--dark\': backupSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="toggle appToggle"><input type="checkbox" name="autoBackupEnable" id="autoBackupEnable" ng-model="modelFormCtrl.modelCopy.attributes.autobackup_enabled" ng-model-master="modelFormCtrl.model.attributes.autobackup_enabled" ng-disabled="backupSettingsCtrl.isCloudKeySdCardCheckAvailable()"><label for="autoBackupEnable"></label></div></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'autobackup-enabled\', modelFormCtrl.modelCopy.attributes.autobackup_enabled)" class="row"><div class="col--sm3"><label translate="SETTINGS_BACKUP_LABEL_AUTOBACKUP_OCCURRENCE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><cron-selection ng-model="modelFormCtrl.modelCopy.attributes.autobackup_cron_expr" ng-init="modelFormCtrl.modelCopy.attributes.autobackup_cron_expr || backupSettingsCtrl.MONTHLY_OCCURANCE" template="partials/cronSelection.html" config="backupSettingsCtrl.cronConfig" class="inlineBlock"></cron-selection></div></div><div ng-show="modelFormCtrl.setVisibility(\'autobackup-enabled\', modelFormCtrl.modelCopy.attributes.autobackup_enabled)" class="row"><div class="col--sm3"><label translate="SETTINGS_BACKUP_LABEL_AUTOBACKUP_OCCURRENCE_TIMEZONE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><select name="backupTimezone" ng-model="modelFormCtrl.modelCopy.attributes.autobackup_timezone" ng-model-master="modelFormCtrl.model.attributes.autobackup_timezone" ng-options="timezone.timezone as timezone.name for timezone in backupSettingsCtrl.timezones"><option unifi-option-placeholder="SETTINGS_SITE_VALUES_SELECT_TIMEZONE"></option></select></div></div><div ng-show="modelFormCtrl.getVisibility(\'autobackup-enabled\')" class="row"><div class="col--sm3"><label translate="SETTINGS_BACKUP_LABEL_AUTOBACKUP_MAX_FILES" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="number" min="1" name="autoBackupMaxFiles" id="autoBackupMaxFiles" ng-model="modelFormCtrl.modelCopy.attributes.autobackup_max_files" ng-model-master="modelFormCtrl.model.attributes.autobackup_max_files" placeholder="7" class="input--smallNumber"></div></div></div><div ng-show="modelFormCtrl.getVisibility(\'autobackup-enabled\')" class="row"><div class="col--sm3"><label translate="SETTINGS_BACKUP_LABEL_AUTOBACKUP_DAYS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup inlineBlock"><select name="autoBackupDays" id="autoBackupDays" ng-model="modelFormCtrl.modelCopy.attributes.autobackup_days" ng-init="modelFormCtrl.modelCopy.attributes.autobackup_days = modelFormCtrl.modelCopy.attributes.autobackup_days || 0"><option value="0"><span>{{\'SETTINGS_MAINTENANCE_VALUES_DOWNLOAD_SETTINGS_ONLY\' | translate }}</span></option><option value="7"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 7} }}</span></option><option value="30"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 30} }}</span></option><option value="60"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 60} }}</span></option><option value="90"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 90} }}</span></option><option value="180"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 180} }}</span></option><option value="365"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 365} }}</span></option><option value="-1"><span>{{\'SETTINGS_MAINTENANCE_VALUES_DATA_RETENTION_DISABLED\' | translate }}</span></option></select></div></div></div></ng-form></div><div ng-show="backupSettingsCtrl.getCollection().models.length &gt; 0" class="unifiSettingsSection"><div translate="SETTINGS_BACKUP_LABEL_AVAILABLE_FILES" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><unifi-backup-list unifi-backup-list-is-dark="backupSettingsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-backup-list-is-download-available="true" unifi-backup-list-is-delete-available="true"></unifi-backup-list></div></fieldset><div unifi-if-role-admin ng-class="{\'appFormFooter--dark\': backupSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-click="backupSettingsCtrl.showValidation = true" busy-toggle="backupSettingsCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button><button type="button" ng-click="backupSettingsCtrl.reset()" ng-disabled="backupSettingsCtrl.form.$pristine" ng-class="backupSettingsCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--transparentDark\' :                 \'appMainButton--transparent\'              " class="appMainButton">{{\'COMMON_ACTIONS_RESET\' | translate}}</button></div></div></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1400:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="cloudAccessSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="cloudAccessSettingsCtrl.form" ng-class="{          \'appForm--dark\': cloudAccessSettingsCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': cloudAccessSettingsCtrl.showValidation,          \'is-validation-hidden\': !cloudAccessSettingsCtrl.showValidation        }" ng-submit="cloudAccessSettingsCtrl.form.$valid &amp;&amp; cloudAccessSettingsCtrl.save()" class="appForm appForm--cozy"><fieldset class="appFieldset appFieldset--quiet"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_CLOUD_ACCESS" class="unifiSettingsHeader__title"></div></div><unifi-config-changed unifi-config-changed-on-reset="cloudAccessSettingsCtrl.resolveDivergence()" unifi-config-changed-on-ignore="cloudAccessSettingsCtrl.ignoreDivergence()" unifi-config-changed-is-dark="cloudAccessSettingsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="cloudAccessSettingsCtrl.haveFormsDiverged()"></unifi-config-changed><div class="unifiSettingsSection"><ng-form name="cloudAccessSettingsCtrl.forms.sdn" unifi-model-form="cloudAccessSettingsCtrl.sdn.repository.model"><div ng-if="cloudAccessSettingsCtrl.isActionVisible()" class="row"><div class="col--sm3"><label for="cloudAccessEnable" translate="SETTINGS_CLOUD_ACCESS_LABEL_ENABLE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" ng-class="{                        \'appToggle--dark\': cloudAccessSettingsCtrl.preferences.model.get(\'isSettingsDark\'),                        \'is-toggle-disabled\': cloudAccessSettingsCtrl.isSubmitting || cloudAccessSettingsCtrl.isConnecting()                      }" class="toggle appToggle"><input type="checkbox" name="cloudAccessEnable" id="cloudAccessEnable" ng-model="modelFormCtrl.modelCopy.attributes.enabled" ng-model-master="modelFormCtrl.model.attributes.enabled" ng-change="cloudAccessSettingsCtrl.onCloudAccessEnabledChange()" ng-disabled="cloudAccessSettingsCtrl.isSubmitting || cloudAccessSettingsCtrl.isConnecting()"><label for="cloudAccessEnable"></label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_CLOUD_ACCESS_LABEL_STATUS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><unifi-sdn-status></unifi-sdn-status></div></div></div><div ng-if="cloudAccessSettingsCtrl.isUsernameVisible()" class="row"><div class="col--sm3"><label translate="SETTINGS_CLOUD_ACCESS_LABEL_CONFIGURED_FOR" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><label>{{cloudAccessSettingsCtrl.account.getSsoUsername()}}</label></div></div></div><div ng-if="cloudAccessSettingsCtrl.isUnregisterVisible()" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><button type="button" ng-click="cloudAccessSettingsCtrl.unregisterSuperAdmin()" busy-toggle="cloudAccessSettingsCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy unregisterSuperAdmin">{{\'SETTINGS_CLOUD_ACCESS_ACTIONS_DISABLE_REMOVE\' | translate}}</button></div></div></div><div ng-if="cloudAccessSettingsCtrl.isUnregisterUserVisible()" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><button type="button" ng-click="cloudAccessSettingsCtrl.unregisterUser()" busy-toggle="cloudAccessSettingsCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy unregisterUser">{{\'SETTINGS_CLOUD_ACCESS_ACTIONS_DISABLE_REMOVE_USER\' | translate}}</button></div></div></div><div ng-if="cloudAccessSettingsCtrl.isRegisterUserVisible()" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><button type="button" ng-click="cloudAccessSettingsCtrl.registerUser()" busy-toggle="cloudAccessSettingsCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy registerUser">{{\'SETTINGS_CLOUD_ACCESS_ACTIONS_ENABLE_USER\' | translate}}</button></div></div></div></ng-form></div></fieldset><div ng-if="cloudAccessSettingsCtrl.isActionVisible()" ng-class="{\'appFormFooter--dark\': cloudAccessSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-click="cloudAccessSettingsCtrl.showValidation = true" busy-toggle="cloudAccessSettingsCtrl.isSubmitting || cloudAccessSettingsCtrl.isConnecting()" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button><button type="button" ng-click="cloudAccessSettingsCtrl.reset()" ng-disabled="cloudAccessSettingsCtrl.form.$pristine" ng-class="cloudAccessSettingsCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--transparentDark\' :                 \'appMainButton--transparent\'              " class="appMainButton">{{\'COMMON_ACTIONS_RESET\' | translate}}</button></div></div></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1401:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="controllerSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="controllerSettingsCtrl.form" ng-class="{          \'appForm--dark\': controllerSettingsCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': controllerSettingsCtrl.showValidation,          \'is-validation-hidden\': !controllerSettingsCtrl.showValidation        }" ng-submit="controllerSettingsCtrl.form.$valid &amp;&amp; controllerSettingsCtrl.save()" class="appForm appForm--cozy"><fieldset ng-disabled="!controllerSettingsCtrl.isAdmin()" class="appFieldset appFieldset--quiet"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_CONTROLLER" class="unifiSettingsHeader__title"></div></div><unifi-config-changed unifi-config-changed-on-reset="controllerSettingsCtrl.resolveDivergence()" unifi-config-changed-on-ignore="controllerSettingsCtrl.ignoreDivergence()" unifi-config-changed-is-dark="controllerSettingsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="controllerSettingsCtrl.haveFormsDiverged()"></unifi-config-changed><div class="unifiSettingsSection"><div translate="SETTINGS_CONTROLLER_SECTION_CONTROLLER_VERSION" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_CONTROLLER_UI_VERSION" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy">{{\'VERSION\' | constant}}</div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_CONTROLLER_BACKEND_VERSION" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy">{{controllerSettingsCtrl.system.repository.model.get(\'version\')}}</div></div><div ng-if="controllerSettingsCtrl.system.repository.model.get(\'build\')" class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_CONTROLLER_BUILD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy">{{controllerSettingsCtrl.system.repository.model.get(\'build\')}}</div></div><div ng-if="controllerSettingsCtrl.system.isDemoMode()" class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_CONTROLLER_PLATFORM" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><span translate="SETTINGS_CONTROLLER_LABEL_UNIFI_ELITE_TEASER" translate-values="{version: controllerSettingsCtrl.EASTER_EGGS.ELITE_TEASER_VERSION}"></span></div></div></div><div unifi-if-role-super-admin class="unifiSettingsSection"><div translate="SETTINGS_CONTROLLER_SECTION_CONTROLLER" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><ng-form name="controllerSettingsCtrl.forms.super_identity" unifi-model-form="controllerSettingsCtrl.getSettingFromKey(\'super_identity\', null, true)"><div unifi-feature-flag-enable="withHostnameSetting" class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_CONTROLLER_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="controllerHostname" ng-model="modelFormCtrl.modelCopy.attributes.name" ng-model-master="modelFormCtrl.model.attributes.name" class="input--full"></div></div><div unifi-feature-flag-disable="withHostnameSetting" class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_CONTROLLER_HOSTNAME" class="appLabel--primary appLabel--boxAlign"></label></div><div ng-if="controllerSettingsCtrl.system.isUnifiGo()" class="col--sm5 appFormGroup appFormGroup--cozy">{{modelFormCtrl.model.attributes.name}}</div><div ng-if="!controllerSettingsCtrl.system.isUnifiGo()" class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="controllerHostname" ng-model="modelFormCtrl.modelCopy.attributes.name" ng-model-master="modelFormCtrl.model.attributes.name" unifi-validate-patterns="[                      controllerSettingsCtrl.patterns.hostname,                      controllerSettingsCtrl.patterns.ipAddress                    ]" class="input--full"><div ng-if="modelFormCtrl.form.controllerHostname.$invalid" translate="VALIDATION_HINT_HOSTNAME_OR_IP" class="appInputFeedback appInputFeedback--danger"></div></div></div><div unifi-feature-flag-enable="withHostnameSetting" class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_CONTROLLER_HOSTNAME" class="appLabel--primary appLabel--boxAlign"></label></div><div ng-if="controllerSettingsCtrl.system.isUnifiGo()" class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy">{{modelFormCtrl.model.attributes.hostname}}</div></div><div ng-if="!controllerSettingsCtrl.system.isUnifiGo()" class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="controllerHostname" ng-model="modelFormCtrl.modelCopy.attributes.hostname" ng-model-master="modelFormCtrl.model.attributes.hostname" unifi-validate-patterns="[                      controllerSettingsCtrl.patterns.hostname,                      controllerSettingsCtrl.patterns.ipAddress                    ]" class="input--full"><div ng-if="modelFormCtrl.form.controllerHostname.$invalid" translate="VALIDATION_HINT_HOSTNAME_OR_IP" class="appInputFeedback appInputFeedback--danger"></div></div></div></ng-form><ng-form name="controllerSettingsCtrl.forms.super_mgmt1" unifi-model-form="controllerSettingsCtrl.getSettingFromKey(\'super_mgmt\', null, true)"><div ng-if="!controllerSettingsCtrl.system.isUnifiGo()" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="controllerOverrideInformHost" id="controllerOverrideInformHost" ng-model="modelFormCtrl.modelCopy.attributes.override_inform_host" ng-model-master="modelFormCtrl.model.attributes.override_inform_host" ng-change="controllerSettingsCtrl.confirmOverrideInformHost()"><label for="controllerOverrideInformHost" translate="SETTINGS_CONTROLLER_VALUES_OVERRIDE_INFORM_HOST"></label></div></div></div><div ng-if="!controllerSettingsCtrl.system.isUnifiGo()" class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_NETWORK_DISCOVERY" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="controllerEnableNetworkDiscovery" id="controllerEnableNetworkDiscovery" ng-model="modelFormCtrl.modelCopy.attributes.discoverable" ng-model-master="modelFormCtrl.model.attributes.discoverable"><label for="controllerEnableNetworkDiscovery" translate="SETTINGS_CONTROLLER_VALUES_NETWORK_DISCOVERY"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_SUPPORT_MESSAGING" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="controllerSupportMessaging" id="controllerSupportMessaging" ng-model="modelFormCtrl.modelCopy.attributes.live_chat" ng-init="modelFormCtrl.modelCopy.attributes.live_chat = controllerSettingsCtrl.chatOptions[0].id" ng-options="chat.id as chat.translationKey | translate for chat in controllerSettingsCtrl.chatOptions"></select></div></div></div></ng-form></div><div unifi-if-role-super-admin unifi-if-role-super-admin-and="!controllerSettingsCtrl.system.isUnifiGo()" class="unifiSettingsSection"><div translate="SETTINGS_CONTROLLER_SECTION_MAPS" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><ng-form name="controllerSettingsCtrl.forms.super_mgmt2" unifi-model-form="controllerSettingsCtrl.getSettingFromKey(\'super_mgmt\', null, true)"><div class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_GOOGLE_MAPS_API_KEY" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="text" name="controllerGoogleMapsApiKey" ng-model="modelFormCtrl.modelCopy.attributes.google_maps_api_key" ng-model-master="modelFormCtrl.model.attributes.google_maps_api_key" class="input--full"><div ng-class="{\'appInfoBox--dark\': controllerSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTopHalf"><div class="appInfoBox__icon icon ubnt-icon--eye2"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_CONTROLLER_LABEL_GOOGLE_MAPS_API_KEY_PROMPT" translate-values="{helpLink: \'https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key\'}" class="noMarginBottom"></p></div></div></div></div></div></div><div class="row"><div class="col--sm5 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="controllerAlwaysUseGoogleMapsEngine" id="controllerAlwaysUseGoogleMapsEngine" ng-model="modelFormCtrl.modelCopy.attributes.image_maps_use_google_engine" ng-model-master="modelFormCtrl.model.attributes.image_maps_use_google_engine"><label for="controllerAlwaysUseGoogleMapsEngine" translate="SETTINGS_CONTROLLER_VALUES_IMAGE_MAPS_USE_GOOGLE_ENGINE"></label></div></div></div></div></ng-form></div><div unifi-if-role-super-admin unifi-if-role-super-admin-and="!controllerSettingsCtrl.system.isUnifiGo()" class="unifiSettingsSection"><div translate="SETTINGS_CONTROLLER_SECTION_MAIL_SERVER" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><ng-form name="controllerSettingsCtrl.forms.super_smtp" unifi-model-form="controllerSettingsCtrl.getSettingFromKey(\'super_smtp\', null, true)"><div class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_SMTP_SERVER" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="controllerEnableSmtpServer" id="controllerEnableSmtpServer" ng-model="modelFormCtrl.modelCopy.attributes.enabled" ng-model-master="modelFormCtrl.model.attributes.enabled"><label for="controllerEnableSmtpServer" translate="SETTINGS_CONTROLLER_VALUES_ENABLE_SMTP_SERVER"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="controllerSmtpServerHostname" translate="SETTINGS_CONTROLLER_LABEL_SMTP_HOSTNAME" ng-class="{\'is-label-disabled\': !modelFormCtrl.modelCopy.attributes.enabled}"></label><input type="text" name="controllerSmtpHost" id="controllerSmtpHost" ng-model="modelFormCtrl.modelCopy.attributes.host" ng-model-master="modelFormCtrl.model.attributes.host" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" ng-required="modelFormCtrl.modelCopy.attributes.enabled"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="controllerSmtpPort" translate="SETTINGS_CONTROLLER_LABEL_SMTP_PORT" ng-class="{\'is-label-disabled\': !modelFormCtrl.modelCopy.attributes.enabled}"></label><input type="text" name="controllerSmtpPort" id="controllerSmtpPort" size="5" placeholder="{{modelFormCtrl.modelCopy.attributes.use_ssl ? 465 : 25}}" ng-model="modelFormCtrl.modelCopy.attributes.port" ng-model-master="modelFormCtrl.model.attributes.port" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" ng-required="modelFormCtrl.modelCopy.attributes.enabled" ng-pattern="controllerSettingsCtrl.patterns.portNumber"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="controllerEnableSmtpSsl" id="controllerEnableSmtpSsl" ng-model="modelFormCtrl.modelCopy.attributes.use_ssl" ng-model-master="modelFormCtrl.model.attributes.use_ssl" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled"><label for="controllerEnableSmtpSsl" translate="SETTINGS_CONTROLLER_VALUES_ENABLE_SSL" ng-class="{\'is-label-disabled\': !modelFormCtrl.modelCopy.attributes.enabled || !modelFormCtrl.model.attributes.use_ssl}"></label></div></div></div></div><div ng-if="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="controllerEnableSmtpAuth" id="controllerEnableSmtpAuth" ng-model="modelFormCtrl.modelCopy.attributes.use_auth" ng-model-master="modelFormCtrl.model.attributes.use_auth" ng-model-master-cleanup="true"><label for="controllerEnableSmtpAuth" translate="SETTINGS_CONTROLLER_VALUES_ENABLE_AUTHENTICATION"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="controllerSmtpUsername" translate="SETTINGS_CONTROLLER_LABEL_SMTP_USERNAME" ng-class="{\'is-label-disabled\': !modelFormCtrl.modelCopy.attributes.use_auth}"></label><input type="text" name="controllerSmtpUsername" id="controllerSmtpUsername" ng-model="modelFormCtrl.modelCopy.attributes.username" ng-model-master="modelFormCtrl.model.attributes.username" ng-model-master-cleanup="true" ng-disabled="!modelFormCtrl.modelCopy.attributes.use_auth" ng-required="modelFormCtrl.modelCopy.attributes.use_auth"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="controllerSmtpPassword" translate="SETTINGS_CONTROLLER_LABEL_SMTP_PASSWORD" ng-class="{\'is-label-disabled\': !modelFormCtrl.modelCopy.attributes.use_auth}"></label><input type="password" name="controllerSmtpPassword" id="controllerSmtpPassword" ng-model="modelFormCtrl.modelCopy.attributes.x_password" ng-model-master="modelFormCtrl.model.attributes.x_password" ng-model-master-cleanup="true" ng-disabled="!modelFormCtrl.modelCopy.attributes.use_auth" ng-required="modelFormCtrl.modelCopy.attributes.use_auth" unifi-password-reveal></div></div></div></div><div ng-if="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="controllerEnableSmtpSender" id="controllerEnableSmtpSender" ng-model="modelFormCtrl.modelCopy.attributes.use_sender" ng-model-master="modelFormCtrl.model.attributes.use_sender" ng-model-master-cleanup="true"><label for="controllerEnableSmtpSender" translate="SETTINGS_CONTROLLER_VALUES_SPECIFY_SENDER"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="email" name="controllerSmtpSender" id="controllerSmtpSender" ng-model="modelFormCtrl.modelCopy.attributes.sender" ng-model-master="modelFormCtrl.model.attributes.sender" ng-model-master-cleanup="true" ng-model-options="{ allowInvalid: true }" ng-disabled="!modelFormCtrl.modelCopy.attributes.use_sender" ng-required="modelFormCtrl.modelCopy.attributes.use_sender"></div></div></div></div><div ng-if="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm3"><label translate="SETTINGS_CONTROLLER_LABEL_TEST_SMTP_SERVER" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><label for="controllerSmtpTestEmail" translate="SETTINGS_CONTROLLER_VALUES_SEND_TEST_EMAIL_TO"></label><input type="email" name="controllerSmtpTestEmail" id="controllerSmtpTestEmail" ng-model="modelFormCtrl.testEmail"><button type="button" ng-disabled="!modelFormCtrl.testEmail" ng-click="controllerSettingsCtrl.sendTestEmail(modelFormCtrl.testEmail)" busy-toggle="controllerSettingsCtrl.isSendingTestEmail" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy sendTestEmail">{{\'COMMON_ACTIONS_SEND\' | translate}}</button></div></div></div></ng-form></div></fieldset><div unifi-if-role-super-admin ng-class="{\'appFormFooter--dark\': controllerSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-click="controllerSettingsCtrl.showValidation = true" busy-toggle="controllerSettingsCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button><button type="button" ng-click="controllerSettingsCtrl.reset()" ng-disabled="controllerSettingsCtrl.form.$pristine" ng-class="controllerSettingsCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--transparentDark\' :                 \'appMainButton--transparent\'              " class="appMainButton">{{\'COMMON_ACTIONS_RESET\' | translate}}</button></div></div></form></div></div></div>'),
b.join("")}},{"jade/runtime":232}],1402:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="dpiSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="dpiSettingsCtrl.form" ng-class="{          \'appForm--dark\': dpiSettingsCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': dpiSettingsCtrl.showValidation,          \'is-validation-hidden\': !dpiSettingsCtrl.showValidation        }" ng-submit="dpiSettingsCtrl.form.$valid &amp;&amp; dpiSettingsCtrl.save()" class="appForm appForm--cozy"><fieldset ng-disabled="!dpiSettingsCtrl.isAdmin()" class="appFieldset appFieldset--quiet"><div class="unifiSettingsHeader"><div translate="SETTINGS_DPI_TITLE" class="unifiSettingsHeader__title"></div></div><unifi-config-changed unifi-config-changed-on-reset="dpiSettingsCtrl.resolveDivergence()" unifi-config-changed-on-ignore="dpiSettingsCtrl.ignoreDivergence()" unifi-config-changed-is-dark="dpiSettingsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="dpiSettingsCtrl.haveFormsDiverged()"></unifi-config-changed><div class="unifiSettingsSection"><ng-form name="dpiSettingsCtrl.forms.config" unifi-model-form="dpiSettingsCtrl.getSettingFromKey(\'dpi\', { enabled: false })"><div class="row"><div class="col--sm3"><label for="dpiEnable" translate="SETTINGS_DPI_VALUES_DPI" class="appLabel--primary"></label><span unifi-notify-device-requirement="ugw" unifi-notify-device-requirement-is-dark="dpiSettingsCtrl.preferences.model.get(\'isSettingsDark\')"></span></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" ng-class="{                        \'appToggle--dark\': dpiSettingsCtrl.preferences.model.get(\'isSettingsDark\'),                      }" class="toggle appToggle"><input type="checkbox" name="siteEnableDpi" id="siteEnableDpi" ng-model="modelFormCtrl.modelCopy.attributes.enabled" ng-model-master="modelFormCtrl.model.attributes.enabled"><label for="siteEnableDpi"></label></div></div></div></div><div class="row"><div class="col--sm3"></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div unifi-if-role-admin unifi-if-role-admin-and="modelFormCtrl.model.attributes.enabled || modelFormCtrl.modelCopy.attributes.enabled" class="appInputGroup"><button type="button" ng-click="dpiSettingsCtrl.clearDpiCounters()" busy-toggle="dpiSettingsCtrl.isClearingDpiCounters" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy">{{\'SETTINGS_DPI_ACTIONS_CLEAR_DPI_COUNTERS\' | translate}}</button></div></div></div></ng-form></div><div unifi-if-role-admin ng-class="{\'appFormFooter--dark\': dpiSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--flush appFormFooter--standalone"><div class="appFormFooter__left"><button ng-click="dpiSettingsCtrl.showValidation = true" busy-toggle="dpiSettingsCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button><button type="button" ng-click="dpiSettingsCtrl.reset()" ng-disabled="dpiSettingsCtrl.form.$pristine" ng-class="dpiSettingsCtrl.preferences.model.get(\'isSettingsDark\') ?                   \'appMainButton--transparentDark\' :                   \'appMainButton--transparent\'                " class="appMainButton">{{\'COMMON_ACTIONS_RESET\' | translate}}</button></div></div></fieldset></form></div></div><div unifi-feature-flag-enable="enableDpiBlocking" class="row row--comfy"><div class="col--xs12"><div class="unifiSettingsSection"><div ng-class="{            \'appSubHeading--dark\': dpiSettingsCtrl.preferences.model.get(\'isSettingsDark\')          }" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"><span translate="SETTINGS_DPI_SECTION_RESTRICTION_GROUPS"></span><a ng-click="dpiSettingsCtrl.createRestrictionGroup()" class="appMainButton appMainButton--tertiary appMainButton--condensed floatRight"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_DPI_ACTIONS_CREATE_RESTRICTION_GROUP"></span></a></div><div class="container container--comfy"><unifi-dpi-restriction-group ng-repeat="model in dpiSettingsCtrl.restrictionGroupsView.getModels() track by model.id" unifi-dpi-restriction-group-model="model"></unifi-dpi-restriction-group></div></div></div><div class="col--xs12"><div class="unifiSettingsSection verticalRhythmTop"><div ng-class="{            \'appSubHeading--dark\': dpiSettingsCtrl.preferences.model.get(\'isSettingsDark\')          }" translate="SETTINGS_DPI_SECTION_RESTRICTION_ASSIGNMENTS" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="container container--comfy"><unifi-dpi-restriction-assignments></unifi-dpi-restriction-assignments></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1403:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="firewallSettings" class="container container--comfy container--fixed"><div ng-if="!firewallCtrl.isRulesetDefined()" class="row"><div class="col--xs12"><unifi-settings-security-gateway-is-required unifi-settings-security-gateway-is-required-feature="{{\'SETTINGS_COMMON_GATEWAY_REQUIRED_MESSAGE_FIREWALL_FEATURE\' | translate}}"></unifi-settings-security-gateway-is-required></div></div><div ng-if="firewallCtrl.isRulesetDefined()"><unifi-settings-sub-menu-routing-and-firewall></unifi-settings-sub-menu-routing-and-firewall><div class="row row--comfy"><div class="col--xs12"><ul ng-class="{\'appSubtabs--dark unifiFirewallSettingsSubtabs--dark\': firewallCtrl.preferences.model.get(\'isSettingsDark\')}" class="appSubtabs noBorderTop noBackground"><li ui-sref="{{firewallCtrl.RULES_STATE}}" ng-class="{\'is-tab-selected\': firewallCtrl.isRulesState() }" translate="SETTINGS_ROUTING_TAB_FIREWALL_RULES" class="tabs__item noPaddingTop"></li><li ui-sref="{{firewallCtrl.GROUPS_STATE}}" ng-class="{\'is-tab-selected\': firewallCtrl.isGroupsState() }" translate="SETTINGS_ROUTING_TAB_FIREWALL_GROUPS" class="tabs__item noPaddingTop"></li></ul></div></div><ui-view></ui-view></div></div>'),b.join("")}},{"jade/runtime":232}],1404:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="firewallGroupsSettings" class="row row--comfy"><div class="col--xs12"><div ng-switch="firewallGroupsCtrl.view"><div ng-switch-when="form"><div unifi-firewall-groups-form="firewallGroupsCtrl.model" unifi-firewall-groups-form-is-dark="firewallGroupsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-firewall-groups-form-on-save="firewallGroupsCtrl.list()" unifi-firewall-groups-form-on-cancel="firewallGroupsCtrl.list()" unifi-firewall-groups-form-is-read-only="!firewallGroupsCtrl.isAdmin()"></div></div><div ng-switch-when="list"><unifi-firewall-groups-list unifi-firewall-groups-list-on-edit="firewallGroupsCtrl.edit(model)"></unifi-firewall-groups-list><div unifi-if-role-admin class="unifiSettingsFooter"><button ng-click="firewallGroupsCtrl.add()" ng-class="firewallGroupsCtrl.preferences.model.get(\'isSettingsDark\') ? \'appMainButton--inputDark\' : \'appMainButton--input\'" class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_FIREWALL_GROUPS_BUTTON_ADD"></span></button></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1405:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="firewallRulesSettings" class="row row--comfy"><div class="col--xs12"><div ng-switch="firewallRulesCtrl.view"><div ng-switch-when="form"><div unifi-firewall-rules-form="firewallRulesCtrl.model" unifi-firewall-rules-form-on-save="firewallRulesCtrl.list()" unifi-firewall-rules-form-on-cancel="firewallRulesCtrl.list()" unifi-firewall-rules-form-is-read-only="!firewallRulesCtrl.isAdmin()"></div></div><div ng-switch-when="list"><unifi-firewall-rules-list unifi-firewall-rules-list-on-edit="firewallRulesCtrl.edit(model)" unifi-firewall-rules-list-on-add="firewallRulesCtrl.add()"></unifi-firewall-rules-list></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1406:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="guestControlSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="guestControlSettingsCtrl.form" ng-class="{          \'appForm--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': guestControlSettingsCtrl.showValidation,          \'is-validation-hidden\': !guestControlSettingsCtrl.showValidation        }" ng-submit="guestControlSettingsCtrl.form.$valid &amp;&amp; guestControlSettingsCtrl.save()" class="appForm appForm--cozy"><fieldset ng-disabled="!guestControlSettingsCtrl.isAdmin()" class="appFieldset appFieldset--quiet"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_GUEST_CONTROL" class="unifiSettingsHeader__title"></div></div><unifi-config-changed unifi-config-changed-on-reset="guestControlSettingsCtrl.resolveDivergence()" unifi-config-changed-on-ignore="guestControlSettingsCtrl.ignoreDivergence()" unifi-config-changed-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="guestControlSettingsCtrl.haveFormsDiverged()"></unifi-config-changed><ng-form name="guestControlSettingsCtrl.forms.guest_access" unifi-model-form="guestControlSettingsCtrl.getSettingFromKey(\'guest_access\', { auth: \'none\', expire: 480, redirect_enabled: false, redirect_url: \'\', template_engine: \'jsp\' })"><div class="unifiSettingsSection"><div translate="SETTINGS_GUEST_CONTROL_SECTION_GUEST_POLICIES" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_ENABLED" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--condensed"><div class="appInputGroup appInputGroup--comfy"><input type="checkbox" name="guestControlEnable" id="guestControlEnable" ng-model="modelFormCtrl.modelCopy.attributes.portal_enabled" ng-model-master="modelFormCtrl.model.attributes.portal_enabled"></div></div></div><fieldset ng-show="modelFormCtrl.setVisibility(\'portal-enabled\', modelFormCtrl.modelCopy.attributes.portal_enabled)" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_AUTHENTICATION" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlAuth" id="guestControlAuthNone" value="none" ng-model="modelFormCtrl.modelCopy.attributes.auth" ng-model-master="modelFormCtrl.model.attributes.auth"><label for="guestControlAuthNone" translate="SETTINGS_GUEST_CONTROL_VALUES_AUTH_NO_AUTHENTICATION"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlAuth" id="guestControlAuthPassword" value="password" ng-model="modelFormCtrl.modelCopy.attributes.auth" ng-model-master="modelFormCtrl.model.attributes.auth"><label for="guestControlAuthPassword" translate="SETTINGS_GUEST_CONTROL_VALUES_AUTH_SIMPLE_PASSWORD"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlAuth" id="guestControlAuthHotspot" value="hotspot" ng-model="modelFormCtrl.modelCopy.attributes.auth" ng-model-master="modelFormCtrl.model.attributes.auth"><label for="guestControlAuthHotspot" translate="SETTINGS_GUEST_CONTROL_VALUES_AUTH_HOTSPOT"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlAuth" id="guestControlAuthCustom" value="custom" ng-model="modelFormCtrl.modelCopy.attributes.auth" ng-model-master="modelFormCtrl.model.attributes.auth"><label for="guestControlAuthCustom" translate="SETTINGS_GUEST_CONTROL_VALUES_AUTH_EXTERNAL_PORTAL_SERVER"></label></div></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'password\', modelFormCtrl.modelCopy.attributes.auth === \'password\')" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GUEST_PASSWORD" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="password" name="guestControlPassword" ng-model="modelFormCtrl.modelCopy.attributes.x_password" ng-model-master="modelFormCtrl.model.attributes.x_password" ng-required="modelFormCtrl.getVisibility([\'portal-enabled\', \'password\'])" unifi-password-reveal class="input--full"></div></div><div ng-show="modelFormCtrl.setVisibility(\'expiration\', [\'none\', \'password\'].indexOf(modelFormCtrl.modelCopy.attributes.auth) !== -1)" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_EXPIRATION" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><select name="guestControlExpiration" ng-model="modelFormCtrl.modelCopy.attributes.expire" ng-model-master="modelFormCtrl.model.attributes.expire" ng-required="modelFormCtrl.getVisibility([\'portal-enabled\', \'expiration\'])"><option unifi-option-placeholder></option><option value="480"><span>{{\'DATETIME_HOURS_FULL_PARAMETERIZED\' | translate:{hours: 8} }}</span></option><option value="1440"><span>{{\'DATETIME_HOURS_FULL_PARAMETERIZED\' | translate:{hours: 24} }}</span></option><option value="2880"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 2} }}</span></option><option value="4320"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 3} }}</span></option><option value="5760"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 4} }}</span></option><option value="10080"><span>{{\'DATETIME_DAYS_FULL_PARAMETERIZED\' | translate:{days: 7} }}</span></option><option value="custom"><span>{{\'COMMON_LABEL_CUSTOM\' | translate}}</span></option></select></div><div ng-if="modelFormCtrl.modelCopy.attributes.expire === \'custom\'" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="number" name="guestControlCustomExpireNum" min="1" max="1000000" ng-model="modelFormCtrl.modelCopy.attributes.expire_number" ng-model-master="modelFormCtrl.model.attributes.expire_number" ng-model-master-cleanup="true" ng-required="modelFormCtrl.getVisibility([\'portal-enabled\', \'expiration\']) &amp;&amp; modelFormCtrl.modelCopy.attributes.expire === \'custom\'" unifi-string-to-integer-input class="input--smallNumber"><select name="guestControlCustomExpireUnit" ng-model="modelFormCtrl.modelCopy.attributes.expire_unit" ng-model-master="modelFormCtrl.model.attributes.expire_unit" ng-model-master-cleanup="true" ng-required="modelFormCtrl.getVisibility([\'portal-enabled\', \'expiration\']) &amp;&amp; modelFormCtrl.modelCopy.attributes.expire === \'custom\'"><option unifi-option-placeholder></option><option value="1"><span>{{\'DATETIME_MINUTES_FULL\' | translate}}</span></option><option value="60"><span>{{\'DATETIME_HOURS_FULL\' | translate}}</span></option><option value="1440"><span>{{\'DATETIME_DAYS_FULL\' | translate}}</span></option></select></div></div><div ng-if="modelFormCtrl.form.guestControlCustomExpireNum.$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: 1, max: 1000000}" class="appInputFeedback appInputFeedback--danger"></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'landing-page\', [\'none\', \'password\', \'hotspot\'].indexOf(modelFormCtrl.modelCopy.attributes.auth) !== -1)" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_LANDING_PAGE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--condensed"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlRedirect" id="guestControlRedirectFalse" ng-value="false" ng-model="modelFormCtrl.modelCopy.attributes.redirect_enabled" ng-model-master="modelFormCtrl.model.attributes.redirect_enabled"><label for="guestControlRedirectFalse" translate="SETTINGS_GUEST_CONTROL_VALUES_LANDING_ORIGINAL_URL"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlRedirect" id="guestControlRedirectTrue" ng-value="true" ng-model="modelFormCtrl.modelCopy.attributes.redirect_enabled" ng-model-master="modelFormCtrl.model.attributes.redirect_enabled"><label for="guestControlRedirectTrue" translate="SETTINGS_GUEST_CONTROL_VALUES_LANDING_PROMOTIONAL_URL"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" name="guestControlRedirectUrl" ng-model="modelFormCtrl.modelCopy.attributes.redirect_url" ng-model-master="modelFormCtrl.model.attributes.redirect_url" ng-disabled="!modelFormCtrl.modelCopy.attributes.redirect_enabled" ng-required="modelFormCtrl.getVisibility([\'portal-enabled\', \'landing-page\']) &amp;&amp; modelFormCtrl.modelCopy.attributes.redirect_enabled" placeholder="http://"></div></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'custom-portal-ip\', modelFormCtrl.modelCopy.attributes.auth === \'custom\')" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_CUSTOM_PORTAL" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><label for="guestControlPortalIpAddress" translate="SETTINGS_GUEST_CONTROL_VALUES_IP_ADDRESS" class="appLabel--boxInline"></label><input type="text" id="guestControlPortalIpAddress" name="guestControlPortalIpAddress" ng-model="modelFormCtrl.modelCopy.attributes.custom_ip" ng-model-master="modelFormCtrl.model.attributes.custom_ip" ng-required="modelFormCtrl.getVisibility([\'portal-enabled\', \'custom-portal-ip\'])" ng-pattern="guestControlSettingsCtrl.patterns.ipAddress"></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_REDIRECTION" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div unifi-feature-flag-enable="enablePortalHttpsRedirect" class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="guestControlPortalToHttps" id="guestControlPortalToHttps" ng-model="modelFormCtrl.modelCopy.attributes.redirect_to_https" ng-model-master="modelFormCtrl.model.attributes.redirect_to_https"><label for="guestControlPortalToHttps" translate="SETTINGS_GUEST_CONTROL_VALUES_REDIRECT_TO_HTTPS"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><span translate="SETTINGS_GUEST_CONTROL_TOOLTIP_REDIRECT_TO_HTTPS"></span></div></div></div></div><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlPortalUseHostname" id="guestControlPortalUseHostname" ng-model="modelFormCtrl.modelCopy.attributes.portal_use_hostname" ng-model-master="modelFormCtrl.model.attributes.portal_use_hostname" ng-required="modelFormCtrl.getVisibility([\'portal-enabled\', \'hotspot\', \'new-angular-engine\']) &amp;&amp; guestControlSettingsCtrl.isAnySocialAuthenticationMethodEnabled()"><label for="guestControlPortalUseHostname" translate="SETTINGS_GUEST_CONTROL_VALUES_REDIRECT_USING_HOSTNAME"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><div class="appIconInput appIconInput--left"><div ng-show="!modelFormCtrl.modelCopy.attributes.redirect_to_https" class="appIconInput__icon">http://</div><div ng-show="modelFormCtrl.modelCopy.attributes.redirect_to_https" class="appIconInput__icon">https://</div><input type="text" name="guestControlPortalHostname" ng-model="modelFormCtrl.modelCopy.attributes.portal_hostname" ng-model-master="modelFormCtrl.model.attributes.portal_hostname" ng-disabled="!modelFormCtrl.modelCopy.attributes.portal_use_hostname" ng-required="modelFormCtrl.getVisibility([\'portal-enabled\']) &amp;&amp; modelFormCtrl.modelCopy.attributes.portal_use_hostname" style="padding-left: {{modelFormCtrl.modelCopy.attributes.redirect_to_https ? 41 : 36}}px"></div></div></div><div unifi-feature-flag-enable="enablePortalHttpsRedirect" class="appInputGroup"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="guestControlPortalHttps" id="guestControlPortalHttps" ng-model="modelFormCtrl.modelCopy.attributes.redirect_https" ng-model-master="modelFormCtrl.model.attributes.redirect_https"><label for="guestControlPortalHttps" translate="SETTINGS_GUEST_CONTROL_VALUES_REDIRECT_HTTPS"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><span translate="SETTINGS_GUEST_CONTROL_TOOLTIP_REDIRECT_HTTPS"></span></div></div></div></div></div></div></fieldset></div><div ng-show="modelFormCtrl.getVisibility(\'portal-enabled\') &amp;&amp; modelFormCtrl.setVisibility(\'portal-customization\', [\'none\', \'password\', \'hotspot\'].indexOf(modelFormCtrl.modelCopy.attributes.auth) !== -1)" class="unifiSettingsSection"><div class="appSubHeading appSubHeading--comfy appSubHeading--standalone"><span translate="SETTINGS_GUEST_CONTROL_SECTION_PORTAL_CUSTOMIZATION"></span></div><fieldset class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_TEMPLATE_ENGINE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlTemplateEngine" id="guestControlTemplateEngineAngular" value="angular" ng-model="modelFormCtrl.modelCopy.attributes.template_engine" ng-model-master="modelFormCtrl.model.attributes.template_engine"><label for="guestControlTemplateEngineAngular" translate="SETTINGS_GUEST_CONTROL_VALUES_TEMPLATE_ENGINE_ANGULAR"></label><span translate="COMMON_NEW_FEATURE" class="appBadge appBadge--success"></span></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlTemplateEngine" id="guestControlTemplateEngineJSP" value="jsp" ng-checked="!modelFormCtrl.modelCopy.attributes.template_engine || modelFormCtrl.modelCopy.attributes.template_engine === \'jsp\'" ng-model="modelFormCtrl.modelCopy.attributes.template_engine" ng-model-master="modelFormCtrl.model.attributes.template_engine"><label for="guestControlTemplateEngineJSP" translate="SETTINGS_GUEST_CONTROL_VALUES_TEMPLATE_ENGINE_JSP"></label></div></div></div></div><div class="row"><div class="col--sm3"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="SETTINGS_GUEST_CONTROL_LABEL_OVERRIDE_DEFAULT_TEMPLATES" class="appLabel--primary"></label><span translate="COMMON_BETA" ng-show="modelFormCtrl.modelCopy.attributes.template_engine === \'angular\'" class="appBadge appBadge--warning"></span></div></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--comfy"><input type="checkbox" name="guestControlCustomPortal" id="guestControlCustomPortal" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized" ng-model-master="modelFormCtrl.model.attributes.portal_customized" ng-change="guestControlSettingsCtrl.filterLanguages()"><label for="guestControlCustomPortal" translate="SETTINGS_GUEST_CONTROL_VALUES_OVERRIDE_DEFAULT_TEMPLATES"></label><div ng-init="guestControlSettingsCtrl.visibleOverrideDefaultTemplatesPrompt = false" ng-click="guestControlSettingsCtrl.visibleOverrideDefaultTemplatesPrompt = true" on-outside-element-click="guestControlSettingsCtrl.visibleOverrideDefaultTemplatesPrompt = false" class="appTooltipContainer appTooltipContainer--prompt"><div ng-show="guestControlSettingsCtrl.visibleOverrideDefaultTemplatesPrompt" ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_GUEST_CONTROL_PROMPT_OVERRIDE_DEFAULT_TEMPLATES" translate-values="{helpLink: guestControlSettingsCtrl.HOTSPOT_PORTAL_OVERRIDE_TEMPLATE_HELP[modelFormCtrl.modelCopy.attributes.template_engine]}" class="appTooltip"></div></div></div><div ng-if="modelFormCtrl.modelCopy.attributes.template_engine === \'angular\' &amp;&amp; modelFormCtrl.modelCopy.attributes.portal_customized" class="appInputGroup appInputGroup--cozy"><unifi-hotspot-overrides-upgrade></unifi-hotspot-overrides-upgrade></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'new-angular-engine\', modelFormCtrl.modelCopy.attributes.template_engine === \'angular\')" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_PORTAL_CUSTOMIZATION_TITLE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="text" name="guestControlCustomPortalTitle" id="guestControlCustomPortalTitle" ng-maxlength="128" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_title" ng-model-master="modelFormCtrl.model.attributes.portal_customized_title" placeholder="{{ \'SETTINGS_GUEST_CONTROL_PLACEHOLDER_PORTAL_CUSTOMIZATION_TITLE\' | translate }}"></div></div></div><div ng-show="modelFormCtrl.getVisibility(\'new-angular-engine\')" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_WELCOME_TEXT" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlWelcomeText" id="guestControlWelcomeText" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_welcome_text_enabled" ng-model-master="modelFormCtrl.model.attributes.portal_customized_welcome_text_enabled" ng-change="guestControlSettingsCtrl.editWelcomeText(modelFormCtrl.modelCopy)"><label for="guestControlWelcomeText" translate="SETTINGS_GUEST_CONTROL_VALUES_WELCOME_TEXT"></label></div><div ng-show="modelFormCtrl.setVisibility(\'welcome-text\', modelFormCtrl.modelCopy.attributes.portal_customized_welcome_text_enabled)" class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="guestControlSettingsCtrl.editWelcomeText(modelFormCtrl.modelCopy)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button></div></div><div ng-show="modelFormCtrl.getVisibility(\'new-angular-engine\') &amp;&amp; modelFormCtrl.modelCopy.attributes.portal_customized_welcome_text_enabled" class="appInputGroup appInputGroup--cozy"><label for="welcomeTextPosition" translate="SETTINGS_GUEST_CONTROL_LABEL_WELCOME_TEXT_POSITION" class="appLabel appLabel--boxInline"></label><select name="welcomeTextPosition" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_welcome_text_position" ng-model-master="modelFormCtrl.model.attributes.portal_customized_welcome_text_position" ng-options="position.id as position.translationKey | translate for position in guestControlSettingsCtrl.welcomeTextPositionOptions" ng-required="modelFormCtrl.getVisibility([\'welcome-text\'])"><option unifi-option-placeholder></option></select></div></div></div><div ng-show="modelFormCtrl.getVisibility(\'new-angular-engine\')" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_TERMS_OF_SERVICE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlTermsOfService" id="guestControlTermsOfService" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_tos_enabled" ng-model-master="modelFormCtrl.model.attributes.portal_customized_tos_enabled" ng-change="guestControlSettingsCtrl.editTermsOfService(modelFormCtrl.modelCopy)"><label for="guestControlTermsOfService" translate="SETTINGS_GUEST_CONTROL_VALUES_TERMS_OF_SERVICE"></label></div><div ng-show="modelFormCtrl.modelCopy.attributes.portal_customized_tos_enabled" class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="guestControlSettingsCtrl.editTermsOfService(modelFormCtrl.modelCopy)" class="appMainButton appMainButton--tertiary appMainButton--condensed"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT"></span></button></div></div></div></div><div ng-show="modelFormCtrl.getVisibility(\'new-angular-engine\')" class="row"><div class="col--sm3"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="SETTINGS_GUEST_CONTROL_LABEL_LANGUAGES" class="appLabel--primary"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><table id="hotspotLanguages" ng-class="{                          \'appTable--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')                        }" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><th colspan="2" class="unifiSettingsGuestControlTable__languageCode"><span translate="SETTINGS_GUEST_CONTROL_LANGUAGE_OPTIONS_TABLE_HEADER_CODE"></span></th><th><span translate="SETTINGS_GUEST_CONTROL_LANGUAGE_OPTIONS_TABLE_HEADER_LANGUAGE"></span></th><th><span translate="SETTINGS_GUEST_CONTROL_LANGUAGE_OPTIONS_TABLE_HEADER_ACTIONS"></span></th></thead><tbody><tr ng-repeat="languageCode in guestControlSettingsCtrl.getLanguages() | orderBy"><td class="unifiSettingsGuestControlTable__languageCode"><span>{{languageCode}}</span></td><td class="wrappable appTableCell--smash"><div ng-if="!guestControlSettingsCtrl.isBuiltInLanguage(languageCode)" class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><span translate="SETTINGS_GUEST_CONTROL_TOOLTIP_CUSTOM_LANGUAGE" translate-values="{directory: languageCode}"></span></div></div></td><td>{{\'LANGUAGE_\' + languageCode.toUpperCase() | translate}}</td><td class="appTableCell--actions"><button type="button" ng-click="guestControlSettingsCtrl.removeLanguage(languageCode)" title="{{\'COMMON_ACTIONS_DELETE\' | translate}}" ng-disabled="languageCode === \'en\'" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table><div ng-if="guestControlSettingsCtrl.getAvailableLanguages().length &gt; 0" class="appInputGroup appInputGroup--cozy inlineBlock"><select ng-model="languageToAdd" ng-options="(\'LANGUAGE_\' + languageCode.toUpperCase() | translate) + \' [\' + languageCode + \']\' for languageCode in guestControlSettingsCtrl.getAvailableLanguages()"><option unifi-option-placeholder></option></select><button type="button" ng-click="guestControlSettingsCtrl.addLanguage(languageToAdd); languageToAdd = null" ng-disabled="!languageToAdd" class="appMainButton appMainButton--primary appMainButton--condensed"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_GUEST_CONTROL_LANGUAGE_OPTIONS_ACTIONS_ADD_LANGUAGE"></span></button></div></div></div></fieldset><fieldset ng-show="modelFormCtrl.getVisibility(\'new-angular-engine\')" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_PORTAL_CUSTOMIZATION" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="row"><div class="col--lg4"><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalEnableLogo" name="guestControlCustomPortalEnableLogo" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_logo_enabled" ng-model-master="modelFormCtrl.model.attributes.portal_customized_logo_enabled"><label for="guestControlCustomPortalEnableLogo" translate="SETTINGS_GUEST_CONTROL_LABEL_PORTAL_CUSTOMIZATION_ENABLE_LOGO"></label><unifi-upload-guest-portal-image ng-show="modelFormCtrl.modelCopy.attributes.portal_customized_logo_enabled" unifi-upload-guest-portal-image-label-change="SETTINGS_GUEST_CONTROL_ACTIONS_PORTAL_CUSTOMIZATION_CHANGE_IMAGE" unifi-upload-guest-portal-image-label-upload="SETTINGS_GUEST_CONTROL_ACTIONS_PORTAL_CUSTOMIZATION_UPLOAD_IMAGE" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_logo_filename" ng-model-master="modelFormCtrl.model.attributes.portal_customized_logo_filename"></unifi-upload-guest-portal-image></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalEnableBackgroundImage" name="guestControlCustomPortalEnableBackgroundImage" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_bg_image_enabled" ng-model-master="modelFormCtrl.model.attributes.portal_customized_bg_image_enabled"><label for="guestControlCustomPortalEnableBackgroundImage" translate="SETTINGS_GUEST_CONTROL_LABEL_PORTAL_CUSTOMIZATION_ENABLE_BACKGROUND_IMAGE"></label><unifi-upload-guest-portal-image ng-show="modelFormCtrl.modelCopy.attributes.portal_customized_bg_image_enabled" unifi-upload-guest-portal-image-label-change="SETTINGS_GUEST_CONTROL_ACTIONS_PORTAL_CUSTOMIZATION_CHANGE_IMAGE" unifi-upload-guest-portal-image-label-upload="SETTINGS_GUEST_CONTROL_ACTIONS_PORTAL_CUSTOMIZATION_UPLOAD_IMAGE" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_bg_image_filename" ng-model-master="modelFormCtrl.model.attributes.portal_customized_bg_image_filename"></unifi-upload-guest-portal-image></div><div ng-show="modelFormCtrl.modelCopy.attributes.portal_customized_bg_image_enabled" class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalTileBackgroundImage" name="guestControlCustomPortalTileBackgroundImage" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_bg_image_tile" ng-model-master="modelFormCtrl.model.attributes.portal_customized_bg_image_tile"><label for="guestControlCustomPortalTileBackgroundImage" translate="SETTINGS_GUEST_CONTROL_LABEL_PORTAL_CUSTOMIZATION_TILE_BACKGROUND_IMAGE"></label></div></div><div class="appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><unifi-color-picker unifi-color-picker-model="modelFormCtrl.modelCopy.attributes.portal_customized_bg_color" unifi-color-picker-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"><div class="appInputGroup appInputGroup--cozy"><div ng-class="{\'unifiColorBall--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-style="{\'background-color\': modelFormCtrl.modelCopy.attributes.portal_customized_bg_color}" class="unifiColorBall"></div><label for="guestControlCustomPortalBgColor" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_BACKGROUND_COLOR" class="appLabel appLabel--boxInline"></label><div class="appIconInput appIconInput--left"><div class="appIconInput__icon">#</div><input unifi-hex-color-input maxlength="6" id="guestControlCustomPortalBgColor" name="guestControlCustomPortalBgColor" type="text" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_bg_color" ng-model-master="modelFormCtrl.model.attributes.portal_customized_bg_color" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="input--hexColor appIconInput__input"></div></div></unifi-color-picker></div><div class="appInputGroup appInputGroup--cozy"><unifi-color-picker unifi-color-picker-model="modelFormCtrl.modelCopy.attributes.portal_customized_text_color" unifi-color-picker-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"><div class="appInputGroup appInputGroup--cozy"><div ng-class="{\'unifiColorBall--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-style="{\'background-color\': modelFormCtrl.modelCopy.attributes.portal_customized_text_color}" class="unifiColorBall"></div><label for="guestControlCustomPortalTextColor" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_TEXT_COLOR" class="appLabel appLabel--boxInline"></label><div class="appIconInput appIconInput--left"><div class="appIconInput__icon">#</div><input unifi-hex-color-input maxlength="6" id="guestControlCustomPortalTextColor" name="guestControlCustomPortalTextColor" type="text" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_text_color" ng-model-master="modelFormCtrl.model.attributes.portal_customized_text_color" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="input--hexColor appIconInput__input"></div></div></unifi-color-picker></div><div class="appInputGroup appInputGroup--cozy"><unifi-color-picker unifi-color-picker-model="modelFormCtrl.modelCopy.attributes.portal_customized_button_color" unifi-color-picker-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"><div class="appInputGroup appInputGroup--cozy"><div ng-class="{\'unifiColorBall--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-style="{\'background-color\': modelFormCtrl.modelCopy.attributes.portal_customized_button_color}" class="unifiColorBall"></div><label for="guestControlCustomPortalButtonColor" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_BUTTON_COLOR" class="appLabel appLabel--boxInline"></label><div class="appIconInput appIconInput--left"><div class="appIconInput__icon">#</div><input unifi-hex-color-input maxlength="6" id="guestControlCustomPortalButtonColor" name="guestControlCustomPortalButtonColor" type="text" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_button_color" ng-model-master="modelFormCtrl.model.attributes.portal_customized_button_color" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="input--hexColor appIconInput__input"></div></div></unifi-color-picker></div><div class="appInputGroup appInputGroup--cozy"><unifi-color-picker unifi-color-picker-model="modelFormCtrl.modelCopy.attributes.portal_customized_button_text_color" unifi-color-picker-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"><div class="appInputGroup appInputGroup--cozy"><div ng-class="{\'unifiColorBall--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-style="{\'background-color\': modelFormCtrl.modelCopy.attributes.portal_customized_button_text_color}" class="unifiColorBall"></div><label for="guestControlCustomPortalButtonTextColor" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_BUTTON_TEXT_COLOR" class="appLabel appLabel--boxInline"></label><div class="appIconInput appIconInput--left"><div class="appIconInput__icon">#</div><input unifi-hex-color-input maxlength="6" id="guestControlCustomPortalButtonTextColor" name="guestControlCustomPortalButtonTextColor" type="text" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_button_text_color" ng-model-master="modelFormCtrl.model.attributes.portal_customized_button_text_color" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="input--hexColor appIconInput__input"></div></div></unifi-color-picker></div><div class="appInputGroup appInputGroup--cozy"><unifi-color-picker unifi-color-picker-model="modelFormCtrl.modelCopy.attributes.portal_customized_link_color" unifi-color-picker-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"><div class="appInputGroup appInputGroup--cozy"><div ng-class="{\'unifiColorBall--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-style="{\'background-color\': modelFormCtrl.modelCopy.attributes.portal_customized_link_color}" class="unifiColorBall"></div><label for="guestControlCustomPortalLinkColor" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_LINK_COLOR" class="appLabel appLabel--boxInline"></label><div class="appIconInput appIconInput--left"><div class="appIconInput__icon">#</div><input unifi-hex-color-input maxlength="6" id="guestControlCustomPortalLinkColor" name="guestControlCustomPortalLinkColor" type="text" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_link_color" ng-model-master="modelFormCtrl.model.attributes.portal_customized_link_color" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="input--hexColor appIconInput__input"></div></div></unifi-color-picker></div><div class="appInputGroup appInputGroup--cozy"><unifi-color-picker unifi-color-picker-model="modelFormCtrl.modelCopy.attributes.portal_customized_box_color" unifi-color-picker-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"><div class="appInputGroup appInputGroup--cozy"><div ng-class="{\'unifiColorBall--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-style="{\'background-color\': modelFormCtrl.modelCopy.attributes.portal_customized_box_color}" class="unifiColorBall"></div><label for="guestControlCustomPortalBoxColor" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_BOX_COLOR" class="appLabel appLabel--boxInline"></label><div class="appIconInput appIconInput--left"><div class="appIconInput__icon">#</div><input unifi-hex-color-input maxlength="6" id="guestControlCustomPortalBoxColor" name="guestControlCustomPortalBoxColor" type="text" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_box_color" ng-model-master="modelFormCtrl.model.attributes.portal_customized_box_color" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="input--hexColor appIconInput__input"></div></div></unifi-color-picker></div><div class="appInputGroup appInputGroup--cozy"><unifi-color-picker unifi-color-picker-model="modelFormCtrl.modelCopy.attributes.portal_customized_box_text_color" unifi-color-picker-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"><div class="appInputGroup appInputGroup--cozy"><div ng-class="{\'unifiColorBall--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-style="{\'background-color\': modelFormCtrl.modelCopy.attributes.portal_customized_box_text_color}" class="unifiColorBall"></div><label for="guestControlCustomPortalBoxTextColor" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_BOX_TEXT_COLOR" class="appLabel appLabel--boxInline"></label><div class="appIconInput appIconInput--left"><div class="appIconInput__icon">#</div><input unifi-hex-color-input maxlength="6" id="guestControlCustomPortalBoxTextColor" name="guestControlCustomPortalBoxTextColor" type="text" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_box_text_color" ng-model-master="modelFormCtrl.model.attributes.portal_customized_box_text_color" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="input--hexColor appIconInput__input"></div></div></unifi-color-picker></div><div class="appInputGroup appInputGroup--cozy"><unifi-color-picker unifi-color-picker-model="modelFormCtrl.modelCopy.attributes.portal_customized_box_link_color" unifi-color-picker-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"><div class="appInputGroup appInputGroup--cozy"><div ng-class="{\'unifiColorBall--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-style="{\'background-color\': modelFormCtrl.modelCopy.attributes.portal_customized_box_link_color}" class="unifiColorBall"></div><label for="guestControlCustomPortalBoxLinkColor" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_BOX_LINK_COLOR" class="appLabel appLabel--boxInline"></label><div class="appIconInput appIconInput--left"><div class="appIconInput__icon">#</div><input unifi-hex-color-input maxlength="6" id="guestControlCustomPortalBoxLinkColor" name="guestControlCustomPortalBoxLinkColor" type="text" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_box_link_color" ng-model-master="modelFormCtrl.model.attributes.portal_customized_box_link_color" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="input--hexColor appIconInput__input"></div></div></unifi-color-picker></div><div class="appInputGroup appInputGroup--cozy"><input unifi-truthy-checkbox unifi-truthy-checkbox-false-value="100" unifi-truthy-checkbox-default-true-value="30" type="checkbox" id="guestControlCustomPortalBoxOpacityCheckbox" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_box_opacity"><label for="guestControlCustomPortalBoxOpacityCheckbox" translate="SETTINGS_GUEST_CONTROL_VALUES_PORTAL_CUSTOMIZATION_BOX_OPACITY"></label><div class="appIconInput appIconInput--right"><div class="appIconInput__icon">%</div><input min="0" max="100" maxlength="3" id="guestControlCustomPortalBoxOpacity" name="guestControlCustomPortalBoxOpacity" type="number" ng-model="modelFormCtrl.modelCopy.attributes.portal_customized_box_opacity" ng-model-master="modelFormCtrl.model.attributes.portal_customized_box_opacity" ng-required="modelFormCtrl.getVisibility([\'portal-customized\'])" class="appIconInput__input"></div></div></div></div><div class="col--lg8 visible--desktop"><button type="button" ng-click="guestControlSettingsCtrl.resetPortalCustomization()" class="appMainButton appMainButton--tertiary appMainButton--condensed floatRight"><span class="button__icon icon ubnt-icon--reset"></span><span translate="SETTINGS_GUEST_CONTROL_ACTIONS_PORTAL_CUSTOMIZATION_RESET_STYLE"></span></button><unifi-custom-portal-preview ng-if="modelFormCtrl.getVisibility([\'portal-enabled\', \'new-angular-engine\']) &amp;&amp; !guestControlSettingsCtrl.UseWebrtc" unifi-custom-portal-preview-model="guestControlSettingsCtrl.getPortalPreviewModel()" unifi-custom-portal-preview-is-dark="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')"></unifi-custom-portal-preview><div ng-if="modelFormCtrl.getVisibility([\'portal-enabled\', \'new-angular-engine\']) &amp;&amp; guestControlSettingsCtrl.UseWebrtc" ng-class="{\'appInfoBox--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--cozy appInfoBox--noBorder verticalRhythmTop"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_GUEST_CONTROL_LABEL_CUSTOM_PORTAL_PREVIEW_LOCAL_ONLY" class="noMarginBottom"></p></div></div></div></div></div></div></div></fieldset></div><div ng-show="modelFormCtrl.setVisibility(\'hotspot\', modelFormCtrl.modelCopy.attributes.portal_enabled &amp;&amp; modelFormCtrl.modelCopy.attributes.auth === \'hotspot\')" class="unifiSettingsSection"><div class="appSubHeading appSubHeading--comfy appSubHeading--standalone"><span translate="SETTINGS_GUEST_CONTROL_SECTION_HOTSPOT"></span><a ng-href="{{guestControlSettingsCtrl.getHotspotManagerUrl()}}" target="_blank" class="appMainButton appMainButton--tertiary appMainButton--condensed floatRight"><span class="button__icon icon ubnt-icon--popout"></span><span translate="SETTINGS_GUEST_CONTROL_VALUES_GO_TO_HOTSPOT_MANAGER"></span></a></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_API" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlEnableApi" id="guestControlEnableApi" checked disabled><label for="guestControlEnableApi" translate="SETTINGS_GUEST_CONTROL_VALUES_ENABLE_API_AUTHORIZATION"></label><div ng-if="modelFormCtrl.modelCopy.attributes.template_engine === \'angular\'" class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_API_AUTHORIZATION\' | translate}}</div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_VOUCHERS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlEnableVouchers" id="guestControlEnableVouchers" ng-model="modelFormCtrl.modelCopy.attributes.voucher_enabled" ng-model-master="modelFormCtrl.model.attributes.voucher_enabled" ng-required="modelFormCtrl.getVisibility([\'hotspot\']) &amp;&amp; modelFormCtrl.modelCopy.attributes.template_engine === \'jsp\' &amp;&amp; !guestControlSettingsCtrl.isAnyJspAuthenticationMethodEnabled()"><label for="guestControlEnableVouchers" translate="SETTINGS_GUEST_CONTROL_VALUES_ENABLE_VOUCHER_AUTHORIZATION"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_PAYMENTS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlEnablePayments" id="guestControlEnablePayments" ng-model="modelFormCtrl.modelCopy.attributes.payment_enabled" ng-model-master="modelFormCtrl.model.attributes.payment_enabled" ng-required="modelFormCtrl.getVisibility([\'hotspot\']) &amp;&amp; modelFormCtrl.modelCopy.attributes.template_engine === \'jsp\' &amp;&amp; !guestControlSettingsCtrl.isAnyJspAuthenticationMethodEnabled()"><label for="guestControlEnablePayments" translate="SETTINGS_GUEST_CONTROL_VALUES_ENABLE_PAYMENT_AUTHORIZATION"></label></div></div></div><div class="row"><div class="col--sm6"><div unifi-feature-flag-enable="enableFacebookAuth" unifi-feature-flag-and="modelFormCtrl.modelCopy.attributes.template_engine === \'angular\'" class="row"><div class="col--sm6"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="SETTINGS_GUEST_CONTROL_LABEL_FACEBOOK" class="appLabel--primary"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div></div><div class="col--sm6 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlEnableFacebook" id="guestControlEnableFacebook" ng-model="modelFormCtrl.modelCopy.attributes.facebook_enabled" ng-model-master="modelFormCtrl.model.attributes.facebook_enabled"><label for="guestControlEnableFacebook" translate="SETTINGS_GUEST_CONTROL_VALUES_ENABLE_FACEBOOK_AUTHORIZATION"></label></div></div></div><div unifi-feature-flag-enable="enableGoogleAuth" unifi-feature-flag-and="modelFormCtrl.modelCopy.attributes.template_engine === \'angular\'" class="row"><div class="col--sm6"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GOOGLE" class="appLabel--primary"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div></div><div class="col--sm6 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlEnableGoogle" id="guestControlEnableGoogle" ng-model="modelFormCtrl.modelCopy.attributes.google_enabled" ng-model-master="modelFormCtrl.model.attributes.google_enabled"><label for="guestControlEnableGoogle" translate="SETTINGS_GUEST_CONTROL_VALUES_ENABLE_GOOGLE_AUTHORIZATION"></label></div></div></div></div><div class="col--sm6"><div ng-show="guestControlSettingsCtrl.isAnySocialAuthenticationMethodEnabled() &amp;&amp; !modelFormCtrl.modelCopy.attributes.portal_use_hostname" class="appInfoBox appInfoBox--warning appInfoBox--cozy appInfoBox--dark"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_GUEST_CONTROL_INFO_BOX_OAUTH_REDIRECT_URI"></p></div></div></div></div></div><div ng-if="guestControlSettingsCtrl.forms.guest_access.guestControlEnablePayments.$invalid" ng-show="guestControlSettingsCtrl.showValidation" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div translate="SETTINGS_GUEST_CONTROL_VALIDATION_HINT_AUTHORIZATION" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div ng-show="modelFormCtrl.getVisibility(\'portal-enabled\', \'portal-customization\') &amp;&amp; modelFormCtrl.setVisibility(\'voucher-customization\', modelFormCtrl.modelCopy.attributes.voucher_enabled)" class="unifiSettingsSection"><div class="appSubHeading appSubHeading--comfy appSubHeading--standalone"><span translate="SETTINGS_GUEST_CONTROL_SECTION_VOUCHER_CUSTOMIZATION"></span></div><fieldset class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_TEMPLATE_ENGINE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="guestControlVoucherTemplateEngine" id="guestControlVoucherTemplateEngineJSP" value="jsp" checked="checked" disabled><label for="guestControlTemplateEngineJSP" translate="SETTINGS_GUEST_CONTROL_VALUES_TEMPLATE_ENGINE_JSP"></label></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_OVERRIDE_DEFAULT_TEMPLATES" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlCustomVoucher" id="guestControlCustomVoucher" ng-model="modelFormCtrl.modelCopy.attributes.voucher_customized" ng-model-master="modelFormCtrl.model.attributes.voucher_customized"><label for="guestControlCustomVoucher" translate="SETTINGS_GUEST_CONTROL_VALUES_OVERRIDE_DEFAULT_TEMPLATES"></label><div ng-init="guestControlSettingsCtrl.visibleOverrideDefaultVoucherTemplatesPrompt = false" ng-click="guestControlSettingsCtrl.visibleOverrideDefaultVoucherTemplatesPrompt = true" on-outside-element-click="guestControlSettingsCtrl.visibleOverrideDefaultVoucherTemplatesPrompt = false" class="appTooltipContainer appTooltipContainer--prompt"><div ng-show="guestControlSettingsCtrl.visibleOverrideDefaultVoucherTemplatesPrompt" ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_GUEST_CONTROL_PROMPT_OVERRIDE_DEFAULT_TEMPLATES" translate-values="{helpLink: guestControlSettingsCtrl.HOTSPOT_PORTAL_OVERRIDE_TEMPLATE_HELP[modelFormCtrl.modelCopy.attributes.template_engine]}" class="appTooltip"></div></div></div></div></div></fieldset></div><div ng-show="modelFormCtrl.setVisibility(\'payments-enabled\', modelFormCtrl.modelCopy.attributes.payment_enabled)" class="unifiSettingsSection"><div class="appSubHeading appSubHeading--comfy appSubHeading--standalone"><span translate="SETTINGS_GUEST_CONTROL_SECTION_PAYMENTS"></span></div><fieldset ng-show="modelFormCtrl.setVisibility(\'new-payments-enabled\', modelFormCtrl.modelCopy.attributes.payment_enabled &amp;&amp; modelFormCtrl.modelCopy.attributes.template_engine === \'angular\')" class="appFieldset appFieldset--quiet verticalRhythm--cozy"><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_PAYMENT_PACKAGES" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><table id="hotspotPackages" ng-class="{                        \'appTable--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')                      }" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><th unifi-if-role-admin class="appTableCell--smash"></th><th><span translate="SETTINGS_GUEST_CONTROL_PACKAGE_OPTIONS_TABLE_HEADER_PACKAGE"></span></th><th><span translate="SETTINGS_GUEST_CONTROL_PACKAGE_OPTIONS_TABLE_HEADER_ACTIONS"></span></th></thead><tbody ng-sortable="guestControlSettingsCtrl.sortablePackagesConfig"><tr ng-repeat="model in guestControlSettingsCtrl.hotspotPackagesCopy.models"><td unifi-if-role-admin class="appTableCell--smash"><button class="appMainButton appMainButton--tertiary appMainButton--condensed unifiSettingsPackageHandle"><span class="button__icon icon ubnt-icon--arrows-updown-leftright"></span></button></td><td>{{ guestControlSettingsCtrl.formatHotspotPackage(model) }}</td><td class="appTableCell--actions"><button type="button" ng-click="guestControlSettingsCtrl.editHotspotPackage(model)" title="{{\'COMMON_ACTIONS_EDIT\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--pencil"></span><span translate="COMMON_ACTIONS_EDIT" class="button__label"></span></button><button type="button" ng-click="guestControlSettingsCtrl.removeHotspotPackage(model)" title="{{\'COMMON_ACTIONS_DELETE\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table><button type="button" ng-click="guestControlSettingsCtrl.addHotspotPackage()" class="appMainButton appMainButton--tertiary appMainButton--condensed addHotspotPackage"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_GUEST_CONTROL_PACKAGE_OPTIONS_ACTIONS_ADD_PACKAGE"></span></button></div></div></fieldset><fieldset ng-show="modelFormCtrl.getVisibility(\'new-payments-enabled\')" class="appFieldset appFieldset--quiet verticalRhythm--cozy"><div class="row row--cozy"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_PAYMENT_FIELD_OPTIONS" class="appLabel--primary"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_PAYMENT_FIELD_OPTIONS\' | translate}}</div></div></div><div class="col--sm3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldFirstNameEnabled" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_first_name_enabled" ng-model-master="modelFormCtrl.model.attributes.payment_fields_first_name_enabled"><label for="guestControlCustomPortalPaymentFieldFirstNameEnabled" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_FIRST_NAME_ENABLED"></label></div></div><div class="col--sm3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldFirstNameRequired" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_first_name_required" ng-model-master="modelFormCtrl.model.attributes.payment_fields_first_name_required" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_first_name_enabled"><label for="guestControlCustomPortalPaymentFieldFirstNameRequired" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_FIRST_NAME_REQUIRED" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_first_name_enabled"></label></div></div></div><div class="row row--cozy"><div class="col--sm3 col--smOffset3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldLastNameEnabled" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_last_name_enabled" ng-model-master="modelFormCtrl.model.attributes.payment_fields_last_name_enabled"><label for="guestControlCustomPortalPaymentFieldLastNameEnabled" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_LAST_NAME_ENABLED"></label></div></div><div class="col--sm3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldLastNameRequired" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_last_name_required" ng-model-master="modelFormCtrl.model.attributes.payment_fields_last_name_required" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_last_name_enabled"><label for="guestControlCustomPortalPaymentFieldLastNameRequired" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_LAST_NAME_REQUIRED" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_last_name_enabled"></label></div></div></div><div class="row row--cozy"><div class="col--sm3 col--smOffset3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldAddressEnabled" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_address_enabled" ng-model-master="modelFormCtrl.model.attributes.payment_fields_address_enabled"><label for="guestControlCustomPortalPaymentFieldAddressEnabled" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_ADDRESS_ENABLED"></label></div></div><div class="col--sm3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldAddressRequired" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_address_required" ng-model-master="modelFormCtrl.model.attributes.payment_fields_address_required" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_address_enabled"><label for="guestControlCustomPortalPaymentFieldAddressRequired" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_ADDRESS_REQUIRED" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_address_enabled"></label></div></div></div><div class="row row--cozy"><div class="col--sm3 col--smOffset3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldCityEnabled" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_city_enabled" ng-model-master="modelFormCtrl.model.attributes.payment_fields_city_enabled"><label for="guestControlCustomPortalPaymentFieldCityEnabled" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_CITY_ENABLED"></label></div></div><div class="col--sm3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldCityRequired" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_city_required" ng-model-master="modelFormCtrl.model.attributes.payment_fields_city_required" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_city_enabled"><label for="guestControlCustomPortalPaymentFieldCityRequired" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_CITY_REQUIRED" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_city_enabled"></label></div></div></div><div class="row row--cozy"><div class="col--sm3 col--smOffset3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldStateEnabled" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_state_enabled" ng-model-master="modelFormCtrl.model.attributes.payment_fields_state_enabled"><label for="guestControlCustomPortalPaymentFieldStateEnabled" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_STATE_ENABLED"></label></div></div><div class="col--sm3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldStateRequired" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_state_required" ng-model-master="modelFormCtrl.model.attributes.payment_fields_state_required" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_state_enabled"><label for="guestControlCustomPortalPaymentFieldStateRequired" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_STATE_REQUIRED" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_state_enabled"></label></div></div></div><div class="row row--cozy"><div class="col--sm3 col--smOffset3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldZipEnabled" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_zip_enabled" ng-model-master="modelFormCtrl.model.attributes.payment_fields_zip_enabled"><label for="guestControlCustomPortalPaymentFieldZipEnabled" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_ZIP_ENABLED"></label></div></div><div class="col--sm3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldZipRequired" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_zip_required" ng-model-master="modelFormCtrl.model.attributes.payment_fields_zip_required" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_zip_enabled"><label for="guestControlCustomPortalPaymentFieldZipRequired" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_ZIP_REQUIRED" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_zip_enabled"></label></div></div></div><div class="row row--cozy"><div class="col--sm3 col--smOffset3 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldCountryEnabled" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_country_enabled" ng-model-master="modelFormCtrl.model.attributes.payment_fields_country_enabled"><label for="guestControlCustomPortalPaymentFieldCountryEnabled" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_COUNTRY_ENABLED"></label></div></div><div class="col--sm2 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" id="guestControlCustomPortalPaymentFieldCountryRequired" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_country_required" ng-model-master="modelFormCtrl.model.attributes.payment_fields_country_required" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_country_enabled"><label for="guestControlCustomPortalPaymentFieldCountryRequired" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_COUNTRY_REQUIRED" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_country_enabled"></label></div></div><div class="col--sm4 appFormGroup appFormGroup--smash"><div class="appInputGroup appInputGroup--cozy"><label for="guestControlCustomPortalPaymentFieldCountryDefault" translate="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_COUNTRY_DEFAULT" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_country_enabled" class="appLabel--boxInline"></label><select name="guestControlCustomPortalPaymentFieldCountryDefault" ng-model="modelFormCtrl.modelCopy.attributes.payment_fields_country_default" ng-model-master="modelFormCtrl.model.attributes.payment_fields_country_default" ng-options="guestControlSettingsCtrl.countryNamesMap[countryCode] for countryCode in guestControlSettingsCtrl.countryCodes track by countryCode" ng-show="modelFormCtrl.modelCopy.attributes.payment_fields_country_enabled" class="select-full"><option unifi-option-placeholder="SETTINGS_GUEST_CONTROL_VALUES_PAYMENT_FIELD_COUNTRY_SELECT_DEFAULT"></option></select></div></div></div></fieldset><fieldset ng-show="modelFormCtrl.setVisibility(\'payment-gateway\', modelFormCtrl.modelCopy.attributes.payment_enabled)" class="appFieldset appFieldset--quiet"><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><select name="guestControlGateway" ng-model="modelFormCtrl.modelCopy.attributes.gateway" ng-model-master="modelFormCtrl.model.attributes.gateway" ng-options="gateway.id as gateway.translationKey | translate for gateway in guestControlSettingsCtrl.gatewayOptions" ng-required="modelFormCtrl.getVisibility([\'hotspot\', \'payment-gateway\'])"><option unifi-option-placeholder></option></select></div></div></div></fieldset></div><div ng-show="modelFormCtrl.setVisibility(\'paypal\', modelFormCtrl.modelCopy.attributes.gateway === \'paypal\' &amp;&amp; modelFormCtrl.getVisibility([\'portal-enabled\', \'hotspot\', \'payment-gateway\']))" class="unifiSettingsSection"><div translate="SETTINGS_GUEST_CONTROL_GATEWAY_PAYPAL" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_USERNAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlPaypalUsername" ng-model="modelFormCtrl.modelCopy.attributes.x_paypal_username" ng-model-master="modelFormCtrl.model.attributes.x_paypal_username" ng-required="modelFormCtrl.getVisibility([\'paypal\'])" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlPaypalPassword" ng-model="modelFormCtrl.modelCopy.attributes.x_paypal_password" ng-model-master="modelFormCtrl.model.attributes.x_paypal_password" ng-required="modelFormCtrl.getVisibility([\'paypal\'])" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_SIGNATURE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlPaypalSignature" ng-model="modelFormCtrl.modelCopy.attributes.x_paypal_signature" ng-model-master="modelFormCtrl.model.attributes.x_paypal_signature" ng-required="modelFormCtrl.getVisibility([\'paypal\'])" class="input--full"></div></div><div class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="checkbox" name="guestControlPaypalSandbox" id="guestControlPaypalSandbox" ng-model="modelFormCtrl.modelCopy.attributes.paypal_use_sandbox" ng-model-master="modelFormCtrl.model.attributes.paypal_use_sandbox"><label for="guestControlPaypalSandbox" translate="SETTINGS_GUEST_CONTROL_VALUES_GATEWAY_USE_SANDBOX_ACCOUNT"></label><a href="https://developer.paypal.com/" target="_blank" translate="SETTINGS_GUEST_CONTROL_VALUES_GATEWAY_APPLY_SANDBOX_ACCOUNT"></a></div></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'stripe\', modelFormCtrl.modelCopy.attributes.gateway === \'stripe\' &amp;&amp; modelFormCtrl.getVisibility([\'portal-enabled\', \'hotspot\', \'payment-gateway\']))" class="unifiSettingsSection"><div translate="SETTINGS_GUEST_CONTROL_GATEWAY_STRIPE" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_API_KEY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlStripeApiKey" ng-model="modelFormCtrl.modelCopy.attributes.x_stripe_api_key" ng-model-master="modelFormCtrl.model.attributes.x_stripe_api_key" ng-required="modelFormCtrl.getVisibility([\'stripe\'])" class="input--full"></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'quickpay\', modelFormCtrl.modelCopy.attributes.gateway === \'quickpay\' &amp;&amp; modelFormCtrl.getVisibility([\'portal-enabled\', \'hotspot\', \'payment-gateway\']))" class="unifiSettingsSection"><div translate="SETTINGS_GUEST_CONTROL_GATEWAY_QUICKPAY" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_MERCHANT_ID" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlStripeMerchantId" ng-model="modelFormCtrl.modelCopy.attributes.x_quickpay_merchantid" ng-model-master="modelFormCtrl.model.attributes.x_quickpay_merchantid" ng-required="modelFormCtrl.getVisibility([\'quickpay\'])" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_MD5_SECRET" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlStripeMd5Secret" ng-model="modelFormCtrl.modelCopy.attributes.x_quickpay_md5secret" ng-model-master="modelFormCtrl.model.attributes.x_quickpay_md5secret" ng-required="modelFormCtrl.getVisibility([\'quickpay\'])" class="input--full"></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'authorize\', modelFormCtrl.modelCopy.attributes.gateway === \'authorize\' &amp;&amp; modelFormCtrl.getVisibility([\'portal-enabled\', \'hotspot\', \'payment-gateway\']))" class="unifiSettingsSection"><div translate="SETTINGS_GUEST_CONTROL_GATEWAY_AUTHORIZE" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_API_LOGIN_ID" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlAuthorizeLoginId" ng-model="modelFormCtrl.modelCopy.attributes.x_authorize_loginid" ng-model-master="modelFormCtrl.model.attributes.x_authorize_loginid" ng-required="modelFormCtrl.getVisibility([\'authorize\'])" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_TRANSACTION_KEY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlAuthorizeTransactionKey" ng-model="modelFormCtrl.modelCopy.attributes.x_authorize_transactionkey" ng-model-master="modelFormCtrl.model.attributes.x_authorize_transactionkey" ng-required="modelFormCtrl.getVisibility([\'authorize\'])" class="input--full"></div></div><div class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="checkbox" name="guestControlAuthorizeSandbox" id="guestControlAuthorizeSandbox" ng-model="modelFormCtrl.modelCopy.attributes.authorize_use_sandbox" ng-model-master="modelFormCtrl.model.attributes.authorize_use_sandbox"><label for="guestControlAuthorizeSandbox" translate="SETTINGS_GUEST_CONTROL_VALUES_GATEWAY_USE_TEST_ACCOUNT"></label><a href="http://developer.authorize.net/testaccount/" target="_blank" translate="SETTINGS_GUEST_CONTROL_VALUES_GATEWAY_APPLY_TEST_ACCOUNT"></a></div></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'merchantwarrior\', modelFormCtrl.modelCopy.attributes.gateway === \'merchantwarrior\' &amp;&amp; modelFormCtrl.getVisibility([\'portal-enabled\', \'hotspot\', \'payment-gateway\']))" class="unifiSettingsSection"><div translate="SETTINGS_GUEST_CONTROL_GATEWAY_MERCHANT_WARRIOR" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_MERCHANT_UUID" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlMerchantWarriorMerchantUuid" ng-model="modelFormCtrl.modelCopy.attributes.x_merchantwarrior_merchantuuid" ng-model-master="modelFormCtrl.model.attributes.x_merchantwarrior_merchantuuid" ng-required="modelFormCtrl.getVisibility([\'merchantwarrior\'])" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_API_KEY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlMerchantWarriorApiKey" ng-model="modelFormCtrl.modelCopy.attributes.x_merchantwarrior_apikey" ng-model-master="modelFormCtrl.model.attributes.x_merchantwarrior_apikey" ng-required="modelFormCtrl.getVisibility([\'merchantwarrior\'])" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_API_PASSPHRASE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlMerchantWarriorApiPassphrase" ng-model="modelFormCtrl.modelCopy.attributes.x_merchantwarrior_apipassphrase" ng-model-master="modelFormCtrl.model.attributes.x_merchantwarrior_apipassphrase" ng-required="modelFormCtrl.getVisibility([\'merchantwarrior\'])" class="input--full"></div></div><div class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="checkbox" name="guestControlMerchantWarriorSandbox" id="guestControlMerchantWarriorSandbox" ng-model="modelFormCtrl.modelCopy.attributes.merchantwarrior_use_sandbox" ng-model-master="modelFormCtrl.model.attributes.merchantwarrior_use_sandbox"><label for="guestControlMerchantWarriorSandbox" translate="SETTINGS_GUEST_CONTROL_VALUES_GATEWAY_USE_TEST_ACCOUNT"></label><a href="https://www.merchantwarrior.com/join" target="_blank" translate="SETTINGS_GUEST_CONTROL_VALUES_GATEWAY_APPLY_TEST_ACCOUNT"></a></div></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'ippay\', modelFormCtrl.modelCopy.attributes.gateway === \'ippay\' &amp;&amp; modelFormCtrl.getVisibility([\'portal-enabled\', \'hotspot\', \'payment-gateway\']))" class="unifiSettingsSection"><div translate="SETTINGS_GUEST_CONTROL_GATEWAY_IP_PAY" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GATEWAY_TERMINAL_ID" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlIpPayTerminalId" ng-model="modelFormCtrl.modelCopy.attributes.x_ippay_terminalid" ng-model-master="modelFormCtrl.model.attributes.x_ippay_terminalid" ng-required="modelFormCtrl.getVisibility([\'ippay\'])" class="input--full"></div></div><div class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><input type="checkbox" name="guestControlIpPaySandbox" id="guestControlIpPaySandbox" ng-model="modelFormCtrl.modelCopy.attributes.ippay_use_sandbox" ng-model-master="modelFormCtrl.model.attributes.ippay_use_sandbox"><label for="guestControlIpPaySandbox" translate="SETTINGS_GUEST_CONTROL_VALUES_GATEWAY_USE_TEST_ACCOUNT"></label><a href="http://www.converge-tech.com/IPPay-s/1821.htm" target="_blank" translate="SETTINGS_GUEST_CONTROL_VALUES_GATEWAY_APPLY_TEST_ACCOUNT"></a></div></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'facebook-enabled\', modelFormCtrl.modelCopy.attributes.facebook_enabled)" class="unifiSettingsSection"><div class="appSubHeading appSubHeading--comfy appSubHeading--standalone"><span translate="SETTINGS_GUEST_CONTROL_SECTION_FACEBOOK"></span></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_FACEBOOK_APP_ID" class="appLabel--primary appLabel--boxAlign"></label><div ng-init="guestControlSettingsCtrl.visibleFacebookTooltip = false" ng-click="guestControlSettingsCtrl.visibleFacebookTooltip = true" on-outside-element-click="guestControlSettingsCtrl.visibleFacebookTooltip = false" class="appTooltipContainer appTooltipContainer--prompt"><div ng-show="guestControlSettingsCtrl.visibleFacebookTooltip" ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_GUEST_CONTROL_TOOLTIP_FACEBOOK_APP" translate-values="{helpLink: \'https://developers.facebook.com/docs/apps/register\'}" class="appTooltip appTooltip--rightCentered"></div></div></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlFacebookAppId" ng-model="modelFormCtrl.modelCopy.attributes.facebook_app_id" ng-model-master="modelFormCtrl.model.attributes.facebook_app_id" ng-required="modelFormCtrl.getVisibility([\'facebook-enabled\'])" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_FACEBOOK_APP_SECRET" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="password" name="guestControlFacebookAppSecret" ng-model="modelFormCtrl.modelCopy.attributes.x_facebook_app_secret" ng-model-master="modelFormCtrl.model.attributes.x_facebook_app_secret" ng-required="modelFormCtrl.getVisibility([\'facebook-enabled\'])" unifi-password-reveal class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_OAUTH_SCOPE" class="appLabel--primary appLabel--boxAlign"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip appTooltip--rightCentered">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_OAUTH_SCOPE\' | translate}}</div></div></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlFacebookScopeEmail" id="guestControlFacebookScopeEmail" ng-model="modelFormCtrl.modelCopy.attributes.facebook_scope_email" ng-model-master="modelFormCtrl.model.attributes.facebook_scope_email"><label for="guestControlFacebookScopeEmail" translate="SETTINGS_GUEST_CONTROL_VALUES_OAUTH_SCOPE_EMAIL"></label></div></div></div></div><div ng-show="modelFormCtrl.setVisibility(\'google-enabled\', modelFormCtrl.modelCopy.attributes.google_enabled)" class="unifiSettingsSection"><div class="appSubHeading appSubHeading--comfy appSubHeading--standalone"><span translate="SETTINGS_GUEST_CONTROL_SECTION_GOOGLE"></span></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GOOGLE_CLIENT_ID" class="appLabel--primary appLabel--boxAlign"></label><div ng-init="guestControlSettingsCtrl.visibleGoogleTooltip = false" ng-click="guestControlSettingsCtrl.visibleGoogleTooltip = true" on-outside-element-click="guestControlSettingsCtrl.visibleGoogleTooltip = false" class="appTooltipContainer appTooltipContainer--prompt"><div ng-show="guestControlSettingsCtrl.visibleGoogleTooltip" ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_GUEST_CONTROL_TOOLTIP_GOOGLE_APP" translate-values="{helpLink: \'https://developers.google.com/identity/protocols/OAuth2\'}" class="appTooltip appTooltip--rightCentered"></div></div></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlGoogleClientId" ng-model="modelFormCtrl.modelCopy.attributes.google_client_id" ng-model-master="modelFormCtrl.model.attributes.google_client_id" ng-required="modelFormCtrl.getVisibility([\'google-enabled\'])" class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GOOGLE_CLIENT_SECRET" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="password" name="guestControlGoogleClientSecret" ng-model="modelFormCtrl.modelCopy.attributes.x_google_client_secret" ng-model-master="modelFormCtrl.model.attributes.x_google_client_secret" ng-required="modelFormCtrl.getVisibility([\'google-enabled\'])" unifi-password-reveal class="input--full"></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_OAUTH_SCOPE" class="appLabel--primary appLabel--boxAlign"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip appTooltip--rightCentered">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_OAUTH_SCOPE\' | translate}}</div></div></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="guestControlGoogleScopeEmail" id="guestControlGoogleScopeEmail" ng-model="modelFormCtrl.modelCopy.attributes.google_scope_email" ng-model-master="modelFormCtrl.model.attributes.google_scope_email"><label for="guestControlGoogleScopeEmail" translate="SETTINGS_GUEST_CONTROL_VALUES_OAUTH_SCOPE_EMAIL"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_GOOGLE_DOMAIN" class="appLabel--primary appLabel--boxAlign"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip appTooltip--rightCentered">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_GOOGLE_DOMAIN\' | translate}}</div></div></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="guestControlGoogleDomain" ng-model="modelFormCtrl.modelCopy.attributes.google_domain" ng-model-master="modelFormCtrl.model.attributes.google_domain" ng-pattern="guestControlSettingsCtrl.patterns.hostname" class="input--full"></div></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_GUEST_CONTROL_SECTION_ACCESS_CONTROL" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><!-- For subnets only--><div unifi-feature-flag-disable="enableWalledGarden" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_PRE_AUTHORIZATION_ACCESS" class="appLabel--primary"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_PRE_AUTHORIZATION\' | translate}}</div></div></div><div unifi-repeatable-form unifi-repeatable-form-min="guestControlSettingsCtrl.allowedSubnetMin" unifi-repeatable-form-max="guestControlSettingsCtrl.allowedSubnetMax" unifi-repeatable-form-model="modelFormCtrl.modelCopy" unifi-repeatable-form-attrs="[\'allowed_subnet_{key}\']" unifi-repeatable-form-is-read-only="!guestControlSettingsCtrl.isAdmin()" class="col--sm9 appFormGroup appFormGroup--cozy"><div ng-repeat="i in repeatableFormCtrl.getOptions() track by $index" class="allowedSubnets appInputGroup appInputGroup--cozy"><input type="text" name="guestControlAllowedSubnet{{$index}}" id="guestControlAllowedSubnet{{$index}}" ng-model="repeatableFormCtrl.model.attributes[\'allowed_subnet_\' + ($index + 1)]" ng-pattern="guestControlSettingsCtrl.patterns.subnet" required><button type="button" ng-show="!repeatableFormCtrl.isReadOnly" ng-click="repeatableFormCtrl.removeItem($index + 1)" ng-disabled="!repeatableFormCtrl.isRemoveAllowed()" title="{{\'SETTINGS_COMMON_LABEL_REMOVE_SUBNET\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeAllowedSubnet"><span class="button__icon icon ubnt-icon--x"></span></button></div><div ng-if="!repeatableFormCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableFormCtrl.addItem()" ng-disabled="!repeatableFormCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addAllowedSubnet"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_COMMON_LABEL_ADD_SUBNET"></span></button></div></div></div><div unifi-feature-flag-disable="enableWalledGarden" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_POST_AUTHORIZATION_RESTRICTIONS" class="appLabel--primary"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_POST_AUTHORIZATION\' | translate}}</div></div></div><div unifi-repeatable-form unifi-repeatable-form-min="guestControlSettingsCtrl.restrictedSubnetMin" unifi-repeatable-form-max="guestControlSettingsCtrl.restrictedSubnetMax" unifi-repeatable-form-model="modelFormCtrl.modelCopy" unifi-repeatable-form-attrs="[\'restricted_subnet_{key}\']" unifi-repeatable-form-is-read-only="!guestControlSettingsCtrl.isAdmin()" class="col--sm9 appFormGroup appFormGroup--cozy"><div ng-repeat="i in repeatableFormCtrl.getOptions() track by $index" class="restrictedSubnets appInputGroup appInputGroup--cozy"><input type="text" name="guestControlRestrictedSubnet{{$index}}" id="guestControlRestrictedSubnet{{$index}}" ng-model="repeatableFormCtrl.model.attributes[\'restricted_subnet_\' + ($index + 1)]" ng-pattern="guestControlSettingsCtrl.patterns.subnet" required><button type="button" ng-show="!repeatableFormCtrl.isReadOnly" ng-click="repeatableFormCtrl.removeItem($index + 1)" ng-disabled="!repeatableFormCtrl.isRemoveAllowed()" title="{{\'SETTINGS_COMMON_LABEL_REMOVE_SUBNET\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeRestrictedSubnet"><span class="button__icon icon ubnt-icon--x"></span></button></div><div ng-if="!repeatableFormCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableFormCtrl.addItem()" ng-disabled="!repeatableFormCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addRestrictedSubnet"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_COMMON_LABEL_ADD_SUBNET"></span></button></div></div></div><!-- For walled Garden--><div unifi-feature-flag-enable="enableWalledGarden" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_PRE_AUTHORIZATION_ACCESS" class="appLabel--primary"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_PRE_AUTHORIZATION\' | translate}}</div></div></div><div unifi-repeatable-form unifi-repeatable-form-min="guestControlSettingsCtrl.allowedSubnetMin" unifi-repeatable-form-max="guestControlSettingsCtrl.allowedSubnetMax" unifi-repeatable-form-model="modelFormCtrl.modelCopy" unifi-repeatable-form-attrs="[\'allowed_subnet_{key}\']" unifi-repeatable-form-is-read-only="!guestControlSettingsCtrl.isAdmin()" class="col--sm9 appFormGroup appFormGroup--cozy"><div ng-repeat="i in repeatableFormCtrl.getOptions() track by $index" class="allowedSubnets appInputGroup appInputGroup--cozy"><input type="text" name="guestControlAllowedSubnet{{$index}}" id="guestControlAllowedSubnet{{$index}}" ng-model="repeatableFormCtrl.model.attributes[\'allowed_subnet_\' + ($index + 1)]" ng-pattern="guestControlSettingsCtrl.patterns.hostnameOrSubnet" required><button type="button" ng-show="!repeatableFormCtrl.isReadOnly" ng-click="repeatableFormCtrl.removeItem($index + 1)" ng-disabled="!repeatableFormCtrl.isRemoveAllowed()" title="{{\'SETTINGS_COMMON_LABEL_REMOVE_SUBNET\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeAllowedSubnet"><span class="button__icon icon ubnt-icon--x"></span></button></div><div ng-if="!repeatableFormCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableFormCtrl.addItem()" ng-disabled="!repeatableFormCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addAllowedSubnet"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_COMMON_LABEL_ADD_HOSTNAME_OR_SUBNET"></span></button></div></div></div><div unifi-feature-flag-enable="enableWalledGarden" class="row"><div class="col--sm3"><label translate="SETTINGS_GUEST_CONTROL_LABEL_POST_AUTHORIZATION_RESTRICTIONS" class="appLabel--primary"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip">{{\'SETTINGS_GUEST_CONTROL_TOOLTIP_POST_AUTHORIZATION\' | translate}}</div></div></div><div unifi-repeatable-form unifi-repeatable-form-min="guestControlSettingsCtrl.restrictedSubnetMin" unifi-repeatable-form-max="guestControlSettingsCtrl.restrictedSubnetMax" unifi-repeatable-form-model="modelFormCtrl.modelCopy" unifi-repeatable-form-attrs="[\'restricted_subnet_{key}\']" unifi-repeatable-form-is-read-only="!guestControlSettingsCtrl.isAdmin()" class="col--sm9 appFormGroup appFormGroup--cozy"><div ng-repeat="i in repeatableFormCtrl.getOptions() track by $index" class="restrictedSubnets appInputGroup appInputGroup--cozy"><input type="text" name="guestControlRestrictedSubnet{{$index}}" id="guestControlRestrictedSubnet{{$index}}" ng-model="repeatableFormCtrl.model.attributes[\'restricted_subnet_\' + ($index + 1)]" ng-pattern="guestControlSettingsCtrl.patterns.hostnameOrSubnet" required><button type="button" ng-show="!repeatableFormCtrl.isReadOnly" ng-click="repeatableFormCtrl.removeItem($index + 1)" ng-disabled="!repeatableFormCtrl.isRemoveAllowed()" title="{{\'SETTINGS_COMMON_LABEL_REMOVE_SUBNET\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed removeRestrictedSubnet"><span class="button__icon icon ubnt-icon--x"></span></button></div><div ng-if="!repeatableFormCtrl.isReadOnly" class="appInputGroup"><button type="button" ng-click="repeatableFormCtrl.addItem()" ng-disabled="!repeatableFormCtrl.isAddAllowed()" class="appMainButton appMainButton--tertiary appMainButton--condensed addRestrictedSubnet"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_COMMON_LABEL_ADD_HOSTNAME_OR_SUBNET"></span></button></div></div></div></div></ng-form></fieldset><div unifi-if-role-admin ng-class="{\'appFormFooter--dark\': guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-click="guestControlSettingsCtrl.showValidation = true" busy-toggle="guestControlSettingsCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button><button type="button" ng-click="guestControlSettingsCtrl.reset()" ng-disabled="guestControlSettingsCtrl.form.$pristine" ng-class="guestControlSettingsCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--transparentDark\' :                 \'appMainButton--transparent\'              " class="appMainButton">{{\'COMMON_ACTIONS_RESET\' | translate}}</button></div></div></form></div></div></div>'),
b.join("")}},{"jade/runtime":232}],1407:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="networkSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_HOTSPOT2" class="unifiSettingsHeader__title appLabel--withBadge"></div><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div><div ng-if="hotspot2Ctrl.view === \'form\'" unifi-hotspot2-form="hotspot2Ctrl.model" unifi-hotspot2-form-attrs="hotspot2Ctrl.sharedAttrs" unifi-hotspot2-form-on-save="hotspot2Ctrl.list()" unifi-hotspot2-form-on-cancel="hotspot2Ctrl.list()" unifi-hotspot2-form-is-read-only="!hotspot2Ctrl.isAdmin()"></div><div ng-if="hotspot2Ctrl.view === \'list\'"><unifi-hotspot2-list unifi-hotspot2-list-on-edit="hotspot2Ctrl.edit(model)"></unifi-hotspot2-list><div unifi-if-role-admin class="unifiSettingsFooter"><button ng-click="hotspot2Ctrl.add()" ng-class="hotspot2Ctrl.preferences.model.get(\'isSettingsDark\') ?               \'appMainButton--inputDark\' :               \'appMainButton--input\'            " class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_HOTSPOT2_BUTTON_ADD"></span></button><label translate="SETTINGS_HOTSPOT2_SQUARE_NOT_SUPPORTED_NOTE" class="appType--micro appType--quiet italicized"></label></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1408:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="maintenanceSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><form ng-class="{\'appForm--dark\': maintenanceSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" novalidate autocomplete="off" class="appForm appForm--cozy"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_MAINTENANCE" class="unifiSettingsHeader__title"></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_MAINTENANCE_SECTION_SERVER_INFORMATION" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_CURRENT_VERSION" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><label>{{maintenanceSettingsCtrl.system.repository.model.get(\'version\')}}\n({{ \'SETTINGS_MAINTENANCE_LABEL_BUILD\' | translate }}: {{maintenanceSettingsCtrl.system.repository.model.get(\'build\')}})</label></div></div><div ng-if="maintenanceSettingsCtrl.system.repository.model.get(\'update_available\') &amp;&amp; maintenanceSettingsCtrl.system.repository.model.get(\'update_downloaded\')" class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_AVAILABLE_VERSION" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><label>{{maintenanceSettingsCtrl.system.repository.model.get(\'update_version\')}}</label></div></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_MAINTENANCE_SECTION_SERVICES" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><ng-form name="maintenanceSettingsCtrl.forms.services" unifi-model-form="maintenanceSettingsCtrl.system.repository.model"><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_LOG_LEVEL" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="maintenanceLogLevelDevice" translate="SETTINGS_MAINTENANCE_LABEL_LOG_LEVEL_DEVICE" class="appLabel--boxInline"></label><select name="maintenanceLogLevelDevice" id="maintenanceLogLevelDevice" ng-model="modelFormCtrl.modelCopy.attributes.debug_device" ng-options="logLevel.id as logLevel.translationKey | translate for logLevel in maintenanceSettingsCtrl.logLevelOptions"></select></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="maintenanceLogLevelMgmt" translate="SETTINGS_MAINTENANCE_LABEL_LOG_LEVEL_MGMT" class="appLabel--boxInline"></label><select name="maintenanceLogLevelMgmt" id="maintenanceLogLevelMgmt" ng-model="modelFormCtrl.modelCopy.attributes.debug_mgmt" ng-options="logLevel.id as logLevel.translationKey | translate for logLevel in maintenanceSettingsCtrl.logLevelOptions"></select></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="maintenanceLogLevelSystem" translate="SETTINGS_MAINTENANCE_LABEL_LOG_LEVEL_SYSTEM" class="appLabel--boxInline"></label><select name="maintenanceLogLevelSystem" id="maintenanceLogLevelSystem" ng-model="modelFormCtrl.modelCopy.attributes.debug_system" ng-options="logLevel.id as logLevel.translationKey | translate for logLevel in maintenanceSettingsCtrl.logLevelOptions"></select></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="maintenanceLogLevelDevice" translate="SETTINGS_MAINTENANCE_LABEL_LOG_LEVEL_SDN" class="appLabel--boxInline"></label><select name="maintenanceLogLevelSdn" id="maintenanceLogLevelSdn" ng-model="modelFormCtrl.modelCopy.attributes.debug_sdn" ng-options="logLevel.id as logLevel.translationKey | translate for logLevel in maintenanceSettingsCtrl.logLevelOptions"></select></div><button type="button" ng-click="maintenanceSettingsCtrl.updateLogLevel()" busy-toggle="maintenanceSettingsCtrl.isUpdatingLogLevel" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy updateLogLevel">{{\'COMMON_ACTIONS_APPLY\' | translate}}</button></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_HISTORICAL_DATA_RETENTION" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup inlineBlock"><select name="maintenanceDataRetentionDays" id="maintenanceDataRetentionDays" ng-model="modelFormCtrl.modelCopy.attributes.data_retention_days" ng-init="modelFormCtrl.modelCopy.attributes.data_retention_days = modelFormCtrl.modelCopy.attributes.data_retention_days || -1" ng-options="dayOption.days as dayOption.translationKey | translate:dayOption.translationParams for dayOption in maintenanceSettingsCtrl.maintenanceDataRetentionOptions"></select></div><button type="button" ng-click="maintenanceSettingsCtrl.updateDataRetention()" busy-toggle="maintenanceSettingsCtrl.isUpdatingDataRetention" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy updateDataRetention">{{\'COMMON_ACTIONS_APPLY\' | translate}}</button></div></div></div><div ng-if="!maintenanceSettingsCtrl.system.isUnifiGo()" class="row"><div class="col--sm9 col--smOffset3 appFormGroup appFormGroup--cozy"><button type="button" ng-click="maintenanceSettingsCtrl.compactDatabase()" busy-toggle="maintenanceSettingsCtrl.isCompactingDatabase" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy compactDatabase">{{\'SETTINGS_MAINTENANCE_ACTIONS_COMPACT_DATABASE\' | translate}}</button></div></div></ng-form><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_CHECK_DEVICES_FIRMWARE_UPDATE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><div class="appInputGroup inlineBlock"><button type="button" ng-click="maintenanceSettingsCtrl.checkDevicesFirmwareUpdate()" busy-toggle="maintenanceSettingsCtrl.isCheckingDevicesFirmwareUpdate" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy checkFirmwareUpdate">{{\'SETTINGS_MAINTENANCE_ACTIONS_CHECK_DEVICES_FIRMWARE_UPDATE\' | translate}}</button></div></div></div></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_MAINTENANCE_SECTION_BACKUP" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_BACKUP_DATA_RETENTION" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup inlineBlock"><select name="maintenanceBackupDays" id="maintenanceBackupDays" ng-model="maintenanceSettingsCtrl.downloadBackupDays" ng-init="maintenanceSettingsCtrl.downloadBackupDays = 7" ng-options="dayOption.days as dayOption.translationKey | translate:dayOption.translationParams for dayOption in maintenanceSettingsCtrl.downloadBackupOptions"></select></div><button type="button" ng-click="maintenanceSettingsCtrl.downloadBackup()" busy-toggle="maintenanceSettingsCtrl.isDownloadingBackup" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy downloadBackup">{{\'SETTINGS_MAINTENANCE_ACTIONS_DOWNLOAD_BACKUP\' | translate}}</button></div></div></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_MAINTENANCE_SECTION_RESTORE" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_BROWSE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="shelfCenter appInputGroup appInputGroup--cozy"><div class="inflexible"><div class="appInputGroup inlineBlock"><button type="file" ngf-select ngf-change="maintenanceSettingsCtrl.restoreSettings($files)" busy-toggle="maintenanceSettingsCtrl.isRestoringFromBackup" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy restoreFile">{{\'SETTINGS_MAINTENANCE_ACTIONS_CHOOSE_FILE\' | translate}}</button></div></div><div class="flexible"><div ng-class="{\'appStatusBar--dark\': maintenanceSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" ng-if="maintenanceSettingsCtrl.restoreProgress &amp;&amp; maintenanceSettingsCtrl.restoreProgress.hasOwnProperty(\'percent\')" class="statusBar appStatusBar appStatusBar--high"><div style="width: {{maintenanceSettingsCtrl.restoreProgress.percent || 0}}%;" class="statusBar__inner"></div></div></div></div></div></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_MAINTENANCE_SECTION_SUPPORT_INFO" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_DOWNLOAD" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><button type="button" ng-click="maintenanceSettingsCtrl.downloadSupportInfo()" busy-toggle="maintenanceSettingsCtrl.isDownloadingSupportInfo" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy downloadSupportInfo">{{\'SETTINGS_MAINTENANCE_ACTIONS_DOWNLOAD_SUPPORT_INFO\' | translate}}</button></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_SYSTEM_CONFIG" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><button type="button" ng-click="maintenanceSettingsCtrl.showSystemConfig()" busy-toggle="maintenanceSettingsCtrl.isPreparingConfig" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy downloadSupportInfo">{{\'SETTINGS_MAINTENANCE_ACTIONS_SHOW_SYSTEM_CONFIG\' | translate}}</button></div></div></div><fieldset ng-if="maintenanceSettingsCtrl.isCloudKey" class="appFieldset appFieldset--quiet"><div class="unifiSettingsSection"><div translate="SETTINGS_MAINTENANCE_SECTION_CLOUD_KEY_FIRMWARE" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_CURRENT_VERSION" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><label>{{maintenanceSettingsCtrl.system.repository.model.get(\'cloudkey_version\')}}</label></div><div class="col--sm4 appFormGroup appFormGroup--cozy"><button type="button" ng-click="maintenanceSettingsCtrl.checkForCloudKeyFirmwareUpdate()" busy-toggle="maintenanceSettingsCtrl.isCheckingForCloudKeyFirmwareUpdate" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy checkForCloudKeyFirmwareUpdate">{{\'SETTINGS_MAINTENANCE_ACTIONS_CHECK_FOR_UPDATE\' | translate}}</button></div></div><div ng-if="maintenanceSettingsCtrl.system.repository.model.get(\'cloudkey_update_available\')" class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_AVAILABLE_VERSION" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><label>{{maintenanceSettingsCtrl.system.repository.model.get(\'cloudkey_update_version\')}}</label></div><div class="col--sm4 appFormGroup appFormGroup--cozy"><button type="button" ng-click="maintenanceSettingsCtrl.updateCloudKeyFirmware()" busy-toggle="maintenanceSettingsCtrl.isUpdatingCloudKeyFirmware" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy updateCloudKeyFirmware">{{\'SETTINGS_MAINTENANCE_ACTIONS_APPLY_UPDATE\' | translate}}</button></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_UPDATE_STATUS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup"><h5 class="noMarginBottom"><span ng-class="{                      \'appBadge--success\': !maintenanceSettingsCtrl.system.repository.model.get(\'cloudkey_update_available\'),                      \'appBadge--warning\': maintenanceSettingsCtrl.system.repository.model.get(\'cloudkey_update_available\')                    }" translate="SETTINGS_MAINTENANCE_LABEL_UPDATE_STATUS_{{maintenanceSettingsCtrl.system.getFirmwareUpdateStatus()}}" class="appBadge"></span></h5></div></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_MAINTENANCE_SECTION_CLOUD_KEY_CONTROLLER" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_CURRENT_VERSION" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><label>{{maintenanceSettingsCtrl.system.repository.model.get(\'package_version\')}}</label></div><div class="col--sm4 appFormGroup appFormGroup--cozy"><button type="button" ng-click="maintenanceSettingsCtrl.checkForCloudKeyControllerUpdate()" busy-toggle="maintenanceSettingsCtrl.isCheckingForCloudKeyControllerUpdate" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy checkForCloudKeyControllerUpdate">{{\'SETTINGS_MAINTENANCE_ACTIONS_CHECK_FOR_UPDATE\' | translate}}</button></div></div><div ng-if="maintenanceSettingsCtrl.system.repository.model.get(\'package_update_available\')" class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_AVAILABLE_VERSION" class="appLabel--primary"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><label>{{maintenanceSettingsCtrl.system.repository.model.get(\'package_update_version\')}}</label></div><div class="col--sm4 appFormGroup appFormGroup--cozy"><button type="button" ng-click="maintenanceSettingsCtrl.updateCloudKeyController()" busy-toggle="maintenanceSettingsCtrl.isUpdatingCloudKeyController" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy updateCloudKeyController">{{\'SETTINGS_MAINTENANCE_ACTIONS_APPLY_UPDATE\' | translate}}</button></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_UPDATE_STATUS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup"><h5 class="noMarginBottom"><span ng-class="{                      \'appBadge--success\': !maintenanceSettingsCtrl.system.repository.model.get(\'package_update_version\'),                      \'appBadge--warning\': maintenanceSettingsCtrl.system.repository.model.get(\'package_update_version\')                    }" translate="SETTINGS_MAINTENANCE_LABEL_UPDATE_STATUS_{{maintenanceSettingsCtrl.system.getControllerUpdateStatus()}}" class="appBadge"></span></h5></div></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_MAINTENANCE_SECTION_CLOUD_KEY_OPERATIONS" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_MAINTENANCE_LABEL_ACTIONS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="maintenanceSettingsCtrl.restartCloudKey()" busy-toggle="maintenanceSettingsCtrl.isRestartingCloudKey" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy restartCloudKey">{{\'SETTINGS_MAINTENANCE_ACTIONS_RESTART_CLOUD_KEY\' | translate}}</button></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="maintenanceSettingsCtrl.shutdownCloudKey()" busy-toggle="maintenanceSettingsCtrl.isShuttingDownCloudKey" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy shutdownCloudKey">{{\'SETTINGS_MAINTENANCE_ACTIONS_SHUTDOWN_CLOUD_KEY\' | translate}}</button></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><button type="button" ng-click="maintenanceSettingsCtrl.resetCloudKey()" busy-toggle="maintenanceSettingsCtrl.isResettingCloudKey" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--danger appMainButton--cozy resetCloudKey">{{\'SETTINGS_MAINTENANCE_ACTIONS_RESET_CLOUD_KEY\' | translate}}</button></div></div></div></div></div></fieldset></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1409:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="networkSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_NETWORKS" class="unifiSettingsHeader__title"></div></div><div ng-if="networksCtrl.view === \'form\'" ng-switch="networksCtrl.model.attributes.purpose" ng-init="networksCtrl.sharedAttrs = networksCtrl.model.deepAttributes()"><div ng-switch-when="remote-user-vpn" unifi-network-form-remote-user-vpn="networksCtrl.model" unifi-network-form-remote-user-vpn-attrs="networksCtrl.sharedAttrs" unifi-network-form-remote-user-vpn-on-save="networksCtrl.list()" unifi-network-form-remote-user-vpn-on-cancel="networksCtrl.list()" unifi-network-form-remote-user-vpn-is-read-only="!networksCtrl.isAdmin()"></div><div ng-switch-when="site-vpn" unifi-network-form-site-vpn="networksCtrl.model" unifi-network-form-site-vpn-attrs="networksCtrl.sharedAttrs" unifi-network-form-site-vpn-on-save="networksCtrl.list()" unifi-network-form-site-vpn-on-cancel="networksCtrl.list()" unifi-network-form-site-vpn-is-read-only="!networksCtrl.isAdmin()"></div><div ng-switch-when="vlan-only" unifi-network-form-vlan-only="networksCtrl.model" unifi-network-form-vlan-only-attrs="networksCtrl.sharedAttrs" unifi-network-form-vlan-only-on-save="networksCtrl.list()" unifi-network-form-vlan-only-on-cancel="networksCtrl.list()" unifi-network-form-vlan-only-is-read-only="!networksCtrl.isAdmin()"></div><div ng-switch-when="vpn-client" unifi-network-form-vpn-client="networksCtrl.model" unifi-network-form-vpn-client-attrs="networksCtrl.sharedAttrs" unifi-network-form-vpn-client-on-save="networksCtrl.list()" unifi-network-form-vpn-client-on-cancel="networksCtrl.list()" unifi-network-form-vpn-client-is-read-only="!networksCtrl.isAdmin()"></div><div ng-switch-default unifi-network-form-lan="networksCtrl.model" unifi-network-form-lan-attrs="networksCtrl.sharedAttrs" unifi-network-form-lan-on-save="networksCtrl.list()" unifi-network-form-lan-on-cancel="networksCtrl.list()" unifi-network-form-lan-is-read-only="!networksCtrl.isAdmin()"></div></div><div ng-if="networksCtrl.view === \'list\'"><unifi-network-list unifi-network-list-on-edit="networksCtrl.edit(model)"></unifi-network-list><div unifi-if-role-admin class="unifiSettingsFooter"><button ng-click="networksCtrl.add()" ng-class="networksCtrl.preferences.model.get(\'isSettingsDark\') ?               \'appMainButton--inputDark\' :               \'appMainButton--input\'            " class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_NETWORK_BUTTON_ADD"></span></button></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1410:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="profiles" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="profilesCtrl.form" ng-class="{          \'appForm--dark\': profilesCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': profilesCtrl.showValidation,          \'is-validation-hidden\': !profilesCtrl.showValidation        }" class="appForm appForm--cozy"><fieldset ng-disabled="!profilesCtrl.isAdmin()" class="appFieldset appFieldset--quiet"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_PROFILES" class="unifiSettingsHeader__title"></div></div><div class="unifiSettingsSection"><div translate="SETTINGS_PROFILES_SECTION_RADIUS" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><unifi-radius-profiles-list unifi-radius-profiles-list-on-edit="profilesCtrl.editRadiusProfile(model)"></unifi-radius-profiles-list><div unifi-if-role-admin><button type="button" ng-click="profilesCtrl.addRadiusProfile()" ng-class="profilesCtrl.preferences.model.get(\'isSettingsDark\') ?                   \'appMainButton--inputDark\' :                   \'appMainButton--input\'                " class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="PROFILES_RADIUS_ACTIONS_BUTTON_ADD"></span></button></div></div></fieldset></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1411:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="radiusServer" class="container container--comfy container--fixed"><div ng-if="!radiusServerCtrl.hasSiteGateway()" class="row"><div class="col--xs12"><unifi-settings-security-gateway-is-required unifi-settings-security-gateway-is-required-feature="{{\'SETTINGS_COMMON_GATEWAY_REQUIRED_MESSAGE_RADIUS_FEATURE\' | translate}}"></unifi-settings-security-gateway-is-required></div></div><div ng-if="radiusServerCtrl.hasSiteGateway()" class="row"><div class="col--xs12"><unifi-settings-sub-menu-radius></unifi-settings-sub-menu-radius></div></div><div ng-if="radiusServerCtrl.hasSiteGateway()" class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="radiusServerCtrl.form" ng-class="{          \'appForm--dark\': radiusServerCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': radiusServerCtrl.showValidation,          \'is-validation-hidden\': !radiusServerCtrl.showValidation        }" ng-submit="radiusServerCtrl.form.$valid &amp;&amp; radiusServerCtrl.save()" class="appForm appForm--cozy"><fieldset ng-disabled="!radiusServerCtrl.isAdmin()" class="appFieldset appFieldset--quiet"><unifi-config-changed unifi-config-changed-on-reset="radiusServerCtrl.resolveDivergence()" unifi-config-changed-on-ignore="radiusServerCtrl.ignoreDivergence()" unifi-config-changed-is-dark="radiusServerCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="radiusServerCtrl.haveFormsDiverged()"></unifi-config-changed><div class="unifiSettingsSection"><ng-form name="radiusServerCtrl.forms.radius" unifi-model-form="radiusServerCtrl.getSettingFromKey(\'radius\', { enabled: false, auth_port: 1812, acct_port: 1813, interim_update_interval: 600, configure_whole_network: true })"><div class="row"><div class="col--sm3 noWrap"><label for="dpiEnable" translate="SETTINGS_RADIUS_LABEL_ENABLED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" ng-class="{                        \'appToggle--dark\': radiusServerCtrl.preferences.model.get(\'isSettingsDark\'),                      }" class="toggle appToggle"><input type="checkbox" name="radiusEnable" id="radiusEnable" ng-model="modelFormCtrl.modelCopy.attributes.enabled" ng-model-master="modelFormCtrl.model.attributes.enabled"><label for="radiusEnable"></label></div></div></div></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_LABEL_SECRET" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="password" id="radiusServerSecret" name="radiusServerSecret" ng-model="modelFormCtrl.modelCopy.attributes.secret" ng-model-master="modelFormCtrl.model.attributes.secret" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" ng-required="modelFormCtrl.modelCopy.attributes.enabled" ng-pattern="radiusServerCtrl.patterns.secret" unifi-password-reveal><div ng-if="radiusServerCtrl.forms.radius.radiusServerSecret.$invalid" translate="VALIDATION_HINT_RADIUS_SECRET" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_LABEL_CLIENTS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="radiusServerConfigureWholeNetwork" id="radiusServerConfigureWholeNetwork" ng-model="modelFormCtrl.modelCopy.attributes.configure_whole_network" ng-model-master="modelFormCtrl.model.attributes.configure_whole_network" disabled><label for="radiusServerConfigureWholeNetwork" translate="SETTINGS_RADIUS_VALUES_CONFIGURE_WHOLE_NETWORK"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': radiusServerCtrl.preferences.model.get(\'isSettingsDark\')}" class="appTooltip"><span translate="SETTINGS_RADIUS_VALUES_CONFIGURE_WHOLE_NETWORK_DISABLED_TOOLTIP"></span></div></div></div></div></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_LABEL_AUTH_PORT" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" id="radiusServerAuthPort" name="radiusServerAuthPort" ng-model="modelFormCtrl.modelCopy.attributes.auth_port" ng-model-master="modelFormCtrl.model.attributes.auth_port" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" ng-required="modelFormCtrl.modelCopy.attributes.enabled" ng-pattern="radiusServerCtrl.patterns.portNumber"></div></div></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_LABEL_ACCT_PORT" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="text" id="radiusServerAcctPort" name="radiusServerAcctPort" ng-model="modelFormCtrl.modelCopy.attributes.acct_port" ng-model-master="modelFormCtrl.model.attributes.acct_port" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" ng-required="modelFormCtrl.modelCopy.attributes.enabled" ng-pattern="radiusServerCtrl.patterns.portNumber"></div></div></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm3"><label translate="SETTINGS_RADIUS_LABEL_ACCT_INTERIM_INTERVAL" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="number" id="radiusServerAcctInterimInterval" name="radiusServerAcctInterimInterval" ng-model="modelFormCtrl.modelCopy.attributes.interim_update_interval" ng-model-master="modelFormCtrl.model.attributes.interim_update_interval" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" min="{{radiusServerCtrl.interimUpdateIntervalMin}}" max="{{radiusServerCtrl.interimUpdateIntervalMax}}"><div ng-if="radiusServerCtrl.forms.radius.radiusServerAcctInterimInterval.$invalid" translate="VALIDATION_HINT_RANGE" translate-values="{min: radiusServerCtrl.interimUpdateIntervalMin, max: radiusServerCtrl.interimUpdateIntervalMax}" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="row"><div class="col--sm3 noWrap"><label for="dpiEnable" translate="SETTINGS_RADIUS_LABEL_TUNNELLED_REPLY" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><div data-on="{{\'COMMON_TOGGLE_ON\' | translate}}" data-off="{{\'COMMON_TOGGLE_OFF\' | translate}}" ng-class="{                        \'appToggle--dark\': radiusServerCtrl.preferences.model.get(\'isSettingsDark\'),                      }" class="toggle appToggle"><input type="checkbox" name="radiusTunnelledReplyEnable" id="radiusTunnelledReplyEnable" ng-model="modelFormCtrl.modelCopy.attributes.tunneled_reply" ng-model-master="modelFormCtrl.model.attributes.tunneled_reply"><label for="radiusTunnelledReplyEnable"></label></div></div></div></div></ng-form></div><div unifi-if-role-admin ng-class="{\'appFormFooter--dark\': radiusServerCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--flush appFormFooter--standalone"><div class="appFormFooter__left"><button ng-click="radiusServerCtrl.showValidation = true" ng-disabled="radiusServerCtrl.form.$pristine" busy-toggle="radiusServerCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button><button type="button" ng-click="radiusServerCtrl.reset()" ng-disabled="radiusServerCtrl.form.$pristine" ng-class="radiusServerCtrl.preferences.model.get(\'isSettingsDark\') ?                   \'appMainButton--transparentDark\' :                   \'appMainButton--transparent\'                " class="appMainButton">{{\'COMMON_ACTIONS_RESET\' | translate}}</button></div></div></fieldset></form></div></div></div>'),
b.join("")}},{"jade/runtime":232}],1412:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="radiusUsers" class="container container--comfy container--fixed"><div ng-if="!radiusUsersCtrl.hasSiteGateway()" class="row"><div class="col--xs12"><unifi-settings-security-gateway-is-required unifi-settings-security-gateway-is-required-feature="{{\'SETTINGS_COMMON_GATEWAY_REQUIRED_MESSAGE_RADIUS_FEATURE\' | translate}}"></unifi-settings-security-gateway-is-required></div></div><div ng-if="radiusUsersCtrl.hasSiteGateway()" class="row"><div class="col--xs12"><unifi-settings-sub-menu-radius></unifi-settings-sub-menu-radius></div></div><div ng-if="radiusUsersCtrl.hasSiteGateway()" class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="radiusUsersCtrl.form" ng-class="{          \'appForm--dark\': radiusUsersCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': radiusUsersCtrl.showValidation,          \'is-validation-hidden\': !radiusUsersCtrl.showValidation        }" ng-submit="radiusUsersCtrl.form.$valid &amp;&amp; radiusUsersCtrl.save()" class="appForm appForm--cozy"><fieldset ng-disabled="!radiusUsersCtrl.isAdmin()" class="appFieldset appFieldset--quiet"><div class="unifiSettingsSection"><div ng-switch="radiusUsersCtrl.view"><div ng-switch-when="form" unifi-radius-user-form="radiusUsersCtrl.model" unifi-radius-user-form-on-save="radiusUsersCtrl.list()" unifi-radius-user-form-on-cancel="radiusUsersCtrl.list()" unifi-radius-user-form-is-read-only="!radiusUsersCtrl.isAdmin()"></div><div ng-switch-when="list"><div translate="SETTINGS_PROFILES_SECTION_USERS" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><unifi-radius-users-list unifi-radius-users-list-on-edit="radiusUsersCtrl.edit(model)"></unifi-radius-users-list><div unifi-if-role-admin><button ng-click="radiusUsersCtrl.add()" ng-class="radiusUsersCtrl.preferences.model.get(\'isSettingsDark\') ?                       \'appMainButton--inputDark\' :                       \'appMainButton--input\'                    " class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_RADIUS_USERS_BUTTON_ADD"></span></button></div></div></div></div></fieldset></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1413:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="routingSettings" class="container container--comfy container--fixed"><div ng-if="!routingCtrl.hasSiteGateway()" class="row"><div class="col--xs12"><unifi-settings-security-gateway-is-required unifi-settings-security-gateway-is-required-feature="{{\'SETTINGS_COMMON_GATEWAY_REQUIRED_MESSAGE_FIREWALL_FEATURE\' | translate}}"></unifi-settings-security-gateway-is-required></div></div><div ng-if="routingCtrl.hasSiteGateway()"><unifi-settings-sub-menu-routing-and-firewall></unifi-settings-sub-menu-routing-and-firewall><div class="row row--comfy"><div class="col--xs12"><div ng-switch="routingCtrl.view"><div ng-switch-when="form" unifi-routing-form="routingCtrl.model" unifi-routing-form-on-save="routingCtrl.list()" unifi-routing-form-on-cancel="routingCtrl.list()" unifi-routing-form-is-read-only="!routingCtrl.isAdmin()"></div><div ng-switch-when="list"><unifi-routing-list unifi-routing-list-on-edit="routingCtrl.edit(model)"></unifi-routing-list><div unifi-if-role-admin class="unifiSettingsFooter"><button ng-click="routingCtrl.add()" ng-class="routingCtrl.preferences.model.get(\'isSettingsDark\') ?                   \'appMainButton--inputDark\' :                   \'appMainButton--input\'                " class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_ROUTING_BUTTON_ADD"></span></button></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1414:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="siteSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><form novalidate autocomplete="off" name="siteSettingsCtrl.form" ng-class="{          \'appForm--dark\': siteSettingsCtrl.preferences.model.get(\'isSettingsDark\'),          \'is-form-validation-visible\': siteSettingsCtrl.showValidation,          \'is-validation-hidden\': !siteSettingsCtrl.showValidation        }" ng-submit="siteSettingsCtrl.form.$valid &amp;&amp; siteSettingsCtrl.save()" class="appForm appForm--cozy"><fieldset ng-disabled="!siteSettingsCtrl.isAdmin()" class="appFieldset appFieldset--quiet"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_SITE" class="unifiSettingsHeader__title"></div></div><unifi-config-changed unifi-config-changed-on-reset="siteSettingsCtrl.resolveDivergence()" unifi-config-changed-on-ignore="siteSettingsCtrl.ignoreDivergence()" unifi-config-changed-is-dark="siteSettingsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-config-changed-with-icon="true" ng-show="siteSettingsCtrl.haveFormsDiverged()"></unifi-config-changed><div class="unifiSettingsSection"><div translate="SETTINGS_SITE_SECTION_CONFIGURATION" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><ng-form name="siteSettingsCtrl.forms.site" unifi-model-form="siteSettingsCtrl.site"><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_SITE_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><input type="text" name="siteName" ng-model="modelFormCtrl.modelCopy.attributes.desc" ng-model-master="modelFormCtrl.model.attributes.desc" ng-pattern="siteSettingsCtrl.patterns.name" required class="input--full"></div></div></ng-form><ng-form name="siteSettingsCtrl.forms.country" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'country\', { code: \'840\' })"><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_COUNTRY" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><select name="siteCountry" ng-model="modelFormCtrl.modelCopy.attributes.code" ng-model-master="modelFormCtrl.model.attributes.code" ng-options="country.get(\'code\') as country.get(\'name\') for country in siteSettingsCtrl.getCountries()" class="select--full"><option unifi-option-placeholder="SETTINGS_SITE_VALUES_SELECT_COUNTRY"></option></select></div></div></ng-form><ng-form name="siteSettingsCtrl.forms.locale" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'locale\', { timezone: \'America/Los_Angeles\' })"><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_TIMEZONE" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm5 appFormGroup appFormGroup--cozy"><select name="siteTimezone" ng-model="modelFormCtrl.modelCopy.attributes.timezone" ng-model-master="modelFormCtrl.model.attributes.timezone" ng-options="timezone.timezone as timezone.name for timezone in siteSettingsCtrl.timezones" class="select--full"><option unifi-option-placeholder="SETTINGS_SITE_VALUES_SELECT_TIMEZONE"></option></select></div></div></ng-form></div><div class="unifiSettingsSection"><div translate="SETTINGS_SITE_SECTION_SERVICES" class="appSubHeading appSubHeading--comfy appSubHeading--standalone"></div><ng-form name="siteSettingsCtrl.forms.mgmt1" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'mgmt\', { led_enabled: true, alert_enabled: true })"><div unifi-feature-flag-enable="enableAdvancedFeaturesToggle" class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_ADVANCED_FEATURES" class="appLabel--primary"></label></div><div class="col--sm7 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="siteEnableAdvancedFeatures" id="siteEnableAdvancedFeatures" ng-model="modelFormCtrl.modelCopy.attributes.advanced_feature_enabled" ng-model-master="modelFormCtrl.model.attributes.advanced_feature_enabled"><label for="siteEnableAdvancedFeatures" translate="SETTINGS_SITE_VALUES_ADVANCED_FEATURES"></label><div ng-if="modelFormCtrl.modelCopy.attributes.advanced_feature_enabled" ng-class="{\'appInfoBox--dark\': siteSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appInfoBox appInfoBox--warning appInfoBox--cozy verticalRhythmTop--cozy"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div class="appInfoBox__body"><p translate="SETTINGS_SITE_TOOLTIP_ADVANCED_FEATURES"></p><p translate="SETTINGS_SITE_TOOLTIP_ADVANCED_FEATURES_DETAILS" class="bold noMarginBottom"></p></div></div></div></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_AUTOMATIC_UPGRADE" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="siteEnableAutoUpgrade" id="siteEnableAutoUpgrade" ng-model="modelFormCtrl.modelCopy.attributes.auto_upgrade" ng-model-master="modelFormCtrl.model.attributes.auto_upgrade"><label for="siteEnableAutoUpgrade" translate="SETTINGS_SITE_VALUES_AUTOMATIC_UPGRADE"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_STATUS_LED" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="siteEnableStatusLed" id="siteEnableStatusLed" ng-model="modelFormCtrl.modelCopy.attributes.led_enabled" ng-model-master="modelFormCtrl.model.attributes.led_enabled"><label for="siteEnableStatusLed" translate="SETTINGS_SITE_VALUES_STATUS_LED"></label></div></div></div><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_ALERT_EMAILS" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="siteEnableAlerts" id="siteEnableAlerts" ng-model="modelFormCtrl.modelCopy.attributes.alert_enabled" ng-model-master="modelFormCtrl.model.attributes.alert_enabled"><label for="siteEnableAlerts" translate="SETTINGS_SITE_VALUES_ALERT_EMAILS"></label></div></div></div></ng-form><ng-form name="siteSettingsCtrl.forms.auto_speedtest" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'auto_speedtest\', { enabled: false, interval: 20 })"><div class="row"><div class="col--xs3"><label translate="SETTINGS_SITE_LABEL_AUTO_SPEED_TEST" class="appLabel--primary appLabel--withBadge"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div><div class="col--xs9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="siteEnableAutoSpeedTest" id="siteEnableAutoSpeedTest" ng-model="modelFormCtrl.modelCopy.attributes.enabled" ng-model-master="modelFormCtrl.model.attributes.enabled"><label for="siteEnableAutoSpeedTest" translate="SETTINGS_SITE_VALUES_AUTO_SPEED_TEST"></label><input type="number" id="siteAutoSpeedTestInterval" name="siteAutoSpeedTestInterval" ng-model="modelFormCtrl.modelCopy.attributes.interval" ng-model-master="modelFormCtrl.model.attributes.interval" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" min="10" max="49" class="input--smallNumber"><label translate="DATETIME_MINUTES_FULL" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" class="appLabel--boxInline unifiSettingsSiteAutoSpeedtestLabel"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable appTooltip--boxAlign"><div ng-class="{\'appTooltip--dark\': siteSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_SITE_VALUES_AUTO_SPEED_TEST_TOOLTIP" class="appTooltip appTooltip--top"></div></div><span unifi-notify-device-requirement="ugw" unifi-notify-device-requirement-is-dark="siteSettingsCtrl.preferences.model.get(\'isSettingsDark\')"></span></div></div></div></ng-form><ng-form name="siteSettingsCtrl.forms.porta" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'porta\', { ugw3_wan2_enabled: false })"><div class="row"><div class="col--xs3"><label translate="SETTINGS_SITE_LABEL_PORT_REMAP" class="appLabel--primary appLabel--withBadge"></label><span translate="COMMON_BETA" class="appBadge appBadge--warning"></span></div><div class="col--xs9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="siteEnablePortRemap" id="siteEnablePortRemap" ng-model="modelFormCtrl.modelCopy.attributes.ugw3_wan2_enabled" ng-model-master="modelFormCtrl.model.attributes.ugw3_wan2_enabled"><label for="siteEnablePortRemap" translate="SETTINGS_SITE_VALUES_PORT_REMAP_UGW3"></label><span unifi-notify-device-requirement="ugw" unifi-notify-device-requirement-is-dark="siteSettingsCtrl.preferences.model.get(\'isSettingsDark\')"></span></div></div></div></ng-form><ng-form name="siteSettingsCtrl.forms.connectivity" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'connectivity\', { enabled: true })"><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_UPLINK_CONNECTIVITY_MONITOR" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="siteEnableConnectivityMonitor" id="siteEnableConnectivityMonitor" ng-model="modelFormCtrl.modelCopy.attributes.enabled" ng-model-master="modelFormCtrl.model.attributes.enabled"><label for="siteEnableConnectivityMonitor" translate="SETTINGS_SITE_VALUES_UPLINK_CONNECTIVITY_MONITOR"></label></div><div unifi-feature-flag-enable="enableUplinkAutomaticFailover" ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="appInputGroup appInputGroup--comfy horizontalRhythmLeft--cozy"><input type="checkbox" name="siteEnableAutoFailover" id="siteEnableAutoFailover" ng-model="modelFormCtrl.modelCopy.attributes.auto_failover" ng-model-master="modelFormCtrl.model.attributes.auto_failover"><label for="siteEnableAutoFailover" translate="SETTINGS_SITE_VALUES_UPLINK_AUTOMATIC_FAILOVER"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable"><div ng-class="{\'appTooltip--dark\': siteSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" translate="SETTINGS_SITE_TOOLTIP_UPLINK_AUTOMATIC_FAILOVER" class="appTooltip appTooltip--top"></div></div></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="appInputGroup verticalRhythmTop--condensed"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="siteConnectivityMonitorUplinkType" id="siteConnectivityMonitorUplinkDefaultGateway" value="gateway" ng-model="modelFormCtrl.modelCopy.attributes.uplink_type" ng-model-master="modelFormCtrl.model.attributes.uplink_type"><label for="siteConnectivityMonitorUplinkDefaultGateway" translate="SETTINGS_SITE_VALUES_UPLINK_DEFAULT_GATEWAY"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="radio" name="siteConnectivityMonitorUplinkType" id="siteConnectivityMonitorUplinkCustomIp" value="custom" ng-model="modelFormCtrl.modelCopy.attributes.uplink_type" ng-model-master="modelFormCtrl.model.attributes.uplink_type"><label for="siteConnectivityMonitorUplinkCustomIp" translate="SETTINGS_SITE_VALUES_UPLINK_CUSTOM_IP"></label><input type="text" name="siteConnectivityMonitorUplinkCustomIp" placeholder="{{\'SETTINGS_SITE_VALUES_UPLINK_CUSTOM_IP_PLACEHOLDER\' | translate}}" ng-model="modelFormCtrl.modelCopy.attributes.uplink_host" ng-model-master="modelFormCtrl.model.attributes.uplink_host" ng-model-master-cleanup="true" ng-disabled="modelFormCtrl.modelCopy.attributes.uplink_type !== \'custom\'" ng-required="modelFormCtrl.modelCopy.attributes.enabled &amp;&amp; modelFormCtrl.modelCopy.attributes.uplink_type === \'custom\'" ng-pattern="siteSettingsCtrl.patterns.ipAddress"></div></div></div></div><div unifi-feature-flag-enable="withOverrideSiteInformUrl" class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_INFORM_URL" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="siteConnectivityOverrideInformUrl" id="siteConnectivityOverrideInformUrl" ng-model="modelFormCtrl.modelCopy.attributes.override_inform_url" ng-model-master="modelFormCtrl.model.attributes.override_inform_url" ng-change="siteSettingsCtrl.confirmOverrideInformUrl()"><label for="controllerOverrideInformHost" translate="SETTINGS_SITE_VALUES_OVERRIDE_INFORM_URL"></label><input type="text" name="siteConnectivityInformUrl" placeholder="{{\'SETTINGS_SITE_VALUES_INFORM_URL\' | translate}}" ng-model="modelFormCtrl.modelCopy.attributes.inform_url" ng-model-master="modelFormCtrl.model.attributes.inform_url" ng-model-master-cleanup="true" ng-required="modelFormCtrl.modelCopy.attributes.override_inform_url" ng-disabled="!modelFormCtrl.modelCopy.attributes.override_inform_url"></div></div></div></ng-form><ng-form name="siteSettingsCtrl.forms.snmp" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'snmp\')"><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_SNMP" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="siteEnableSnmp" id="siteEnableSnmp" ng-model="modelFormCtrl.modelCopy.attributes.enabled" ng-model-master="modelFormCtrl.model.attributes.enabled"><label for="siteEnableSnmp" translate="SETTINGS_SITE_VALUES_SNMP"></label></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="siteSnmpCommunityString" translate="SETTINGS_SITE_VALUES_COMMUNITY_STRING" ng-class="{\'is-label-disabled\': !modelFormCtrl.modelCopy.attributes.enabled}"></label><input type="text" name="siteSnmpCommunityString" id="siteSnmpCommunityString" placeholder="{{\'SETTINGS_SITE_VALUES_COMMUNITY_STRING_PLACEHOLDER\' | translate}}" ng-model="modelFormCtrl.modelCopy.attributes.community" ng-model-master="modelFormCtrl.model.attributes.community" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" ng-required="modelFormCtrl.modelCopy.attributes.enabled"></div></div></div></div></ng-form><ng-form name="siteSettingsCtrl.forms.rsyslogd" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'rsyslogd\')"><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_REMOTE_LOGGING" class="appLabel--primary"></label></div><div class="col--sm9 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="siteEnableRemoteSyslog" id="siteEnableRemoteSyslog" ng-model="modelFormCtrl.modelCopy.attributes.enabled" ng-model-master="modelFormCtrl.model.attributes.enabled"><label for="siteEnableRemoteSyslog" translate="SETTINGS_SITE_VALUES_REMOTE_LOGGING"></label></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="appInputGroup appInputGroup--cozy inlineBlock"><input type="checkbox" name="siteEnableDebugLogging" id="siteEnableDebugLogging" ng-model="modelFormCtrl.modelCopy.attributes.debug"><label for="siteEnableDebugLogging" translate="SETTINGS_SITE_VALUES_REMOTE_LOGGING_DEBUG_LOGGING"></label></div></div><div ng-show="modelFormCtrl.modelCopy.attributes.enabled" class="appInputGroup verticalRhythmTop--condensed"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="siteRemoteLoggingIpAddress" translate="SETTINGS_SITE_LABEL_REMOTE_LOGGING_IP_ADDRESS" class="appLabel--boxInline"></label><input type="text" id="siteRemoteLoggingIpAddress" name="siteRemoteLoggingIpAddress" ng-model="modelFormCtrl.modelCopy.attributes.ip" ng-model-master="modelFormCtrl.model.attributes.ip" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" ng-required="modelFormCtrl.modelCopy.attributes.enabled"></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="siteRemoteLoggingPort" translate="SETTINGS_SITE_LABEL_REMOTE_LOGGING_PORT" class="appLabel--boxInline"></label><input type="text" id="siteRemoteLoggingPort" name="siteRemoteLoggingPort" placeholder="514" ng-model="modelFormCtrl.modelCopy.attributes.port" ng-model-master="modelFormCtrl.model.attributes.port" ng-disabled="!modelFormCtrl.modelCopy.attributes.enabled" ng-required="modelFormCtrl.modelCopy.attributes.enabled" ng-pattern="siteSettingsCtrl.patterns.portNumber"></div></div></div></div></ng-form><ng-form name="siteSettingsCtrl.forms.mgmt2" unifi-model-form="siteSettingsCtrl.getSettingFromKey(\'mgmt\')" unifi-if-role-admin><div class="row"><div class="col--sm3"><label translate="SETTINGS_SITE_LABEL_DEVICE_AUTHENTICATION" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--sm9 appFormGroup"><div class="appInputGroup"><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="siteDeviceAuthenticationUsername" translate="SETTINGS_SITE_LABEL_DEVICE_AUTHENTICATION_USERNAME" class="appLabel--boxInline"></label><input type="text" id="siteDeviceAuthenticationUsername" name="siteDeviceAuthenticationUsername" ng-model="modelFormCtrl.modelCopy.attributes.x_ssh_username" ng-model-master="modelFormCtrl.model.attributes.x_ssh_username" ng-pattern="siteSettingsCtrl.patterns.deviceAccountName" required></div><div class="appInputGroup appInputGroup--cozy inlineBlock"><label for="siteDeviceAuthenticationPassword" translate="SETTINGS_SITE_LABEL_DEVICE_AUTHENTICATION_PASSWORD" class="appLabel--boxInline"></label><input type="password" id="siteDeviceAuthenticationPassword" name="siteDeviceAuthenticationPassword" ng-model="modelFormCtrl.modelCopy.attributes.x_ssh_password" ng-model-master="modelFormCtrl.model.attributes.x_ssh_password" required unifi-password-reveal></div></div></div></div></ng-form></div></fieldset><div unifi-if-role-admin ng-class="{\'appFormFooter--dark\': siteSettingsCtrl.preferences.model.get(\'isSettingsDark\')}" class="appFormFooter appFormFooter--standalone appFormFooter--flush verticalRhythmTop--breezy"><div class="appFormFooter__left"><button ng-click="siteSettingsCtrl.showValidation = true" busy-toggle="siteSettingsCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--success">{{\'COMMON_ACTIONS_APPLY_CHANGES\' | translate}}</button><button type="button" ng-click="siteSettingsCtrl.reset()" ng-disabled="siteSettingsCtrl.form.$pristine" ng-class="siteSettingsCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--transparentDark\' :                 \'appMainButton--transparent\'              " class="appMainButton">{{\'COMMON_ACTIONS_RESET\' | translate}}</button></div><div class="appFormFooter__right"><button type="button" ng-click="siteSettingsCtrl.exportSite()" busy-toggle="siteSettingsCtrl.isExporting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" unifi-feature-flag-enable="enableSiteImportExport" class="appMainButton">{{\'SETTINGS_SITE_ACTIONS_EXPORT\' | translate}}</button><button type="button" ng-if="siteSettingsCtrl.canDeleteSite()" ng-click="siteSettingsCtrl.deleteSite()" busy-toggle="siteSettingsCtrl.isDeleting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--danger">{{\'SETTINGS_SITE_ACTIONS_DELETE\' | translate}}</button></div></div></form></div></div></div>'),b.join("")}},{"jade/runtime":232}],1415:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="userGroupSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><div class="unifiSettingsHeader"><div translate="SETTINGS_NAV_USER_GROUPS" class="unifiSettingsHeader__title"></div></div><div ng-switch="userGroupsCtrl.view"><div ng-switch-when="form" unifi-user-group-form="userGroupsCtrl.model" unifi-user-group-form-on-save="userGroupsCtrl.list()" unifi-user-group-form-on-cancel="userGroupsCtrl.list()" unifi-user-group-form-is-read-only="!userGroupsCtrl.isAdmin()"></div><div ng-switch-when="list"><unifi-user-group-list unifi-user-group-list-on-edit="userGroupsCtrl.edit(model)"></unifi-user-group-list><div unifi-if-role-admin class="unifiSettingsFooter"><button ng-click="userGroupsCtrl.add()" ng-class="userGroupsCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--inputDark\' :                 \'appMainButton--input\'              " class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_USER_GROUP_BUTTON_ADD"></span></button></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1416:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="wirelessNetworkSettings" class="container container--comfy container--fixed"><div class="row row--comfy"><div class="col--xs12"><div class="unifiSettingsHeader"><div class="unifiSettingsHeader__left"><div translate="SETTINGS_NAV_WIRELESS_NETWORKS" class="unifiSettingsHeader__title"></div></div><div ng-if="wirelessNetworksCtrl.view === \'network:list\'" class="unifiSettingsHeader__right"><div ng-class="{\'appForm--dark\': wirelessNetworksCtrl.preferences.model.get(\'isSettingsDark\')}" class="appForm appForm--cozy"><div class="appInputGroup"><div class="appInputGroup inlineBlock"><label translate="SETTINGS_WLAN_HEADER_WLAN_GROUP_LABEL" class="appLabel--primary appLabel--boxInline"></label><select ng-model="wirelessNetworksCtrl.wlanGroupId" ng-options="wlanGroup.id as wlanGroup | roaming for wlanGroup in wirelessNetworksCtrl.getWlanGroupOptions()" ng-change="wirelessNetworksCtrl.onWlanGroupIdChange()"></select></div><div class="appInputGroup inlineBlock"><button unifi-if-role-admin ng-click="wirelessNetworksCtrl.editWlanGroup()" ng-class="wirelessNetworksCtrl.preferences.model.get(\'isSettingsDark\') ?                     \'appMainButton--transparentDark\' :                     \'appMainButton--transparent\'                  " title="{{\'SETTINGS_WLAN_HEADER_WLAN_GROUP_EDIT_SELECTED\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--cozy noPadding"><span class="icon ubnt-icon--pencil"></span></button><button unifi-if-role-admin ng-click="wirelessNetworksCtrl.removeWlanGroup()" ng-disabled="wirelessNetworksCtrl.wlanGroupModel.get(\'attr_no_delete\')" ng-class="wirelessNetworksCtrl.preferences.model.get(\'isSettingsDark\') ?                     \'appMainButton--transparentDark\' :                     \'appMainButton--transparent\'                  " busy-toggle="wirelessNetworksCtrl.isRemoving[model.id]" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" title="{{\'SETTINGS_WLAN_HEADER_WLAN_GROUP_DELETE_SELECTED\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--cozy noPadding"><span class="icon ubnt-icon--trashcan"></span></button><button unifi-if-role-admin ng-click="wirelessNetworksCtrl.addWlanGroup()" ng-class="wirelessNetworksCtrl.preferences.model.get(\'isSettingsDark\') ?                     \'appMainButton--transparentDark\' :                     \'appMainButton--transparent\'                  " title="{{\'SETTINGS_WLAN_HEADER_WLAN_GROUP_ADD\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--cozy noPadding"><span class="icon ubnt-icon--plus"></span></button><button unifi-if-role-admin="false" ng-click="wirelessNetworksCtrl.editWlanGroup()" ng-class="wirelessNetworksCtrl.preferences.model.get(\'isSettingsDark\') ?                     \'appMainButton--transparentDark\' :                     \'appMainButton--transparent\'                  " title="{{\'SETTINGS_WLAN_HEADER_WLAN_GROUP_VIEW_SELECTED\' | translate}}" class="appMainButton appMainButton--iconOnly appMainButton--cozy noPadding"><span class="icon ubnt-icon--eye2"></span></button></div></div></div></div></div><div ng-switch="wirelessNetworksCtrl.view"><div ng-switch-when="group:form" unifi-wireless-network-group-form="wirelessNetworksCtrl.wlanGroupModel" unifi-wireless-network-group-form-on-save="wirelessNetworksCtrl.listWlans(wlanGroupId)" unifi-wireless-network-group-form-on-cancel="wirelessNetworksCtrl.listWlans()" unifi-wireless-network-group-form-is-read-only="!wirelessNetworksCtrl.isAdmin()"></div><div ng-switch-when="network:form" unifi-wireless-network-form="wirelessNetworksCtrl.wlanModel" unifi-wireless-network-form-wlan-group-id="wirelessNetworksCtrl.wlanGroupId" unifi-wireless-network-form-on-save="wirelessNetworksCtrl.listWlans()" unifi-wireless-network-form-on-cancel="wirelessNetworksCtrl.listWlans()" unifi-wireless-network-form-is-read-only="!wirelessNetworksCtrl.isAdmin()"></div><div ng-switch-when="network:list"><unifi-wireless-network-list unifi-wireless-network-list-wlan-group-id="wirelessNetworksCtrl.wlanGroupId" unifi-wireless-network-list-on-edit="wirelessNetworksCtrl.editWlan(model)"></unifi-wireless-network-list><div unifi-if-role-admin class="unifiSettingsFooter"><button ng-if="!wirelessNetworksCtrl.isWlanGroupAtCapacity()" ng-click="wirelessNetworksCtrl.addWlan()" ng-class="wirelessNetworksCtrl.preferences.model.get(\'isSettingsDark\') ?                 \'appMainButton--inputDark\' :                 \'appMainButton--input\'              " class="appMainButton"><span class="button__icon icon ubnt-icon--plus"></span><span translate="SETTINGS_WLAN_BUTTON_ADD"></span></button><label translate="SETTINGS_WLAN_MAXIMUM_NOTE" translate-values="{                \'maxWlans\': wirelessNetworksCtrl.wlansPerGroupMax              }" class="appType--micro appType--quiet italicized"></label></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1417:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-client-list unifi-client-list-sort-key=\"'sort:clients'\"></unifi-client-list>"),b.join("")}},{"jade/runtime":232}],1418:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><unifi-dashboard ng-if="!dashboardCtrl.preferences.model.get(\'dynamicDashboard\')" class="fullWidth fullHeight appScrollable"></unifi-dashboard><unifi-dynamic-dashboard ng-if="dashboardCtrl.preferences.model.get(\'dynamicDashboard\')" class="fullWidth appScrollable"></unifi-dynamic-dashboard></div>'),b.join("")}},{"jade/runtime":232}],1419:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<unifi-device-list unifi-device-list-sort-key=\"'sort:devices'\"></unifi-device-list>"),b.join("")}},{"jade/runtime":232}],1420:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<ui-view></ui-view>"),b.join("")}},{"jade/runtime":232}],1421:[function(a,b,c){arguments[4][1420][0].apply(c,arguments)},{dup:1420,"jade/runtime":232}],1422:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="settingsCtrl.preferences.model.get(\'isSettingsDark\') ? \'appView--dark\' : \'appView--light\'" class="appView appView--panelLayout"><div class="appViewSidePanel appViewSidePanel--navigation visible--mdUp"><div translate="COMMON_NAV_SETTINGS" class="appViewSidePanel__title"></div><unifi-settings-nav unifi-settings-nav-is-dark="settingsCtrl.preferences.model.get(\'isSettingsDark\')" unifi-settings-nav-with-gradient="true" unifi-settings-nav-with-badges="true"></unifi-settings-nav></div><div class="appViewCenterPanel appScrollable"><ui-view></ui-view></div></div>'),b.join("")}},{"jade/runtime":232}],1423:[function(a,b,c){arguments[4][1420][0].apply(c,arguments)},{dup:1420,"jade/runtime":232}],1424:[function(a,b,c){
a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="dpiCtrl.STATS_DEFAULTS.STATES"></unifi-state-switcher></div></div></div><div class="appActionBar__right"><button ng-if="dpiCtrl.showCategoryStatistics()" ng-click="dpiCtrl.clearSelectedCategories()" class="appMainButton appMainButton--primary appMainButton--cozy">{{\'STATISTICS_DPI_CLEAR_CATEGORIES\' | translate}}</button><button ng-if="dpiCtrl.showApplicationStatistics()" ng-click="dpiCtrl.clearSelectedApplications()" class="appMainButton appMainButton--primary appMainButton--cozy">{{\'STATISTICS_DPI_CLEAR_APPLICATIONS\' | translate}}</button></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><unifi-dpi-category-statistics ng-if="dpiCtrl.showCategoryStatistics()" class="unifiSmartMarginContainer unifiStatisticsContainer unifiStatisticsDpi unifiStatisticsDpiCategory"></unifi-dpi-category-statistics><unifi-dpi-application-statistics ng-if="dpiCtrl.showApplicationStatistics()" class="unifiSmartMarginContainer unifiStatisticsContainer unifiStatisticsDpi"></unifi-dpi-application-statistics></div></div></div>'),b.join("")}},{"jade/runtime":232}],1425:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="statisticsOverviewCtrl.STATS_DEFAULTS.STATES"></unifi-state-switcher></div></div></div><div unifi-if-role-admin class="appActionBar__right"><button ng-click="statisticsOverviewCtrl.clearCurrentStats()" busy-toggle="statisticsOverviewCtrl.isClearingStats" busy-toggle-spinner-classes="[\'appSpinner\', \'appSpinner--light\', \'appSpinner--centered\', \'appSpinner--small\']" class="appMainButton appMainButton--primary appMainButton--cozy">{{\'STATISTICS_CLEAR_CURRENT_STATS\' | translate}}</button></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><div class="unifiSmartMarginContainer unifiStatisticsContainer"><div class="container"><div class="row row--comfy"><unifi-stats-clients-per-essid class="unifiStatisticsGraph"></unifi-stats-clients-per-essid><unifi-stats-current-usage class="unifiStatisticsGraph"></unifi-stats-current-usage><unifi-stats-quick-look class="unifiStatisticsGraph"></unifi-stats-quick-look><unifi-stats-recent-activities class="unifiStatisticsGraph"></unifi-stats-recent-activities></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1426:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appView appView--panelLayout"><div class="appViewCenterPanel flexFlag flexFlag--vertical"><div class="appActionBar appActionBar--cozy appActionBar--flexible appActionBar--centerPanel"><div class="appActionBar__inner"><div class="appActionBar__left"><div class="appActionBarFilters"><div class="appActionBarFilter"><unifi-state-switcher unifi-state-switcher-states="statisticsSwitchCtrl.STATS_DEFAULTS.STATES"></unifi-state-switcher></div><div class="appActionBarFilter"><unifi-select-device-dropdown-list style="width: 270px" unifi-select-device-dropdown-list-selected-model="statisticsSwitchCtrl.device" unifi-select-device-dropdown-list-is-required="true" unifi-select-device-dropdown-list-device-filter="statisticsSwitchCtrl.isDeviceAvailable(model)" unifi-select-device-dropdown-list-is-cozy="true" unifi-select-device-dropdown-list-on-select="statisticsSwitchCtrl.changeSwitch(model)" unifi-select-device-dropdown-list-no-clear="true"></unifi-select-device-dropdown-list></div><!-- TODO: backend does not return port stats for other intervals.appActionBarFilter.appActionBarFilter--noBorder\n  unifi-time-interval-selector(\n    unifi-time-interval-selector-init-value="statisticsSwitchCtrl.interval"\n    unifi-time-interval-selector-on-change="statisticsSwitchCtrl.setInterval(interval)"\n  )--><div ng-if="statisticsSwitchCtrl.device" class="appActionBarFilter"><unifi-date-interval-selector unifi-date-interval-selector-value="statisticsSwitchCtrl.interval.value" unifi-date-interval-selector-unit="statisticsSwitchCtrl.interval.unit" Xunifi-date-interval-selector-unit="\'day\'" unifi-date-interval-selector-start="statisticsSwitchCtrl.start" unifi-date-interval-selector-end="statisticsSwitchCtrl.end" unifi-date-interval-selector-on-change="statisticsSwitchCtrl.updateReports(start, end)"></unifi-date-interval-selector></div><div ng-if="statisticsSwitchCtrl.device" class="appActionBarFilter appActionBarFilter--noBorder"><div ng-click="statisticsSwitchCtrl.toggleSortDropdown()" on-outside-element-click="statisticsSwitchCtrl.closeSortDropdown()" class="appMainButton appMainButton--filter appMainButton--cozy appMainButton--withDropdown">{{\'STATISTICS_ORDER_BY\' | translate}}: {{statisticsSwitchCtrl.order.translationKey | translate}}<span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{\'is-dropdown-visible\': statisticsSwitchCtrl.isSortDropdownVisible}" class="appDropdown appDropdown--left appDropdown--inButton"><li ng-repeat="order in statisticsSwitchCtrl.sortOrders" ng-click="statisticsSwitchCtrl.order = order" class="appDropdown__item">{{order.translationKey | translate}}</li></ul></div></div></div></div></div></div><div ng-if="statisticsSwitchCtrl.device" class="container container--comfy fullWidth unifiStatisticsContainer unifiStatisticsHeader"><div class="row verticalRhythmTopHalf"><div class="col--sm12 col--md6 col--xlg5 col--xlgOffset1 verticalRhythmHalf"><unifi-switch-diagram unifi-switch-diagram-model="statisticsSwitchCtrl.device" unifi-switch-diagram-model-is-disabled="false" unifi-switch-diagram-is-port-selected="statisticsSwitchCtrl.isPortSelected(model)" unifi-switch-diagram-toggle-port-selection="statisticsSwitchCtrl.togglePortSelection(model, isSelected)"></unifi-switch-diagram></div><div class="col--sm12 col--md6 col--xlg5"><div class="row appSubHeading--standalone"><div unifi-switch-diagram-keys="statisticsSwitchCtrl.device" class="col--xs12"></div></div><div class="row row--smash verticalRhythmTopHalf"><div class="col--xs5 col--smash alignCenter"><div class="appSubHeading inlineBlock"><a unifi-open-panel="statisticsSwitchCtrl.device" unifi-open-panel-active-tab="\'details\'"><span unifi-device-status="statisticsSwitchCtrl.device" unifi-device-status-is-cozy="true" unifi-device-status-with-icons="true" unifi-device-status-label="statisticsSwitchCtrl.device.getDisplayName()" class="noWrap"></span></a></div></div><div class="col--xs4 alignCenter"><div class="iconText appIconText inlineBlock"><span class="iconText__icon icon ubnt-icon--statistics download"></span><span class="iconText__text">{{\'SWITCH_PORT_USAGE_RX\' | translate}}</span></div></div><div class="col--xs3 alignCenter"><div class="iconText appIconText inlineBlock"><span class="iconText__icon icon ubnt-icon--statistics upload"></span><span class="iconText__text">{{\'SWITCH_PORT_USAGE_TX\' | translate}}</span></div></div></div></div></div></div><div class="appScrollable appScrollable--centerPanel flexFlag__body"><div class="unifiSmartMarginContainer"><div ng-if="!statisticsSwitchCtrl.device" class="verticalRhythmTop"><div class="appInfoBox appInfoBox--centered appInfoBox--solid"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="STATISTICS_SWITCH_NO_SWITCH_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="STATISTICS_SWITCH_NO_SWITCH_MESSAGE"></p></div></div></div></div><div ng-if="statisticsSwitchCtrl.device" class="container container--comfy"><div class="row verticalRhythmTopHalf"><div ng-repeat="port in statisticsSwitchCtrl.ports | filter:statisticsSwitchCtrl.filter() | orderBy:statisticsSwitchCtrl.orderBy()" class="col--md12 col--lg6 col--comfy"><unifi-switch-port-usage unifi-switch-port-usage-port="port" unifi-switch-port-usage-device="statisticsSwitchCtrl.device"></unifi-switch-port-usage></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1427:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.deviceAdoptStrategy=a,this.deviceStateUtils=b,this.deviceUtils=c,this.DEVICE_STATES=d,this.heyToasts=f,e.call(this,g),h(this)}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){var a=this.deviceStateUtils.getDeviceState(this.model);this.isApplicable=[this.DEVICE_STATES.PENDING,this.DEVICE_STATES.ADOPTION_REQUIRED,this.DEVICE_STATES.ADOPTING].indexOf(a)!==-1,this.isPending=a===this.DEVICE_STATES.ADOPTING},d.prototype.updateCollection=function(a){this.collection=a},d.prototype.showButton=function(){return e.prototype.showButton.call(this)&&("ugw"!==this.model.get("type")||this.deviceUtils.isGatewayAdoptable(this.model,this.collection))},d.prototype.adopt=function(a){return a.preventDefault(),a.stopPropagation(),this.isPending=!0,this.deviceAdoptStrategy.adoptDevice(this.model,this.getSiteModel()).then(function(a){return this.onSuccess&&this.onSuccess(),this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),this.isPending=!1,!1}.bind(this))},d.$inject=["deviceAdoptStrategy","deviceStateUtils","deviceUtils","DEVICE_STATES","heyToasts","account","buttonHasSitePermissionControllerMixin"],angular.module("base-unifi-device").controller("DeviceButtonAdoptController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],1428:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="deviceButtonAdoptCtrl.showButton()" ng-click="deviceButtonAdoptCtrl.adopt($event)" ng-class="{\'is-responsive\': isResponsive}" ng-disabled="deviceButtonAdoptCtrl.isPending" title="{{\'DEVICE_ACTIONS_ADOPT\' | translate}}" unifi-fix-disabled><span ng-class="deviceButtonAdoptCtrl.isPending &amp;&amp; isLabeled ? \'ubnt-icon--clock-2\' : (isReverse ? \'ubnt-icon--plus\' : \'ubnt-icon--plus-circle\')" class="button__icon icon"></span><span ng-if="::isLabeled" translate="DEVICE_ACTIONS_ADOPT" class="button__label"></span></div>'),b.join("")}},{"jade/runtime":232}],1429:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceButtonAdopt",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDeviceButtonAdopt",collection:"=unifiDeviceButtonAdoptCollection",isLabeled:"=unifiDeviceButtonAdoptIsLabeled",isResponsive:"=unifiDeviceButtonAdoptIsResponsive",isReverse:"=unifiDeviceButtonAdoptIsReverse",withSite:"=unifiDeviceButtonAdoptWithSite",onSuccess:"&?unifiDeviceButtonAdoptOnSuccess"},controller:"DeviceButtonAdoptController",controllerAs:"deviceButtonAdoptCtrl",replace:!0,template:a("./deviceButtonAdopt.jade")(),link:function(a,c,d,e){e.siteName=a.withSite,e.onSuccess=a.onSuccess;var f=a.$watch("collection",function(b){e.updateCollection(b),a.isOneTimeBinding&&f()});b.init(a,c,d,e,!0),a.$on("$destroy",function(){e.removeEventHandlers()})}}}])},{"./deviceButtonAdopt.jade":1428}],1430:[function(a,b,c){"use strict";function d(a,b,c){this.deviceUtils=a,this.heyToasts=b,this.hasPermission=c.isAdmin.bind(c)}d.prototype.showButton=function(){return this.hasPermission()},d.prototype.link=function(a){return a.preventDefault(),a.stopPropagation(),this.isPending=!0,this.deviceUtils.linkDevices(this.uplink,this.downlink).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isPending=!1}.bind(this))},d.$inject=["deviceUtils","heyToasts","account"],angular.module("base-unifi-device").controller("DeviceButtonLinkController",d)},{}],1431:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="deviceButtonLinkCtrl.showButton()" ng-click="deviceButtonLinkCtrl.link($event)" ng-class="{\'is-responsive\': isResponsive}" ng-disabled="deviceButtonLinkCtrl.isPending" title="{{\'DEVICE_ACTIONS_LINK\' | translate}}" unifi-fix-disabled><span ng-class="deviceButtonLinkCtrl.isPending &amp;&amp; isLabeled ? \'ubnt-icon--clock-2\' : \'ubnt-icon--link\'" class="button__icon icon"></span><span ng-if="deviceButtonLinkCtrl.isLabeled" translate="DEVICE_ACTIONS_LINK" class="button__label"></span></div>'),b.join("")}},{"jade/runtime":232}],1432:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceButtonLink",[function(){return{scope:{uplink:"=unifiDeviceButtonLinkUplink",downlink:"=unifiDeviceButtonLinkDownlink",isLabeled:"=unifiDeviceButtonLinkIsLabeled",isResponsive:"=unifiDeviceButtonLinkIsResponsive"},controller:"DeviceButtonLinkController",controllerAs:"deviceButtonLinkCtrl",bindToController:!0,replace:!0,template:a("./deviceButtonLink.jade")()}}])},{"./deviceButtonLink.jade":1431}],1433:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$injector=a,this.deviceUtils=b,this.deviceStateUtils=c,this.DEVICE_STATES=d,this.heyToasts=f,e.call(this,g),h(this),this.isLocating=!1}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.isApplicable=this.deviceStateUtils.getRawDeviceState(this.model)===this.DEVICE_STATES.CONNECTED,this.isLocating=this.model.get("locating")},d.prototype.toggle=function(a){return a.preventDefault(),a.stopPropagation(),this.isPending=!0,this.deviceUtils.locateDevice(this.model,void 0,this.getSiteModel()).then(function(a){if(this.model.get("locating")&&this.locateOnMap){var b=this.$injector.get("mapUtils");b.locateDevice(this.model)}return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isPending=!1}.bind(this))},d.$inject=["$injector","deviceUtils","deviceStateUtils","DEVICE_STATES","heyToasts","account","buttonHasSitePermissionControllerMixin"],angular.module("base-unifi-device").controller("DeviceButtonLocateController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],1434:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="deviceButtonLocateCtrl.showButton()" ng-click="deviceButtonLocateCtrl.toggle($event)" ng-class="{    \'is-button-notifying\': deviceButtonLocateCtrl.isLocating,    \'is-responsive\': isResponsive  }" title="{{\'DEVICE_ACTIONS_LOCATE\' | translate}}"><span ng-class="deviceButtonLocateCtrl.isLocating &amp;&amp; isLabeled ? \'ubnt-icon--check-2\' : \'ubnt-icon--location-2\'" class="button__icon icon"></span><span ng-if="::isLabeled" translate="DEVICE_ACTIONS_LOCATE" class="button__label"></span></div>'),b.join("")}},{"jade/runtime":232}],1435:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceButtonLocate",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDeviceButtonLocate",isLabeled:"=unifiDeviceButtonLocateIsLabeled",isResponsive:"=unifiDeviceButtonLocateIsResponsive",withSite:"=unifiDeviceButtonLocateWithSite",withMap:"=unifiDeviceButtonLocateWithMap"},controller:"DeviceButtonLocateController",controllerAs:"deviceButtonLocateCtrl",replace:!0,template:a("./deviceButtonLocate.jade")(),link:function(a,c,d,e){e.siteName=a.withSite,e.locateOnMap=a.withMap,a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./deviceButtonLocate.jade":1434}],1436:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j){this.$q=a,this.deviceUtils=b,this.deviceStateUtils=c,this.DEVICE_STATES=d,this.frame=f,this.heyToasts=g,this.preferences=i,e.call(this,h),j(this)}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){var a=this.deviceStateUtils.getDeviceState(this.model);this.isApplicable=[this.DEVICE_STATES.CONNECTED,this.DEVICE_STATES.RESTARTING].indexOf(a)!==-1,this.isPending=a===this.DEVICE_STATES.RESTARTING},d.prototype.restart=function(a){a.preventDefault(),a.stopPropagation();var b,c,d=this.withHardReboot||"ugw"===this.model.get("type"),e=this.preferences.model.get("bypassConfirmRestart")!==!0;return b=e||d?this.frame.show("confirmRestart",{device:function(){return this.model}.bind(this),withHardReboot:function(){return this.withHardReboot}.bind(this),bypassFlag:function(){return d?void 0:"bypassConfirmRestart"}}).then(function(a){c=a}):this.$q.when(),b.then(function(){return this.isPending=!0,this.deviceUtils.restartDevice(this.model,c,this.getSiteModel()).then(function(a){return this.onSuccess&&this.onSuccess(),this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),this.isPending=!1,!1}.bind(this))}.bind(this))},d.$inject=["$q","deviceUtils","deviceStateUtils","DEVICE_STATES","frame","heyToasts","account","preferences","buttonHasSitePermissionControllerMixin"],angular.module("base-unifi-device").controller("DeviceButtonRestartController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],1437:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="deviceButtonRestartCtrl.showButton()" ng-click="deviceButtonRestartCtrl.restart($event)" ng-class="{\'is-responsive\': isResponsive}" ng-disabled="deviceButtonRestartCtrl.isPending" title="{{\'DEVICE_ACTIONS_RESTART\' | translate}}" unifi-fix-disabled><span ng-class="deviceButtonRestartCtrl.isPending &amp;&amp; isLabeled ? \'ubnt-icon--clock-2\' : \'ubnt-icon--restart\'" class="button__icon icon"></span><span ng-if="::isLabeled" translate="DEVICE_ACTIONS_RESTART" class="button__label"></span></div>'),b.join("")}},{"jade/runtime":232}],1438:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceButtonRestart",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDeviceButtonRestart",isLabeled:"=unifiDeviceButtonRestartIsLabeled",isResponsive:"=unifiDeviceButtonRestartIsResponsive",withSite:"=unifiDeviceButtonRestartWithSite",withHardReboot:"=unifiDeviceButtonRestartWithHardReboot",onSuccess:"&?unifiDeviceButtonRestartOnSuccess"},controller:"DeviceButtonRestartController",controllerAs:"deviceButtonRestartCtrl",replace:!0,template:a("./deviceButtonRestart.jade")(),link:function(a,c,d,e){e.siteName=a.withSite,e.withHardReboot=a.withHardReboot,e.onSuccess=a.onSuccess,a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./deviceButtonRestart.jade":1437}],1439:[function(a,b,c){"use strict";function d(a,b,c){this.deviceUtils=a,this.heyToasts=b,this.hasPermission=c.isAdmin.bind(c)}d.prototype.showButton=function(){return this.hasPermission()},d.prototype.unlink=function(a){return a.preventDefault(),a.stopPropagation(),this.isPending=!0,this.deviceUtils.unlinkDevices(this.uplink,this.downlink).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isPending=!1}.bind(this))},d.$inject=["deviceUtils","heyToasts","account"],angular.module("base-unifi-device").controller("DeviceButtonUnlinkController",d)},{}],1440:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="deviceButtonUnlinkCtrl.showButton()" ng-click="deviceButtonUnlinkCtrl.unlink($event)" ng-class="{\'is-responsive\': isResponsive}" ng-disabled="deviceButtonUnlinkCtrl.isPending" title="{{\'DEVICE_ACTIONS_UNLINK\' | translate}}" unifi-fix-disabled><span ng-class="deviceButtonUnlinkCtrl.isPending &amp;&amp; isLabeled ? \'ubnt-icon--clock-2\' : \'ubnt-icon--trashcan\'" class="button__icon icon"></span><span ng-if="deviceButtonUnlinkCtrl.isLabeled" translate="DEVICE_ACTIONS_UNLINK" class="button__label"></span></div>'),b.join("")}},{"jade/runtime":232}],1441:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceButtonUnlink",[function(){return{scope:{uplink:"=unifiDeviceButtonUnlinkUplink",downlink:"=unifiDeviceButtonUnlinkDownlink",isLabeled:"=unifiDeviceButtonUnlinkIsLabeled",isResponsive:"=unifiDeviceButtonUnlinkIsResponsive"},controller:"DeviceButtonUnlinkController",controllerAs:"deviceButtonUnlinkCtrl",bindToController:!0,replace:!0,template:a("./deviceButtonUnlink.jade")()}}])},{"./deviceButtonUnlink.jade":1440}],1442:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.$q=a,this.$translate=b,this.deviceUtils=c,this.deviceStateUtils=d,this.DEVICE_STATES=f,this.frame=g,this.heyToasts=h,this.preferences=j,e.call(this,i),k(this)}var e=a("../../../base-unifi/controllers/BaseButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){var a=this.deviceStateUtils.getRawDeviceState(this.model);this.isApplicable=a===this.DEVICE_STATES.UPGRADING,this.model.get("upgradable")===!0&&(a===this.DEVICE_STATES.CONNECTED&&(this.isApplicable=!0),a===this.DEVICE_STATES.PENDING&&"wireless"!==this.model.getNested("uplink.type")&&(this.isApplicable=!0)),this.isPending=a===this.DEVICE_STATES.UPGRADING},d.prototype.upgrade=function(a){a.preventDefault(),a.stopPropagation();var b,c=this.preferences.model.get("bypassConfirmUpgrade")!==!0;return b=c?this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_ACTIONS_UPGRADE_CONFIRM_TITLE",{deviceName:this.model.getDisplayName()})}.bind(this),message:function(){return this.model.get("upgrade_to_firmware")?this.$translate.instant("DEVICE_ACTIONS_UPGRADE_CONFIRM_VERSION_MESSAGE",{deviceName:this.model.getDisplayName(),fromVersion:this.model.get("version"),toVersion:this.model.get("upgrade_to_firmware")}):this.$translate.instant("DEVICE_ACTIONS_UPGRADE_CONFIRM_MESSAGE",{deviceName:this.model.getDisplayName()})}.bind(this),options:function(){return{bypassFlag:"bypassConfirmUpgrade"}}}):this.$q.when(),b.then(function(){return this.isPending=!0,this.deviceUtils.upgradeDevice(this.model,void 0,this.getSiteModel()).then(function(a){return this.onSuccess&&this.onSuccess(),this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),this.isPending=!1,!1}.bind(this))}.bind(this))},d.$inject=["$q","$translate","deviceUtils","deviceStateUtils","DEVICE_STATES","frame","heyToasts","account","preferences","buttonHasSitePermissionControllerMixin"],angular.module("base-unifi-device").controller("DeviceButtonUpgradeController",d)},{"../../../base-unifi/controllers/BaseButtonController":1655}],1443:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="deviceButtonUpgradeCtrl.showButton()" ng-click="deviceButtonUpgradeCtrl.upgrade($event)" ng-class="{\'is-responsive\': isResponsive}" ng-disabled="deviceButtonUpgradeCtrl.isPending" title="{{\'DEVICE_ACTIONS_UPGRADE\' | translate}}" unifi-fix-disabled><span ng-class="deviceButtonUpgradeCtrl.isPending &amp;&amp; isLabeled ? \'ubnt-icon--clock-2\' : \'ubnt-icon--firmware-update\'" class="button__icon icon"></span><span ng-if="::isLabeled" translate="DEVICE_ACTIONS_UPGRADE" class="button__label"></span></div>'),b.join("")}},{"jade/runtime":232}],1444:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceButtonUpgrade",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDeviceButtonUpgrade",isLabeled:"=unifiDeviceButtonUpgradeIsLabeled",isResponsive:"=unifiDeviceButtonUpgradeIsResponsive",withSite:"=unifiDeviceButtonUpgradeWithSite",onSuccess:"&?unifiDeviceButtonUpgradeOnSuccess"},controller:"DeviceButtonUpgradeController",controllerAs:"deviceButtonUpgradeCtrl",replace:!0,template:a("./deviceButtonUpgrade.jade")(),link:function(a,c,d,e){e.siteName=a.withSite,e.onSuccess=a.onSuccess,a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./deviceButtonUpgrade.jade":1443}],1445:[function(a,b,c){"use strict";function d(a){this.deviceStateUtils=a,e.call(this),this.reset()}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.reset(),this.model&&(this.attrs={status:this.deviceStateUtils.getDeviceStatus(this.model),type:this.model.get("type"),model:this.model.get("model")})},d.prototype.reset=function(){this.attrs={}},d.prototype.getClassName=function(){return this.deviceStateUtils.getIconClassName(this.model)},d.$inject=["deviceStateUtils"],angular.module("base-unifi-device").controller("DeviceIconController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],1446:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<span class="unifiDeviceIcon {{deviceIconCtrl.getClassName()}}"></span>'),b.join("")}},{"jade/runtime":232}],1447:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceIcon",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDeviceIcon"},controller:"DeviceIconController",controllerAs:"deviceIconCtrl",replace:!0,restrict:"A",template:a("./deviceIcon.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./deviceIcon.jade":1446}],1448:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$translate=a,this.deviceUtils=b,this.heyToasts=c,this.frame=f,this.collectionChangeEvent="add remove reset change:upgradable change:rollupgrade",e.call(this,d),g(this)}var e=a("../../../base-unifi/controllers/BaseCollectionButtonController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){this.collection?(this.isRunning=!!this.collection.findWhere({type:"uap",rollupgrade:!0}),this.isPending=this.isRunning&&this.isCancelled||!this.isRunning&&this.isStarted||!1,this.isApplicable=this.isRunning||this.isPending||!!this.collection.findWhere({type:"uap",upgradable:!0})):(this.isApplicable=!1,this.isPending=!1,this.isRunning=!1)},d.prototype.toggle=function(a){return this.isRunning?this.cancel(a):this.upgrade(a)},d.prototype.upgrade=function(a){return a.preventDefault(),a.stopPropagation(),this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_START_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_START_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isStarted=!0,this.isCancelled=!1,this.deviceUtils.startRollingUpgrade(this.getSiteModel()).then(function(a){return this.heyToasts.pushSuccess(a),this.isPending=!0,!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),this.isStarted=!1,!1}.bind(this))}.bind(this))},d.prototype.cancel=function(a){return a.preventDefault(),a.stopPropagation(),this.frame.show("confirm",{title:function(){return this.$translate.instant("DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_STOP_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_STOP_CONFIRM_MESSAGE")}.bind(this),options:angular.noop}).then(function(){return this.isCancelled=!0,this.isStarted=!1,this.deviceUtils.stopRollingUpgrade(this.getSiteModel()).then(function(a){return this.heyToasts.pushSuccess(a),this.isPending=!0,!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),this.isCancelled=!1,!1}.bind(this))}.bind(this))},d.$inject=["$translate","deviceUtils","heyToasts","account","frame","buttonHasSitePermissionControllerMixin"],angular.module("base-unifi-device").controller("DeviceListButtonRollingUpgradeController",d)},{"../../../base-unifi/controllers/BaseCollectionButtonController":1656}],1449:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="deviceListButtonRollingUpgradeCtrl.showButton()" ng-click="deviceListButtonRollingUpgradeCtrl.toggle($event)" ng-class="{\'is-responsive\': isResponsive}" ng-disabled="deviceListButtonRollingUpgradeCtrl.isPending" title="{{deviceListButtonRollingUpgradeCtrl.isRunning ? \'DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_STOP\' : \'DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_START\' | translate}}" unifi-fix-disabled><span ng-class="{      \'ubnt-icon--firmware-update\': !deviceListButtonRollingUpgradeCtrl.isPending &amp;&amp; !deviceListButtonRollingUpgradeCtrl.isRunning,      \'ubnt-icon--minus-circle\': !deviceListButtonRollingUpgradeCtrl.isPending &amp;&amp; deviceListButtonRollingUpgradeCtrl.isRunning,      \'ubnt-icon--clock-2\': deviceListButtonRollingUpgradeCtrl.isPending    }" class="button__icon icon"></span><span ng-if="::isLabeled" translate class="button__label">{{deviceListButtonRollingUpgradeCtrl.isRunning ? \'DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_STOP\' : \'DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_START\'}}</span></div>'),b.join("")}},{"jade/runtime":232}],1450:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceListButtonRollingUpgrade",[function(){return{scope:{collection:"=unifiDeviceListButtonRollingUpgrade",isLabeled:"=unifiDeviceListButtonRollingUpgradeIsLabeled",isResponsive:"=unifiDeviceListButtonRollingUpgradeIsResponsive",withSite:"=unifiDeviceListButtonRollingUpgradeWithSite"},controller:"DeviceListButtonRollingUpgradeController",controllerAs:"deviceListButtonRollingUpgradeCtrl",replace:!0,template:a("./deviceListButtonRollingUpgrade.jade")(),link:function(a,b,c,d){d.siteName=a.withSite,a.$watch("collection",function(a){d.updateCollection(a)}),a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./deviceListButtonRollingUpgrade.jade":1449}],1451:[function(a,b,c){"use strict";function d(a){this.deviceStateUtils=a,this.statusType="status-ball",this.flags=["isSuccess","isWarning","isDanger","isStatic","isBusy","showAlertIcon","statusType"],e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateWithIcons=function(a){this.withIcons=a},d.prototype.updateIsCozy=function(a){this.isCozy=a},d.prototype.updateIsTruncated=function(a){this.isTruncated=a},d.prototype.updateLabel=function(a){this.label=a},d.prototype.onModelChange=function(){if(this.reset(),this.model){switch(this.deviceStateUtils.getDeviceStatus(this.model)){case"success":this.isSuccess=!0;break;case"warning":this.isWarning=!0;break;case"danger":this.isDanger=!0,this.showAlertIcon=!0;break;case"static":this.isStatic=!0}this.isBusy=this.deviceStateUtils.isDeviceBusy(this.model)}this.statusType=this.withIcons&&this.showAlertIcon?"status-icon":"status-ball"},d.prototype.reset=function(){angular.forEach(this.flags,function(a){this[a]=!1},this)},d.$inject=["deviceStateUtils"],angular.module("base-unifi-device").controller("DeviceStatusController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],1452:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-class=\"{'unifiDeviceStatus--cozy': deviceStatusCtrl.isCozy}\" class=\"unifiDeviceStatus\"><div ng-switch=\"deviceStatusCtrl.statusType\" class=\"unifiDeviceStatus__indicator\"><div ng-switch-when=\"status-ball\" ng-class=\"{         'appStatusBall--positive': deviceStatusCtrl.isSuccess,        'appStatusBall--warning': deviceStatusCtrl.isWarning,        'appStatusBall--danger': deviceStatusCtrl.isDanger,        'appStatusBall--static': deviceStatusCtrl.isStatic,        'appStatusBall--cozy': deviceStatusCtrl.isCozy,        'is-status-ball-busy': deviceStatusCtrl.isBusy      }\" class=\"unifiDeviceStatus__ball statusBall appStatusBall\"></div><div ng-switch-when=\"status-icon\" ng-class=\"{        'ubnt-icon--alert-fill': deviceStatusCtrl.showAlertIcon,        'appStatusIcon--positive': deviceStatusCtrl.isSuccess,        'appStatusIcon--warning': deviceStatusCtrl.isWarning,        'appStatusIcon--danger': deviceStatusCtrl.isDanger,        'appStatusIcon--static': deviceStatusCtrl.isStatic,        'appStatusIcon--cozy': deviceStatusCtrl.isCozy,        'is-status-icon-busy': deviceStatusCtrl.isBusy      }\" class=\"unifiDeviceStatus__icon icon appStatusIcon\"></div></div><div ng-if=\"deviceStatusCtrl.label\" ng-class=\"{'appStatusBallLabel--truncated': deviceStatusCtrl.isTruncated}\" class=\"appStatusBallLabel\">{{deviceStatusCtrl.label}}</div></div>"),
b.join("")}},{"jade/runtime":232}],1453:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceStatus",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDeviceStatus",withIcons:"&?unifiDeviceStatusWithIcons",isCozy:"&?unifiDeviceStatusIsCozy",isTruncated:"&?unifiDeviceStatusIsTruncated",label:"&?unifiDeviceStatusLabel"},controller:"DeviceStatusController",controllerAs:"deviceStatusCtrl",replace:!0,restrict:"A",template:a("./deviceStatus.jade")(),link:function(a,c,d,e){a.$watch("withIcons()",function(a){e.updateWithIcons(a)}),a.$watch("isCozy()",function(a){e.updateIsCozy(a)}),a.$watch("isTruncated()",function(a){e.updateIsTruncated(a)}),a.$watch("label()",function(a){e.updateLabel(a)}),a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./deviceStatus.jade":1452}],1454:[function(a,b,c){"use strict";function d(a){this.deviceStateUtils=a,e.call(this)}var e=a("../../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onModelChange=function(){this.reset(),this.model&&(this.status=this.deviceStateUtils.getDeviceStatus(this.model),this.stateString=this.deviceStateUtils.getDeviceStateString(this.model))},d.prototype.reset=function(){this.status=null,this.stateString=null},d.$inject=["deviceStateUtils"],angular.module("base-unifi-device").controller("DeviceStatusBadgeController",d)},{"../../../base-unifi/controllers/BaseModelController":1664}],1455:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<span ng-class=\"{    'appBadge--success': deviceStatusBadgeCtrl.status === 'success',    'appBadge--warning': deviceStatusBadgeCtrl.status === 'warning',    'appBadge--danger': deviceStatusBadgeCtrl.status === 'danger',    'appBadge--static': deviceStatusBadgeCtrl.status === 'static'  }\" class=\"appBadge\">{{deviceStatusBadgeCtrl.stateString}}</span>"),b.join("")}},{"jade/runtime":232}],1456:[function(a,b,c){"use strict";angular.module("base-unifi-device").directive("unifiDeviceStatusBadge",["updateModelDirectiveMixin",function(b){return{scope:{model:"=unifiDeviceStatusBadge"},controller:"DeviceStatusBadgeController",controllerAs:"deviceStatusBadgeCtrl",replace:!0,restrict:"A",template:a("./deviceStatusBadge.jade")(),link:function(a,c,d,e){a.$on("$destroy",function(){e.removeEventHandlers()}),b.init(a,c,d,e,!0)}}}])},{"./deviceStatusBadge.jade":1455}],1457:[function(a,b,c){"use strict";angular.module("base-unifi-device").config(["frameProvider",function(b){b.when("confirmRestart",{controller:"ConfirmRestartController",controllerAs:"confirmRestartCtrl",layout:"confirmLayout",template:a("../views/frames/confirmRestart.jade")()})}])},{"../views/frames/confirmRestart.jade":1514}],1458:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEFAULT_HT",{na:"40",ng:"20"})},{}],1459:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_ADOPT_L3",{CHECK_DEVICE_AFTER_SETTING_INFORM_FREQUENCY:1e3,CHECK_DEVICE_AFTER_SETTING_INFORM_MAX_ATTEMPTS:10})},{}],1460:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_CATEGORIES",{ADOPTING:"DEVICE_STATE_ADOPTING",INACTIVE:"DEVICE_CATEGORY_INACTIVE",LAN:"DEVICE_CATEGORY_LAN",MANAGED_BY_OTHER:"DEVICE_STATE_MANAGED_BY_OTHER",PENDING:"DEVICE_STATE_PENDING",PHONE:"DEVICE_CATEGORY_PHONE",WLAN:"DEVICE_CATEGORY_WLAN",WAN:"DEVICE_CATEGORY_WAN"})},{}],1461:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_INFORM",{DEFAULT_PORT:"8080",DEFAULT_HOST:"unifi.yourdomain.com",ENDPOINT:"/inform",PROTOCOL:"http://"})},{}],1462:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_LICENSE_STATES",{REGISTERED:"registered",REGISTRATION_FAILED:"registration_failed",GRACE_PERIOD:"grace_period"})},{}],1463:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_MODELS",a("../../../../node_modules/constant-unifi/src/json/deviceModels.json"))},{"../../../../node_modules/constant-unifi/src/json/deviceModels.json":230}],1464:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_STATES",{CONNECTED:"DEVICE_STATE_CONNECTED",PENDING:"DEVICE_STATE_PENDING",FIRMWARE_MISMATCH:"DEVICE_STATE_FIRMWARE_MISMATCH",UPGRADING:"DEVICE_STATE_UPGRADING",PROVISIONING:"DEVICE_STATE_PROVISIONING",HEARTBEAT_MISSED:"DEVICE_STATE_HEARTBEAT_MISSED",ADOPTING:"DEVICE_STATE_ADOPTING",DELETING:"DEVICE_STATE_DELETING",DISCONNECTED:"DEVICE_STATE_DISCONNECTED",RESTARTING:"DEVICE_STATE_RESTARTING",INFORM_ERROR:"DEVICE_STATE_INFORM_ERROR",ADOPTION_REQUIRED:"DEVICE_STATE_ADOPTION_REQUIRED",ADOPTION_FAILED:"DEVICE_STATE_ADOPTION_FAILED",ISOLATED:"DEVICE_STATE_ISOLATED",RFSCANNING:"DEVICE_STATE_RFSCANNING",MANAGED_BY_OTHER:"DEVICE_STATE_MANAGED_BY_OTHER",UNKNOWN:"DEVICE_STATE_UNKNOWN"})},{}],1465:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_STATE_FLAGS",{ISOLATED:"DEVICE_STATE_FLAG_ISOLATED",LOCALLY_DISCOVERED:"DEVICE_STATE_FLAG_LOCALLY_DISCOVERED",WIRELESS:"DEVICE_STATE_FLAG_WIRELESS",WIRED_FULL_DUPLEX:"DEVICE_STATE_FLAG_WIRED_FULL_DUPLEX",WIRED_HALF_DUPLEX:"DEVICE_STATE_FLAG_WIRED_HALF_DUPLEX",NEEDS_UPGRADE:"DEVICE_STATE_FLAG_NEEDS_UPGRADE",LICENSE_GRACE_PERIOD:"DEVICE_STATE_FLAG_LICENSE_GRACE_PERIOD",LICENSE_REGISTRATION_FAILED:"DEVICE_STATE_FLAG_LICENSE_REGISTRATION_FAILED",DISABLED:"DEVICE_STATE_FLAG_DISABLED",MIGRATED:"DEVICE_STATE_FLAG_MIGRATED"})},{}],1466:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_STATE_IDS",{DISCONNECTED:0,CONNECTED:1,PENDING:2,FIRMWARE_MISMATCH:3,UPGRADING:4,PROVISIONING:5,HEARTBEAT_MISSED:6,ADOPTING:7,DELETING:8,INFORM_ERROR:9,ADOPTION_FAILED:10,ISOLATED:11})},{}],1467:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DEVICE_TYPES",{AP:"uap",GATEWAY:"ugw",PHONE:"uph",SWITCH:"usw"})},{}],1468:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("DISCOVERED_DEVICE",{LAST_SEEN_TIMEOUT:300})},{}],1469:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("FIRMWARE_CAPS",{SSH:1,STA_STAT:2,UTERM:4,DNSMASQ:8,QCASWITCH:16,FWUPDATE:32,DPI:64,LAG:128})},{}],1470:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("NETWORK_DEFAULTS",{MAX_DHCP_LEASES:5e5})},{}],1471:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("POE_CAPS",{"8023AF":1,"8023AT":2,PASV24:4,PASSTHROUGH:8})},{}],1472:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("POE_VOLTAGE",{PASV24:"24.00",POE_PLUS:"48.00"})},{}],1473:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("RADIO_STATES",{DFS_WAIT:"DFS_WAIT",INIT:"INIT",RUN:"RUN"})},{}],1474:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("RADIO_TYPES",{NA:{type:"na",frequency:"5 GHz"},NG:{type:"ng",frequency:"2.4 GHz"}})},{}],1475:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("WIFI_CAPS",{VWIRE:1,ZERO_HANDOFF:2,BANDSTEER:4,BANDSTEER_PER_VAP:8,RF_SCAN:16,AIRTIME_CONFIG:32,BGA_FILTER:64,MESH:128,MIN_RSSI_STRICT_MODE:256})},{}],1476:[function(a,b,c){"use strict";angular.module("base-unifi-device").constant("WIFI_CHANNELS",{ng:{20:{1:{lowerFrequency:2401,centerFrequency:2412,upperFrequency:2423,subChannels:[1]},2:{lowerFrequency:2406,centerFrequency:2417,upperFrequency:2428,subChannels:[2]},3:{lowerFrequency:2411,centerFrequency:2422,upperFrequency:2433,subChannels:[3]},4:{lowerFrequency:2416,centerFrequency:2427,upperFrequency:2438,subChannels:[4]},5:{lowerFrequency:2421,centerFrequency:2432,upperFrequency:2443,subChannels:[5]},6:{lowerFrequency:2426,centerFrequency:2437,upperFrequency:2448,subChannels:[6]},7:{lowerFrequency:2431,centerFrequency:2442,upperFrequency:2453,subChannels:[7]},8:{lowerFrequency:2436,centerFrequency:2447,upperFrequency:2458,subChannels:[8]},9:{lowerFrequency:2441,centerFrequency:2452,upperFrequency:2463,subChannels:[9]},10:{lowerFrequency:2446,centerFrequency:2457,upperFrequency:2468,subChannels:[10]},11:{lowerFrequency:2451,centerFrequency:2462,upperFrequency:2473,subChannels:[11]},12:{lowerFrequency:2456,centerFrequency:2467,upperFrequency:2478,subChannels:[12]},13:{lowerFrequency:2461,centerFrequency:2472,upperFrequency:2483,subChannels:[13]},14:{lowerFrequency:2473,centerFrequency:2484,upperFrequency:2495,subChannels:[14]}},40:{3:{lowerFrequency:2401,centerFrequency:2422,upperFrequency:2443,subChannels:[1,5]},4:{lowerFrequency:2406,centerFrequency:2427,upperFrequency:2448,subChannels:[2,6]},5:{lowerFrequency:2411,centerFrequency:2432,upperFrequency:2453,subChannels:[3,7]},6:{lowerFrequency:2416,centerFrequency:2437,upperFrequency:2458,subChannels:[4,8]},7:{lowerFrequency:2421,centerFrequency:2442,upperFrequency:2463,subChannels:[5,9]},8:{lowerFrequency:2426,centerFrequency:2447,upperFrequency:2468,subChannels:[6,10]},9:{lowerFrequency:2431,centerFrequency:2452,upperFrequency:2473,subChannels:[7,11]},10:{lowerFrequency:2436,centerFrequency:2457,upperFrequency:2478,subChannels:[8,12]},11:{lowerFrequency:2441,centerFrequency:2462,upperFrequency:2483,subChannels:[9,13]}}},na:{20:{7:{lowerFrequency:5030,centerFrequency:5035,upperFrequency:5040,subChannels:[7]},8:{lowerFrequency:5030,centerFrequency:5040,upperFrequency:5050,subChannels:[8]},9:{lowerFrequency:5040,centerFrequency:5045,upperFrequency:5050,subChannels:[9]},11:{lowerFrequency:5050,centerFrequency:5055,upperFrequency:5060,subChannels:[11]},12:{lowerFrequency:5050,centerFrequency:5060,upperFrequency:5070,subChannels:[12]},16:{lowerFrequency:5070,centerFrequency:5080,upperFrequency:5090,subChannels:[16]},36:{lowerFrequency:5170,centerFrequency:5180,upperFrequency:5190,subChannels:[36]},40:{lowerFrequency:5190,centerFrequency:5200,upperFrequency:5210,subChannels:[40]},44:{lowerFrequency:5210,centerFrequency:5220,upperFrequency:5230,subChannels:[44]},48:{lowerFrequency:5230,centerFrequency:5240,upperFrequency:5250,subChannels:[48]},52:{lowerFrequency:5250,centerFrequency:5260,upperFrequency:5270,subChannels:[52]},56:{lowerFrequency:5270,centerFrequency:5280,upperFrequency:5290,subChannels:[56]},60:{lowerFrequency:5290,centerFrequency:5300,upperFrequency:5310,subChannels:[60]},64:{lowerFrequency:5310,centerFrequency:5320,upperFrequency:5330,subChannels:[64]},100:{lowerFrequency:5490,centerFrequency:5500,upperFrequency:5510,subChannels:[100]},104:{lowerFrequency:5510,centerFrequency:5520,upperFrequency:5530,subChannels:[104]},108:{lowerFrequency:5530,centerFrequency:5540,upperFrequency:5550,subChannels:[108]},112:{lowerFrequency:5550,centerFrequency:5560,upperFrequency:5570,subChannels:[112]},116:{lowerFrequency:5570,centerFrequency:5580,upperFrequency:5590,subChannels:[116]},120:{lowerFrequency:5590,centerFrequency:5600,upperFrequency:5610,subChannels:[120]},124:{lowerFrequency:5610,centerFrequency:5620,upperFrequency:5630,subChannels:[124]},128:{lowerFrequency:5630,centerFrequency:5640,upperFrequency:5650,subChannels:[128]},132:{lowerFrequency:5650,centerFrequency:5660,upperFrequency:5670,subChannels:[132]},136:{lowerFrequency:5670,centerFrequency:5680,upperFrequency:5690,subChannels:[136]},140:{lowerFrequency:5690,centerFrequency:5700,upperFrequency:5710,subChannels:[140]},144:{lowerFrequency:5710,centerFrequency:5720,upperFrequency:5730,subChannels:[144]},149:{lowerFrequency:5735,centerFrequency:5745,upperFrequency:5755,subChannels:[149]},153:{lowerFrequency:5755,centerFrequency:5765,upperFrequency:5775,subChannels:[153]},157:{lowerFrequency:5775,centerFrequency:5785,upperFrequency:5795,subChannels:[157]},161:{lowerFrequency:5795,centerFrequency:5805,upperFrequency:5815,subChannels:[161]},165:{lowerFrequency:5815,centerFrequency:5825,upperFrequency:5835,subChannels:[165]},183:{lowerFrequency:4910,centerFrequency:4915,upperFrequency:4920,subChannels:[183]},184:{lowerFrequency:4910,centerFrequency:4920,upperFrequency:4930,subChannels:[184]},185:{lowerFrequency:4920,centerFrequency:4925,upperFrequency:4930,subChannels:[185]},187:{lowerFrequency:4930,centerFrequency:4935,upperFrequency:4940,subChannels:[187]},188:{lowerFrequency:4930,centerFrequency:4940,upperFrequency:4950,subChannels:[188]},189:{lowerFrequency:4940,centerFrequency:4945,upperFrequency:4950,subChannels:[189]},192:{lowerFrequency:4950,centerFrequency:4960,upperFrequency:4970,subChannels:[192]},196:{lowerFrequency:4970,centerFrequency:4980,upperFrequency:4990,subChannels:[196]}},40:{38:{lowerFrequency:5170,centerFrequency:5190,upperFrequency:5210,subChannels:[36,40]},46:{lowerFrequency:5210,centerFrequency:5230,upperFrequency:5250,subChannels:[44,48]},54:{lowerFrequency:5250,centerFrequency:5270,upperFrequency:5290,subChannels:[52,56]},62:{lowerFrequency:5290,centerFrequency:5310,upperFrequency:5330,subChannels:[60,64]},102:{lowerFrequency:5490,centerFrequency:5510,upperFrequency:5530,subChannels:[100,104]},110:{lowerFrequency:5530,centerFrequency:5550,upperFrequency:5570,subChannels:[108,112]},118:{lowerFrequency:5570,centerFrequency:5590,upperFrequency:5610,subChannels:[116,120]},126:{lowerFrequency:5610,centerFrequency:5630,upperFrequency:5650,subChannels:[124,128]},134:{lowerFrequency:5650,centerFrequency:5670,upperFrequency:5690,subChannels:[132,136]},142:{lowerFrequency:5690,centerFrequency:5710,upperFrequency:5730,subChannels:[140,144]},151:{lowerFrequency:5735,centerFrequency:5755,upperFrequency:5775,subChannels:[149,153]},159:{lowerFrequency:5775,centerFrequency:5795,upperFrequency:5815,subChannels:[157,161]}},80:{42:{lowerFrequency:5170,centerFrequency:5190,upperFrequency:5250,subChannels:[36,40,44,48]},58:{lowerFrequency:5250,centerFrequency:5270,upperFrequency:5330,subChannels:[52,56,60,64]},106:{lowerFrequency:5490,centerFrequency:5510,upperFrequency:5570,subChannels:[100,104,108,112]},122:{lowerFrequency:5570,centerFrequency:5590,upperFrequency:5650,subChannels:[116,120,124,128]},138:{lowerFrequency:5650,centerFrequency:5670,upperFrequency:5730,subChannels:[132,136,140,144]},155:{lowerFrequency:5735,centerFrequency:5755,upperFrequency:5815,subChannels:[149,153,157,161]}}}})},{}],1477:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.frame=c,this.deviceName=d.getDisplayName(),this.withHardReboot=f,e.call(this,a,b,c,{bypassFlag:g})}var e=a("../../base-unifi/controllers/BaseConfirmController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.resolve=function(){var a=this.hardReboot?{rebootType:"hard"}:{};return e.prototype.resolve.call(this,a)},d.$inject=["$rootScope","$timeout","frame","device","withHardReboot","bypassFlag"],angular.module("base-unifi-device").controller("ConfirmRestartController",d)},{"../../base-unifi/controllers/BaseConfirmController":1658}],1478:[function(a,b,c){"use strict";angular.module("base-unifi-device").filter("loadAvg",["$translate",function(a){return function(b){b=b||{};var c=function(b){return b?parseFloat(Math.round(100*b)/100).toFixed(2):a.instant("COMMON_VALUE_UNDEFINED")};return[c(b.loadavg_1),c(b.loadavg_5),c(b.loadavg_15)].join(" / ")}}])},{}],1479:[function(a,b,c){"use strict";a("../base-unifi/main"),a("../shared-unifi-device/main"),a("../shared-unifi-discovery/main"),angular.module("base-unifi-device",["base-unifi","shared-unifi-device","shared-unifi-discovery"]),a("./components/deviceButtonAdopt/DeviceButtonAdoptController.js"),a("./components/deviceButtonAdopt/deviceButtonAdopt.js"),a("./components/deviceButtonLink/DeviceButtonLinkController.js"),a("./components/deviceButtonLink/deviceButtonLink.js"),a("./components/deviceButtonLocate/DeviceButtonLocateController.js"),a("./components/deviceButtonLocate/deviceButtonLocate.js"),a("./components/deviceButtonRestart/DeviceButtonRestartController.js"),a("./components/deviceButtonRestart/deviceButtonRestart.js"),a("./components/deviceButtonUnlink/DeviceButtonUnlinkController.js"),a("./components/deviceButtonUnlink/deviceButtonUnlink.js"),a("./components/deviceButtonUpgrade/DeviceButtonUpgradeController.js"),a("./components/deviceButtonUpgrade/deviceButtonUpgrade.js"),a("./components/deviceIcon/DeviceIconController.js"),a("./components/deviceIcon/deviceIcon.js"),a("./components/deviceListButtonRollingUpgrade/DeviceListButtonRollingUpgradeController.js"),a("./components/deviceListButtonRollingUpgrade/deviceListButtonRollingUpgrade.js"),a("./components/deviceStatus/DeviceStatusController.js"),a("./components/deviceStatus/deviceStatus.js"),a("./components/deviceStatusBadge/DeviceStatusBadgeController.js"),a("./components/deviceStatusBadge/deviceStatusBadge.js"),a("./config/frames.js"),a("./constants/DEFAULT_HT.js"),a("./constants/DEVICE_ADOPT_L3.js"),a("./constants/DEVICE_CATEGORIES.js"),a("./constants/DEVICE_INFORM.js"),a("./constants/DEVICE_LICENSE_STATES.js"),a("./constants/DEVICE_MODELS.js"),a("./constants/DEVICE_STATES.js"),a("./constants/DEVICE_STATE_FLAGS.js"),a("./constants/DEVICE_STATE_IDS.js"),a("./constants/DEVICE_TYPES.js"),a("./constants/DISCOVERED_DEVICE.js"),a("./constants/FIRMWARE_CAPS.js"),a("./constants/NETWORK_DEFAULTS.js"),a("./constants/POE_CAPS.js"),a("./constants/POE_VOLTAGE.js"),a("./constants/RADIO_STATES.js"),a("./constants/RADIO_TYPES.js"),a("./constants/WIFI_CAPS.js"),a("./constants/WIFI_CHANNELS.js"),a("./controllers/ConfirmRestartController.js"),a("./filters/loadAvg.js"),a("./services/collections/DeviceCollection.js"),a("./services/collections/WirelessNetworkCollection.js"),a("./services/collections/WirelessNetworkGroupCollection.js"),a("./services/comparators/devicesComparator.js"),a("./services/controllerMixins/buttonHasSitePermissionControllerMixin.js"),a("./services/countryChannels.js"),a("./services/deviceAdoptL3Utils.js"),a("./services/deviceAdoptStrategy.js"),a("./services/deviceCategoryUtils.js"),a("./services/deviceChannelUtils.js"),a("./services/deviceDiscoveryUtils.js"),a("./services/deviceFeatureUtils.js"),a("./services/deviceInformUtils.js"),a("./services/deviceRadioUtils.js"),a("./services/deviceStateUtils.js"),a("./services/deviceUtils.js"),a("./services/deviceWlanGroupUtils.js"),a("./services/devices.js"),a("./services/discoveredDeviceUtils.js"),a("./services/discoveredDevices.js"),a("./services/filters/PendingAdoptionDeviceFilter.js"),a("./services/filters/WirelessNetworkFilter.js"),a("./services/ipMatchUtils.js"),a("./services/ipUtils.js"),a("./services/models/CountryChannelsModel.js"),a("./services/models/DeviceModel.js"),a("./services/models/DpiStatsModel.js"),a("./services/models/SpectrumScanModel.js"),a("./services/models/WirelessNetworkGroupModel.js"),a("./services/models/WirelessNetworkModel.js"),a("./services/portFeatureUtils.js"),a("./services/validators/deviceModelFeatureValidator.js"),a("./services/wirelessNetworkGroups.js"),a("./services/wirelessNetworks.js")},{"../base-unifi/main":1685,"../shared-unifi-device/main":1800,"../shared-unifi-discovery/main":1816,"./components/deviceButtonAdopt/DeviceButtonAdoptController.js":1427,"./components/deviceButtonAdopt/deviceButtonAdopt.js":1429,"./components/deviceButtonLink/DeviceButtonLinkController.js":1430,"./components/deviceButtonLink/deviceButtonLink.js":1432,"./components/deviceButtonLocate/DeviceButtonLocateController.js":1433,"./components/deviceButtonLocate/deviceButtonLocate.js":1435,"./components/deviceButtonRestart/DeviceButtonRestartController.js":1436,"./components/deviceButtonRestart/deviceButtonRestart.js":1438,"./components/deviceButtonUnlink/DeviceButtonUnlinkController.js":1439,"./components/deviceButtonUnlink/deviceButtonUnlink.js":1441,"./components/deviceButtonUpgrade/DeviceButtonUpgradeController.js":1442,"./components/deviceButtonUpgrade/deviceButtonUpgrade.js":1444,"./components/deviceIcon/DeviceIconController.js":1445,"./components/deviceIcon/deviceIcon.js":1447,"./components/deviceListButtonRollingUpgrade/DeviceListButtonRollingUpgradeController.js":1448,"./components/deviceListButtonRollingUpgrade/deviceListButtonRollingUpgrade.js":1450,"./components/deviceStatus/DeviceStatusController.js":1451,"./components/deviceStatus/deviceStatus.js":1453,"./components/deviceStatusBadge/DeviceStatusBadgeController.js":1454,"./components/deviceStatusBadge/deviceStatusBadge.js":1456,"./config/frames.js":1457,"./constants/DEFAULT_HT.js":1458,"./constants/DEVICE_ADOPT_L3.js":1459,"./constants/DEVICE_CATEGORIES.js":1460,"./constants/DEVICE_INFORM.js":1461,"./constants/DEVICE_LICENSE_STATES.js":1462,"./constants/DEVICE_MODELS.js":1463,"./constants/DEVICE_STATES.js":1464,"./constants/DEVICE_STATE_FLAGS.js":1465,"./constants/DEVICE_STATE_IDS.js":1466,"./constants/DEVICE_TYPES.js":1467,"./constants/DISCOVERED_DEVICE.js":1468,"./constants/FIRMWARE_CAPS.js":1469,"./constants/NETWORK_DEFAULTS.js":1470,"./constants/POE_CAPS.js":1471,"./constants/POE_VOLTAGE.js":1472,"./constants/RADIO_STATES.js":1473,"./constants/RADIO_TYPES.js":1474,"./constants/WIFI_CAPS.js":1475,"./constants/WIFI_CHANNELS.js":1476,"./controllers/ConfirmRestartController.js":1477,"./filters/loadAvg.js":1478,"./services/collections/DeviceCollection.js":1480,"./services/collections/WirelessNetworkCollection.js":1481,"./services/collections/WirelessNetworkGroupCollection.js":1482,"./services/comparators/devicesComparator.js":1483,"./services/controllerMixins/buttonHasSitePermissionControllerMixin.js":1484,"./services/countryChannels.js":1485,"./services/deviceAdoptL3Utils.js":1486,"./services/deviceAdoptStrategy.js":1487,"./services/deviceCategoryUtils.js":1488,"./services/deviceChannelUtils.js":1489,"./services/deviceDiscoveryUtils.js":1490,"./services/deviceFeatureUtils.js":1491,"./services/deviceInformUtils.js":1492,"./services/deviceRadioUtils.js":1493,"./services/deviceStateUtils.js":1494,"./services/deviceUtils.js":1495,"./services/deviceWlanGroupUtils.js":1496,"./services/devices.js":1497,"./services/discoveredDeviceUtils.js":1498,"./services/discoveredDevices.js":1499,"./services/filters/PendingAdoptionDeviceFilter.js":1500,"./services/filters/WirelessNetworkFilter.js":1501,"./services/ipMatchUtils.js":1502,"./services/ipUtils.js":1503,"./services/models/CountryChannelsModel.js":1504,"./services/models/DeviceModel.js":1505,"./services/models/DpiStatsModel.js":1506,"./services/models/SpectrumScanModel.js":1507,"./services/models/WirelessNetworkGroupModel.js":1508,"./services/models/WirelessNetworkModel.js":1509,"./services/portFeatureUtils.js":1510,"./services/validators/deviceModelFeatureValidator.js":1511,"./services/wirelessNetworkGroups.js":1512,"./services/wirelessNetworks.js":1513}],1480:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("DeviceCollection",["CORSCollection","DeviceModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({_isActiveSiteOptional:!0,model:b,siteUrl:"stat/device"})}])},{}],1481:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("WirelessNetworkCollection",["CORSCollection","WirelessNetworkModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"rest/wlanconf"})}])},{}],1482:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("WirelessNetworkGroupCollection",["CORSCollection","WirelessNetworkGroupModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({_isActiveSiteOptional:!0,model:b,siteUrl:"rest/wlangroup",getDefault:function(){return this.findWhere({attr_no_delete:!0,attr_hidden:void 0})}})}])},{}],1483:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("devicesComparator",["collectionViewComparator","deviceStateUtils","deviceWlanGroupUtils","deviceRadioUtils","deviceChannelUtils","ipUtils","DEVICE_STATES","RADIO_TYPES",function(a,b,c,d,e,f,g,h){var i={};i[g.CONNECTED]=1,i[g.CONNECTED_WIRED_FULL_DUPLEX]=1,i[g.CONNECTED_WIRED_HALF_DUPLEX]=1,i[g.UPGRADING]=2,i[g.PROVISIONING]=2,i[g.ADOPTING]=3,i[g.RESTARTING]=3,i[g.PENDING]=4,i[g.ISOLATED]=5,i[g.DELETING]=5,i[g.ADOPTION_FAILED]=6,i[g.HEARTBEAT_MISSED]=6,i[g.FIRMWARE_MISMATCH]=6,i[g.ADOPTION_REQUIRED]=6,i[g.DISCONNECTED]=7,i[g.INFORM_ERROR]=7,i[g.MANAGED_BY_OTHER]=8,i[g.UNKNOWN]=9;var j={"true":1,"false":2},k={ugw:1,usw:2,uap:3,uph:4},l=function(c,d){var e=c.get("type"),f=d.get("type");return e===f?a(b.getDeviceModel(c),b.getDeviceModel(d)):a(k[e],k[f])},m=function(c,d){var e=i[b.getDeviceState(c)],f=i[b.getDeviceState(d)];if(e===f){if(c.get("adopted")===d.get("adopted")){if(c.get("type")!==d.get("type"))return l(c,d);var g=c.get("name"),h=d.get("name");return g&&h?a(g,h):g?-1:h?1:a(c.getDisplayName(),d.getDisplayName())}return a(j[c.get("adopted")],j[d.get("adopted")])}return a(e,f)},n=function(b,c,e){var f=b.get("radio_"+e),g=c.get("radio_"+e);if(f&&g){var h=parseInt(f.channel,10),i=parseInt(g.channel,10);if(h&&i)return a(h,i);if(h)return-1;if(i)return 1;var j=parseInt(d.getChannelStateString(b,e),10),k=parseInt(d.getChannelStateString(c,e),10),l=a(j,k);if(0===l){var m=d.getTransmitPower(b,e),n=d.getTransmitPower(c,e);return a(m,n)}return l}return f?-1:g?1:0},o=function(a,b){return(parseInt(a.get(b+"_ast_be_xmit"),10)||0)+(parseInt(a.get(b+"_tx_packets"),10)||0)};return{ip:function(b,c){var d=f.ip2long(b.get("ip"))||0,e=f.ip2long(c.get("ip"))||0;return a(d,e)},name:function(b,c){var d=b.getDisplayName(),e=c.getDisplayName();return a(d,e)},state:function(a,b){return m(a,b)},stateString:function(c,d){var e=i[b.getDeviceState(c)],f=i[b.getDeviceState(d)];return e===f?a(b.getDeviceStateString(c),b.getDeviceStateString(d)):a(e,f)},uptime:function(b,c){var d=b.get("uptime")||0,e=c.get("uptime")||0;return a(d,e)},clients:function(b,c){var d=b.get("num_sta")||0,e=c.get("num_sta")||0;return a(d,e)},wlan2g:function(b,d){var e=c.getWlanGroupName(b,h.NG.type),f=c.getWlanGroupName(d,h.NG.type);return a(e,f)},wlan5g:function(b,d){var e=c.getWlanGroupName(b,h.NA.type),f=c.getWlanGroupName(d,h.NA.type);return a(e,f)},radio2g:function(a,b){return n(a,b,h.NG.type)},radio5g:function(a,b){return n(a,b,h.NA.type)},clients2g:function(b,c){var d=b.get("ng-num_sta")||0,e=c.get("ng-num_sta")||0;return a(d,e)},clients5g:function(b,c){var d=b.get("na-num_sta")||0,e=c.get("na-num_sta")||0;return a(d,e)},tx:function(b,c){var d=b.get("tx_bytes-d")||0,e=c.get("tx_bytes-d")||0;return a(d,e)},rx:function(b,c){var d=b.get("rx_bytes-d")||0,e=c.get("rx_bytes-d")||0;return a(d,e)},tx2g:function(b,c){var d=o(b,h.NG.type),e=o(c,h.NG.type);return a(d,e)},tx5g:function(b,c){var d=o(b,h.NA.type),e=o(c,h.NA.type);return a(d,e)},channel:function(b,c){var d=e.getChannelValue(b),f=e.getChannelValue(c);return a(d,f)}}}])},{}],1484:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("buttonHasSitePermissionControllerMixin",["account","sites",function(a,b){return function(c){angular.extend(c,{getSiteModel:function(){if(this.siteName)return b.repository.collection.findWhere({name:this.siteName})},hasPermission:function(){if(this.siteName){var b=this.getSiteModel();return!!b&&"admin"===b.get("role")}return a.isAdmin()}})}}])},{}],1485:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("countryChannels",["BaseModelRepository","CountryChannelsModel",function(a,b){this.repository=new a(new b)}])},{}],1486:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceAdoptL3Utils",["$interval","$q","$translate","devices","deviceUtils","discoveredDevices","discoveryTool","DEVICE_ADOPT_L3","DEVICE_STATE_IDS",function(a,b,c,d,e,f,g,h,i){this.adoptL3Device=function(j,k,l){var m=j.get("state");j.set("state",i.ADOPTING);var n={inform_url:l.url,ip:l.ip||j.get("ip"),model:j.get("model"),password:l.password,port:l.port,username:l.username};return g.setInform(n)["catch"](function(){return b.reject(c.instant("DEVICE_ACTIONS_SET_INFORM_ERROR",{deviceName:j.get("mac")}))}).then(function(){return b(function(b,d){var e=a(function(){return j.fetch().then(function(){a.cancel(e)})},h.CHECK_DEVICE_AFTER_SETTING_INFORM_FREQUENCY,h.CHECK_DEVICE_AFTER_SETTING_INFORM_MAX_ATTEMPTS);e.then(function(){d(c.instant("DEVICE_ACTIONS_SET_INFORM_ERROR",{deviceName:j.get("mac")}))})["catch"](b)})}).then(function(){return e.adoptDevice(j,k)}).then(function(){return g.setInform(n)["catch"](function(){return b.reject(c.instant("DEVICE_ACTIONS_SET_INFORM_CONFIRM_ERROR",{deviceName:j.get("mac")}))})}).then(function(){return d.repository.collection.get(j.get("mac")).fetch(),f.repository.collection.remove(j),c.instant("DEVICE_ACTIONS_ADOPT_NOTICE",{deviceName:j.get("mac")})})["catch"](function(a){return j.set("state",m),b.reject(a)})}}])},{}],1487:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceAdoptStrategy",["$q","deviceAdoptL3Utils","deviceInformUtils","deviceUtils","system","MANAGE_DEVICE_DEFAULTS",function(a,b,c,d,e,f){this.adoptDevice=function(a,b){return a.isLocallyDiscovered()?this.adoptL3Device(a,b):d.adoptDevice(a,b)},this.adoptL3Device=function(a,d){var g=angular.extend({},f,{url:c.getInformUrl(a,e.repository.model),ip:a.get("ip"),model:a.get("model")});return b.adoptL3Device(a,d,g)},this.advancedAdoptDevice=function(a,b){return d.advancedAdoptDevice(a,b)},this.adoptDevices=function(a,b){var c=a.filter(function(a){return a.isLocallyDiscovered()}),e=a.filter(function(a){return!a.isLocallyDiscovered()});return d.adoptDevices(e).then(function(){return this.adoptL3Devices(c,b)}.bind(this))},this.adoptL3Devices=function(b,c){return b.reduce(function(a,b){return a.then(function(){return this.adoptL3Device(b,c)}.bind(this))}.bind(this),a.when())}}])},{}],1488:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceCategoryUtils",["deviceStateUtils","DEVICE_CATEGORIES","DEVICE_STATES","DEVICE_TYPES",function(a,b,c,d){this.extractCategory=function(d){var e=a.getDeviceState(d);switch(e){case c.CONNECTED:case c.UPGRADING:case c.PROVISIONING:return this.extractType(d);case c.MANAGED_BY_OTHER:return b.MANAGED_BY_OTHER;case c.PENDING:return b.PENDING;case c.ADOPTING:return b.ADOPTING;default:return b.INACTIVE}}.bind(this),this.extractType=function(a){switch(a.get("type")){case d.GATEWAY:return b.WAN;case d.SWITCH:return b.LAN;case d.AP:return b.WLAN;case d.PHONE:return b.PHONE}}}])},{}],1489:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceChannelUtils",["deviceRadioUtils","lambda","RADIO_TYPES","WIFI_CHANNELS",function(a,b,c,d){this.getChannel=function(b){if(!b.get("vap_table"))return"";var d=[];return b.get("vap_table").forEach(function(e){if(0===e.channel)return!0;if("RUN"!==(e.state||"RUN"))return!0;var f=e.radio;f===c.NA.type&&a.isAcModel(b)&&(f="ac");var g=e.channel+" ("+f+")";d.indexOf(g)===-1&&(e.radio===c.NG.type?d.unshift(g):d.push(g))}),d.join(", ")},this.getChannelValue=function(a){if(!a.get("vap_table"))return-1;var b=0;return a.get("vap_table").forEach(function(a){return 0===a.channel||("RUN"!==(a.state||"RUN")||void(a.radio===c.NA.type?b+=1e3*(parseInt(a.channel,10)||0):a.radio===c.NG.type&&(b+=parseInt(a.channel,10)||0)))}),b},this.getCurrentChannelDescription=function(b,c){var d=a.getPrimaryChannel(b,c),e=a.getHt(b,c);if(d&&e){var f=a.getExtChannelIndicator(b,c)||0,g=this.getChannelsDescriptions(b,c,e);return g&&g.filter(function(a){return a.subChannels.indexOf(d)!==-1}).find(function(a){return 0===f?a.subChannels[0]===d:f>0?a.subChannels.slice(0,a.subChannels.length-1).indexOf(d)!==-1:a.subChannels.slice(1).indexOf(d)!==-1})}},this.getChannelsDescriptions=function(c,e,f){var g=a.getSupportedChannels(c,e,f),h=d[e][f];return g&&h&&b.objectToEntries(h).map(function(a){var b=angular.extend({channel:Number(a.key)},a.value);return b}).filter(function(a){return a.subChannels.every(function(a){return g.indexOf(a)!==-1})})},this.getSpectrumTable=function(a,b){return a.get("spectrum_table_"+b)}}])},{}],1490:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceDiscoveryUtils",["$q","$translate","bowser","discoveryToolUtils","featureFlag","system",function(a,b,c,d,e,f){
this.findDevicesIsVisible=function(){return f.isUnifiGo()&&e.isEnabled("enableL3Adoption")},this.findDevicesIsAvailable=function(){return this.findDevicesIsVisible()&&c.chrome&&!c.mobile},this.findDevices=function(a){return d.checkInstallation(a&&"bypassAutoFindDevices").then(function(){return d.startScanForDevices()})},this.isFindingDevices=function(){return d.isFindingDevices()}}])},{}],1491:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceFeatureUtils",["$injector","DEVICE_MODELS","FIRMWARE_CAPS","WIFI_CAPS",function(a,b,c,d){this.getHybridCapability=function(a,c){var d=b[a]||{};return d.hybrid||c},this.hasWifiCapability=function(a,b){return!!a&&((a.get("wifi_caps")||0)&b)>0},this.hasFirmwareCapability=function(a,b){return!!a&&((a.get("fw_caps")||0)&b)===b},this.isBandSteeringSupported=function(b){var c=a.get("deviceRadioUtils");return!!(b&&c.hasRadioType(b,"na")&&c.hasRadioType(b,"ng"))&&(this.hasWifiCapability(b,d.BANDSTEER)||this.getModelFeature(b,"bandsteer")===!0)},this.isZeroHandoffSupported=function(a){return this.hasWifiCapability(a,d.ZERO_HANDOFF)||this.getModelFeature(a,"zh")===!0},this.isAirtimeFairnessConfigSupported=function(a){return this.hasWifiCapability(a,d.AIRTIME_CONFIG)},this.isMinRssiStrictModeSupported=function(a){return this.hasWifiCapability(a,d.MIN_RSSI_STRICT_MODE)},this.isDpiSupported=function(a){return this.hasFirmwareCapability(a,c.DPI)},this.isTerminalSupported=function(a){return this.hasFirmwareCapability(a,c.UTERM)},this.isLinkAggregationGroupSupported=function(a){return this.hasFirmwareCapability(a,c.LAG)},this.isGen2=function(a){return 2===this.getModelFeature(a,"gen")},this.isAtfEnabled=function(a){var b=void 0!==a.get("atf_enabled")&&a.get("atf_enabled");return this.isAirtimeFairnessConfigSupported(a)?b:!this.isGen2(a)},this.isSimpleFan=function(a){return"simple"===this.getModelFeature(a,"fan")},this.getFanOnLevel=function(a){return"alwayson"===this.getModelFeature(a,"fan")?0:1},this.getModelFeature=function(a,c){var d=a?(b[a.get("model")]||{}).features:void 0;return d&&d[c]}}])},{}],1492:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceInformUtils",["ipMatchUtils","DEVICE_INFORM",function(a,b){this.getInformUrl=function(c,d){function e(){return d.get("hostname")||d.get("name")}function f(){return a.findBestMatch(c.get("ip"),d.get("ip_addrs"))||b.DEFAULT_HOST}var g=d.get("override_inform_host")?e():f(),h=d.get("inform_port")||b.DEFAULT_PORT;return[b.PROTOCOL,g,":",h,b.ENDPOINT].join("")}}])},{}],1493:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceRadioUtils",["_","$translate","$filter","featureFlag","system","countryChannels","deviceFeatureUtils","DEFAULT_HT","RADIO_STATES","RADIO_TYPES","WIFI_CHANNELS",function(a,b,c,d,e,f,g,h,i,j,k){this.getRadioByType=function(a,b,c){var d=a.get("radio_table",c);return d?d.get(b):void 0},this.hasRadioType=function(a,b){return void 0!==this.getRadioByType(a,b)},this.getHt=function(a,b){var c=this.hasRadioType(a,b)&&this.getRadioByType(a,b).get("ht");return(c||h[b]).toString()},this.getPrimaryChannel=function(a,b){return a.get(b+"-channel")},this.getExtChannelIndicator=function(a,b){return a.get(b+"-extchannel")},this.getChannelStateString=function(a,c){var d=a.get(c+"-state")||"INIT";if("INIT"===d)return"";var e=this.getExtChannelIndicator(a,c)||0,f=e>0?",+1":e<0?",-1":"",g=this.getPrimaryChannel(a,c)+f;return"DFS_WAIT"===d&&(g+=" ("+b.instant("DEVICE_RADIO_CHANNEL_DFS_WAITING")+")"),g},this.getChannelConfigString=function(a,c){var d=a.get(c+"-channel");if(d&&this.isDfsSupported(a)){var e=this.getHt(a,c),f=this.getSupportedChannels(a,c,e,!0),g=f&&f.indexOf(d)!==-1;g&&(d+=" ("+b.instant("DEVICE_RADIO_CHANNEL_DFS")+")")}return d?d+"":""},this.getChannelMode=function(a,c){var d=this.getRadioByType(a,c);return d&&"auto"===d.get("channel")?b.instant("COMMON_VALUE_AUTO"):""},this.getTransmitFrequency=function(a,b){var c=this.getTransmitPower(a,b),d=this.getPrimaryChannel(a,b),e=k[b],f="20",g=e&&e[f][d],h=g&&g.centerFrequency;return angular.isDefined(c)&&h?h:void 0},this.getTransmitPower=function(a,b){var c=a.get(b+"-state")||i.INIT;if(c!==i.INIT){var d=Math.min(a.get(b+"-tx_power"),30),e=a.get(b+"-gain")||0,f=a.get(b+"-eirp")||parseInt(d,10)+e;return f}},this.getTransmitPowerString=function(a,c){var d=this.getTransmitPower(a,c);return d?d+" "+b.instant("DEVICE_RADIO_TRANSMIT_POWER_DBM")+" ("+b.instant("DEVICE_RADIO_TRANSMIT_POWER_EIRP")+")":""},this.getTransmitPowerMode=function(a,c){var d=this.getRadioByType(a,c);return d&&"auto"===d.get("tx_power_mode")?b.instant("COMMON_VALUE_AUTO"):""},this.getPacketsPerBytes=function(a,b,d){var e=a.get("stat")||{},f=parseInt(e[b+"-"+d+"_packets"],10)||0,g=parseInt(e[b+"-"+d+"_bytes"],10)||0;return c("numberToString")(f)+" / "+c("bytes")(g)},this.getRetryDroppedPercentage=function(a,b,c){var d=a.get("stat")||{},e=parseInt(d[b+"-"+c+"_retries"],10)||0,f=parseInt(d[b+"-"+c+"_packets"],10)||0,g=parseInt(d[b+"-"+c+"_dropped"],10)||0,h=f+g;return(0===h?0:e/h*100).toFixed(1)+"% / "+(0===h?0:g/h*100).toFixed(1)+"%"},this.getChannelUtilization=function(a,b){var c=parseInt(a.get(b+"_cu_total"),10),d=parseInt(a.get(b+"_cu_self_rx"),10),e=parseInt(a.get(b+"_cu_self_tx"),10);return isNaN(c)||isNaN(d)||isNaN(e)?void 0:{total:c,selfRx:d,selfTx:e}},this.getMinRssi=function(a,b){var c=this.getRadioByType(a,b);if(c&&c.get("min_rssi_enabled"))return c.get("min_rssi")},this.getMinRssiString=function(a,c){var d=this.getMinRssi(a,c);return d?d+" "+b.instant("DEVICE_RADIO_TRANSMIT_POWER_DBM"):""},this.getSupportedChannels=function(a,b,c,d,e){c=parseInt(c,10);var g="channels_"+b+(d||20===c?"":"_"+c);return d?g+="_dfs":(e||a&&this.isBrcmModel(a))&&(g+="_bcm"),f.repository.model.get(g)},this.getChannelOptions=function(a,c,d){var e=this.getSupportedChannels(a,c,d),f=this.getSupportedChannels(a,c,d,!0),g=" ("+b.instant("DEVICE_RADIO_CHANNEL_DFS")+")",h=this.isDfsSupported(a),i=[];return e&&angular.forEach(e,function(b){var d=f&&f.indexOf(b)!==-1;this.isChannelAllowedByFcc(a,c,b,d)&&(!h&&d||i.push({channel:parseInt(b,10),label:b+(d?g:"")}))}.bind(this)),i},this.getUnfilteredChannelOptions=function(a,c){var d=this.getSupportedChannels(void 0,a,c)||[],e=this.getSupportedChannels(void 0,a,c,!1,!0)||[],f=this.getSupportedChannels(void 0,a,c,!0),g=" ("+b.instant("DEVICE_RADIO_CHANNEL_DFS")+")",h=[],i=Array.from(new Set(d.concat(e).sort(function(a,b){return a-b})));return i&&angular.forEach(i,function(a){var b=f&&f.indexOf(a)!==-1;h.push({channel:parseInt(a,10),label:a+(b?g:"")})}),h},this.getBandByChannel=function(a){return a<52?1:a<149?2:3},this.isAcModel=function(a){var b=this.getRadioByType(a,"na");return b&&b.get("is_11ac")===!0||g.getModelFeature(a,"ac")===!0},this.isBrcmModel=function(a){return g.getModelFeature(a,"brcm")===!0},this.isMinRssiStrictModeSupported=function(a,b){return d.isEnabled("enableMinRssiStrictMode")&&"na"===b&&(!a||g.isMinRssiStrictModeSupported(a))},this.isHt40Supported=function(a,b){var c=this.getSupportedChannels(a,b,40);return c&&c.length>0},this.isHt80Supported=function(a){var b=this.isAcModel(a)?this.getSupportedChannels(a,"na",80):void 0;return b&&b.length>0},this.isDfsSupported=function(a){var b=this.getRadioByType(a,"na");return b&&b.get("has_dfs")===!0||g.getModelFeature(a,"dfs")===!0},this.isFccDfsSupported=function(a){var b=this.getRadioByType(a,"na");return b&&b.get("has_fccdfs")===!0||!1},this.isChannelAllowedByFcc=function(a,b,c,d){var e=f.repository.model.get("key");if("na"===b&&["US","CA"].indexOf(e)!==-1){if(d&&!this.isFccDfsSupported(a))return!1;var g=this.getBandByChannel(c),h=a.get("model");if("U5O"===h&&1===g)return!1}return!0}}])},{}],1494:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceStateUtils",["$translate","_","DEVICE_LICENSE_STATES","DEVICE_MODELS","DEVICE_STATES","DEVICE_STATE_IDS","DEVICE_STATE_FLAGS",function(a,b,c,d,e,f,g){this.deviceStateIdMap=function(){var a={};return Object.keys(f).forEach(function(b){a[f[b]]=e[b]}),a}(),this.getDeviceModel=function(a){var b=a.get("model");return d[b]?d[b].name:"UniFi "+b},this.getDeviceModelShort=function(a){return this.getDeviceModel(a).replace("UniFi ","").replace("AP","UAP")},this.getRawDeviceState=function(a){var b=parseInt(a.get("state"),10);return this.deviceStateIdMap[b]||e.UNKNOWN},this.getDeviceState=function(a){var b=this.getRawDeviceState(a);return b===e.DISCONNECTED?a.isRestarting()&&(b=e.RESTARTING):b===e.PENDING?a.get("default")||(b=e.MANAGED_BY_OTHER):b===e.INFORM_ERROR?a.get("default")&&(b=e.ADOPTION_REQUIRED):b===e.CONNECTED?a.get("spectrum_scanning")&&(b=e.RFSCANNING):b===e.UNKNOWN&&a.isLocallyDiscovered()&&(b=e.PENDING,a.get("default")||(b=e.MANAGED_BY_OTHER)),b},this.getDeviceStateFlags=function(a){var b=this.getRawDeviceState(a),c=[];if(b===e.CONNECTED){if("wire"===a.getNested("uplink.type")&&"ugw"!==a.get("type")){var d=a.get("uplink");d.max_speed===d.speed&&d.full_duplex||c.push(d.full_duplex?g.WIRED_FULL_DUPLEX:g.WIRED_HALF_DUPLEX)}a.get("isolated")?c.push(g.ISOLATED):"wireless"===a.getNested("uplink.type")&&c.push(g.WIRELESS),a.get("version_incompatible")&&c.push(g.NEEDS_UPGRADE)}else b===e.PENDING?"scan"===a.get("discovered_via")&&c.push(g.WIRELESS):b===e.ADOPTING&&"wireless"===a.getNested("uplink.type")&&c.push(g.WIRELESS);return a.isLocallyDiscovered()&&c.push(g.LOCALLY_DISCOVERED),a.get("disabled")&&c.push(g.DISABLED),this.isLicenseWithWarning(a)&&c.push("DEVICE_STATE_FLAG_LICENSE_"+a.get("license_state").toUpperCase()),a.get("migrate_inform_url")&&c.push(g.MIGRATED),c},this.getDeviceStateString=function(b){var c=this.getDeviceState(b),d=a.instant(c),e=this.getDeviceStateFlags(b);return e.length&&(d+=" (",d+=e.map(function(c){var d;return c!==g.WIRED_FULL_DUPLEX&&c!==g.WIRED_HALF_DUPLEX||(d={speed:b.getNested("uplink.speed")}),a.instant(c,d)}).join(", "),d+=")"),d},this.getDeviceStatus=function(a){var c;switch(this.getDeviceState(a)){case e.MANAGED_BY_OTHER:c="static";break;case e.CONNECTED:case e.PROVISIONING:case e.RFSCANNING:c="success";break;case e.UPGRADING:c=a.get("adopted")?"success":"warning";break;case e.PENDING:case e.ADOPTING:case e.RESTARTING:c="warning";break;default:c="danger"}var d=this.getDeviceStateFlags(a),f=[g.LICENSE_GRACE_PERIOD,g.LICENSE_REGISTRATION_FAILED];return b.intersection(d,f).length>0&&"success"===c&&(c="warning"),c},this.isDeviceConnected=function(a){switch(this.getDeviceState(a)){case e.CONNECTED:case e.UPGRADING:case e.PROVISIONING:case e.RFSCANNING:return!0;default:return!1}},this.isDeviceBusy=function(a){switch(this.getDeviceState(a)){case e.UPGRADING:case e.PROVISIONING:case e.ADOPTING:case e.DELETING:case e.RESTARTING:case e.RFSCANNING:return!0;default:return!1}},this.getIconClassName=function(a){var b=[];if(a){var c=a.get("type"),d=a.get("model"),e=this.getDeviceStatus(a);c&&b.push("unifiDeviceIcon--"+c),d&&b.push("unifiDeviceIcon--"+d),["success","warning","danger","static"].indexOf(e)!==-1&&b.push("is-"+e)}return b.join(" ")};var h=[c.REGISTRATION_FAILED,c.GRACE_PERIOD];this.isLicenseWithWarning=function(a){var b=a.get("license_state")||c.REGISTERED;return h.indexOf(b)!==-1}}])},{}],1495:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceUtils",["$q","$translate","DeviceMgrModel","SiteMgrModel","apiResults","siteUtils","DEVICE_TYPES","DEVICE_STATE_IDS",function(a,b,c,d,e,f,g,h){this._executeDeviceCommand=function(a,b,d){var e=new c;return d&&(e._forceSite=d.get("name")),b=b||{},b.cmd=a,e.save(b)},this._executeSiteCommand=function(a,b){var c=new d;return b=b||{},b.cmd=a,c.save(b)},this.saveDevice=function(a,b,c){return a.savePartial(b,c)},this.savePendingChanges=function(c,d){return c.savePendingChanges(d).then(function(){return a.when(b.instant("DEVICE_PROPERTIES_PENDING_CHANGES_APPLY_SUCCESS",{deviceName:c.getDisplayName()}))})["catch"](function(d){return a.reject(e.appendErrorMsg(b.instant("DEVICE_PROPERTIES_PENDING_CHANGES_APPLY_ERROR",{deviceName:c.getDisplayName()}),d))})},this.adoptDevice=function(c,d){var f={mac:c.get("mac")};return this._executeDeviceCommand("adopt",f,d).then(function(){return c.set({state:h.ADOPTING}),a.when(b.instant("DEVICE_ACTIONS_ADOPT_NOTICE",{deviceName:c.getDisplayName()}))})["catch"](function(d){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_ADOPT_ERROR",{deviceName:c.getDisplayName()}),d))})},this.advancedAdoptDevice=function(c,d){var f={mac:c.get("mac"),ip:d.ip,port:d.port,username:d.username,password:d.password,url:d.url,sshKeyVerify:d.sshKeyVerify};return this._executeDeviceCommand("adv-adopt",f).then(function(){return c.set({state:h.ADOPTING}),a.when(b.instant("DEVICE_ACTIONS_ADOPT_NOTICE",{deviceName:c.getDisplayName()}))})["catch"](function(d){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_ADOPT_ERROR",{deviceName:c.getDisplayName()}),d))})},this.adoptDevices=function(b,c){var d={macs:b.map(function(a){return a.get("mac")})};return d.macs.length?this._executeDeviceCommand("adopt",d,c):a.when()},this.locateDevice=function(c,d,f){d!==!0&&d!==!1&&(d=!c.get("locating"));var g={mac:c.get("mac")};return this._executeDeviceCommand(d===!0?"set-locate":"unset-locate",g,f).then(function(){return c.set({locating:d}),a.when(b.instant(c.get("locating")?"DEVICE_ACTIONS_LOCATE_NOTICE":"DEVICE_ACTIONS_LOCATE_OFF_NOTICE",{deviceName:c.getDisplayName()}))})["catch"](function(d){return a.reject(e.appendErrorMsg(b.instant(c.get("locating")?"DEVICE_ACTIONS_LOCATE_OFF_ERROR":"DEVICE_ACTIONS_LOCATE_ERROR",{deviceName:c.getDisplayName()}),d))})},this.restartDevice=function(c,d,f){d=d||{};var g={mac:c.get("mac"),reboot_type:d.rebootType||"soft"};return this._executeDeviceCommand("restart",g,f).then(function(){return c.set({state:h.DISCONNECTED,restarting:!0}),a.when(b.instant("DEVICE_ACTIONS_RESTART_NOTICE",{deviceName:c.getDisplayName()}))})["catch"](function(d){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_RESTART_ERROR",{deviceName:c.getDisplayName()}),d))})},this.upgradeDevice=function(c,d,f){var g={mac:c.get("mac")};return d&&(g.url=d),this._executeDeviceCommand(d?"upgrade-external":"upgrade",g,f).then(function(){return c.set({state:h.UPGRADING}),a.when(b.instant("DEVICE_ACTIONS_UPGRADE_NOTICE",{deviceName:c.getDisplayName()}))})["catch"](function(d){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_UPGRADE_ERROR",{deviceName:c.getDisplayName()}),d))})},this.startRollingUpgrade=function(c){return this._executeDeviceCommand("set-rollupgrade",void 0,c).then(function(){return a.when(b.instant("DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_START_NOTICE"))})["catch"](function(c){return a.reject(e.appendErrorMsg(b.instant("DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_START_ERROR"),c))})},this.stopRollingUpgrade=function(c){return this._executeDeviceCommand("unset-rollupgrade",void 0,c).then(function(){return a.when(b.instant("DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_STOP_NOTICE"))})["catch"](function(c){return a.reject(e.appendErrorMsg(b.instant("DEVICE_LIST_ACTIONS_ROLLING_UPGRADE_STOP_ERROR"),c))})},this.linkDevices=function(c,d){var f={mac:d.get("mac"),uplink:c.get("mac")};return this._executeDeviceCommand("set-vwire-uplink",f).then(function(){return a.when(b.instant("DEVICE_ACTIONS_LINK_NOTICE",{downlinkDeviceName:d.getDisplayName(),uplinkDeviceName:c.getDisplayName()}))})["catch"](function(f){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_LINK_ERROR",{downlinkDeviceName:d.getDisplayName(),uplinkDeviceName:c.getDisplayName()}),f))})},this.unlinkDevices=function(c,d){var f={mac:d.get("mac"),uplink:c.get("mac")};return this._executeDeviceCommand("unset-vwire-uplink",f).then(function(){return a.when(b.instant("DEVICE_ACTIONS_UNLINK_NOTICE",{downlinkDeviceName:d.getDisplayName(),uplinkDeviceName:c.getDisplayName()}))})["catch"](function(f){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_UNLINK_ERROR",{downlinkDeviceName:d.getDisplayName(),uplinkDeviceName:c.getDisplayName()}),f))})},this.copyConfig=function(c,d){var f={mac:c.get("mac"),origin:d.get("mac")};return this._executeDeviceCommand("clone-config",f).then(function(){return c.collection&&c.collection.remove(c),a.when(b.instant("DEVICE_ACTIONS_COPY_SUCCESS",{sourceName:d.getDisplayName(),targetName:c.getDisplayName()}))})["catch"](function(f){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_COPY_ERROR",{sourceName:d.getDisplayName(),targetName:c.getDisplayName()}),f))})},this.moveDevice=function(c,d){var f={mac:c.get("mac"),site:d.id};return this._executeSiteCommand("move-device",f).then(function(){return c.collection&&c.collection.remove(c),a.when(b.instant("DEVICE_ACTIONS_MOVE_SUCCESS",{deviceName:c.getDisplayName(),siteDesc:d.get("desc")}))})["catch"](function(f){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_MOVE_ERROR",{deviceName:c.getDisplayName(),siteDesc:d.get("desc")}),f))})},this.forgetDevice=function(c){var d={mac:c.get("mac")};return this._executeSiteCommand("delete-device",d).then(function(){return c.collection&&c.collection.remove(c),a.when(b.instant("DEVICE_ACTIONS_FORGET_SUCCESS",{deviceName:c.getDisplayName()}))})["catch"](function(d){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_FORGET_ERROR",{deviceName:c.getDisplayName()}),d))})},this.migrateDevices=function(c,d){var f={macs:c.map(function(a){return a.get("mac")}),inform_url:d};return f.macs.length?this._executeDeviceCommand("migrate",f).then(function(){return a.when(b.instant("DEVICE_ACTIONS_MIGRATE_DEVICES_NOTICE"))})["catch"](function(c){return a.reject(e.appendErrorMsg(b.instant("DEVICE_ACTIONS_MIGRATE_DEVICES_ERROR"),c))}):a.when()},this.getInformIp=function(a){var b=a.find(function(a){return a.get("adopted")&&a.get("state")===h.CONNECTED&&a.get("inform_ip")});return b?b.get("inform_ip"):void 0},this.isGatewayAdoptable=function(a,b){return!b.filter(function(b){if("ugw"===b.get("type")&&b.get("adopted")===!0)return b.get("mac")!==a.get("mac")}).length},this.getSiteGateway=function(a){var b=f.getActiveSite();if(b)return a.findWhere({type:g.GATEWAY,site_id:b.id})}}])},{}],1496:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceWlanGroupUtils",["$translate","wirelessNetworkGroups",function(a,b){function c(a,b){return!!b&&b.where({radio:a}).length>0}this.getWlanGroup=function(a,c){var d=a.get("wlangroup_id_"+c);return b.repository.collection.get(d)||b.repository.collection.getDefault()},this.getWlanGroupName=function(b,d){if(!b.get("adopted")||!b.get("radio_"+d))return"";var e=b.get("wlan_overrides"),f=this.getWlanGroup(b,d),g=f?f.get("name"):void 0;return f&&(f.get("roam_enabled")?g+=" ("+a.instant("COMMON_FILTER_WLAN_GROUP_ZERO_HANDOFF")+")":c(d,e)&&(g+=" (*)")),g}}])},{}],1497:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("devices",["BaseCollectionRepository","DeviceCollection",function(a,b){this.repository=new a(new b)}])},{}],1498:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("discoveredDeviceUtils",["discoveryTool","DeviceMgrModel","macAddressFormatter","now","DEVICE_MODELS","DISCOVERY",function(a,b,c,d,e,f){this.isUniFiDevice=function(a){return a.discovered_by===f.PROTOCOL_V2_ID&&"UniFi"===a.family&&a.is_cloudkey!==!0},this.mapToDeviceAttributes=function(a){return{_id:c.toCanonical(a.mac),adopt_ip:a.ip,"default":a.is_default,discovered_by:a.discovered_by,ip:a.ip,last_seen:d(),mac:c.toCanonical(a.mac),model:a.model,type:(e[a.model]||{}).type,uptime:a.uptime,version:a.short_ver}}}])},{}],1499:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("discoveredDevices",["$q","$rootScope","BaseCollectionRepository","DeviceCollection","discoveredDeviceUtils","now","DISCOVERED_DEVICE","DISCOVERY_TOOL_EVENTS",function(a,b,c,d,e,f,g,h){this.repository=new c(new d),b.$on(h.DEVICE_DISCOVERED,function(a,b){if(e.isUniFiDevice(b)){var c=e.mapToDeviceAttributes(b);angular.equals((this.repository.collection.get(c.mac)||{}).attributes,c)||this.repository.collection.add(c,{merge:!0})}}.bind(this)),this.repository.collection.fetch=function(){return a.when(this)},this.repository.fetch=function(){return this.collection.models.forEach(function(a){a.get("last_seen")+1e3*g.LAST_SEEN_TIMEOUT<f()&&this.collection.remove(a)}.bind(this)),c.prototype.fetch.call(this,arguments)},this.mergeToDevicesCollection=function(a){var b=this.repository.collection.models.map(function(a){return a.deepCopy()});a.add(b,{merge:!0})}}])},{}],1500:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("PendingAdoptionDeviceFilter",["deviceStateUtils","DEVICE_STATES",function(a,b){var c=function(){};return c.prototype.test=function(c){return a.getDeviceState(c)===b.PENDING&&c.get("default")},c.prototype.getTest=function(){return this.test},c}])},{}],1501:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("WirelessNetworkFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.wlanGroupIdFilter=null,this.searchableAttributes=["name"]};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b.prototype.test=function(b){return(!this.hasWlanGroupIdFilter()||this.wlanGroupIdFilter===b.get("wlangroup_id"))&&a.prototype.test.call(this,b)},b.prototype.isFiltered=function(){return this.hasWlanGroupIdFilter()||this.searchQuery.length>0},b.prototype.getWlanGroupIdFilter=function(){return this.wlanGroupIdFilter},b.prototype.hasWlanGroupIdFilter=function(){return!!this.wlanGroupIdFilter},b.prototype.setWlanGroupIdFilter=function(a){this.wlanGroupIdFilter=a},b.prototype.clearWlanGroupIdFilter=function(){this.wlanGroupIdFilter=void 0},b}])},{}],1502:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("ipMatchUtils",["ipUtils",function(a){this.findBestMatch=function(b,c){return(c||[]).sort(function(c,d){var e=Math.abs(a.ip2long(b)-a.ip2long(c)),f=Math.abs(a.ip2long(b)-a.ip2long(d));return e-f})[0]}}])},{}],1503:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("ipUtils",[function(){this.ip2long=function(a){if(a&&a.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)){var b=a.split(".");return 16777216*b[0]+65536*b[1]+256*b[2]+1*b[3]}},this.long2ip=function(a){return[a>>>24,a>>>16&255,a>>>8&255,255&a].join(".")},this.bits2netmask=function(a){for(var b=4294967295,c=1,d=a;d<32;d++)b^=c,c<<=1;return b},this.recommendSubnet=function(a,b,c){var d=this.subnetToNetwork(a,c);return b===!1?b=0:(isNaN(b)||b<=0)&&(b=d.bits<25?5*(25-d.bits):1),{ip:d.ip,isIpValid:this.subnetHasIp(a,d.ip),isMaskValid:d.bits<31&&d.bits>0,subnet:this.long2ip(d.ipLongMin)+"/"+d.bits,dhcpStartIp:this.long2ip(d.ipLongMin+b),dhcpStopIp:this.long2ip(d.ipLongMax),isLimited:d.isLimited}},this.subnetToNetwork=function(a,b){var c=a.split("/")[0],d=parseInt(a.split("/")[1],10),e=this.bits2netmask(d),f=(this.ip2long(c)&e)>>>0,g=(this.ip2long(c)|~e)>>>0;f+=1,g-=1;var h=g-f+1,i=0;return b&&(i=Math.max(0,h-b),h-=i,g-=i),{ip:c,ipLong:this.ip2long(c)>>>0,bits:d,netmask:e,ipLongMin:f,ipLongMax:g,numIps:h,isLimited:i>0}},this.subnetHasIp=function(a,b){var c=this.ip2long(b),d=this.subnetToNetwork(a);return c>=d.ipLongMin&&c<=d.ipLongMax}}])},{}],1504:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("CountryChannelsModel",["CORSModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({siteUrl:"stat/current-channel"})}])},{}],1505:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("DeviceModel",["AssociatedModel","Backbone","BaseCollection","CORSAssociatedModel","deepCopyMixin","deviceFeatureUtils","getNestedMixin","modelDelegateMixin","pendingMixin","resolveMixin","savePartialMixin","siteUrlMixin","structureMixin","webrtcMixin","DEVICE_STATE_IDS","DISCOVERY",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(a){return["radio_na","radio_ng"].forEach(function(b){a[b]&&a[b].ht&&(a[b].ht=String(a[b].ht))}),a.radio_table&&a.radio_table.forEach(function(a){a.ht&&(a.ht=String(a.ht))}),a}return d.extend(l).extend(m).extend(e).extend(k).extend(g).extend(j).extend(n).extend(h).extend(i).extend({_isActiveSiteOptional:!0,idAttribute:"mac",modelType:"device",siteUrl:"rest/device",relations:[{type:b.Many,key:"downlink_table",collectionType:c,relatedModel:a.extend({idAttribute:"port_idx"})},{type:b.Many,key:"uplink_table",collectionType:c,relatedModel:a.extend({idAttribute:"mac"})},{type:b.Many,key:"port_table",collectionType:c,relatedModel:a.extend(e).extend({idAttribute:"port_idx"})},{type:b.Many,key:"port_overrides",collectionType:c.extend(e).extend({model:a.extend({idAttribute:"port_idx"})})},{type:b.Many,key:"network_table",collectionType:c,relatedModel:a.extend({idAttribute:"_id"})},{type:b.Many,key:"radio_table",collectionType:c,relatedModel:a.extend({idAttribute:"radio"})},{type:b.Many,key:"wlan_overrides",collectionType:c.extend(e).extend({model:a.extend(e).extend({idAttribute:"_id"})})}],initialize:function(){this.on("change:state",function(a,b){this.isRestarting()&&b!==o.DISCONNECTED&&this.previous("state")===o.DISCONNECTED&&this.set({restarting:!1})},this)},parse:function(a){if(a=m.parse.call(this,a)){switch(f.getHybridCapability(a.model,a.type)){case"uap":a.wlan_overrides=a.wlan_overrides||[],a=q(a);break;case"usw":a.port_overrides=a.port_overrides||[];break;case"uap+usw":a.wlan_overrides=a.wlan_overrides||[],a.port_overrides=a.port_overrides||[],a=q(a)}!a.upgradable&&this.get("upgradable")&&(a.upgradable=!1),!a.rollupgrade&&this.get("rollupgrade")&&(a.rollupgrade=!1)}return a.discovered_by=p.CONTROLLER,a},getDisplayName:function(){return this.get("name")||this.get("mac")},getCoords:function(){return[this.get("x"),this.get("y")]},isRestarting:function(){return!!this.get("restarting")},isLocallyDiscovered:function(){return this.get("discovered_by")===p.PROTOCOL_V2_ID},url:function(){return this.buildUrl({id:this.get("_id")})},sync:function(a,b,c){return c=c||{},"read"===a&&(c.url=this.buildUrl({siteUrl:"stat/device"})),c.cfg&&(c.url+="?cfg=1"),d.prototype.sync.call(this,a,b,c)}})}])},{}],1506:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("DpiStatsModel",["CORSModel","resolveMixin","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({siteUrl:"stat/dpi",parse:function(a){return a=d.parse.call(this,a),a||this.clear(),a}})}])},{}],1507:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("SpectrumScanModel",["CORSModel","deepCopyMixin","resolveMixin","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(b).extend(c).extend(d).extend(e).extend(f).extend({idAttribute:"mac",siteUrl:"stat/spectrum-scan"})}])},{}],1508:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("WirelessNetworkGroupModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/wlangroup"})}])},{}],1509:[function(a,b,c){"use strict";angular.module("base-unifi-device").factory("WirelessNetworkModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({_isActiveSiteOptional:!0,idAttribute:"_id",siteUrl:"rest/wlanconf"})}])},{}],1510:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("portFeatureUtils",["POE_CAPS",function(a){this.hasPoeCapability=function(a,b){return!!a&&((a.get("poe_caps")||0)&b)===b},this.isPoePassthroughSupported=function(b){return this.hasPoeCapability(b,a.PASSTHROUGH)},this.isPoePassive24Supported=function(b){return this.hasPoeCapability(b,a.PASV24)||this.useLegacyPoeCaps(b)},this.isPoeAutoSupported=function(b){return this.hasPoeCapability(b,a["8023AF"])||this.hasPoeCapability(b,a["8023AT"])||this.useLegacyPoeCaps(b)},this.isPoePlusSupported=function(b){return this.hasPoeCapability(b,a["8023AT"])||this.useLegacyPoeCaps(b)},this.useLegacyPoeCaps=function(a){return a&&!a.has("poe_caps")&&a.get("port_poe")}}])},{}],1511:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("deviceModelFeatureValidator",["$filter","deviceFeatureUtils","deviceRadioUtils","RADIO_TYPES",function(a,b,c,d){this.validate=function(a,b){var c=[],e={isValid:!0};return this._isSupportedBandSteering(a,b,c),this._isSupportedAirtmeFairness(a,b,c),Object.keys(d).forEach(function(e){this._isSupportedRadio(d[e].type,a,b,c),this._isSupportedWlan(d[e].type,a,b,c)}.bind(this)),c.length&&(e.isValid=!1,e.invalid=c),e},this._isSupportedBandSteering=function(a,c,d){"equal"!==c.bandsteering_mode||b.isGen2(a)||d.push({attr:"bandsteering_mode",translationKey:"DEVICE_PROPERTIES_UNSUPPORTED_FEATURE_BAND_STEERING"})},this._isSupportedAirtmeFairness=function(a,c,d){void 0===c.atf_enabled||b.isAirtimeFairnessConfigSupported(a)||c.atf_enabled===b.isAtfEnabled(a)||d.push({attr:"atf_enabled",translationKey:"DEVICE_PROPERTIES_UNSUPPORTED_FEATURE_AIRTIME_FAIRNESS"})},this._isSupportedRadio=function(b,d,e,f){if(e.radio_table)for(var g=0,h=e.radio_table.length;g<h;g++){var i=e.radio_table[g];if(i.radio===b&&Object.keys(i).length>1){if(!c.hasRadioType(d,b))return void f.push({attr:"radio_table",translationKey:a("toTranslationKey")("DEVICE_PROPERTIES_UNSUPPORTED_FEATURE_RADIO_"+b)});this._isSupportedRadioHt(d,i,f),this._isSupportedRadioChannel(d,i,f),this._isSupportedRadioMinRssiStrictMode(d,i,f)}}},this._isSupportedRadioHt=function(b,d,e){var f=d.ht&&parseInt(d.ht,10);if(f){if(40===f&&!c.isHt40Supported(b,d.radio))return void e.push({attr:"radio_table",translationKey:a("toTranslationKey")("DEVICE_PROPERTIES_UNSUPPORTED_FEATURE_RADIO_HT_"+d.radio)});if(80===f&&!c.isHt80Supported(b))return void e.push({attr:"radio_table",translationKey:a("toTranslationKey")("DEVICE_PROPERTIES_UNSUPPORTED_FEATURE_RADIO_HT_"+d.radio)})}},this._isSupportedRadioChannel=function(b,d,e){if(d.channel&&"auto"!==d.channel){var f=c.getChannelOptions(b,d.radio,d.ht),g=f.some(function(a){return a.channel===d.channel});g||e.push({attr:"radio_table",translationKey:a("toTranslationKey")("DEVICE_PROPERTIES_UNSUPPORTED_FEATURE_RADIO_CHANNEL_"+d.radio)})}},this._isSupportedRadioMinRssiStrictMode=function(b,d,e){d.hard_noise_floor_enabled&&!c.isMinRssiStrictModeSupported(b,d.radio)&&e.push({attr:"radio_table",translationKey:a("toTranslationKey")("DEVICE_PROPERTIES_UNSUPPORTED_FEATURE_RADIO_STRICT_MODE_"+d.radio)})},this._isSupportedWlan=function(b,d,e,f){if(e["wlangroup_id_"+b]&&!c.hasRadioType(d,b))return void f.push({attr:"wlangroup_id_"+b,translationKey:a("toTranslationKey")("DEVICE_PROPERTIES_UNSUPPORTED_FEATURE_WLAN_"+b)})}}])},{}],1512:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("wirelessNetworkGroups",["BaseCollectionRepository","WirelessNetworkGroupCollection",function(a,b){this.repository=new a(new b)}])},{}],1513:[function(a,b,c){"use strict";angular.module("base-unifi-device").service("wirelessNetworks",["BaseCollectionRepository","WirelessNetworkCollection",function(a,b){this.repository=new a(new b)}])},{}],1514:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiConfirmRestart"><div id="confirmRestartModal" class="appControlModal appControlModal--tiny"><div frame-close="confirmRestart" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">{{\'DEVICE_ACTIONS_RESTART_CONFIRM_TITLE\' | translate:\'{deviceName: "\' + confirmRestartCtrl.deviceName + \'"}\'}}</div><div class="appControlModal__content"><form novalidate autocomplete="off" name="confirmRestartCtrl.form" class="appForm appForm--cozy appForm--dark"><p class="verticalRhythmHalf">{{\'DEVICE_ACTIONS_RESTART_CONFIRM_MESSAGE\' | translate:\'{deviceName: "\' + confirmRestartCtrl.deviceName + \'"}\'}}</p><div ng-if="confirmRestartCtrl.withHardReboot" class="appInputGroup appInputGroup--comfy"><input type="checkbox" name="hardReboot" id="hardReboot" ng-model="confirmRestartCtrl.hardReboot"><label for="hardReboot" translate="DEVICE_ACTIONS_RESTART_CONFIRM_CYCLE_POE_POWER"></label></div></form></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div unifi-bypass-confirm="confirmRestartCtrl.bypassFlag" unifi-bypass-confirm-is-dark="true" class="flexCol--7"></div><div class="flexCol--5 alignRight"><div class="appInputGroup"><button ng-click="confirmRestartCtrl.reject()" translate="COMMON_ACTIONS_CANCEL" class="appMainButton appMainButton--cozy appMainButton--transparentDark cancel"></button><button ng-click="confirmRestartCtrl.resolve()" translate="COMMON_ACTIONS_CONFIRM" class="appMainButton appMainButton--cozy appMainButton--primary confirm"></button></div></div></div></div></div></div>'),
b.join("")}},{"jade/runtime":232}],1515:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i){this.backup=b,this.backupUtils=c,this.heyToasts=g,this.frame=f,this.$translate=i,this.defaultSortBy="datetime",this.defaultSortDesc=this.rowsPerPage=h.model.getRowsPerPropertyPanel(),e.call(this,a,d,h)}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getCollection=function(){return this.backup.repository.collection},d.prototype.removeBackup=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_DELETE_AUTOBACKUP_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_DELETE_AUTOBACKUP_CONFIRM_MESSAGE",{file:a.get("filename")})}.bind(this),options:function(){return{allowHtml:!0}}}).then(function(){return this.backupUtils.removeBackup(a).then(function(a){return this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))}.bind(this))},d.prototype.downloadBackup=function(a){return this.backupUtils.downloadBackup(a)["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))},d.prototype.restoreBackup=function(a){return this.frame.show("confirm",{title:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_AUTOBACKUP_CONFIRM_TITLE")}.bind(this),message:function(){return this.$translate.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_AUTOBACKUP_CONFIRM_MESSAGE",{file:a.get("filename")})}.bind(this),options:function(){return{allowHtml:!0}}}).then(function(){return this.backupUtils.restoreBackup(a)["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))}.bind(this))},d.$inject=["$injector","backup","backupUtils","CollectionView","frame","heyToasts","preferences","$translate"],angular.module("base-unifi-maintenance").controller("BackupListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],1516:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><table id="backupFiles" collection-view-sort="backupListCtrl.view" ng-class="{      \'appTable--dark\': backupListCtrl.isDark    }" unifi-condensed="appTable--condensed" class="appTable appTable--noWrap appTable--hoverable appTable--flexible appTable--striped"><thead><th collection-view-sort-by="filename"><span translate="SETTINGS_BACKUP_TABLE_HEADER_FILENAME"></span></th><th collection-view-sort-by="datetime"><span translate="SETTINGS_BACKUP_TABLE_HEADER_DATE"></span></th><th collection-view-sort-by="size"><span translate="SETTINGS_BACKUP_TABLE_HEADER_SIZE"></span></th><th><span translate="SETTINGS_BACKUP_TABLE_HEADER_ACTIONS"></span></th></thead><tfoot ng-if="backupListCtrl.view.getModels().length"><tr><td colspan="4"><unifi-micro-pagination unifi-micro-pagination-current-page="backupListCtrl.currentPage" unifi-micro-pagination-rows-per-page="backupListCtrl.rowsPerPage" unifi-micro-pagination-total-rows="backupListCtrl.view.getModels().length"></unifi-micro-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in backupListCtrl.view.getModels(),          startFrom (backupListCtrl.currentPage - 1) * backupListCtrl.rowsPerPage,          limitTo backupListCtrl.rowsPerPage" data-id="{{::model.id}}"><td>{{ model.get(\'filename\') }}</td><td>{{ model.get(\'datetime\') | moment: \'format\': \'datetime\'}}</td><td>{{ model.get(\'size\') | bytes}}</td><td class="appTableCell--actions"><button type="button" ng-click="backupListCtrl.restoreBackup(model)" title="{{\'SETTINGS_BACKUP_ACTIONS_RESTORE\' | translate}}" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--refresh-2"></span><span translate="SETTINGS_BACKUP_ACTIONS_RESTORE" class="button__label"></span></button><button type="button" ng-click="backupListCtrl.downloadBackup(model)" title="{{\'SETTINGS_BACKUP_ACTIONS_DOWNLOAD\' | translate}}" ng-if="backupListCtrl.isDownloadAvailable" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--download-2"></span><span translate="SETTINGS_BACKUP_ACTIONS_DOWNLOAD" class="button__label"></span></button><button type="button" ng-click="backupListCtrl.removeBackup(model)" title="{{\'COMMON_ACTIONS_DELETE\' | translate}}" ng-if="backupListCtrl.isDeleteAvailable" class="appMainButton appMainButton--tertiary appMainButton--condensed is-responsive"><span class="button__icon icon ubnt-icon--trashcan"></span><span translate="COMMON_ACTIONS_DELETE" class="button__label"></span></button></td></tr></tbody></table></div>'),b.join("")}},{"jade/runtime":232}],1517:[function(a,b,c){"use strict";angular.module("base-unifi-maintenance").directive("unifiBackupList",["PaginatedListDirective",function(b){var c=new b("backup",a("./backupList.jade")(),{isDark:"=unifiBackupListIsDark",isDownloadAvailable:"=unifiBackupListIsDownloadAvailable",isDeleteAvailable:"=unifiBackupListIsDeleteAvailable"});return c}])},{"./backupList.jade":1516}],1518:[function(a,b,c){"use strict";angular.module("base-unifi-maintenance").config(["frameProvider",function(b){b.when("working",{controller:"WorkingController",controllerAs:"workingCtrl",layout:"workingLayout",template:a("../views/frames/working.jade")()})}])},{"../views/frames/working.jade":1525}],1519:[function(a,b,c){"use strict";function d(a,b,c){this.frame=a,this.message=b,this.title=c}d.prototype.resolve=function(){return this.frame.getLayout("workingLayout").resolve()},d.prototype.reject=function(){return this.frame.getLayout("workingLayout").reject()},d.$inject=["frame","message","title"],angular.module("base-unifi-maintenance").controller("WorkingController",d)},{}],1520:[function(a,b,c){"use strict";a("../base-unifi/main"),angular.module("base-unifi-maintenance",["base-unifi"]),a("./components/backupList/BackupListController.js"),a("./components/backupList/backupList.js"),a("./config/frames.js"),a("./controllers/WorkingController.js"),a("./services/backup.js"),a("./services/backupUtils.js"),a("./services/collections/BackupCollection.js"),a("./services/models/BackupModel.js")},{"../base-unifi/main":1685,"./components/backupList/BackupListController.js":1515,"./components/backupList/backupList.js":1517,"./config/frames.js":1518,"./controllers/WorkingController.js":1519,"./services/backup.js":1521,"./services/backupUtils.js":1522,"./services/collections/BackupCollection.js":1523,"./services/models/BackupModel.js":1524}],1521:[function(a,b,c){"use strict";angular.module("base-unifi-maintenance").service("backup",["BackupCollection","BaseCollectionRepository",function(a,b){this.repository=new b(new a)}])},{}],1522:[function(a,b,c){"use strict";angular.module("base-unifi-maintenance").service("backupUtils",["apiResults","backup","BackupMgrModel","fileUtils","frame","heyToasts","status","systemBackupUtils","UnifiFileBasePath","$translate","$q",function(a,b,c,d,e,f,g,h,i,j,k){this.downloadBackup=function(a){return d.download(i+"/dl/autobackup/"+a.get("filename"),a.get("filename"))["catch"](function(){return k.reject(j.instant("SETTINGS_BACKUP_DOWNLOAD_FILE_ERROR"))})},this.removeBackup=function(d){var e=d.get("filename");return(new c).save({cmd:"delete-backup",filename:e}).then(function(){return b.repository.collection.remove(d),k.when(j.instant("SETTINGS_BACKUP_REMOVE_FILE_SUCCESS",{filename:e}))})["catch"](function(b){return k.reject(a.appendErrorMsg(j.instant("SETTINGS_BACKUP_REMOVE_FILE_ERROR"),b))})},this.restoreBackup=function(b){var d=new c;return d.save({cmd:"choose-backup",filename:b.get("filename")}).then(function(){return this.restoreAndRestart(d.get("backup_id"))}.bind(this))["catch"](function(b){return k.reject(a.appendErrorMsg(j.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_BACKUP_ERROR"),b))})},this.restoreAndRestart=function(a){return e.show("working",{title:function(){return j.instant("COMMON_NOTICE_WAITING_TITLE")},message:function(){return j.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_BACKUP_WORKING")}}),h.restoreFromBackup(a).then(function(a){return e.show("working",{title:function(){return j.instant("COMMON_NOTICE_WAITING_TITLE")},message:function(){return a}}),g.waitForRestart(),!0})["catch"](function(b){return e.close("working"),f.pushError(b),h.cancelRestoreFromBackup(a),!1})}}])},{}],1523:[function(a,b,c){"use strict";angular.module("base-unifi-maintenance").factory("BackupCollection",["CORSCollection","BackupModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"cmd/backup",_isActiveSiteOptional:!0,sync:function(b,c,d){return d=d||{},"read"===b&&(d.type="POST",d.data=JSON.stringify({cmd:"list-backups"})),a.prototype.sync.call(this,b,c,d)}})}])},{}],1524:[function(a,b,c){"use strict";angular.module("base-unifi-maintenance").factory("BackupModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"filename",siteUrl:"cmd/backup",_isActiveSiteOptional:!0,defaults:{role:"readonly"},sync:function(){throw new Error("Not implemented")}})}])},{}],1525:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiWorking"><div id="workingModal" class="appControlModal appControlModal--tiny"><div class="appControlModal__header">{{workingCtrl.title}}</div><div class="appControlModal__content"><p>{{workingCtrl.message}}</p></div></div></div>'),b.join("")}},{"jade/runtime":232}],1526:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h,i,j,k){this.appUrl=b,this.featureFlag=c,this.sitesOverview=d,this.comparator=f,this.filter=new g,this.ENV=k,this.defaultSortBy="desc",this.collection=new h.Collection,this.collectData(),e.call(this,a,i,j),this.initPanels()}var e=a("../../../base-unifi/controllers/BasePaginatedListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initPanels=function(){this.isOverviewPanelAvailable()&&(this.overviewPanel=this.$injector.get("overviewPanel"))},d.prototype.addEventHandlers=function(){this.sitesOverview.repository.collection.on("add remove change reset sync",this.collectData,this)},d.prototype.removeEventHandlers=function(){this.sitesOverview.repository.collection.off("add remove change reset sync",this.collectData,this)},d.prototype.getCollection=function(){return this.collection},d.prototype.getSiteUrl=function(a){return this.appUrl.buildUrl(["site",a])},d.prototype.collectData=function(){this.collection.reset(this.sitesOverview.repository.collection.map(function(a){var b=angular.extend({},a.attributes,{id:a.id,wan_status:a.getNested("health.wan.status"),lan_active:a.getNested("health.lan.num_sw"),lan_inactive:a.getNested("health.lan.num_disconnected"),lan_pending:a.getNested("health.lan.num_pending"),lan_status:a.getNested("health.lan.status"),wlan_status:a.getNested("health.wlan.status"),wlan_active:a.getNested("health.wlan.num_ap"),wlan_inactive:a.getNested("health.wlan.num_disconnected"),wlan_pending:a.getNested("health.wlan.num_pending"),lan_users:a.getNested("health.lan.num_user")||0,wlan_users:a.getNested("health.wlan.num_user")||0,lan_guests:a.getNested("health.lan.num_guest")||0,wlan_guests:a.getNested("health.wlan.num_guest")||0});return delete b.health,b}))},d.prototype.isOverviewPanelAvailable=function(){return"app-unifi-overview"===this.ENV.APP&&this.featureFlag.isEnabled("enableSiteDevicesPanel")},d.prototype.openOverviewPanel=function(a){if(this.isOverviewPanelAvailable()){var b=this.sitesOverview.repository.collection.get(a.id);b&&this.overviewPanel.addItem(b)}},d.$inject=["$injector","appUrl","featureFlag","sitesOverview","siteOverviewComparator","SiteOverviewFilter","Backbone","CollectionView","preferences","ENV"],angular.module("base-unifi-overview").controller("SiteOverviewListController",d)},{"../../../base-unifi/controllers/BasePaginatedListController":1665}],1527:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiSiteOverview"><table id="siteOverviewTable" collection-view-sort="siteOverviewListCtrl.view" ng-class="{      \'is-not-responsive\': !siteOverviewListCtrl.isResponsive()    }" unifi-condensed="appTable--condensed" class="verticalRhythmTop--cozy appTable appTable--noWrap appTable--light appTable--hoverable appTable--flexible appTable--striped"><thead><tr><th collection-view-sort-by="desc" class="siteOverviewName"><span translate="SITE_OVERVIEW_TABLE_HEADER_NAME"></span></th><th collection-view-sort-by="num_new_alarms" class="siteOverviewAlerts visibleAdjusted--mdUp noHorizontalPadding"><span translate="SITE_OVERVIEW_TABLE_HEADER_ALERTS"></span></th><th ng-if="siteOverviewListCtrl.isResponsive()" collection-view-sort-by="num_new_alarms" class="siteOverviewAlerts visibleAdjusted--smDown noHorizontalPadding"></th><th ng-if="siteOverviewListCtrl.isResponsive()" class="siteOverviewStatus visibleAdjusted--smDown"><span translate="SITE_OVERVIEW_TABLE_HEADER_STATUS"></span></th><th collection-view-sort-by="wan_status" class="siteOverviewWan visibleAdjusted--mdUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_WAN"></span></th><th collection-view-sort-by="lan_status" class="siteOverviewLan visibleAdjusted--mdUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_LAN"></span></th><th collection-view-sort-by="lan_active" class="siteOverviewActive visibleAdjusted--mdUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_ACTIVE"></span></th><th collection-view-sort-by="lan_inactive" class="siteOverviewInactive visibleAdjusted--mdUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_INACTIVE"></span></th><th collection-view-sort-by="lan_pending" class="siteOverviewPending visibleAdjusted--lgUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_PENDING"></span></th><th collection-view-sort-by="wlan_status" class="siteOverviewWlan visibleAdjusted--mdUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_WLAN"></span></th><th collection-view-sort-by="wlan_active" class="siteOverviewActive visibleAdjusted--mdUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_ACTIVE"></span></th><th collection-view-sort-by="wlan_inactive" class="siteOverviewInactive visibleAdjusted--mdUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_INACTIVE"></span></th><th collection-view-sort-by="wlan_pending" class="siteOverviewPending visibleAdjusted--lgUp"><span translate="SITE_OVERVIEW_TABLE_HEADER_PENDING"></span></th><th collection-view-sort-by="users" colspan="2" class="siteOverviewUsers"><span translate="SITE_OVERVIEW_TABLE_HEADER_USERS"></span></th><th collection-view-sort-by="guests" colspan="2" class="siteOverviewGuests"><span translate="SITE_OVERVIEW_TABLE_HEADER_GUESTS"></span></th></tr></thead><tfoot ng-if="siteOverviewListCtrl.view.getModels().length"><tr><td colspan="15"><unifi-list-pagination unifi-list-pagination-current-page="siteOverviewListCtrl.currentPage" unifi-list-pagination-rows-per-page="siteOverviewListCtrl.rowsPerPage" unifi-list-pagination-total-rows="siteOverviewListCtrl.view.getModels().length" unifi-list-pagination-total-links="5"></unifi-list-pagination></td></tr></tfoot><tbody><tr collection-view-repeat="model in siteOverviewListCtrl.view.getModels(),          startFrom (siteOverviewListCtrl.currentPage - 1) * siteOverviewListCtrl.rowsPerPage,          limitTo siteOverviewListCtrl.rowsPerPage" data-id="{{::model.id}}" ng-class="{\'clickable\': siteOverviewListCtrl.isOverviewPanelAvailable(model)}" ng-click="siteOverviewListCtrl.openOverviewPanel(model)"><td class="siteOverviewName"><a unifi-if-app="\'app-unifi-overview\'" ng-href="{{siteOverviewListCtrl.getSiteUrl(model.get(\'name\'))}}" ng-click="$event.stopPropagation()">{{::model.get(\'desc\')}}</a><a unifi-if-app="\'app-unifi-manage\'" ui-sref="manage.site.dashboard({site: model.get(\'name\')})" frame-close="sitesOverview">{{::model.get(\'desc\')}}</a></td><td class="siteOverviewAlerts noHorizontalPadding"><div ng-class="{\'appCount--static\': !model.get(\'num_new_alarms\')}" class="count count--round appCount"><div class="count__value">{{::model.get(\'num_new_alarms\') || 0 | numberToString}}</div></div></td><td ng-if="siteOverviewListCtrl.isResponsive()" class="siteOverviewStatus visibleAdjusted--smDown"><div class="iconText appIconText"><span ng-class="{                \'success\': model.get(\'wan_status\') === \'ok\',                \'warning\': model.get(\'wan_status\') === \'warning\',                \'danger\': model.get(\'wan_status\') === \'error\',                \'static\': model.get(\'wan_status\') === \'unknown\'              }" class="iconText__icon icon ubnt-icon--shield"></span><div class="appTooltipContainer appTooltipContainer--hoverable"><div class="appTooltip appTooltip--cozy appTooltip--brief appTooltip--rightSide"><div class="appDescriptionList appDescriptionList--inline"><div class="appDescriptionListRow appDescriptionListRow--cozy"><dt class="alignRight">{{\'SITE_OVERVIEW_TABLE_HEADER_ACTIVE\' | translate}}</dt><dd>{{::model.get(\'lan_active\')}}</dd></div><div class="appDescriptionListRow appDescriptionListRow--cozy"><dt class="alignRight">{{\'SITE_OVERVIEW_TABLE_HEADER_INACTIVE\' | translate}}</dt><dd>{{::model.get(\'lan_inactive\')}}</dd></div><div class="appDescriptionListRow appDescriptionListRow--cozy"><dt class="alignRight">{{\'SITE_OVERVIEW_TABLE_HEADER_PENDING\' | translate}}</dt><dd>{{::model.get(\'lan_pending\')}}</dd></div></div></div><span ng-class="{                  \'success\': model.get(\'lan_status\') === \'ok\',                  \'warning\': model.get(\'lan_status\') === \'warning\',                  \'danger\': model.get(\'lan_status\') === \'error\',                  \'static\': model.get(\'lan_status\') === \'unknown\'                }" class="iconText__icon icon ubnt-icon--network"></span></div><div class="appTooltipContainer appTooltipContainer--hoverable"><div class="appTooltip appTooltip--cozy appTooltip--brief appTooltip--rightSide"><div class="appDescriptionList appDescriptionList--inline"><div class="appDescriptionListRow appDescriptionListRow--cozy"><dt class="alignRight">{{\'SITE_OVERVIEW_TABLE_HEADER_ACTIVE\' | translate}}</dt><dd>{{::model.get(\'wlan_active\')}}</dd></div><div class="appDescriptionListRow appDescriptionListRow--cozy"><dt class="alignRight">{{\'SITE_OVERVIEW_TABLE_HEADER_INACTIVE\' | translate}}</dt><dd>{{::model.get(\'wlan_inactive\')}}</dd></div><div class="appDescriptionListRow appDescriptionListRow--cozy"><dt class="alignRight">{{\'SITE_OVERVIEW_TABLE_HEADER_PENDING\' | translate}}</dt><dd>{{::model.get(\'wlan_pending\')}}</dd></div></div></div><span ng-class="{                  \'success\': model.get(\'wlan_status\') === \'ok\',                  \'warning\': model.get(\'wlan_status\') === \'warning\',                  \'danger\': model.get(\'wlan_status\') === \'error\',                  \'static\': model.get(\'wlan_status\') === \'unknown\'                }" class="iconText__icon icon ubnt-icon--ap2"></span></div></div></td><td class="siteOverviewWan visibleAdjusted--mdUp"><div ng-class="{              \'success\': model.get(\'wan_status\') === \'ok\',              \'warning\': model.get(\'wan_status\') === \'warning\',              \'danger\': model.get(\'wan_status\') === \'error\',              \'static\': model.get(\'wan_status\') === \'unknown\'            }" class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--shield"></span></div></td><td class="siteOverviewLan visibleAdjusted--mdUp"><div ng-class="{              \'success\': model.get(\'lan_status\') === \'ok\',              \'warning\': model.get(\'lan_status\') === \'warning\',              \'danger\': model.get(\'lan_status\') === \'error\',              \'static\': model.get(\'lan_status\') === \'unknown\'            }" class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--network"></span></div></td><td class="siteOverviewActive visibleAdjusted--mdUp">{{::model.get(\'lan_active\')}}</td><td class="siteOverviewInactive visibleAdjusted--mdUp">{{::model.get(\'lan_inactive\')}}</td><td class="siteOverviewPending visibleAdjusted--lgUp">{{::model.get(\'lan_pending\')}}</td><td class="siteOverviewWlan visibleAdjusted--mdUp"><div ng-class="{              \'success\': model.get(\'wlan_status\') === \'ok\',              \'warning\': model.get(\'wlan_status\') === \'warning\',              \'danger\': model.get(\'wlan_status\') === \'error\',              \'static\': model.get(\'wlan_status\') === \'unknown\'            }" class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--ap2"></span></div></td><td class="siteOverviewActive visibleAdjusted--mdUp">{{::model.get(\'wlan_active\')}}</td><td class="siteOverviewInactive visibleAdjusted--mdUp">{{::model.get(\'wlan_inactive\')}}</td><td class="siteOverviewPending visibleAdjusted--lgUp">{{::model.get(\'wlan_pending\')}}</td><td class="siteOverviewUsers appTableCell--withLargeIcon"><div class="iconText appIconText"><span ng-class="{static: !model.get(\'wlan_users\')}" class="iconText__icon icon ubnt-icon--user-wireless"></span><span class="iconText__text">{{::model.get(\'wlan_users\')}}</span></div></td><td class="siteOverviewUsers appTableCell--withLargeIcon noPaddingLeft"><div class="iconText appIconText"><span ng-class="{static: !model.get(\'lan_users\')}" class="iconText__icon icon ubnt-icon--user-wired"></span><span class="iconText__text">{{::model.get(\'lan_users\')}}</span></div></td><td class="siteOverviewGuests appTableCell--withLargeIcon"><div class="iconText appIconText"><span ng-class="{static: !model.get(\'wlan_guests\')}" class="iconText__icon icon ubnt-icon--guest-wireless"></span><span class="iconText__text">{{::model.get(\'wlan_guests\')}}</span></div></td><td class="siteOverviewGuests appTableCell--withLargeIcon noPaddingLeft"><div class="iconText appIconText"><span ng-class="{static: !model.get(\'lan_guests\')}" class="iconText__icon icon ubnt-icon--guest-wired"></span><span class="iconText__text">{{::model.get(\'lan_guests\')}}</span></div></td></tr></tbody></table><div ng-if="!siteOverviewListCtrl.view.getModels().length" class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div unifi-condensed="appInfoBox--cozy" unifi-condensed-off="appInfoBox--responsiveMdDown" class="appInfoBox verticalRhythmTop--breezy"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div translate="SITE_OVERVIEW_TABLE_EMPTY_HEADER" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="SITE_OVERVIEW_TABLE_EMPTY_NO_DATA" class="noMarginBottom"></p></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1528:[function(a,b,c){"use strict";angular.module("base-unifi-overview").directive("unifiSiteOverviewList",["PaginatedListDirective","eventHandlersDirectiveMixin","listSearchDirectiveMixin",function(b,c,d){var e=new b("siteOverview",a("./siteOverviewList.jade")(),{searchQuery:"=unifiSiteOverviewListSearchQuery",isRefreshing:"=unifiSiteOverviewListIsRefreshing"});return e.addMixin(c),e.addMixin(d),e}])},{"./siteOverviewList.jade":1527}],1529:[function(a,b,c){"use strict";a("../base-unifi/main"),angular.module("base-unifi-overview",["base-unifi"]),a("./components/siteOverviewList/SiteOverviewListController.js"),a("./components/siteOverviewList/siteOverviewList.js"),a("./services/comparators/siteOverviewComparator.js"),a("./services/filters/SiteOverviewFilter.js")},{"../base-unifi/main":1685,"./components/siteOverviewList/SiteOverviewListController.js":1526,"./components/siteOverviewList/siteOverviewList.js":1528,"./services/comparators/siteOverviewComparator.js":1530,"./services/filters/SiteOverviewFilter.js":1531}],1530:[function(a,b,c){"use strict";angular.module("base-unifi-overview").service("siteOverviewComparator",["collectionViewComparator",function(a){return{users:function(b,c){var d=b.get("lan_users")+b.get("wlan_users"),e=c.get("lan_users")+c.get("wlan_users");return a(d,e)},guests:function(b,c){var d=b.get("lan_guests")+b.get("wlan_guests"),e=c.get("lan_guests")+c.get("wlan_guests");return a(d,e)}}}])},{}],1531:[function(a,b,c){"use strict";angular.module("base-unifi-overview").factory("SiteOverviewFilter",["BaseSearchableModelFilter",function(a){var b=function(){a.call(this),this.searchableAttributes=["desc"]};return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}])},{}],1532:[function(a,b,c){"use strict";angular.module("base-unifi").directive("autofocus",["$timeout",function(a){return{restrict:"A",link:function(b,c){a(function(){c[0].focus()},0)}}}])},{}],1533:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div dialog-layout="{{layout}}" class="blackout"><div frame-close-prevent-bubble="{{layout}}" frame-close-enable-esc="{{layout}}" class="blackout__inner"><div dialog-window class="frame appModal"><div dialog-content class="modal__content"></div><div dialog-placeholder class="modal__content"><div class="modal__loading"><div class="appSpinner appSpinner--medium appSpinner--centered"></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1534:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiBlackoutModal",["$compile",function(b){return{scope:{layout:"@unifiBlackoutModalLayout"},replace:!0,template:"<div></div>",link:function(c,d){var e=a("./blackoutModal.jade")();e=e.replace(/{{layout}}/g,c.layout),d.html(e),b(d.contents())(c)}}}])},{"./blackoutModal.jade":1533}],1535:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiBowser",["bowser",function(a){return{restrict:"A",link:function(b,c){a.msie&&c.addClass("is-msie"),a.safari&&c.addClass("is-safari"),a.mobile&&c.addClass("is-mobile"),a.tablet&&c.addClass("is-tablet"),a.mobile||a.tablet||c.addClass("is-desktop")}}}])},{}],1536:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiBrowserWarning",["$translate","bowser","bypass","heyToasts",function(a,b,c,d){return{link:function(){var e="bypassBrowserWarning",f=0,g=b.chrome||b.firefox;g||c.isEnabled(e)||d.pushWarning(a.instant("COMMON_TOAST_NOT_SUPPORTED_BROWSER_WARNING"),f).then(function(){c.enable(e,!0)})}}}])},{}],1537:[function(a,b,c){"use strict";function d(a,b,c){this.$timeout=a,this.bypass=b,this.preferences=c}d.prototype.updateBypassPreferences=function(){this.bypassFlag&&(this.enableBypass?this.bypass.enable(this.bypassFlag):this.bypass.disable(this.bypassFlag)).then(function(){this.onSuccess()}.bind(this))},d.prototype.onSuccess=function(){this.clearNotification&&this.$timeout.cancel(this.clearNotification),this.isSaveSuccessful=!0,this.clearNotification=this.$timeout(function(){this.isSaveSuccessful=void 0}.bind(this),800)},d.$inject=["$timeout","bypass","preferences"],angular.module("base-unifi").controller("BypassConfirmController",d)},{}],1538:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<form ng-if="bypassConfirmCtrl.bypassFlag" ng-class="::{    \'appForm--dark\': bypassConfirmCtrl.isDark  }" novalidate class="appForm appForm--cozy"><div class="appInputGroup iconText appIconText"><input type="checkbox" name="enableBypass" id="enableBypass{{directiveId}}" ng-model="bypassConfirmCtrl.enableBypass" ng-change="bypassConfirmCtrl.updateBypassPreferences()"><label for="enableBypass{{directiveId}}" class="iconText__text noMarginRight">{{ bypassConfirmCtrl.label || \'COMMON_VALUE_BYPASS_CONFIRM\' | translate }}</label><icon ng-if="bypassConfirmCtrl.isSaveSuccessful" class="iconText__icon ubnt-icon--check-circle-fill success"></icon></div></form>'),b.join("")}},{"jade/runtime":232}],1539:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiBypassConfirm",[function(){return{scope:{bypassFlag:"=unifiBypassConfirm",isDark:"=?unifiBypassConfirmIsDark",label:"=?unifiBypassConfirmLabel"},controller:"BypassConfirmController",controllerAs:"bypassConfirmCtrl",bindToController:!0,template:a("./bypassConfirm.jade")(),link:function(a){a.directiveId=a.$id}}}])},{"./bypassConfirm.jade":1538}],1540:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiCollapsibleTableIcon",["localStorageFailSafe","LocalStorageBooleanValue",function(b,c){return{template:a("./collapsibleTableIcon.jade")(),link:function(a,d,e){var f=a.$eval(e.unifiCollapsibleTableIcon);a.storage=new c(b,f),a.storage.hydrate(),d.on("click",function(b){b.preventDefault(),a.storage.setValue(!a.storage.getValue())})}}}]),angular.module("base-unifi").directive("unifiCollapsibleTableCell",["localStorageFailSafe","LocalStorageBooleanValue",function(a,b){return{link:function(c,d,e){var f=c.$eval(e.unifiCollapsibleTableCell),g=c.$eval(e.unifiCollapsibleTableCellBindOnce);c.storage=new b(a,f);var h=c.$watch(function(){return c.storage.hydrate(),c.storage.getValue()},function(a){a?d.addClass("is-collapsed"):d.removeClass("is-collapsed"),g&&(h(),delete c.storage)})}}}])},{"./collapsibleTableIcon.jade":1541}],1541:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<div ng-attr-title=\"{{storage.getValue() ? 'COMMON_LIST_COLUMN_ACTION_EXPAND' : 'COMMON_LIST_COLUMN_ACTION_COLLAPSE' | translate}}\" class=\"appTable__collapseIcon icon ubnt-icon--arrows-range\"></div>"),b.join("")}},{"jade/runtime":232}],1542:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiCondensed",["preferences",function(a){return{restrict:"A",link:function(b,c,d){var e=function(a){a?(c.removeClass(d.unifiCondensedOff),c.addClass(d.unifiCondensed)):(c.removeClass(d.unifiCondensed),c.addClass(d.unifiCondensedOff))};b.$watch(function(){return a.model.get("isCondensed")},e)}}}])},{}],1543:[function(a,b,c){"use strict";function d(a,b,c){this.addEventListeners(a,b),this.addEventListeners(a,c),a.$on("$stateChangeSuccess",function(){this.status=null}.bind(this))}d.prototype.addEventListeners=function(a,b){Object.keys(b).forEach(function(c){var d=b[c];a.$on(d,function(){this.status="CONNECTION_STATUS_"+d}.bind(this))}.bind(this))},d.$inject=["$scope","UNIFI_WEBRTC_EVENTS","WEBRTC_EVENTS"],angular.module("base-unifi").controller("ConnectionStatusController",d)},{}],1544:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<p ng-show="connectionStatusCtrl.status" translate="{{connectionStatusCtrl.status}}" class="verticalRhythmTop--cozy"></p>'),b.join("")}},{"jade/runtime":232}],1545:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiConnectionStatus",[function(){return{controller:"ConnectionStatusController",controllerAs:"connectionStatusCtrl",template:a("./connectionStatus.jade")(),replace:!0,bindToController:!0}}])},{"./connectionStatus.jade":1544}],1546:[function(a,b,c){"use strict";function d(a){this.scope=a}d.prototype.setElement=function(a){this.element=a},d.prototype.setElementCoords=function(a){this.elementCoords=a},d.prototype.setContainer=function(a){if(!a)throw new Error("Invalid container");this.container=a},d.prototype.setContainerCoords=function(a){a.width||(a.width=a.right-a.left),a.height||(a.height=a.bottom-a.top),this.containerCoords=a},d.prototype.getBoundingClientRect=function(a){var b=a.getBoundingClientRect();return{top:Math.floor(b.top),right:Math.floor(b.right),bottom:Math.floor(b.bottom),left:Math.floor(b.left),width:Math.floor(b.width),height:Math.floor(b.height)}},d.prototype.addWatchers=function(){this.watchBoundingRects=this.scope.$watch(function(){return{element:this.getBoundingClientRect(this.element[0]),container:this.container?this.getBoundingClientRect(this.container):void 0}}.bind(this),function(a){a.container&&this.setContainerCoords(a.container),this.setElementCoords(a.element),this.constrainPosition()}.bind(this),!0)},d.prototype.removeWatchers=function(){this.watchBoundingRects&&this.watchBoundingRects();
},d.prototype.constrainPosition=function(){var a,b;this.elementCoords.right>this.containerCoords.right?a=this.elementCoords.width<=this.containerCoords.width?this.containerCoords.right-this.elementCoords.right:this.containerCoords.left-this.elementCoords.left:this.elementCoords.left<this.containerCoords.left&&(a=this.containerCoords.left-this.elementCoords.left),this.elementCoords.bottom>this.containerCoords.bottom?b=this.elementCoords.height<=this.containerCoords.height?this.containerCoords.bottom-this.elementCoords.bottom:this.containerCoords.top-this.elementCoords.top:this.elementCoords.top<this.containerCoords.top&&(b=this.containerCoords.top-this.elementCoords.top),(a||b)&&this.element.css({left:parseInt(this.element.css("left"),10)+(a||0)+"px",top:parseInt(this.element.css("top"),10)+(b||0)+"px"})},d.$inject=["$scope"],angular.module("base-unifi").controller("ConstrainPositionController",d)},{}],1547:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiConstrainPosition",["$timeout","$document",function(a,b){return{priority:10,controller:"ConstrainPositionController",controllerAs:"constrainPositionCtrl",link:function(c,d,e,f){a(function(){f.setElement(d),e.unifiConstrainPositionSelector?f.setContainer(b.find("body")[0].querySelector(e.unifiConstrainPositionSelector)):f.setContainerCoords({top:parseInt(e.unifiConstrainPositionTop,10),right:parseInt(e.unifiConstrainPositionRight,10),bottom:parseInt(e.unifiConstrainPositionBottom,10),left:parseInt(e.unifiConstrainPositionLeft,10)}),c.$watch(e.unifiConstrainPositionIsDisabled,function(b){b?f.removeWatchers():a(function(){f.addWatchers()},100)})},0)}}}])},{}],1548:[function(a,b,c){"use strict";function d(a){this.displayFormat||(this.displayFormat=a.model.get("dateFormat")||"YYYY/MMM/DD"),this.applyStartDate()}var e=a("moment");d.prototype.MODEL_DATE_FORMAT="x",d.prototype.parseInt=parseInt,Object.defineProperty(d.prototype,"start",{get:function(){return this.preventFuture(),this.pikadayStart},set:function(a){this.pikadayStart=a,this.applyStartDate()}}),Object.defineProperty(d.prototype,"end",{get:function(){return this.preventFuture(),void 0!==this.intervalValue?e(this.pikadayStart,this.MODEL_DATE_FORMAT).add(this.intervalValue,this.intervalUnit).format(this.MODEL_DATE_FORMAT):this.pikadayEnd},set:function(a){this.pikadayEnd=a,this.preventFuture()}}),Object.defineProperty(d.prototype,"intervalValue",{get:function(){return this._intervalValue},set:function(a){this._intervalValue=a,this.applyStartDate()}}),Object.defineProperty(d.prototype,"intervalUnit",{get:function(){return this._intervalUnit},set:function(a){this._intervalUnit=a,this.applyStartDate()}}),d.prototype.applyStartDate=function(){void 0!==this.intervalValue&&void 0!==this.pikadayStart&&(this.endDateEnabled=e.duration(this.intervalValue,this.intervalUnit).subtract(1,"day").as("seconds")>0,this.pikadayEnd=e(this.pikadayStart,this.MODEL_DATE_FORMAT).add(this.intervalValue,this.intervalUnit).format(this.MODEL_DATE_FORMAT),this.preventFuture())},d.prototype.preventFuture=function(){var a=e().add(1,"day").startOf("day").format(this.MODEL_DATE_FORMAT);this.endDateEnabled&&this.pikadayEnd>a&&(this.pikadayEnd=a,this.applyEndDate())},d.prototype.applyEndDate=function(){void 0!==this.intervalValue&&void 0!==this.pikadayEnd&&(this.pikadayStart=e(this.pikadayEnd,this.MODEL_DATE_FORMAT).subtract(this.intervalValue,this.intervalUnit).format(this.MODEL_DATE_FORMAT))},d.prototype.shiftTimeSlotForward=function(){this._shiftTimeSlot("add"),this.preventFuture()},d.prototype.shiftTimeSlotBackward=function(){this._shiftTimeSlot("subtract")},d.prototype._shiftTimeSlot=function(a){this.pikadayStart=e(this.pikadayStart,this.MODEL_DATE_FORMAT)[a](1,"day").format(this.MODEL_DATE_FORMAT),void 0!==this.intervalValue&&(this.pikadayEnd=e(this.pikadayStart,this.MODEL_DATE_FORMAT).add(this.intervalValue,this.intervalUnit).format(this.MODEL_DATE_FORMAT))},d.$inject=["preferences"],angular.module("base-unifi").controller("DateIntervalSelectorController",d)},{moment:238}],1549:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<ul class="unifiDateIntervalSelector buttonGroup buttonGroup--shrink appMainButtonGroup appMainButtonGroup--filter appMainButtonGroup--cozy appDateIntervalInput"><li ng-click="dateIntervalSelectorCtrl.shiftTimeSlotBackward()" class="button appMainButton appMainButton--cozy noPaddingRight is-button-selected">&lt;</li><li class="button appMainButton appMainButton--cozy is-button-selected"><span class="button__icon icon ubnt-icon--calendar-3"></span><div class="appForm--dark appForm--cozy inlineBlock unifiDateIntervalSelector__pikadayContainer"><input type="text" ng-model="dateIntervalSelectorCtrl.pikadayStart" ng-change="dateIntervalSelectorCtrl.applyStartDate()" pikaday pikaday-format="dateIntervalSelectorCtrl.MODEL_DATE_FORMAT" pikaday-class="\'appPikaday\'" class="button appMainButton appMainButton--cozy appDateIntervalInputButton unifiDateIntervalSelector__pikadayButton"><input type="text" value="{{ dateIntervalSelectorCtrl.parseInt(dateIntervalSelectorCtrl.pikadayStart) | moment: (dateIntervalSelectorCtrl.useUtc ? [\'utc\', \'format\'] : \'format\' ): dateIntervalSelectorCtrl.displayFormat }}" class="button appMainButton appMainButton--cozy appDateIntervalInputButton noPointerEvents"></div><div ng-if="dateIntervalSelectorCtrl.endDateEnabled" class="appForm--dark appForm--cozy inlineBlock unifiDateIntervalSelector__pikadayContainer"><input type="text" ng-model="dateIntervalSelectorCtrl.pikadayEnd" ng-change="dateIntervalSelectorCtrl.applyEndDate()" pikaday pikaday-format="dateIntervalSelectorCtrl.MODEL_DATE_FORMAT" pikaday-class="\'appPikaday\'" class="button appMainButton appMainButton--cozy appDateIntervalInputButton unifiDateIntervalSelector__pikadayButton"><input type="text" value="{{ dateIntervalSelectorCtrl.parseInt(dateIntervalSelectorCtrl.pikadayEnd) | moment: (dateIntervalSelectorCtrl.useUtc ? [\'utc\', \'format\'] : \'format\' ): dateIntervalSelectorCtrl.displayFormat }}" class="button appMainButton appMainButton--cozy appDateIntervalInputButton noPointerEvents"></div></li><li ng-click="dateIntervalSelectorCtrl.shiftTimeSlotForward()" class="button appMainButton appMainButton--cozy noPaddingLeft is-button-selected">&gt;</li></ul>'),b.join("")}},{"jade/runtime":232}],1550:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiDateIntervalSelector",[function(){return{controller:"DateIntervalSelectorController",controllerAs:"dateIntervalSelectorCtrl",template:a("./dateIntervalSelector.jade")(),restrict:"E",scope:{start:"=unifiDateIntervalSelectorStart",end:"=unifiDateIntervalSelectorEnd",intervalValue:"=unifiDateIntervalSelectorValue",intervalUnit:"=unifiDateIntervalSelectorUnit",onChange:"&unifiDateIntervalSelectorOnChange",displayFormat:"@unifiDateIntervalSelectorDisplayFormat",useUtc:"=unifiDateIntervalSelectorUseUtc"},bindToController:!0,replace:!0,link:function(a,b,c,d){d.onChange&&a.$watchGroup(["dateIntervalSelectorCtrl.start","dateIntervalSelectorCtrl.end"],function(a,b){var c=a[0],e=b[0],f=a[1],g=b[1];c===e&&f===g||d.onChange({start:c,end:f})})}}}])},{"./dateIntervalSelector.jade":1549}],1551:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.$http=a,this.$scope=b,this.$translate=c,this.UnifiAPIBasePath=e,this.activeTab="websocket",this.cacheFilter="",this.isEnabled=!1,this.isLogging=!1,this.messages=[];try{this.FLAGS=d.get("FLAGS")}catch(f){this.FLAGS={}}}d.prototype.closePanel=function(){this.isEnabled=!1},d.prototype.togglePanel=function(){this.isEnabled=!this.isEnabled},d.prototype.toggleLogging=function(){this.isLogging=!this.isLogging,this.isLogging?this.registerWsMessageListener():this.unregisterWsMessageListener()},d.prototype.registerWsMessageListener=function(){this.wsMessageListenerOff=this.$scope.$on("ws-message",function(a,b){this.logMessageHandler(b)}.bind(this))},d.prototype.unregisterWsMessageListener=function(){angular.isFunction(this.wsMessageListenerOff)&&this.wsMessageListenerOff()},d.prototype.logMessageHandler=function(a){this.isLogging&&this.messages.unshift({heading:a.message,action_id:a.action_id,body:JSON.stringify(a,null,4),messageObj:a})},d.prototype.clearMessages=function(){this.messages=[]},d.prototype.searchCache=function(){return this.$http.post(this.UnifiAPIBasePath+"/cache_query",this.cacheFilter,{withWebRTC:!0,withCredentials:!0}).then(function(a){this.cache=a.data.data[0]}.bind(this))},d.$inject=["$http","$scope","$translate","$injector","UnifiAPIBasePath"],angular.module("base-unifi").controller("DebugPanelController",d)},{}],1552:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-show="debugPanelCtrl.isEnabled" class="blackout unifiDebugPanel"><div class="appControlModal appControlModal--wide appControlModal--light"><div ng-click="debugPanelCtrl.closePanel()" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__content noHorizontalPadding noPaddingBottom"><ul class="appTabs appTabs--cozy"><li ng-repeat="item in [\'websocket\', \'cache\', \'flags\']" ng-click="debugPanelCtrl.activeTab = item" ng-class="{\'is-tab-selected\': debugPanelCtrl.activeTab === item}" translate="{{ \'DEBUG_PANEL_TAB_\' + item | uppercase }}" class="tabs__item"></li></ul></div><div ng-show="debugPanelCtrl.activeTab === \'websocket\'" class="unifiDebugPanel__tab"><div class="appControlModal__content noPadding unifiDebugPanel__controls"><form class="appForm appForm--cozy"><div class="appActionBar appActionBar--cozy appActionBar--flexible noBorder"><div class="appActionBar__inner"><div class="appActionBar__left"><button id="unifiDebugPanelLogButton" type="button" ng-click="debugPanelCtrl.toggleLogging()" class="appMainButton appMainButton--primary appMainButton--cozy">{{ debugPanelCtrl.isLogging ? \'DEBUG_PANEL_ACTION_STOP\' : \'DEBUG_PANEL_ACTION_START\' | translate}}</button><button id="unifiDebugPanelClearButton" type="button" ng-click="debugPanelCtrl.clearMessages()" translate="DEBUG_PANEL_ACTION_CLEAR" class="appMainButton appMainButton--cozy"></button></div><div class="appActionBar__right"><div class="appInputGroup"><div class="appIconInput appIconInput--right appIconInput--comfy"><div class="appIconInput__icon icon ubnt-icon--search-2"></div><input ng-model="filterWebsocketBy" type="text" placeholder="{{ \'DEBUG_PANEL_FILTER_BY_PLACEHOLDER\' | translate }}" class="appIconInput__input"></div></div></div></div></div></form></div><div class="appControlModal__content appControlModalScrollableContent unifiDebugPanel__content"><accordion close-others="false" class="appAccordion"><accordion-group ng-repeat="message in debugPanelCtrl.messages | regex:\'body\':filterWebsocketBy" is-open="isOpen"><accordion-heading><span ng-class="{\'is-open\': isOpen}" class="unifiDebugPanel__toggler"></span><span class="unifiDebugPanel__title">{{ message.heading }}</span><span ng-if="message.action_id" class="unifiDebugPanel__id">{{ message.action_id }}</span></accordion-heading><div class="unifiDebugPanel__message"><div class="unifiDebugPanel__messageBody"><json-formatter json="message.messageObj" ng-show="message.messageObj" open="3" class="json-formatter"></json-formatter></div></div></accordion-group></accordion></div></div><div ng-show="debugPanelCtrl.activeTab === \'cache\'" class="unifiDebugPanel__tab"><div class="appControlModal__content noPadding unifiDebugPanel__controls"><form class="appForm appForm--cozy"><div class="appActionBar appActionBar--cozy appActionBar--flexible noBorder"><div class="appActionBar__inner"><div class="appActionBar__left"></div><div class="appActionBar__right"><div class="appInputGroup"><div class="appIconInput appIconInput--right appIconInput--comfy"><div class="appIconInput__icon icon ubnt-icon--search-2"></div><input ng-model="debugPanelCtrl.cacheFilter" type="text" placeholder="{{ \'COMMON_SEARCH_PLACEHOLDER\' | translate }}" class="appIconInput__input"></div><div class="inlineBlock"><button id="unifiDebugPanelLogButton" ng-click="debugPanelCtrl.searchCache()" translate="DEBUG_PANEL_ACTION_SEARCH" class="appMainButton appMainButton--cozy"></button></div></div></div></div></div></form></div><div class="appControlModal__content appControlModalScrollableContent unifiDebugPanel__content"><div class="unifiDebugPanel__message"><div class="unifiDebugPanel__messageBody"><json-formatter json="debugPanelCtrl.cache" ng-show="debugPanelCtrl.cache" open="1" class="json-formatter"></json-formatter></div></div></div></div><div ng-show="debugPanelCtrl.activeTab === \'flags\'" class="unifiDebugPanel__tab"><div class="appControlModal__content noPadding unifiDebugPanel__controls"><div class="appActionBar appActionBar--cozy appActionBar--flexible noBorder"></div></div><div class="appControlModal__content appControlModalScrollableContent unifiDebugPanel__content"><div class="unifiDebugPanel__message"><form class="appForm appForm--cozy"><div class="unifiDebugPanel__flags"><div ng-repeat="(flagName, flagValue) in debugPanelCtrl.FLAGS track by $index" class="row"><div class="col--xs5 col--xsOffset1 label--right"><label for="flagsToggle_{{flagName}}" class="appLabel--primary appLabel--toggleAlign">{{flagName}}</label></div><div class="col--xs5 appFormGroup appFormGroup--cozy"><div class="appInputGroup"><div data-on="{{ \'COMMON_TOGGLE_ON\' | translate }}" data-off="{{ \'COMMON_TOGGLE_OFF\' | translate }}" class="toggle appToggle"><input id="flagsToggle_{{flagName}}" type="checkbox" ng-model="debugPanelCtrl.FLAGS[flagName]"><label for="flagsToggle_{{flagName}}"></label></div></div></div></div></div></form></div></div></div><div class="appControlModal__content"><div class="container container--centered container--comfy"><div class="row"><div class="col--xs12 alignRight noPadding"><div class="appInputGroup"><button id="unifiDebugPanelCloseButton" type="button" ng-click="debugPanelCtrl.closePanel()" translate="COMMON_ACTIONS_CLOSE" class="appMainButton appMainButton--cozy"></button></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1553:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiDebugPanel",["$rootScope","$window",function(b,c){return{restrict:"EA",replace:!0,scope:{},controller:"DebugPanelController",controllerAs:"debugPanelCtrl",bindToController:!0,template:a("./debugPanel.jade")(),link:function(a,b,d,e){c.openDebugPanel=function(){e.togglePanel(),a.$apply()}}}}])},{"./debugPanel.jade":1552}],1554:[function(a,b,c){"use strict";function d(a,b,c){this.$document=a,this.$timeout=b,this.classes=this.classes||{isDragover:"is-dnd-dragover",isDraggingSource:"is-dnd-dragging-source",isDragging:"is-dnd-dragging"},this.onDockDragOver=this.onDockDragOver.bind(this),this.onDockDragLeave=this.onDockDragLeave.bind(this),this.onDockDrop=this.onDockDrop.bind(this),this.onItemDragStart=this.onItemDragStart.bind(this),this.onItemDragEnd=this.onItemDragEnd.bind(this),this.onDocumentDragOver=this.onDocumentDragOver.bind(this),this.onDocumentDrop=this.onDocumentDrop.bind(this),this.placeholder=angular.element(c.get(this.placeholderSrc)),this.itemDragging=null}d.prototype.onDockDragOver=function(a){if(a=a.originalEvent||a,!this.isDropAllowed(a))return!0;var b=angular.element(a.currentTarget);return b.addClass(this.classes.isDragover),this.insertPlaceholder(a),a.stopPropagation(),a.preventDefault(),!1},d.prototype.onDockDragLeave=function(a){a=a.originalEvent||a,this.stopDragOver(a.currentTarget)},d.prototype.onDockDrop=function(a){if(this.removeDocumentHandlers(),a=a.originalEvent||a,!this.isDropAllowed(a))return!0;a.preventDefault();var b=a.currentTarget,c=a.dataTransfer.getData("Text"),d=this.getPlaceholderIndex(b);return this.getItemIndex(b,this.itemDragging.element[0])<=d&&--d,this.stopDragOver(b,!0),this.itemDragging=null,this.onDropInside&&this.onDropInside({event:a,itemId:c,index:d}),a.stopPropagation(),!1},d.prototype.isDropAllowed=function(){if(this.itemDragging){if(!this.allowedItemClasses)return!0;for(var a in this.allowedItemClasses)if(this.itemDragging.element.hasClass(this.allowedItemClasses[a]))return!0}},d.prototype.stopDragOver=function(a,b){a=angular.element(a),a.removeClass(this.classes.isDragover),this.$timeout(function(){!a.hasClass(this.classes.isDragover)&&this.placeholder&&this.placeholder.remove()}.bind(this),b?0:100)},d.prototype.onItemDragStart=function(a,b){if(a=a.originalEvent||a,!a.currentTarget.draggable)return a.preventDefault(),!1;this.addDocumentHandlers(),a.dataTransfer.setData("Text",b),a.dataTransfer.effectAllowed="move";var c=angular.element(a.currentTarget),d=c[0].getBoundingClientRect();c.addClass(this.classes.isDragging),this.$timeout(function(){c.addClass(this.classes.isDraggingSource)}.bind(this),0),this.itemDragging={element:c,startX:d.left,startY:d.top,mouseX:a.pageX-d.left,mouseY:a.pageY-d.top},a.stopPropagation()},d.prototype.onItemDragEnd=function(a,b){this.removeDocumentHandlers(),a=a.originalEvent||a;var c=a.currentTarget;angular.element(c).removeClass([this.classes.isDragging,this.classes.isDraggingSource].join(" ")),this.itemDragging&&this.canDropOutside&&this.onDropOutside&&this.onDropOutside({event:a,itemId:b,x:this.itemDragging.endX-this.itemDragging.mouseX,y:this.itemDragging.endY-this.itemDragging.mouseY}),this.itemDragging=null,a.stopPropagation()},d.prototype.addDocumentHandlers=function(){this.canDropOutside&&(this.$document.on("dragover",this.onDocumentDragOver),this.$document.on("drop",this.onDocumentDrop))},d.prototype.removeDocumentHandlers=function(){this.canDropOutside&&(this.$document.off("dragover",this.onDocumentDragOver),this.$document.off("drop",this.onDocumentDrop))},d.prototype.onDocumentDragOver=function(a){return a.stopPropagation(),a.preventDefault(),!1},d.prototype.onDocumentDrop=function(a){return a=a.originalEvent||a,this.itemDragging.endX=a.pageX,this.itemDragging.endY=a.pageY,a.stopPropagation(),a.preventDefault(),!1},d.prototype.isMouseInFirstHalf=function(a,b){var c=b.getBoundingClientRect(),d=this.isHorizontal?c.width:c.height,e=this.isHorizontal?c.left:c.top,f=this.isHorizontal?a.pageX:a.pageY;return f<=e+d/2},d.prototype.insertPlaceholder=function(a){var b=angular.element(a.currentTarget);this.placeholder[0].parentNode!==b[0]&&b.append(this.placeholder);var c=a.target;if(c!==b[0]){for(;c.parentNode!==b[0]&&c.parentNode;)c=c.parentNode;c.parentNode===b[0]&&c!==this.placeholder[0]&&(this.isMouseInFirstHalf(a,c)?b[0].insertBefore(this.placeholder[0],c):b[0].insertBefore(this.placeholder[0],c.nextSibling))}},d.prototype.getPlaceholderIndex=function(a){return Array.prototype.indexOf.call(a.children,this.placeholder[0])},d.prototype.getItemIndex=function(a,b){return Array.prototype.indexOf.call(a.children,b)},d.prototype.hideGhostImage=function(a){var b=document.createElement("img");b.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.dataTransfer.setDragImage(b,0,0)},d.$inject=["$document","$timeout","$templateCache"],angular.module("base-unifi").controller("DndDockController",d)},{}],1555:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiDndDock",[function(){return{scope:{items:"=unifiDndDockItems",onDropInside:"&unifiDndDockOnDropInside",onDropOutside:"&unifiDndDockOnDropOutside",canDropOutside:"=?unifiDndDockCanDropOutside",placeholderSrc:"@unifiDndDockPlaceholderSrc",allowedItemClasses:"=unifiDndDockAllowedItemClasses",isHorizontal:"=?unifiDndDockIsHorizontal"},controller:"DndDockController",controllerAs:"dndDockCtrl",bindToController:!0,link:function(a,b,c,d){b.on("dragover",d.onDockDragOver),b.on("dragleave",d.onDockDragLeave),b.on("drop",d.onDockDrop),a.$on("$destroy",function(){b.off("dragover",d.onDockDragOver),b.off("dragleave",d.onDockDragLeave),b.off("drop",d.onDockDrop)})}}}])},{}],1556:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiDndDockItem",["$parse",function(a){return{require:"^unifiDndDock",link:function(b,c,d,e){var f=b.$eval(d.unifiDndDockItem),g=function(a){c.attr("draggable",!a)},h=function(){if(!a(d.unifiDndDockItemIsDisabled)(b)&&this.dragDrop)return this.dragDrop(),!1},i=function(e){!a(d.unifiDndDockItemIsDisabled)(b)&&d.unifiDndDockItemHandle&&(e.target.matchesSelector(d.unifiDndDockItemHandle)||"select"===e.target.nodeName.toLowerCase()||(g(!0),c.one("mouseup",function(){g(!1)})))},j=function(a){e.onItemDragStart(a,f)},k=function(a){e.onItemDragEnd(a,f),b.$apply()};b.$watch(d.unifiDndDockItemIsDisabled,g),c.on("selectstart",h),c.on("mousedown",i),c.on("dragstart",j),c.on("dragend",k),b.$on("$destroy",function(){c.off("selectstart",h),c.off("mousedown",i),c.off("dragstart",j),c.off("dragend",k)})}}}])},{}],1557:[function(a,b,c){"use strict";function d(){}d.prototype.setIsUndocked=function(a){this.isUndocked=a},d.$inject=[],angular.module("base-unifi").controller("DockableItemController",d)},{}],1558:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiDockableItem",[function(){return{controller:"DockableItemController",controllerAs:"dockedItemCtrl",link:function(a,b,c,d){a.$watch(c.unifiDockableItemIsUndocked,function(a){d.setIsUndocked(a)})}}}])},{}],1559:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("../../controllers/BaseDraggableController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onMouseDown=function(a){this.offsetLeft=a.currentTarget.offsetLeft,this.offsetTop=a.currentTarget.offsetTop,this.element=angular.element(a.currentTarget),e.prototype.onMouseDown.call(this,a)},d.prototype.onMouseMove=function(a){e.prototype.onMouseMove.call(this,a),this.element.css({left:this.distanceX+this.offsetLeft+"px",top:this.distanceY+this.offsetTop+"px"})},d.prototype.onDragStopAttrs=function(a){var b=e.prototype.onDragStopAttrs.call(this,a);return angular.extend(b,{elementX:this.distanceX+this.offsetLeft,elementY:this.distanceY+this.offsetTop})},d.$inject=["$document"],angular.module("base-unifi").controller("DraggableItemController",d)},{"../../controllers/BaseDraggableController":1660}],1560:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiDraggableItem",["$parse",function(a){return{controller:"DraggableItemController",controllerAs:"draggableItemCtrl",link:function(b,c,d,e){e.setDragHandleSelector(d.unifiDraggableItemHandle),e.setDragStartCallback(function(){a(d.unifiDraggableItemOnDragStart)(b,arguments[0]),b.$apply()}),e.setDragStopCallback(function(){a(d.unifiDraggableItemOnDragStop)(b,arguments[0])}),b.$watch(d.unifiDraggableItemIsDisabled,function(a){a?e.removeEventHandlers(c):e.addEventHandlers(c)}),b.$on("$destroy",function(){e.documentCleanUp(),e.removeEventHandlers(c)})}}}])},{}],1561:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiFeatureFlagEnable",["featureFlag","ngIfDirective",function(a,b){var c=b[0];return{transclude:c.transclude,priority:c.priority,terminal:c.terminal,restrict:c.restrict,$$tlb:c.$$tlb,link:function(b,d,e){var f=a.isEnabled(e.unifiFeatureFlagEnable);e.ngIf=function(){var a=b.$eval(e.unifiFeatureFlagAnd);return f&&(void 0===e.unifiFeatureFlagAnd||a)},c.link.apply(c,arguments)}}}]).directive("unifiFeatureFlagDisable",["featureFlag","ngIfDirective",function(a,b){var c=b[0];return{transclude:c.transclude,priority:c.priority,terminal:c.terminal,restrict:c.restrict,$$tlb:c.$$tlb,link:function(b,d,e){var f=!a.isEnabled(e.unifiFeatureFlagDisable);e.ngIf=function(){var a=b.$eval(e.unifiFeatureFlagAnd);return f&&(void 0===e.unifiFeatureFlagAnd||a)},c.link.apply(c,arguments)}}}])},{}],1562:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiFixDisabled",[function(){return{link:function(a,b){b[0].addEventListener("click",function(a){"disabled"===b.attr("disabled")&&(a.stopPropagation(),a.preventDefault())},!0)}}}])},{}],1563:[function(a,b,c){"use strict";var d="ng-hide";angular.module("base-unifi").directive("unifiIfApp",["$parse","$animate","ENV",function(a,b,c){return{link:function(b,e,f){var g=a(f.unifiIfApp)(b);angular.isArray(g)?g.indexOf(c.APP)===-1&&e.addClass(d):c.APP!==g&&e.addClass(d)}}}])},{}],1564:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiIfRoleAdmin",["account","sites","ngIfDirective",function(a,b,c){var d=c[0];return{transclude:d.transclude,priority:d.priority,terminal:d.terminal,restrict:d.restrict,$$tlb:d.$$tlb,link:function(c,e,f){f.ngIf=function(){var d;if(f.unifiIfRoleAdminWithSite){var e=b.repository.collection.findWhere({name:c.$eval(f.unifiIfRoleAdminWithSite)});d=!!e&&"admin"===e.get("role")}else d=a.isAdmin();var g=c.$eval(f.unifiIfRoleAdmin)===!1,h=c.$eval(f.unifiIfRoleAdminAnd);return(g?!d:d)&&(void 0===f.unifiIfRoleAdminAnd||h)},d.link.apply(d,arguments)}}}])},{}],1565:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiIfRoleSuperAdmin",["account","ngIfDirective",function(a,b){var c=b[0];return{transclude:c.transclude,priority:c.priority,terminal:c.terminal,restrict:c.restrict,$$tlb:c.$$tlb,link:function(b,d,e){e.ngIf=function(){var c=a.isSuperAdmin(),d=b.$eval(e.unifiIfRoleSuperAdmin)===!1,f=b.$eval(e.unifiIfRoleSuperAdminAnd);return(d?!c:c)&&(void 0===e.unifiIfRoleSuperAdminAnd||f)},c.link.apply(c,arguments)}}}])},{}],1566:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiIfRoleWriteable",["account","ngIfDirective",function(a,b){var c=b[0];return{transclude:c.transclude,priority:c.priority,terminal:c.terminal,restrict:c.restrict,$$tlb:c.$$tlb,link:function(b,d,e){e.ngIf=function(){return!a.isReadOnly()},c.link.apply(c,arguments)}}}])},{}],1567:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiInitializeWhen",["ngIfDirective",function(a){var b=a[0];return{transclude:b.transclude,priority:b.priority,terminal:b.terminal,restrict:b.restrict,$$tlb:b.$$tlb,link:function(a,c,d){var e=!1;d.ngIf=function(){if(e||a.$eval(d.unifiInitializeWhen))return e=!0},b.link.apply(b,arguments)}}}])},{}],1568:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiKeyPressEvents",["$rootScope","$document","KEY_PRESS_EVENTS",function(a,b,c){return{link:function(){b.bind("keypress",function(b){var d=b.which||b.keyCode;angular.forEach(c,function(c){if(c.keyCode===d)return a.$broadcast(c.broadcastEvent,b)})})}}}])},{}],1569:[function(a,b,c){"use strict";function d(){this.isSelectorVisible=!1}d.prototype.updateColumnStore=function(a){this.columnStore=a,this.getColumnOptions=a.getColumnOptions.bind(a),this.isColumnSelected=a.isColumnSelected.bind(a),this.getBatchEditable=a.getBatchEditable.bind(a),this.getCustomized=a.getCustomized.bind(a),this.getColumnPresets=a.getColumnPresets.bind(a),this.setColumnPreset=a.setColumnPreset.bind(a)},d.prototype.openSelector=function(){this.isSelectorVisible=!0},d.prototype.closeSelector=function(){this.isSelectorVisible=!1},d.prototype.toggleSelector=function(){this.isSelectorVisible=!this.isSelectorVisible},d.prototype.toggleBatchEditable=function(){this.columnStore.setBatchEditable(!this.columnStore.isBatchEditable)},d.prototype.toggleCustomized=function(){this.columnStore.setCustomized(!this.columnStore.isCustomized)},d.prototype.toggleColumn=function(a){this.columnStore.toggleColumn(a),this.preset=null},d.$inject=[],angular.module("base-unifi").controller("ListColumnSelectorController",d)},{}],1570:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div on-outside-element-click="listColumnSelectorCtrl.closeSelector()" class="appTableHeaderActionIconContainer"><div class="appPopoverContainer"><div ng-click="listColumnSelectorCtrl.toggleSelector()" ng-class="{\'success\': listColumnSelectorCtrl.getCustomized()}" class="appTableHeaderActionIcon icon ubnt-icon--gears clickable"></div><div ng-if="listColumnSelectorCtrl.isSelectorVisible" class="appPopover appPopover--narrow appPopover--withHeader appPopover--leftDown appPopover--scrollable"><div class="appPopover__inner"><div class="appPopover__header"><div class="appForm appForm--cozy"><div unifi-if-role-admin unifi-if-role-admin-and="withBatchEdit" ng-init="inputId = [directiveId, \'group\'].join(\'-\')" class="appInputGroup fullWidth verticalRhythm--condensed"><input type="checkbox" name="enableBatchEdit" ng-attr-id="{{::inputId}}" ng-checked="listColumnSelectorCtrl.getBatchEditable()" ng-click="listColumnSelectorCtrl.toggleBatchEditable(); $event.stopPropagation();"><label for="{{::inputId}}">{{\'COMMON_LIST_COLUMN_SELECTOR_VALUE_ENABLE_GROUP_CONFIG\' | translate}}</label></div><div ng-init="inputId = [directiveId, \'customize\'].join(\'-\')" class="appInputGroup fullWidth"><input type="checkbox" name="enableCustomColumns" ng-attr-id="{{::inputId}}" ng-checked="listColumnSelectorCtrl.getCustomized()" ng-click="listColumnSelectorCtrl.toggleCustomized(); $event.stopPropagation();"><label for="{{::inputId}}">{{\'COMMON_LIST_COLUMN_SELECTOR_VALUE_CUSTOM_COLUMNS\' | translate}}</label></div></div></div><div ng-show="listColumnSelectorCtrl.columnStore.isCustomized" class="appPopover__content"><div class="appForm appForm--cozy"><ul class="list"><li ng-repeat="column in listColumnSelectorCtrl.getColumnOptions()" ng-if="!column.isPermanent"><div ng-init="inputId = [directiveId, column.id].join(\'-\')" class="appInputGroup fullWidth"><input type="checkbox" name="{{::inputId}}" ng-attr-id="{{::inputId}}" ng-checked="listColumnSelectorCtrl.isColumnSelected(column.id)" ng-click="listColumnSelectorCtrl.toggleColumn(column.id); $event.stopPropagation();"><label for="{{::inputId}}">{{column.translationKey | translate}}</label></div></li></ul></div><div ng-if="listColumnSelectorCtrl.getColumnPresets().length" class="appForm appForm--cozy verticalRhythmTop--cozy"><select ng-model="listColumnSelectorCtrl.preset" ng-options="preset.id as preset.translationKey | translate for preset in listColumnSelectorCtrl.getColumnPresets()" class="select--full"><option unifi-option-placeholder="COMMON_LIST_COLUMN_SELECTOR_VALUE_RESET_COLUMNS"></option></select></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1571:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiListColumnSelector",[function(){return{scope:{withBatchEdit:"=unifiListColumnSelectorWithBatchEdit",columnStore:"=unifiListColumnSelectorColumnStore"},controller:"ListColumnSelectorController",controllerAs:"listColumnSelectorCtrl",template:a("./listColumnSelector.jade")(),link:function(a,b,c,d){a.directiveId=a.$id,a.$watch("columnStore",function(a){a&&d.updateColumnStore(a)}),a.$watch(function(){return d.preset},function(a){a&&d.setColumnPreset(a)})}}}])},{"./listColumnSelector.jade":1570}],1572:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<pagination pagination-current-page="currentPage" pagination-page-size-options="pageSizeOptions" pagination-rows-per-page="rowsPerPage" pagination-total-rows="totalRows()" pagination-total-links="totalLinks()" ng-class="{\'appPagination--dark appForm--dark\': isDark}" class="appPagination"><pagination-state class="appPagination__currentState"><span translate="PAGINATION_SHOWING_ROWS" translate-values="{        \'startRow\': pageStart,        \'endRow\': pageEnd,        \'totalRows\': totalRows,        \'rowType\': \'{{\'PAGINATION_DEFAULT_ROW_TYPE\' | translate}}\'      }"></span></pagination-state><pagination-page-size class="appPagination__pageSize appForm--cozy visible--mdUp"><label>{{\'PAGINATION_ITEMS_PER_PAGE\' | translate}}:</label><select name="size" ng-model="rowsPerPage" ng-options="size as size for size in ($parent.$parent.pageSizeOptions || [10, 25, 50, 100, 200])" ng-change="setRowsPerPage(rowsPerPage)">{{size}}</select></pagination-page-size><div pagination-has-pages class="appPaginationPages"><label>{{\'PAGINATION_PAGES\' | translate}}:</label><pagination-previous class="appPaginationPages__previous"><span ng-class="{\'is-disabled\': isPreviousDisabled}"><div class="icon icon--inline ubnt-icon--pointer-left"></div><span translate="PAGINATION_PREVIOUS_PAGE"></span></span></pagination-previous><pagination-pages class="appPaginationPages__list"></pagination-pages><pagination-next class="appPaginationPages__next"><span ng-class="{\'is-disabled\': isNextDisabled}"><span translate="PAGINATION_NEXT_PAGE"></span><div class="icon icon--inline ubnt-icon--pointer-right"></div></span></pagination-next></div></pagination>'),
b.join("")}},{"jade/runtime":232}],1573:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiListPagination",[function(){return{scope:{currentPage:"=unifiListPaginationCurrentPage",pageSizeOptions:"=unifiListPaginationPageSizeOptions",rowsPerPage:"=unifiListPaginationRowsPerPage",totalRows:"&unifiListPaginationTotalRows",totalLinks:"&unifiListPaginationTotalLinks",isDark:"=unifiListPaginationIsDark"},restrict:"E",template:a("./listPagination.jade")()}}])},{"./listPagination.jade":1572}],1574:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-working\': isSubmitting}" title="{{\'COMMON_USER_MENU_OPTION_LOGOUT\' | translate}}" class="unifiActionIcon unifiActionIcon--logout"><div class="icon ubnt-icon--logout"></div></div>'),b.join("")}},{"jade/runtime":232}],1575:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiLogoutButton",["$state","account","site","ENV",function(b,c,d,e){return{replace:!0,template:a("./logoutButton.jade")(),link:function(a,f){f.on("click",function(){a.isSubmitting=!0,c.logout().then(function(){b.go(e.LOGIN_STATE,{site:d.getActiveSite()})})["finally"](function(){a.isSubmitting=!1})})}}}])},{"./logoutButton.jade":1574}],1576:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<pagination pagination-current-page="currentPage" pagination-rows-per-page="rowsPerPage" pagination-total-rows="totalRows()" ng-class="{\'appPagination--dark\': isDark}" class="appPagination"><pagination-state class="appPagination__currentState"><span translate="PAGINATION_SHOWING_ROWS" translate-values="{        \'startRow\': pageStart,        \'endRow\': pageEnd,        \'totalRows\': totalRows,        \'rowType\': \'{{\'PAGINATION_DEFAULT_ROW_TYPE\' | translate}}\'      }"></span></pagination-state><div pagination-has-pages class="appPaginationPages"><pagination-previous class="appPaginationPages__previous"><span ng-class="{\'is-disabled\': isPreviousDisabled}"><div class="icon icon--inline ubnt-icon--pointer-left"></div><span translate="PAGINATION_PREVIOUS_PAGE"></span></span></pagination-previous><pagination-next class="appPaginationPages__next"><span ng-class="{\'is-disabled\': isNextDisabled}"><span translate="PAGINATION_NEXT_PAGE"></span><div class="icon icon--inline ubnt-icon--pointer-right"></div></span></pagination-next></div></pagination>'),b.join("")}},{"jade/runtime":232}],1577:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiMicroPagination",[function(){return{scope:{currentPage:"=unifiMicroPaginationCurrentPage",rowsPerPage:"=unifiMicroPaginationRowsPerPage",totalRows:"&unifiMicroPaginationTotalRows",isDark:"=unifiMicroPaginationIsDark"},restrict:"E",template:a("./microPagination.jade")()}}])},{"./microPagination.jade":1576}],1578:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiMobileSafeHover",[function(){return{link:function(a,b){b.addClass("is-native-hover-disabled"),b.on("mouseenter touchstart",function(){b.addClass("hover")}),b.on("mouseleave touchmove click",function(){b.removeClass("hover")}),a.$on("$stateChangeSuccess",function(){b.removeClass("hover")})}}}])},{}],1579:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("../../controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateForm=function(a){this.form=a},d.$inject=["modelDivergence"],angular.module("base-unifi").controller("ModelFormController",d)},{"../../controllers/BaseFormController":1661}],1580:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiModelForm",[function(){return{scope:!0,controller:"ModelFormController",controllerAs:"modelFormCtrl",require:"^form",link:function(a,b,c,d){var e=a.modelFormCtrl;e.updateForm(d),a.$watch(c.unifiModelForm,function(a){e.updateModel(a)}),a.$watch(function(){return e.modelCopy},function(a){d.modelCopy=a}),a.$watch(function(){return d?d.$error.divergent:void 0},function(){c.unifiModelFormAutoResolveDivergence&&a.modelFormCtrl.resolveDivergence()}),a.$on("$destroy",function(){e.removeEventHandlers()})}}}])},{}],1581:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push("<option disabled value=\"\">{{(translationKey || 'COMMON_LABEL_CHOOSE_ONE') | translate}}</option>"),b.join("")}},{"jade/runtime":232}],1582:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiOptionPlaceholder",[function(){return{template:a("./optionPlaceholder.jade")(),replace:!0,scope:{translationKey:"@unifiOptionPlaceholder"}}}])},{"./optionPlaceholder.jade":1581}],1583:[function(a,b,c){"use strict";var d="block-pause-children-watchers";angular.module("base-unifi").directive("unifiPauseChildrenWatchers",["$timeout",function(a){return{priority:100,link:function(b,c,e){function f(a,b,c){angular.forEach(a.children(),function(e){var i=angular.element(e);g(i,b,!1),g(i,b,!0),(++c<h||!h)&&(a.data(d)||f(i,b,c))})}function g(a,b,c){var d=a.data(),e=c?"$isolateScope":"$scope",f="_bk_$$watchers_"+e;d.hasOwnProperty(e)&&d[e].hasOwnProperty("$$watchers")&&d[e].$$watchers&&(b?(d[f]=[],angular.forEach(d[e].$$watchers,function(a){try{d[f].push(angular.copy(a))}catch(b){}}),d[e].$$watchers=[]):d.hasOwnProperty(f)&&angular.forEach(d[f],function(a){d[e].$$watchers.push(angular.copy(a))}))}var h=e.unifiPauseChildrenWatchersMaxRecursion;a(function(){b.$watch(e.unifiPauseChildrenWatchers,function(a){void 0!==a&&(a?f(c,!0,0):f(c,!1,0))})},0,!0)}}}]),angular.module("base-unifi").directive("unifiPauseChildrenWatchersAndCreateScope",[function(){return{priority:200,transclude:!0,link:function(a,b,c,d,e){e(a.$new(),function(a,c){b.append(a),b.on("$destroy",function(){a.remove(),c.$destroy()})})}}}]),angular.module("base-unifi").directive("unifiBlockPauseChildrenWatchers",[function(){return{link:function(a,b){b.data(d,!0)}}}])},{}],1584:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiPositionAlerts",["preferences",function(a){return{link:function(b,c){var d={top_left:"appToastContainer--topLeft",top_center:"appToastContainer--topCenter",top_right:"appToastContainer--topRight",bottom_left:"appToastContainer--bottomLeft",bottom_center:"appToastContainer--bottomCenter",bottom_right:"appToastContainer--bottomRight"},e=Object.keys(d).map(function(a){return d[a]}).join(" ");b.$watch(function(){return a.model.get("alertsPosition")},function(a){c.removeClass(e),c.addClass(d[a])})}}}])},{}],1585:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiPreventFocusZoom",["bowser","$document","$timeout",function(a,b,c){return{scope:!0,restrict:"A",link:function(d,e){var f,g=e.attr("content"),h=[g,"user-scalable=0"].join(", "),i=a.ios,j=!1,k=function(){j&&(e.attr("content",g),j=!1)},l=function(){j||(c.cancel(f),e.attr("content",h),j=!0)};i&&c(function(){angular.element(b[0].body).on("touchstart",function(a){["input","select","textarea","output"].indexOf(a.target.nodeName.toLowerCase())!==-1&&l()}).on("touchend",function(){f=c(k,500)})},0)}}}])},{}],1586:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-class="{\'is-working\': isRefreshing}" title="{{\'COMMON_ACTIONS_REFRESH\' | translate}}" class="unifiActionIcon unifiActionIcon--refresh"><div class="icon ubnt-icon--sync"></div></div>'),b.join("")}},{"jade/runtime":232}],1587:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiRefreshButton",["$timeout","refresh",function(b,c){return{replace:!0,template:a("./refreshButton.jade")(),link:function(a,d){d.on("click",function(){c.refresh()}),a.$watch(function(){return c.isRefreshing},function(c){c?a.isRefreshing=!0:b(function(){a.isRefreshing=!1,a.$digest()},500,!1)})}}}])},{"./refreshButton.jade":1586}],1588:[function(a,b,c){"use strict";function d(a,b){this.refresh=a,this.REFRESH_RATES=b,this.isDropdownVisible=!1}d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.closeDropdown=function(){this.isDropdownVisible=!1},d.prototype.setRefreshRate=function(a){this.refresh.updateRefreshRate(a)},d.prototype.getRefreshRate=function(){return this.refresh.getRefreshRate()},d.$inject=["refresh","REFRESH_RATES"],angular.module("base-unifi").controller("RefreshSwitcherController",d)},{}],1589:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div on-outside-element-click="refreshSwitcherCtrl.closeDropdown()" class="appOrgSwitcher appOrgSwitcher--narrow appOrgSwitcher--withTitle"><div ng-click="refreshSwitcherCtrl.toggleDropdown()" class="appOrgSwitcher__trigger"><div translate="COMMON_REFRESH_RATE_MENU_TITLE" class="appOrgSwitcher__title visible--mdUp"></div><div translate="COMMON_REFRESH_RATE_MOBILE_MENU_TITLE" class="appOrgSwitcher__title visible--smDown"></div><span class="appOrgSwitcher__label visible--smUp">{{refreshSwitcherCtrl.getRefreshRate().translationKey | translate}}</span><span class="appOrgSwitcher__label visible--xs">{{refreshSwitcherCtrl.getRefreshRate().mobileTranslationKey | translate}}</span><span class="appOrgSwitcher__arrow icon ubnt-icon--pointer-down"></span></div><div ng-show="refreshSwitcherCtrl.isDropdownVisible" class="appOrgSwitcher__dropdown"><ul class="appOrgSwitcher__list"><li ng-repeat="rate in refreshSwitcherCtrl.REFRESH_RATES" class="appOrgSwitcher__item"><a ng-click="refreshSwitcherCtrl.closeDropdown(); refreshSwitcherCtrl.setRefreshRate(rate.id)" class="truncate">{{rate.translationKey | translate }}</a></li><li class="appOrgSwitcher__item appOrgSwitcher__add visible--xs"><a ng-click="refreshSwitcherCtrl.refresh.refresh()" ng-disabled="refreshSwitcherCtrl.refresh.isRefreshing"><div ng-class="{\'appIconAnimated--rotate\': refreshSwitcherCtrl.refresh.isRefreshing}" class="appOrgSwitcher__addIcon icon ubnt-icon--sync"></div><span translate="COMMON_ACTIONS_REFRESH"></span></a></li></ul></div></div>'),b.join("")}},{"jade/runtime":232}],1590:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiRefreshSwitcher",[function(){return{controller:"RefreshSwitcherController",controllerAs:"refreshSwitcherCtrl",replace:!0,restrict:"E",template:a("./refreshSwitcher.jade")()}}])},{"./refreshSwitcher.jade":1589}],1591:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiRequiresSiteContext",["site","account","ngIfDirective",function(a,b,c){var d=c[0];return{transclude:d.transclude,priority:d.priority,terminal:d.terminal,restrict:d.restrict,$$tlb:d.$$tlb,link:function(c,e,f){f.ngIf=function(){return b.isLoggedIn()&&!!a.getActiveSite()},d.link.apply(d,arguments)}}}])},{}],1592:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("../../controllers/BaseDraggableController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.setElement=function(a){this.element=a},d.prototype.getResizedWidth=function(){return Math.max(0,this.distanceX+this.startWidth)},d.prototype.getResizedHeight=function(){return Math.max(0,this.distanceY+this.startHeight)},d.prototype.onMouseDown=function(a){a.preventDefault(),a.stopPropagation();var b=angular.element(a.currentTarget);this.canResizeHorizontally=b.hasClass("is-resizable-horizontally"),this.canResizeVertically=b.hasClass("is-resizable-vertically"),this.startWidth=this.element[0].offsetWidth,this.startHeight=this.element[0].offsetHeight,e.prototype.onMouseDown.call(this,a)},d.prototype.onMouseMove=function(a){e.prototype.onMouseMove.call(this,a);var b={};this.canResizeHorizontally&&(b.width=this.getResizedWidth()+"px"),this.canResizeVertically&&(b.height=this.getResizedHeight()+"px"),this.element.css(b)},d.prototype.onDragStopAttrs=function(a){var b=e.prototype.onDragStopAttrs.call(this,a);return angular.extend(b,{width:this.getResizedWidth(),height:this.getResizedHeight()})},d.$inject=["$document"],angular.module("base-unifi").controller("ResizableItemController",d)},{"../../controllers/BaseDraggableController":1660}],1593:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiResizableItem",["$parse",function(a){return{controller:"ResizableItemController",controllerAs:"resizableItemCtrl",link:function(b,c,d,e){e.setElement(c);var f=function(){var a=b.$eval(d.unifiResizableItemDirection),f=!a||a.indexOf("right")!==-1,g=!a||a.indexOf("bottom")!==-1;f&&(c.append('<div class="resizeHandleRight is-resizable-horizontally" />'),e.addEventHandlers(c.find(".resizeHandleRight"))),g&&(c.append('<div class="resizeHandleBottom is-resizable-vertically" />'),e.addEventHandlers(c.find(".resizeHandleBottom"))),f&&g&&(c.append('<div class="resizeHandleBottomRight is-resizable-vertically is-resizable-horizontally" />'),e.addEventHandlers(c.find(".resizeHandleBottomRight")))},g=function(){angular.forEach([".resizeHandleRight",".resizeHandleBottom",".resizeHandleBottomRight"],function(a){var b=c.find(a);e.removeEventHandlers(b),b.remove()})};e.setDragStartCallback(function(){a(d.unifiResizableItemOnResizeStart)(b,arguments[0]),b.$apply()}),e.setDragStopCallback(function(){a(d.unifiResizableItemOnResizeStop)(b,arguments[0])}),b.$watch(d.unifiResizableItemIsDisabled,function(a){a?g():f()}),b.$on("$destroy",function(){e.documentCleanUp(),g()})}}}])},{}],1594:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<ng-form name="searchForm" ng-class="::{    \'appForm--cozy\': isCozy,    \'appForm--dark\': isDark  }" autocomplete="off" class="appForm"><div class="appInputGroup"><div ng-class="{        \'appIconInput--left\': leftIcon,        \'fullWidth\': isFullWidth      }" class="appIconInput appIconInput--right appIconInput--comfy"><div ng-if="leftIcon" ng-class="leftIcon" class="appIconInput__icon appIconInput__icon--left icon"></div><div ng-if="!searchQuery.length &amp;&amp; !isBusy" class="appIconInput__icon appIconInput__icon--right icon ubnt-icon--search-2"></div><div ng-if="searchQuery.length &amp;&amp; !isBusy" ng-click="clear($event)" class="appIconInput__icon appIconInput__icon--right icon ubnt-icon--x-circle clickable clearSearch"></div><div ng-if="isBusy" class="appIconInput__icon appIconInput__icon--right appIconAnimated--rotate icon ubnt-icon--sync"></div><input type="text" name="search" placeholder="{{placeholder || \'COMMON_SEARCH_PLACEHOLDER\' | translate}}" ng-model="searchQuery" ng-model-options="{ debounce: 700 }" ng-change="onSearchQueryChange({searchQuery: searchQuery})" class="input--full appIconInput__input"></div></div></ng-form>'),b.join("")}},{"jade/runtime":232}],1595:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiSearch",[function(){return{scope:{isCozy:"=?unifiSearchIsCozy",isDark:"=?unifiSearchIsDark",isBusy:"=?unifiSearchIsBusy",isFullWidth:"=?unifiSearchIsFullWidth",onSearchQueryChange:"&?unifiSearchOnChange",searchQuery:"=?unifiSearchQuery",placeholder:"=?unifiSearchPlaceholder",leftIcon:"=?unifiSearchLeftIcon"},replace:!0,restrict:"E",template:a("./search.jade")(),link:function(a){a.searchQuery=a.searchQuery||"",a.clear=function(b){b.stopPropagation(),a.searchQuery="",a.onSearchQueryChange&&a.onSearchQueryChange({searchQuery:a.searchQuery})}}}}])},{"./search.jade":1594}],1596:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiSidePanelStickyTitle",["$document","$timeout",function(a,b){return{scope:{type:"@unifiSidePanelStickyTitleType",dataAttr:"@unifiSidePanelStickyTitleDataAttr",panels:"=unifiSidePanelStickyTitlePanels",containerSelector:"@unifiSidePanelStickyTitleContainerSelector",itemSelector:"@unifiSidePanelStickyTitleItemSelector",offsetAdjust:"@?unifiSidePanelStickyTitleOffsetAdjust"},replace:!0,templateUrl:function(a,b){return"partials/"+b.unifiSidePanelStickyTitleType+"PanelStickyTitle.html"},link:function(c){function d(a){var b,d;return angular.forEach(g[0].querySelectorAll(c.itemSelector),function(e){var f=e.offsetTop-(c.offsetAdjust?c.offsetAdjust:0);f<a&&(angular.isUndefined(b)||a-f<b)&&(d=e,b=a-f)}),d?angular.element(d).data(c.dataAttr||"id"):void 0}function e(){var a=g.scrollTop(),b=a>0,e=b?d(a):void 0;b===c.attrs.isVisible&&e===c.attrs.itemId||(c.attrs.isVisible=b,e?(c.attrs.itemId=e,c.attrs.itemType=c.panels.getItemTypeById(e),c.panels.getItemById(e).then(function(a){c.attrs.model=a})):(c.attrs.itemId=void 0,c.attrs.itemType=void 0,c.attrs.model=void 0),c.$digest())}function f(b){g&&g.off("scroll",e),g=angular.element(a.find("body")[0].querySelector(b)),g.on("scroll",e),c.$on("$destroy",function(){g.off("scroll",e)})}var g;c.attrs={isVisible:!1,itemId:void 0,model:void 0},c.$watch("containerSelector",f),b(e,0,!1)}}}])},{}],1597:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.$state=a,this.featureFlag=b,this.frame=c,this.sites=d,this.siteUtils=f,this.EVENTS=g,this.isDropdownVisible=!1,e.call(this),this.updateCollection(d.repository.collection)}var e=a("../../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.onCollectionChange=function(){this.siteOptions=this.collection?this.collection.sortBy(function(a){return a.get("desc")}):[]},d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.closeDropdown=function(){this.isDropdownVisible=!1},d.prototype.setActiveSite=function(a){return this.$state.go(this.$state.current.name,{site:a.get("name")})},d.prototype.getActiveSite=function(){return this.siteUtils.getActiveSite()},d.prototype.addSite=function(){this.closeDropdown(),this.frame.show("addSite")},d.prototype.importSite=function(){this.closeDropdown(),this.frame.show("importSite")},d.prototype.openSitesOverview=function(){this.closeDropdown(),this.frame.show("sitesOverview")},d.$inject=["$state","featureFlag","frame","sites","siteUtils","EVENTS"],angular.module("base-unifi").controller("SiteSwitcherController",d)},{"../../../base-unifi/controllers/BaseCollectionController":1657}],1598:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div on-outside-element-click="siteSwitcherCtrl.closeDropdown()" ng-show="siteSwitcherCtrl.siteOptions.length" class="appOrgSwitcher appOrgSwitcher--withTitle"><div ng-click="siteSwitcherCtrl.toggleDropdown()" class="appOrgSwitcher__trigger"><div translate="COMMON_SITE_MENU_TITLE" class="appOrgSwitcher__title"></div><span class="appOrgSwitcher__label">{{siteSwitcherCtrl.getActiveSite().get(\'desc\')}}</span><span class="appOrgSwitcher__arrow icon ubnt-icon--pointer-down"></span></div><div ng-show="siteSwitcherCtrl.isDropdownVisible" class="appOrgSwitcher__dropdown"><ul class="appOrgSwitcher__list"><li ng-repeat="site in siteSwitcherCtrl.siteOptions" class="appOrgSwitcher__item"><a ng-click="siteSwitcherCtrl.closeDropdown(); siteSwitcherCtrl.setActiveSite(site)" class="truncate">{{site.get(\'desc\')}}</a></li><li class="appOrgSwitcher__item appOrgSwitcher__add"><a ng-click="siteSwitcherCtrl.openSitesOverview()"><div class="appOrgSwitcher__addIcon icon ubnt-icon--list-unordered"></div><span translate="COMMON_SITE_MENU_OPTION_OVERVIEW"></span></a></li><li unifi-if-role-super-admin class="appOrgSwitcher__item"><a ng-click="siteSwitcherCtrl.addSite()"><div class="appOrgSwitcher__addIcon icon ubnt-icon--plus"></div><span translate="COMMON_SITE_MENU_OPTION_ADD_NEW"></span></a></li><li unifi-if-role-super-admin unifi-if-role-super-admin-and="siteSwitcherCtrl.featureFlag.isEnabled(\'enableSiteImportExport\')" class="appOrgSwitcher__item"><a ng-click="siteSwitcherCtrl.importSite()"><div class="appOrgSwitcher__addIcon icon ubnt-icon--download-2"></div><span translate="COMMON_SITE_MENU_OPTION_IMPORT_SITE"></span></a></li></ul></div></div>'),b.join("")}},{"jade/runtime":232}],1599:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiSiteSwitcher",[function(){return{controller:"SiteSwitcherController",controllerAs:"siteSwitcherCtrl",replace:!0,restrict:"E",template:a("./siteSwitcher.jade")(),link:function(a,b,c,d){a.$on("$destroy",function(){d.removeEventHandlers()})}}}])},{"./siteSwitcher.jade":1598}],1600:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiStylePreferences",["preferences",function(a){return{restrict:"A",link:function(b,c){b.$watch(function(){return a.model.get("isMinimal")},function(a){c[a?"removeClass":"addClass"]("withHeavyIcons")})}}}])},{}],1601:[function(a,b,c){"use strict";function d(a){this.$translate=a,this.isDropdownVisible=!1,this.values=[],this.times=[{hours:1,translationKey:"DATETIME_HOUR_FULL_LAST",translationParameters:{}},{hours:8,translationKey:"DATETIME_HOURS_FULL_LAST",translationParameters:{hours:8}},{hours:12,translationKey:"DATETIME_HOURS_FULL_LAST",translationParameters:{hours:12}},{hours:24,translationKey:"DATETIME_HOURS_FULL_LAST",translationParameters:{hours:24}},{hours:48,translationKey:"DATETIME_HOURS_FULL_LAST",translationParameters:{hours:48}},{hours:72,translationKey:"DATETIME_DAYS_FULL_PARAMETERIZED",translationParameters:{days:3}},{hours:168,translationKey:"DATETIME_DAYS_FULL_PARAMETERIZED",translationParameters:{days:7}},{hours:336,translationKey:"DATETIME_WEEKS_FULL_PARAMETERIZED",translationParameters:{weeks:2}},{hours:720,translationKey:"DATETIME_DAYS_FULL_PARAMETERIZED",translationParameters:{days:30}},{hours:2880,translationKey:"DATETIME_DAYS_FULL_PARAMETERIZED",translationParameters:{days:120}},{hours:0,translationKey:"DATETIME_ALL",translationParameters:{}}]}d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.closeDropdown=function(){this.isDropdownVisible=!1},d.prototype.setValues=function(a){this.values=a,this.timesCache=null},d.prototype.getTimes=function(){return this.timesCache||(this.timesCache=this.times.filter(function(a){return this.values.indexOf(a.hours)!==-1}.bind(this))),this.timesCache},d.prototype.setOnChangeCallback=function(a){this.callback=a},d.prototype.setHours=function(a){this.time=this.times.find(function(b){return b.hours===a})},d.prototype.changeHours=function(a){this.setHours(a),this.callback({hours:a})},d.prototype.getActiveTimeText=function(){return this.$translate.instant(this.time.translationKey,this.time.translationParameters)},d.$inject=["$translate"],angular.module("base-unifi").controller("TimeFilterDropdownController",d)},{}],1602:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="timeFilterDropdownCtrl.toggleDropdown()" on-outside-element-click="timeFilterDropdownCtrl.closeDropdown()" class="appMainButton appMainButton--filter appMainButton--cozy appMainButton--withDropdown"><span class="button__icon button__icon--left icon ubnt-icon--clock-2 visible--xs"></span><span class="visible--smUp">{{\'COMMON_LABEL_SHOW\' | translate}}:&nbsp;</span><span>{{timeFilterDropdownCtrl.getActiveTimeText()}}</span><span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{      \'appDropdown--dark\': isDark,      \'is-dropdown-visible\': timeFilterDropdownCtrl.isDropdownVisible    }" class="appDropdown appDropdown--left appDropdown--inButton appDropdown--scrollable"><li ng-repeat="time in timeFilterDropdownCtrl.getTimes()" ng-click="timeFilterDropdownCtrl.changeHours(time.hours)" class="appDropdown__item">{{time.translationKey | translate:time.translationParameters}}</li></ul></div>'),b.join("")}},{"jade/runtime":232}],1603:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiTimeFilterDropdown",["TIME_FILTER_DEFAULTS",function(b){return{scope:{values:"=unifiTimeFilterDropdownValues",callback:"&unifiTimeFilterDropdownCallback",defaultHours:"=unifiTimeFilterDropdownDefaultHours",isDark:"=unifiTimeFilterDropdownIsDark"},controller:"TimeFilterDropdownController",controllerAs:"timeFilterDropdownCtrl",replace:!0,template:a("./timeFilterDropdown.jade")(),link:function(a,c,d,e){e.setValues(a.values||b.DROPDOWN_VALUES),e.setHours(void 0===a.defaultHours?b.DEFAULT_VALUE:a.defaultHours),e.setOnChangeCallback(a.callback)}}}])},{"./timeFilterDropdown.jade":1602}],1604:[function(a,b,c){"use strict";function d(a){this.intervals=[a.DAILY,a.WEEKLY,a.MONTHLY],this.interval=this.initValue||this.intervals[0]}d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.closeDropdown=function(){this.isDropdownVisible=!1},d.prototype.setInterval=function(a){this.onChange&&this.interval!==a&&this.onChange({interval:a}),this.interval=a},d.$inject=["TIME_INTERVALS"],angular.module("base-unifi").controller("TimeIntervalSelectorController",d)},{}],1605:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div ng-click="timeIntervalSelectorCtrl.toggleDropdown()" on-outside-element-click="timeIntervalSelectorCtrl.closeDropdown()" class="appMainButton appMainButton--filter appMainButton--cozy appMainButton--withDropdown">{{timeIntervalSelectorCtrl.interval.translationKey | translate:timeIntervalSelectorCtrl.interval.translationParams}}<span class="button__icon button__icon--right icon ubnt-icon--pointer-down"></span><ul ng-class="{\'is-dropdown-visible\': timeIntervalSelectorCtrl.isDropdownVisible}" class="appDropdown appDropdown--left appDropdown--inButton"><li ng-repeat="interval in timeIntervalSelectorCtrl.intervals" ng-click="timeIntervalSelectorCtrl.setInterval(interval)" class="appDropdown__item">{{interval.translationKey | translate:interval.translationParams}}</li></ul></div>'),b.join("")}},{"jade/runtime":232}],1606:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiTimeIntervalSelector",[function(){return{controller:"TimeIntervalSelectorController",controllerAs:"timeIntervalSelectorCtrl",template:a("./timeIntervalSelector.jade")(),restrict:"E",scope:{initValue:"=unifiTimeIntervalSelectorInitValue",onChange:"&unifiTimeIntervalSelectorOnChange"},bindToController:!0,replace:!0}}])},{"./timeIntervalSelector.jade":1605}],1607:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiTranslateLink",["$compile","$timeout","$translate",function(a,b,c){return{scope:{translate:"@unifiTranslateLinkTranslate",state:"&unifiTranslateLinkState"},link:function(d,e){b(function(){var b=c.instant(d.translate,{state:d.state()});e.html(a("<span>"+b+"</span>")(d))},0)}}}])},{}],1608:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$state=a,this.account=b,this.site=c,this.frame=d,this.editAccountService=e,this.ENV=f,this.isDropdownVisible=!1}d.prototype.toggleDropdown=function(){this.isDropdownVisible=!this.isDropdownVisible},d.prototype.closeDropdown=function(){this.isDropdownVisible=!1},d.prototype.openPreferences=function(){this.closeDropdown(),this.frame.show("preferences")},d.prototype.editAccount=function(){this.closeDropdown(),this.editAccountService.editAccount()},d.prototype.logout=function(){return this.account.logout().then(function(){this.$state.go(this.ENV.LOGIN_STATE,{site:this.site.getActiveSite()})}.bind(this))},d.$inject=["$state","account","site","frame","editAccount","ENV"],angular.module("base-unifi").controller("UserMenuController",d)},{}],1609:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div on-outside-element-click="userMenuCtrl.closeDropdown()" class="appOrgSwitcher appOrgSwitcher--withTitle"><div ng-click="userMenuCtrl.toggleDropdown()" class="appOrgSwitcher__trigger"><div translate="COMMON_USER_MENU_TITLE" class="appOrgSwitcher__title"></div><span class="appOrgSwitcher__label">{{userMenuCtrl.account.repository.model.get(\'name\')}}</span><span class="appOrgSwitcher__arrow icon ubnt-icon--pointer-down"></span></div><div ng-show="userMenuCtrl.isDropdownVisible" class="appOrgSwitcher__dropdown"><ul class="appOrgSwitcher__list"><li class="appOrgSwitcher__item"><a ng-click="userMenuCtrl.openPreferences()"><div class="appOrgSwitcher__addIcon icon ubnt-icon--gears"></div><span translate="COMMON_USER_MENU_OPTION_PREFERENCES"></span></a><a ng-click="userMenuCtrl.editAccount()"><div class="appOrgSwitcher__addIcon icon ubnt-icon--pencil"></div><span translate="COMMON_USER_MENU_OPTION_EDIT_ACCOUNT"></span></a><a ng-click="userMenuCtrl.logout()"><div class="appOrgSwitcher__addIcon icon ubnt-icon--logout"></div><span translate="COMMON_USER_MENU_OPTION_LOGOUT"></span></a></li></ul></div></div>'),b.join("")}},{"jade/runtime":232}],1610:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiUserMenu",[function(){return{controller:"UserMenuController",controllerAs:"userMenuCtrl",bindToController:!0,template:a("./userMenu.jade")()}}])},{"./userMenu.jade":1609}],1611:[function(a,b,c){"use strict";function d(a){this.system=a}d.$inject=["system"],angular.module("base-unifi").controller("VersionHeaderController",d)},{}],1612:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="appGlobalHeader__version"><div class="appGlobalHeader__versionItem">{{versionHeaderCtrl.system.repository.model.get(\'version\')}}</div></div>'),b.join("")}},{"jade/runtime":232}],1613:[function(a,b,c){"use strict";angular.module("base-unifi").directive("unifiVersionHeader",[function(){return{controller:"VersionHeaderController",controllerAs:"versionHeaderCtrl",template:a("./versionHeader.jade")()}}])},{"./versionHeader.jade":1612}],1614:[function(a,b,c){"use strict";angular.module("base-unifi").config(["$analyticsProvider",function(a){a.withBase(!0)}])},{}],1615:[function(a,b,c){"use strict";angular.module("base-unifi").config(["$animateProvider",function(a){a.classNameFilter(/ng-animatable/)}])},{}],1616:[function(a,b,c){"use strict";angular.module("base-unifi").config(["$compileProvider",function(a){a.aHrefSanitizationWhitelist(/^\s*(https?|blob):/),a.preAssignBindingsEnabled(!0)}])},{}],1617:[function(a,b,c){"use strict";angular.module("base-unifi").config(["contextSwitchStatesProvider","EVENTS",function(a,b){a.setStart(b.SITE_CONTEXT_SWITCH_START).setSuccess(b.SITE_CONTEXT_SWITCH_SUCCESS).setFail(b.SITE_CONTEXT_SWITCH_FAIL)}])},{}],1618:[function(a,b,c){"use strict";angular.module("base-unifi").config(["d3Provider",function(a){a.enableExtension("ubntSelection")}])},{}],1619:[function(a,b,c){"use strict";angular.module("base-unifi").config(["deviceProvider",function(a){var b=document.location.search.substring(1).split("&"),c={};b.forEach(function(a){var b=a.split("=");c[decodeURIComponent(b[0])]=decodeURIComponent(b[1])}),c.d&&a.initActiveDevice(c.d)}])},{}],1620:[function(a,b,c){"use strict";angular.forEach(window.unifiConfig,function(a,b){angular.module("base-unifi").value(b,a)}),angular.forEach(window.unifiConstant,function(a,b){angular.module("base-unifi").constant(b,a)}),angular.forEach(window.webrtcConfig,function(a,b){angular.module("base-unifi").value(b,a)})},{}],1621:[function(a,b,c){"use strict";angular.module("base-unifi").config(["frameProvider",function(b){b.when("confirm",{controller:"ConfirmController",controllerAs:"confirmCtrl",template:a("../views/frames/confirm.jade")(),layout:"confirmLayout"}).when("editAccount",{controller:"EditAccountController",controllerAs:"editAccountCtrl",template:a("../views/frames/editAccount.jade")(),layout:"editAccountLayout"})}])},{"../views/frames/confirm.jade":1796,"../views/frames/editAccount.jade":1797}],1622:[function(a,b,c){"use strict";angular.module("base-unifi").config(["$httpProvider",function(a){a.useApplyAsync(!0),a.interceptors.push("accessHttpInterceptor"),a.interceptors.push("xhrHttpInterceptor")}])},{}],1623:[function(a,b,c){"use strict";angular.module("base-unifi").config([function(){var b=a("moment-twitter");b.lang("en",{calendar:{lastDay:"[Yesterday]",sameDay:"[Today]",nextDay:"[Tomorrow]",lastWeek:"[last] dddd",nextWeek:"dddd",sameElse:"L"}})}])},{"moment-twitter":236}],1624:[function(a,b,c){"use strict";angular.module("base-unifi").config(["preferencesProvider","DEFAULT_PREFERENCES",function(a,b){a.initDefaultPreferences({rowsPerPage:b.ROWS_PER_PAGE,rowsPerPropertyPanel:b.ROWS_PER_PROPERTY_PANEL,refreshRate:b.REFRESH_RATE,refreshRateRememberAll:b.REFRESH_RATE_REMEMBER_ALL,
isSettingsDark:b.IS_SETTINGS_DARK,isCondensed:b.IS_CONDENSED,isMinimal:b.IS_MINIMAL,isResponsive:b.IS_RESPONSIVE,isPropertyPanelInline:b.IS_PROPERTY_PANEL_INLINE,alertsPosition:b.ALERTS_POSITION,use24HourTime:b.USE_24_HOUR_CLOCK,dateFormat:b.DATE_FORMAT,timeFormat:b.USE_24_HOUR_CLOCK?b.TIME_FORMAT_24HR:b.TIME_FORMAT_12HR,websocketEnabled:b.WEBSOCKET_ENABLED})}])},{}],1625:[function(a,b,c){"use strict";angular.module("base-unifi").config(["$qProvider",function(a){a.errorOnUnhandledRejections(!1)}])},{}],1626:[function(a,b,c){"use strict";angular.module("base-unifi").config(["redirectUrlProvider",function(a){a.store(window.location.href)}])},{}],1627:[function(a,b,c){"use strict";angular.module("base-unifi").config(["siteProvider",function(a){var b=window.location.pathname.split("/"),c=b.indexOf("site");c>=0&&b[c+1]&&a.initActiveSite(b[c+1])}])},{}],1628:[function(a,b,c){"use strict";angular.module("base-unifi").config(["$translateProvider","$translatePartialLoaderProvider","translateDebugProvider","LANGUAGES",function(a,b,c,d){var e=window.unifiConfig.version,f=c.isEnabled();if(a.useSanitizeValueStrategy("escapeParameters").uniformLanguageTag("bcp47"),f){var g="debug";a.useLoader("$translatePartialLoader",{urlTemplate:"locales/debug.json"}).translations(g,{}).preferredLanguage(g)}else a.useLoader("$translatePartialLoader",{urlTemplate:"locales/{lang}/{part}.json?v="+e}).useStorage("i18nLocalStorage").addInterpolation("$translateMessageFormatInterpolation").registerAvailableLanguageKeys(d.supportedLanguagesList,d.supportedLanguagesMapping).determinePreferredLanguage().fallbackLanguage("en")}])},{}],1629:[function(a,b,c){"use strict";angular.module("base-unifi").config(["versionProvider",function(a){a.readVersion(window.location.pathname)}])},{}],1630:[function(a,b,c){"use strict";angular.module("base-unifi").config(["webRtcConnectorProvider",function(a){a.useConfigurationFactory("unifiWebRtcConfiguration")}])},{}],1631:[function(a,b,c){"use strict";angular.module("base-unifi").constant("ANALYTICS_CATEGORIES",{WEBRTC:"V5_WEBRTC"})},{}],1632:[function(a,b,c){"use strict";angular.module("base-unifi").constant("ANALYTICS_EVENTS",{WEBRTC_EVENT_PREFIX:"V5_WEBRTC_",WEBRTC_FATAL_ERROR:"V5_WEBRTC_FATAL_ERROR",WEBRTC_SUCCESS:"V5_WEBRTC_SUCCESS"})},{}],1633:[function(a,b,c){"use strict";angular.module("base-unifi").constant("API_STRINGS",{"api.err.AlreadyAdopted":"API_ERROR_ALREADY_ADOPTED","api.err.AlreadyJoined":"API_ERROR_ALREADY_JOINED","api.err.BackupFailed":"API_ERROR_BACKUP_FAILED","api.err.BetaQuotaReached":"API_ERROR_BETA_QUOTA_REACHED","api.err.CannotAssignLicense":"API_ERROR_CANNOT_ASSIGN_LICENSE","api.err.CannotBeEmpty":"API_ERROR_CANNOT_BE_EMPTY","api.err.CannotCheckCredentials":"API_ERROR_CANNOT_CHECK_CREDENTIALS","api.err.CannotCreateLicense":"API_ERROR_CANNOT_CREATE_LICENSE","api.err.CannotRegisterDevice":"API_ERROR_CANNOT_REGISTER_DEVICE","api.err.CannotRevokeSelf":"API_ERROR_CANNOT_REVOKE_SELF","api.err.CannotUnassignLicense":"API_ERROR_CANNOT_UNASSIGN_LICENSE","api.err.ControllerBusy":"API_ERROR_CONTROLLER_BUSY","api.err.DeviceBusy":"API_ERROR_DEVICE_BUSY","api.err.DeviceStreaming":"API_ERROR_DEVICE_STREAMING","api.err.DownlinksNotUpgraded":"API_ERROR_DOWNLINKS_NOT_UPGRADED","api.err.DuplicateMemberDevice":"API_ERROR_DUPLICATE_MEMBER_DEVICE","api.err.DuplicateAccountName":"API_ERROR_DUPLICATE_ACCOUNT_NAME","api.err.DuplicateSiteName":"API_ERROR_DUPLICATE_SITE_NAME","api.err.DynamicDNSServiceExisted":"API_ERROR_DYNAMIC_DNS_SERVICE_EXISTED","api.err.E_WirelessUplinkDisabled":"API_ERROR_WIRELESS_UPLINK_DISABLED","api.err.EmailExisted":"API_ERROR_EMAIL_EXISTED","api.err.EmailNotEligible":"API_ERROR_EMAIL_NOT_ELIGIBLE","api.err.ExtensionExists":"API_ERROR_EXTENSION_EXISTS","api.err.IdInvalid":"API_ERROR_ID_INVALID","api.err.IdRequired":"API_ERROR_ID_REQUIRED","api.err.IncorrectIPAddress":"API_ERROR_INCORRECT_IP_ADDRESS","api.err.IncorrectIPRange":"API_ERROR_INCORRECT_IP_RANGE","api.err.IncorrectIPSubnetSpec":"API_ERROR_INCORRECT_IP_SUBNET_SPEC","api.err.IncorrectMultiportFwdPort":"API_ERROR_INCORRECT_MULTIPORT_FWD_PORT","api.err.IncorrectNetworkAddress":"API_ERROR_INCORRECT_NETWORK_ADDRESS","api.err.IncorrectNumberRange":"API_ERROR_INCORRECT_NUMBER_RANGE","api.err.IncorrectUbicCreds":"API_ERROR_INCORRECT_UBIC_CREDS","api.err.InternalServerError":"API_ERROR_INTERNAL_SERVER_ERROR","api.err.Invalid":"API_ERROR_INVALID","api.err.InvalidAdminName":"API_ERROR_INVALID_ADMIN_NAME","api.err.InvalidAggregateRange":"API_ERROR_INVALID_AGGREGATE_RANGE","api.err.InvalidArgs":"API_ERROR_INVALID_ARGS","api.err.InvalidBackup":"API_ERROR_INVALID_BACKUP","api.err.InvalidBackupVersion":"API_ERROR_INVALID_BACKUP_VERSION","api.err.InvalidDHCPRange":"API_ERROR_INVALID_DHCP_RANGE","api.err.InvalidEmail":"API_ERROR_INVALID_EMAIL","api.err.InvalidFirmwareUrl":"API_ERROR_INVALID_FIRMWARE_URL","api.err.InvalidFixedIP":"API_ERROR_INVALID_FIXED_IP","api.err.InvalidKey":"API_ERROR_INVALID_KEY","api.err.InvalidLogin":"API_ERROR_INVALID_LOGIN","api.err.InvalidMedia":"API_ERROR_INVALID_MEDIA","api.err.InvalidMediaFile":"API_ERROR_INVALID_MEDIA_FILE","api.err.InvalidMemberDevice":"API_ERROR_INVALID_MEMBER_DEVICE","api.err.InvalidMirroringPort":"API_ERROR_INVALID_MIRRORING_PORT","api.err.InvalidObject":"API_ERROR_INVALID_OBJECT","api.err.InvalidPayload":"API_ERROR_INVALID_PAYLOAD","api.err.InvalidPortConf":"API_ERROR_INVALID_PORT_CONF","api.err.InvalidRequest":"API_ERROR_INVALID_REQUEST","api.err.InvalidSampleAudio":"API_ERROR_INVALID_SAMPLE_AUDIO","api.err.InvalidSiteBackup":"API_ERROR_INVALID_SITE_BACKUP","api.err.InvalidSiteName":"API_ERROR_INVALID_SITE_NAME","api.err.InvalidTarget":"API_ERROR_INVALID_TARGET","api.err.InvalidTargetPort":"API_ERROR_INVALID_TARGET_PORT","api.err.InvalidValue":"API_ERROR_INVALID_VALUE","api.err.InvalidVerification":"API_ERROR_INVALID_VERIFICATION","api.err.IpsecDynamicRoutingRequiresLocalIPAddress":"API_ERROR_IPSEC_DYNAMIC_ROUTING_REQUIRES_LOCAL_IP_ADDRESS","api.err.LocalCommandException":"API_ERROR_LOCAL_COMMAND_EXCEPTION","api.err.LoginRequired":"API_ERROR_LOGIN_REQUIRED","api.err.MissingBroadcastGroup":"API_ERROR_MISSING_BROADCAST_GROUP","api.err.MissingDevices":"API_ERROR_MISSING_DEVICES","api.err.MissingStreamType":"API_ERROR_MISSING_STREAM_TYPE","api.err.NameExisted":"API_ERROR_NAME_EXISTED","api.err.NoDelete":"API_ERROR_NO_DELETE","api.err.NoEdit":"API_ERROR_NO_EDIT","api.err.NoLicense":"API_ERROR_NO_LICENSE","api.err.NoPermission":"API_ERROR_NO_PERMISSION","api.err.NoSecondGateway":"API_ERROR_NO_SECOND_GATEWAY","api.err.NoSecondRemoveUserVPN":"API_ERROR_NO_SECOND_REMOTE_USER_VPN","api.err.NoSiteContext":"API_ERROR_NO_SITE_CONTEXT","api.err.NoSuchCommand":"API_ERROR_NO_SUCH_COMMAND","api.err.NotCloudKey":"API_ERROR_NOT_CLOUD_KEY","api.err.NotCompatible":"API_ERROR_NOT_COMPATIBLE","api.err.NotFound":"API_ERROR_NOT_FOUND","api.err.NotImplemented":"API_ERROR_NOT_IMPLEMENTED","api.err.NotSupported":"API_ERROR_NOT_SUPPORTED","api.err.NoTunnelIpAvailable":"API_ERROR_NO_TUNNEL_IP_AVAILABLE","api.err.NoUBNTSso":"API_ERROR_NO_UBNT_SSO","api.err.ObjectReferredBy":"API_ERROR_OBJECT_REFERRED_BY","api.err.ObjectReferredByDevice":"API_ERROR_OBJECT_REFERRED_BY_DEVICE","api.err.ObjectReferredByWlanOverride":"API_ERROR_OBJECT_REFERRED_BY_WLAN_OVERRIDE","api.err.OpenvpnAddressReserved":"API_ERROR_OPENVPN_ADDRESS_RESERVED","api.err.OpenvpnAddressUsed":"API_ERROR_OPENVPN_ADDRESS_USED","api.err.OpenvpnPortReserved":"API_ERROR_OPENVPN_PORT_RESERVED","api.err.OpenvpnPortUsed":"API_ERROR_OPENVPN_PORT_USED","api.err.PasswordsDontMatch":"API_ERROR_PASSWORDS_DONT_MATCH","api.err.PortUnavailable":"API_ERROR_PORT_UNAVAILABLE","api.err.RefundError":"API_ERROR_REFUND_ERROR","api.err.RemoteSubnetOverlapped":"API_ERROR_REMOTE_SUBNET_OVERLAPPED","api.err.RemoteUserVpnRangeExceeded":"API_ERROR_REMOTE_USER_VPN_RANGE_EXCEEDED","api.err.SdnEnabled":"API_ERROR_SDN_ENABLED","api.err.SdnNotReady":"API_ERROR_SDN_NOT_READY","api.err.ServerBusy":"API_ERROR_SERVER_BUSY","api.err.SiteVpnSubnetOverlapped":"API_ERROR_SITE_VPN_SUBNET_OVERLAPPED","api.err.SmtpAuthFailed":"API_ERROR_SMTP_AUTH_FAILED","api.err.SmtpNotEnabled":"API_ERROR_SMTP_NOT_ENABLED","api.err.SmtpSendFailed":"API_ERROR_SMTP_SEND_FAILED","api.err.SmtpUnknownFailed":"API_ERROR_SMTP_UNKNOWN_FAILED","api.err.SpectrumScanInProgress":"API_ERROR_SPECTRUM_SCAN_IN_PROGRESS","api.err.StreamDoesNotExist":"API_ERROR_STREAM_DOES_NOT_EXIST","api.err.StreamNotReady":"API_ERROR_STREAM_NOT_READY","api.err.SubnetOverlapped":"API_ERROR_SUBNET_OVERLAPPED","api.err.TooManyAggregate":"API_ERROR_TOO_MANY_AGGREGATE","api.err.TooManyBlockedUser":"API_ERROR_TOO_MANY_BLOCKED_USER","api.err.TooManyDHCPLeases":"API_ERROR_TOO_MANY_DHCP_LEASES","api.err.TooManyFixedIpUser":"API_ERROR_TOO_MANY_FIXED_IP_USER","api.err.TooManyMirror":"API_ERROR_TOO_MANY_MIRROR","api.err.TooManyMultiportPorts":"API_ERROR_TOO_MANY_MULTIPORT_PORTS","api.err.TooManyNetwork":"API_ERROR_TOO_MANY_NETWORK","api.err.TooManyQueries":"API_ERROR_TOO_MANY_QUERIES","api.err.TooManyStreams":"API_ERROR_TOO_MANY_STREAMS","api.err.TooManyVlanNetwork":"API_ERROR_TOO_MANY_VLAN_NETWORK","api.err.TooManyVpnClientNetwork":"API_ERROR_TOO_MANY_VPN_CLIENT_NETWORK","api.err.TooManyWirelessNetwork":"API_ERROR_TOO_MANY_WIRELESS_NETWORK","api.err.UbicUnreachable":"API_ERROR_UBIC_UNREACHABLE","api.err.UBNTSsoExisted":"API_ERROR_UBNT_SSO_EXISTED","api.err.UnknownDevice":"API_ERROR_UNKNOWN_DEVICE","api.err.UnknownGuest":"API_ERROR_UNKNOWN_GUEST","api.err.UnknownPayment":"API_ERROR_UNKNOWN_PAYMENT","api.err.UnknownPaymentGateway":"API_ERROR_UNKNOWN_PAYMENT_GATEWAY","api.err.UnknownStation":"API_ERROR_UNKNOWN_STATION","api.err.UnknownUpload":"API_ERROR_UNKNOWN_UPLOAD","api.err.UnknownUser":"API_ERROR_UNKNOWN_USER","api.err.UpgradeInProgress":"API_ERROR_UPGRADE_IN_PROGRESS","api.err.UplinkDeviceBusy":"API_ERROR_UPLINK_DEVICE_BUSY","api.err.VlanUsed":"API_ERROR_VLAN_USED","api.err.WirelessUplinkDisabled":"API_ERROR_WIRELESS_UPLINK_DISABLED"})},{}],1634:[function(a,b,c){"use strict";angular.module("base-unifi").constant("BACKBONE_EVENTS",{COLLECTION_MODIFIED:"add remove change reset"})},{}],1635:[function(a,b,c){"use strict";angular.module("base-unifi").constant("BACKUP_DEFAULTS",{MONTHLY_OCCURANCE:"0 0 1 * *"})},{}],1636:[function(a,b,c){"use strict";angular.module("base-unifi").constant("DEFAULT_PREFERENCES",{ROWS_PER_PAGE:50,ROWS_PER_PROPERTY_PANEL:10,REFRESH_RATE:"2MIN",REFRESH_RATE_REMEMBER_ALL:!1,IS_SETTINGS_DARK:!0,IS_CONDENSED:!0,IS_MINIMAL:!1,IS_RESPONSIVE:!1,IS_PROPERTY_PANEL_INLINE:!0,ALERTS_POSITION:"top_right",USE_24_HOUR_CLOCK:!1,DATE_FORMAT:"MM/DD/YYYY",TIME_FORMAT_12HR:"h:mm a",TIME_FORMAT_24HR:"H:mm",WEBSOCKET_ENABLED:!0})},{}],1637:[function(a,b,c){"use strict";angular.module("base-unifi").constant("DEFAULT_UCK_SSH_CREDENTIALS",{username:"root",password:"ubnt"})},{}],1638:[function(a,b,c){"use strict";angular.module("base-unifi").constant("GUEST_AUTHORIZATION",{NONE:"none",PASSWORD:"password",API:"api",VOUCHER:"voucher",CREDIT:"credit",PAYPAL:"paypal",FACEBOOK:"facebook"})},{}],1639:[function(a,b,c){"use strict";angular.module("base-unifi").constant("HOTSPOT_PACKAGES_DEFAULTS",[{amount:5.99,charged_as:"Hotspot 8-hour Wifi",currency:"USD",hours:8,name:"Basic 8HR"},{amount:8.99,charged_as:"Hotspot 1-dayWifi",currency:"USD",hours:24,name:"Premium Daypass"},{amount:0,hours:2,trial_reset:24,name:"Free Trial",limit_overwrite:!0,limit_down:4096,limit_up:1024,limit_quota:1024}])},{}],1640:[function(a,b,c){"use strict";angular.module("base-unifi").constant("KEY_PRESS_EVENTS",[{keyCode:13,broadcastEvent:"keypress:enter"},{keyCode:27,broadcastEvent:"keypress:escape"}])},{}],1641:[function(a,b,c){"use strict";angular.module("base-unifi").constant("LANGUAGES",{supportedLanguagesList:["en","ca","cs","de_DE","es_ES","nl","pl","pt_PT","sv","tr","zh_CN"],supportedLanguagesMapping:{en_US:"en",en_GB:"en",de:"de_DE",de_AT:"de_DE",de_CH:"de_DE",de_LI:"de_DE",de_LU:"de_DE",es:"es_ES",es_AR:"es_ES",es_BO:"es_ES",es_CL:"es_ES",es_CO:"es_ES",es_CR:"es_ES",es_DO:"es_ES",es_EC:"es_ES",es_ES:"es_ES",es_GT:"es_ES",es_HN:"es_ES",es_MX:"es_ES",es_NI:"es_ES",es_PA:"es_ES",es_PE:"es_ES",es_PR:"es_ES",es_PY:"es_ES",es_SV:"es_ES",es_UY:"es_ES",es_VE:"es_ES",nl_BE:"nl",nl_NL:"nl",pl_PL:"pl",pt:"pt_PT",pt_BR:"pt_PT",sv_SE:"sv",sv_FI:"sv",tr_TR:"tr",zh_CN:"zh_CN",zh:"zh_CN","*":"en"},translationKeys:{ca:"Català",cs:"Český",de_DE:"Deutsch",en:"English",es_ES:"Español",nl:"Nederlands",pl:"Polski",pt_PT:"Português",sv:"Svenska",tr:"Türkçe",zh_CN:"中文"},languagesAlpha3:{afr:"LANGUAGE_AF",ara:"LANGUAGE_AR",aze:"LANGUAGE_AZ",bel:"LANGUAGE_BE",bul:"LANGUAGE_BG",cat:"LANGUAGE_CA",cze:"LANGUAGE_CS",wel:"LANGUAGE_CY",dan:"LANGUAGE_DA",ger:"LANGUAGE_DE",div:"LANGUAGE_DV",gre:"LANGUAGE_EL",eng:"LANGUAGE_EN",epo:"LANGUAGE_EO",spa:"LANGUAGE_ES",est:"LANGUAGE_ET",eus:"LANGUAGE_EU",fas:"LANGUAGE_FA",fin:"LANGUAGE_FI",fao:"LANGUAGE_FO",fre:"LANGUAGE_FR",glg:"LANGUAGE_GL",guj:"LANGUAGE_GU",heb:"LANGUAGE_HE",hin:"LANGUAGE_HI",hrv:"LANGUAGE_HR",hun:"LANGUAGE_HU",hye:"LANGUAGE_HY",ind:"LANGUAGE_ID",isl:"LANGUAGE_IS",ita:"LANGUAGE_IT",jpn:"LANGUAGE_JA",kat:"LANGUAGE_KA",kaz:"LANGUAGE_KK",kan:"LANGUAGE_KN",kor:"LANGUAGE_KO",kok:"LANGUAGE_KOK",kir:"LANGUAGE_KY",lit:"LANGUAGE_LT",lav:"LANGUAGE_LV",mri:"LANGUAGE_MI",mkd:"LANGUAGE_MK",mon:"LANGUAGE_MN",mar:"LANGUAGE_MR",msa:"LANGUAGE_MS",mlt:"LANGUAGE_MT",nid:"LANGUAGE_NL",nso:"LANGUAGE_NS",pan:"LANGUAGE_PA",pol:"LANGUAGE_PL",pus:"LANGUAGE_PS",por:"LANGUAGE_PT",que:"LANGUAGE_QU",ron:"LANGUAGE_RO",rus:"LANGUAGE_RU",san:"LANGUAGE_SA",sme:"LANGUAGE_SE",slk:"LANGUAGE_SK",slv:"LANGUAGE_SL",sqi:"LANGUAGE_SQ",swe:"LANGUAGE_SV",swa:"LANGUAGE_SW",syr:"LANGUAGE_SYR",tam:"LANGUAGE_TA",tel:"LANGUAGE_TE",tha:"LANGUAGE_TH",tgl:"LANGUAGE_TL",tsn:"LANGUAGE_TN",tur:"LANGUAGE_TR",tat:"LANGUAGE_TT",tso:"LANGUAGE_TS",ukr:"LANGUAGE_UK",urd:"LANGUAGE_UR",uzb:"LANGUAGE_UZ",vie:"LANGUAGE_VI",xho:"LANGUAGE_XH",zho:"LANGUAGE_ZH",zul:"LANGUAGE_ZU"}})},{}],1642:[function(a,b,c){"use strict";angular.module("base-unifi").constant("REFRESH_RATES",[{id:"15SEC",seconds:15,mobileTranslationKey:"COMMON_REFRESH_RATE_MOBILE_MENU_OPTION_15SEC",translationKey:"COMMON_REFRESH_RATE_MENU_OPTION_15SEC",isTemporary:!0},{id:"1MIN",seconds:60,mobileTranslationKey:"COMMON_REFRESH_RATE_MOBILE_MENU_OPTION_1MIN",translationKey:"COMMON_REFRESH_RATE_MENU_OPTION_1MIN"},{id:"2MIN",seconds:120,mobileTranslationKey:"COMMON_REFRESH_RATE_MOBILE_MENU_OPTION_2MIN",translationKey:"COMMON_REFRESH_RATE_MENU_OPTION_2MIN"},{id:"5MIN",seconds:300,mobileTranslationKey:"COMMON_REFRESH_RATE_MOBILE_MENU_OPTION_5MIN",translationKey:"COMMON_REFRESH_RATE_MENU_OPTION_5MIN"},{id:"NEVER",seconds:null,mobileTranslationKey:"COMMON_REFRESH_RATE_MOBILE_MENU_OPTION_NEVER",translationKey:"COMMON_REFRESH_RATE_MENU_OPTION_NEVER",isTemporary:!0}])},{}],1643:[function(a,b,c){"use strict";var d=a("xregexp").XRegExp;angular.module("base-unifi").constant("REGEX_PATTERNS",{MAC_ADDRESS:/([0-9A-F]{2}[:-]){5}([0-9A-F]{2})/i,NAME:new d("^[\\p{L}\\p{Z}\\p{P}\\p{S}\\p{N}]{0,}$"),ACCOUNT_NAME:/^[_A-Z0-9][-_.A-Z0-9]*$/i,DEVICE_ACCOUNT_NAME:/^[_A-Z0-9][-\@_.A-Z0-9]*$/i,FIREWALL_GROUP_NAME:/^[^\"'\s]{1,128}$/,FIREWALL_RULE_NAME:/^.{1,128}$/,HOSTNAME:/^[A-Z0-9.-]+$/i,IP_ADDRESS:/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/,NETMASK:/^((128|192|224|240|248|252|254)\.0\.0\.0)|(255\.(((0|128|192|224|240|248|252|254)\.0\.0)|(255\.(((0|128|192|224|240|248|252|254)\.0)|255\.(0|128|192|224|240|248|252|254)))))$/,PASSWORD:/^([\x20-\x7E]){8,63}$/,PORT_NUMBER:/^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/,ROUTE_DISTANCE:/^([0-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/,SUBNET:/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/,HOSTNAME_OR_SUBNET:/^([A-Z0-9.-]+)|((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2])))$/i,VLAN:/^([2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-5])$/,WEP:/^([0-9a-fA-F]){10}$|^([0-9a-fA-F]){26}$|^([\x20-\x7E]){5}$|^([\x20-\x7E]){13}$/,ADMIN_NAME:/^[_A-Za-z0-9][-_.A-Za-z0-9]*$/,RADIUS_SECRET:/^[^\"\' ]{1,128}$/})},{xregexp:242}],1644:[function(a,b,c){"use strict";angular.module("base-unifi").constant("REPORT_DEFAULTS",{REPORTS_DATE_FORMAT:"x"})},{}],1645:[function(a,b,c){"use strict";angular.module("base-unifi").constant("SDN_STATES",{DISABLED:"disabled",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",NOT_REGISTERED:"notregistered"})},{}],1646:[function(a,b,c){"use strict";angular.module("base-unifi").constant("TIME_FILTER_DEFAULTS",{DROPDOWN_VALUES:[24,72,168,336,720,2880],DEFAULT_VALUE:24})},{}],1647:[function(a,b,c){"use strict";var d=a("moment");angular.module("base-unifi").constant("TIME_INTERVALS",{DAILY:{name:"daily",url:"hourly",grain:d.duration(1,"hour").asMilliseconds(),value:1,unit:"day",translationKey:"DATETIME_HOURS_FULL_PARAMETERIZED",translationParams:{hours:24}},MONTHLY:{name:"monthly",url:"daily",grain:d.duration(1,"day").asMilliseconds(),value:1,unit:"month",translationKey:"DATETIME_MONTH"},WEEKLY:{name:"weekly",url:"daily",grain:d.duration(1,"day").asMilliseconds(),value:1,unit:"week",translationKey:"DATETIME_WEEK"}})},{moment:238}],1648:[function(a,b,c){"use strict";angular.module("base-unifi").constant("UNIFI_WEBRTC_ERROR",{DEVICE_OFFLINE:"DEVICE_OFFLINE",DEVICE_VERSION_INCOMPATIBLE:"DEVICE_VERSION_INCOMPATIBLE",ERROR_CONTROLLER_NOT_FOUND:"ERROR_CONTROLLER_NOT_FOUND",ERROR_ESTABLISH_CONNECTION:"ERROR_ESTABLISH_CONNECTION",ERROR_NOT_LOGGED_INTO_SSO:"ERROR_NOT_LOGGED_INTO_SSO"})},{}],1649:[function(a,b,c){"use strict";angular.module("base-unifi").constant("UNIFI_WEBRTC_EVENTS",{UNIFI_WEBRTC_VALIDATING_SSO:"UNIFI_WEBRTC_VALIDATING_SSO",UNIFI_WEBRTC_OBTAINING_CONTROLLER_INFO:"UNIFI_WEBRTC_OBTAINING_CONTROLLER_INFO",UNIFI_WEBRTC_ESTABLISHING_COMMUNICATION:"UNIFI_WEBRTC_ESTABLISHING_COMMUNICATION",UNIFI_WEBRTC_INITIALIZING_APPLICATION:"UNIFI_WEBRTC_INITIALIZING_APPLICATION"})},{}],1650:[function(a,b,c){"use strict";angular.module("base-unifi").constant("UPDATE_STATUS",{UPDATE_AVAILABLE:"UPDATE_AVAILABLE",UP_TO_DATE:"UP_TO_DATE"}),angular.module("base-unifi").constant("UPDATE_PROGRESS_STATUS",{UNKNOWN:"unknown",DOWNLOADING:"downloading",CHECKING:"checking",MOVING:"moving",UPDATING:"updating",SOURCING:"sourcing",OTHERS:"others",RESTARTING:"restarting"}),angular.module("base-unifi").constant("UPDATE_STATUS_REFRESH",1e4)},{}],1651:[function(a,b,c){"use strict";angular.module("base-unifi").constant("URL_ACCESS_WHITE_LIST",["api/sso/v1/user/self"])},{}],1652:[function(a,b,c){"use strict";angular.module("base-unifi").constant("WS_DEFAULTS",{UNIFI_WS_RETRY_SCALAR:200})},{}],1653:[function(a,b,c){"use strict";function d(a,b){this.accountHostname=a,this.serverVersion=b.repository.model.getNested("meta.server_version"),this.showOneAccount=!1}d.$inject=["AccountHostname","status"],angular.module("base-unifi").controller("AccountController",d)},{}],1654:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("../../base-unifi/controllers/BaseFormController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getEmptyModel=function(){if(this.models&&this.models.length)return new this.models[0].constructor},d.prototype.createModelCopy=function(){e.prototype.createModelCopy.call(this),this.modelCopy||(this.modelCopy=this.getEmptyModel())},d.prototype.updateModels=function(a){this.models=a,(this.isBatch=!!(this.models&&this.models.length>1))||!this.models?this.updateModel(this.getEmptyModel()):this.updateModel(this.models[0])},d.prototype.getModelsIds=function(){return this.models?this.models.map(function(a){return a.id}):[]},d.prototype.getUnanimousModelValue=function(a,b){return b=b||this.models,b&&b.reduce(function(b,c,d){return 0===d?c.get(a):c.get(a)===b?b:void 0},void 0)},d.$inject=["modelDivergence"],b.exports=d},{"../../base-unifi/controllers/BaseFormController":1661}],1655:[function(a,b,c){"use strict";function d(a){this.hasPermission=this.hasPermission||a.isAdmin.bind(a),this.isApplicable=!1,e.call(this)}var e=a("../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.showButton=function(){return this.hasPermission()&&this.isApplicable},d.$inject=["account"],b.exports=d},{"../../base-unifi/controllers/BaseModelController":1664}],1656:[function(a,b,c){"use strict";function d(a){this.hasPermission=a.isAdmin.bind(a),this.isApplicable=!1,e.call(this)}var e=a("../../base-unifi/controllers/BaseCollectionController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.showButton=function(){return this.hasPermission()&&this.isApplicable},d.$inject=["account"],b.exports=d},{"../../base-unifi/controllers/BaseCollectionController":1657}],1657:[function(a,b,c){"use strict";function d(){this.collectionChangeEvent=this.collectionChangeEvent||"update",this.doNotUseInhibitor=this.doNotUseInhibitor||!1,this.onCollectionChange=this.onCollectionChange.bind(this)}d.prototype.setChangeEvent=function(a){this.removeEventHandlers(),this.collectionChangeEvent=a,this.addEventHandlers()},d.prototype.updateCollection=function(a){this.removeEventHandlers(),this.collection=a,this.addEventHandlers(),this.onCollectionChange()},d.prototype.onCollectionChange=function(){throw new Error("You must override onCollectionChange")},d.prototype.addEventHandlers=function(){this.collection&&(this.collectionListener=this.collection.onEvent(this.collectionChangeEvent,this.onCollectionChange,{doNotUseInhibitor:this.doNotUseInhibitor}))},d.prototype.removeEventHandlers=function(){this.collection&&this.collectionListener&&this.collectionListener.stopListening()},d.$inject=[],b.exports=d},{}],1658:[function(a,b,c){"use strict";function d(a,b,c,d){this.$rootScope=a,this.$timeout=b,this.frame=c,d=d||{},this.allowHtml=d.allowHtml,this.bypassFlag=d.bypassFlag,this.warnings=d.warnings,this.defaultCancel=!!d.defaultCancel;var e=a.$on("$frameClose:confirm",function(){this.removeEventHandlers(),e()}.bind(this));this.addEventHandlers()}d.prototype.addEventHandlers=function(){this.removeEventHandlers(),this.events=[this.$rootScope.$on("keypress:enter",function(){this.defaultCancel?this.$timeout(this.reject.bind(this),0):this.$timeout(this.resolve.bind(this),0)}.bind(this))]},d.prototype.removeEventHandlers=function(){this.events&&angular.forEach(this.events,function(a){a()})},d.prototype.resolve=function(a){return this.frame.getLayout("confirmLayout").resolve(a)},d.prototype.reject=function(){return this.frame.getLayout("confirmLayout").reject()},d.$inject=["$rootScope","$timeout","frame"],b.exports=d},{}],1659:[function(a,b,c){"use strict";function d(a,b,c){this.scroller=c,this.isDockOpen=this.isDockOpen||b.isDockOpen.bind(b),this.openDock=this.openDock||b.openDock.bind(b),this.closeDock=this.closeDock||b.closeDock.bind(b),this.toggleDock=this.toggleDock||b.toggleDock.bind(b),this.removeDockedItems=this.removeDockedItems||b.removeDockedItems.bind(b),this.clearDock=this.clearDock||b.clear.bind(b),this.isEmpty=this.isEmpty||b.isEmpty.bind(b),e.call(this,a,b)}var e=a("../../base-unifi/controllers/BasePanelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.getItemType=function(){throw new Error("You must override getItemType")},d.prototype.setItemOrder=function(a,b){this.panels.getItemById(a).then(function(a){this.panels.addItem(a,null,b)}.bind(this))},d.prototype.setItemCoords=function(a,b,c){this.panels.getItemById(a).then(function(a){this.panels.addItem(a,[{state:"x",value:b+"px",overwrite:!0},{state:"y",value:c+"px",overwrite:!0},{state:"undocked",value:!0,overwrite:!0}],0)}.bind(this))},d.prototype.addEventHandlers=function(){this.collection.on("add",this.onItemAdd,this),this.collection.on("reset",this.closeDock),this.collection.on("remove",this.closeDockWhenEmpty,this),this.panels.itemState.collection.on("change:undocked",this.onUndockedChange,this)},d.prototype.removeEventHandlers=function(){this.collection.off("add",this.onItemAdd,this),this.collection.off("reset",this.closeDock),this.collection.off("remove",this.closeDockWhenEmpty,this),this.panels.itemState.collection.off("change:undocked",this.onUndockedChange,this)},d.prototype.onItemAdd=function(a){this.panels.getItemState(a,"undocked")||(this.openDock(),this.scrollToItem(a))},d.prototype.scrollToItem=function(a){!this.panels.getItemState(a,"undocked")&&angular.isFunction(this.getItemElementId)&&this.$timeout(function(){this.scroller.transitionToElement(this.getItemElementId(a))}.bind(this),0,!1)},d.prototype.hasDockedItems=function(){var a=!1;return this.collection.each(function(b){this.panels.getItemState(b,"undocked")||(a=!0)}.bind(this)),a},d.prototype.onUndockedChange=function(){this.hasDockedItems()?this.openDock():this.closeDock()},d.prototype.areAllDockedPanelsCollapsed=function(){return this.panels.collection.length>0&&0===this.panels.getItemsByState([{state:"undocked",value:!1,allowUndefined:!0},{state:"collapsed",value:!1,allowUndefined:!0}]).length},d.prototype.collapsePanels=function(){this.collection.each(function(a){this.panels.getItemState(a,"undocked")||this.panels.setItemState(a,"collapsed",!0,!0)}.bind(this)),this.isCollapsed=!0,this.panels.updateQueryString()},d.prototype.expandPanels=function(){this.collection.each(function(a){this.panels.getItemState(a,"undocked")||this.panels.setItemState(a,"collapsed",!1,!0)}.bind(this)),this.isCollapsed=!1,this.panels.updateQueryString()},d.prototype.closeDockWhenEmpty=function(){if(this.isEmpty()||!this.hasDockedItems())return this.closeDock()},d.$inject=[],b.exports=d},{"../../base-unifi/controllers/BasePanelController":1666}],1660:[function(a,b,c){"use strict";function d(a){this.$document=a,this.onMouseDown=this.onMouseDown.bind(this),this.onMouseDownDrag=this.onMouseDownDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.classes={preventSelection:"draggablePreventSelection"},this.isDragging=!1}d.prototype.setDragStartCallback=function(a){this.onDragStart=a},d.prototype.setDragStopCallback=function(a){this.onDragStop=a},d.prototype.setDragHandleSelector=function(a){this.dragHandleSelector=a},d.prototype.addEventHandlers=function(a){a.on("mousedown",this.onMouseDown)},d.prototype.removeEventHandlers=function(a){a.off("mousedown",this.onMouseDown)},d.prototype.onMouseDown=function(a){this.dragHandleSelector&&!a.target.matchesSelector(this.dragHandleSelector)||(this.startX=a.pageX,this.startY=a.pageY,this.$document.on("mousemove",this.onMouseMove),this.$document.on("mouseup",this.onMouseUp),this.$document.one("mousemove",this.onMouseDownDrag))},d.prototype.onMouseDownDrag=function(a){this.onDragStart&&this.onDragStart(this.onDragStartAttrs(a)),this.disableSelection()},d.prototype.onMouseMove=function(a){return a.preventDefault(),this.endX=a.pageX,this.endY=a.pageY,this.distanceX=this.endX-this.startX,this.distanceY=this.endY-this.startY,this.isDragging=!0,!1},d.prototype.onMouseUp=function(a){this.documentCleanUp(),this.enableSelection(),this.isDragging&&this.onDragStop&&this.onDragStop(this.onDragStopAttrs(a)),this.isDragging=!1},d.prototype.documentCleanUp=function(){this.$document.off("mousemove",this.onMouseMove),this.$document.off("mouseup",this.onMouseUp),this.$document.off("mousemove",this.onMouseDownDrag)},d.prototype.enableSelection=function(){angular.element(this.$document[0].body).removeClass(this.classes.preventSelection)},d.prototype.disableSelection=function(){angular.element(this.$document[0].body).addClass(this.classes.preventSelection)},d.prototype.onDragStartAttrs=function(a){return{event:a,startX:this.startX,startY:this.startY}},d.prototype.onDragStopAttrs=function(a){return{event:a,distanceX:this.distanceX,distanceY:this.distanceY}},d.$inject=["$document"],b.exports=d},{}],1661:[function(a,b,c){"use strict";function d(a){this.modelDivergence=a,this.visibility={},this.isSaveQueued=!1,e.call(this)}var e=a("../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.updateModel=function(a){e.prototype.updateModel.call(this,a),this.reset()},d.prototype.createModelCopy=function(){this.model?this.modelCopy=this.model.deepCopy():this.modelCopy=void 0},d.prototype.updateModelCopy=function(a,b){this.modelCopy||this.createModelCopy(),this.modelCopy&&(this.modelCopy.set(a,b),this.mergePendingChanges(this.modelCopy))},d.prototype.resetModelCopyAttrs=function(a){this.modelCopy&&this.model&&a&&a.forEach(function(a){this.modelCopy.set(a,this.model.get(a))}.bind(this))},d.prototype.mergePendingChanges=function(a){this.isSaveQueued&&this.model&&a&&a.set(this.model.getPendingAttributes())},d.prototype.onModelChange=function(){},d.prototype.resolveDivergence=function(){this.modelDivergence.resolveDivergence(this.form)},d.prototype.ignoreDivergence=function(){this.modelDivergence.ignoreDivergence(this.form)},d.prototype.getVisibility=function(a){return a=angular.isArray(a)?a:[a],a.every(function(a){return!!this.visibility[a]}.bind(this))},d.prototype.setVisibility=function(a,b){return this.visibility[a]=b},d.prototype.reset=function(){this.createModelCopy(),this.mergePendingChanges(this.modelCopy),this.showValidation=!1,this.form.$setPristine(),this.form.$setUntouched(),this.resolveDivergence()},d.$inject=["modelDivergence"],b.exports=d},{"../../base-unifi/controllers/BaseModelController":1664}],1662:[function(a,b,c){"use strict";function d(a,b){this.$q=a,this.CollectionView=b,this.stateChangeCount=0,this.skipInitialization||(this.initFilters(),this.initView())}d.prototype.initFilters=function(){},d.prototype.initView=function(){this.view||(this.view=new this.CollectionView(this.getCollection())),this.comparator&&this.view.setComparators(this.comparator),this.filter&&this.view.setFilters([this.filter.getTest()]),this.defaultSortBy&&this.view.setSortBy(this.defaultSortBy,!!this.defaultSortDesc),this.view.isDirty()&&this.refresh(!0)},d.prototype.destroyView=function(){this.view&&(this.view.dispose(),this.view=null)},d.prototype.refresh=function(a){return this.view&&!this.isStateChanging()?a?this.$q.when(this.view.refresh()):this.view.asyncRefresh():this.$q.reject()},d.prototype.beginStateChange=function(){this.stateChangeCount++},d.prototype.commitStateChange=function(){return 0===--this.stateChangeCount?this.refresh():this.$q.reject()},d.prototype.isStateChanging=function(){return this.stateChangeCount>0},d.prototype.onSearchQueryChange=function(a){if(this.isSearchQuery=!!a,this.filter)return this.filter.updateSearchQuery(a),this.refresh()},d.prototype.getCollection=function(){throw new Error("You must override getCollection")},d.$inject=["$q","CollectionView"],b.exports=d},{}],1663:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){this.$state=a,this.$stateParams=b,this.$location=c,this.queryString=d,this.account=e,this.ENV=g,this.username="",this.password="",f.closeAll()}d.prototype._appLogin=function(){throw new Error("You must override _appLogin")},d.prototype._appRedirect=function(){throw new Error("You must override _appRedirect")},d.prototype.login=function(){return this.isSubmitting=!0,this.error=null,this._appLogin(this.username,this.password,this.remember).then(function(){var a=this.$stateParams.redirect?decodeURIComponent(this.$stateParams.redirect):void 0;return!a||a.includes("/fatal/")?this._appRedirect().then(function(){a&&this.queryString.remove("redirect")}.bind(this)):void this.$location.url(a)}.bind(this))["catch"](function(a){this.isSubmitting=!1,this.error=a}.bind(this))},d.$inject=["$state","$stateParams","$location","queryString","account","frame","ENV"],b.exports=d},{}],1664:[function(a,b,c){"use strict";function d(){this.modelChangeEvent=this.modelChangeEvent||"change",this.onModelChange=this.onModelChange.bind(this)}d.prototype.setChangeEvent=function(a){
this.removeEventHandlers(),this.modelChangeEvent=a,this.addEventHandlers()},d.prototype.updateModel=function(a){this.removeEventHandlers(),this.model=a,this.addEventHandlers(),this.onModelChange()},d.prototype.onModelChange=function(){throw new Error("You must override onModelChange")},d.prototype.addEventHandlers=function(){this.model&&this.model.on(this.modelChangeEvent,this.onModelChange)},d.prototype.removeEventHandlers=function(){this.model&&this.model.off(this.modelChangeEvent,this.onModelChange)},d.$inject=[],b.exports=d},{}],1665:[function(a,b,c){"use strict";function d(a,b,c){this.$injector=a,this.preferences=c,this.initListState(),this.initPagination(),this.initSort(),e.call(this,a.get("$q"),b)}var e=a("../../base-unifi/controllers/BaseListController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.initListState=function(){if(this.localState){var a=this.$injector.get("ListStateLocal");this.listState=new a(this.localStateKey,this.localStateIsTemporary)}else this.listState=this.$injector.get("listState")},d.prototype.initPagination=function(){this.currentPage=parseInt(this.listState.getFilter("page"),10)||1,this.rowsPerPage=this.rowsPerPage||parseInt(this.listState.getFilter("pageSize"),10)||this.preferences.model.getRowsPerPage()},d.prototype.initSort=function(){if(this.sortKey){var a=this.$injector.get("ListSortStoreLocal");this.listSort=new a(this.sortKey),this.onSortChange=this.listSort.saveSort.bind(this.listSort),this.defaultSortBy=this.listSort.getSortBy()||this.defaultSortBy,this.defaultSortDesc=this.listSort.getSortDesc()||this.defaultSortDesc}},d.prototype.beginStateChange=function(){e.prototype.beginStateChange.call(this),1===this.stateChangeCount&&this.listState.beginTransaction()},d.prototype.commitStateChange=function(){var a=e.prototype.commitStateChange.call(this);return 0===this.stateChangeCount&&this.listState.commitTransaction(),a},d.prototype.onPageChange=function(a){1===a?this.listState.removeFilter("page"):this.listState.addFilter("page",a)},d.prototype.onPageSizeChange=function(a,b){this.listState.addFilter("pageSize",a),this.preferences.model.updateRowsPerPage(a,b)},d.prototype.isResponsive=function(){return this.preferences.model.get("isResponsive")},d.$inject=["$injector","CollectionView","preferences"],b.exports=d},{"../../base-unifi/controllers/BaseListController":1662}],1666:[function(a,b,c){"use strict";function d(a,b){this.$timeout=a,this.panels=b,this.collection=b.collection}d.prototype.getItems=function(){return this.collection.models},d.prototype.setItemOrder=function(a,b){this.panels.getItemById(a).then(function(a){this.panels.addItem(a,null,b)}.bind(this))},d.prototype.onItemDragStart=function(a){this.panels.getItemById(a).then(function(b){this.setItemOrder(a,0),this.panels.setItemState(b,"locked",!0,!0)}.bind(this))},d.prototype.onItemDragStop=function(a,b,c){this.panels.getItemById(a).then(function(d){this.$timeout(function(){this.panels.unsetItemState(d,"locked",!0),this.setItemCoords(a,b,c)}.bind(this),100)}.bind(this))},d.prototype.onItemResizeStop=function(a,b,c){this.panels.getItemById(a).then(function(a){this.panels.setItemState(a,"width",b+"px"),this.panels.setItemState(a,"height",c+"px"),this.panels.onItemResized(a)}.bind(this))},d.$inject=[],b.exports=d},{}],1667:[function(a,b,c){"use strict";function d(a,b,c){this.$q=a,this.$timeout=b,this.panels=c,this.initializedTabs={},e.call(this),this.init()}var e=a("../../base-unifi/controllers/BaseModelController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.init=function(){this.isLoading=!0,this.failedToLoad=!1,this.skipInitialization||this.resolve()["catch"](function(){this.failedToLoad=!0}.bind(this))["finally"](function(){this.isLoading=!1}.bind(this))},d.prototype.resolve=function(){return this.$q.when()},d.prototype.onModelChange=function(){},d.prototype.toggleCollapsed=function(){var a=this.getPanelModel();a&&this.panels.toggleItemState(a,"collapsed")},d.prototype.isCollapsed=function(){var a=this.getPanelModel();if(a)return this.panels.getItemState(a,"collapsed")},d.prototype.toggleUndocked=function(){var a=this.getPanelModel();a&&(this.panels.toggleItemState(a,"undocked",!0),this.panels.addItem(a))},d.prototype.isUndocked=function(){var a=this.getPanelModel();if(a)return this.panels.getItemState(a,"undocked")},d.prototype.setActiveTab=function(a){var b=this.getPanelModel();b&&(this.isTabInitialized(a)||(this.loadingTab=a),this.$timeout(function(){this.panels.setItemState(b,"activeTab",a),this.loadingTab=void 0}.bind(this),0))},d.prototype.getActiveTab=function(){var a=this.getPanelModel();if(a){var b=this.panels.getItemState(a,"activeTab");return this.initializedTabs[b]=!0,b}},d.prototype.isTabInitialized=function(a){return this.initializedTabs[a]===!0},d.prototype.isTabAvailable=function(a){return this.isTabInitialized(a)||this.getActiveTab()===a},d.prototype.getPanelModel=function(){return this.model},d.prototype.removePanel=function(){var a=this.getPanelModel();return a?this.$q.when().then(function(){this.panels.removeItem(a)}.bind(this)):this.$q.reject()},b.exports=d},{"../../base-unifi/controllers/BaseModelController":1664}],1668:[function(a,b,c){"use strict";function d(a,b,c,d,f,g){this.message=d,this.title=f,e.call(this,a,b,c,g)}var e=a("./BaseConfirmController");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.$inject=["$rootScope","$timeout","frame","message","title","options"],angular.module("base-unifi").controller("ConfirmController",d)},{"./BaseConfirmController":1658}],1669:[function(a,b,c){"use strict";function d(a,b,c,d){this.frame=a,this.heyToasts=b,this.account=c,this.patterns={name:d.ADMIN_NAME},this.init()}d.prototype.init=function(){this.isLoading=!0,this.failedToLoad=!1,this.skipInitialization||this.resolve()["catch"](function(){this.failedToLoad=!0}.bind(this))["finally"](function(){this.isLoading=!1}.bind(this))},d.prototype.resolve=function(){return this.account.repository.refresh()},d.prototype.save=function(){this.isSubmitting=!0;var a={name:this.form.modelCopy.get("name"),email:this.form.modelCopy.get("email"),email_alert_enabled:this.form.modelCopy.get("email_alert_enabled"),email_alert_grouping_enabled:this.form.modelCopy.get("email_alert_grouping_enabled"),html_email_enabled:this.form.modelCopy.get("html_email_enabled")};return this.account.editAccount(a,this.form.modelCopy.get("password"),this.form.modelCopy.get("current_password")).then(function(a){return this.frame.getLayout("editAccountLayout").resolve(),this.heyToasts.pushSuccess(a),!0}.bind(this))["catch"](function(a){return this.heyToasts.pushError(a),!1}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.prototype.isCurrentPasswordRequired=function(){return!this.account.isPasswordChangeRequired()},d.prototype.isPasswordChangeRequired=function(){return this.account.isPasswordChangeRequired()},d.prototype.isSubmitAllowed=function(){return this.form.$valid&&!this.form.$pristine},d.$inject=["frame","heyToasts","account","REGEX_PATTERNS"],angular.module("base-unifi").controller("EditAccountController",d)},{}],1670:[function(a,b,c){"use strict";function d(a,b){this.errorCode=a.error,403===parseInt(this.errorCode,10)&&"app-unifi-manage"!==b.APP?this.loginState=b.LOGIN_STATE:this.homeState=b.HOME_STATE}d.$inject=["$stateParams","ENV"],angular.module("base-unifi").controller("FatalController",d)},{}],1671:[function(a,b,c){"use strict";function d(a,b,c,d){this.$state=a,this.account=b,this.heyToasts=c,this.ENV=d,this.isSubmitting=!1,this.showValidation=!1}d.prototype.resetPassword=function(){this.isSubmitting=!0,this.account.resetPassword(this.email).then(function(a){this.heyToasts.pushSuccess(a),this.$state.go(this.ENV.LOGIN_STATE)}.bind(this))["catch"](function(a){this.heyToasts.pushError(a)}.bind(this))["finally"](function(){this.isSubmitting=!1}.bind(this))},d.$inject=["$state","account","heyToasts","ENV"],angular.module("base-unifi").controller("ForgotPasswordController",d)},{}],1672:[function(a,b,c){"use strict";angular.module("base-unifi").filter("bps",["binaryPrefix",function(a){return function(b,c){var d=!!c&&c.isSi,e=!!c&&c.isBits,f=a.parse(b,d?"SI":"IEC");return f.value||0===f.value?f.value+" "+f.prefix+(e?"bps":"B/s"):""}}])},{}],1673:[function(a,b,c){"use strict";angular.module("base-unifi").filter("bytes",["binaryPrefix",function(a){return function(b,c){var d=a.parse(b,c?"SI":"IEC");return d.value||0===d.value?d.value+" "+d.prefix+"B":""}}])},{}],1674:[function(a,b,c){"use strict";angular.module("base-unifi").filter("constant",["$injector",function(a){return function(b){return a.get(b)}}])},{}],1675:[function(a,b,c){"use strict";angular.module("base-unifi").filter("currency",["Backbone","currencyUtils",function(a,b){return function(c){var d,e;return c instanceof a.Model?(d=c.get("amount"),e=c.get("currency")):(d=c.amount,e=c.currency),e&&void 0!==d&&null!==d?b.formatAmount(d,e):""}}])},{}],1676:[function(a,b,c){"use strict";angular.module("base-unifi").filter("featureFlagEnable",["FLAGS",function(a){return function(b){if(void 0===a[b])throw"Feature flag "+b+" is not defined";return a[b]}}]).filter("featureFlagDisable",["FLAGS",function(a){return function(b){if(void 0===a[b])throw"Feature flag "+b+" is not defined";return!a[b]}}])},{}],1677:[function(a,b,c){"use strict";angular.module("base-unifi").filter("guestAuthorization",["$translate","currencyUtils","voucherUtils","GUEST_AUTHORIZATION",function(a,b,c,d){return function(e){switch(e.get("authorized_by")){case d.API:return a.instant("COMMON_GUEST_AUTHORIZATION_API");case d.FACEBOOK:return a.instant("COMMON_GUEST_AUTHORIZATION_FACEBOOK");case d.CREDIT:var f=e.get("package"),g=e.get("amount"),h=e.get("currency"),i=e.get("payment_cardtype")||a.instant("COMMON_GUEST_AUTHORIZATION_CREDIT_CARD");return f&&g&&(i+=" ["+f+", "+b.formatAmount(g,h)+"]"),i;case d.PASSWORD:return a.instant("COMMON_GUEST_AUTHORIZATION_PASSWORD");case d.PAYPAL:return a.instant("COMMON_GUEST_AUTHORIZATION_PAYPAL");case d.VOUCHER:var j=e.get("voucher_code");return j?a.instant("COMMON_GUEST_AUTHORIZATION_VOUCHER_WITH_CODE",{code:c.formatCode(j)}):a.instant("COMMON_GUEST_AUTHORIZATION_VOUCHER");default:return a.instant("COMMON_GUEST_AUTHORIZATION_NONE")}}}])},{}],1678:[function(a,b,c){"use strict";var d=a("moment-twitter");angular.module("base-unifi").filter("moment",["preferences",function(a){return function(b,c,e){"string"==typeof c&&(c=[c]),"date"===e?e=a.model.get("dateFormat"):"time"===e?e=a.model.get("timeFormat"):"datetime"===e&&(e=a.model.get("dateFormat")+" "+a.model.get("timeFormat"));for(var f=d(b),g=0;g<c.length;g++)f=f[c[g]](g===c.length-1&&e?e:void 0);return f}}])},{"moment-twitter":236}],1679:[function(a,b,c){"use strict";angular.module("base-unifi").filter("numberToString",[function(){return function(a,b){return void 0===a||null===a||(a=parseInt(a,10),isNaN(a))?"":a.toLocaleString(b).split(" ").join(" ")}}])},{}],1680:[function(a,b,c){"use strict";angular.module("base-unifi").filter("percent",[function(){return function(a,b){return b=b||100,Math.round(a/b*100)+"%"}}])},{}],1681:[function(a,b,c){"use strict";angular.module("base-unifi").filter("toTranslationKey",[function(){return function(a){return String(a).toUpperCase().replace(/_$/gm,"_NONE").replace(/[^A-Z0-9]+/gm,"_").replace(/^_+|_+$/gm,"")}}])},{}],1682:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.get("$q"),d=a.get("account"),e=a.get("$state"),f=a.get("ENV");return d.isSuperAdmin()||d.isAdmin()&&!b?c.when():void e.go(f.FATAL_STATE,{error:403})}},{}],1683:[function(a,b,c){"use strict";b.exports=function(a){var b=a.get("$window"),c=a.get("$q"),d=a.get("account"),e=a.get("site"),f=a.get("editAccount"),g=a.get("appUrl"),h=a.get("ENV");return d.repository.fetch().then(function(){var a=e.getActiveSite()||d.repository.model.get("last_site_name");return"hotspot"===d.repository.model.get("site_role")&&"app-unifi-hotspot"!==h.APP?c.reject()["finally"](function(){b.location.href=g.buildUrl(["hotspot","site",a])}):(a&&!e.getActiveSite()&&e.setActiveSite(a),d.isPasswordChangeRequired()&&f.editAccount(),c.when())})}},{}],1684:[function(a,b,c){"use strict";b.exports=function(a,b,c,d,e,f){return e.resolve("account").then(function(){return a.ssoLogin({sso_token:c.sso_token,ubic_uuid:c.ubic_uuid})}).then(function(){return d.setActiveSite(c.site_id,!0)}).then(function(){return a.repository.fetch()}).then(function(){b.go(f.HOME_STATE)})}},{}],1685:[function(a,b,c){"use strict";a("../shared-unifi/main"),angular.module("base-unifi",["accordion","angulartics","angulartics.google.analytics","backular","busy","clickOff","collection-view","context","context.resolve","debounce","frame","frame.dialog","hey","jsonFormatter","modelDivergence","ngAnimate","ngCookies","ngFileUpload","ngSanitize","ng-currency","ng-d3","ng-filters","ng-gradient","ng-local-storage","ng-pagination","ng-route-status","ng-unifi-ui","ng-websocket","ng-webrtc","pageutils.state","pascalprecht.translate","passwordcontrol","scroll","shared-unifi","sso"]),a("./components/autofocus/autofocus.js"),a("./components/blackoutModal/blackoutModal.js"),a("./components/bowser/bowser.js"),a("./components/browserWarning/browserWarning.js"),a("./components/bypassConfirm/BypassConfirmController.js"),a("./components/bypassConfirm/bypassConfirm.js"),a("./components/collapsibleTable/collapsibleTable.js"),a("./components/condensed/condensed.js"),a("./components/connectionStatus/ConnectionStatusController.js"),a("./components/connectionStatus/connectionStatus.js"),a("./components/constrainPosition/ConstrainPositionController.js"),a("./components/constrainPosition/constrainPosition.js"),a("./components/dateIntervalSelector/DateIntervalSelectorController.js"),a("./components/dateIntervalSelector/dateIntervalSelector.js"),a("./components/debugPanel/DebugPanelController.js"),a("./components/debugPanel/debugPanel.js"),a("./components/dndDock/DndDockController.js"),a("./components/dndDock/dndDock.js"),a("./components/dndDockItem/dndDockItem.js"),a("./components/dockableItem/DockableItemController.js"),a("./components/dockableItem/dockableItem.js"),a("./components/draggableItem/DraggableItemController.js"),a("./components/draggableItem/draggableItem.js"),a("./components/featureFlag/featureFlag.js"),a("./components/fixDisabled/fixDisabled.js"),a("./components/ifApp/ifApp.js"),a("./components/ifRoleAdmin/ifRoleAdmin.js"),a("./components/ifRoleSuperAdmin/ifRoleSuperAdmin.js"),a("./components/ifRoleWriteable/ifRoleWriteable.js"),a("./components/initializeWhen/initializeWhen.js"),a("./components/keyPressEvents/keyPressEvents.js"),a("./components/listColumnSelector/ListColumnSelectorController.js"),a("./components/listColumnSelector/listColumnSelector.js"),a("./components/listPagination/listPagination.js"),a("./components/logoutButton/logoutButton.js"),a("./components/microPagination/microPagination.js"),a("./components/mobileSafeHover/mobileSafeHover.js"),a("./components/modelForm/ModelFormController.js"),a("./components/modelForm/modelForm.js"),a("./components/optionPlaceholder/optionPlaceholder.js"),a("./components/pauseChildrenWatchers/pauseChildrenWatchers.js"),a("./components/positionAlerts/positionAlerts.js"),a("./components/preventFocusZoom/preventFocusZoom.js"),a("./components/refreshButton/refreshButton.js"),a("./components/refreshSwitcher/RefreshSwitcherController.js"),a("./components/refreshSwitcher/refreshSwitcher.js"),a("./components/requiresSiteContext/requiresSiteContext.js"),a("./components/resizableItem/ResizableItemController.js"),a("./components/resizableItem/resizableItem.js"),a("./components/search/search.js"),a("./components/sidePanelStickyTitle/sidePanelStickyTitle.js"),a("./components/siteSwitcher/SiteSwitcherController.js"),a("./components/siteSwitcher/siteSwitcher.js"),a("./components/stylePreferences/stylePreferences.js"),a("./components/timeFilterDropdown/TimeFilterDropdownController.js"),a("./components/timeFilterDropdown/timeFilterDropdown.js"),a("./components/timeIntervalSelector/TimeIntervalSelectorController.js"),a("./components/timeIntervalSelector/timeIntervalSelector.js"),a("./components/translateLink/translateLink.js"),a("./components/userMenu/UserMenuController.js"),a("./components/userMenu/userMenu.js"),a("./components/versionHeader/VersionHeaderController.js"),a("./components/versionHeader/versionHeader.js"),a("./config/analytics.js"),a("./config/animate.js"),a("./config/compile.js"),a("./config/context.js"),a("./config/d3.js"),a("./config/device.js"),a("./config/env.js"),a("./config/frames.js"),a("./config/http.js"),a("./config/moment.js"),a("./config/preferences.js"),a("./config/q.js"),a("./config/redirectUrl.js"),a("./config/site.js"),a("./config/translate.js"),a("./config/version.js"),a("./config/webRtc.js"),a("./constants/ANALYTICS_CATEGORIES.js"),a("./constants/ANALYTICS_EVENTS.js"),a("./constants/API_STRINGS.js"),a("./constants/BACKBONE_EVENTS.js"),a("./constants/BACKUP_DEFAULTS.js"),a("./constants/DEFAULT_PREFERENCES.js"),a("./constants/DEFAULT_UCK_SSH_CREDENTIALS.js"),a("./constants/GUEST_AUTHORIZATION.js"),a("./constants/HOTSPOT_PACKAGES_DEFAULTS.js"),a("./constants/KEY_PRESS_EVENTS.js"),a("./constants/LANGUAGES.js"),a("./constants/REFRESH_RATES.js"),a("./constants/REGEX_PATTERNS.js"),a("./constants/REPORT_DEFAULTS.js"),a("./constants/SDN_STATES.js"),a("./constants/TIME_FILTER_DEFAULTS.js"),a("./constants/TIME_INTERVALS.js"),a("./constants/UNIFI_WEBRTC_ERROR.js"),a("./constants/UNIFI_WEBRTC_EVENTS.js"),a("./constants/UPDATE_STATUS.js"),a("./constants/URL_ACCESS_WHITE_LIST.js"),a("./constants/WS_DEFAULTS.js"),a("./controllers/AccountController.js"),a("./controllers/BaseBatchFormController.js"),a("./controllers/BaseButtonController.js"),a("./controllers/BaseCollectionButtonController.js"),a("./controllers/BaseCollectionController.js"),a("./controllers/BaseConfirmController.js"),a("./controllers/BaseDockablePanelController.js"),a("./controllers/BaseDraggableController.js"),a("./controllers/BaseFormController.js"),a("./controllers/BaseListController.js"),a("./controllers/BaseLoginController.js"),a("./controllers/BaseModelController.js"),a("./controllers/BasePaginatedListController.js"),a("./controllers/BasePanelController.js"),a("./controllers/BasePanelItemController.js"),a("./controllers/ConfirmController.js"),a("./controllers/EditAccountController.js"),a("./controllers/FatalController.js"),a("./controllers/ForgotPasswordController.js"),a("./filters/bps.js"),a("./filters/bytes.js"),a("./filters/constant.js"),a("./filters/currency.js"),a("./filters/featureFlag.js"),a("./filters/guestAuthorization.js"),a("./filters/moment.js"),a("./filters/numberToString.js"),a("./filters/percent.js"),a("./filters/toTranslationKey.js"),a("./lib/routeResolvers/resolveAllowAdminAccess.js"),a("./lib/routeResolvers/resolveLogin.js"),a("./lib/routeResolvers/resolveSsoLogin.js"),a("./polyfills/matchesSelector.js"),a("./providers/deviceProvider.js"),a("./providers/preferencesProvider.js"),a("./providers/redirectUrlProvider.js"),a("./providers/siteProvider.js"),a("./providers/translateDebugProvider.js"),a("./run/debugger.js"),a("./run/location.js"),a("./run/visibilityChange.js"),a("./services/BaseCollectionRepository.js"),a("./services/BaseDockablePanels.js"),a("./services/BaseIndependentCollectionRepository.js"),a("./services/BaseListColumnStore.js"),a("./services/BaseModelRepository.js"),a("./services/BasePanels.js"),a("./services/BaseRepository.js"),a("./services/ItemState.js"),a("./services/ListSortStoreLocal.js"),a("./services/ListStateLocal.js"),a("./services/accessHttpInterceptor.js"),a("./services/account.js"),a("./services/analytics.js"),a("./services/apiResults.js"),a("./services/appUrl.js"),a("./services/batchEdit.js"),a("./services/binaryPrefix.js"),a("./services/builderFactories/ListDirective.js"),a("./services/builderFactories/MixinContainer.js"),a("./services/builderFactories/PaginatedListDirective.js"),a("./services/bypass.js"),a("./services/clipboardUtils.js"),a("./services/collections/CountryCollection.js"),a("./services/collections/HotspotPackageCollection.js"),a("./services/collections/ReportCollection.js"),a("./services/collections/SiteCollection.js"),a("./services/collections/SiteHealthCollection.js"),a("./services/controllerMixins/listCollapsibleColumnControllerMixin.js"),a("./services/countries.js"),a("./services/dateIntervalUtils.js"),a("./services/directiveMixins/eventHandlersDirectiveMixin.js"),a("./services/directiveMixins/listSearchDirectiveMixin.js"),a("./services/directiveMixins/listSortEventDirectiveMixin.js"),a("./services/downloadUrl.js"),a("./services/editAccount.js"),a("./services/featureFlag.js"),a("./services/fileUtils.js"),a("./services/filters/BaseSearchableModelFilter.js"),a("./services/hotspotPackages.js"),a("./services/i18nLocalStorage.js"),a("./services/lambda.js"),a("./services/listState.js"),a("./services/mathUtils.js"),a("./services/mergeDefaults.js"),a("./services/mixins/getNestedMixin.js"),a("./services/mixins/modelDelegateMixin.js"),a("./services/mixins/pendingMixin.js"),a("./services/mixins/savePartialMixin.js"),a("./services/mixins/siteUrlWithinMixin.js"),a("./services/models/AccountModel.js"),a("./services/models/BackupMgrModel.js"),a("./services/models/BatchModel.js"),a("./services/models/ChangeSiteModel.js"),a("./services/models/CountryModel.js"),a("./services/models/EditAccountModel.js"),a("./services/models/HotspotMgrModel.js"),a("./services/models/HotspotPackageModel.js"),a("./services/models/LoginModel.js"),a("./services/models/LogoutModel.js"),a("./services/models/PreferencesModel.js"),a("./services/models/RecoverPasswordMgrModel.js"),a("./services/models/SdnMgrModel.js"),a("./services/models/SdnModel.js"),a("./services/models/SiteHealthModel.js"),a("./services/models/SiteModel.js"),a("./services/models/StatusModel.js"),a("./services/models/SystemInfoModel.js"),a("./services/models/SystemMgrModel.js"),a("./services/models/UbicSsoModel.js"),a("./services/models/UpdateProgressModel.js"),a("./services/polls.js"),a("./services/polls/BasePoll.js"),a("./services/polls/ModelPoll.js"),a("./services/queryString.js"),a("./services/refresh.js"),a("./services/repositoryUtils.js"),a("./services/resolvers/translateResolver.js"),a("./services/resolvers/urlLocaleResolver.js"),a("./services/resolvers/webrtcResolver.js"),a("./services/sdn.js"),a("./services/siteHealth.js"),a("./services/siteUtils.js"),a("./services/sites.js"),a("./services/sitesOverview.js"),a("./services/statsUtils.js"),a("./services/status.js"),a("./services/system.js"),a("./services/systemBackupUtils.js"),a("./services/versionParser.js"),a("./services/voucherUtils.js"),a("./services/webrtc/unifiWebRtcConfiguration.js"),a("./services/webrtc/unifiWebRtcConnector.js"),a("./services/webrtc/unifiWebRtcErrorHandler.js"),a("./services/webrtc/unifiWebRtcSuccessHandler.js"),a("./services/webrtc/versionProvider.js"),a("./services/ws/wsConnector.js"),a("./services/wsAdapter.js"),a("./services/xhrHttpInterceptor.js")},{"../shared-unifi/main":1845,"./components/autofocus/autofocus.js":1532,"./components/blackoutModal/blackoutModal.js":1534,"./components/bowser/bowser.js":1535,"./components/browserWarning/browserWarning.js":1536,"./components/bypassConfirm/BypassConfirmController.js":1537,"./components/bypassConfirm/bypassConfirm.js":1539,"./components/collapsibleTable/collapsibleTable.js":1540,"./components/condensed/condensed.js":1542,"./components/connectionStatus/ConnectionStatusController.js":1543,"./components/connectionStatus/connectionStatus.js":1545,"./components/constrainPosition/ConstrainPositionController.js":1546,"./components/constrainPosition/constrainPosition.js":1547,"./components/dateIntervalSelector/DateIntervalSelectorController.js":1548,"./components/dateIntervalSelector/dateIntervalSelector.js":1550,"./components/debugPanel/DebugPanelController.js":1551,"./components/debugPanel/debugPanel.js":1553,"./components/dndDock/DndDockController.js":1554,"./components/dndDock/dndDock.js":1555,"./components/dndDockItem/dndDockItem.js":1556,"./components/dockableItem/DockableItemController.js":1557,"./components/dockableItem/dockableItem.js":1558,"./components/draggableItem/DraggableItemController.js":1559,"./components/draggableItem/draggableItem.js":1560,"./components/featureFlag/featureFlag.js":1561,"./components/fixDisabled/fixDisabled.js":1562,"./components/ifApp/ifApp.js":1563,"./components/ifRoleAdmin/ifRoleAdmin.js":1564,"./components/ifRoleSuperAdmin/ifRoleSuperAdmin.js":1565,"./components/ifRoleWriteable/ifRoleWriteable.js":1566,"./components/initializeWhen/initializeWhen.js":1567,"./components/keyPressEvents/keyPressEvents.js":1568,"./components/listColumnSelector/ListColumnSelectorController.js":1569,"./components/listColumnSelector/listColumnSelector.js":1571,"./components/listPagination/listPagination.js":1573,"./components/logoutButton/logoutButton.js":1575,"./components/microPagination/microPagination.js":1577,"./components/mobileSafeHover/mobileSafeHover.js":1578,"./components/modelForm/ModelFormController.js":1579,"./components/modelForm/modelForm.js":1580,"./components/optionPlaceholder/optionPlaceholder.js":1582,"./components/pauseChildrenWatchers/pauseChildrenWatchers.js":1583,"./components/positionAlerts/positionAlerts.js":1584,"./components/preventFocusZoom/preventFocusZoom.js":1585,"./components/refreshButton/refreshButton.js":1587,"./components/refreshSwitcher/RefreshSwitcherController.js":1588,"./components/refreshSwitcher/refreshSwitcher.js":1590,"./components/requiresSiteContext/requiresSiteContext.js":1591,"./components/resizableItem/ResizableItemController.js":1592,"./components/resizableItem/resizableItem.js":1593,"./components/search/search.js":1595,"./components/sidePanelStickyTitle/sidePanelStickyTitle.js":1596,"./components/siteSwitcher/SiteSwitcherController.js":1597,"./components/siteSwitcher/siteSwitcher.js":1599,"./components/stylePreferences/stylePreferences.js":1600,"./components/timeFilterDropdown/TimeFilterDropdownController.js":1601,"./components/timeFilterDropdown/timeFilterDropdown.js":1603,"./components/timeIntervalSelector/TimeIntervalSelectorController.js":1604,"./components/timeIntervalSelector/timeIntervalSelector.js":1606,"./components/translateLink/translateLink.js":1607,"./components/userMenu/UserMenuController.js":1608,"./components/userMenu/userMenu.js":1610,"./components/versionHeader/VersionHeaderController.js":1611,"./components/versionHeader/versionHeader.js":1613,"./config/analytics.js":1614,"./config/animate.js":1615,"./config/compile.js":1616,"./config/context.js":1617,"./config/d3.js":1618,"./config/device.js":1619,"./config/env.js":1620,"./config/frames.js":1621,"./config/http.js":1622,"./config/moment.js":1623,"./config/preferences.js":1624,"./config/q.js":1625,"./config/redirectUrl.js":1626,"./config/site.js":1627,"./config/translate.js":1628,"./config/version.js":1629,"./config/webRtc.js":1630,"./constants/ANALYTICS_CATEGORIES.js":1631,"./constants/ANALYTICS_EVENTS.js":1632,"./constants/API_STRINGS.js":1633,"./constants/BACKBONE_EVENTS.js":1634,"./constants/BACKUP_DEFAULTS.js":1635,"./constants/DEFAULT_PREFERENCES.js":1636,"./constants/DEFAULT_UCK_SSH_CREDENTIALS.js":1637,"./constants/GUEST_AUTHORIZATION.js":1638,"./constants/HOTSPOT_PACKAGES_DEFAULTS.js":1639,"./constants/KEY_PRESS_EVENTS.js":1640,"./constants/LANGUAGES.js":1641,"./constants/REFRESH_RATES.js":1642,"./constants/REGEX_PATTERNS.js":1643,"./constants/REPORT_DEFAULTS.js":1644,"./constants/SDN_STATES.js":1645,"./constants/TIME_FILTER_DEFAULTS.js":1646,"./constants/TIME_INTERVALS.js":1647,"./constants/UNIFI_WEBRTC_ERROR.js":1648,"./constants/UNIFI_WEBRTC_EVENTS.js":1649,"./constants/UPDATE_STATUS.js":1650,"./constants/URL_ACCESS_WHITE_LIST.js":1651,"./constants/WS_DEFAULTS.js":1652,"./controllers/AccountController.js":1653,"./controllers/BaseBatchFormController.js":1654,"./controllers/BaseButtonController.js":1655,"./controllers/BaseCollectionButtonController.js":1656,"./controllers/BaseCollectionController.js":1657,"./controllers/BaseConfirmController.js":1658,"./controllers/BaseDockablePanelController.js":1659,"./controllers/BaseDraggableController.js":1660,"./controllers/BaseFormController.js":1661,"./controllers/BaseListController.js":1662,"./controllers/BaseLoginController.js":1663,"./controllers/BaseModelController.js":1664,"./controllers/BasePaginatedListController.js":1665,"./controllers/BasePanelController.js":1666,"./controllers/BasePanelItemController.js":1667,"./controllers/ConfirmController.js":1668,"./controllers/EditAccountController.js":1669,"./controllers/FatalController.js":1670,"./controllers/ForgotPasswordController.js":1671,"./filters/bps.js":1672,"./filters/bytes.js":1673,"./filters/constant.js":1674,"./filters/currency.js":1675,"./filters/featureFlag.js":1676,"./filters/guestAuthorization.js":1677,"./filters/moment.js":1678,"./filters/numberToString.js":1679,"./filters/percent.js":1680,"./filters/toTranslationKey.js":1681,"./lib/routeResolvers/resolveAllowAdminAccess.js":1682,"./lib/routeResolvers/resolveLogin.js":1683,"./lib/routeResolvers/resolveSsoLogin.js":1684,"./polyfills/matchesSelector.js":1686,"./providers/deviceProvider.js":1687,"./providers/preferencesProvider.js":1688,"./providers/redirectUrlProvider.js":1689,"./providers/siteProvider.js":1690,"./providers/translateDebugProvider.js":1691,"./run/debugger.js":1692,"./run/location.js":1693,"./run/visibilityChange.js":1694,"./services/BaseCollectionRepository.js":1695,"./services/BaseDockablePanels.js":1696,"./services/BaseIndependentCollectionRepository.js":1697,"./services/BaseListColumnStore.js":1698,"./services/BaseModelRepository.js":1699,"./services/BasePanels.js":1700,"./services/BaseRepository.js":1701,"./services/ItemState.js":1702,"./services/ListSortStoreLocal.js":1703,"./services/ListStateLocal.js":1704,"./services/accessHttpInterceptor.js":1705,"./services/account.js":1706,"./services/analytics.js":1707,"./services/apiResults.js":1708,"./services/appUrl.js":1709,"./services/batchEdit.js":1710,"./services/binaryPrefix.js":1711,"./services/builderFactories/ListDirective.js":1712,"./services/builderFactories/MixinContainer.js":1713,"./services/builderFactories/PaginatedListDirective.js":1714,"./services/bypass.js":1715,"./services/clipboardUtils.js":1716,"./services/collections/CountryCollection.js":1717,"./services/collections/HotspotPackageCollection.js":1718,"./services/collections/ReportCollection.js":1719,"./services/collections/SiteCollection.js":1720,"./services/collections/SiteHealthCollection.js":1721,"./services/controllerMixins/listCollapsibleColumnControllerMixin.js":1722,"./services/countries.js":1723,"./services/dateIntervalUtils.js":1724,"./services/directiveMixins/eventHandlersDirectiveMixin.js":1725,"./services/directiveMixins/listSearchDirectiveMixin.js":1726,"./services/directiveMixins/listSortEventDirectiveMixin.js":1727,"./services/downloadUrl.js":1728,"./services/editAccount.js":1729,"./services/featureFlag.js":1730,"./services/fileUtils.js":1731,"./services/filters/BaseSearchableModelFilter.js":1732,"./services/hotspotPackages.js":1733,"./services/i18nLocalStorage.js":1734,"./services/lambda.js":1735,"./services/listState.js":1736,"./services/mathUtils.js":1737,"./services/mergeDefaults.js":1738,"./services/mixins/getNestedMixin.js":1739,"./services/mixins/modelDelegateMixin.js":1740,"./services/mixins/pendingMixin.js":1741,"./services/mixins/savePartialMixin.js":1742,"./services/mixins/siteUrlWithinMixin.js":1743,"./services/models/AccountModel.js":1744,"./services/models/BackupMgrModel.js":1745,"./services/models/BatchModel.js":1746,"./services/models/ChangeSiteModel.js":1747,"./services/models/CountryModel.js":1748,"./services/models/EditAccountModel.js":1749,"./services/models/HotspotMgrModel.js":1750,"./services/models/HotspotPackageModel.js":1751,"./services/models/LoginModel.js":1752,"./services/models/LogoutModel.js":1753,"./services/models/PreferencesModel.js":1754,"./services/models/RecoverPasswordMgrModel.js":1755,
"./services/models/SdnMgrModel.js":1756,"./services/models/SdnModel.js":1757,"./services/models/SiteHealthModel.js":1758,"./services/models/SiteModel.js":1759,"./services/models/StatusModel.js":1760,"./services/models/SystemInfoModel.js":1761,"./services/models/SystemMgrModel.js":1762,"./services/models/UbicSsoModel.js":1763,"./services/models/UpdateProgressModel.js":1764,"./services/polls.js":1765,"./services/polls/BasePoll.js":1766,"./services/polls/ModelPoll.js":1767,"./services/queryString.js":1768,"./services/refresh.js":1769,"./services/repositoryUtils.js":1770,"./services/resolvers/translateResolver.js":1771,"./services/resolvers/urlLocaleResolver.js":1772,"./services/resolvers/webrtcResolver.js":1773,"./services/sdn.js":1774,"./services/siteHealth.js":1775,"./services/siteUtils.js":1776,"./services/sites.js":1777,"./services/sitesOverview.js":1778,"./services/statsUtils.js":1779,"./services/status.js":1780,"./services/system.js":1781,"./services/systemBackupUtils.js":1782,"./services/versionParser.js":1783,"./services/voucherUtils.js":1784,"./services/webrtc/unifiWebRtcConfiguration.js":1785,"./services/webrtc/unifiWebRtcConnector.js":1786,"./services/webrtc/unifiWebRtcErrorHandler.js":1787,"./services/webrtc/unifiWebRtcSuccessHandler.js":1788,"./services/webrtc/versionProvider.js":1789,"./services/ws/wsConnector.js":1790,"./services/wsAdapter.js":1791,"./services/xhrHttpInterceptor.js":1792}],1686:[function(a,b,c){"use strict";Element&&function(a){a.matchesSelector=a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.parentNode||b.document).querySelectorAll(a),d=-1;c[++d]&&c[d]!==b;);return!!c[d]}}(Element.prototype)},{}],1687:[function(a,b,c){"use strict";angular.module("base-unifi").provider("device",[function(){var a;this.initActiveDevice=function(b){return a=b,this},this.$get=[function(){return{getActiveDevice:function(){return a}}}]}])},{}],1688:[function(a,b,c){"use strict";angular.module("base-unifi").provider("preferences",[function(){var a,b,c={id:1};this.initDefaultPreferences=function(d){c=angular.extend(c,d),a=Object.keys(c),b&&b.set(d)},this.$get=["_","PreferencesModel",function(d,e){return{model:b=new e(c),fetchPreferences:function(){return b.fetch()},reset:function(e){return e&&d.difference(Object.keys(b.attributes),a).map(b.unset.bind(b)),b.save(c,{wait:!0})}}}]}])},{}],1689:[function(a,b,c){"use strict";angular.module("base-unifi").provider("redirectUrl",[function(){var a;this.store=function(b){return a=b,this},this.$get=[function(){return{get:function(){return a}}}]}])},{}],1690:[function(a,b,c){"use strict";angular.module("base-unifi").provider("site",[function(){var a;this.initActiveSite=function(b){a=b},this.$get=["$rootScope","$injector","contextSwitchStates",function(b,c,d){return{isSiteChanging:!1,getActiveSite:function(){return a},setActiveSite:function(e,f){a=e,b.$broadcast(d.getSuccess(),a);var g=c.get("$q");if(f){var h=c.get("account");return h.updateLastSiteName(e)}return g.when()},clearActiveSite:function(){a=null}}}]}])},{}],1691:[function(a,b,c){"use strict";angular.module("base-unifi").provider("translateDebug",[function(){this.isEnabled=function(){if(window.localStorage){var a=localStorage.getItem("unifi-preferences"),b=localStorage.getItem("unifi-preferences-"+a);return!!b&&JSON.parse(b).debugTranslationKeys}return!1},this.$get=[function(){return{}}]}])},{}],1692:[function(a,b,c){"use strict";angular.module("base-unifi").run(["$injector",function(a){window.DEBUGGER={inject:function(b){return a.get(b)},scope:function(a){return angular.element(a).scope()},countWatches:function(a){var b=angular.element(a),c=[],d=function(a){angular.forEach(["$scope","$isolateScope"],function(b){a.data()&&a.data().hasOwnProperty(b)&&angular.forEach(a.data()[b].$$watchers,function(a){c.push(a)})}),angular.forEach(a.children(),function(a){d(angular.element(a))})};d(b);var e=[];return angular.forEach(c,function(a){e.indexOf(a)<0&&e.push(a)}),e.length}}}])},{}],1693:[function(a,b,c){"use strict";angular.module("base-unifi").run(["$rootScope","$location","device","stateChangeInterceptor",function(a,b,c){a.$on("$stateChangeStart",function(){b.search("d",c.getActiveDevice())}),a.$on("pageutilsStateChangeSuccess",function(){b.search("d",c.getActiveDevice())})}])},{}],1694:[function(a,b,c){"use strict";angular.module("base-unifi").run(["visibilityChange",function(a){a.startListening()}])},{}],1695:[function(a,b,c){"use strict";angular.module("base-unifi").factory("BaseCollectionRepository",["BaseRepository",function(a){function b(b){this._dataType="collection",a.call(this,b)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b.prototype.clear=function(){return this.collection.invalidate&&this.collection.invalidate(),this.collection.reset()},b}])},{}],1696:[function(a,b,c){"use strict";function d(a,b,c,d,f,g,h){this.$timeout=a,this._isDockOpen=!1,e.call(this,b,c,d,f,g,h)}var e=a("../../base-unifi/services/BasePanels");d.prototype=Object.create(e.prototype),d.prototype.constructor=e,d.prototype.isDockOpen=function(){return this._isDockOpen},d.prototype.openDock=function(){this._isDockOpen=!0,this.dockOpenEvent&&this.$rootScope.$broadcast(this.dockOpenEvent,this.openTransitionRate)},d.prototype.closeDock=function(){this._isDockOpen=!1,this.dockCloseEvent&&this.$rootScope.$broadcast(this.dockCloseEvent,this.closeTransitionRate)},d.prototype.toggleDock=function(){this._isDockOpen?this.closeDock():this.openDock()},d.prototype.removeDockedItems=function(){var a=this.getItemsByState([{state:"undocked",value:!1,allowUndefined:!0}]);angular.forEach(a,function(a){this.removeItem(a,!0)}.bind(this)),this.updateQueryString()},d.prototype.initFromQueryString=function(){return e.prototype.initFromQueryString.call(this).then(function(){var a=this.collection.length-this.itemState.collection.where({undocked:!0}).length;a&&this.$timeout(function(){this.$timeout(function(){this.openDock()}.bind(this),30)}.bind(this),0,!1)}.bind(this))},b.exports=d},{"../../base-unifi/services/BasePanels":1700}],1697:[function(a,b,c){"use strict";angular.module("base-unifi").service("BaseIndependentCollectionRepository",["$q","$rootScope","$timeout","BaseCollectionRepository","EVENTS",function(a,b,c,d,e){function f(a,b){d.call(this,a),this._idAttribute=b||"id",this._registration.items={}}return f.prototype=Object.create(d.prototype),f.prototype.constructor=f,f.prototype._validateDataObject=function(){if(!this.collection||!this.collection.model.prototype._hasResolveMixin)throw new Error("The collection models must have the resolve mixin")},f.prototype.fetch=function(b){return a.all(this.collection.map(function(a){return a.resolve(b)}))},f.prototype.refresh=function(){return a.all(this.collection.map(function(a){return this.refreshItem(a.id)}.bind(this)))},f.prototype.fetchItem=function(a,b){var c=this.collection.get(a)||this.collection.add(this._buildItemIdAttr(a));return c.resolve(b)},f.prototype.refreshItem=function(b){var c=this.collection.get(b);return c?this.isItemRefreshable(b)?(c.invalidate(),c.resolve()):a.when(c):a.reject()},f.prototype.clearItem=function(a){var b=this.collection.get(a);b&&(b.clear(),b.invalidate(),this.collection.remove(b))},f.prototype.registerItem=function(a){return this._registration.items[a]=this._registration.items[a]||{count:0},0===this._registration.items[a].count++&&(this._registration.items[a].clear=b.$on(e.APP_REFRESH,function(b,c){this.isItemRefreshable(a)&&c.push(this.refreshItem(a))}.bind(this))),this},f.prototype.unregisterItem=function(a,b,d){return c(function(){this._registration.items[a]&&this._registration.items[a].count&&(0===--this._registration.items[a].count||d)&&(this._registration.items[a].count=0,this._registration.items[a].clear(),b||this.clearItem(a))}.bind(this),0,!1),this},f.prototype.unregisterAll=function(a,b){Object.keys(this._registration.items).forEach(function(c){this.unregisterItem(c,a,b)}.bind(this))},f.prototype.isItemRefreshable=function(a){var b=this.collection.get(a);return!!b&&(b.fetched||b.expired)},f.prototype._buildItemIdAttr=function(a){var b={};return b[this._idAttribute]=a,b},f}])},{}],1698:[function(a,b,c){"use strict";function d(a,b,c){this.localStorageKey&&(this.columnStorage=new b(a,[this.localStorageKey,"columns"].join(":")),this.columnStorage.hydrate(),this.selectedColumns=this.columnStorage.getValue(),this.stateStorage=new c(a,[this.localStorageKey,"state"].join(":")),this.stateStorage.hydrate(),this.isCustomized=this.stateStorage.getValue()),this.selectedColumns=this.selectedColumns||{},this.isCustomized=this.isCustomized||!1,this.isBatchEditable=this.isBatchEditable||!1,this.columnPresets=this.columnPresets||[]}d.prototype.getColumnOptions=function(){return this.columnOptions},d.prototype.getColumns=function(){return this.columns},d.prototype.getSelectedColumns=function(){return Object.keys(this.selectedColumns)},d.prototype.getAllColumns=function(){return this.columnOptions.map(function(a){return a.id})},d.prototype.setColumns=function(){this.isCustomized?this.columns=this.getSelectedColumns():this.columns=this.getAllColumns()},d.prototype.clearSelectedColumns=function(){this.selectedColumns={}},d.prototype.getCustomized=function(){return this.isCustomized},d.prototype.setCustomized=function(a){a&&!this.getSelectedColumns().length&&(angular.forEach(this.getColumns(),function(a){this.selectedColumns[a]=!0}.bind(this)),this.saveColumns()),this.isCustomized=a,this.saveState(),this.setColumns()},d.prototype.getBatchEditable=function(){return this.isBatchEditable},d.prototype.setBatchEditable=function(a){this.isBatchEditable=a},d.prototype.getColumnPresets=function(){return this.columnPresets},d.prototype.setColumnPreset=function(){throw new Error("You must override setColumnPreset")},d.prototype.isColumnVisible=function(a){return this.getColumns().indexOf(a)!==-1},d.prototype.isColumnSelected=function(a){return this.selectedColumns[a]===!0},d.prototype.selectColumn=function(a){this.selectedColumns[a]=!0,this.setColumns(),this.saveColumns()},d.prototype.removeColumn=function(a){delete this.selectedColumns[a],this.setColumns(),this.saveColumns()},d.prototype.toggleColumn=function(a){this.isColumnSelected(a)?this.removeColumn(a):this.selectColumn(a)},d.prototype.saveColumns=function(){this.columnStorage&&this.columnStorage.setValue(this.selectedColumns)},d.prototype.saveState=function(){this.stateStorage&&this.stateStorage.setValue(this.isCustomized)},d.$inject=["localStorageFailSafe","LocalStorageObjectValue","LocalStorageBooleanValue"],b.exports=d},{}],1699:[function(a,b,c){"use strict";angular.module("base-unifi").factory("BaseModelRepository",["BaseRepository",function(a){function b(b){this._dataType="model",a.call(this,b)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b.prototype.clear=function(){return this.model.invalidate(),this.model.clear()},b}])},{}],1700:[function(a,b,c){"use strict";function d(a,b,c,d,e,f){this.$q=a,this.$rootScope=b,this.$window=c,this.queryString=d,this.collection=new e,this.itemState=new f,this.queryStringItemIdKey="i",this.queryStringItemStateKey="s",this.queryStringLock=0}d.prototype.isEmpty=function(){return 0===this.collection.length},d.prototype.clear=function(){this.collection.reset(),this.itemState.reset(),this.updateQueryString()},d.prototype.addItem=function(a,b,c,d){a=this.collection.remove(a)||a,this.itemState.addItemState(a,b),this.collection.add(a,{at:c||0}),d||this.updateQueryString()},d.prototype.removeItem=function(a,b){this.collection.remove(a),this.itemState.clearItemState(a),b||this.updateQueryString()},d.prototype.removeItemsByType=function(a){this.collection.size()&&(angular.forEach(this.getItemsByType(a),function(a){this.removeItem(a,!0)}.bind(this)),this.updateQueryString())},d.prototype.getItemById=function(){throw new Error("You must override getItemById")},d.prototype.getItemsByState=function(a){return this.collection.filter(function(b){return this.itemState.matchesState(b,a)}.bind(this))},d.prototype.getItemsByType=function(a){return this.collection.filter(function(b){return a.indexOf(b.modelType)!==-1})},d.prototype.getItemAndTypeId=function(a){return this.itemState.getItemAndTypeId(a)},d.prototype.getItemState=function(a,b){return this.itemState.getItemState(a,b)},d.prototype.setItemState=function(a,b,c,d){return"locked"!==b&&this.itemState.isItemStateLocked(a)||(this.itemState.setItemState(a,b,c),d||this.updateQueryString()),this.itemState.getItemState(a,b)},d.prototype.unsetItemState=function(a,b,c){if("locked"===b||!this.itemState.isItemStateLocked(a)){var d=this.itemState.unsetItemState(a,b);d&&(c||this.updateQueryString())}},d.prototype.toggleItemState=function(a,b,c){"locked"!==b&&this.itemState.isItemStateLocked(a)||(this.itemState.toggleItemState(a,b),c||this.updateQueryString())},d.prototype.clearItemState=function(a,b){this.itemState.isItemStateLocked(a)||(this.itemState.clearItemState(a),b||this.updateQueryString())},d.prototype.onItemResized=function(a){this.itemResizeEvent&&this.$rootScope.$broadcast(this.itemResizeEvent,a)},d.prototype.canAddItemToQueryString=function(a){return!!a},d.prototype.initFromQueryString=function(){if(this.queryStringKey){var a,b=(this.queryString.get()||{})[this.queryStringKey];if(b&&(a=JSON.parse(this.$window.atob(b)))){var c=a.reverse().map(function(a){return function(){return this.getItemById(a[this.queryStringItemIdKey]).then(function(b){if(b){var c;a[this.queryStringItemStateKey]&&(c=[],angular.forEach(a[this.queryStringItemStateKey],function(a,b){c.push({state:b,value:a})})),this.addItem(b,c)}}.bind(this))}.bind(this)}.bind(this));return this.queryStringLock++,c.reduce(function(a,b){return a.then(b)["catch"](b)},this.$q.when())["finally"](function(){this.queryStringLock--}.bind(this))}}return this.$q.reject()},d.prototype.updateQueryString=function(){if(this.queryStringKey){var a,b,c=[];0===this.queryStringLock&&(this.collection.each(function(d){this.canAddItemToQueryString(d)&&(a={},a[this.queryStringItemIdKey]=this.getItemAndTypeId(d),(b=this.itemState.collection.get(this.getItemAndTypeId(d)))&&(a[this.queryStringItemStateKey]={},angular.forEach(b.attributes,function(b,c){"id"!==c&&b!==!1&&(a[this.queryStringItemStateKey][c]=b)}.bind(this))),c.push(a))},this),c.length?this.queryString.set(this.queryStringKey,this.$window.btoa(JSON.stringify(c))):this.queryString.remove(this.queryStringKey))}},b.exports=d},{}],1701:[function(a,b,c){"use strict";angular.module("base-unifi").factory("BaseRepository",["$rootScope","$timeout","EVENTS",function(a,b,c){function d(b){this[this._dataType]=b,this._validateDataObject(),this._registration={count:0},a.$on(c.ADMIN_LOGOUT,function(){this.clear()}.bind(this))}return d.prototype._validateDataObject=function(){if(!this[this._dataType]||!this[this._dataType]._hasResolveMixin)throw new Error("The data object must have the resolve mixin")},d.prototype.fetch=function(a){return this[this._dataType].resolve(a)},d.prototype.invalidate=function(){this[this._dataType].invalidate()},d.prototype.refresh=function(a){return this.invalidate(),this.fetch(a)},d.prototype.register=function(){return 0===this._registration.count++&&(this._registration.clear=a.$on(c.APP_REFRESH,function(a,b){this.isRefreshable()&&b.push(this.refresh())}.bind(this))),this},d.prototype.unregister=function(a,c){return b(function(){this._registration.count&&(0===--this._registration.count||c)&&(this._registration.count=0,this._registration.clear(),a||this.clear())}.bind(this),0,!1),this},d.prototype.clear=function(){throw new Error("The clear function must be extended")},d.prototype.isRefreshable=function(){return this[this._dataType].fetched||this[this._dataType].expired},d.prototype.isRegistered=function(){return this._registration.count>0},d}])},{}],1702:[function(a,b,c){"use strict";angular.module("base-unifi").service("ItemState",["BaseCollection",function(a){var b=function(){this.collection=new a};return b.prototype.getItemAndTypeId=function(a){return a?[a.modelType,a.id].join("|"):void 0},b.prototype.addItemState=function(a,b){b&&angular.forEach(b,function(b){this.getItemState(a,b.state)&&!b.overwrite||this.setItemState(a,b.state,b.value,!0)}.bind(this))},b.prototype.getItemState=function(a,b){var c=this.collection.get(this.getItemAndTypeId(a));if(c)return c.get(b)},b.prototype.setItemState=function(a,b,c){if("locked"===b||!this.isItemStateLocked(a)){var d={id:this.getItemAndTypeId(a)};d[b]=c,this.collection.add(d,{merge:!0})}return this.getItemState(a,b)},b.prototype.isItemStateLocked=function(a){return this.getItemState(a,"locked")},b.prototype.toggleItemState=function(a,b){if("locked"===b||!this.isItemStateLocked(a)){var c=this.collection.get(this.getItemAndTypeId(a));this.setItemState(a,b,!(c&&c.get(b)))}},b.prototype.clearItemState=function(a){this.isItemStateLocked(a)||this.collection.remove(this.collection.get(this.getItemAndTypeId(a)))},b.prototype.unsetItemState=function(a,b){if("locked"===b||!this.isItemStateLocked(a)){var c=this.collection.get(this.getItemAndTypeId(a));if(c)return c.unset(b),c}},b.prototype.matchesState=function(a,b){var c=this.collection.get(this.getItemAndTypeId(a)),d=!0;return angular.forEach(b,function(a){var b=c?c.get(a.state):void 0;b===a.value||a.allowUndefined&&void 0===b||(d=!1)}),d},b.prototype.reset=function(){this.collection.reset()},b}])},{}],1703:[function(a,b,c){"use strict";angular.module("base-unifi").factory("ListSortStoreLocal",["localStorageFailSafe","LocalStorageObjectValue",function(a,b){var c=function(c){this.sortStorage=new b(a,c),this.sortStorage.hydrate()};return c.prototype.saveSort=function(a){return this.sortStorage.setValue(a)},c.prototype.getSortBy=function(){return(this.sortStorage.getValue()||{}).sortBy},c.prototype.getSortDesc=function(){return(this.sortStorage.getValue()||{}).sortDesc},c}])},{}],1704:[function(a,b,c){"use strict";angular.module("base-unifi").factory("ListStateLocal",["localStorageFailSafe","stateStorage",function(a,b){var c=function(c,d){this.section=c,this._storage=d?b:a};return c.prototype.addFilter=function(a,b){this._storage.setItem(this.filterKey(a),b)},c.prototype.removeFilter=function(a){this._storage.removeItem(this.filterKey(a))},c.prototype.extendFilters=function(a){angular.forEach(a,function(a,b){void 0===a?this.removeFilter(b):this.addFilter(b,a)}.bind(this))},c.prototype.getFilter=function(a){return this._storage.getItem(this.filterKey(a))},c.prototype.filterKey=function(a){return[this.section,a].join("|")},c.prototype.beginTransaction=function(){},c.prototype.commitTransaction=function(){},c.prototype.clearTransaction=function(){},c}])},{}],1705:[function(a,b,c){"use strict";angular.module("base-unifi").factory("accessHttpInterceptor",["site","$q","$injector","ENV","URL_ACCESS_WHITE_LIST",function(a,b,c,d,e){function f(a){return a&&a.url&&e.find(function(b){return a.url.indexOf(b)!==-1})}return{responseError:function(e){if(e&&401===e.status&&!f(e.config)){var g=c.get("account"),h=c.get("apiResults"),i=c.get("$state"),j=c.get("$location"),k=h.getRawErrorMsg(e);return"api.err.NoSiteContext"===k?(a.setActiveSite("default"),b.reject(e)):g.logout(!0)["finally"](function(){return i.current.name!==d.LOGIN_STATE&&i.go(d.LOGIN_STATE,{site:a.getActiveSite()||"default",redirect:j.url()},{reload:!0}),b.reject(e)})}return b.reject(e)}}}])},{}],1706:[function(a,b,c){"use strict";angular.module("base-unifi").service("account",["$q","$rootScope","$translate","BaseModelRepository","AccountModel","LoginModel","LogoutModel","ChangeSiteModel","EditAccountModel","preferences","RecoverPasswordMgrModel","sites","apiResults","EVENTS",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o="manageRememberMe",p="hotspotRememberMe";this.preferences=j,this.repository=new d(new e),this.loginToManage=function(a,b,c){return this._login({username:a,password:b,remember:!!c,strict:!0}).then(function(){return this._updateRememberMePreferences(c)}.bind(this)).then(function(){l.repository.collection.invalidate()})},this.loginToHotspot=function(a,b,c,d){return this._login({username:a,password:b,strict:!0,for_hotspot:!0,site_name:d,remember:!!c}).then(function(){this._updateRememberMePreferences(c,!0)}.bind(this))},this.logout=function(d){return b.$broadcast(n.ADMIN_LOGOUT),d?(this.repository.model.clear(),this.repository.model.invalidate(),a.when()):(new g).save().then(function(){return this.repository.model.clear(),this.repository.model.invalidate(),a.when()}.bind(this))["catch"](function(){return a.reject(c.instant("COMMON_NOTICE_REQUEST_ERROR"))})},this.ssoLogin=function(a){return this._login({for_sso:!0,strict:!0,sso_token:a.sso_token,ubic_uuid:a.ubic_uuid})},this.editAccount=function(b,d,e){return e&&(b.x_oldpassword=e),d&&(b.x_password=d),(new i).save(b).then(function(){return this.repository.model.set(b),a.when(c.instant("EDIT_ACCOUNT_ACTIONS_SUCCESS"))}.bind(this))["catch"](function(b){return a.reject(m.appendErrorMsg(c.instant("EDIT_ACCOUNT_ACTIONS_ERROR"),b))})},this.resetPassword=function(b){return(new k).save({email:b}).then(function(){return a.when(c.instant("ACCOUNT_FORGOT_PASSWORD_ACTIONS_RESET_PASSWORD_SUCCESS"))})["catch"](function(b){return a.reject(m.appendErrorMsg(c.instant("ACCOUNT_FORGOT_PASSWORD_ACTIONS_RESET_PASSWORD_ERROR"),b))})},this.updateLastSiteName=function(b){return this.repository.model.get("last_site_name")!==b?(new h).save({last_site_name:b}):a.when()},this.verifyAccount=function(a){return a.save()},this.isLoggedIn=function(){return!(!this.repository.model.id&&!this.repository.model.get("site_id"))},this.isAdmin=function(){return"admin"===this.repository.model.get("site_role")},this.isReadOnly=function(){return"readonly"===this.repository.model.get("site_role")},this.isSuperAdmin=function(){return this.repository.model.get("is_super")},this.isPasswordChangeRequired=function(){return this.repository.model.get("requires_new_password")},this.isRememberMeEnabled=function(a){return!!this.preferences.model.get(a?p:o)},this.getSsoUsername=function(){return this.repository.model.get("ubic_name")||this.repository.model.get("ubic_uuid")},this.hasEnabledFor=function(){return!!this.repository.model.get("ubic_uuid")},this._login=function(b){return(new f).save(b)["catch"](function(b){return 400===b.status?a.reject(c.instant("ACCOUNT_NOTICE_LOGIN_INVALID_ERROR")):a.reject(c.instant("COMMON_NOTICE_REQUEST_ERROR"))})},this._updateRememberMePreferences=function(a,b){return j.model.set(b?p:o,!!a),j.model.save()}}])},{}],1707:[function(a,b,c){"use strict";angular.module("base-unifi").service("analytics",["$document","GoogleAnalyticsCloudKey","GoogleAnalyticsDemoKey","UseWebrtc",function(a,b,c,d){var e=!1;this.loadOnce=function(f){if(!e){if(d||f.get("simulator_demo_mode_enabled")){var g=f.get("simulator_demo_mode_enabled")?c:b,h=document.createElement("script");h.setAttribute("type","text/javascript"),h.text='(function (i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function (){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create", "'+g+'", "auto");',a[0].body.appendChild(h)}e=!0}}}])},{}],1708:[function(a,b,c){"use strict";angular.module("base-unifi").service("apiResults",["$translate","API_STRINGS",function(a,b){this.appendErrorMsg=function(a,b){var c=this.translateErrorMsg(b);return c?a+" "+c:a},this.translateErrorMsg=function(c){var d=this.getRawErrorMsg(c);if(d)return a.instant(b[d],this.sanitizeParams(c.data.meta))},this.sanitizeParams=function(a){var b={};return Object.keys(a).forEach(function(c){Number.isInteger(+c)?b["arg_"+c]=a[c]:b[c]=a[c]}),b},this.getRawErrorMsg=function(a){if(a&&a.data&&a.data.meta&&a.data.meta.msg)return a.data.meta.msg}}])},{}],1709:[function(a,b,c){"use strict";angular.module("base-unifi").service("appUrl",["device","UseWebrtc",function(a,b){this.buildUrl=function(c){var d=[];return b&&d.push("d="+a.getActiveDevice()),c.join("/")+(d.length?"?"+d.join("&"):"")}}])},{}],1710:[function(a,b,c){"use strict";angular.module("base-unifi").service("batchEdit",["BaseCollection","BatchModel",function(a,b){this.collection=new a,this.addBatch=function(c,d,e){e=e||{};var f=e.batchModel,g=e.model,h=e.collection;if(f){if(!(f instanceof b))throw new Error("Invalid batch model")}else f=new b;if(!h||angular.isArray(h))h=new a(h);else if(!(h instanceof a))throw new Error("Invalid collection");return g||(g=new h.model,g._isBatch=!0),f.setModelType(d),f.set({id:c,model:g,collection:h}),this.collection.add(f),f},this.getBatch=function(a){return this.collection.get(a)}}])},{}],1711:[function(a,b,c){"use strict";angular.module("base-unifi").service("binaryPrefix",[function(){var a={SI:{"":1,K:Math.pow(10,3),M:Math.pow(10,6),G:Math.pow(10,9),T:Math.pow(10,12),P:Math.pow(10,15),E:Math.pow(10,18),Z:Math.pow(10,21),Y:Math.pow(10,24)},IEC:{"":1,K:Math.pow(2,10),M:Math.pow(2,20),G:Math.pow(2,30),T:Math.pow(2,40),P:Math.pow(2,50),E:Math.pow(2,60),Z:Math.pow(2,70),Y:Math.pow(2,80)}},b=function(a){var b=3-Math.trunc(a).toString().length;return b<0&&(b=0),Number(a).toFixed(b)};this.getPrefixes=function(b){return a[b]||a.IEC},this.getBestMatch=function(b,c){if(""===b||0===b||isNaN(b))return{value:b,prefix:""};var d,e=a[c]||a.IEC,f={value:b,prefix:""};for(d in e)if(e[d]){if(b%e[d]!==0)break;f.prefix=d,f.value=b/e[d]}return f},this.parse=function(c,d,e){if(""===c||isNaN(c))return{value:c,prefix:""};var f,g,h=a[d]||a.IEC;c&&e&&(c*=8);for(g in h)if(h[g]&&(f=b(c/h[g]),f<1e3))break;return{value:Number(f),fixed:f,prefix:g}},this.normalizeToPrefix=function(b,c,d){if(isNaN(c)||null===c||0===c)return c;var e=a[d]||a.IEC;return c/e[b]}}])},{}],1712:[function(a,b,c){"use strict";angular.module("base-unifi").factory("ListDirective",["MixinContainer",function(a){var b=function(b,c,d){var e=b.charAt(0).toUpperCase()+b.slice(1),f=new a;return{addMixin:f.addMixin,scope:d||!1,controller:e+"ListController",controllerAs:b+"ListCtrl",bindToController:!0,restrict:"E",replace:!0,template:c,link:function(a,b,c,d){a.$on("$destroy",function(){d.destroyView()}),f.initMixins(a,b,c,d)}}};return b}])},{}],1713:[function(a,b,c){"use strict";angular.module("base-unifi").factory("MixinContainer",[function(){var a=function(){var a=[],b=function(b){if(!b.init)throw"Mixin must have init function defined";a.push(b)},c=function(b,c,d,e){a.forEach(function(a){a.init.call(a,b,c,d,e)})};return{addMixin:b,initMixins:c}};return a}])},{}],1714:[function(a,b,c){"use strict";angular.module("base-unifi").factory("PaginatedListDirective",["listSortEventDirectiveMixin","MixinContainer",function(a,b){var c=function(c,d,e){var f=c.charAt(0).toUpperCase()+c.slice(1),g=new b;return{addMixin:g.addMixin,scope:angular.extend({},e||{},{localState:"=?unifi"+f+"ListLocalState",localStateKey:"=?unifi"+f+"ListLocalStateKey",sortKey:"=?unifi"+f+"ListSortKey"}),controller:f+"ListController",controllerAs:c+"ListCtrl",bindToController:!0,replace:!0,template:d,link:function(b,d,e,h){e["unifi"+f+"ListSortKey"]&&g.addMixin(a),b.$watch(function(){return h.currentPage},function(a){h.onPageChange(a)}),b.$watch(function(){return h.rowsPerPage},function(a){h.onPageSizeChange(a,c)}),b.$on("$destroy",function(){h.destroyView()}),g.initMixins(b,d,e,h)}}};return c}])},{}],1715:[function(a,b,c){"use strict";angular.module("base-unifi").service("bypass",["preferences",function(a){this.isEnabled=function(b){return!!a.model.get(b)},this.enable=function(b){return a.model.set(b,!0),this._save()},this.disable=function(b){return a.model.unset(b),this._save()},this._save=function(){return a.model.save()}}])},{}],1716:[function(a,b,c){"use strict";angular.module("base-unifi").service("clipboardUtils",["$window",function(a){this.copyToClipboard=function(b){angular.element("<textarea/>").css({opacity:"0",position:"fixed"}).text(b).appendTo(angular.element(a.document.body)).select().each(function(){document.execCommand("copy")}).remove()}}])},{}],1717:[function(a,b,c){"use strict";angular.module("base-unifi").factory("CountryCollection",["CORSCollection","CountryModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({_isActiveSiteOptional:!0,model:b,siteUrl:"stat/ccode",comparator:"name"})}])},{}],1718:[function(a,b,c){"use strict";angular.module("base-unifi").factory("HotspotPackageCollection",["CORSCollection","HotspotPackageModel","deepCopyMixin","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f,g){return a.extend(c).extend(d).extend(e).extend(f).extend(g).extend({model:b,siteUrl:"rest/hotspotpackage?_sort=index"})}])},{}],1719:[function(a,b,c){"use strict";angular.module("base-unifi").factory("ReportCollection",["CORSCollection","CORSModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({constructor:function(b){if(a.apply(this,arguments),!b)throw new Error("Cannot instantiate without a type.");this.type=b},model:b,setInterval:function(a){this.interval=a},setAttrs:function(a){this.attrs=a},setMac:function(a){this.mac=a},getMac:function(){return this.mac},setDateInterval:function(a,b){this.start=a,this.end=b},siteUrl:function(){return"stat/report/"+this.interval.url+"."+this.type},sync:function(b,c,d){if(d=d||{},d.interval&&(this.interval=d.interval),"read"===b){d.type="POST";var e={attrs:this.attrs,start:this.start,end:this.end};"sw"===this.type&&this.mac&&(e.mac=this.mac),d.data=JSON.stringify(e)}return a.prototype.sync.call(this,b,c,d)}})}])},{}],1720:[function(a,b,c){"use strict";angular.module("base-unifi").factory("SiteCollection",["UnifiAPIBasePath","CORSCollection","SiteModel","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return b.extend(d).extend(e).extend(f).extend({model:c,skipContextBinding:!0,comparator:"desc",url:function(){return a+"/"+(this.extended?"stat":"self")+"/sites"}})}])},{}],1721:[function(a,b,c){"use strict";angular.module("base-unifi").factory("SiteHealthCollection",["CORSCollection","SiteHealthModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(c).extend(d).extend(e).extend(f).extend({model:b,siteUrl:"stat/health"})}])},{}],1722:[function(a,b,c){"use strict";angular.module("base-unifi").factory("listCollapsibleColumnControllerMixin",["localStorageFailSafe","LocalStorageBooleanValue",function(a,b){return function(c){angular.extend(c,{collapsibleColumnKeyStorage:{},isColumnCollapsed:function(c){return this.collapsibleColumnKeyStorage[c]||(this.collapsibleColumnKeyStorage[c]=new b(a,c)),this.collapsibleColumnKeyStorage[c].hydrate(),this.collapsibleColumnKeyStorage[c].getValue()}})}}])},{}],1723:[function(a,b,c){"use strict";angular.module("base-unifi").service("countries",["BaseCollectionRepository","CountryCollection",function(a,b){this.repository=new a(new b),this.getCountryCodes=function(){return this.repository.collection.map(function(a){return a.get("key")})},this.getCountryNamesMap=function(){return this.repository.collection.reduce(function(a,b){return a[b.get("key")]=b.get("name"),a},{})}}])},{}],1724:[function(a,b,c){"use strict";var d=a("moment");angular.module("base-unifi").service("dateIntervalUtils",["$q","$state",function(a,b){this.calculateEnd=function(a,b){return d(a,"x").add(b.value,b.unit).format("x")},this.calculateStart=function(a,b){return d(a,"x").subtract(b.value,b.unit).format("x")},this.preventFuture=function(a,b){var c=this.calculateEnd(a,b),e=d().add(1,"day").startOf("day").format("x");return c>e?d(e,"x").subtract(b.value,b.unit).format("x"):a},this.updateStateWithNewInterval=function(c,d){var e=angular.extend({},b.params,{start:c,interval:d.name});return e.start!==b.params.start||e.interval!==b.params.interval?b.go(b.current.name,e,{notify:!1}):a.reject()}}])},{moment:238}],1725:[function(a,b,c){
"use strict";angular.module("base-unifi").service("eventHandlersDirectiveMixin",[function(){this.init=function(a,b,c,d){d.addEventHandlers(),a.$on("$destroy",function(){d.removeEventHandlers()})}}])},{}],1726:[function(a,b,c){"use strict";angular.module("base-unifi").service("listSearchDirectiveMixin",[function(){this.init=function(a,b,c,d){if(!angular.isFunction(d.onSearchQueryChange))throw new Error("Missing ctrl.onSearchQueryChange");a.$watch(function(){return d.searchQuery},function(a){d.onSearchQueryChange(a)}),a.$watch(function(){return d.view&&d.view.isRefreshing()},function(a){d.isRefreshing=a})}}])},{}],1727:[function(a,b,c){"use strict";angular.module("base-unifi").service("listSortEventDirectiveMixin",[function(){this.init=function(a,b,c,d){if(!angular.isFunction(d.onSortChange))throw new Error("Missing ctrl.onSortChange");a.$watch(function(){if(d.view&&d.view.sortBy)return{sortBy:d.view.sortBy,sortDesc:d.view.sortReverse[d.view.sortBy]}},function(a){a&&d.onSortChange(a)},!0)}}])},{}],1728:[function(a,b,c){"use strict";angular.module("base-unifi").service("downloadUrl",["$document","$timeout",function(a,b){this.clickFakeLink=function(c,d,e,f){var g=a[0].createElement("a");b(function(){g.download=e,g.href=d,g.target=f||"",c.parentNode.appendChild(g),g.click(),g.remove()})}}])},{}],1729:[function(a,b,c){"use strict";angular.module("base-unifi").service("editAccount",["frame",function(a){this.editAccount=function(){a.show("editAccount")}}])},{}],1730:[function(a,b,c){"use strict";angular.module("base-unifi").service("featureFlag",["$injector","semanticVersion","system",function(a,b,c){var d;try{d=a.get("FLAGS")}catch(e){d={}}this.isEnabled=function(a){var e=d[a];if(angular.isUndefined(e))throw"Feature flag "+a+" is not defined";var f=angular.isString(e);return f?b.satisfies(c.getControllerVersion(),e):!!e}}])},{}],1731:[function(a,b,c){"use strict";angular.module("base-unifi").service("fileUtils",["$window","$q","$http","$timeout","UseWebrtc",function(a,b,c,d,e){var f=function(e,f){return c.get(e,{responseType:"arraybuffer",processData:!1,withCredentials:!0,withWebRTC:!0}).then(function(c){return c&&c.arraybuffer?void d(function(){var b=a.URL.createObjectURL(new Blob([c.arraybuffer],{type:"application/octet-stream"})),e=angular.element("<a />");e.attr("id","webRtcDownloadLink"),e.attr("href",b),e.attr("download",f),e.css("display","none"),angular.element(document.body).append(e),e[0].click(),d(function(){e.remove()},100)},0):b.reject()})},g=function(c){return a.location.href=c,b.when()};this.download=function(a,b){return e?f(a,b):g(a)},this.readLocalToUrl=function(a){var c=b.defer(),d=new FileReader;return d.onerror=function(){c.reject()},d.onload=function(){c.resolve(d.result)},d.readAsDataURL(a),c.promise}}])},{}],1732:[function(a,b,c){"use strict";angular.module("base-unifi").factory("BaseSearchableModelFilter",["BaseModelFilter",function(a){function b(){a.call(this),this.searchQuery="",this.searchableAttributes=[],this.test=this.test.bind(this)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b.prototype.getTest=function(){return this.test},b.prototype.test=function(a){if(this.supplementalFunction&&!this.supplementalFunction(a))return!1;var b=this.search(a);return b===!0||void 0===b},b.prototype.isFiltered=function(){return this.searchQuery.length>0},b.prototype.search=function(a){var b=this.searchQuery?this.searchQuery.toLowerCase().split(" "):[];return b.length?this.testModelAttributes(a,this.searchableAttributes,b):void 0},b.prototype.updateSearchQuery=function(a){this.searchQuery=a?a.trim():""},b.prototype.setSupplementalFunction=function(a){this.supplementalFunction=a},b.prototype.clearSupplementalFunction=function(){this.supplementalFunction=null},b}])},{}],1733:[function(a,b,c){"use strict";angular.module("base-unifi").service("hotspotPackages",["BaseCollectionRepository","HotspotPackageCollection","HotspotPackageModel","HOTSPOT_PACKAGES_DEFAULTS",function(a,b,c,d){this.repository=new a(new b),this.clonePackagesWithDefaults=function(){var a=this.repository.collection.deepCopy();return 0===this.repository.collection.models.length&&d.forEach(function(b){a.add(new c(b))}),a}}])},{}],1734:[function(a,b,c){"use strict";angular.module("base-unifi").service("i18nLocalStorage",["localStorageFailSafe","LocalStorageValue",function(a,b){var c=new b(a,"PREFERRED_LANGUAGE");return c.hydrate(),{get:function(){return c.getValue()},put:function(a,b){c.setValue(b)}}}])},{}],1735:[function(a,b,c){"use strict";angular.module("base-unifi").service("lambda",[function(){this.objectToEntries=function(a){return Object.keys(a).reduce(function(b,c){return b.push({key:c,value:a[c]}),b},[])}}])},{}],1736:[function(a,b,c){"use strict";angular.module("base-unifi").service("listState",["$rootScope","$state","$stateParams","stateChangeInterceptor","EVENTS",function(a,b,c,d,e){this.addFilter=function(f,g){if(!d.isStateChanging)if(this._isTransacting)this._transactionFilters[f]=g;else{var h=angular.extend({},c);h[f]=g,a.$broadcast(e.LIST_STATE_CHANGE_START),b.go(b.current.name,h,{notify:!1}).then(function(){a.$broadcast(e.LIST_STATE_CHANGE_SUCCESS)})}},this.removeFilter=function(f){if(!d.isStateChanging)if(this._isTransacting)this._transactionFilters[f]=void 0;else{var g=angular.extend({},c);g[f]=void 0,a.$broadcast(e.LIST_STATE_CHANGE_START),b.go(b.current.name,g,{notify:!1}).then(function(){a.$broadcast(e.LIST_STATE_CHANGE_SUCCESS)})}},this.extendFilters=function(f){if(!d.isStateChanging){var g=angular.extend({},c,f);a.$broadcast(e.LIST_STATE_CHANGE_START),b.go(b.current.name,g,{notify:!1}).then(function(){a.$broadcast(e.LIST_STATE_CHANGE_SUCCESS)})}},this.getFilter=function(a){return c[a]},this.beginTransaction=function(){if(this._isTransacting)throw new Error("A transaction is already in progress");this._isTransacting=!0,this._transactionFilters={}},this.commitTransaction=function(){if(!this._isTransacting)throw new Error("No transaction has been started");this.extendFilters(this._transactionFilters),this.clearTransaction()},this.clearTransaction=function(){this._isTransacting=!1,delete this._transactionFilters}}])},{}],1737:[function(a,b,c){"use strict";angular.module("base-unifi").service("mathUtils",[function(){function a(a,b,c){return"undefined"==typeof c||0===+c?Math[a](b):(b=+b,c=+c,isNaN(b)||"number"!=typeof c||c%1!==0?NaN:(b=b.toString().split("e"),b=Math[a](+(b[0]+"e"+(b[1]?+b[1]-c:-c))),b=b.toString().split("e"),+(b[0]+"e"+(b[1]?+b[1]+c:c))))}this.round10=function(b,c){return a("round",b,c)},this.floor10=function(b,c){return a("floor",b,c)},this.ceil10=function(b,c){return a("ceil",b,c)}}])},{}],1738:[function(a,b,c){"use strict";var d=a("merge-defaults");angular.module("base-unifi").service("mergeDefaults",[function(){return d}])},{"merge-defaults":233}],1739:[function(a,b,c){"use strict";angular.module("base-unifi").factory("getNestedMixin",["Backbone",function(a){return{_hasGetNestedMixin:!0,getNested:function(b,c){angular.isString(b)&&(b=b.split("."));for(var d=b.shift(),e=this.get(d,c);(d=b.shift())&&void 0!==e;)e=e instanceof a.Model||e instanceof a.Collection?e.get(d,c):e[d];return e}}}])},{}],1740:[function(a,b,c){"use strict";angular.module("base-unifi").factory("modelDelegateMixin",[function(){return{_hasDelegateMixin:!0,get:function(a,b){var c=this._getDelegateToMixinOption("get",b);return this._delegate("get",c,a)},set:function(a,b,c){var d;"object"==typeof a?(d=a,c=b):(d={})[a]=b;var e=this._getDelegateToMixinOption("set",c);return c=this._sanitizeDelegateOptions(c),this._delegate("set",e,d,c)},has:function(a,b){var c=this._getDelegateToMixinOption("has",b);return this._delegate("has",c,a)},unset:function(a,b){var c=this._getDelegateToMixinOption("unset",b);return b=this._sanitizeDelegateOptions(b),this._delegate("unset",c,a,b)},clear:function(a){var b=this._getDelegateToMixinOption("clear",a);return a=this._sanitizeDelegateOptions(a),this._delegate("clear",b,a)},save:function(a,b,c){var d;null===a||"object"==typeof a?(d=a,c=b):(d={})[a]=b;var e=this._getDelegateToMixinOption("save",c);return c=this._sanitizeDelegateOptions(c),this._delegate("save",e,d,c)},_delegate:function(a,b){var c=[].slice.call(arguments,2);if(b){if(this[b]&&this[b][a])return this[b][a].apply(this,c);throw new Error("Missing or invalid mixin: "+[b,a].join(":"))}var d=this._getDelegateFallback(this,a);return d[a].apply(this,c)},_sanitizeDelegateOptions:function(a){return a&&a.delegateTo&&(a=angular.extend({},a),delete a.delegateTo),a},_getDelegateToMixinOption:function(a,b){return b&&b.delegateTo||this["_default"+(a.charAt(0).toUpperCase()+a.substr(1))+"Mixin"]},_getDelegateFallback:function(a,b){if(this._delegateFallbackCache&&this._delegateFallbackCache[b])return this._delegateFallbackCache[b];var c=a.constructor.__super__;if(c)return c.constructor&&c.constructor.prototype&&c.constructor.prototype[b]&&c.constructor.prototype[b]!==this[b]?(this._delegateFallbackCache=this._delegateFallbackCache||{},this._delegateFallbackCache[b]=c.constructor.prototype,c.constructor.prototype):this._getDelegateFallback(c,b);throw new Error("Missing or invalid default method: "+b)},_clearDelegateFallbackCache:function(){this._delegateFallbackCache={}}}}])},{}],1741:[function(a,b,c){"use strict";angular.module("base-unifi").factory("pendingMixin",["$q",function(a){return{_hasPendingMixin:!0,_getPendingStorage:function(){return this._pendingStorage||(this._pendingStorage=this.clone(),this._pendingStorage.clear(),this._pendingStorage.on("all",this._delegatePendingTrigger,this)),this._pendingStorage},_delegatePendingTrigger:function(a,b,c,d){this.trigger("pending:"+a,b,c,d)},getPendingAttributes:function(){return this._pendingStorage?this._hasDeepCopyMixin?this._getPendingStorage().deepAttributes():this._getPendingStorage().attributes:{}},hasPendingChanges:function(){return this._pendingStorage&&!angular.equals({},this.getPendingAttributes())||!1},clearPendingChanges:function(a){if(this._pendingStorage){var b=Object.keys(this.getPendingAttributes());return this._pendingStorage.clear(a),this._pendingStorage.off("all",this._delegatePendingTrigger,this),delete this._pendingStorage,delete this._pendingGroups,a&&a.silent||this.trigger("pending:clear",this,b,a),!0}},savePendingChanges:function(a){var b=this.getPendingAttributes(),c=this._hasSavePartialMixin?"savePartial":"save";return this[c](b,a).then(function(){a&&a.silent||this.trigger("pending:save",this,Object.keys(b),a),this.clearPendingChanges()}.bind(this))},getPendingGroups:function(){return this._pendingGroups?Object.keys(this._pendingGroups):[]},getPendingGroup:function(a){if(this._pendingGroups&&this._pendingGroups[a])return this._pendingGroups[a]},hasPendingGroup:function(a){return!(!this._pendingGroups||!this._pendingGroups[a])},addPendingGroup:function(a,b,c){if(a)return this._pendingGroups=this._pendingGroups||{},this._pendingGroups[a]=Object.keys(b),c&&c.silent||this.trigger("pending:group:add",this,a,b,c),!0},clearPendingGroup:function(a,b){if(this._pendingGroups&&this._pendingGroups[a]){var c=angular.extend({},b||{},{delegateTo:"pending"}),d=this._pendingGroups[a];return d.forEach(function(a){this.unset(a,c)}.bind(this)),delete this._pendingGroups[a],b&&b.silent||this.trigger("pending:group:clear",this,a,d,b),!0}},pending:{get:function(a,b){return this.has(a,{delegateTo:"pending"})?this._getPendingStorage().get(a,b):this.get(a,b)},set:function(a,b){return this._getPendingStorage().set(a,b),this.addPendingGroup((b||{}).pendingGroup,a),this},has:function(a,b){return this._getPendingStorage().has(a,b)},unset:function(a,b){return this._getPendingStorage().unset(a,b),this},clear:function(){return this._getPendingStorage().clear(),this},save:function(b,c){return this._getPendingStorage().set(b,c),this.addPendingGroup((c||{}).pendingGroup,b),a.when()}}}}])},{}],1742:[function(a,b,c){"use strict";angular.module("base-unifi").factory("savePartialMixin",[function(){return{_hasSavePartialMixin:!0,savePartial:function(a,b){return b=b||{},b.data=JSON.stringify(a),this.save(a,b)}}}])},{}],1743:[function(a,b,c){"use strict";angular.module("base-unifi").factory("siteUrlWithinMixin",[function(){return{_hasSiteUrlWithinMixin:!0,_within:void 0,getWithin:function(){return this._within},setWithin:function(a){this._within=a},updateWithin:function(a){this.getWithin()!==a&&(this.setWithin(a),this._hasResolveMixin&&this.invalidate())},url:function(){if(!this._hasSiteUrlMixin)throw new Error("Cannot call without siteUrlMixin");var a=this.buildUrl();return this._within&&(a+="?within="+this._within),a}}}])},{}],1744:[function(a,b,c){"use strict";angular.module("base-unifi").factory("AccountModel",["UnifiAPISelfPath","UnifiAPIBasePath","CORSModel","siteUrlMixin","structureMixin","resolveMixin","deepCopyMixin","webrtcMixin","site",function(a,b,c,d,e,f,g,h,i){return c.extend(d).extend(e).extend(f).extend(g).extend(h).extend({idAttribute:"admin_id",siteUrl:"self",defaults:{networkconf_id:"all"},url:function(){return i.getActiveSite()?this.buildUrl({id:null}):a}})}])},{}],1745:[function(a,b,c){"use strict";angular.module("base-unifi").factory("BackupMgrModel",["CORSModel","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d){return a.extend(b).extend(c).extend(d).extend({_isActiveSiteOptional:!0,siteUrl:"cmd/backup"})}])},{}],1746:[function(a,b,c){"use strict";angular.module("base-unifi").factory("BatchModel",["CORSModel","savePartialMixin","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(e).extend({isBatch:!0,siteUrl:function(){throw new Error("You must override siteUrl")},initialize:function(a){a&&(this._addModelEventHandlers(this,a.model),this._addCollectionEventHandlers(this,a.collection)),this.on("change:model",this._addModelEventHandlers,this),this.on("change:collection",this._addCollectionEventHandlers,this)},_addModelEventHandlers:function(a,b){var c=this.previous("model");c&&(c.off("change",this._onModelChange,this),c.off("pending:change",this._onModelPendingChange,this)),b&&(b.on("change",this._onModelChange,this),b.on("pending:change",this._onModelPendingChange,this))},_addCollectionEventHandlers:function(a,b){var c=this.previous("collection");c&&c.off("add remove change reset",this._onCollectionChange,this),b&&b.on("add remove change reset",this._onCollectionChange,this)},_onModelChange:function(){this.trigger("change change:model")},_onModelPendingChange:function(){this.trigger("change pending:change")},_onCollectionChange:function(){this.trigger("change change:collection")},setModelType:function(a){this.modelType=a},hasPendingChanges:function(){var a=this.get("model"),b=this.get("collection");return!!(a&&a._hasPendingMixin&&a.hasPendingChanges()&&b&&b.length)},clearPendingChanges:function(){var a=this.get("model");a&&a._hasPendingMixin&&a.clearPendingChanges()},_getResponseByModel:function(a,b){return a[b.id]},parse:function(a,b){if(b&&b.parse===!0){var c=d.parse.call(this,a);a=this.attributes,a.success=[],a.error=[],this.get("collection").each(function(b){var e=this._getResponseByModel(c,b);if(e&&e.meta&&"ok"===e.meta.rc){a.success.push(b.id);var f=d.parse.call(b,e);b.set(f)}else a.error.push({id:b.id,data:e})}.bind(this))}return a},save:function(b,c){return c=c||{},c.parse=!0,a.prototype.save.call(this,b,c)},sync:function(b,c,d){return d=d||{},"update"===b&&(d.type="POST"),a.prototype.sync.call(this,b,c,d)},url:function(){return this.buildUrl({id:void 0})}})}])},{}],1747:[function(a,b,c){"use strict";angular.module("base-unifi").factory("ChangeSiteModel",["CORSModel","UnifiAPISelfPath","webrtcMixin",function(a,b,c){return a.extend(c).extend({url:b,save:function(b,c){return c=c||{},c.type="PUT",a.prototype.save.call(this,b,c)}})}])},{}],1748:[function(a,b,c){"use strict";angular.module("base-unifi").factory("CountryModel",["BaseModel",function(a){return a.extend({idAttribute:"code"})}])},{}],1749:[function(a,b,c){"use strict";angular.module("base-unifi").factory("EditAccountModel",["CORSModel","UnifiAPISelfPath","webrtcMixin",function(a,b,c){return a.extend(c).extend({url:b,save:function(b,c){return c=c||{},c.type="PUT",a.prototype.save.call(this,b,c)}})}])},{}],1750:[function(a,b,c){"use strict";angular.module("base-unifi").factory("HotspotMgrModel",["CORSModel","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d){return a.extend(b).extend(c).extend(d).extend({siteUrl:"cmd/hotspot"})}])},{}],1751:[function(a,b,c){"use strict";angular.module("base-unifi").factory("HotspotPackageModel",["CORSModel","siteUrlMixin","structureMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({idAttribute:"_id",siteUrl:"rest/hotspotpackage"})}])},{}],1752:[function(a,b,c){"use strict";angular.module("base-unifi").factory("LoginModel",["CORSModel","UnifiAPIBasePath","webrtcMixin",function(a,b,c){return a.extend(c).extend({url:b+"/login"})}])},{}],1753:[function(a,b,c){"use strict";angular.module("base-unifi").factory("LogoutModel",["CORSModel","UnifiAPIBasePath","webrtcMixin",function(a,b,c){return a.extend(c).extend({url:b+"/logout"})}])},{}],1754:[function(a,b,c){"use strict";angular.module("base-unifi").factory("PreferencesModel",["Backbone","BaseModel","deepCopyMixin",function(a,b,c){return b.extend(c).extend({localStorage:new a.LocalStorage("unifi-preferences"),defaults:{rowsPerPage:null,rowsPerPropertyPanel:null},getRowsPerPage:function(a){var b="rowsPerPage"+(a?":"+a:"");return this.get(b)},updateRowsPerPage:function(a,b){var c="rowsPerPage"+(b?":"+b:"");return this.save(c,a)},getRowsPerPropertyPanel:function(a){var b="rowsPerPropertyPanel"+(a?":"+a:"");return this.get(b)},updateRowsPerPropertyPanel:function(a,b){var c="rowsPerPropertyPanel"+(b?":"+b:"");return this.save(c,a)}})}])},{}],1755:[function(a,b,c){"use strict";angular.module("base-unifi").factory("RecoverPasswordMgrModel",["CORSModel","structureMixin","UnifiAPIBasePath",function(a,b,c){return a.extend(b).extend({url:c+"/recover"})}])},{}],1756:[function(a,b,c){"use strict";angular.module("base-unifi").factory("SdnMgrModel",["CORSModel","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d){return a.extend(b).extend(c).extend(d).extend({_isActiveSiteOptional:!0,siteUrl:"cmd/sdn"})}])},{}],1757:[function(a,b,c){"use strict";angular.module("base-unifi").factory("SdnModel",["CORSModel","deepCopyMixin","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(b).extend(c).extend(d).extend(e).extend(f).extend({siteUrl:"stat/sdn"})}])},{}],1758:[function(a,b,c){"use strict";angular.module("base-unifi").factory("SiteHealthModel",["CORSAssociatedModel","webrtcMixin",function(a,b){return a.extend(b).extend({idAttribute:"subsystem"})}])},{}],1759:[function(a,b,c){"use strict";angular.module("base-unifi").factory("SiteModel",["SiteHealthModel","Backbone","BaseCollection","CORSAssociatedModel","structureMixin","getNestedMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e,f,g,h){return d.extend(e).extend(f).extend(g).extend(h).extend({idAttribute:"_id",modelType:"site",relations:[{type:b.Many,key:"health",collectionType:c,relatedModel:a}],getDisplayName:function(){return this.get("desc")||this.get("name")}})}])},{}],1760:[function(a,b,c){"use strict";angular.module("base-unifi").factory("StatusModel",["UnifiAPIStatusPath","CORSModel","getNestedMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e){return b.extend(c).extend(d).extend(e).extend({url:a,skipTimeout:!0})}])},{}],1761:[function(a,b,c){"use strict";angular.module("base-unifi").factory("SystemInfoModel",["CORSModel","siteUrlMixin","structureMixin","resolveMixin","deepCopyMixin","webrtcMixin",function(a,b,c,d,e,f){return a.extend(b).extend(c).extend(d).extend(e).extend(f).extend({_isActiveSiteOptional:!0,siteUrl:"stat/sysinfo"})}])},{}],1762:[function(a,b,c){"use strict";angular.module("base-unifi").factory("SystemMgrModel",["CORSModel","siteUrlMixin","structureMixin","webrtcMixin",function(a,b,c,d){return a.extend(b).extend(c).extend(d).extend({_isActiveSiteOptional:!0,siteUrl:"cmd/system"})}])},{}],1763:[function(a,b,c){"use strict";angular.module("base-unifi").factory("UbicSsoModel",["CORSModel","structureMixin","webrtcMixin","UnifiAPIBasePath","UseWebrtc","$http",function(a,b,c,d,e,f){return a.extend(b).extend(c).extend({url:d+"/self/ubic_sso",destroy:function(){return f["delete"](this.url,{withCredentials:!0,withWebRTC:e,headers:{"X-Requested-With":"XMLHttpRequest"}})}})}])},{}],1764:[function(a,b,c){"use strict";angular.module("base-unifi").factory("UpdateProgressModel",["$q","CORSModel","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin",function(a,b,c,d,e,f){return b.extend(c).extend(d).extend(e).extend(f).extend({_isActiveSiteOptional:!0,siteUrl:"stat/updateprogress"})}])},{}],1765:[function(a,b,c){"use strict";angular.module("base-unifi").service("polls",["$q","ModelPoll",function(a,b){this.polls={},this.createModelPoll=function(c,d,e){return this.polls[c]?a.reject(this.polls[c]):(this.polls[c]=new b(angular.extend({model:d},e)),a.when(this.polls[c]))},this.start=function(a){var b=this.polls[a];return!!b&&b.start()},this.stop=function(a){var b=this.polls[a];return!!b&&b.stop()},this.destroy=function(a){var b=this.stop(a);return delete this.polls[a],b}}])},{}],1766:[function(a,b,c){"use strict";angular.module("base-unifi").factory("BasePoll",["$interval",function(a){var b=function(a){this.attrs=a,this.tick=this.tick.bind(this)};return b.prototype.isRunning=function(){return!!this._isRunning},b.prototype.start=function(){if(!this._isRunning&&(this._isRunning=!0))return this.interval=a(this.tick,this.attrs.delay,this.attrs.count),this.interval.then(function(){this._isRunning=!1}.bind(this)),this.interval;throw new Error("The poll is already running")},b.prototype.stop=function(){if(this._isRunning&&!(this._isRunning=!1))return a.cancel(this.interval);throw new Error("The poll is not running")},b.prototype.tick=function(){throw new Error("The tick function must be extended")},b}])},{}],1767:[function(a,b,c){"use strict";angular.module("base-unifi").factory("ModelPoll",["BasePoll",function(a){var b=function(b){this.model=b.model,delete b.model,a.call(this,b)};return b.prototype=new a,b.prototype.getModel=function(){return this.model},b.prototype.tick=function(){this.model.resolve({forceFetch:this.attrs.forceFetch||!1}).then(function(a){this.attrs.onSuccess&&this.attrs.onSuccess(a)}.bind(this))["catch"](function(a){this.attrs.onError&&this.attrs.onError(a)}.bind(this))},b}])},{}],1768:[function(a,b,c){"use strict";angular.module("base-unifi").factory("queryString",["$rootScope","$location","$state","EVENTS",function(a,b,c,d){function e(){this.queryStringBackups=[],this._stateChangeStartHandler=this._stateChangeStartHandler.bind(this),this._stateChangeSuccessHandler=this._stateChangeSuccessHandler.bind(this),a.$on("$stateChangeStart",this._stateChangeStartHandler),a.$on("$stateChangeSuccess",this._stateChangeSuccessHandler),a.$on(d.LIST_STATE_CHANGE_START,this._stateChangeStartHandler),a.$on(d.LIST_STATE_CHANGE_SUCCESS,this._stateChangeSuccessHandler)}return e.prototype._stateChangeStartHandler=function(a,b,c,d,e){this.queryStringBackups.push(!e||angular.equals({},e)||c.site===e.site?angular.extend({},this.get()||{}):void 0)},e.prototype._stateChangeSuccessHandler=function(){var a=this.get(),b=this.queryStringBackups.pop();(a||b)&&this.set(angular.extend({},b||{},a||{}))},e.prototype.set=function(){c.current.reloadOnSearch=!1,b.search.apply(b,arguments),c.current.reloadOnSearch=void 0},e.prototype.get=function(){var a=b.search();return angular.equals({},a)?void 0:a},e.prototype.remove=function(a){this.set(a,null)},e.prototype.clear=function(){b.url(b.path())},new e}])},{}],1769:[function(a,b,c){"use strict";angular.module("base-unifi").service("refresh",["$rootScope","$interval","$q","account","preferences","REFRESH_RATES","EVENTS",function(a,b,c,d,e,f,g){var h=[];this.refresh=function(){!this.isRefreshing&&d.isLoggedIn()&&(this.isRefreshing=!0,a.$broadcast(g.APP_REFRESH,h),c.all(h)["finally"](function(){h=[],this.isRefreshing=!1}.bind(this)))},this.getRefreshRateById=function(a){return f.find(function(b){return b.id===a})},this.getRefreshRate=function(){return this.getRefreshRateById(this.temporaryRefreshRate||e.model.get("refreshRate"))},this.updateRefreshRate=function(a){var b=this.getRefreshRateById(a),c=!1;b&&(b.isTemporary&&!e.model.get("refreshRateRememberAll")?(this.temporaryRefreshRate=a,c=void 0===e.model.get("refreshRate"),e.model.save({refreshRate:void 0})):(c=void 0!==this.temporaryRefreshRate,this.temporaryRefreshRate=void 0,e.model.save({refreshRate:a}))),c&&e.model.trigger("change:refreshRate")},this.cancelRefreshInterval=function(){this.refreshInterval&&(b.cancel(this.refreshInterval),this.refreshInterval=null)},this.onRefreshRateChange=function(){this.cancelRefreshInterval();var a=this.getRefreshRate();a&&a.seconds&&(this.refreshInterval=b(function(){this.refresh()}.bind(this),1e3*a.seconds))},this.addEventHandlers=function(){e.model.on("change:refreshRate",this.onRefreshRateChange,this)},this.removeEventHandlers=function(){e.model.off("change:refreshRate",this.onRefreshRateChange,this)},a.$on("$destroy",function(){this.cancelRefreshInterval(),this.removeEventHandlers()}.bind(this)),this.addEventHandlers(),this.onRefreshRateChange()}])},{}],1770:[function(a,b,c){"use strict";angular.module("base-unifi").service("repositoryUtils",["$injector","$window",function(a,b){this.register=function(a){this.getRepository(a).register()}.bind(this),this.registerGroup=function(a){return a.map(this.register)}.bind(this),this.unregister=function(a){this.getRepository(a).unregister()}.bind(this),this.unregisterGroup=function(a){return a.map(this.unregister)}.bind(this),this.getRepository=function(b){var c,d;return angular.isObject(b)?(c=a.get(b.service),d=c.repositories[b.repository]):(c=a.get(b),d=c.repository),d},this.getRegisterCount=function(a,b){var c=this.getRepository(a),d=c._registration;return b?d.items[b].count:d.count},this.fetchRepositories=function(a){return a.map(function(a){return this.getRepository(a).fetch()},this)},b.getRegisterCount=this.getRegisterCount.bind(this)}])},{}],1771:[function(a,b,c){"use strict";angular.module("base-unifi").service("translateResolver",["$translate","$translatePartialLoader",function(a,b){this.resolve=function(){return Array.from(arguments).forEach(function(a){b.addPart(a)}),a.refresh()}}])},{}],1772:[function(a,b,c){"use strict";angular.module("base-unifi").service("urlLocaleResolver",["$q","$translate","queryString",function(a,b,c){this.resolve=function(){var d=(c.get()||{}).locale,e=b.use();if(d){c.remove("locale");var f=d.replace("-","_");if(f!==e)return b.use(f)}return a.when()}}])},{}],1773:[function(a,b,c){"use strict";angular.module("base-unifi").service("webrtcResolver",["$q","device","unifiWebRtcConnector","UseWebrtc",function(a,b,c,d){this.resolve=function(){return d?c.isConnected()||c.connect(b.getActiveDevice()):a.when()}}])},{}],1774:[function(a,b,c){"use strict";angular.module("base-unifi").service("sdn",["$q","$translate","account","apiResults","polls","BaseModelRepository","SdnMgrModel","SdnModel","UbicSsoModel","SDN_STATES",function(a,b,c,d,e,f,g,h,i,j){this.repository=new f(new h),this.fetchWithPolling=function(){return a(function(a){var b="sdn.refresh";e.createModelPoll(b,this.repository.model,{forceFetch:!0,delay:2e3,onSuccess:function(){this.isConnecting()||(e.destroy(b),a())}.bind(this)}).then(function(a){a.start()})}.bind(this))},this.checkCredentials=function(c){return(new g).save({cmd:"check-credentials",ubic_username:c.username,ubic_password:c.password})["catch"](function(c){return a.reject(d.appendErrorMsg(b.instant("SETTINGS_CLOUD_ACCESS_CHECK_CREDENTIALS_ERROR"),c))})},this.registerSuperAdminWithUuid=function(a){return(new g).save({cmd:"register",ubic_username:a.username,ubic_uuid:a.uuid})},this.registerSuperAdminWithPassword=function(a){return(new g).save({cmd:"register",ubic_username:a.username,ubic_password:a.password})},this.register=function(e){var f=null;f=c.isSuperAdmin()?this.registerSuperAdminWithPassword(e):(new i).save({ubic_username:e.username,x_ubic_password:e.password});var g=[f,this.fetchWithPolling()];return a.all(g).then(function(){return c.repository.refresh()})["catch"](function(c){return a.reject(d.appendErrorMsg(b.instant("SETTINGS_CLOUD_ACCESS_REGISTER_ERROR"),c))})},this.unregister=function(){var e=null;return e=c.isSuperAdmin()?(new g).save({cmd:"unregister"}):(new i).destroy(),e.then(function(){return this.fetchWithPolling()}.bind(this)).then(function(){return c.repository.refresh()})["catch"](function(c){return a.reject(d.appendErrorMsg(b.instant("SETTINGS_CLOUD_ACCESS_UNREGISTER_ERROR"),c))})},this.getStatus=function(){return this.repository.model.get("connecting")?j.CONNECTING:this.repository.model.get("enabled")?this.repository.model.get("connected")?j.CONNECTED:this.repository.model.get("registered")?j.DISCONNECTED:j.NOT_REGISTERED:j.DISABLED},this.isConnecting=function(){return this.getStatus()===j.CONNECTING},this.isCloudKey=function(){return!!this.repository.model.get("is_cloud_key")},this.isRegistered=function(){return this.repository.model.get("registered")},this.isEnabled=function(){return this.repository.model.get("enabled")}}])},{}],1775:[function(a,b,c){"use strict";angular.module("base-unifi").service("siteHealth",["BaseCollectionRepository","SiteHealthCollection",function(a,b){this.repository=new a(new b)}])},{}],1776:[function(a,b,c){"use strict";var d=a("moment");angular.module("base-unifi").service("siteUtils",["$q","$rootScope","$translate","apiResults","BackupMgrModel","EVENTS","fileUtils","site","SiteMgrModel","sites","system","UnifiFileBasePath",function(a,b,c,e,f,g,h,i,j,k,l,m){this.getDefaultSiteName=function(){var a=k.repository.collection.findWhere({attr_hidden_id:"default"});return a?a.get("name"):void 0},this.doesSiteExist=function(a){return!!k.repository.collection.findWhere({name:a})},this.getActiveSite=function(){return k.repository.collection.findWhere({name:i.getActiveSite()})},this.updateActiveSiteDesc=function(b){var d=this.getActiveSite();if(!d)throw new Error("Unable to update desc without active site");return(new j).save({desc:b,cmd:"update-site"}).then(function(){return d.set({desc:b}),a.when(c.instant("SETTINGS_SITE_UPDATE_DESC_SUCCESS"))})["catch"](function(b){return a.reject(e.appendErrorMsg(c.instant("SETTINGS_SITE_UPDATE_DESC_ERROR"),b))})},this.addSite=function(d){return(new j).save({desc:d.get("desc"),cmd:"add-site"}).then(function(e){return d.set(d.parse(e.data)),b.$broadcast(g.SITE_ADDED,d),a.when(c.instant("SITE_ACTIONS_ADD_SUCCESS",{siteDesc:d.get("desc")}))})["catch"](function(b){return a.reject(e.appendErrorMsg(c.instant("SITE_ACTIONS_ADD_ERROR",{siteDesc:d.get("desc")}),b))})},this.importSite=function(d,h){return(new f).save({backup_id:h,cmd:"import-site",site_desc:d.get("desc")}).then(function(e){return d.set(d.parse(e.data)),b.$broadcast(g.SITE_ADDED,d),a.when(c.instant("SITE_ACTIONS_ADD_SUCCESS",{siteDesc:d.get("desc")}))})["catch"](function(b){return a.reject(e.appendErrorMsg(c.instant("SITE_ACTIONS_ADD_ERROR",{siteDesc:d.get("desc")}),b))})},this.deleteSite=function(d){return(new j).save({site:d.id,cmd:"delete-site"}).then(function(){return b.$broadcast(g.SITE_DELETED,d),a.when(c.instant("SETTINGS_SITE_DELETE_SUCCESS",{siteDesc:d.get("desc")}))})["catch"](function(b){return a.reject(e.appendErrorMsg(c.instant("SETTINGS_SITE_DELETE_ERROR",{siteDesc:d.get("desc")}),b))})},this.generateSiteExport=function(){var b=l.repository.model.get("version");return(new f).save({cmd:"export-site"}).then(function(e){return e&&e.data&&e.data.data?h.download(m+e.data.data[0].url,(b||"unifi-site-"+i.getActiveSite()+"-"+d(new Date).format("YYYYMMDD-HHmm"))+".unf").then(function(){return a.when(c.instant("SETTINGS_MAINTENANCE_DOWNLOAD_SITE_EXPORT_SUCCESS"))}):a.reject(c.instant("SETTINGS_MAINTENANCE_GENERATE_SITE_EXPORT_ERROR"));
})["catch"](function(b){return a.reject(e.appendErrorMsg(c.instant("SETTINGS_MAINTENANCE_GENERATE_SITE_EXPORT_ERROR"),b))})}}])},{moment:238}],1777:[function(a,b,c){"use strict";angular.module("base-unifi").service("sites",["$rootScope","BaseCollectionRepository","SiteCollection","EVENTS",function(a,b,c,d){this.repository=new b(new c),a.$on(d.SITE_ADDED,function(a,b){this.repository.collection.add(b,{merge:!0})}.bind(this)),a.$on(d.SITE_DELETED,function(a,b){this.repository.collection.remove(b)}.bind(this))}])},{}],1778:[function(a,b,c){"use strict";angular.module("base-unifi").service("sitesOverview",["$rootScope","BaseCollectionRepository","SiteCollection","EVENTS",function(a,b,c,d){var e=c.extend({extended:!0});this.repository=new b(new e),a.$on(d.SITE_ADDED,function(){this.repository.isRegistered()&&this.repository.refresh()}.bind(this)),a.$on(d.SITE_DELETED,function(a,b){this.repository.collection.remove(b)}.bind(this))}])},{}],1779:[function(a,b,c){"use strict";var d=a("moment");angular.module("base-unifi").service("statsUtils",["_","REPORT_DEFAULTS","TIME_INTERVALS",function(a,b,c){this.getTopItems=function(b,c,d,e,f){var g=b.sortBy(function(a){return a.get(d)||0}).reverse();return f&&(g=g.filter(f)),e&&(g=a.uniq(g,function(a){return a.get(e)})),g.slice(0,c)},this.fillWithPaddingDataPoints=function(a,b,c,d){if(a.length>0){for(var e=0,f=[],g=parseInt(c);g<=parseInt(d);g+=b.grain){var h=this.normalizeTime(g,b);e===a.length-1&&h>=a[e].x+b.grain||h<=a[e].x-b.grain?f.push({x:h}):e<a.length-1&&e++}var i=a.concat(f);return i.sort(function(a,b){return a.x-b.x}),i}return a},this.normalizeTime=function(a,b){return[c.WEEKLY,c.MONTHLY].indexOf(b)!==-1?d(a).add(1,"day").subtract(1,"second").startOf("day").valueOf():a}}])},{moment:238}],1780:[function(a,b,c){"use strict";angular.module("base-unifi").service("status",["$state","$location","polls","account","BaseModelRepository","StatusModel","ENV",function(a,b,c,d,e,f,g){this.repository=new e(new f),this.waitForRestart=function(){if(!this.isWaitingForRestart){this.isWaitingForRestart=!0;var e=new f,h="status.restart";c.createModelPoll(h,e,{delay:1500,count:100,forceFetch:!0,onSuccess:function(e){e.getNested("meta.up")&&(c.destroy(h),this.isWaitingForRestart=!1,d.logout(!0).then(function(){a.go(g.LOGIN_STATE,{redirect:b.url()})}))}.bind(this)}).then(function(a){a.start()})}}}])},{}],1781:[function(a,b,c){"use strict";var d=a("moment");angular.module("base-unifi").service("system",["$q","$translate","$window","analytics","apiResults","BackupMgrModel","fileUtils","polls","BaseModelRepository","GoogleMapsApiKey","SystemInfoModel","SystemMgrModel","UnifiFileBasePath","UpdateProgressModel","Upload","UseWebrtc","UPDATE_PROGRESS_STATUS","UPDATE_STATUS","UPDATE_STATUS_REFRESH",function(a,b,c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){this.updateStatusModel=new o,this.repository=new j(new l),this.repository.fetch=function(a){return j.prototype.fetch.call(this,a).then(function(a){return e.loadOnce(a)})},this.isCloudKey=function(){return!!this.repository.model.get("cloudkey_version")},this.isUnifiGo=function(){return this.repository.model.get("unifi_go_enabled")},this.isDemoMode=function(){return!!this.repository.model.get("simulator_demo_mode_enabled")},this.isCloudKeySdCardMounted=function(){return this.repository.model.get("cloudkey_sdcard_mounted")},this.setDebugLevel=function(c,d){return(new m).save({cmd:"set-param",key:"debug."+c,value:d}).then(function(){return this.repository.model.set("debug_"+c,d),a.when(b.instant("SETTINGS_MAINTENANCE_LOG_LEVEL_SUCCESS",{type:b.instant("SETTINGS_MAINTENANCE_LABEL_LOG_LEVEL_"+c.toUpperCase()).toLowerCase()}))}.bind(this))["catch"](function(d){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_LOG_LEVEL_ERROR",{type:b.instant("SETTINGS_MAINTENANCE_LABEL_LOG_LEVEL_"+c.toUpperCase()).toLowerCase()}),d))})},this.setDataRetention=function(c){return(new m).save({cmd:"set-param",key:"data_retention_days",value:c}).then(function(){return this.repository.model.set("data_retention_days",c),a.when(b.instant("SETTINGS_MAINTENANCE_DATA_RETENTION_SUCCESS"))}.bind(this))["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_DATA_RETENTION_ERROR"),c))})},this.compactDatabase=function(){return(new m).save({cmd:"compact-database"}).then(function(){return a.when(b.instant("SETTINGS_MAINTENANCE_COMPACT_DATABASE_SUCCESS"))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_COMPACT_DATABASE_ERROR"),c))})},this.generateSupportFile=function(e){return(new m).save({cmd:"support",userAgent:c.navigator.userAgent,language:c.navigator.language}).then(function(){return e?h.download(n+"/dl/support","unifi-"+d(new Date).format("YYYYMMDD-HHmm")+".supp").then(function(){return a.when(b.instant("SETTINGS_MAINTENANCE_DOWNLOAD_SUPPORT_FILE_SUCCESS"))})["catch"](function(){return a.reject(b.instant("SETTINGS_MAINTENANCE_DOWNLOAD_SUPPORT_FILE_ERROR"))}):a.when(b.instant("SETTINGS_MAINTENANCE_GENERATE_SUPPORT_FILE_SUCCESS"))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_GENERATE_SUPPORT_FILE_ERROR"),c))})},this.checkSshCredentials=function(c){return(new m).save({cmd:"check-ssh-credentials",username:c.username,password:c.password})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_CHECK_SSH_CREDENTIALS_ERROR"),c))})},this.changeSshUsername=function(c){return(new m).save({cmd:"change-ssh-username",username:c})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_CHANGE_SSH_USERNAME_ERROR"),c))})},this.changeSshPassword=function(c){return(new m).save({cmd:"change-ssh-password",username:c.username,password:c.password})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_CHANGE_SSH_PASSWORD_ERROR"),c))})},this.checkDevicesFirmwareUpdate=function(){return(new m).save({cmd:"check-firmware-update"}).then(function(){return a.when(b.instant("SETTINGS_MAINTENANCE_IS_DEVICES_FIRMWARE_UPDATE_AVAILABLE_SUCCESS"))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_IS_DEVICES_FIRMWARE_UPDATE_AVAILABLE_ERROR"),c))})},this.isCloudKeyFirmwareUpdateAvailable=function(){return(new m).save({cmd:"check-cloudkey-update"}).then(function(){return this.repository.refresh(),a.when(b.instant("SETTINGS_MAINTENANCE_IS_CLOUD_KEY_FIRMWARE_UPDATE_AVAILABLE_SUCCESS"))}.bind(this))["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_IS_CLOUD_KEY_FIRMWARE_UPDATE_AVAILABLE_ERROR"),c))})},this.updateCloudKeyFirmware=function(){return(new m).save({cmd:"update-cloudkey"}).then(function(){return b.instant("SETTINGS_MAINTENANCE_UPDATE_CLOUD_KEY_FIRMWARE_SUCCESS")})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_UPDATE_CLOUD_KEY_FIRMWARE_ERROR"),c))})},this.isCloudKeyControllerUpdateAvailable=function(){return(new m).save({cmd:"check-controller-package-update"}).then(function(){return this.repository.refresh(),a.when(b.instant("SETTINGS_MAINTENANCE_IS_CLOUD_KEY_CONTROLLER_UPDATE_AVAILABLE_SUCCESS"))}.bind(this))["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_IS_CLOUD_KEY_CONTROLLER_UPDATE_AVAILABLE_ERROR"),c))})},this.updateCloudKeyController=function(){return(new m).save({cmd:"update-controller-package"}).then(function(){return this.waitForUpdateFinish(),a.when(b.instant("SETTINGS_MAINTENANCE_UPDATE_CLOUD_KEY_CONTROLLER_SUCCESS"))}.bind(this))["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_UPDATE_CLOUD_KEY_CONTROLLER_ERROR"),c))})},this.waitForUpdateFinish=function(){return a(function(a){var b="system.update.finish";i.createModelPoll(b,this.updateStatusModel,{forceFetch:!0,delay:t,onSuccess:function(){var c=!this.updateStatusModel.get("cloudkey_fw_updating")&&!this.updateStatusModel.get("cloudkey_unifi_updating");c&&(i.destroy(b),a())}.bind(this),onError:function(){this.updateStatusModel.set("cloudkey_fw_updating",!0),this.updateStatusModel.set("cloudkey_fw_updating_progress",r.RESTARTING)}.bind(this)}).then(function(a){a.start()})}.bind(this))},this.checkUpdateStatus=function(){return this.updateStatusModel.fetch()},this.isFirmwareUpdating=function(){return!!this.updateStatusModel.get("cloudkey_fw_updating")},this.getFirmwareDownloadProgress=function(){switch(this.updateStatusModel.get("cloudkey_fw_updating_progress")){case r.DOWNLOADING:return.8*this.updateStatusModel.get("cloudkey_fw_download_progress");case r.CHECKING:return 90;case r.RESTARTING:return 100;default:return 0}},this.getFirmwareUpdateStatus=function(){return this.updateStatusModel.get("cloudkey_fw_updating")?(this.updateStatusModel.get("cloudkey_fw_updating_progress")||r.UNKNOWN).toUpperCase():this.repository.model.get("cloudkey_update_available")?s.UPDATE_AVAILABLE:s.UP_TO_DATE},this.getControllerUpdateStatus=function(){return this.updateStatusModel.get("cloudkey_unifi_updating")?(this.updateStatusModel.get("cloudkey_unifi_updating_progress")||r.UNKNOWN).toUpperCase():this.repository.model.get("package_update_available")?s.UPDATE_AVAILABLE:s.UP_TO_DATE},this.restartCloudKey=function(){return(new m).save({cmd:"reboot"}).then(function(){return a.when(b.instant("SETTINGS_MAINTENANCE_RESTART_CLOUD_KEY_SUCCESS"))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_RESTART_CLOUD_KEY_ERROR"),c))})},this.shutdownCloudKey=function(){return(new m).save({cmd:"poweroff"}).then(function(){return a.when(b.instant("SETTINGS_MAINTENANCE_SHUTDOWN_CLOUD_KEY_SUCCESS"))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_SHUTDOWN_CLOUD_KEY_ERROR"),c))})},this.resetCloudKey=function(){return(new m).save({cmd:"factory-reset"}).then(function(){return a.when(b.instant("SETTINGS_MAINTENANCE_RESET_CLOUD_KEY_SUCCESS"))})["catch"](function(c){return a.reject(f.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_RESET_CLOUD_KEY_ERROR"),c))})},this.getLiveChatLevel=function(){return this.repository.model.get("live_chat")},this.getGoogleMapsApiKey=function(){var a=q||this.isUnifiGo()||this.isDemoMode()?k:"",b=this.repository.model.get("google_maps_api_key")||a;return""!==b?b:void 0},this.useGoogleEngineForImageMaps=function(){return this.repository.model.get("image_maps_use_google_engine")},this.getControllerVersion=function(){return this.repository.model.get("version")}}])},{moment:238}],1782:[function(a,b,c){"use strict";var d=a("moment");angular.module("base-unifi").service("systemBackupUtils",["$q","$translate","apiResults","BackupMgrModel","fileUtils","featureFlag","system","SystemMgrModel","UnifiFileBasePath","Upload","UseWebrtc",function(a,b,c,e,f,g,h,i,j,k,l){var m=function(){return g.isEnabled("withBackupMgrForBackupEndpoint")?new e:new i};this.generateBackupFile=function(e,g){var i=h.repository.model.get("version"),k=m();return k.save({cmd:"backup",days:e}).then(function(c){return g?c&&c.data&&c.data.data?f.download(j+c.data.data[0].url,(i||"unifi-"+d(new Date).format("YYYYMMDD-HHmm"))+".unf").then(function(){return a.when(b.instant("SETTINGS_MAINTENANCE_DOWNLOAD_BACKUP_FILE_SUCCESS"))}):a.reject(b.instant("SETTINGS_MAINTENANCE_GENERATE_BACKUP_FILE_ERROR")):a.when(b.instant("SETTINGS_MAINTENANCE_GENERATE_BACKUP_FILE_SUCCESS"))})["catch"](function(d){return a.reject(c.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_GENERATE_BACKUP_FILE_ERROR"),d))})},this.uploadBackupFile=function(d,e){return k.upload({url:j+"/upload/backup",fileFormDataName:"Filedata",file:d,withCredentials:!0,withWebRTC:l,type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"}}).then(function(b){return a.when(b.data.meta)},function(d){return a.reject(c.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_BACKUP_UPLOAD_ERROR"),d))},function(a){e&&(e.loaded=a.loaded,e.percent=parseInt(100*a.loaded/a.total))})},this.restoreFromBackup=function(d){var e=m();return e.save({cmd:"restore",backup_id:d}).then(function(){return a.when(b.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_BACKUP_SUCCESS"))})["catch"](function(d){return a.reject(c.appendErrorMsg(b.instant("SETTINGS_MAINTENANCE_RESTORE_FROM_BACKUP_ERROR"),d))})},this.cancelRestoreFromBackup=function(a){return(new e).save({cmd:"cancel-backup",backup_id:a})}}])},{moment:238}],1783:[function(a,b,c){"use strict";angular.module("base-unifi").service("versionParser",[function(){this.parseFirmwareVersion=function(a){var b={};if(a){var c=a.split(".");c&&c.length>=6&&(b.time=c.pop(),b.date=c.pop(),b.revision=c.pop(),b.product=c.shift(),b.arch=c.shift(),b.version=c.join("."))}return b}}])},{}],1784:[function(a,b,c){"use strict";angular.module("base-unifi").service("voucherUtils",["$filter","$translate",function(a,b){this.getStatusText=function(c){var d=c.get("status"),e=c.get("status_expires"),f=e?a("seconds")(e.toFixed(0)):null;return b.instant("VOUCHER_STATUS_"+d,{used:c.get("used"),expires:f})},this.formatCode=function(a){return a.substring(0,5)+"-"+a.substring(5)}}])},{}],1785:[function(a,b,c){"use strict";angular.module("base-unifi").factory("unifiWebRtcConfiguration",["localStorageFailSafe","LocalStorageValue","SignallingChannelHttpsEndpoint","SignallingChannelHttpsHost","SignallingChannelType","SignallingChannelWsEndpoint","SignallingChannelWsHost","StunHost","WebRtcLegacyEngine","WebRtcStartAsCaller","SIGNALLING_CHANNEL_TYPES",function(a,b,c,d,e,f,g,h,i,j,k){function l(){var c=new b(a,"unifi-webrtc-configuration");c.hydrate();var d=c.getValue();return d?JSON.parse(d):{}}function m(a){switch(a){case k.HTTPS:return{endpoint:c,host:d};case k.WS:return{endpoint:f,host:g};default:throw new Error("Unknown signalling channel type.")}}function n(a){var b=m(a.signallingChannelConfig.type);return angular.extend(a.signallingChannelConfig,b),a}return function(){var a={legacyEngine:i,signallingChannelConfig:{type:e},startAsCaller:j,stunHost:h},b=n(angular.extend({},a,l()));return b}}])},{}],1786:[function(a,b,c){"use strict";angular.module("base-unifi").service("unifiWebRtcConnector",["$http","$q","$rootScope","_","contextSwitchStates","redirectUrl","site","SSOAPIEndpoint","SSOAPIHostname","TurnCredentialsApiEndpoint","UnifiCloudHost","unifiWebRtcErrorHandler","unifiWebRtcSuccessHandler","version","VersionCheckEnabled","webRtcConnector","UNIFI_WEBRTC_ERROR","UNIFI_WEBRTC_EVENTS","WEBRTC_EVENTS",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){this.connecting=!1,this.eventHandlers={},this.connect=function(a){return this.init().then(this.verifySso.bind(this,a)).then(this.establishConnection.bind(this,a)).then(this.finalize.bind(this,a))},this.isConnected=function(){return!!this.connecting&&this.connecting.promise},this.init=function(){return this.connecting=b.defer(),b.when()},this.verifySso=function(d){return c.$broadcast(r.UNIFI_WEBRTC_VALIDATING_SSO),a.get("https://"+i+h,{withCredentials:!0})["catch"](function(){var a=q.ERROR_NOT_LOGGED_INTO_SSO;return l.redirectToAccount(a,d),b.reject(a)})},this.checkDeviceVersion=function(a,c){if(o&&!this.isSupportedDeviceVersion(a.controller_version)){var d=q.DEVICE_VERSION_INCOMPATIBLE;return l.showErrorFrame(d,c),b.reject(d)}return a},this.isSupportedDeviceVersion=function(a){var b=function(a){var b=/^(\d+\.\d+\.\d+)(\.[\w-]+)?$/.exec(a);return!b||b.length<2?null:b[1]};return b(a)===b(n.getVersion())},this.establishConnection=function(a){return c.$broadcast(r.UNIFI_WEBRTC_OBTAINING_CONTROLLER_INFO),this.getTurnCredentials(a).then(function(b){return this.checkDeviceVersion(b,a)}.bind(this)).then(function(b){return this.tryOpenConnection(a,b)}.bind(this))},this.getTurnCredentials=function(c){return a.get("https://"+k+j+c,{withCredentials:!0}).then(function(a){return a.data})["catch"](function(){var a=q.ERROR_ESTABLISH_CONNECTION;return l.showErrorFrame(a,c),b.reject(a)})},this.tryOpenConnection=function(a,c){return this.openConnection(a,c)["catch"](function(d){var e,f=d===s.WEBRTC_DEVICE_OFFLINE;return f?(e=q.DEVICE_OFFLINE,l.showErrorFrame(e,a),b.reject(e)):l.showRetryFrame(a).then(this.tryOpenConnection.bind(this,a,c))["catch"](function(){return b.reject(q.ERROR_ESTABLISH_CONNECTION)})}.bind(this))},this.openConnection=function(a,b){c.$broadcast(r.UNIFI_WEBRTC_ESTABLISHING_COMMUNICATION);var d="update_"+g.getActiveSite();return p.establishConnection({deviceId:a,turnCredentials:b,channelNames:["api",d]}).then(function(){p.on(d,this.onmessage.bind(this)),c.$on(e.getSuccess(),function(a,b){if(b){p.closeChannel(d);var c="update_"+b;p.openChannel(c),p.on(c,this.onmessage.bind(this))}}.bind(this))}.bind(this))},this.finalize=function(a){c.$broadcast(r.UNIFI_WEBRTC_INITIALIZING_APPLICATION),m.sendSuccessEvent(a),this.connecting.resolve(!0)},this.onmessage=function(a){var b=a.data.meta.message;if(this.eventHandlers[b]){var c=Object.assign({},a.data.meta,a.data);this.eventHandlers[b](c)}},this.getBrowserLog=function(){return p.dumpLogToJsonFile()},this.getControllerLog=function(a){return p.sendSignallingAction("get_webrtc_logs",{device_id:a}).then(function(a){return a.debug_log})},this.registerHandler=function(a,b){this.eventHandlers[a]=b}}])},{}],1787:[function(a,b,c){"use strict";angular.module("base-unifi").service("unifiWebRtcErrorHandler",["$analytics","$timeout","$translate","$window","AccountHostname","CloudDashboardHost","frame","heyToasts","redirectUrl","ANALYTICS_CATEGORIES","ANALYTICS_EVENTS",function(a,b,c,d,e,f,g,h,i,j,k){this.redirectToAccount=function(b,c){a.eventTrack(k.WEBRTC_EVENT_PREFIX+b,{category:j.WEBRTC,label:c}),d.location.href="https://"+e+"/login?redirect="+i.get()},this.showErrorFrame=function(b,c){return a.eventTrack(k.WEBRTC_EVENT_PREFIX+b,{category:j.WEBRTC,label:c}),g.show("webrtcError",{message:function(){return b}}).then(function(){d.location.href=f})},this.showRetryFrame=function(b){return a.eventTrack(k.WEBRTC_FATAL_ERROR,{category:j.WEBRTC,label:b}),g.show("webrtcFailed",{deviceId:function(){return b}})}}])},{}],1788:[function(a,b,c){"use strict";angular.module("base-unifi").service("unifiWebRtcSuccessHandler",["$analytics","ANALYTICS_CATEGORIES","ANALYTICS_EVENTS",function(a,b,c){this.sendSuccessEvent=function(d){a.eventTrack(c.WEBRTC_SUCCESS,{category:b.WEBRTC,label:d})}}])},{}],1789:[function(a,b,c){"use strict";angular.module("base-unifi").provider("version",[function(){function a(a){return a.split("/").slice(1)}function b(a){var b=a.shift(),c=/^\d+\.\d+\.\d+\.[\w-]+$/;return b.match(c)?b:null}var c=null;this.readVersion=function(d){c=b(a(d))},this.$get=[function(){return{getVersion:function(){return c}}}]}])},{}],1790:[function(a,b,c){"use strict";angular.module("base-unifi").service("wsConnector",["$q","$location","$rootScope","$translate","airOSWebSocket","contextSwitchStates","heyToasts","site","UnifiWsHost","UseWebrtc","EVENTS","WS_DEFAULTS",function(a,b,c,d,e,f,g,h,i,j,k,l){e.retryScalar=l.UNIFI_WS_RETRY_SCALAR,e.customEventExtractor=function(a){return a.meta.message},this.connecting=!1,this.connect=function(){return this.init().then(this.establishConnection.bind(this)).then(this.finalize.bind(this))},this.init=function(){return this.connecting=a.defer(),a.when()},this.establishConnection=function(){this.currentSite=h.getActiveSite()||"default";var c=i||"wss://"+b.host()+":"+b.port(),f=c+"/wss/s/"+this.currentSite+"/events";return e.open(f)["catch"](function(){return g.pushWarning(d.instant("WEBSOCKET_CONNECTION_ERROR")),a.when()})},this.finalize=function(){this.connecting.resolve(!0)},this.isConnected=function(){return!!this.connecting&&this.connecting.promise},c.$on(f.getSuccess(),function(a,b){j||this.currentSite===b||this.connect()}.bind(this)),c.$on(k.ADMIN_LOGOUT,function(){e.close()})}])},{}],1791:[function(a,b,c){"use strict";angular.module("base-unifi").service("wsAdapter",["airOSWebSocket","unifiWebRtcConnector","UseWebrtc",function(a,b,c){this.on=function(d,e){c?b.registerHandler(d,e):a.on(d,e)}}])},{}],1792:[function(a,b,c){"use strict";angular.module("base-unifi").factory("xhrHttpInterceptor",["$document","CsrfTokenUrlCheckEnabled",function(a,b){var c=["POST","PUT","DELETE"],d=a[0];return{request:function(a){var e=c.indexOf(a.method)!==-1;if(e){var f=!b||a.url.startsWith("/"),g=d&&d.cookie&&d.cookie.match(new RegExp("csrf_token=([^;]+)"));g&&g[1]&&f&&(a.headers=a.headers||{},a.headers["X-Csrf-Token"]=g[1])}return a}}}])},{}],1793:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="contentContainer" class="unifiAccountContainer"><div class="unifiAccount"><div class="unifiAccount__unifiLogo icon ubnt-icon--unifi"></div><div class="unifiAccount__appNameAndVersion"><span unifi-if-app="\'app-unifi-hotspot\'" translate="ACCOUNT_TITLE_HOTSPOT_MANAGER" class="appDisplaySpaceAfter"></span><span>{{accountCtrl.serverVersion}}</span></div><div class="unifiAccount__content"><ui-view></ui-view></div><div ng-if="accountCtrl.showOneAccount" class="unifiAccount__oneAccount"><div class="unifiAccount__ubntLogo icon ubnt-icon--ubnt-logo-u"></div><p>{{\'ACCOUNT_LABEL_ONE_ACCOUNT_FOR_ALL\' | translate}}</p><p><span>{{\'ACCOUNT_LABEL_ONE_ACCOUNT_NO_ACCOUNT\' | translate}}&nbsp;</span><a ng-href="https://{{::accountCtrl.accountHostname}}/register" target="_blank">{{\'ACCOUNT_LABEL_ONE_ACCOUNT_REGISTER_HERE\' | translate}}</a></p></div></div></div>'),b.join("")}},{"jade/runtime":232}],1794:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div id="contentContainer" class="appView"><div class="container container--responsive container--centered"><div class="row--comfy"><div class="col--xs12"><div class="appInfoBox appInfoBox--danger appInfoBox--responsive verticalRhythmTop"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div ng-if="fatalCtrl.errorCode" class="appInfoBox__header">{{fatalCtrl.errorCode}}: {{\'HTTP_STATUS_CODE_\' + fatalCtrl.errorCode | translate}}</div><div ng-if="!fatalCtrl.errorCode" translate="FATAL_ERROR_GENERIC_ERROR" class="appInfoBox__header"></div><div ng-if="fatalCtrl.homeState" class="appInfoBox__body"><p unifi-translate-link unifi-translate-link-translate="FATAL_ERROR_LINK_TO_HOME" unifi-translate-link-state="fatalCtrl.homeState" class="noMarginBottom"></p></div><div ng-if="fatalCtrl.loginState" class="appInfoBox__body"><p unifi-translate-link unifi-translate-link-translate="FATAL_ERROR_LINK_TO_LOGIN" unifi-translate-link-state="fatalCtrl.loginState" class="noMarginBottom"></p></div></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1795:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiForgotPassword"><form novalidate autocomplete="off" name="forgotPasswordCtrl.form" ng-class="{\'is-form-validation-visible\': forgotPasswordCtrl.showValidation}" ng-submit="forgotPasswordCtrl.form.$valid &amp;&amp; forgotPasswordCtrl.resetPassword()" class="appForm appForm--dark"><div ng-if="forgotPasswordCtrl.error" class="unifiSettingsSection verticalRhythm"><div class="appInfoBox appInfoBox--cozy appInfoBox--dark appInfoBox--danger"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div translate="ACCOUNT_NOTICE_FORGOT_PASSWORD_ERROR_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="{{forgotPasswordCtrl.error}}" class="noMarginBottom"></p></div></div></div></div><div class="appFormGroup"><label translate="ACCOUNT_FORGOT_PASSWORD_LABEL_EMAIL" class="appLabel--primary unweighted"></label><input type="text" name="email" ng-model="forgotPasswordCtrl.email" required class="input--full"></div><div class="verticalRhythmTop--cozy"><button id="resetPasswordButton" ng-disabled="forgotPasswordCtrl.form.email.$invalid" ng-click="forgotPasswordCtrl.showValidation = true" busy-toggle="forgotPasswordCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner\', \'appSpinner--light\', \'appSpinner--centered\']" class="appMainButton appMainButton--primary">{{\'ACCOUNT_FORGOT_PASSWORD_ACTIONS_RESET_PASSWORD\' | translate}}</button><button ui-sref="{{forgotPasswordCtrl.ENV.APP_STATE_PREFIX}}account.login" class="appMainButton appMainButton--transparentDark">{{\'ACCOUNT_FORGOT_PASSWORD_ACTIONS_BACK\' | translate}}</button></div></form></div>'),b.join("")}},{"jade/runtime":232}],1796:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiConfirm"><div id="confirmModal" class="appControlModal appControlModal--tiny"><div ng-click="confirmCtrl.reject()" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header">{{confirmCtrl.title}}</div><div class="appControlModal__content"><p ng-bind-html="confirmCtrl.message" ng-if="confirmCtrl.allowHtml"></p><p ng-if="!confirmCtrl.allowHtml">{{confirmCtrl.message}}</p><div ng-repeat="warning in confirmCtrl.warnings track by $index" class="row--cozy"><div class="appInfoBox appInfoBox--warning appInfoBox--dark appInfoBox--cozy"><div class="appInfoBox__icon icon ubnt-icon--eye2"></div><div class="appInfoBox__content"><div class="appInfoBox__body">{{ warning | translate }}</div></div></div></div></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div unifi-bypass-confirm="confirmCtrl.bypassFlag" unifi-bypass-confirm-is-dark="true" class="flexCol--7"></div><div ng-switch="confirmCtrl.defaultCancel" class="flexCol--5 alignRight"><div ng-switch-when="true" class="appInputGroup"><button ng-click="confirmCtrl.resolve()" translate="COMMON_ACTIONS_CONFIRM" class="appMainButton appMainButton--cozy appMainButton--transparentDark confirm"></button><button ng-click="confirmCtrl.reject()" translate="COMMON_ACTIONS_CANCEL" class="appMainButton appMainButton--cozy cancel"></button></div><div ng-switch-default class="appInputGroup"><button ng-click="confirmCtrl.reject()" translate="COMMON_ACTIONS_CANCEL" class="appMainButton appMainButton--cozy appMainButton--transparentDark cancel"></button><button ng-click="confirmCtrl.resolve()" translate="COMMON_ACTIONS_CONFIRM" class="appMainButton appMainButton--cozy appMainButton--primary confirm"></button></div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1797:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout unifiEditAccount"><div id="editAccountModal" class="appControlModal appControlModal--tiny"><div ng-if="!editAccountCtrl.account.isPasswordChangeRequired()" frame-close="editAccount" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div translate="EDIT_ACCOUNT_MODAL_TITLE" class="appControlModal__header"></div><div class="appControlModal__content"><unifi-loading-status unifi-loading-status-is-loading="editAccountCtrl.isLoading" unifi-loading-status-failed="editAccountCtrl.failedToLoad" unifi-loading-status-retry="editAccountCtrl.init()" unifi-loading-status-is-dark="true" unifi-loading-status-is-opaque="true"></unifi-loading-status><form novalidate autocomplete="off" ng-class="{          \'is-form-validation-visible\': editAccountCtrl.showValidation,          \'is-validation-hidden\': !editAccountCtrl.showValidation        }" ng-submit="editAccountCtrl.isSubmitAllowed() &amp;&amp; editAccountCtrl.save()" class="appForm appForm--cozy appForm--dark"><ng-form name="editAccountCtrl.form" unifi-model-form="editAccountCtrl.account.repository.model" unifi-model-form-auto-resolve-divergence="true"><div ng-if="editAccountCtrl.isCurrentPasswordRequired()" class="container container--centered container--fixed"><div class="row row--comfy"><div class="col--xs12"><p translate="EDIT_ACCOUNT_MODAL_PASSWORD_NOTE" class="noMarginBottom"></p></div></div><div class="row row--comfy"><div class="col--xs5 col--sm4 label--right"><label translate="EDIT_ACCOUNT_LABEL_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><input type="password" name="currentPassword" ng-model="modelFormCtrl.modelCopy.attributes.current_password" required autofocus class="input--full"><div ng-show="editAccountCtrl.form.currentPassword.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div></div><div class="container container--centered container--fixed"><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="EDIT_ACCOUNT_LABEL_ADMIN_NAME" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><input type="text" name="name" ng-model="modelFormCtrl.modelCopy.attributes.name" ng-model-master="modelFormCtrl.model.attributes.name" ng-pattern="editAccountCtrl.patterns.name" required class="input--full"><div ng-show="editAccountCtrl.form.name.$error.pattern" translate="VALIDATION_HINT_ADMIN_NAME" class="appInputFeedback appInputFeedback--danger"></div><div ng-show="editAccountCtrl.form.name.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="EDIT_ACCOUNT_LABEL_EMAIL" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><input type="email" name="email" ng-model="modelFormCtrl.modelCopy.attributes.email" ng-model-master="modelFormCtrl.model.attributes.email" required class="input--full"><div ng-show="editAccountCtrl.form.email.$error.email" translate="VALIDATION_HINT_EMAIL" class="appInputFeedback appInputFeedback--danger"></div><div ng-show="editAccountCtrl.form.email.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="EDIT_ACCOUNT_LABEL_NEW_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><input type="password" name="password" ng-model="modelFormCtrl.modelCopy.attributes.password" ng-required="editAccountCtrl.isPasswordChangeRequired()" ng-minlength="4" class="input--full"><div ng-show="editAccountCtrl.form.password.$error.minlength" translate="VALIDATION_HINT_MIN_LENGTH" translate-values="{ min: 4 }" class="appInputFeedback appInputFeedback--danger"></div><div ng-show="editAccountCtrl.form.password.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div class="row"><div class="col--xs5 col--sm4 label--right"><label translate="EDIT_ACCOUNT_LABEL_CONFIRM_PASSWORD" class="appLabel--primary appLabel--boxAlign"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--cozy"><input type="password" name="confirmPassword" ng-model="editAccountCtrl.confirmPassword" passwordcontrol-validate-confirm="modelFormCtrl.modelCopy.attributes.password" ng-required="editAccountCtrl.isPasswordChangeRequired()" ng-minlength="4" class="input--full"><div ng-show="editAccountCtrl.form.confirmPassword.$error.passwordConfirm &amp;&amp; modelFormCtrl.modelCopy.attributes.password" translate="VALIDATION_HINT_PASSWORD_MISMATCH" class="appInputFeedback appInputFeedback--danger"></div><div ng-show="editAccountCtrl.form.confirmPassword.$error.required" translate="VALIDATION_HINT_REQUIRED" class="appInputFeedback appInputFeedback--danger"></div></div></div><div unifi-feature-flag-enable="withHtmlEmailTemplatesAndAlerts" class="row"><div class="col--xs5 col--sm4 label--right"><label translate="EDIT_ACCOUNT_LABEL_ALERT_EMAILS" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--condensed"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="emailAlertEnabled" id="emailAlertEnabled" ng-model="modelFormCtrl.modelCopy.attributes.email_alert_enabled" ng-model-master="modelFormCtrl.model.attributes.email_alert_enabled"><label for="emailAlertEnabled" translate="EDIT_ACCOUNT_VALUES_ALERT_EMAILS"></label></div><div ng-show="modelFormCtrl.modelCopy.attributes.email_alert_enabled" class="appInputGroup verticalRhythmTop--condensed"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="emailAlertGroupingEnabled" id="emailAlertGroupingEnabled" ng-model="modelFormCtrl.modelCopy.attributes.email_alert_grouping_enabled" ng-model-master="modelFormCtrl.model.attributes.email_alert_grouping_enabled"><label for="emailAlertGroupingEnabled" translate="EDIT_ACCOUNT_VALUES_ALERT_EMAILS_GROUP_TOGETHER"></label></div></div></div></div><div unifi-feature-flag-enable="withHtmlEmailTemplatesAndAlerts" class="row"><div class="col--xs5 col--sm4 label--right"><label translate="EDIT_ACCOUNT_LABEL_EMAIL_TEMPLATES" class="appLabel--primary"></label></div><div class="col--xs7 col--sm8 appFormGroup appFormGroup--condensed"><div class="appInputGroup appInputGroup--cozy"><input type="checkbox" name="htmlEmailTemplatesEnabled" id="htmlEmailTemplatesEnabled" ng-model="modelFormCtrl.modelCopy.attributes.html_email_enabled" ng-model-master="modelFormCtrl.model.attributes.html_email_enabled"><label for="htmlEmailTemplatesEnabled" translate="EDIT_ACCOUNT_VALUES_HTML_EMAIL_TEMPLATES"></label></div></div></div><div class="row"><div class="col--xs12 alignRight"><div class="appInputGroup"><button type="button" ng-if="!editAccountCtrl.isPasswordChangeRequired()" frame-close="editAccount" class="appMainButton appMainButton--cozy appMainButton--transparentDark">{{\'COMMON_ACTIONS_CANCEL\' | translate}}</button><button ng-click="editAccountCtrl.showValidation = true" ng-disabled="editAccountCtrl.form.$pristine" busy-toggle="editAccountCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered appSpinner--small\']" class="appMainButton appMainButton--cozy appMainButton--primary">{{\'COMMON_ACTIONS_SUBMIT\' | translate}}</button></div></div></div></div></ng-form></form></div></div></div>'),
b.join("")}},{"jade/runtime":232}],1798:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="unifiLogin"><form novalidate name="loginCtrl.form" ng-class="{\'is-form-validation-visible\': loginCtrl.showValidation}" ng-submit="loginCtrl.form.$valid &amp;&amp; loginCtrl.login()" class="appForm appForm--dark"><div ng-if="loginCtrl.error" class="unifiSettingsSection verticalRhythm"><div class="appInfoBox appInfoBox--cozy appInfoBox--dark appInfoBox--danger"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div translate="ACCOUNT_NOTICE_LOGIN_ERROR_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="{{loginCtrl.error}}" class="noMarginBottom"></p></div></div></div></div><div class="appFormGroup"><label translate="ACCOUNT_LOGIN_LABEL_USERNAME" class="appLabel--primary unweighted"></label><input type="text" name="username" ng-model="loginCtrl.username" required autocapitalize="off" autocorrect="off" autofocus class="input--full"></div><div class="appFormGroup"><label translate="ACCOUNT_LOGIN_LABEL_PASSWORD" class="appLabel--primary unweighted"></label><input type="password" name="password" ng-model="loginCtrl.password" required class="input--full"></div><div class="verticalRhythmTop--cozy"><div class="appFormGroup alignCenter"><div class="appInputGroup appInputGroup--cozy"><input id="loginRemember" type="checkbox" name="remember" ng-model="loginCtrl.remember"><label for="loginRemember" translate="ACCOUNT_LOGIN_LABEL_REMEMBER_ME" class="unweighted"></label><div class="appTooltipContainer appTooltipContainer--prompt appTooltipContainer--hoverable unifiLogin__tooltipContainer"><div class="appTooltip appTooltip--dark appTooltip--brief appTooltip--left">{{\'ACCOUNT_LOGIN_TOOLTIP_REMEMBER_ME\' | translate}}</div></div></div></div></div><div class="verticalRhythmTop--cozy"><button id="loginButton" ng-disabled="loginCtrl.form.username.$invalid || loginCtrl.form.password.$invalid" ng-click="loginCtrl.showValidation = true" busy-toggle="loginCtrl.isSubmitting" busy-toggle-spinner-classes="[\'appSpinner\', \'appSpinner--light\', \'appSpinner--centered\']" class="appMainButton appMainButton--primary appMainButton--full">{{\'ACCOUNT_LOGIN_ACTIONS_SIGN_IN\' | translate}}</button></div><div class="verticalRhythmTop--cozy"><a ui-sref="{{loginCtrl.ENV.APP_STATE_PREFIX}}account.forgotpassword" unifi-if-app="[\'app-unifi-manage\', \'app-unifi-overview\']" class="appMainButton appMainButton--transparentDark appMainButton--full">{{\'ACCOUNT_LOGIN_LINK_FORGOT_PASSWORD\' | translate}}</a></div></form></div>'),b.join("")}},{"jade/runtime":232}],1799:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="container container--responsive container--centered verticalRhythmTop"><div class="row--comfy"><div class="col--xs12"><div class="appInfoBox appInfoBox--responsive"><div class="appInfoBox__icon icon ubnt-icon--info"></div><div class="appInfoBox__content"><div class="appInfoBox__header">{{ \'ACCOUNT_NOTICE_SSO_LOGIN\' | translate }}</div></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1800:[function(a,b,c){"use strict";a("../shared-unifi/main"),angular.module("shared-unifi-device",["shared-unifi"]),a("./services/models/DeviceMgrModel.js")},{"../shared-unifi/main":1845,"./services/models/DeviceMgrModel.js":1801}],1801:[function(a,b,c){"use strict";angular.module("shared-unifi-device").factory("DeviceMgrModel",["CORSModel","siteUrlMixin","webrtcMixin","webSocketMixin",function(a,b,c,d){return a.extend(b).extend(c).extend(d).extend({_isActiveSiteOptional:!0,siteUrl:"cmd/devmgr"})}])},{}],1802:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").run(["$rootScope","discoveryToolUtils","DISCOVERY_TOOL_EVENTS","VISIBILITY_CHANGE",function(a,b,c,d){a.$on(d.EVENT,b.handleVisibilityChangeEvent.bind(b)),a.$on(c.DISCONNECTED,b.handleDisconnected.bind(b))}])},{}],1803:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").config(["frameProvider",function(b){b.when("discoveryToolChromeRequired",{controller:"DiscoveryToolChromeRequiredController",controllerAs:"discoveryToolChromeRequiredCtrl",layout:"discoveryToolChromeRequiredLayout",template:a("../frames/discoveryToolChromeRequired/discoveryToolChromeRequired.jade")()}).when("discoveryToolInstall",{controller:"DiscoveryToolInstallController",controllerAs:"discoveryToolInstallCtrl",layout:"discoveryToolInstallLayout",template:a("../frames/discoveryToolInstall/discoveryToolInstall.jade")()}).when("discoveryToolPortAlreadyInUse",{controller:"DiscoveryToolPortAlreadyInUseController",controllerAs:"discoveryToolPortAlreadyInUseCtrl",layout:"discoveryToolPortAlreadyInUseLayout",template:a("../frames/discoveryToolPortAlreadyInUse/discoveryToolPortAlreadyInUse.jade")()})}])},{"../frames/discoveryToolChromeRequired/discoveryToolChromeRequired.jade":1811,"../frames/discoveryToolInstall/discoveryToolInstall.jade":1813,"../frames/discoveryToolPortAlreadyInUse/discoveryToolPortAlreadyInUse.jade":1815}],1804:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").constant("CHROME_EXTENSION_URL","https://chrome.google.com/webstore/detail/")},{}],1805:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").constant("DISCOVERY_TOOL",{CHECK_CREDENTIALS_TIMEOUT:1e4,FIND_CLOUD_KEY_TIMEOUT:15e3,FIND_DEVICES_TIMEOUT:15e3,INITIALIZATION_TIMEOUT:200})},{}],1806:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").constant("DISCOVERY_TOOL_ERRORS",{252:"DISCOVERY_TOOL_ERROR_UCK_ALREADY_CONFIGURED",255:"DISCOVERY_TOOL_ERROR_WRONG_SSH_CREDENTIALS"})},{}],1807:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").constant("DISCOVERY_TOOL_ERROR_CODES",{UCK_ALREADY_CONFIGURED:252,WRONG_SSH_CREDENTIALS:255})},{}],1808:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").constant("DISCOVERY_TOOL_EVENTS",{ACTION_ADOPT_CLOUD_KEY:"discovery-tool-action-adopt-cloud-key",ACTION_CHECK_DEFAULT_CREDENTIALS:"discovery-tool-action-check-default-credentials",ACTION_REBOOT:"discovery-tool-action-reboot",ACTION_RESTORE_TO_FACTORY_DEFAULTS:"discovery-tool-action-restore-to-factory-defaults",ACTION_SCAN_FOR_CLOUD_KEY:"discovery-tool-action-scan-for-cloud-key",ACTION_SCAN_FOR_DEVICES:"discovery-tool-action-scan-for-devices",ACTION_SCAN_FOR_LOCATE_FOR_30SECONDS:"discovery-tool-action-locate-for-30-seconds",ACTION_SET_INFORM:"discovery-tool-action-set-inform",ACTION_UPGRADE:"discovery-tool-action-upgrade",CLOUD_KEY_DISCOVERED:"discovery-tool-cloud-key-discovered",CONNECTED:"discovery-tool-connected",DEVICE_DISCOVERED:"discovery-tool-device-discovered",DISCONNECTED:"discovery-tool-disconnected"})},{}],1809:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").constant("MANAGE_DEVICE_DEFAULTS",Object.freeze({username:"ubnt",password:"ubnt",port:22}))},{}],1810:[function(a,b,c){"use strict";function d(a,b,c){this.bypassFlag=a,this.discoveryTool=b,this.frame=c}d.$inject=["bypassFlag","discoveryTool","frame"],d.prototype.skip=function(){this.frame.getLayout("discoveryToolChromeRequiredLayout").reject()},angular.module("shared-unifi-discovery").controller("DiscoveryToolChromeRequiredController",d)},{}],1811:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div class="appControlModal appControlModal--small"><div ng-click="discoveryToolChromeRequiredCtrl.skip()" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header"></div><div class="appControlModal__content"><div class="row verticalRhythm--cozy"><div class="col--lg12 alignCenter"><img src="./images/install-discovery.png"></div></div><div class="row verticalRhythm--cozy"><div class="col--lg12 alignCenter"><p ng-bind-html="\'DISCOVERY_TOOL_INSTALL_CHROME_REQUIRED\' | translate:{url: discoveryToolChromeRequiredCtrl.discoveryTool.getChromeRequiredUrl()}" class="noMarginBottom"></p></div></div></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--7"><div ng-if="discoveryToolChromeRequiredCtrl.bypassFlag" unifi-bypass-confirm="discoveryToolChromeRequiredCtrl.bypassFlag" unifi-bypass-confirm-is-dark="true"></div></div><div class="flexCol--12 alignRight"><button ng-click="discoveryToolChromeRequiredCtrl.skip()" class="appMainButton appMainButton--primary appMainButton--cozy">{{ \'COMMON_ACTIONS_SKIP\' | translate }}</button></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1812:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.bypassFlag=b,this.$translate=a,this.discoveryTool=c,this.heyToasts=d,this.frame=e}d.$inject=["$translate","bypassFlag","discoveryTool","heyToasts","frame"],d.prototype.install=function(){this.isInstalling=!0,this.discoveryTool.install().then(function(){this.frame.getLayout("discoveryToolInstallLayout").resolve()}.bind(this))["catch"](function(){this.heyToasts.pushError(this.$translate.instant("DISCOVERY_TOOL_INSTALL_FAILED"))}.bind(this))["finally"](function(){this.isInstalling=!1}.bind(this))},d.prototype.skip=function(){this.frame.getLayout("discoveryToolInstallLayout").reject()},angular.module("shared-unifi-discovery").controller("DiscoveryToolInstallController",d)},{}],1813:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div class="appControlModal appControlModal--small"><div ng-click="discoveryToolInstallCtrl.skip()" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header"></div><div class="appControlModal__content"><div class="row verticalRhythm--cozy"><div class="col--lg12 alignCenter"><img src="./images/install-discovery.png"></div></div><div class="row verticalRhythm--cozy"><div class="col--lg12 alignCenter"><pp ng-bind-html="\'DISCOVERY_TOOL_INSTALL_LINK\' | translate:{url: discoveryToolInstallCtrl.discoveryTool.getInstallUrl()}" class="noMarginBottom"></pp></div></div></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--7"><div ng-if="discoveryToolInstallCtrl.bypassFlag" unifi-bypass-confirm="discoveryToolInstallCtrl.bypassFlag" unifi-bypass-confirm-is-dark="true"></div></div><div class="flexCol--5 alignRight"><button type="button" ng-click="discoveryToolInstallCtrl.skip()" class="appMainButton appMainButton--transparentDark appMainButton--cozy">{{ \'COMMON_ACTIONS_SKIP\' | translate}}</button><button analytics-on="click" analytics-event="install_discovery_tool" analytics-category="find_cloud_key" analytics-properties="{ label: \'install Ubiquiti Device Discovery Tool\' }" busy-toggle="discoveryToolInstallCtrl.isInstalling" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered centered\']" ng-click="discoveryToolInstallCtrl.install()" ng-disabled="discoveryToolInstallCtrl.isInstalling" class="appMainButton appMainButton--primary appMainButton--cozy">{{ \'COMMON_ACTIONS_INSTALL\' | translate }}</button></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1814:[function(a,b,c){"use strict";function d(a,b,c){this.discoveryTool=a,this.frame=b,this.retryAction=c}d.$inject=["discoveryTool","frame","retryAction"],d.prototype.retry=function(){return this.isRetrying=!0,this.retryAction().then(function(){return this.frame.getLayout("discoveryToolPortAlreadyInUseLayout").resolve()}.bind(this))["finally"](function(){this.isRetrying=!1}.bind(this))},d.prototype.cancel=function(){this.frame.getLayout("discoveryToolPortAlreadyInUseLayout").reject()},angular.module("shared-unifi-discovery").controller("DiscoveryToolPortAlreadyInUseController",d)},{}],1815:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div class="blackout"><div class="appControlModal appControlModal--tiny"><div ng-click="discoveryToolPortAlreadyInUseCtrl.cancel()" class="appControlModal__close"><div class="icon ubnt-icon--x"></div></div><div class="appControlModal__header"><div class="iconText appIconText"><span class="iconText__icon icon ubnt-icon--alert danger"></span><span translate="DISCOVERY_TOOL_PORT_ALREADY_IN_USE_TITLE" class="iconText__text"></span></div></div><div class="appControlModal__content"><p translate="DISCOVERY_TOOL_PORT_ALREADY_IN_USE" class="noMarginBottom"></p></div><div class="appControlModal__content"><div class="flexRow flexRow--alignCenter"><div class="flexCol--12 alignRight"><button type="button" ng-click="discoveryToolPortAlreadyInUseCtrl.cancel()" class="appMainButton appMainButton--transparentDark appMainButton--cozy">{{ \'COMMON_ACTIONS_CANCEL\' | translate}}</button><button busy-toggle="discoveryToolPortAlreadyInUseCtrl.isRetrying" busy-toggle-spinner-classes="[\'appSpinner appSpinner--light appSpinner--centered centered\']" ng-click="discoveryToolPortAlreadyInUseCtrl.retry()" class="appMainButton appMainButton--primary appMainButton--cozy">{{ \'COMMON_ACTIONS_RETRY\' | translate}}</button></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1816:[function(a,b,c){"use strict";a("../shared-unifi/main"),angular.module("shared-unifi-discovery",["frame","hey","shared-unifi"]),a("./config/discoveryTool.js"),a("./config/frames.js"),a("./constants/CHROME_EXTENSION_URL.js"),a("./constants/DISCOVERY_TOOL.js"),a("./constants/DISCOVERY_TOOL_ERRORS.js"),a("./constants/DISCOVERY_TOOL_ERROR_CODES.js"),a("./constants/DISCOVERY_TOOL_EVENTS.js"),a("./constants/MANAGE_DEVICE_DEFAULTS.js"),a("./frames/discoveryToolChromeRequired/DiscoveryToolChromeRequiredController.js"),a("./frames/discoveryToolInstall/DiscoveryToolInstallController.js"),a("./frames/discoveryToolPortAlreadyInUse/DiscoveryToolPortAlreadyInUseController.js"),a("./services/chromeApi.js"),a("./services/discoveryTool.js"),a("./services/discoveryToolUtils.js"),a("./services/factories/DiscoveryToolBindingPortQueue.js"),a("./services/factories/DiscoveryToolCheckDefaultCredentialsQueue.js"),a("./services/factories/DiscoveryToolSshCommandQueue.js"),a("./services/factories/DiscoveryToolUnifiCommandQueue.js"),a("./services/factories/PortMessageQueue.js"),a("./services/factories/TaskScheduler.js")},{"../shared-unifi/main":1845,"./config/discoveryTool.js":1802,"./config/frames.js":1803,"./constants/CHROME_EXTENSION_URL.js":1804,"./constants/DISCOVERY_TOOL.js":1805,"./constants/DISCOVERY_TOOL_ERRORS.js":1806,"./constants/DISCOVERY_TOOL_ERROR_CODES.js":1807,"./constants/DISCOVERY_TOOL_EVENTS.js":1808,"./constants/MANAGE_DEVICE_DEFAULTS.js":1809,"./frames/discoveryToolChromeRequired/DiscoveryToolChromeRequiredController.js":1810,"./frames/discoveryToolInstall/DiscoveryToolInstallController.js":1812,"./frames/discoveryToolPortAlreadyInUse/DiscoveryToolPortAlreadyInUseController.js":1814,"./services/chromeApi.js":1817,"./services/discoveryTool.js":1818,"./services/discoveryToolUtils.js":1819,"./services/factories/DiscoveryToolBindingPortQueue.js":1820,"./services/factories/DiscoveryToolCheckDefaultCredentialsQueue.js":1821,"./services/factories/DiscoveryToolSshCommandQueue.js":1822,"./services/factories/DiscoveryToolUnifiCommandQueue.js":1823,"./services/factories/PortMessageQueue.js":1824,"./services/factories/TaskScheduler.js":1825}],1817:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").service("chromeApi",[function(){var a={isAvailable:Boolean(window.chrome),chrome:window.chrome};return a}])},{}],1818:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").service("discoveryTool",["$q","$rootScope","$timeout","bowser","chromeApi","DiscoveryToolBindingPortQueue","DiscoveryToolCheckDefaultCredentialsQueue","DiscoveryToolSshCommandQueue","DiscoveryToolUnifiCommandQueue","semanticVersion","DISCOVERY","DISCOVERY_TOOL","DISCOVERY_TOOL_EVENTS","DISCOVERY_TOOL_KEY","CHROME_EXTENSION_URL",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){this.init=function(){this.discoveryToolBindingPortQueue=null,this.discoveryToolCheckDefaultCredentialsQueue=null,this.discoveryToolSshCommandQueue=null,this.discoveryToolUnifiCommandQueue=null,this.extensionIsInstalled=!1,this.extensionVersion=null,this.extensionSupports={},this.isBusyLatch=0,this.isBusyLatchTimeouts=[],this.isFindingDevices=!1,this.isFindingCloudKeys=!1,this.port=null},this.checkDependencies=function(){return d.chrome&&!d.mobile&&e.isAvailable},this.checkInstalled=function(){return a(function(a,b){return this.port?void a():this.checkDependencies()?void e.chrome.runtime.sendMessage(n,"isInstalled",function(c){this.extensionIsInstalled=!(!c||!c.isInstalled),this.extensionVersion=c&&c.version,this.extensionSupports=c&&c.supports||{},this.extensionIsInstalled?a():b()}.bind(this)):void b()}.bind(this))},this.getInstallUrl=function(){return o+n},this.isConnected=function(){return!!this.port},this.install=function(){var b=this.getInstallUrl();return a(function(a,c){e.chrome.webstore.install(b,a,function(a){c({reason:a,url:b})})})},this.initializePort=function(){return this.port?a.when():(this.isBusyLatch+=1,this.port=e.chrome.runtime.connect(n),this.port.onMessage.addListener(p),this.port.onDisconnect.addListener(q),this.discoveryToolBindingPortQueue=new f(this.port,this.extensionSupports.concurrentMessages),this.discoveryToolCheckDefaultCredentialsQueue=new g(this.port,this.extensionSupports.concurrentMessages),this.discoveryToolSshCommandQueue=new h(this.port,this.extensionSupports.concurrentMessages),this.discoveryToolUnifiCommandQueue=new i(this.port,this.extensionSupports.concurrentMessages),a(function(a){c(function(){a(),console.info(m.CONNECTED),b.$broadcast(m.CONNECTED)},l.INITIALIZATION_TIMEOUT)})["finally"](function(){this.isBusyLatch-=1}.bind(this)))},this.onDeviceDiscovered=function(a){"DEVICE_DISCOVERED"===a.action&&(a.device.is_cloudkey===!0?c(function(){console.debug(m.CLOUD_KEY_DISCOVERED,a.device),b.$broadcast(m.CLOUD_KEY_DISCOVERED,a.device)},0):"UniFi"===a.device.family&&a.device.discovered_by===k.PROTOCOL_V2_ID&&c(function(){console.debug(m.DEVICE_DISCOVERED,a.device),b.$broadcast(m.DEVICE_DISCOVERED,a.device)},0))},this.scanForDevices=function(){return this.checkInstalled().then(this.initializePort.bind(this)).then(function(){return this.isFindingDevices=!0,console.info(m.ACTION_SCAN_FOR_DEVICES),this.isBusyLatch+=1,this.isBusyLatchTimeouts.push(c(function(){this.isBusyLatch-=1}.bind(this),l.FIND_DEVICES_TIMEOUT)),this.discoveryToolBindingPortQueue.postMessage()}.bind(this)).then(function(){this.port.postMessage({action:"SCAN"})}.bind(this))["catch"](function(b){return console.error(m.ACTION_SCAN_FOR_DEVICES,b),this.disconnect(),a.reject(b)}.bind(this))},this.scanForCloudKey=function(){return this.checkInstalled().then(this.initializePort.bind(this)).then(function(){this.isFindingCloudKeys=!0,console.info(m.ACTION_SCAN_FOR_CLOUD_KEY),this.isBusyLatch+=1,this.isBusyLatchTimeouts.push(c(function(){this.isBusyLatch-=1}.bind(this),l.FIND_CLOUD_KEY_TIMEOUT)),this.port.postMessage({action:"SCANv2"})}.bind(this))["catch"](function(b){return console.error(m.ACTION_SCAN_FOR_CLOUD_KEY,b),this.disconnect(),a.reject(b)}.bind(this))},this.locateFor30Seconds=function(b){return this.isBusyLatch+=1,this.checkInstalled().then(this.initializePort.bind(this)).then(function(){return console.info(m.ACTION_SCAN_FOR_LOCATE_FOR_30SECONDS,b),this.discoveryToolUnifiCommandQueue.postMessage(angular.extend({cmd:"locate"},b))}.bind(this))["catch"](function(b){return console.error(m.ACTION_SCAN_FOR_LOCATE_FOR_30SECONDS,b),a.reject(b)})["finally"](function(){this.isBusyLatch-=1}.bind(this))},this.reboot=function(b){return this.isBusyLatch+=1,this.checkInstalled().then(this.initializePort.bind(this)).then(function(){return console.info(m.ACTION_REBOOT,b),this.discoveryToolUnifiCommandQueue.postMessage(angular.extend({cmd:"reboot"},b))}.bind(this))["catch"](function(b){return console.error(m.ACTION_REBOOT,b),a.reject(b)})["finally"](function(){this.isBusyLatch-=1}.bind(this))},this.upgrade=function(b){return this.isBusyLatch+=1,this.checkInstalled().then(this.initializePort.bind(this)).then(function(){return console.info(m.ACTION_UPGRADE,b),this.discoveryToolUnifiCommandQueue.postMessage(angular.extend({cmd:"upgrade"},b))}.bind(this))["catch"](function(b){return console.error(m.ACTION_UPGRADE,b),a.reject(b)})["finally"](function(){this.isBusyLatch-=1}.bind(this))},this.restoreToFactoryDefaults=function(b){return this.isBusyLatch+=1,this.checkInstalled().then(this.initializePort.bind(this)).then(function(){return console.info(m.ACTION_RESTORE_TO_FACTORY_DEFAULTS,b),this.discoveryToolUnifiCommandQueue.postMessage(angular.extend({cmd:"reset"},b))}.bind(this))["catch"](function(b){return console.error(m.ACTION_RESTORE_TO_FACTORY_DEFAULTS,b),a.reject(b)})["finally"](function(){this.isBusyLatch-=1}.bind(this))},this.setInform=function(b){return this.isBusyLatch+=1,this.checkInstalled().then(this.initializePort.bind(this)).then(function(){return console.info(m.ACTION_SET_INFORM,b),this.discoveryToolUnifiCommandQueue.postMessage(angular.extend({cmd:"set-inform"},b))}.bind(this))["catch"](function(b){return console.error(m.ACTION_SET_INFORM,b),a.reject(b)})["finally"](function(){this.isBusyLatch-=1}.bind(this))},this.adoptCloudKey=function(b){return this.isBusyLatch+=1,this.checkInstalled().then(this.initializePort.bind(this)).then(function(){return console.info(m.ACTION_ADOPT_CLOUD_KEY,b),this.discoveryToolSshCommandQueue.postMessage(b)}.bind(this))["catch"](function(b){return console.error(m.ACTION_ADOPT_CLOUD_KEY,b),a.reject(b)})["finally"](function(){this.isBusyLatch-=1}.bind(this))},this.checkDefaultCredentials=function(b){return this.isBusyLatch+=1,a(function(a,d){var e=c(function(){d()},l.CHECK_CREDENTIALS_TIMEOUT);return this.checkInstalled().then(this.initializePort.bind(this)).then(function(){console.info(m.ACTION_CHECK_DEFAULT_CREDENTIALS,b),this.discoveryToolCheckDefaultCredentialsQueue.postMessage(b).then(a)["catch"](d)["finally"](function(){c.cancel(e)})}.bind(this))}.bind(this))["catch"](function(b){return console.error(m.ACTION_CHECK_DEFAULT_CREDENTIALS,b),a.reject(b)})["finally"](function(){this.isBusyLatch-=1}.bind(this))},this.disconnect=function(){this.port&&(this.port.onMessage.removeListener(p),this.port.onDisconnect.removeListener(q),this.port.disconnect(),console.info(m.DISCONNECTED),b.$broadcast(m.DISCONNECTED)),this.isBusyLatchTimeouts.forEach(function(a){c.cancel(a)}),this.init()},this.tryDisconnect=function(){return this.isBusyLatch<=0&&(this.disconnect(),!0)},this.isVersionHigherOrEqualThan=function(a){return j.satisfies(this.extensionVersion,">="+a)};var p=this.onDeviceDiscovered.bind(this),q=this.disconnect.bind(this);this.init()}])},{}],1819:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").service("discoveryToolUtils",["$q","$rootScope","$translate","discoveryTool","frame","heyToasts","VISIBILITY_CHANGE",function(a,b,c,d,e,f,g){this.checkInstallation=function(b){var c=b?{bypassFlag:function(){return b}}:{bypassFlag:angular.noop};return(d.checkDependencies()?a.when():a.reject())["catch"](function(){return e.show("discoveryToolChromeRequired",c)}).then(function(){return d.checkInstalled()["catch"](function(){return e.show("discoveryToolInstall",c)})})},this.startScanForDevices=function(){return d.scanForDevices()["catch"](function(){return e.show("discoveryToolPortAlreadyInUse",{retryAction:function(){return d.scanForDevices.bind(d)}})})},this.isFindingDevices=function(){return d.isFindingDevices},this.startScanForCloudKeys=function(){return d.scanForCloudKey()["catch"](function(){return e.show("discoveryToolPortAlreadyInUse",{retryAction:function(){return d.scanForCloudKey.bind(d)}})})},this.isFindingCloudKeys=function(){return d.isFindingCloudKeys},this.handleVisibilityChangeEvent=function(a,c){c===g.STATE.HIDDEN&&d.tryDisconnect()&&b.$applyAsync()},this.handleDisconnected=function(){f.pushWarning(c.instant("DISCOVERY_TOOL_WARNING_DISCONNECTED"))}}])},{}],1820:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").factory("DiscoveryToolBindingPortQueue",["PortMessageQueue","TaskScheduler",function(a,b){function c(c,d){this.portMessageQueue=new a(c,new b,d)}return c.prototype.postMessage=function(a){function b(a,b,c){return"BINDING_V2_PORT_SUCCESS"===a.action?(b(),!0):"BINDING_V2_PORT_FAILED"===a.action?(c(),!0):void 0}return this.portMessageQueue.postMessage("V2_SOCKET_STATE",a,b)},c}])},{}],1821:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").factory("DiscoveryToolCheckDefaultCredentialsQueue",["PortMessageQueue","TaskScheduler",function(a,b){function c(c,d){this.portMessageQueue=new a(c,new b,d)}return c.prototype.postMessage=function(a){function b(a,b,c){if("CREDENTIALS_CHECK_COMPLETED"===a.action)return a.code?c(a.code):b(!!a.isDefaultCredentials),!0}return this.portMessageQueue.postMessage("CHECK_SSH",a,b)},c}])},{}],1822:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").factory("DiscoveryToolSshCommandQueue",["PortMessageQueue","TaskScheduler",function(a,b){function c(c,d){this.portMessageQueue=new a(c,new b,d)}return c.prototype.postMessage=function(a){function b(a,b,c){if("SSH_COMMAND_COMPLETED"===a.action)return a.code?c(a.code):b(a.code),!0}return this.portMessageQueue.postMessage("SSH",a,b)},c}])},{}],1823:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").factory("DiscoveryToolUnifiCommandQueue",["PortMessageQueue","TaskScheduler",function(a,b){function c(c,d){this.portMessageQueue=new a(c,new b,d)}return c.prototype.postMessage=function(a){function b(a,b,c){if("UNIFI_COMMAND_COMPLETED"===a.action)return a.code?c(a.code):b(a.code),!0}return this.portMessageQueue.postMessage("UniFi_Command",a,b)},c}])},{}],1824:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").factory("PortMessageQueue",["$q","uuid",function(a,b){function c(a,b,c){this.port=a,this.taskScheduler=b,this.supportsConcurrentMessages=c}return c.prototype.postMessage=function(c,d,e){d=angular.extend({},d,{id:b.v4()});var f=function(a,b){var f=function(c){this.matchId(d,c)&&e(c,a,b)&&this.port.onMessage.removeListener(f)}.bind(this);this.port.onMessage.addListener(f),this.port.postMessage({action:c,params:d})}.bind(this);return this.supportsConcurrentMessages?a(f):this.taskScheduler.schedule(f)},c.prototype.matchId=function(a,b){return!this.supportsConcurrentMessages||a.id===b.id},c}])},{}],1825:[function(a,b,c){"use strict";angular.module("shared-unifi-discovery").factory("TaskScheduler",["$q",function(a){function b(){this.promiseQueue=[]}return b.prototype.schedule=function(b){var c=this.promiseQueue[this.promiseQueue.length-1],d=a(function(d,e){a.when(c)["finally"](b.bind(b,d,e))});return d.then(function(){this.promiseQueue.shift()}.bind(this)),this.promiseQueue.push(d),d},b.prototype.isBusy=function(){return!!this.promiseQueue.length},b}])},{}],1826:[function(a,b,c){"use strict";a("../shared-unifi/main"),angular.module("shared-unifi-manage",["shared-unifi"]),a("./services/collections/SettingsCollection.js"),a("./services/factories/SettingsModelFactory.js"),a("./services/models/SettingsModel.js")},{"../shared-unifi/main":1845,"./services/collections/SettingsCollection.js":1827,"./services/factories/SettingsModelFactory.js":1828,"./services/models/SettingsModel.js":1829}],1827:[function(a,b,c){"use strict";angular.module("shared-unifi-manage").factory("SettingsCollection",["CORSCollection","SettingsModel","SettingsModelFactory","siteUrlMixin","structureMixin","resolveMixin","webrtcMixin","webSocketMixin",function(a,b,c,d,e,f,g,h){return a.extend(d).extend(e).extend(f).extend(g).extend(h).extend({baseModel:b,model:c,siteUrl:"get/setting"})}])},{}],1828:[function(a,b,c){"use strict";angular.module("shared-unifi-manage").factory("SettingsModelFactory",["SettingsModel",function(a){return a}])},{}],1829:[function(a,b,c){"use strict";angular.module("shared-unifi-manage").factory("SettingsModel",["CORSModel","siteUrlMixin","deepCopyMixin","structureMixin","webrtcMixin","webSocketMixin",function(a,b,c,d,e,f){return a.extend(b).extend(c).extend(d).extend(e).extend(f).extend({idAttribute:"_id",siteUrl:function(){if(!this.get("key"))throw new Error("Cannot call without a settings key");return"set/setting/"+this.get("key")},sync:function(b,c,d){return d=d||{},"update"===b&&(d.type="POST"),a.prototype.sync.call(this,b,c,d)}})}])},{}],1830:[function(a,b,c){"use strict";angular.module("shared-unifi-map").directive("unifiAtlasDropzone",["$document","$window","domHelper","dragdrop",function(a,b,c,d){return{require:"atlasMap",link:function(a,e,f,g){f.$set("dropzone",f.unifiAtlasDropzone),g.getMap().then(function(f){var g,h=new b.google.maps.OverlayView,i=f.getDiv();i&&(h.draw=function(){},h.setMap(f),g=c.getOffsetFromTopOfPage(i),e.on("drop",function(c){c.preventDefault();var e=new b.google.maps.Point(c.originalEvent.clientX-g.left,c.originalEvent.clientY-g.top),f=h.getProjection().fromContainerPixelToLatLng(e);a.$apply(function(){d.fireCallback(c.originalEvent.dataTransfer.getData("text"),{$event:c.originalEvent,options:{latlng:f}})})}),e.on("dragover",function(a){return a.originalEvent.dataTransfer.dropEffect="move",a.preventDefault(),!1}),e.on("dragenter",function(a){a.preventDefault()}))})}}}])},{}],1831:[function(a,b,c){"use strict";angular.module("shared-unifi-map").directive("unifiAtlasEventHandler",["$parse","$window",function(a,b){return{scope:{handler:"&handler"},require:"^atlasMap",link:function(a,c,d,e){var f,g=d.event,h=a.handler();e.getMap().then(function(a){f=window.google.maps.event.addListener(a,g,function(b){var c=a.getCenter(),d={center:[c.lat(),c.lng()],zoom:a.getZoom(),mapTypeId:a.getMapTypeId()};h(d,b)})}),a.$on("$destroy",function(){b.google&&b.google.maps.event.removeListener(f)})}}}])},{}],1832:[function(a,b,c){"use strict";angular.module("shared-unifi-map").directive("unifiAtlasMapResizeOn",["atlas","EVENTS","$parse","$timeout",function(a,b,c,d){return{require:"^atlasMap",link:function(b,e,f,g){var h=c(f.unifiAtlasMapResizeOn)(b);a.getGoogleMaps().then(function(a){g.getMap().then(function(c){var e=function(){a.event.trigger(c,"resize")},f=[];h.forEach(function(a){f.push(b.$on(a,function(a,b){d(e,b)}))}),b.$on("$destroy",function(){f.forEach(function(a){a()})})})})}}}])},{}],1833:[function(a,b,c){"use strict";a("../shared-unifi/main"),angular.module("shared-unifi-map",["atlas","event","ng-unifi-ui","shared-unifi"]),a("./components/atlasDropzone/atlasDropzone.js"),a("./components/atlasEventHandler/atlasEventHandler.js"),a("./components/atlasMapResizeOn/atlasMapResizeOn.js"),a("./services/maps/DraggableOverlay.js")},{"../shared-unifi/main":1845,"./components/atlasDropzone/atlasDropzone.js":1830,"./components/atlasEventHandler/atlasEventHandler.js":1831,"./components/atlasMapResizeOn/atlasMapResizeOn.js":1832,"./services/maps/DraggableOverlay.js":1834}],1834:[function(a,b,c){"use strict";angular.module("shared-unifi-map").factory("DraggableOverlay",["atlas","$q","$window",function(a,b,c){var d=b.defer(),e=function(){var a=function(a,b,c){this.position=a,this.content=b,this.draggedHandler=c,this.isDragged=!1,this.dragEnabled=!0};return a.prototype=new c.google.maps.OverlayView,a.prototype.updatePosition=function(a){this.position=a,this.draw()},a.prototype.setDragHandler=function(a){this.dragHandler=a},a.prototype.setDragEnabled=function(a){this.dragEnabled=a},a.prototype.finishDragging=function(){this.dragEnabled&&this.getMap()&&this.getMap().set("draggable",!0),this.dragEnabled&&this.isDragged&&(this.container.classList.remove("unifiMapDraggableOverlay__dragged"),this.draggedHandler&&this.draggedHandler(this.position))},a.prototype.onAdd=function(){if(this.container=document.createElement("div"),this.container.classList.add("unifiMapDraggableOverlay"),this.content.nodeName)this.container.appendChild(this.content);else{if("string"!=typeof this.content)return;this.container.innerHTML=this.content}c.google.maps.event.addDomListener(this.container,"click",function(a){
this.isDragged&&(a.stopImmediatePropagation(),this.isDragged=!1,this.mouseDown=!1),this.getPanes().overlayImage.appendChild(this.container)}.bind(this),!0),c.google.maps.event.addDomListener(this.container,"mousedown",function(a){this.mouseDown?(this.finishDragging(),this.mouseDown=!1):this.dragEnabled&&(this.container.classList.add("unifiMapDraggableOverlay__dragged"),this.getMap().set("draggable",!1),this.origin=a,this.mouseDown=!0)}.bind(this)),c.google.maps.event.addDomListener(this.getMap().getDiv(),"mousemove",function(a){if(this.mouseDown){var b=this.origin.clientX-a.clientX,d=this.origin.clientY-a.clientY,e=this.getProjection().fromLatLngToDivPixel(this.position),f=this.getProjection().fromDivPixelToLatLng(new c.google.maps.Point(e.x-b,e.y-d));this.origin=a,this.position=f,this.draw(),this.dragHandler&&this.dragHandler(this.position),this.isDragged=!0}}.bind(this)),c.google.maps.event.addDomListener(this.getMap().getDiv(),"mouseleave",function(){this.mouseDown&&(this.finishDragging(),this.mouseDown=!1),this.isDragged=!1}.bind(this)),c.google.maps.event.addDomListener(this.getMap().getDiv(),"mouseup",function(){this.mouseDown&&(this.finishDragging(),this.mouseDown=!1)}.bind(this),!0),this.getPanes().overlayImage.appendChild(this.container)},a.prototype.draw=function(){var a=this.getProjection().fromLatLngToDivPixel(this.position);this.container.style.left=a.x+"px",this.container.style.top=a.y+"px"},a.prototype.onRemove=function(){this.container.parentNode.removeChild(this.container),this.container=void 0},a};return a.getGoogleMaps().then(function(){var a=e();d.resolve(a)}),d.promise}])},{}],1835:[function(a,b,c){"use strict";angular.module("shared-unifi-panel").directive("unifiOpenPanel",["panel",function(a){return{scope:{model:"=unifiOpenPanel",activeTab:"=?unifiOpenPanelActiveTab",isDisabled:"=?unifiOpenPanelIsDisabled",changeTab:"=?unifiOpenPanelChangeTab",activeAccordionGroup:"=?unifiOpenPanelActiveAccordionGroup",states:"=?unifiOpenPanelStates",allowPropagation:"=?unifiOpenPanelAllowPropagation"},restrict:"A",link:function(b,c){function d(){var a=[{state:"activeTab",value:b.activeTab,overwrite:b.changeTab},{state:"collapsed",value:!1,overwrite:!0}];return b.activeAccordionGroup&&a.push({state:"activeAccordionGroup",value:b.activeAccordionGroup,overwrite:!0}),b.states&&angular.isArray(b.states)&&b.states.forEach(function(b){angular.isObject(b)&&b.state&&b.value&&a.push(b)}),a}c.on("click",function(c){b.allowPropagation||(c.preventDefault(),c.stopPropagation()),b.model&&b.isDisabled!==!0&&b.$apply(function(){a.addItem(b.model,d())})})}}}])},{}],1836:[function(a,b,c){"use strict";angular.module("shared-unifi-panel").provider("panel",[function(){var a;this.setImplementation=function(b){a=b},this.$get=["$injector",function(b){return b.get(a)}]}])},{}],1837:[function(a,b,c){"use strict";a("../shared-unifi/main"),angular.module("shared-unifi-panel",["shared-unifi"]),a("./components/openPanel/openPanel.js"),a("./components/services/providers/panelProvider.js")},{"../shared-unifi/main":1845,"./components/openPanel/openPanel.js":1835,"./components/services/providers/panelProvider.js":1836}],1838:[function(a,b,c){a("jade/runtime");b.exports=function(a){var b=[];return b.push('<div><div ng-if="isLoading &amp;&amp; !failedToLoad" ng-class="{      \'appLoadingStatus--dark\': isDark,      \'appLoadingStatus--opaque\': isOpaque    }" class="appLoadingStatus"><div ng-class="{        \'appSpinner--large\': !isMedium,        \'appSpinner--medium\': isMedium,        \'appSpinner--dark\': !isDark      }" class="appSpinner"></div></div><div ng-if="failedToLoad" ng-class="{\'appLoadingStatus--dark\': isDark}" class="appLoadingStatus appLoadingStatus--opaque"><div ng-class="{\'appInfoBox--dark\': isDark}" class="appInfoBox appInfoBox--danger appInfoBox--noBorder"><div class="appInfoBox__icon icon ubnt-icon--alert"></div><div class="appInfoBox__content"><div translate="COMMON_NOTICE_LOAD_ERROR_TITLE" class="appInfoBox__header"></div><div class="appInfoBox__body"><p translate="COMMON_NOTICE_LOAD_ERROR_MESSAGE" class="noMarginBottom"></p></div><div class="appInfoBox__footer"><button translate="COMMON_ACTIONS_RETRY" ng-click="retry()" class="appMainButton appMainButton--primary appMainButton--cozy retryLoad"></button></div></div></div></div></div>'),b.join("")}},{"jade/runtime":232}],1839:[function(a,b,c){"use strict";angular.module("shared-unifi").directive("unifiLoadingStatus",[function(){return{scope:{isLoading:"=unifiLoadingStatusIsLoading",failedToLoad:"=unifiLoadingStatusFailed",retry:"&unifiLoadingStatusRetry",isDark:"=?unifiLoadingStatusIsDark",isOpaque:"=?unifiLoadingStatusIsOpaque",isMedium:"=?unifiLoadingStatusIsMedium"},template:a("./loadingStatus.jade")()}}])},{"./loadingStatus.jade":1838}],1840:[function(a,b,c){"use strict";angular.module("shared-unifi").directive("unifiPasswordReveal",[function(){return{link:function(a,b){b.on("focus",function(){b.attr("type","text")}),b.on("blur",function(){b.attr("type","password")})}}}])},{}],1841:[function(a,b,c){"use strict";angular.forEach(window.unifiSharedConstant,function(a,b){angular.module("shared-unifi").constant(b,a)})},{}],1842:[function(a,b,c){"use strict";angular.module("shared-unifi").constant("DISCOVERY",{CONTROLLER:0,PROTOCOL_V2_ID:2})},{}],1843:[function(a,b,c){"use strict";angular.module("shared-unifi").constant("EVENTS",{APP_REFRESH:"app-refresh",ADMIN_LOGOUT:"admin-logout",SITE_CONTEXT_SWITCH_START:"site-context-switch-start",SITE_CONTEXT_SWITCH_SUCCESS:"site-context-switch-success",SITE_CONTEXT_SWITCH_FAIL:"site-context-switch-fail",SITE_ADDED:"site-added",SITE_DELETED:"site-deleted",PENDING_CHANGES_CANCELLED:"pending-changes-cancelled",PENDING_CHANGES_APPLIED:"pending-changes-applied",LIST_STATE_CHANGE_START:"list-state-change-start",LIST_STATE_CHANGE_SUCCESS:"list-state-change-success",CLOSE_SIDE_NAV_POPOVERS:"close-side-nav-popovers",SYNC_REPEATABLE_COUNT:"sync-repeatable-count"})},{}],1844:[function(a,b,c){"use strict";angular.module("shared-unifi").constant("VISIBILITY_CHANGE",{EVENT:"VISIBILITY_CHANGE",STATE:{HIDDEN:"HIDDEN",VISIBLE:"VISIBLE"}})},{}],1845:[function(a,b,c){"use strict";angular.module("shared-unifi",["backular","pascalprecht.translate","ui.router"]),a("./components/loadingStatus/loadingStatus.js"),a("./components/passwordReveal/passwordReveal.js"),a("./config/env.js"),a("./constants/DISCOVERY.js"),a("./constants/EVENTS.js"),a("./constants/VISIBILITY_CHANGE.js"),a("./services/bowser.js"),a("./services/controllerMixins/listSelectAllControllerMixin.js"),a("./services/directiveMixins/updateModelDirectiveMixin.js"),a("./services/macAddressFormatter.js"),a("./services/mixins/deepCopyMixin.js"),a("./services/mixins/siteUrlMixin.js"),a("./services/mixins/structureMixin.js"),a("./services/mixins/webSocketMixin.js"),a("./services/mixins/webrtcMixin.js"),a("./services/models/SiteMgrModel.js"),a("./services/now.js"),a("./services/providers/siteProvider.js"),a("./services/semanticVersion.js"),a("./services/stateChangeInterceptor.js"),a("./services/uuid.js"),a("./services/visibilityChange.js"),a("./values/APP_EVENTS.js")},{"./components/loadingStatus/loadingStatus.js":1839,"./components/passwordReveal/passwordReveal.js":1840,"./config/env.js":1841,"./constants/DISCOVERY.js":1842,"./constants/EVENTS.js":1843,"./constants/VISIBILITY_CHANGE.js":1844,"./services/bowser.js":1846,"./services/controllerMixins/listSelectAllControllerMixin.js":1847,"./services/directiveMixins/updateModelDirectiveMixin.js":1848,"./services/macAddressFormatter.js":1849,"./services/mixins/deepCopyMixin.js":1850,"./services/mixins/siteUrlMixin.js":1851,"./services/mixins/structureMixin.js":1852,"./services/mixins/webSocketMixin.js":1853,"./services/mixins/webrtcMixin.js":1854,"./services/models/SiteMgrModel.js":1855,"./services/now.js":1856,"./services/providers/siteProvider.js":1857,"./services/semanticVersion.js":1858,"./services/stateChangeInterceptor.js":1859,"./services/uuid.js":1860,"./services/visibilityChange.js":1861,"./values/APP_EVENTS.js":1862}],1846:[function(a,b,c){"use strict";angular.module("shared-unifi").service("bowser",[function(){return a("bowser")}])},{bowser:1}],1847:[function(a,b,c){"use strict";angular.module("shared-unifi").factory("listSelectAllControllerMixin",[function(){return function(a,b,c,d){angular.extend(a,{selectedCollection:new b,areAllSelected:function(){return!c().find(function(a){return!this.isSelected(a)}.bind(this))},toggleSelectAll:function(){this.areAllSelected()?this.selectedCollection.reset():this.selectedCollection.add(c()),d(this.selectedCollection)},isSelected:function(a){return!!this.selectedCollection.get(a)},toggleSelect:function(a){this.isSelected(a)?this.selectedCollection.remove(a):this.selectedCollection.add(a),d(this.selectedCollection)}})}}])},{}],1848:[function(a,b,c){"use strict";angular.module("shared-unifi").service("updateModelDirectiveMixin",[function(){this.init=function(a,b,c,d,e){var f=a.$watch("model",function(a){d.updateModel(a),e&&a&&f()})}}])},{}],1849:[function(a,b,c){"use strict";angular.module("shared-unifi").service("macAddressFormatter",[function(){this.toCanonical=function(a){var b=17;return a?a.replace(/[:\-]/g,"").replace(/([^0-9A-Fa-f])/g,"").replace(/([0-9A-Fa-f]{2})/g,"$1:").replace(/:\s*$/,"").substring(0,b).toLowerCase():a}}])},{}],1850:[function(a,b,c){"use strict";angular.module("shared-unifi").factory("deepCopyMixin",["Backbone","_",function(a,b){var c=function(d){var e,f=c;if(d instanceof a.Model)d.visited||(d.visited=!0,e=f(d.attributes),delete d.visited);else if(d instanceof a.Collection)e=b.compact(d.map(f));else if(b.isArray(d))e=d.map(f);else if(b.isObject(d)){e={};for(var g in d)d.hasOwnProperty(g)&&(e[g]=f(d[g]))}else e=d;return e};return{_hasDeepCopyMixin:!0,deepAttributes:function(){return c(this)},deepCopy:function(){return new this.constructor(c(this))}}}])},{}],1851:[function(a,b,c){"use strict";angular.module("shared-unifi").factory("siteUrlMixin",["UnifiAPIBasePath","Backbone","_","site",function(a,b,c,d){return{_hasSiteUrlMixin:!0,_isActiveSiteOptional:!1,url:function(){return this.buildUrl()},buildUrl:function(e){e=angular.extend({siteUrl:c.result(this,"siteUrl")},e);var f=[a],g=this._forceSite||this.activeSite||d.getActiveSite();if(g)f.push("s",g);else if(!this._isActiveSiteOptional)throw new Error("Cannot call without a site name");if(this instanceof b.Model?this.siteUrlRoot?f.push(c.result(this,"siteUrlRoot")):(e.siteUrl?f.push(e.siteUrl):f=[c.result(this.collection,"url")],e.id=e.hasOwnProperty("id")?e.id:this.get(this.idAttribute),e.id&&f.push(e.id)):f.push(e.siteUrl),!c.last(f))throw new Error("Missing siteUrl property or function");return f.join("/")}}}])},{}],1852:[function(a,b,c){"use strict";angular.module("shared-unifi").factory("structureMixin",["_","Backbone",function(a,b){return{_hasStructureMixin:!0,parse:function(c){return c.data&&c.meta&&(this.meta=c.meta,c=c.data),this instanceof b.Model&&a.isArray(c)&&(c=c[0]),c}}}])},{}],1853:[function(a,b,c){"use strict";angular.module("shared-unifi").factory("webSocketMixin",[function(){return{_hasWebSocketMixin:!0,withWebSocket:!0}}])},{}],1854:[function(a,b,c){"use strict";angular.module("shared-unifi").factory("webrtcMixin",[function(){return{_hasWebRtcMixin:!0,withWebRTC:!0}}])},{}],1855:[function(a,b,c){"use strict";angular.module("shared-unifi").factory("SiteMgrModel",["CORSModel","siteUrlMixin","structureMixin","webrtcMixin","webSocketMixin",function(a,b,c,d,e){return a.extend(b).extend(c).extend(d).extend(e).extend({_isActiveSiteOptional:!0,siteUrl:"cmd/sitemgr"})}])},{}],1856:[function(a,b,c){"use strict";angular.module("shared-unifi").service("now",[function(){return function(){return Date.now()}}])},{}],1857:[function(a,b,c){"use strict";angular.module("shared-unifi").provider("site",[function(){var a;this.initActiveSite=function(b){a=b},this.$get=["$q",function(b){return{isSiteChanging:!1,getActiveSite:function(){return a},setActiveSite:function(c){return a=c,b.when()},clearActiveSite:function(){a=null}}}]}])},{}],1858:[function(a,b,c){"use strict";var d=a("semver");angular.module("shared-unifi").service("semanticVersion",[function(){function a(a){return a.split(".").slice(0,3).join(".")}this.satisfies=function(b,c){return b&&d.satisfies(a(b),c)}}])},{semver:241}],1859:[function(a,b,c){"use strict";angular.module("shared-unifi").service("stateChangeInterceptor",["ENV","$injector","$rootScope","site",function(a,b,c,d){function e(){this.isStateChanging=!1,c.$on("$stateChangeStart",this._stateChangeStartHandler.bind(this)),c.$on("$stateChangeSuccess",this._stateChangeSuccessHandler.bind(this)),c.$on("$stateChangeError",this._stateChangeErrorHandler.bind(this))}return e.prototype._stateChangeStartHandler=function(b,c,e,f,g){this.isStateChanging=!0,e=e||{},g=g||{},!e.hasOwnProperty("site")&&g.site&&(e.site=g.site),g&&e.site===g.site||(d.isSiteChanging=!0,d.setActiveSite(e.site,a.STORE_ACTIVE_SITE))},e.prototype._stateChangeSuccessHandler=function(a,c){this.isStateChanging=!1,d.isSiteChanging=!1,c&&c.defaultChildState&&b.get("$state").go(c.defaultChildState)},e.prototype._stateChangeErrorHandler=function(){this.isStateChanging=!1,d.isSiteChanging=!1},new e}])},{}],1860:[function(a,b,c){"use strict";angular.module("shared-unifi").service("uuid",[function(){return a("node-uuid")}])},{"node-uuid":239}],1861:[function(a,b,c){"use strict";angular.module("shared-unifi").service("visibilityChange",["$document","$rootScope","VISIBILITY_CHANGE",function(a,b,c){var d={focus:c.STATE.VISIBLE,focusin:c.STATE.VISIBLE,pageshow:c.STATE.VISIBLE,blur:c.STATE.HIDDEN,focusout:c.STATE.HIDDEN,pagehide:c.STATE.HIDDEN};this.startListening=function(){function e(a){var e;a=a||window.event,e=a.type in d?d[a.type]:this[f]?c.STATE.HIDDEN:c.STATE.VISIBLE,b.$broadcast(c.EVENT,e)}var f="hidden";f in a?a.addEventListener("visibilitychange",e):(f="mozHidden")in a?a.addEventListener("mozvisibilitychange",e):(f="webkitHidden")in a?a.addEventListener("webkitvisibilitychange",e):(f="msHidden")in a?a.addEventListener("msvisibilitychange",e):"onfocusin"in a?a.onfocusin=a.onfocusout=e:window.onpageshow=window.onpagehide=window.onfocus=window.onblur=e,void 0!==a[f]&&e({type:a[f]?"blur":"focus"})}}])},{}],1862:[function(a,b,c){"use strict";angular.module("shared-unifi").value("APP_EVENTS",{})},{}]},{},[1108]);