var AdminLTEOptions={controlSidebarOptions:{selector:"#adminlte-fakeselector"}};!function(e){var t=-1!==navigator.userAgent.indexOf("Firefox")||-1!==navigator.userAgent.indexOf("Gecko/"),r=!(void 0===e.u2f||!e.u2f.register);if(t&&r)e.u2f.isSupported=!0;else{var n,o=e.u2f||{};o.isSupported=!!(void 0!==o&&o.register||"undefined"!=typeof chrome&&chrome.runtime),o.EXTENSION_ID="kmendfapggjehodndflmmgagdbamhnfd",o.MessageTypes={U2F_REGISTER_REQUEST:"u2f_register_request",U2F_REGISTER_RESPONSE:"u2f_register_response",U2F_SIGN_REQUEST:"u2f_sign_request",U2F_SIGN_RESPONSE:"u2f_sign_response",U2F_GET_API_VERSION_REQUEST:"u2f_get_api_version_request",U2F_GET_API_VERSION_RESPONSE:"u2f_get_api_version_response"},o.ErrorCodes={OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},o.U2fRequest,o.U2fResponse,o.Error,o.Transport,o.Transports,o.SignRequest,o.SignResponse,o.RegisterRequest,o.RegisterResponse,o.RegisteredKey,o.GetJsApiVersionResponse,o.getMessagePort=function(e){if("undefined"!=typeof chrome&&chrome.runtime){var t={type:o.MessageTypes.U2F_SIGN_REQUEST,signRequests:[]};chrome.runtime.sendMessage(o.EXTENSION_ID,t,function(){chrome.runtime.lastError?o.getIframePort_(e):o.getChromeRuntimePort_(e)})}else o.isAndroidChrome_()?o.getAuthenticatorPort_(e):o.isIosChrome_()?o.getIosPort_(e):o.getIframePort_(e)},o.isAndroidChrome_=function(){var e=navigator.userAgent;return-1!=e.indexOf("Chrome")&&-1!=e.indexOf("Android")},o.isIosChrome_=function(){return["iPhone","iPad","iPod"].indexOf(navigator.platform)>-1},o.getChromeRuntimePort_=function(e){var t=chrome.runtime.connect(o.EXTENSION_ID,{includeTlsChannelId:!0});setTimeout(function(){e(new o.WrappedChromeRuntimePort_(t))},0)},o.getAuthenticatorPort_=function(e){setTimeout(function(){e(new o.WrappedAuthenticatorPort_)},0)},o.getIosPort_=function(e){setTimeout(function(){e(new o.WrappedIosPort_)},0)},o.WrappedChromeRuntimePort_=function(e){this.port_=e},o.formatSignRequest_=function(e,t,r,a,s){if(void 0===n||n<1.1){for(var i=[],p=0;p>3)),u,m,v);if(s&&"generateKey"===e&&"RSASSA-PKCS1-v1_5"===u.name&&(!u.modulusLength||u.modulusLength>=2048))return(o=d(o)).name="RSAES-PKCS1-v1_5",delete o.hash,r.generateKey(o,!0,["encrypt","decrypt"]).then(function(e){return Promise.all([r.exportKey("jwk",e.publicKey),r.exportKey("jwk",e.privateKey)])}).then(function(e){return e[0].alg=e[1].alg=y(u),e[0].key_ops=v.filter(E),e[1].key_ops=v.filter(A),Promise.all([r.importKey("jwk",e[0],u,!0,e[0].key_ops),r.importKey("jwk",e[1],u,m,e[1].key_ops)])}).then(function(e){return{publicKey:e[0],privateKey:e[1]}});if((s||a&&"SHA-1"===(u.hash||{}).name)&&"importKey"===e&&"jwk"===o&&"HMAC"===u.name&&"oct"===i.kty)return r.importKey("raw",f(l(i.k)),p,b[3],b[4]);if(s&&"importKey"===e&&("spki"===o||"pkcs8"===o))return r.importKey("jwk",function(e){var t=_(e),r=!1;t.length>2&&(r=!0,t.shift());var n={ext:!0};switch(t[0][0]){case"1.2.840.113549.1.1.1":var o=["n","e","d","p","q","dp","dq","qi"],a=_(t[1]);r&&a.shift();for(var s=0;s2&&(n=!0,a.unshift(new Uint8Array([0]))),r[0][0]="1.2.840.113549.1.1.1",t=a;break;default:throw new TypeError("Unsupported key type")}return r.push(new Uint8Array(m(t)).buffer),n?r.unshift(new Uint8Array([0])):r[1]={tag:3,value:r[1]},new Uint8Array(m(r)).buffer}(h(e))})),p}}),["encrypt","decrypt","sign","verify"].forEach(function(e){var t=r[e];r[e]=function(n,o,s,i){if(a&&(!s.byteLength||i&&!i.byteLength))throw new Error("Empy input is not allowed");var p,u=[].slice.call(arguments),c=d(n);if(a&&"decrypt"===e&&"AES-GCM"===c.name){var l=n.tagLength>>3;u[2]=(s.buffer||s).slice(0,s.byteLength-l),n.tag=(s.buffer||s).slice(s.byteLength-l)}u[1]=o._key;try{p=t.apply(r,u)}catch(e){return Promise.reject(e)}return a&&(p=new Promise(function(t,r){p.onabort=p.onerror=function(e){r(e)},p.oncomplete=function(r){r=r.target.result;if("encrypt"===e&&r instanceof AesGcmEncryptResult){var n=r.ciphertext,o=r.tag;(r=new Uint8Array(n.byteLength+o.byteLength)).set(new Uint8Array(n),0),r.set(new Uint8Array(o),n.byteLength),r=r.buffer}t(r)}})),p}}),a){var u=r.digest;r.digest=function(e,t){if(!t.byteLength)throw new Error("Empy input is not allowed");var n;try{n=u.call(r,e,t)}catch(e){return Promise.reject(e)}return n=new Promise(function(e,t){n.onabort=n.onerror=function(e){t(e)},n.oncomplete=function(t){e(t.target.result)}})},e.crypto=Object.create(t,{getRandomValues:{value:function(e){return t.getRandomValues(e)}},subtle:{value:r}}),e.CryptoKey=S}s&&(t.subtle=r,e.Crypto=n,e.SubtleCrypto=o,e.CryptoKey=S)}}}function c(e){return btoa(e).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function l(e){return e=(e+="===").slice(0,-e.length%4),atob(e.replace(/-/g,"+").replace(/_/g,"/"))}function f(e){for(var t=new Uint8Array(e.length),r=0;re.length)throw new RangeError("Malformed DER");var r,n=e[t.pos++],o=e[t.pos++];if(o>=128){if(o&=127,t.end-t.pos=128){var i=n;n=4;for(t.splice(o,0,i>>24&255,i>>16&255,i>>8&255,255&i);n>1&&!(i>>24);)i<<=8,n--;n<4&&t.splice(o,4-n),n|=128}return t.splice(o-2,2,r,n),t}function S(e,t,r,n){Object.defineProperties(this,{_key:{value:e},type:{value:e.type,enumerable:!0},extractable:{value:void 0===r?e.extractable:r,enumerable:!0},algorithm:{value:void 0===t?e.algorithm:t,enumerable:!0},usages:{value:void 0===n?e.usages:n,enumerable:!0}})}function E(e){return"verify"===e||"encrypt"===e||"wrapKey"===e}function A(e){return"sign"===e||"decrypt"===e||"unwrapKey"===e}}("undefined"==typeof window?"undefined"==typeof self?this:self:window);