// Test for required ES6 features // Use an eval call to avoid a hard-fail on ES5 parsers. var ES6 = false; var esdir = "es5/"; try { // Use ES6 code if the ES6 class, let, destructive assignment and rest arguments are supported. eval("class $ES6 { constructor() { let b = true; this.b = b; } } var [ES6, esdir] = ((...args) => args)(new $ES6().b, '')"); } catch (e) { } // If crypto.subtle is not supported, try crypto.webkitSubtle instead. if (window.crypto && !window.crypto.subtle && window.crypto.webkitSubtle) window.crypto.subtle = window.crypto.webkitSubtle; if ((!window.crypto || !window.crypto.subtle) && window.SubtleCrypto) window.crypto = { subtle: window.SubtleCrypto } // If Web Crypto API is not supported we include a JS crypto library // https://code.google.com/p/crypto-js/ /* Disabled by default. Enable manually if your browser requires this. if (!window.crypto || !window.crypto.subtle) { document.write("