CyberChef/Ciphers.js

252 lines
497 KiB
JavaScript
Raw Permalink Normal View History

/**
* CyberChef - The Cyber Swiss Army Knife
*
* @copyright Crown Copyright 2016
* @license Apache-2.0
*
* Copyright 2016 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1500)}({0:function(e,t,r){"use strict";var n=r(15),i=r.n(n),a=r(10),o=r(7),s=r(19),u=r(18);function c(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){c(a,n,i,o,s,"next",e)}function s(e){c(a,n,i,o,s,"throw",e)}o(void 0)})}}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/
var p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,r=null,n=[{key:"chr",value:function(e){if(e>65535){e-=65536;var t=String.fromCharCode(e>>>10&1023|55296);return e=56320|1023&e,t+String.fromCharCode(e)}return String.fromCharCode(e)}},{key:"ord",value:function(e){if(2===e.length){var t=e.charCodeAt(0),r=e.charCodeAt(1);if(t>=55296&&t<56320&&r>=56320&&r<57344)return 1024*(t-55296)+r-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(t);return n.fill(r),Array.prototype.map.call(e,function(e,t){n[t]=e}),n}},{key:"truncate",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-r.length)+r),e}},{key:"hex",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(t="string"==typeof t?e.ord(t):t).toString(16).padStart(r,"0")}},{key:"bin",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(t="string"==typeof t?e.ord(t):t).toString(2).padStart(r,"0")}},{key:"printable",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"object"==typeof window&&window.app&&!window.app.options.treatAsUtf8&&(t=e.byteArrayToChars(e.strToByteArray(t)));return t=t.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/
var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,t&&this._parseConfig(t)}var t,r,n;return t=e,n=[{key:"prepare",value:function(e,t){var r;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return i.a.parseEscapedChars(e);case"byteArray":return"string"==typeof e?(e=e.replace(/\s+/g,""),Object(a.c)(e)):e;case"number":if(r=parseFloat(e),isNaN(r))throw"Invalid ingredient value. Not a number: "+i.a.truncate(e.toString(),10);return r;default:return e}}}],(r=[{key:"_parseConfig",value:function(e){this.name=e.name,this.type=e.type,this.defaultValue=e.value,this.disabled=!!e.disabled,this.hint=e.hint||!1,this.rows=e.rows||!1,this.toggleValues=e.toggleValues,this.target=void 0!==e.target?e.target:null,this.defaultIndex=void 0!==e.defaultIndex?e.defaultIndex:0}},{key:"config",get:function(){return this._value}},{key:"value",set:function(t){this._value=e.prepare(t,this.type)},get:function(){return this._value}}])&&o(t.prototype,r),n&&o(t,n),e}();function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/
var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null}var t,r,i;return t=e,(r=[{key:"run",value:function(e,t){return e}},{key:"highlight",value:function(e,t){return!1}},{key:"highlightReverse",value:function(e,t){return!1}},{key:"present",value:function(e,t){return e}},{key:"addIngredient",value:function(e){this._ingList.push(e)}},{key:"inputType",set:function(e){this._inputType=n.a.typeEnum(e)},get:function(){return n.a.enumLookup(this._inputType)}},{key:"outputType",set:function(e){this._outputType=n.a.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)},get:function(){return n.a.enumLookup(this._outputType)}},{key:"presentType",set:function(e){this._presentType=n.a.typeEnum(e)},get:function(){return n.a.enumLookup(this._presentType)}},{key:"args",set:function(e){var t=this;e.forEach(function(e){var r=new s(e);t.addIngredient(r)})},get:function(){return this._ingList.map(function(e){var t={name:e.name,type:e.type,value:e.defaultValue};return e.toggleValues&&(t.toggleValues=e.toggleValues),e.hint&&(t.hint=e.hint),e.rows&&(t.rows=e.rows),e.disabled&&(t.disabled=e.disabled),e.target&&(t.target=e.target),e.defaultIndex&&(t.defaultIndex=e.defaultIndex),t})}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map(function(e){return e.config})}}},{key:"ingValues",set:function(e){var t=this;e.forEach(function(e,r){t._ingList[r].value=e})},get:function(){return this._ingList.map(function(e){return e.value})}},{key:"breakpoint",set:function(e){this._breakpoint=!!e},get:function(){return this._breakpoint}},{key:"disabled",set:function(e){this._disabled=!!e},get:function(){return this._disabled}},{key:"flowControl",get:function(){return this._flowControl},set:function(e){this._flowControl=!!e}},{key:"manualBake",get:function(){return this._manualBake},set:function(e){this._manualBake=!!e}}])&&u(t.prototype,r),i&&u(t,i),e}();t.a=c},10:function(e,t,r){"use strict";r.d(t,"c",function(){return i}),r.d(t,"b",function(){return a}),r.d(t,"a",function(){return o});var n=r(0);
/**
* Base64 functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";"string"==typeof e&&(e=n.a.strToByteArray(e)),t=n.a.expandAlphRange(t).join("");for(var r,i,a,o,s,u,c,l="",f=0;f<e.length;)o=(r=e[f++])>>2,s=(3&r)<<4|(i=e[f++])>>4,u=(15&i)<<2|(a=e[f++])>>6,c=63&a,isNaN(i)?u=c=64:isNaN(a)&&(c=64),l+=t.charAt(o)+t.charAt(s)+t.charAt(u)+t.charAt(c);return l}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e)return"string"===r?"":[];t=t||"A-Za-z0-9+/=",t=n.a.expandAlphRange(t).join("");var a,o,s,u,c,l,f=[],p=0;if(i){var h=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(h,"")}for(;p<e.length;)a=t.indexOf(e.charAt(p++))<<2|(u=-1===(u=t.indexOf(e.charAt(p++)||"="))?64:u)>>4,o=(15&u)<<4|(c=-1===(c=t.indexOf(e.charAt(p++)||"="))?64:c)>>2,s=(3&c)<<6|(l=-1===(l=t.indexOf(e.charAt(p++)||"="))?64:l),f.push(a),64!==c&&f.push(o),64!==l&&f.push(s);return"string"===r?n.a.byteArrayToUtf8(f):f}var o=[{name:"Standard (RFC 4648): A-Za-z0-9+/=",value:"A-Za-z0-9+/="},{name:"URL safe (RFC 4648 §5): A-Za-z0-9-_",value:"A-Za-z0-9-_"},{name:"Filename safe: A-Za-z0-9+-=",value:"A-Za-z0-9+\\-="},{name:"itoa64: ./0-9A-Za-z=",value:"./0-9A-Za-z="},{name:"XML: A-Za-z0-9_.",value:"A-Za-z0-9_."},{name:"y64: A-Za-z0-9._-",value:"A-Za-z0-9._-"},{name:"z64: 0-9a-zA-Z+/=",value:"0-9a-zA-Z+/="},{name:"Radix-64 (RFC 4880): 0-9A-Za-z+/=",value:"0-9A-Za-z+/="},{name:"Uuencoding: [space]-_",value:" -_"},{name:"Xxencoding: +-0-9A-Za-z",value:"+\\-0-9A-Za-z"},{name:"BinHex: !-,-0-689@A-NP-VX-Z[`a-fh-mp-r",value:"!-,-0-689@A-NP-VX-Z[`a-fh-mp-r"},{name:"ROT13: N-ZA-Mn-za-m0-9+/=",value:"N-ZA-Mn-za-m0-9+/="},{name:"UNIX crypt: ./0-9A-Za-z",value:"./0-9A-Za-z"}]},1071:function(e,t,r){var n;e.exports=(n=r(34),function(){if("function"==typeof ArrayBuffer){var e=n.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)}).prototype=e}}(),n.lib.WordArray)},1072:function(e,t,r){var n;e.exports=(n=r(34),function(){var e=n,t=e.lib.WordArray,r=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var a=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i<r;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],a=0;a<r;a+=2){var o=i(t[a>>>2]>>>16-a%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],a=0;a<r;a++)n[a>>>1]|=i(e.charCodeAt(a)<<16-a%2*16);return t.create(n,2*r)}}}(),n.enc.Utf16)},1073:function(e,t,r){var n,i,a,o,s,u;e.exports=(n=r(34),r(700),a=(i=n).lib.WordArray,o=i.algo,s=o.SHA256,u=o.SHA224=s.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=4,e}}),i.SHA224=s._createHelper(u),i.HmacSHA224=s._createHmacHelper(u),n.SHA224)},1074:function(e,t,r){var n,i,a,o,s,u,c,l;e.exports=(n=r(34),r(498),r(701),a=(i=n).x64,o=a.Word,s=a.WordArray,u=i.algo,c=u.SHA512,l=u.SHA384=c.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025)
/** @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.
*/
function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([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]),u=i.create([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]),c=i.create([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]),l=i.create([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]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),p=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,h,C,E,S,T,A,B,w,I,_=this._hash.words,k=f.words,R=p.words,N=s.words,L=u.words,D=c.words,O=l.words;for(S=a=_[0],T=o=_[1],A=h=_[2],B=C=_[3],w=E=_[4],r=0;r<80;r+=1)I=a+e[t+N[r]]|0,I+=r<16?d(o,h,C)+k[0]:r<32?y(o,h,C)+k[1]:r<48?g(o,h,C)+k[2]:r<64?v(o,h,C)+k[3]:m(o,h,C)+k[4],I=(I=b(I|=0,D[r]))+E|0,a=E,E=C,C=b(h,10),h=o,o=I,I=S+e[t+L[r]]|0,I+=r<16?m(T,A,B)+R[0]:r<32?v(T,A,B)+R[1]:r<48?g(T,A,B)+R[2]:r<64?y(T,A,B)+R[3]:d(T,A,B)+R[4],I=(I=b(I|=0,O[r]))+w|0,S=w,w=B,B=b(A,10),A=T,T=I;I=_[1]+h+B|0,_[1]=_[2]+C+w|0,_[2]=_[3]+E+S|0,_[3]=_[4]+a+T|0,_[4]=_[0]+o+A|0,_[0]=I},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,r){return e^t^r}function y(e,t,r){return e&t|~e&r}function g(e,t,r){return(e|~t)^r}function v(e,t,r){return e&r|t&~r}function m(e,t,r){return e^(t|~r)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(h),t.HmacRIPEMD160=a._createHmacHelper(h)}(Math),n.RIPEMD160)},1077:function(e,t,r){var n,i,a,o,s,u,c,l,f;e.exports=(n=r(34),r(581),r(582),a=(i=n).lib,o=a.Base,s=a.WordArray,u=i.algo,c=u.SHA1,l=u.HMAC,f=u.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=l.create(r.hasher,e),i=s.create(),a=s.create([1]),o=i.words,u=a.words,c=r.keySize,f=r.iterations;o.length<c;){var p=n.update(t).finalize(a);n.reset();for(var h=p.words,d=h.length,y=p,g=1;g<f;g++){y=n.finalize(y),n.reset();for(var v=y.words,m=0;m<d;m++)h[m]^=v[m]}i.concat(p),u[0]++}return i.sigBytes=4*c,i}}),i.PBKDF2=function(e,t,r){return f.create(r).compute(e,t)},n.PBKDF2)},1078:function(e,t,r){var n;e.exports=(n=r(34),r(77),n.mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,r,n){var i=this._iv;if(i){var a=i.slice(0);this._iv=void 0}else a=this._prevBlock;n.encryptBlock(a,0);for(var o=0;o<r;o++)e[t+o]^=a[o]}return e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i,n),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,a=e.slice(r,r+i);t.call(this,e,r,i,n),this._prevBlock=a}}),e}(),n.mode.CFB)},1079:function(e,t,r){var n,i,a;e.exports=(n=r(34),r(77),n.mode.CTR=(i=n.lib.BlockCipherMode.extend(),a=i.Encryptor=i.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0);var o=a.slice(0);r.encryptBlock(o,0),a[n-1]=a[n-1]+1|0
/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/
n.mode.CTRGladman=function(){var e=n.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var r=e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(o);var s=o.slice(0);n.encryptBlock(s,0);for(var u=0;u<i;u++)e[r+u]^=s[u]}});return e.Decryptor=r,e}(),n.mode.CTRGladman)},1081:function(e,t,r){var n,i,a;e.exports=(n=r(34),r(77),n.mode.OFB=(i=n.lib.BlockCipherMode.extend(),a=i.Encryptor=i.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,a=this._keystream;i&&(a=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(a,0);for(var o=0;o<n;o++)e[t+o]^=a[o]}}),i.Decryptor=a,i),n.mode.OFB)},1082:function(e,t,r){var n,i;e.exports=(n=r(34),r(77),n.mode.ECB=((i=n.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),n.mode.ECB)},1083:function(e,t,r){var n;e.exports=(n=r(34),r(77),n.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,a=r+i-1;e.clamp(),e.words[a>>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)},1084:function(e,t,r){var n;e.exports=(n=r(34),r(77),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},1085:function(e,t,r){var n;e.exports=(n=r(34),r(77),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},1086:function(e,t,r){var n;e.exports=(n=r(34),r(77),n.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){for(var t=e.words,r=e.sigBytes-1;!(t[r>>>2]>>>24-r%4*8&255);)r--;e.sigBytes=r+1}},n.pad.ZeroPadding)},1087:function(e,t,r){var n;e.exports=(n=r(34),r(77),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},1088:function(e,t,r){var n,i,a,o;e.exports=(n=r(34),r(77),a=(i=n).lib.CipherParams,o=i.enc.Hex,i.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return a.create({ciphertext:t})}},n.format.Hex)},1089:function(e,t,r){var n;e.exports=(n=r(34),r(419),r(420),r(329),r(77),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],u=[],c=[],l=[],f=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,a[d]=r;var y=e[r],g=e[y],v=e[g],m=257*e[d]^16843008*d;o[r]=m<<24|m>>>8,s[r]=m<<16|m>>>16,u[r]=m<<8|m>>>24,c[r]=m,m=16843009*v^65537*g^257*y^16843008*r,l[d]=m<<24|m>>>8,f[d]=m<<16|m>>>16,p[d]=m<<8|m>>>24,h[d]=m,r?(r=y^e[e[e[v^y]]],n^=e[e[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],y=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o<n;o++)if(o<r)a[o]=t[o];else{var s=a[o-1];o%r?r>6&&o%r==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=d[o/r|0]<<24),a[o]=a[o-r]^s}for(var u=this._invKeySchedule=[],c=0;c<n;c++)o=n-c,s=c%4?a[o]:a[o-4],u[c]=c<4||o<=4?s:l[i[s>>>24]]^f[i[s>>>16&255]]^p[i[s>>>8&255]]^h[i[255&s]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,u,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,p,h,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var u=thi
/**
* Custom error type for handling Dish type errors.
* i.e. where the Dish cannot be successfully translated between types
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var u=function(e){function t(){var e,r,a,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];return a=this,(r=!(s=(e=i(t)).call.apply(e,[this].concat(c)))||"object"!==n(s)&&"function"!=typeof s?o(a):s).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(o(o(r)),t),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s(Error)),t}();t.a=u},13:function(e,t,r){"use strict";r.d(t,"c",function(){return n}),r.d(t,"b",function(){return i}),r.d(t,"h",function(){return a}),r.d(t,"j",function(){return o}),r.d(t,"e",function(){return s}),r.d(t,"a",function(){return u}),r.d(t,"d",function(){return c}),r.d(t,"f",function(){return l}),r.d(t,"i",function(){return f}),r.d(t,"g",function(){return p});
/**
* Various delimiters
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/
var n=["Space","Comma","Semi-colon","Colon","Line feed","CRLF"],i=["Space","Comma","Semi-colon","Colon","Line feed","CRLF","None"],a=["Space","Line feed","CRLF","Forward slash","Backslash","Comma","Semi-colon","Colon"],o=["Line feed","CRLF","Forward slash","Backslash","Comma","Semi-colon","Colon"],s=["Line feed","CRLF","Space","Comma","Semi-colon","Colon","Nothing (separate chars)"],u=["Line feed","Space","Comma","Semi-colon","Colon","CRLF"],c=["Line feed","CRLF","Space","Comma"],l=["Line feed","CRLF","Space","Comma","Semi-colon"],f=[{name:"Comma",value:","},{name:"Space",value:" "},{name:"Line feed",value:"\\n"},{name:"CRLF",value:"\\r\\n"},{name:"Semi-colon",value:";"},{name:"Colon",value:":"},{name:"Nothing (separate chars)",value:""}],p=[{name:"Line feed",value:"\\n"},{name:"CRLF",value:"\\r\\n"},{name:"Space",value:" "},{name:"Comma",value:","},{name:"Semi-colon",value:";"},{name:"Colon",value:":"},{name:"Nothing (join chars)",value:""}]},14:function(e,t,r){var n,i;!function(a,o){"use strict";void 0===(i="function"==typeof(n=function(){var e=function(){},t="undefined",r=["trace","debug","info","warn","error"];function n(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function i(t,n){for(var i=0;i<r.length;i++){var a=r[i];this[a]=i<t?e:this.methodFactory(a,t,n)}this.log=this.debug}function a(r,a,o){return function(r){"debug"===r&&(r="log");return typeof console!==t&&(void 0!==console[r]?n(console,r):void 0!==console.log?n(console,"log"):e)}(r)||function(e,r,n){return function(){typeof console!==t&&(i.call(this,r,n),this[e].apply(this,arguments))}}.apply(this,arguments)}function o(e,n,o){var s,u=this,c="loglevel";function l(){var e;if(typeof window!==t){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===u.levels[e]&&(e=void 0),e}}e&&(c+=":"+e),u.name=e,u.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},u.methodFactory=o||a,u.getLevel=function(){return s},u.setLevel=function(n,a){if("string"==typeof n&&void 0!==u.levels[n.toUpperCase()]&&(n=u.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=u.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==a&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[c]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(e){}}(n),i.call(u,n,e),typeof console===t&&n<u.levels.SILENT)return"No console available for logging"},u.setDefaultLevel=function(e){l()||u.setLevel(e,!1)},u.enableAll=function(e){u.setLevel(u.levels.TRACE,e)},u.disableAll=function(e){u.setLevel(u.levels.SILENT,e)};var f=l();null==f&&(f=null==n?"WARN":n),u.setLevel(f,!1)}var s=new o,u={};s.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=u[e];return t||(t=u[e]=new o(e,s.getLevel(),s.methodFactory)),t};var c=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=c),s},s.getLoggers=function(){return u},s})?n.call(t,r,t,e):n)||(e.exports=i)}()},15:function(e,t,r){!function(e){var t,r,n,i=String.fromCharCode;function a(e){for(var t,r,n=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function o(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function u(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(o(e),t=i(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+=i(63&e|128)}function c(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e
/**
* @author Jarmo van Lenthe [github.com/jarmovanlenthe]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var p=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=c(this,l(t).call(this))).name="A1Z26 Cipher Decode",e.module="Ciphers",e.description="Converts alphabet order numbers into their corresponding alphabet character.<br><br>e.g. <code>1</code> becomes <code>a</code> and <code>2</code> becomes <code>b</code>.",e.infoURL="",e.inputType="string",e.outputType="string",e.args=[{name:"Delimiter",type:"option",value:a.c}],e}var r,s,p;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,n["a"]),r=t,(s=[{key:"run",value:function(e,t){var r=i.a.charRep(t[0]||"Space");if(0===e.length)return[];for(var n=e.split(r),a="",s=0;s<n.length;s++){if(n[s]<1||n[s]>26)throw new o.a("Error: all numbers must be between 1 and 26.");a+=i.a.chr(parseInt(n[s],10)+96)}return a}}])&&u(r.prototype,s),p&&u(r,p),t}();function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author Jarmo van Lenthe [github.com/jarmovanlenthe]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var m=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=y(this,g(t).call(this))).name="A1Z26 Cipher Encode",e.module="Ciphers",e.description="Converts alphabet characters into their corresponding alphabet order number.<br><br>e.g. <code>a</code> becomes <code>1</code> and <code>b</code> becomes <code>2</code>.<br><br>Non-alphabet characters are dropped.",e.infoURL="",e.inputType="string",e.outputType="string",e.args=[{name:"Delimiter",type:"option",value:a.c}],e}var r,o,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(t,n["a"]),r=t,(o=[{key:"run",value:function(e,t){for(var r=i.a.charRep(t[0]||"Space"),n="",a=e.toLowerCase(),o=i.a.strToCharcode(a),s=0;s<o.length;s++){var u=o[s]-96;u>0&&u<=26&&(n+=u.toString(10)+r)}return n.slice(0,-r.length)}}])&&d(r.prototype,o),s&&d(r,s),t}(),b=r(36),C=r.n(b);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function T(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var w=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=T(this,A(t).call(this))).name="AES Decrypt",e.module="Ciphers",e.description="Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated.<br><br><b>Key:</b> The following algorithms will be used based on the size of the key:<ul><li>16 bytes = AES-128</li><li>24 bytes = AES-192</li><li>32 bytes = AES-256</li></ul><br><br><b>IV:</b> The Initialization Vector should be 16 bytes long. If not entered, it will default to 16 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.<br><br><b>GCM Tag:</b> This field is ignored unless 'GCM' mode is used.",e.infoURL="https://wikipedia.org/wiki/Advanced_Encryption_Standard",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","GCM","ECB"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]},{name:"GCM Tag",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteArray(t[0].string,t[0].option),n=i.a.convertToByteArray(t[1].string,t[1].option),a=t[2],s=t[3],u=t[4],c=i.a.convertToByteString(t[5].string,t[5].option);if([16,24,32].indexOf(r.length)<0)throw new o.a("Invalid key length: ".concat(r.length," bytes\n\nThe following algorithms will be used based on the size of the key:\n 16 bytes = AES-128\n 24 bytes = AES-192\n 32 bytes = AES-256"));e=i.a.convertToByteString(e,s);var l=C.a.cipher.createDecipher("AES-"+a,r);if(l.start({iv:n,tag:c}),l.update(C.a.util.createBuffer(e)),l.finish())return"Hex"===u?l.output.toHex():l.output.getBytes();throw new o.a("Unable to decrypt input with these parameters.")}}])&&S(r.prototype,a),s&&S(r,s),t}();function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t){return!t||"object"!==I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var L=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=k(this,R(t).call(this))).name="AES Encrypt",e.module="Ciphers",e.description="Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated.<br><br><b>Key:</b> The following algorithms will be used based on the size of the key:<ul><li>16 bytes = AES-128</li><li>24 bytes = AES-192</li><li>32 bytes = AES-256</li></ul>You can generate a password-based key using one of the KDF operations.<br><br><b>IV:</b> The Initialization Vector should be 16 bytes long. If not entered, it will default to 16 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.",e.infoURL="https://wikipedia.org/wiki/Advanced_Encryption_Standard",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","GCM","ECB"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&N(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteArray(t[0].string,t[0].option),n=i.a.convertToByteArray(t[1].string,t[1].option),a=t[2],s=t[3],u=t[4];if([16,24,32].indexOf(r.length)<0)throw new o.a("Invalid key length: ".concat(r.length," bytes\n\nThe following algorithms will be used based on the size of the key:\n 16 bytes = AES-128\n 24 bytes = AES-192\n 32 bytes = AES-256"));e=i.a.convertToByteString(e,s);var c=C.a.cipher.createCipher("AES-"+a,r);return c.start({iv:n}),c.update(C.a.util.createBuffer(e)),c.finish(),"Hex"===u?"GCM"===a?c.output.toHex()+"\n\nTag: "+c.mode.tag.toHex():c.output.toHex():"GCM"===a?c.output.getBytes()+"\n\nTag: "+c.mode.tag.getBytes():c.output.getBytes()}}])&&_(r.prototype,a),s&&_(r,s),t}();function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function U(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t){return!t||"object"!==D(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var V=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=P(this,x(t).call(this))).name="Affine Cipher Decode",e.module="Ciphers",e.description="The Affine cipher is a type of monoalphabetic substitution cipher. To decrypt, each letter in an alphabet is mapped to its numeric equivalent, decrypted by a mathematical function, and converted back to a letter.",e.infoURL="https://wikipedia.org/wiki/Affine_cipher",e.inputType="string",e.outputType="string",e.args=[{name:"a",type:"number",value:1},{name:"b",type:"number",value:0}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r="abcdefghijklmnopqrstuvwxyz",n=O(t,2),a=n[0],s=n[1],u=i.a.modInv(a,26),c="";if(!/^\+?(0|[1-9]\d*)$/.test(a)||!/^\+?(0|[1-9]\d*)$/.test(s))throw new o.a("The values of a and b can only be integers.");if(1!==i.a.gcd(a,26))throw new o.a("The value of `a` must be coprime to 26.");for(var l=0;l<e.length;l++)r.indexOf(e[l])>=0?c+=r[i.a.mod((r.indexOf(e[l])-s)*u,26)]:r.indexOf(e[l].toLowerCase())>=0?c+=r[i.a.mod((r.indexOf(e[l].toLowerCase())-s)*u,26)].toUpperCase():c+=e[l];return c}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&U(r.prototype,a),s&&U(r,s),t}(),M=r(54),j=r.n(M);
/**
* Cipher functions.
*
* @author Matt C [matt@artemisbot.uk]
* @author n1474335 [n1474335@gmail.com]
*
* @copyright Crown Copyright 2018
* @license Apache-2.0
*
*/
function K(e,t){var r="abcdefghijklmnopqrstuvwxyz",n=t[0],i=t[1],a="";if(!/^\+?(0|[1-9]\d*)$/.test(n)||!/^\+?(0|[1-9]\d*)$/.test(i))throw new o.a("The values of a and b can only be integers.");for(var s=0;s<e.length;s++)r.indexOf(e[s])>=0?a+=r[(n*r.indexOf(e[s])+i)%26]:r.indexOf(e[s].toLowerCase())>=0?a+=r[(n*r.indexOf(e[s].toLowerCase())+i)%26].toUpperCase():a+=e[s];return a}function H(e){for(var t="".concat(e).concat("ABCDEFGHIKLMNOPQRSTUVWXYZ").split("").unique(),r=[],n=0;n<5;n++)r[n]=t.slice(5*n,5*n+5);return r}var z={Hex:j.a.enc.Hex,Base64:j.a.enc.Base64,UTF8:j.a.enc.Utf8,UTF16:j.a.enc.Utf16,UTF16LE:j.a.enc.Utf16LE,UTF16BE:j.a.enc.Utf16BE,Latin1:j.a.enc.Latin1};function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Y(e,t){return!t||"object"!==G(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var X=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Y(this,Q(t).call(this))).name="Affine Cipher Encode",e.module="Ciphers",e.description="The Affine cipher is a type of monoalphabetic substitution cipher, wherein each letter in an alphabet is mapped to its numeric equivalent, encrypted using simple mathematical function, <code>(ax + b) % 26</code>, and converted back to a letter.",e.infoURL="https://wikipedia.org/wiki/Affine_cipher",e.inputType="string",e.outputType="string",e.args=[{name:"a",type:"number",value:1},{name:"b",type:"number",value:0}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){return K(e,t)}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&q(r.prototype,i),a&&q(r,a),t}();function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var re=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=$(this,ee(t).call(this))).name="Atbash Cipher",e.module="Ciphers",e.description="Atbash is a mono-alphabetic substitution cipher originally used to encode the Hebrew alphabet. It has been modified here for use with the Latin alphabet.",e.infoURL="https://wikipedia.org/wiki/Atbash",e.inputType="string",e.outputType="string",e.args=[],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&te(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){return K(e,[25,25])}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&J(r.prototype,i),a&&J(r,a),t}();function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ae(e,t){return!t||"object"!==ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var ue=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=ae(this,oe(t).call(this))).name="Bifid Cipher Decode",e.module="Ciphers",e.description="The Bifid cipher is a cipher which uses a Polybius square in conjunction with transposition, which can be fairly difficult to decipher without knowing the alphabet keyword.",e.infoURL="https://wikipedia.org/wiki/Bifid_cipher",e.inputType="string",e.outputType="string",e.args=[{name:"Keyword",type:"string",value:""}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&se(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=t[0].toUpperCase().replace("J","I"),n=r.split("").unique(),i="ABCDEFGHIKLMNOPQRSTUVWXYZ",a=[],s="",u=0,c="";if(!/^[A-Z]+$/.test(r)&&n.length>0)throw new o.a("The key must consist only of letters in the English alphabet");var l=H(r);return e.replace("J","I").split("").forEach(function(e){var t,r=i.split("").indexOf(e.toLocaleUpperCase())>=0;if(r){for(var n=0;n<5;n++)(t=l[n].indexOf(e.toLocaleUpperCase()))>=0&&(c+="".concat(n).concat(t));i.split("").indexOf(e)>=0?a.push(!0):r&&a.push(!1)}else a.push(e)}),a.forEach(function(e){if("boolean"==typeof e){var t=[c[u],c[u+c.length/2]];s+=e?l[t[0]][t[1]]:l[t[0]][t[1]].toLocaleLowerCase(),u++}else s+=e}),s}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&ie(r.prototype,i),a&&ie(r,a),t}();function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fe(e,t){return!t||"object"!==ce(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var de=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=fe(this,pe(t).call(this))).name="Bifid Cipher Encode",e.module="Ciphers",e.description="The Bifid cipher is a cipher which uses a Polybius square in conjunction with transposition, which can be fairly difficult to decipher without knowing the alphabet keyword.",e.infoURL="https://wikipedia.org/wiki/Bifid_cipher",e.inputType="string",e.outputType="string",e.args=[{name:"Keyword",type:"string",value:""}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=t[0].toUpperCase().replace("J","I"),n=r.split("").unique(),i="ABCDEFGHIKLMNOPQRSTUVWXYZ",a=[],s=[],u=[],c="",l=0;if(!/^[A-Z]+$/.test(r)&&n.length>0)throw new o.a("The key must consist only of letters in the English alphabet");var f=H(r);e.replace("J","I").split("").forEach(function(e){var t,r=i.split("").indexOf(e.toLocaleUpperCase())>=0;if(r){for(var n=0;n<5;n++)(t=f[n].indexOf(e.toLocaleUpperCase()))>=0&&(a.push(t),s.push(n));i.split("").indexOf(e)>=0?u.push(!0):r&&u.push(!1)}else u.push(e)});var p="".concat(s.join("")).concat(a.join(""));return u.forEach(function(e){if("boolean"==typeof e){var t=p.substr(2*l,2).split("");c+=e?f[t[0]][t[1]]:f[t[0]][t[1]].toLocaleLowerCase(),l++}else c+=e}),c}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&le(r.prototype,i),a&&le(r,a),t}(),ye={cipherModes:{ECB:0,CBC:1,PCBC:2,CFB:3,OFB:4,CTR:5},outputTypes:{Base64:0,Hex:1,String:2,Raw:3}},ge={},ve="=",me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";ge.encode=function(e){for(var t=[],r=e.length,n=r%3,i=r-n,a=0;a<i;){var o=e[a++]<<16|e[a++]<<8|e[a++];t.push(me.charAt(o>>>18&63)),t.push(me.charAt(o>>>12&63)),t.push(me.charAt(o>>>6&63)),t.push(me.charAt(63&o))}switch(n){case 2:o=e[a++]<<16|e[a++]<<8;t.push(me.charAt(o>>>18&63)),t.push(me.charAt(o>>>12&63)),t.push(me.charAt(o>>>6&63)),t.push(ve);break;case 1:o=e[a++]<<16;t.push(me.charAt(o>>>18&63)),t.push(me.charAt(o>>>12&63)),t.push(ve),t.push(ve)}return t.join("")},ge.decode=function(e){for(var t=e.split(""),r=[],n=t.length;t[--n]==ve;);for(var i=0;i<n;){var a=me.indexOf(t[i++])<<18;i<=n&&(a|=me.indexOf(t[i++])<<12),i<=n&&(a|=me.indexOf(t[i++])<<6),i<=n&&(a|=me.indexOf(t[i++])),r.push(a>>>16&255),r.push(a>>>8&255),r.push(255&a)}for(;0==r[r.length-1];)r.pop();return r};var be={isString:function(e){return"string"==typeof e||e instanceof String}},Ce={map:function(e,t,r,n){var i=0,a=e&&e.length||0,o=new(n||Array)(a);if(a&&"string"==typeof e&&(e=e.split("")),"string"==typeof t&&(t=cache[t]||buildFn(t)),r)for(;i<a;++i)o[i]=t.call(r,e[i],i,e);else for(;i<a;++i)o[i]=t(e[i],i,e);return o}};ye.Blowfish=new function(){Math.pow(2,2),Math.pow(2,3),Math.pow(2,4);var e=Math.pow(2,8),t=Math.pow(2,16),r=Math.pow(2,24),n=null,i={p:[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s0:[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,221382
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Re={Base64:0,Hex:1,String:2,Raw:3},Ne={ECB:0,CBC:1,PCBC:2,CFB:3,OFB:4,CTR:5},Le=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Ie(this,_e(t).call(this))).name="Blowfish Decrypt",e.module="Ciphers",e.description="Blowfish is a symmetric-key block cipher designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. AES now receives more attention.<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.",e.infoURL="https://wikipedia.org/wiki/Blowfish_(cipher)",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","PCBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Hex","Base64","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ke(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=i.a.convertToByteArray(t[1].string,t[1].option),a=Be(t,5),s=a[2],u=a[3],c=a[4];if(0===r.length)throw new o.a("Enter a key");e="Raw"===u?i.a.strToByteArray(e):e,Ee.setIV(Object(Se.c)(n),0);var l=Ee.decrypt(e,r,{outputType:Re[u],cipherMode:Ne[s]});return"Hex"===c?Object(Te.e)(i.a.strToByteArray(l)):l}}])&&we(r.prototype,a),s&&we(r,s),t}();function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pe(e,t){return!t||"object"!==De(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fe(e,t){return(Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Ve={Base64:0,Hex:1,String:2,Raw:3},Me={ECB:0,CBC:1,PCBC:2,CFB:3,OFB:4,CTR:5},je=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Pe(this,xe(t).call(this))).name="Blowfish Encrypt",e.module="Ciphers",e.description="Blowfish is a symmetric-key block cipher designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. AES now receives more attention.<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.",e.infoURL="https://wikipedia.org/wiki/Blowfish_(cipher)",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","PCBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Base64","Raw"]}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fe(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=i.a.convertToByteArray(t[1].string,t[1].option),a=Oe(t,5),s=a[2],u=a[3],c=a[4];if(0===r.length)throw new o.a("Enter a key");e=i.a.convertToByteString(e,u),Ee.setIV(Object(Se.c)(n),0);var l=Ee.encrypt(e,r,{outputType:Ve[c],cipherMode:Me[s]});return"Raw"===c?i.a.byteArrayToChars(l):l}}])&&Ue(r.prototype,a),s&&Ue(r,s),t}();function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ge(e,t){return!t||"object"!==Ke(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ye(e,t){return(Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Qe=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Ge(this,qe(t).call(this))).name="DES Decrypt",e.module="Ciphers",e.description="DES is a previously dominant algorithm for encryption, and was published as an official U.S. Federal Information Processing Standard (FIPS). It is now considered to be insecure due to its small key size.<br><br><b>Key:</b> DES uses a key length of 8 bytes (64 bits).<br>Triple DES uses a key length of 24 bytes (192 bits).<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.",e.infoURL="https://wikipedia.org/wiki/Data_Encryption_Standard",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ye(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=i.a.convertToByteArray(t[1].string,t[1].option),a=He(t,5),s=a[2],u=a[3],c=a[4];if(8!==r.length)throw new o.a("Invalid key length: ".concat(r.length," bytes\n\nDES uses a key length of 8 bytes (64 bits).\nTriple DES uses a key length of 24 bytes (192 bits)."));e=i.a.convertToByteString(e,u);var l=C.a.cipher.createDecipher("DES-"+s,r);if(l.start({iv:n}),l.update(C.a.util.createBuffer(e)),l.finish())return"Hex"===c?l.output.toHex():l.output.getBytes();throw new o.a("Unable to decrypt input with these parameters.")}}])&&ze(r.prototype,a),s&&ze(r,s),t}();function We(e){return(We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Je(e,t){return!t||"object"!==We(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $e(e){return($e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e,t){return(et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var tt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Je(this,$e(t).call(this))).name="DES Encrypt",e.module="Ciphers",e.description="DES is a previously dominant algorithm for encryption, and was published as an official U.S. Federal Information Processing Standard (FIPS). It is now considered to be insecure due to its small key size.<br><br><b>Key:</b> DES uses a key length of 8 bytes (64 bits).<br>Triple DES uses a key length of 24 bytes (192 bits).<br><br>You can generate a password-based key using one of the KDF operations.<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.",e.infoURL="https://wikipedia.org/wiki/Data_Encryption_Standard",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&et(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=i.a.convertToByteArray(t[1].string,t[1].option),a=Xe(t,5),s=a[2],u=a[3],c=a[4];if(8!==r.length)throw new o.a("Invalid key length: ".concat(r.length," bytes\n\nDES uses a key length of 8 bytes (64 bits).\nTriple DES uses a key length of 24 bytes (192 bits)."));e=i.a.convertToByteString(e,u);var l=C.a.cipher.createCipher("DES-"+s,r);return l.start({iv:n}),l.update(C.a.util.createBuffer(e)),l.finish(),"Hex"===c?l.output.toHex():l.output.getBytes()}}])&&Ze(r.prototype,a),s&&Ze(r,s),t}();function rt(e){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function it(e,t){return!t||"object"!==rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function at(e){return(at=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ot(e,t){return(ot=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var st=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=it(this,at(t).call(this))).name="Derive EVP key",e.module="Ciphers",e.description="This operation performs a password-based key derivation function (PBKDF) used extensively in OpenSSL. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.<br><br>A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.<br><br>If you leave the salt argument empty, a random salt will be generated.",e.infoURL="https://wikipedia.org/wiki/Key_derivation_function",e.inputType="string",e.outputType="string",e.args=[{name:"Passphrase",type:"toggleString",value:"",toggleValues:["UTF8","Latin1","Hex","Base64"]},{name:"Key size",type:"number",value:128},{name:"Iterations",type:"number",value:1},{name:"Hashing function",type:"option",value:["SHA1","SHA256","SHA384","SHA512","MD5"]},{name:"Salt",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]}],e}var r,a,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ot(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=t[1]/32,a=t[2],o=t[3],s=i.a.convertToByteString(t[4].string,t[4].option);return j.a.EvpKDF(r,s,{keySize:n,hasher:j.a.algo[o],iterations:a}).toString(j.a.enc.Hex)}}])&&nt(r.prototype,a),o&&nt(r,o),t}();function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ct(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lt(e,t){return!t||"object"!==ut(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pt(e,t){return(pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/j.a.kdf.OpenSSL.execute=function(e,t,r,n){null==n&&(n=j.a.lib.WordArray.random(8));var i=j.a.algo.EvpKDF.create({keySize:t+r}).compute(e,n),a=j.a.lib.WordArray.create(i.words.slice(t),4*r);return i.sigBytes=4*t,j.a.lib.CipherParams.create({key:i,iv:a,salt:n})},j.a.enc.Hex.parse=function(e){for(var t=(e=e.replace(/\s/g,"")).length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new j.a.lib.WordArray.init(r,t/2)};var ht=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=lt(this,ft(t).call(this))).name="Derive PBKDF2 key",e.module="Ciphers",e.description="PBKDF2 is a password-based key derivation function. It is part of RSA Laboratories' Public-Key Cryptography Standards (PKCS) series, specifically PKCS #5 v2.0, also published as Internet Engineering Task Force's RFC 2898.<br><br>In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.<br><br>A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.<br><br>If you leave the salt argument empty, a random salt will be generated.",e.infoURL="https://wikipedia.org/wiki/PBKDF2",e.inputType="string",e.outputType="string",e.args=[{name:"Passphrase",type:"toggleString",value:"",toggleValues:["UTF8","Latin1","Hex","Base64"]},{name:"Key size",type:"number",value:128},{name:"Iterations",type:"number",value:1},{name:"Hashing function",type:"option",value:["SHA1","SHA256","SHA384","SHA512","MD5"]},{name:"Salt",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]}],e}var r,a,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pt(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=t[1],a=t[2],o=t[3],s=i.a.convertToByteString(t[4].string,t[4].option)||C.a.random.getBytesSync(n),u=C.a.pkcs5.pbkdf2(r,s,a,n/8,o.toLowerCase());return C.a.util.bytesToHex(u)}}])&&ct(r.prototype,a),o&&ct(r,o),t}(),dt=r(4),yt=r.n(dt);function gt(e){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function mt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bt(e,t){return!t||"object"!==gt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Et(e,t){return(Et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var St=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=bt(this,Ct(t).call(this))).name="Pseudo-Random Number Generator",e.module="Ciphers",e.description="A cryptographically-secure pseudo-random number generator (PRNG).<br><br>This operation uses the browser's built-in <code>crypto.getRandomValues()</code> method if available. If this cannot be found, it falls back to a Fortuna-based PRNG algorithm.",e.infoURL="https://wikipedia.org/wiki/Pseudorandom_number_generator",e.inputType="string",e.outputType="string",e.args=[{name:"Number of bytes",type:"number",value:32},{name:"Output as",type:"option",value:["Hex","Integer","Byte array","Raw"]}],e}var r,a,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Et(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r,n=vt(t,2),a=n[0],o=n[1];"function"==typeof importScripts&&self.crypto?(r=self.crypto.getRandomValues(new Uint8Array(a)),r=i.a.arrayBufferToStr(r.buffer)):r=C.a.random.getBytesSync(a);var s,u=new yt.a(0);switch(o){case"Hex":return C.a.util.bytesToHex(r);case"Integer":for(s=r.length-1;s>=0;s--)u=u.times(256).plus(r.charCodeAt(s));return u.toFixed();case"Byte array":return JSON.stringify(i.a.strToCharcode(r));case"Raw":default:return r}}}])&&mt(r.prototype,a),o&&mt(r,o),t}();function Tt(e){return(Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function At(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Bt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wt(e,t){return!t||"object"!==Tt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function It(e){return(It=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _t(e,t){return(_t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var kt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=wt(this,It(t).call(this))).name="RC2 Decrypt",e.module="Ciphers",e.description="RC2 (also known as ARC2) is a symmetric-key block cipher designed by Ron Rivest in 1987. 'RC' stands for 'Rivest Cipher'.<br><br><b>Key:</b> RC2 uses a variable size key.<br><br><b>IV:</b> To run the cipher in CBC mode, the Initialization Vector should be 8 bytes long. If the IV is left blank, the cipher will run in ECB mode.<br><br><b>Padding:</b> In both CBC and ECB mode, PKCS#7 padding will be used.",e.infoURL="https://wikipedia.org/wiki/RC2",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]}],e}var r,a,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_t(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=i.a.convertToByteString(t[1].string,t[1].option),a=At(t,4),o=a[2],s=a[3],u=C.a.rc2.createDecryptionCipher(r);return e=i.a.convertToByteString(e,o),u.start(n||null),u.update(C.a.util.createBuffer(e)),u.finish(),"Hex"===s?u.output.toHex():u.output.getBytes()}}])&&Bt(r.prototype,a),o&&Bt(r,o),t}();function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Lt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Dt(e,t){return!t||"object"!==Rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ot(e){return(Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ut(e,t){return(Ut=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Pt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Dt(this,Ot(t).call(this))).name="RC2 Encrypt",e.module="Ciphers",e.description="RC2 (also known as ARC2) is a symmetric-key block cipher designed by Ron Rivest in 1987. 'RC' stands for 'Rivest Cipher'.<br><br><b>Key:</b> RC2 uses a variable size key.<br><br>You can generate a password-based key using one of the KDF operations.<br><br><b>IV:</b> To run the cipher in CBC mode, the Initialization Vector should be 8 bytes long. If the IV is left blank, the cipher will run in ECB mode.<br><br><b>Padding:</b> In both CBC and ECB mode, PKCS#7 padding will be used.",e.infoURL="https://wikipedia.org/wiki/RC2",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],e}var r,a,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ut(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=i.a.convertToByteString(t[1].string,t[1].option),a=Nt(t,4),o=a[2],s=a[3],u=C.a.rc2.createEncryptionCipher(r);return e=i.a.convertToByteString(e,o),u.start(n||null),u.update(C.a.util.createBuffer(e)),u.finish(),"Hex"===s?u.output.toHex():u.output.getBytes()}}])&&Lt(r.prototype,a),o&&Lt(r,o),t}();function xt(e){return(xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ft(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vt(e,t){return!t||"object"!==xt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mt(e){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jt(e,t){return(jt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Kt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Vt(this,Mt(t).call(this))).name="RC4",e.module="Ciphers",e.description="RC4 (also known as ARC4) is a widely-used stream cipher designed by Ron Rivest. It is used in popular protocols such as SSL and WEP. Although remarkable for its simplicity and speed, the algorithm's history doesn't inspire confidence in its security.",e.infoURL="https://wikipedia.org/wiki/RC4",e.inputType="string",e.outputType="string",e.args=[{name:"Passphrase",type:"toggleString",value:"",toggleValues:["UTF8","UTF16","UTF16LE","UTF16BE","Latin1","Hex","Base64"]},{name:"Input format",type:"option",value:["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]},{name:"Output format",type:"option",value:["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jt(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=z[t[1]].parse(e),n=z[t[0].option].parse(t[0].string);return j.a.RC4.encrypt(r,n).ciphertext.toString(z[t[2]])}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&Ft(r.prototype,i),a&&Ft(r,a),t}();function Ht(e){return(Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Gt(e,t){return!t||"object"!==Ht(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qt(e){return(qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yt(e,t){return(Yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Qt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Gt(this,qt(t).call(this))).name="RC4 Drop",e.module="Ciphers",e.description="It was discovered that the first few bytes of the RC4 keystream are strongly non-random and leak information about the key. We can defend against this attack by discarding the initial portion of the keystream. This modified algorithm is traditionally called RC4-drop.",e.infoURL="https://wikipedia.org/wiki/RC4#Fluhrer,_Mantin_and_Shamir_attack",e.inputType="string",e.outputType="string",e.args=[{name:"Passphrase",type:"toggleString",value:"",toggleValues:["UTF8","UTF16","UTF16LE","UTF16BE","Latin1","Hex","Base64"]},{name:"Input format",type:"option",value:["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]},{name:"Output format",type:"option",value:["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]},{name:"Number of bytes to drop",type:"number",value:768}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yt(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=z[t[1]].parse(e),n=z[t[0].option].parse(t[0].string),i=t[3];return j.a.RC4Drop.encrypt(r,n,{drop:i}).ciphertext.toString(z[t[2]])}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&zt(r.prototype,i),a&&zt(r,a),t}();function Wt(e){return(Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zt(e,t){return!t||"object"!==Wt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jt(e){return(Jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $t(e,t){return($t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var er=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Zt(this,Jt(t).call(this))).name="Triple DES Decrypt",e.module="Ciphers",e.description="Triple DES applies DES three times to each block to increase key size.<br><br><b>Key:</b> Triple DES uses a key length of 24 bytes (192 bits).<br>DES uses a key length of 8 bytes (64 bits).<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.",e.infoURL="https://wikipedia.org/wiki/Triple_DES",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$t(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=i.a.convertToByteArray(t[1].string,t[1].option),a=t[2],s=t[3],u=t[4];if(24!==r.length)throw new o.a("Invalid key length: ".concat(r.length," bytes\n\nTriple DES uses a key length of 24 bytes (192 bits).\nDES uses a key length of 8 bytes (64 bits)."));e=i.a.convertToByteString(e,s);var c=C.a.cipher.createDecipher("3DES-"+a,r);if(c.start({iv:n}),c.update(C.a.util.createBuffer(e)),c.finish())return"Hex"===u?c.output.toHex():c.output.getBytes();throw new o.a("Unable to decrypt input with these parameters.")}}])&&Xt(r.prototype,a),s&&Xt(r,s),t}();function tr(e){return(tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nr(e,t){return!t||"object"!==tr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ir(e){return(ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ar(e,t){return(ar=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var or=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=nr(this,ir(t).call(this))).name="Triple DES Encrypt",e.module="Ciphers",e.description="Triple DES applies DES three times to each block to increase key size.<br><br><b>Key:</b> Triple DES uses a key length of 24 bytes (192 bits).<br>DES uses a key length of 8 bytes (64 bits).<br><br>You can generate a password-based key using one of the KDF operations.<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.",e.infoURL="https://wikipedia.org/wiki/Triple_DES",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],e}var r,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ar(e,t)}(t,n["a"]),r=t,(a=[{key:"run",value:function(e,t){var r=i.a.convertToByteString(t[0].string,t[0].option),n=i.a.convertToByteArray(t[1].string,t[1].option),a=t[2],s=t[3],u=t[4];if(24!==r.length)throw new o.a("Invalid key length: ".concat(r.length," bytes\n\nTriple DES uses a key length of 24 bytes (192 bits).\nDES uses a key length of 8 bytes (64 bits)."));e=i.a.convertToByteString(e,s);var c=C.a.cipher.createCipher("3DES-"+a,r);return c.start({iv:n}),c.update(C.a.util.createBuffer(e)),c.finish(),"Hex"===u?c.output.toHex():c.output.getBytes()}}])&&rr(r.prototype,a),s&&rr(r,s),t}();function sr(e){return(sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ur(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cr(e,t){return!t||"object"!==sr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lr(e){return(lr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fr(e,t){return(fr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var pr=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=cr(this,lr(t).call(this))).name="Vigenère Decode",e.module="Ciphers",e.description="The Vigenere cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution.",e.infoURL="https://wikipedia.org/wiki/Vigenère_cipher",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"string",value:""}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fr(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r,n,i,a="abcdefghijklmnopqrstuvwxyz",s=t[0].toLowerCase(),u="",c=0;if(!s)throw new o.a("No key entered");if(!/^[a-zA-Z]+$/.test(s))throw new o.a("The key must consist only of letters");for(var l=0;l<e.length;l++)a.indexOf(e[l])>=0?(i=s[(l-c)%s.length],r=a.indexOf(i),n=a.indexOf(e[l]),u+=a[(n-r+a.length)%26]):a.indexOf(e[l].toLowerCase())>=0?(i=s[(l-c)%s.length].toLowerCase(),r=a.indexOf(i),n=a.indexOf(e[l].toLowerCase()),u+=a[(n+a.length-r)%26].toUpperCase()):(u+=e[l],c++);return u}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&ur(r.prototype,i),a&&ur(r,a),t}();function hr(e){return(hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yr(e,t){return!t||"object"!==hr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gr(e){return(gr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vr(e,t){return(vr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var mr=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=yr(this,gr(t).call(this))).name="Vigenère Encode",e.module="Ciphers",e.description="The Vigenere cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution.",e.infoURL="https://wikipedia.org/wiki/Vigenère_cipher",e.inputType="string",e.outputType="string",e.args=[{name:"Key",type:"string",value:""}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vr(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r,n,i,a="abcdefghijklmnopqrstuvwxyz",s=t[0].toLowerCase(),u="",c=0;if(!s)throw new o.a("No key entered");if(!/^[a-zA-Z]+$/.test(s))throw new o.a("The key must consist only of letters");for(var l=0;l<e.length;l++)a.indexOf(e[l])>=0?(i=s[(l-c)%s.length],r=a.indexOf(i),n=a.indexOf(e[l]),u+=a[(r+n)%26]):a.indexOf(e[l].toLowerCase())>=0?(i=s[(l-c)%s.length].toLowerCase(),r=a.indexOf(i),n=a.indexOf(e[l].toLowerCase()),u+=a[(r+n)%26].toUpperCase()):(u+=e[l],c++);return u}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}])&&dr(r.prototype,i),a&&dr(r,a),t}(),br="undefined"==typeof self?{}:self.OpModules||{};br.Ciphers={"A1Z26 Cipher Decode":p,"A1Z26 Cipher Encode":m,"AES Decrypt":w,"AES Encrypt":L,"Affine Cipher Decode":V,"Affine Cipher Encode":X,"Atbash Cipher":re,"Bifid Cipher Decode":ue,"Bifid Cipher Encode":de,"Blowfish Decrypt":Le,"Blowfish Encrypt":je,"DES Decrypt":Qe,"DES Encrypt":tt,"Derive EVP key":st,"Derive PBKDF2 key":ht,"Pseudo-Random Number Generator":St,"RC2 Decrypt":kt,"RC2 Encrypt":Pt,RC4:Kt,"RC4 Drop":Qt,"Triple DES Decrypt":er,"Triple DES Encrypt":or,"Vigenère Decode":pr,"Vigenère Encode":mr};t.default=br},17:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},18:function(e,t,r){"use strict";r.d(t,"b",function(){return i}),r.d(t,"a",function(){return a});var n=r(0);
/**
* Binary functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(!e)return"";t=n.a.charRep(t);for(var i="",a=0;a<e.length;a++)i+=e[a].toString(2).padStart(r,"0")+t;return t.length?i.slice(0,-t.length):i}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,i=n.a.regexRep(t);e=e.replace(i,"");for(var a=[],o=0;o<e.length;o+=r)a.push(parseInt(e.substr(o,r),2));return a}},19:function(e,t,r){"use strict";r.d(t,"a",function(){return i});var n=r(0);
/**
* Decimal functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto";t=n.a.charRep(t);var r=[],i=e.split(t);""===i[i.length-1]&&(i=i.slice(0,i.length-1));for(var a=0;a<i.length;a++)r[a]=parseInt(i[a],10);return r}},21:function(e,t){var r,n,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=s(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new d(e,t)),1!==c.length||l||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},3:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}
/**
* Custom error type for handling operation input errors.
* i.e. where the operation can handle the error and print a message to the screen.
*
* @author d98762625 [d98762625@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var u=function(e){function t(){var e,r,a,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];return a=this,(r=!(s=(e=i(t)).call.apply(e,[this].concat(c)))||"object"!==n(s)&&"function"!=typeof s?o(a):s).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(o(o(r)),t),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,s(Error)),t}();t.a=u},329:function(e,t,r){var n,i,a,o,s,u,c,l;e.exports=(n=r(34),r(581),r(582),a=(i=n).lib,o=a.Base,s=a.WordArray,u=i.algo,c=u.MD5,l=u.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),i=s.create(),a=i.words,o=r.keySize,u=r.iterations;a.length<o;){c&&n.update(c);var c=n.update(e).finalize(t);n.reset();for(var l=1;l<u;l++)c=n.finalize(c),n.reset();i.concat(c)}return i.sigBytes=4*o,i}}),i.EvpKDF=function(e,t,r){return l.create(r).compute(e,t)},n.EvpKDF)},34:function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},a=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a<i;a++){var o=r[a>>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var a=0;a<i;a+=4)t[n+a>>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var t=t,r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a<t;a+=4){var s=i(4294967296*(r||e.random()));r=987654071*s(),n.push(4294967296*s()|0)}return new o.init(n,t)}}),s=n.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=4*a,u=i/s,c=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*a,l=e.min(4*c,i);if(c){for(var f=0;f<c;f+=a)this._doProcessBlock(n,f);var p=n.splice(0,c);r.s
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var n=r(58),i=r(59),a=r(60);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=p(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(t,r),i=(e=s(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|h(t.length);return 0===(e=s(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):p(e,t);if("Buffer"===t.type&&a(t.data))return p(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function p(e,t){var r=t.length<0?0:0|h(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function h(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(e).length;default:if(n)return M(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,p=0;p<u;p++)if(c(e,a+p)!==c(t,p)){f=!1;break}if(f)return a}return-1}function m(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex s
/**
* Hexadecimal functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!e)return"";for(var n="",i=0;i<e.length;i++)n+=e[i].toString(16).padStart(r,"0")+t;return"0x"===t&&(n="0x"+n),"\\x"===t&&(n="\\x"+n),t.length?n.slice(0,-t.length):n}function a(e){if(!e)return"";for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if("None"!==t){var i="Auto"===t?/[^a-f\d]/gi:n.a.regexRep(t);e=e.replace(i,"")}for(var a=[],o=0;o<e.length;o+=r)a.push(parseInt(e.substr(o,r),16));return a}var s=["Space","Comma","Semi-colon","Colon","Line feed","CRLF","0x","\\x","None"],u=["Auto"].concat(s)},700:function(e,t,r){var n;e.exports=(n=r(34),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],l=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],l=r[5],f=r[6],p=r[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var d=c[h-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,g=c[h-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[h]=y+c[h-7]+v+c[h-16]}var m=n&i^n&a^i&a,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),C=p+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+u[h]+c[h];p=f,f=l,l=s,s=o+C|0,o=a,a=i,i=n,n=C+(b+m)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(l),t.HmacSHA256=a._createHmacHelper(l)}(Math),n.SHA256)},701:function(e,t,r){var n;e.exports=(n=r(34),r(498),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,a=r.WordArray,o=e.algo;function s(){return i.create.apply(i,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(11641
/**
* @author n1474335 [n1474335@gmail.com]
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/
var p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=[],this.type=e.BYTE_ARRAY,t&&t.hasOwnProperty("value")&&t.hasOwnProperty("type")&&this.set(t.value,t.type)}var t,r,a;return t=e,r=[{key:"set",value:function(t,r){if("string"==typeof r&&(r=e.typeEnum(r)),u.a.debug("Dish type: "+e.enumLookup(r)),this.value=t,this.type=r,!this.valid()){var a=n.a.truncate(JSON.stringify(this.value),13);throw new i.a("Data is not a valid ".concat(e.enumLookup(r),": ").concat(a))}}},{key:"get",value:function(){var t=l(regeneratorRuntime.mark(function t(r){var n,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],"string"==typeof r&&(r=e.typeEnum(r)),this.type===r){t.next=5;break}return t.next=5,this._translate(r,n);case 5:return t.abrupt("return",this.value);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"_translate",value:function(){var t=l(regeneratorRuntime.mark(function t(r){var a,s,c=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a=c.length>1&&void 0!==c[1]&&c[1],u.a.debug("Translating Dish from ".concat(e.enumLookup(this.type)," to ").concat(e.enumLookup(r))),s=a?n.a.byteArrayToChars:n.a.byteArrayToUtf8,t.prev=3,t.t0=this.type,t.next=t.t0===e.STRING?7:t.t0===e.NUMBER?9:t.t0===e.HTML?11:t.t0===e.ARRAY_BUFFER?13:t.t0===e.BIG_NUMBER?15:t.t0===e.JSON?17:t.t0===e.FILE?19:t.t0===e.LIST_FILE?24:30;break;case 7:return this.value=this.value?n.a.strToByteArray(this.value):[],t.abrupt("break",31);case 9:return this.value="number"==typeof this.value?n.a.strToByteArray(this.value.toString()):[],t.abrupt("break",31);case 11:return this.value=this.value?n.a.strToByteArray(n.a.unescapeHtml(n.a.stripHtmlTags(this.value,!0))):[],t.abrupt("break",31);case 13:return this.value=Array.prototype.slice.call(new Uint8Array(this.value)),t.abrupt("break",31);case 15:return this.value=o.a.isBigNumber(this.value)?n.a.strToByteArray(this.value.toFixed()):[],t.abrupt("break",31);case 17:return this.value=this.value?n.a.strToByteArray(JSON.stringify(this.value,null,4)):[],t.abrupt("break",31);case 19:return t.next=21,n.a.readFile(this.value);case 21:return this.value=t.sent,this.value=Array.prototype.slice.call(this.value),t.abrupt("break",31);case 24:return t.next=26,Promise.all(this.value.map(function(){var e=l(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.a.readFile(t));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()));case 26:return this.value=t.sent,this.value=this.value.map(function(e){return Array.prototype.slice.call(e)}),this.value=[].concat.apply([],this.value),t.abrupt("break",31);case 30:return t.abrupt("break",31);case 31:t.next=36;break;case 33:throw t.prev=33,t.t1=t.catch(3),new i.a("Error translating from ".concat(e.enumLookup(this.type)," to byteArray: ").concat(t.t1));case 36:this.type=e.BYTE_ARRAY,t.prev=37,t.t2=r,t.next=t.t2===e.STRING?41:t.t2===e.HTML?41:t.t2===e.NUMBER?44:t.t2===e.ARRAY_BUFFER?47:t.t2===e.BIG_NUMBER?50:t.t2===e.JSON?53:t.t2===e.FILE?56:t.t2===e.LIST_FILE?58:61;break;case 41:return this.value=this.value?s(this.value):"",this.type=e.STRING,t.abrupt("break",62);case 44:return this.value=this.value?parseFloat(s(this.value)):0,this.type=e.NUMBER,t.abrupt("break",62);case 47:return this.value=new Uint8Array(this.value).buffer,this.type=e.ARRAY_BUFFER,t.abrupt("break",62);case 50:try{this.value=new o.a(s(this.value))}catch(e){this.value=new o.a(NaN)}return this.type=e.BIG_NUMBER,t.abrupt("break",62);case 53:return this.value=JSON.parse(s(this.value)),this.type=e.JSON,t.abrupt("break",62);case 56:return this.value=new File(this.value,"unknown"),t.abrupt("break",62);case 58:return this.value=[new File(this.value,"unknown")],this.type=e.LIST_FILE,t.abrupt("break",