/**
 * 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=1428)}({0:function(e,t,r){"use strict";(function(e,n){r.d(t,"c",(function(){return y})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return w})),r.d(t,"a",(function(){return A}));var i=r(6),o=r.n(i),a=r(1),s=r.n(a),u=r(2),c=r.n(u),f=r(23),l=r.n(f),h=r(15),p=r(16),d=r(28),m=r(27),g=function(){function t(){s()(this,t)}return c()(t,null,[{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),[...e].forEach((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(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(e="string"==typeof e?t.ord(e):e).toString(16).padStart(r,"0")}},{key:"bin",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(e="string"==typeof e?t.ord(e):e).toString(2).padStart(r,"0")}},{key:"printable",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];v()&&window.app&&!window.app.options.treatAsUtf8&&(e=t.byteArrayToChars(t.strToByteArray(e)));var n=/[\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-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,i=/[\x09-\x10\x0D\u2028\u2029]/g;return e=e.replace(n,"."),r||(e=e.replace(i,".")),e}},{key:"parseEscapedChars",value:function(e){return e.replace(/\\([bfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,(function(e,t){switch(t[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(t,8));case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(t.substr(1),16));case"u":return"{"===t[1]?String.fromCodePoint(parseInt(t.slice(2,-1),16)):String.fromCharCode(parseInt(t.substr(1),16))}}))}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(e){for(var r=[],n=0;n<e.length;n++)if(n<e.length-2&&"-"===e[n+1]&&"\\"!==e[n]){for(var i=t.ord(e[n]),o=t.ord(e[n+2]),a=i;a<=o;a++)r.push(t.chr(a));n+=2}else n<e.length-2&&"\\"===e[n]&&"-"===e[n+1]?(r.push("-"),n++):r.push(e[n]);return r}},{key:"convertToByteArray",value:function(e,r){switch(r.toLowerCase()){case"binary":return Object(m.a)(e);case"hex":return Object(p.a)(e);case"decimal":return Object(d.a)(e);case"base64":return Object(h.a)(e,null,"byteArray");case"utf8":return t.strToUtf8ByteArray(e);case"latin1":default:return t.strToByteArray(e)}}},{key:"convertToByteString",value:function(e,r){switch(r.toLowerCase()){case"binary":return t.byteArrayToChars(Object(m.a)(e));case"hex":return t.byteArrayToChars(Object(p.a)(e));case"decimal":return t.byteArrayToChars(Object(d.a)(e));case"base64":return t.byteArrayToChars(Object(h.a)(e,null,"byteArray"));case"utf8":return l.a.encode(e);case"latin1":default:return e}}},{key:"strToArrayBuffer",value:function(e){for(var r,n=new Uint8Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ArrayBuffer(e);return n.buffer}},{key:"strToUtf8ArrayBuffer",value:function(e){var r=l.a.encode(e);return e.length!==r.length&&(b()?self.setOption("attemptHighlight",!1):v()&&(window.app.options.attemptHighlight=!1)),t.strToArrayBuffer(r)}},{key:"strToByteArray",value:function(e){for(var r,n=new Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ByteArray(e);return n}},{key:"strToUtf8ByteArray",value:function(e){var r=l.a.encode(e);return e.length!==r.length&&(b()?self.setOption("attemptHighlight",!1):v()&&(window.app.options.attemptHighlight=!1)),t.strToByteArray(r)}},{key:"strToCharcode",value:function(e){for(var r=[],n=0;n<e.length;n++){var i=e.charCodeAt(n);if(n<e.length-1&&i>=55296&&i<56320){var o=e[n+1].charCodeAt(0);o>=56320&&o<57344&&(i=t.ord(e[n]+e[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(e){var r=t.byteArrayToChars(e);try{var n=l.a.decode(r);return r.length!==n.length&&(b()?self.setOption("attemptHighlight",!1):v()&&(window.app.options.attemptHighlight=!1)),n}catch(e){return r}}},{key:"byteArrayToChars",value:function(e){if(!e)return"";for(var t="",r=0;r<e.length;)t+=String.fromCharCode(e[r++]);return t}},{key:"arrayBufferToStr",value:function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new Uint8Array(e);return r?t.byteArrayToUtf8(n):t.byteArrayToChars(n)}},{key:"calculateShannonEntropy",value:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t,r=[],n=new Array(256).fill(0);for(t=0;t<e.length;t++)n[e[t]]++;for(t=0;t<n.length;t++)n[t]>0&&r.push(n[t]/e.length);var i,o=0;for(t=0;t<r.length;t++)o+=(i=r[t])*Math.log(i)/Math.log(2);return-o}},{key:"parseCSV",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],o=!1,a=!1,s="",u=[],c=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var f=0;f<e.length;f++)t=e[f],r=e[f+1]||"",o?(s+=t,o=!1):'"'!==t||a?'"'===t&&a?'"'===r?o=!0:a=!1:!a&&n.indexOf(t)>=0?(u.push(s),s=""):!a&&i.indexOf(t)>=0?(u.push(s),s="",c.push(u),u=[],i.indexOf(r)>=0&&r!==t&&f++):s+=t:a=!0;return u.length&&(u.push(s),c.push(u)),c}},{key:"stripHtmlTags",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t&&(e=e.replace(/<(script|style)[^>]*>.*<\/(script|style)>/gim,"")),e.replace(/<[^>]+>/g,"")}},{key:"escapeHtml",value:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"};return e.replace(/[&<>"'/`]/g,(function(e){return t[e]}))}},{key:"unescapeHtml",value:function(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/","&#x60;":"`"};return e.replace(/&#?x?[a-z0-9]{2,4};/gi,(function(e){return t[e]||e}))}},{key:"encodeURIFragment",value:function(e){var t={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(e=encodeURIComponent(e)).replace(/%[0-9A-F]{2}/g,(function(e){return t[e]||e}))}},{key:"generatePrettyRecipe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",o="",a="";return e.forEach((function(e){n=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),o=e.disabled?"/disabled":"",a=e.breakpoint?"/breakpoint":"",r+=`${n}(${i}${o}${a})`,t&&(r+="\n")})),r}},{key:"parseRecipeConfig",value:function(e){if(0===(e=e.trim()).length)return[];if("["===e[0])return JSON.parse(e);var t,r;e=e.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];t=n.exec(e);){r="["+(r=t[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var o={op:t[1].replace(/_/g," "),args:JSON.parse(r)};t[3]&&t[3].indexOf("disabled")>0&&(o.disabled=!0),t[3]&&t[3].indexOf("breakpoint")>0&&(o.breakpoint=!0),i.push(o)}return i}},{key:"displayFilesAsHTML",value:function(e){var r,n,i,a,s;return o.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:r=function(e){return`<div class='card' style='white-space: normal;'>\n                    <div class='card-header'>\n                        <h6 class="mb-0">\n                            ${t.escapeHtml(e.name)}\n                        </h6>\n                    </div>\n                </div>`},n=function(e,r){if(r.startsWith("image")){var n="data:";return n+=r+";","<img style='max-width: 100%;' src='"+(n+="base64,"+Object(h.b)(e))+"'>"}return`<pre>${t.escapeHtml(t.arrayBufferToStr(e.buffer))}</pre>`},i=function(e,r){var i,a,s,u;return o.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,o.a.awrap(t.readFile(e));case 2:return i=c.sent,a=new Blob([i],{type:e.type||"octet/stream"}),s=URL.createObjectURL(a),u=`<div class='card' style='white-space: normal;'>\n                    <div class='card-header' id='heading${r}'>\n                        <h6 class='mb-0'>\n                            <a class='collapsed'\n                                data-toggle='collapse'\n                                href='#collapse${r}'\n                                aria-expanded='false'\n                                aria-controls='collapse${r}'\n                                title="Show/hide contents of '${t.escapeHtml(e.name)}'">\n                                ${t.escapeHtml(e.name)}</a>\n                            <span class='float-right' style="margin-top: -3px">\n                                ${e.size.toLocaleString()} bytes\n                                <a title="Download ${t.escapeHtml(e.name)}"\n                                    href="${s}"\n                                    download="${t.escapeHtml(e.name)}"\n                                    data-toggle="tooltip">\n                                    <i class="material-icons" style="vertical-align: bottom">save</i>\n                                </a>\n                                <a title="Move to input"\n                                    href="#"\n                                    blob-url="${s}"\n                                    file-name="${t.escapeHtml(e.name)}"\n                                    class="extract-file"\n                                    data-toggle="tooltip">\n                                    <i class="material-icons" style="vertical-align: bottom">open_in_browser</i>\n                                </a>\n                            </span>\n                        </h6>\n                    </div>\n                    <div id='collapse${r}' class='collapse' aria-labelledby='heading${r}' data-parent="#files">\n                        <div class='card-body'>\n                            ${n(i,e.type)}\n                        </div>\n                    </div>\n                </div>`,c.abrupt("return",u);case 7:case"end":return c.stop()}}))},a=`<div style='padding: 5px; white-space: normal;'>\n                ${e.length} file(s) found\n            </div><div id="files" style="padding: 20px">`,s=0;case 5:if(!(s<e.length)){u.next=17;break}if(!e[s].name.endsWith("/")){u.next=10;break}a+=r(e[s]),u.next=14;break;case 10:return u.t0=a,u.next=13,o.a.awrap(i(e[s],s));case 13:a=u.t0+=u.sent;case 14:s++,u.next=5;break;case 17:return u.abrupt("return",a+="</div>");case 18:case"end":return u.stop()}}))}},{key:"parseURIParams",value:function(e){if(""===e)return{};"?"!==e[0]&&"#"!==e[0]||(e=e.substr(1));for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i=t[n].split("=");2!==i.length?r[t[n]]=!0:r[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return r}},{key:"readFile",value:function(t){return y()?e.from(t).buffer:new Promise((function(e,r){var n=new FileReader,i=new Uint8Array(t.size),o=0,a=function(){if(o>=t.size)e(i);else{var r=t.slice(o,o+10485760);n.readAsArrayBuffer(r)}};n.onload=function(e){i.set(new Uint8Array(n.result),o),o+=10485760,a()},n.onerror=function(e){r(n.error.message)},a()}))}},{key:"readFileSync",value:function(e){if(!y())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(e.data).buffer}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(e,r){return r?t.gcd(r,e%r):e}},{key:"modInv",value:function(e,t){e%=t;for(var r=1;r<t;r++)if(e*r%26==1)return r}},{key:"charRep",value:function(e){return{Space:" ",Percent:"%",Comma:",","Semi-colon":";",Colon:":",Tab:"\t","Line feed":"\n",CRLF:"\r\n","Forward slash":"/",Backslash:"\\","0x":"0x","\\x":"\\x","Nothing (separate chars)":"",None:""}[e]}},{key:"regexRep",value:function(e){return{Space:/\s+/g,Percent:/%/g,Comma:/,/g,"Semi-colon":/;/g,Colon:/:/g,"Line feed":/\n/g,CRLF:/\r\n/g,"Forward slash":/\//g,Backslash:/\\/g,"0x":/0x/g,"\\x":/\\x/g,None:/\s+/g}[e]}}]),t}();function y(){return void 0!==n&&null!=n.versions&&null!=n.versions.node}function v(){return"object"==typeof window}function b(){return"function"==typeof importScripts}function w(e){b()?self.sendStatusMessage(e):v()?app.alert(e,1e4):y()&&console.debug(e)}t.b=g,Array.prototype.unique=function(){for(var e={},t=[],r=0,n=this.length;r<n;r++)Object.prototype.hasOwnProperty.call(e,this[r])||(t.push(this[r]),e[this[r]]=1);return t},Array.prototype.max=function(){return Math.max.apply(null,this)},Array.prototype.min=function(){return Math.min.apply(null,this)},Array.prototype.sum=function(){return this.reduce((function(e,t){return e+t}),0)},Array.prototype.equals=function(e){if(!e)return!1;var t=this.length;if(t!==e.length)return!1;for(;t--;)if(this[t]!==e[t])return!1;return!0},String.prototype.count=function(e){return this.split(e).length-1};var x={};function A(e,t,r,n,i){return function(){clearTimeout(x[r]),x[r]=setTimeout((function(){e.apply(n,i)}),t)}}String.prototype.padStart||(String.prototype.padStart=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))})}).call(this,r(11).Buffer,r(25))},1:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},11:function(e,t,r){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var n=r(40),i=r(41),o=r(42);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<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 l(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=h(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|p(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):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(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 l(e,t){if(f(t),e=s(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().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 z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(n)return z(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return F(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(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 o,a=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;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){l=!1;break}if(l)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function w(e,t,r,n){return Y(z(t,e.length-r),e,r,n)}function x(e,t,r,n){return Y(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return x(e,t,r,n)}function E(e,t,r,n){return Y($(t),e,r,n)}function B(e,t,r,n){return Y(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function F(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=_));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return f(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):m.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return x(this,e,t,r);case"latin1":case"binary":return A(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function I(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=M(e[o]);return i}function S(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function U(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function O(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function P(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):P(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):P(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:z(new u(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function $(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(26))},113:function(e,t,r){"use strict";var n=r(696),i=r(1256),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:i,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,i=arguments.length;n<i;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,(function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},12:function(e,t,r){var n=r(44),i=r(45),o=r(46);e.exports=function(e,t){return n(e)||i(e,t)||o()}},1250:function(e,t,r){const n=r(1251);e.exports={loadLang:r(1253)({gunzip:r(1272),...n}),readImage:r(1274),cache:n}},1251:function(e,t,r){const{set:n,get:i,del:o}=r(1252);e.exports={readCache:i,writeCache:n,deleteCache:o,checkCache:e=>i(e).then(e=>void 0!==e)}},1252:function(e,t,r){"use strict";r.r(t),r.d(t,"Store",(function(){return n})),r.d(t,"get",(function(){return a})),r.d(t,"set",(function(){return s})),r.d(t,"del",(function(){return u})),r.d(t,"clear",(function(){return c})),r.d(t,"keys",(function(){return f}));class n{constructor(e="keyval-store",t="keyval"){this.storeName=t,this._dbp=new Promise((r,n)=>{const i=indexedDB.open(e,1);i.onerror=()=>n(i.error),i.onsuccess=()=>r(i.result),i.onupgradeneeded=()=>{i.result.createObjectStore(t)}})}_withIDBStore(e,t){return this._dbp.then(r=>new Promise((n,i)=>{const o=r.transaction(this.storeName,e);o.oncomplete=()=>n(),o.onabort=o.onerror=()=>i(o.error),t(o.objectStore(this.storeName))}))}}let i;function o(){return i||(i=new n),i}function a(e,t=o()){let r;return t._withIDBStore("readonly",t=>{r=t.get(e)}).then(()=>r.result)}function s(e,t,r=o()){return r._withIDBStore("readwrite",r=>{r.put(t,e)})}function u(e,t=o()){return t._withIDBStore("readwrite",t=>{t.delete(e)})}function c(e=o()){return e._withIDBStore("readwrite",e=>{e.clear()})}function f(e=o()){const t=[];return e._withIDBStore("readonly",e=>{(e.openKeyCursor||e.openCursor).call(e).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)}},1253:function(e,t,r){const n=r(1254),i=r(694),o=r(695);e.exports=e=>({langs:t,...r})=>Promise.all(("string"==typeof t?t.split("+"):t).map((e=>({langPath:t,cachePath:r,cacheMethod:a,gzip:s=!0,...u})=>c=>{const f="string"==typeof c?c:c.code,l=t=>{const r=i(t);return null!==r&&"application/gzip"===r.mime?e.gunzip(new Uint8Array(t)):new Uint8Array(t)},h=(e=>({TessModule:t,dataPath:r,cachePath:n,cacheMethod:i,langCode:o})=>a=>{if(t){if(r)try{t.FS.mkdir(r)}catch(e){}t.FS.writeFile(`${r||"."}/${o}.traineddata`,a)}return["write","refresh",void 0].includes(i)?e.writeCache(`${n||"."}/${o}.traineddata`,a).then(()=>a):a})(e)({cachePath:r,cacheMethod:a,langCode:f,...u});let{readCache:p}=e;return["refresh","none"].includes(a)&&(p=()=>Promise.resolve()),p(`${r||"."}/${f}.traineddata`).then(e=>void 0===e?Promise.reject():h(e)).catch(()=>{if("string"==typeof c){const r=e=>o.get(`${e}/${f}.traineddata${s?".gz":""}`,{responseType:"arraybuffer"}).then(({data:e})=>new Uint8Array(e)).then(l).then(h);return n(t)||t.startsWith("chrome-extension://")?r(t):e.readCache(`${t}/${f}.traineddata${s?".gz":""}`).then(l).then(h)}return Promise.resolve(c.data).then(l).then(h)})})(e)(r)))},1254:function(e,t){e.exports=function(e){if("string"!=typeof e)return!1;var t=e.match(r);if(!t)return!1;var o=t[1];if(!o)return!1;if(n.test(o)||i.test(o))return!0;return!1};var r=/^(?:\w+:)?\/\/(\S+)$/,n=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,i=/^[^\s\.]+\.\S{2,}$/},1255:function(e,t,r){"use strict";var n=r(113),i=r(696),o=r(1257),a=r(451);function s(e){var t=new o(e),r=i(o.prototype.request,t);return n.extend(r,o.prototype,t),n.extend(r,t),r}var u=s(a);u.Axios=o,u.create=function(e){return s(n.merge(a,e))},u.Cancel=r(700),u.CancelToken=r(1270),u.isCancel=r(699),u.all=function(e){return Promise.all(e)},u.spread=r(1271),e.exports=u,e.exports.default=u},1256:function(e,t){
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},1257:function(e,t,r){"use strict";var n=r(451),i=r(113),o=r(1265),a=r(1266);function s(e){this.defaults=e,this.interceptors={request:new o,response:new o}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],(function(e){s.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){s.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}})),e.exports=s},1258:function(e,t,r){"use strict";var n=r(113);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},1259:function(e,t,r){"use strict";var n=r(698);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},1260:function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},1261:function(e,t,r){"use strict";var n=r(113);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}return o&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e}},1262:function(e,t,r){"use strict";var n=r(113),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},1263:function(e,t,r){"use strict";var n=r(113);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},1264:function(e,t,r){"use strict";var n=r(113);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1265:function(e,t,r){"use strict";var n=r(113);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},1266:function(e,t,r){"use strict";var n=r(113),i=r(1267),o=r(699),a=r(451),s=r(1268),u=r(1269);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!s(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(c(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},1267:function(e,t,r){"use strict";var n=r(113);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},1268:function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},1269:function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},1270:function(e,t,r){"use strict";var n=r(700);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},1271:function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},1272:function(e,t,r){e.exports=r(1273).gunzipSync},1273:function(e,t,r){(function(e,r){/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";function n(e){throw e}var i=void 0,o=!0,a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function s(e,t){this.index="number"==typeof t?t:0,this.m=0,this.buffer=e instanceof(a?Uint8Array:Array)?e:new(a?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&n(Error("invalid index")),this.buffer.length<=this.index&&this.f()}s.prototype.f=function(){var e,t=this.buffer,r=t.length,n=new(a?Uint8Array:Array)(r<<1);if(a)n.set(t);else for(e=0;e<r;++e)n[e]=t[e];return this.buffer=n},s.prototype.d=function(e,t,r){var n,i=this.buffer,o=this.index,a=this.m,s=i[o];if(r&&1<t&&(e=8<t?(p[255&e]<<24|p[e>>>8&255]<<16|p[e>>>16&255]<<8|p[e>>>24&255])>>32-t:p[e]>>8-t),8>t+a)s=s<<t|e,a+=t;else for(n=0;n<t;++n)s=s<<1|e>>t-n-1&1,8==++a&&(a=0,i[o++]=p[s],s=0,o===i.length&&(i=this.f()));i[o]=s,this.buffer=i,this.m=a,this.index=o},s.prototype.finish=function(){var e,t=this.buffer,r=this.index;return 0<this.m&&(t[r]<<=8-this.m,t[r]=p[t[r]],r++),a?e=t.subarray(0,r):(t.length=r,e=t),e};var u,c=new(a?Uint8Array:Array)(256);for(u=0;256>u;++u){for(var f=h=u,l=7,h=h>>>1;h;h>>>=1)f<<=1,f|=1&h,--l;c[u]=(f<<l&255)>>>0}var p=c;function d(e,t,r){var n,i="number"==typeof t?t:t=0,o="number"==typeof r?r:e.length;for(n=-1,i=7&o;i--;++t)n=n>>>8^g[255&(n^e[t])];for(i=o>>3;i--;t+=8)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^g[255&(n^e[t])])>>>8^g[255&(n^e[t+1])])>>>8^g[255&(n^e[t+2])])>>>8^g[255&(n^e[t+3])])>>>8^g[255&(n^e[t+4])])>>>8^g[255&(n^e[t+5])])>>>8^g[255&(n^e[t+6])])>>>8^g[255&(n^e[t+7])];return(4294967295^n)>>>0}var m=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],g=a?new Uint32Array(m):m;function y(){}function v(e){this.buffer=new(a?Uint16Array:Array)(2*e),this.length=0}function b(e){var t,r,n,i,o,s,u,c,f,l,h=e.length,p=0,d=Number.POSITIVE_INFINITY;for(c=0;c<h;++c)e[c]>p&&(p=e[c]),e[c]<d&&(d=e[c]);for(t=1<<p,r=new(a?Uint32Array:Array)(t),n=1,i=0,o=2;n<=p;){for(c=0;c<h;++c)if(e[c]===n){for(s=0,u=i,f=0;f<n;++f)s=s<<1|1&u,u>>=1;for(l=n<<16|c,f=s;f<t;f+=o)r[f]=l;++i}++n,i<<=1,o<<=1}return[r,p,d]}function w(e,t){this.k=A,this.F=0,this.input=a&&e instanceof Array?new Uint8Array(e):e,this.b=0,t&&(t.lazy&&(this.F=t.lazy),"number"==typeof t.compressionType&&(this.k=t.compressionType),t.outputBuffer&&(this.a=a&&t.outputBuffer instanceof Array?new Uint8Array(t.outputBuffer):t.outputBuffer),"number"==typeof t.outputIndex&&(this.b=t.outputIndex)),this.a||(this.a=new(a?Uint8Array:Array)(32768))}v.prototype.getParent=function(e){return 2*((e-2)/4|0)},v.prototype.push=function(e,t){var r,n,i,o=this.buffer;for(r=this.length,o[this.length++]=t,o[this.length++]=e;0<r&&(n=this.getParent(r),o[r]>o[n]);)i=o[r],o[r]=o[n],o[n]=i,i=o[r+1],o[r+1]=o[n+1],o[n+1]=i,r=n;return this.length},v.prototype.pop=function(){var e,t,r,n,i,o=this.buffer;for(t=o[0],e=o[1],this.length-=2,o[0]=o[this.length],o[1]=o[this.length+1],i=0;!((n=2*i+2)>=this.length)&&(n+2<this.length&&o[n+2]>o[n]&&(n+=2),o[n]>o[i]);)r=o[i],o[i]=o[n],o[n]=r,r=o[i+1],o[i+1]=o[n+1],o[n+1]=r,i=n;return{index:e,value:t,length:this.length}};var x,A=2,E={NONE:0,L:1,t:A,X:3},B=[];for(x=0;288>x;x++)switch(o){case 143>=x:B.push([x+48,8]);break;case 255>=x:B.push([x-144+400,9]);break;case 279>=x:B.push([x-256+0,7]);break;case 287>=x:B.push([x-280+192,8]);break;default:n("invalid literal: "+x)}function F(e,t){this.length=e,this.N=t}w.prototype.h=function(){var e,t,r,u,c=this.input;switch(this.k){case 0:for(r=0,u=c.length;r<u;){var f,l,h,p=t=a?c.subarray(r,r+65535):c.slice(r,r+65535),d=(r+=t.length)===u,m=i,g=i,y=this.a,v=this.b;if(a){for(y=new Uint8Array(this.a.buffer);y.length<=v+p.length+5;)y=new Uint8Array(y.length<<1);y.set(this.a)}if(f=d?1:0,y[v++]=0|f,h=65536+~(l=p.length)&65535,y[v++]=255&l,y[v++]=l>>>8&255,y[v++]=255&h,y[v++]=h>>>8&255,a)y.set(p,v),v+=p.length,y=y.subarray(0,v);else{for(m=0,g=p.length;m<g;++m)y[v++]=p[m];y.length=v}this.b=v,this.a=y}break;case 1:var b=new s(a?new Uint8Array(this.a.buffer):this.a,this.b);b.d(1,1,o),b.d(1,2,o);var w,x,E,F=C(this,c);for(w=0,x=F.length;w<x;w++)if(E=F[w],s.prototype.d.apply(b,B[E]),256<E)b.d(F[++w],F[++w],o),b.d(F[++w],5),b.d(F[++w],F[++w],o);else if(256===E)break;this.a=b.finish(),this.b=this.a.length;break;case A:var k,_,T,U,R,O,P,L,D,j,N,M,z,$,Y,G=new s(a?new Uint8Array(this.a.buffer):this.a,this.b),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V=Array(19);for(k=A,G.d(1,1,o),G.d(k,2,o),_=C(this,c),P=S(O=I(this.U,15)),D=S(L=I(this.T,7)),T=286;257<T&&0===O[T-1];T--);for(U=30;1<U&&0===L[U-1];U--);var H,J,W,X,Z,K,Q=T,ee=U,te=new(a?Uint32Array:Array)(Q+ee),re=new(a?Uint32Array:Array)(316),ne=new(a?Uint8Array:Array)(19);for(H=J=0;H<Q;H++)te[J++]=O[H];for(H=0;H<ee;H++)te[J++]=L[H];if(!a)for(H=0,X=ne.length;H<X;++H)ne[H]=0;for(H=Z=0,X=te.length;H<X;H+=J){for(J=1;H+J<X&&te[H+J]===te[H];++J);if(W=J,0===te[H])if(3>W)for(;0<W--;)re[Z++]=0,ne[0]++;else for(;0<W;)(K=138>W?W:138)>W-3&&K<W&&(K=W-3),10>=K?(re[Z++]=17,re[Z++]=K-3,ne[17]++):(re[Z++]=18,re[Z++]=K-11,ne[18]++),W-=K;else if(re[Z++]=te[H],ne[te[H]]++,3>--W)for(;0<W--;)re[Z++]=te[H],ne[te[H]]++;else for(;0<W;)(K=6>W?W:6)>W-3&&K<W&&(K=W-3),re[Z++]=16,re[Z++]=K-3,ne[16]++,W-=K}for(e=a?re.subarray(0,Z):re.slice(0,Z),j=I(ne,7),$=0;19>$;$++)V[$]=j[q[$]];for(R=19;4<R&&0===V[R-1];R--);for(N=S(j),G.d(T-257,5,o),G.d(U-1,5,o),G.d(R-4,4,o),$=0;$<R;$++)G.d(V[$],3,o);for($=0,Y=e.length;$<Y;$++)if(M=e[$],G.d(N[M],j[M],o),16<=M){switch($++,M){case 16:z=2;break;case 17:z=3;break;case 18:z=7;break;default:n("invalid code: "+M)}G.d(e[$],z,o)}var ie,oe,ae,se,ue,ce,fe,le,he=[P,O],pe=[D,L];for(ue=he[0],ce=he[1],fe=pe[0],le=pe[1],ie=0,oe=_.length;ie<oe;++ie)if(ae=_[ie],G.d(ue[ae],ce[ae],o),256<ae)G.d(_[++ie],_[++ie],o),se=_[++ie],G.d(fe[se],le[se],o),G.d(_[++ie],_[++ie],o);else if(256===ae)break;this.a=G.finish(),this.b=this.a.length;break;default:n("invalid compression type")}return this.a};var k=function(){function e(e){switch(o){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:n("invalid length: "+e)}}var t,r,i=[];for(t=3;258>=t;t++)r=e(t),i[t]=r[2]<<24|r[1]<<16|r[0];return i}(),_=a?new Uint32Array(k):k;function C(e,t){function r(e,t){var r,i,a,s,u=e.N,c=[],f=0;switch(r=_[e.length],c[f++]=65535&r,c[f++]=r>>16&255,c[f++]=r>>24,o){case 1===u:i=[0,u-1,0];break;case 2===u:i=[1,u-2,0];break;case 3===u:i=[2,u-3,0];break;case 4===u:i=[3,u-4,0];break;case 6>=u:i=[4,u-5,1];break;case 8>=u:i=[5,u-7,1];break;case 12>=u:i=[6,u-9,2];break;case 16>=u:i=[7,u-13,2];break;case 24>=u:i=[8,u-17,3];break;case 32>=u:i=[9,u-25,3];break;case 48>=u:i=[10,u-33,4];break;case 64>=u:i=[11,u-49,4];break;case 96>=u:i=[12,u-65,5];break;case 128>=u:i=[13,u-97,5];break;case 192>=u:i=[14,u-129,6];break;case 256>=u:i=[15,u-193,6];break;case 384>=u:i=[16,u-257,7];break;case 512>=u:i=[17,u-385,7];break;case 768>=u:i=[18,u-513,8];break;case 1024>=u:i=[19,u-769,8];break;case 1536>=u:i=[20,u-1025,9];break;case 2048>=u:i=[21,u-1537,9];break;case 3072>=u:i=[22,u-2049,10];break;case 4096>=u:i=[23,u-3073,10];break;case 6144>=u:i=[24,u-4097,11];break;case 8192>=u:i=[25,u-6145,11];break;case 12288>=u:i=[26,u-8193,12];break;case 16384>=u:i=[27,u-12289,12];break;case 24576>=u:i=[28,u-16385,13];break;case 32768>=u:i=[29,u-24577,13];break;default:n("invalid distance")}for(r=i,c[f++]=r[0],c[f++]=r[1],c[f++]=r[2],a=0,s=c.length;a<s;++a)y[v++]=c[a];w[c[0]]++,x[c[3]]++,b=e.length+t-1,d=null}var s,u,c,f,l,h,p,d,m,g={},y=a?new Uint16Array(2*t.length):[],v=0,b=0,w=new(a?Uint32Array:Array)(286),x=new(a?Uint32Array:Array)(30),A=e.F;if(!a){for(c=0;285>=c;)w[c++]=0;for(c=0;29>=c;)x[c++]=0}for(w[256]=1,s=0,u=t.length;s<u;++s){for(c=l=0,f=3;c<f&&s+c!==u;++c)l=l<<8|t[s+c];if(g[l]===i&&(g[l]=[]),h=g[l],!(0<b--)){for(;0<h.length&&32768<s-h[0];)h.shift();if(s+3>=u){for(d&&r(d,-1),c=0,f=u-s;c<f;++c)m=t[s+c],y[v++]=m,++w[m];break}0<h.length?(p=T(t,s,h),d?d.length<p.length?(m=t[s-1],y[v++]=m,++w[m],r(p,0)):r(d,-1):p.length<A?d=p:r(p,0)):d?r(d,-1):(m=t[s],y[v++]=m,++w[m])}h.push(s)}return y[v++]=256,w[256]++,e.U=w,e.T=x,a?y.subarray(0,v):y}function T(e,t,r){var n,i,o,a,s,u,c=0,f=e.length;a=0,u=r.length;e:for(;a<u;a++){if(n=r[u-a-1],o=3,3<c){for(s=c;3<s;s--)if(e[n+s-1]!==e[t+s-1])continue e;o=c}for(;258>o&&t+o<f&&e[n+o]===e[t+o];)++o;if(o>c&&(i=n,c=o),258===o)break}return new F(c,t-i)}function I(e,t){var r,n,i,o,s,u=e.length,c=new v(572),f=new(a?Uint8Array:Array)(u);if(!a)for(o=0;o<u;o++)f[o]=0;for(o=0;o<u;++o)0<e[o]&&c.push(o,e[o]);if(r=Array(c.length/2),n=new(a?Uint32Array:Array)(c.length/2),1===r.length)return f[c.pop().index]=1,f;for(o=0,s=c.length/2;o<s;++o)r[o]=c.pop(),n[o]=r[o].value;for(i=function(e,t,r){function n(e){var r=d[e][m[e]];r===t?(n(e+1),n(e+1)):--h[r],++m[e]}var i,o,s,u,c,f=new(a?Uint16Array:Array)(r),l=new(a?Uint8Array:Array)(r),h=new(a?Uint8Array:Array)(t),p=Array(r),d=Array(r),m=Array(r),g=(1<<r)-t,y=1<<r-1;for(f[r-1]=t,o=0;o<r;++o)g<y?l[o]=0:(l[o]=1,g-=y),g<<=1,f[r-2-o]=(f[r-1-o]/2|0)+t;for(f[0]=l[0],p[0]=Array(f[0]),d[0]=Array(f[0]),o=1;o<r;++o)f[o]>2*f[o-1]+l[o]&&(f[o]=2*f[o-1]+l[o]),p[o]=Array(f[o]),d[o]=Array(f[o]);for(i=0;i<t;++i)h[i]=r;for(s=0;s<f[r-1];++s)p[r-1][s]=e[s],d[r-1][s]=s;for(i=0;i<r;++i)m[i]=0;for(1===l[r-1]&&(--h[0],++m[r-1]),o=r-2;0<=o;--o){for(u=i=0,c=m[o+1],s=0;s<f[o];s++)(u=p[o+1][c]+p[o+1][c+1])>e[i]?(p[o][s]=u,d[o][s]=t,c+=2):(p[o][s]=e[i],d[o][s]=i,++i);m[o]=0,1===l[o]&&n(o)}return h}(n,n.length,t),o=0,s=r.length;o<s;++o)f[r[o].index]=i[o];return f}function S(e){var t,r,n,i,o=new(a?Uint16Array:Array)(e.length),s=[],u=[],c=0;for(t=0,r=e.length;t<r;t++)s[e[t]]=1+(0|s[e[t]]);for(t=1,r=16;t<=r;t++)u[t]=c,c+=0|s[t],c<<=1;for(t=0,r=e.length;t<r;t++)for(c=u[e[t]],u[e[t]]+=1,n=o[t]=0,i=e[t];n<i;n++)o[t]=o[t]<<1|1&c,c>>>=1;return o}function U(e,t){this.input=e,this.b=this.c=0,this.g={},t&&(t.flags&&(this.g=t.flags),"string"==typeof t.filename&&(this.filename=t.filename),"string"==typeof t.comment&&(this.w=t.comment),t.deflateOptions&&(this.l=t.deflateOptions)),this.l||(this.l={})}U.prototype.h=function(){var e,t,r,n,o,s,u,c,f=new(a?Uint8Array:Array)(32768),l=0,h=this.input,p=this.c,m=this.filename,g=this.w;if(f[l++]=31,f[l++]=139,f[l++]=8,e=0,this.g.fname&&(e|=P),this.g.fcomment&&(e|=L),this.g.fhcrc&&(e|=O),f[l++]=e,t=(Date.now?Date.now():+new Date)/1e3|0,f[l++]=255&t,f[l++]=t>>>8&255,f[l++]=t>>>16&255,f[l++]=t>>>24&255,f[l++]=0,f[l++]=R,this.g.fname!==i){for(u=0,c=m.length;u<c;++u)255<(s=m.charCodeAt(u))&&(f[l++]=s>>>8&255),f[l++]=255&s;f[l++]=0}if(this.g.comment){for(u=0,c=g.length;u<c;++u)255<(s=g.charCodeAt(u))&&(f[l++]=s>>>8&255),f[l++]=255&s;f[l++]=0}return this.g.fhcrc&&(r=65535&d(f,0,l),f[l++]=255&r,f[l++]=r>>>8&255),this.l.outputBuffer=f,this.l.outputIndex=l,f=(o=new w(h,this.l)).h(),l=o.b,a&&(l+8>f.buffer.byteLength?(this.a=new Uint8Array(l+8),this.a.set(new Uint8Array(f.buffer)),f=this.a):f=new Uint8Array(f.buffer)),n=d(h,i,i),f[l++]=255&n,f[l++]=n>>>8&255,f[l++]=n>>>16&255,f[l++]=n>>>24&255,c=h.length,f[l++]=255&c,f[l++]=c>>>8&255,f[l++]=c>>>16&255,f[l++]=c>>>24&255,this.c=p,a&&l<f.length&&(this.a=f=f.subarray(0,l)),f};var R=255,O=2,P=8,L=16;function D(e,t){switch(this.o=[],this.p=32768,this.e=this.j=this.c=this.s=0,this.input=a?new Uint8Array(e):e,this.u=!1,this.q=N,this.K=!1,!t&&(t={})||(t.index&&(this.c=t.index),t.bufferSize&&(this.p=t.bufferSize),t.bufferType&&(this.q=t.bufferType),t.resize&&(this.K=t.resize)),this.q){case j:this.b=32768,this.a=new(a?Uint8Array:Array)(32768+this.p+258);break;case N:this.b=0,this.a=new(a?Uint8Array:Array)(this.p),this.f=this.S,this.z=this.O,this.r=this.Q;break;default:n(Error("invalid inflate mode"))}}var j=0,N=1;D.prototype.i=function(){for(;!this.u;){var e=ie(this,3);switch(1&e&&(this.u=o),e>>>=1){case 0:var t=this.input,r=this.c,s=this.a,u=this.b,c=t.length,f=i,l=s.length,h=i;switch(this.e=this.j=0,r+1>=c&&n(Error("invalid uncompressed block header: LEN")),f=t[r++]|t[r++]<<8,r+1>=c&&n(Error("invalid uncompressed block header: NLEN")),f===~(t[r++]|t[r++]<<8)&&n(Error("invalid uncompressed block header: length verify")),r+f>t.length&&n(Error("input buffer is broken")),this.q){case j:for(;u+f>s.length;){if(f-=h=l-u,a)s.set(t.subarray(r,r+h),u),u+=h,r+=h;else for(;h--;)s[u++]=t[r++];this.b=u,s=this.f(),u=this.b}break;case N:for(;u+f>s.length;)s=this.f({B:2});break;default:n(Error("invalid inflate mode"))}if(a)s.set(t.subarray(r,r+f),u),u+=f,r+=f;else for(;f--;)s[u++]=t[r++];this.c=r,this.b=u,this.a=s;break;case 1:this.r(te,ne);break;case 2:var p,d,m,g,y=ie(this,5)+257,v=ie(this,5)+1,w=ie(this,4)+4,x=new(a?Uint8Array:Array)(Y.length),A=i,E=i,B=i,F=i,k=i;for(k=0;k<w;++k)x[Y[k]]=ie(this,3);if(!a)for(k=w,w=x.length;k<w;++k)x[Y[k]]=0;for(p=b(x),A=new(a?Uint8Array:Array)(y+v),k=0,g=y+v;k<g;)switch(E=oe(this,p),E){case 16:for(F=3+ie(this,2);F--;)A[k++]=B;break;case 17:for(F=3+ie(this,3);F--;)A[k++]=0;B=0;break;case 18:for(F=11+ie(this,7);F--;)A[k++]=0;B=0;break;default:B=A[k++]=E}d=b(a?A.subarray(0,y):A.slice(0,y)),m=b(a?A.subarray(y):A.slice(y)),this.r(d,m);break;default:n(Error("unknown BTYPE: "+e))}}return this.z()};var M,z,$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=a?new Uint16Array($):$,G=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],q=a?new Uint16Array(G):G,V=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],H=a?new Uint8Array(V):V,J=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],W=a?new Uint16Array(J):J,X=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Z=a?new Uint8Array(X):X,K=new(a?Uint8Array:Array)(288);for(M=0,z=K.length;M<z;++M)K[M]=143>=M?8:255>=M?9:279>=M?7:8;var Q,ee,te=b(K),re=new(a?Uint8Array:Array)(30);for(Q=0,ee=re.length;Q<ee;++Q)re[Q]=5;var ne=b(re);function ie(e,t){for(var r,i=e.j,o=e.e,a=e.input,s=e.c,u=a.length;o<t;)s>=u&&n(Error("input buffer is broken")),i|=a[s++]<<o,o+=8;return r=i&(1<<t)-1,e.j=i>>>t,e.e=o-t,e.c=s,r}function oe(e,t){for(var r,i,o=e.j,a=e.e,s=e.input,u=e.c,c=s.length,f=t[0],l=t[1];a<l&&!(u>=c);)o|=s[u++]<<a,a+=8;return(i=(r=f[o&(1<<l)-1])>>>16)>a&&n(Error("invalid code length: "+i)),e.j=o>>i,e.e=a-i,e.c=u,65535&r}function ae(e){this.input=e,this.c=0,this.G=[],this.R=!1}function se(e){if("string"==typeof e){var t,r,n=e.split("");for(t=0,r=n.length;t<r;t++)n[t]=(255&n[t].charCodeAt(0))>>>0;e=n}for(var i,o=1,a=0,s=e.length,u=0;0<s;){s-=i=1024<s?1024:s;do{a+=o+=e[u++]}while(--i);o%=65521,a%=65521}return(a<<16|o)>>>0}function ue(e,t){var r,i;switch(this.input=e,this.c=0,!t&&(t={})||(t.index&&(this.c=t.index),t.verify&&(this.V=t.verify)),r=e[this.c++],i=e[this.c++],15&r){case ce:this.method=ce;break;default:n(Error("unsupported compression method"))}0!=((r<<8)+i)%31&&n(Error("invalid fcheck flag:"+((r<<8)+i)%31)),32&i&&n(Error("fdict flag is not supported")),this.J=new D(e,{index:this.c,bufferSize:t.bufferSize,bufferType:t.bufferType,resize:t.resize})}D.prototype.r=function(e,t){var r=this.a,n=this.b;this.A=e;for(var i,o,a,s,u=r.length-258;256!==(i=oe(this,e));)if(256>i)n>=u&&(this.b=n,r=this.f(),n=this.b),r[n++]=i;else for(s=q[o=i-257],0<H[o]&&(s+=ie(this,H[o])),i=oe(this,t),a=W[i],0<Z[i]&&(a+=ie(this,Z[i])),n>=u&&(this.b=n,r=this.f(),n=this.b);s--;)r[n]=r[n++-a];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},D.prototype.Q=function(e,t){var r=this.a,n=this.b;this.A=e;for(var i,o,a,s,u=r.length;256!==(i=oe(this,e));)if(256>i)n>=u&&(u=(r=this.f()).length),r[n++]=i;else for(s=q[o=i-257],0<H[o]&&(s+=ie(this,H[o])),i=oe(this,t),a=W[i],0<Z[i]&&(a+=ie(this,Z[i])),n+s>u&&(u=(r=this.f()).length);s--;)r[n]=r[n++-a];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},D.prototype.f=function(){var e,t,r=new(a?Uint8Array:Array)(this.b-32768),n=this.b-32768,i=this.a;if(a)r.set(i.subarray(32768,r.length));else for(e=0,t=r.length;e<t;++e)r[e]=i[e+32768];if(this.o.push(r),this.s+=r.length,a)i.set(i.subarray(n,n+32768));else for(e=0;32768>e;++e)i[e]=i[n+e];return this.b=32768,i},D.prototype.S=function(e){var t,r,n,i=this.input.length/this.c+1|0,o=this.input,s=this.a;return e&&("number"==typeof e.B&&(i=e.B),"number"==typeof e.M&&(i+=e.M)),2>i?r=(n=(o.length-this.c)/this.A[2]/2*258|0)<s.length?s.length+n:s.length<<1:r=s.length*i,a?(t=new Uint8Array(r)).set(s):t=s,this.a=t},D.prototype.z=function(){var e,t,r,n,i,o=0,s=this.a,u=this.o,c=new(a?Uint8Array:Array)(this.s+(this.b-32768));if(0===u.length)return a?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);for(t=0,r=u.length;t<r;++t)for(n=0,i=(e=u[t]).length;n<i;++n)c[o++]=e[n];for(t=32768,r=this.b;t<r;++t)c[o++]=s[t];return this.o=[],this.buffer=c},D.prototype.O=function(){var e,t=this.b;return a?this.K?(e=new Uint8Array(t)).set(this.a.subarray(0,t)):e=this.a.subarray(0,t):(this.a.length>t&&(this.a.length=t),e=this.a),this.buffer=e},ae.prototype.i=function(){for(var e=this.input.length;this.c<e;){var t,r,s=new y,u=i,c=i,f=i,l=i,h=i,p=i,m=i,g=this.input,v=this.c;switch(s.C=g[v++],s.D=g[v++],(31!==s.C||139!==s.D)&&n(Error("invalid file signature:"+s.C+","+s.D)),s.v=g[v++],s.v){case 8:break;default:n(Error("unknown compression method: "+s.v))}if(s.n=g[v++],r=g[v++]|g[v++]<<8|g[v++]<<16|g[v++]<<24,s.$=new Date(1e3*r),s.ba=g[v++],s.aa=g[v++],0<(4&s.n)&&(s.W=g[v++]|g[v++]<<8,v+=s.W),0<(s.n&P)){for(p=[],h=0;0<(l=g[v++]);)p[h++]=String.fromCharCode(l);s.name=p.join("")}if(0<(s.n&L)){for(p=[],h=0;0<(l=g[v++]);)p[h++]=String.fromCharCode(l);s.w=p.join("")}0<(s.n&O)&&(s.P=65535&d(g,0,v),s.P!==(g[v++]|g[v++]<<8)&&n(Error("invalid header crc16"))),u=g[g.length-4]|g[g.length-3]<<8|g[g.length-2]<<16|g[g.length-1]<<24,g.length-v-4-4<512*u&&(f=u),c=new D(g,{index:v,bufferSize:f}),s.data=t=c.i(),v=c.c,s.Y=m=(g[v++]|g[v++]<<8|g[v++]<<16|g[v++]<<24)>>>0,d(t,i,i)!==m&&n(Error("invalid CRC-32 checksum: 0x"+d(t,i,i).toString(16)+" / 0x"+m.toString(16))),s.Z=u=(g[v++]|g[v++]<<8|g[v++]<<16|g[v++]<<24)>>>0,(4294967295&t.length)!==u&&n(Error("invalid input size: "+(4294967295&t.length)+" / "+u)),this.G.push(s),this.c=v}this.R=o;var b,w,x,A=this.G,E=0,B=0;for(b=0,w=A.length;b<w;++b)B+=A[b].data.length;if(a)for(x=new Uint8Array(B),b=0;b<w;++b)x.set(A[b].data,E),E+=A[b].data.length;else{for(x=[],b=0;b<w;++b)x[b]=A[b].data;x=Array.prototype.concat.apply([],x)}return x},ue.prototype.i=function(){var e,t=this.input;return e=this.J.i(),this.c=this.J.c,this.V&&((t[this.c++]<<24|t[this.c++]<<16|t[this.c++]<<8|t[this.c++])>>>0!==se(e)&&n(Error("invalid adler-32 checksum"))),e};var ce=8;function fe(e,t){this.input=e,this.a=new(a?Uint8Array:Array)(32768),this.k=le.t;var r,n={};for(r in!t&&(t={})||"number"!=typeof t.compressionType||(this.k=t.compressionType),t)n[r]=t[r];n.outputBuffer=this.a,this.I=new w(this.input,n)}var le=E;function he(e,t){var r;return r=new fe(e).h(),t||(t={}),t.H?r:ge(r)}function pe(e,t){var r;return e.subarray=e.slice,r=new ue(e).i(),t||(t={}),t.noBuffer?r:ge(r)}function de(e,t){var r;return e.subarray=e.slice,r=new U(e).h(),t||(t={}),t.H?r:ge(r)}function me(e,t){var r;return e.subarray=e.slice,r=new ae(e).i(),t||(t={}),t.H?r:ge(r)}function ge(e){var t,n,i=new r(e.length);for(t=0,n=e.length;t<n;++t)i[t]=e[t];return i}fe.prototype.h=function(){var e,t,r,i,o,s,u,c=0;switch(u=this.a,e=ce){case ce:t=Math.LOG2E*Math.log(32768)-8;break;default:n(Error("invalid compression method"))}switch(r=t<<4|e,u[c++]=r,e){case ce:switch(this.k){case le.NONE:o=0;break;case le.L:o=1;break;case le.t:o=2;break;default:n(Error("unsupported compression type"))}break;default:n(Error("invalid compression method"))}return i=o<<6|0,u[c++]=i|31-(256*r+i)%31,s=se(this.input),this.I.b=c,c=(u=this.I.h()).length,a&&((u=new Uint8Array(u.buffer)).length<=c+4&&(this.a=new Uint8Array(u.length+4),this.a.set(u),u=this.a),u=u.subarray(0,c+4)),u[c++]=s>>24&255,u[c++]=s>>16&255,u[c++]=s>>8&255,u[c++]=255&s,u},t.deflate=function(t,r,n){e.nextTick((function(){var e,i;try{i=he(t,n)}catch(t){e=t}r(e,i)}))},t.deflateSync=he,t.inflate=function(t,r,n){e.nextTick((function(){var e,i;try{i=pe(t,n)}catch(t){e=t}r(e,i)}))},t.inflateSync=pe,t.gzip=function(t,r,n){e.nextTick((function(){var e,i;try{i=de(t,n)}catch(t){e=t}r(e,i)}))},t.gzipSync=de,t.gunzip=function(t,r,n){e.nextTick((function(){var e,i;try{i=me(t,n)}catch(t){e=t}r(e,i)}))},t.gunzipSync=me}).call(this)}).call(this,r(25),r(11).Buffer)},1274:function(e,t,r){(function(t){const n=r(1275),i=r(694);e.exports=(e,r,o=70)=>{const a=t.from(r),s=i(a);let u=0,c=null,f=null,l=0,h=0;if(s&&"image/bmp"===s.mime){const t=n.decode(a);c=e._malloc(t.data.length*Uint8Array.BYTES_PER_ELEMENT),e.HEAPU8.set(t.data,c),l=t.width,h=t.height,u=4}else{const t=e._malloc(a.length*Uint8Array.BYTES_PER_ELEMENT);e.HEAPU8.set(a,t),f=e._pixReadMem(t,a.length),0===e.getValue(f+28,"i32")&&e.setValue(f+28,o,"i32"),[l,h]=Array(2).fill(0).map((t,r)=>e.getValue(f+4*r,"i32"))}return{w:l,h:h,bytesPerPixel:u,data:c,pix:f}}}).call(this,r(11).Buffer)},1275:function(e,t,r){var n=r(1276),i=r(1277);e.exports={encode:n,decode:i}},1276:function(e,t,r){(function(t){function r(e){this.buffer=e.data,this.width=e.width,this.height=e.height,this.extraBytes=this.width%4,this.rgbSize=this.height*(3*this.width+this.extraBytes),this.headerInfoSize=40,this.data=[],this.flag="BM",this.reserved=0,this.offset=54,this.fileSize=this.rgbSize+this.offset,this.planes=1,this.bitPP=24,this.compress=0,this.hr=0,this.vr=0,this.colors=0,this.importantColors=0}r.prototype.encode=function(){var e=new t(this.offset+this.rgbSize);this.pos=0,e.write(this.flag,this.pos,2),this.pos+=2,e.writeUInt32LE(this.fileSize,this.pos),this.pos+=4,e.writeUInt32LE(this.reserved,this.pos),this.pos+=4,e.writeUInt32LE(this.offset,this.pos),this.pos+=4,e.writeUInt32LE(this.headerInfoSize,this.pos),this.pos+=4,e.writeUInt32LE(this.width,this.pos),this.pos+=4,e.writeInt32LE(-this.height,this.pos),this.pos+=4,e.writeUInt16LE(this.planes,this.pos),this.pos+=2,e.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,e.writeUInt32LE(this.compress,this.pos),this.pos+=4,e.writeUInt32LE(this.rgbSize,this.pos),this.pos+=4,e.writeUInt32LE(this.hr,this.pos),this.pos+=4,e.writeUInt32LE(this.vr,this.pos),this.pos+=4,e.writeUInt32LE(this.colors,this.pos),this.pos+=4,e.writeUInt32LE(this.importantColors,this.pos),this.pos+=4;for(var r=0,n=3*this.width+this.extraBytes,i=0;i<this.height;i++){for(var o=0;o<this.width;o++){var a=this.pos+i*n+3*o;r++,e[a]=this.buffer[r++],e[a+1]=this.buffer[r++],e[a+2]=this.buffer[r++]}if(this.extraBytes>0){var s=this.pos+i*n+3*this.width;e.fill(0,s,s+this.extraBytes)}}return e},e.exports=function(e,t){return void 0===t&&(t=100),{data:new r(e).encode(),width:e.width,height:e.height}}}).call(this,r(11).Buffer)},1277:function(e,t,r){(function(t){function r(e,t){if(this.pos=0,this.buffer=e,this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),"BM"!=this.flag)throw new Error("Invalid BMP File");this.parseHeader(),this.parseRGBA()}r.prototype.parseHeader=function(){if(this.fileSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.reserved=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.offset=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.headerSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.width=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.height=this.buffer.readInt32LE(this.pos),this.pos+=4,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compress=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.rawSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.hr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.vr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.colors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.importantColors=this.buffer.readUInt32LE(this.pos),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);this.palette[t]={red:i,green:n,blue:r,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},r.prototype.parseRGBA=function(){var e="bit"+this.bitPP,r=this.width*this.height*4;this.data=new t(r),this[e]()},r.prototype.bit1=function(){var e=Math.ceil(this.width/8),t=e%4,r=this.height>=0?this.height-1:-this.height;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<e;i++)for(var o=this.buffer.readUInt8(this.pos++),a=n*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var u=this.palette[o>>7-s&1];this.data[a+4*s]=0,this.data[a+4*s+1]=u.blue,this.data[a+4*s+2]=u.green,this.data[a+4*s+3]=u.red}0!=t&&(this.pos+=4-t)}},r.prototype.bit4=function(){if(2==this.compress){this.data.fill(255);for(var e=0,t=this.bottom_up?this.height-1:0,r=!1;e<this.data.length;){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++);if(0==n){if(0==i){this.bottom_up?t--:t++,e=t*this.width*4,r=!1;continue}if(1==i)break;if(2==i){var o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++);this.bottom_up?t-=a:t+=a,e+=a*this.width*4+4*o}else{for(var s=this.buffer.readUInt8(this.pos++),u=0;u<i;u++)r?c.call(this,15&s):c.call(this,(240&s)>>4),1&u&&u+1<i&&(s=this.buffer.readUInt8(this.pos++)),r=!r;1==(i+1>>1&1)&&this.pos++}}else for(u=0;u<n;u++)r?c.call(this,15&i):c.call(this,(240&i)>>4),r=!r}function c(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4}}else{var f=Math.ceil(this.width/2),l=f%4;for(a=this.height-1;a>=0;a--){var h=this.bottom_up?a:this.height-1-a;for(o=0;o<f;o++){i=this.buffer.readUInt8(this.pos++),e=h*this.width*4+2*o*4;var p=i>>4,d=15&i,m=this.palette[p];if(this.data[e]=0,this.data[e+1]=m.blue,this.data[e+2]=m.green,this.data[e+3]=m.red,2*o+1>=this.width)break;m=this.palette[d],this.data[e+4]=0,this.data[e+4+1]=m.blue,this.data[e+4+2]=m.green,this.data[e+4+3]=m.red}0!=l&&(this.pos+=4-l)}}},r.prototype.bit8=function(){if(1==this.compress){this.data.fill(255);for(var e=0,t=this.bottom_up?this.height-1:0;e<this.data.length;){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);if(0==r){if(0==n){this.bottom_up?t--:t++,e=t*this.width*4;continue}if(1==n)break;if(2==n){var i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);this.bottom_up?t-=o:t+=o,e+=o*this.width*4+4*i}else{for(var a=0;a<n;a++){var s=this.buffer.readUInt8(this.pos++);u.call(this,s)}!0&n&&this.pos++}}else for(a=0;a<r;a++)u.call(this,n)}function u(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4}}else{var c=this.width%4;for(o=this.height-1;o>=0;o--){var f=this.bottom_up?o:this.height-1-o;for(i=0;i<this.width;i++){n=this.buffer.readUInt8(this.pos++),e=f*this.width*4+4*i;if(n<this.palette.length){var l=this.palette[n];this.data[e]=0,this.data[e+1]=l.blue,this.data[e+2]=l.green,this.data[e+3]=l.red}else this.data[e]=0,this.data[e+1]=255,this.data[e+2]=255,this.data[e+3]=255}0!=c&&(this.pos+=4-c)}}},r.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var o=this.buffer.readUInt16LE(this.pos);this.pos+=2;var a=(o&t)/t*255|0,s=(o>>5&t)/t*255|0,u=(o>>10&t)/t*255|0,c=o>>15?255:0,f=n*this.width*4+4*i;this.data[f]=c,this.data[f+1]=a,this.data[f+2]=s,this.data[f+3]=u}this.pos+=e}},r.prototype.bit16=function(){var e=this.width%2*2;this.maskRed=31744,this.maskGreen=992,this.maskBlue=31,this.mask0=0,3==this.compress&&(this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4);for(var t=[0,0,0],r=0;r<16;r++)this.maskRed>>r&1&&t[0]++,this.maskGreen>>r&1&&t[1]++,this.maskBlue>>r&1&&t[2]++;t[1]+=t[0],t[2]+=t[1],t[0]=8-t[0],t[1]-=8,t[2]-=8;for(var n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o<this.width;o++){var a=this.buffer.readUInt16LE(this.pos);this.pos+=2;var s=(a&this.maskBlue)<<t[0],u=(a&this.maskGreen)>>t[1],c=(a&this.maskRed)>>t[2],f=i*this.width*4+4*o;this.data[f]=0,this.data[f+1]=s,this.data[f+2]=u,this.data[f+3]=c}this.pos+=e}},r.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=t*this.width*4+4*r;this.data[a]=0,this.data[a+1]=n,this.data[a+2]=i,this.data[a+3]=o}this.pos+=this.width%4}},r.prototype.bit32=function(){if(3==this.compress){this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4;for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),s=t*this.width*4+4*r;this.data[s]=n,this.data[s+1]=i,this.data[s+2]=o,this.data[s+3]=a}}else for(e=this.height-1;e>=0;e--)for(t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=t*this.width*4+4*r;this.data[s]=n,this.data[s+1]=i,this.data[s+2]=o,this.data[s+3]=a}},r.prototype.getData=function(){return this.data},e.exports=function(e){return new r(e)}}).call(this,r(11).Buffer)},1278:function(e,t,r){const n=r(701),i="undefined"!=typeof window&&void 0!==window.document?r(702):e=>e,o=r(703),a=r(1282),s=r(1283);e.exports=class{constructor(e={}){this.worker=null,this.options={...o.defaultOptions,...e},["corePath","workerPath","langPath"].forEach(t=>{n.not.undefined(e[t])&&(this.options={...this.options,[t]:i(e[t])})}),this._currentJob=null,this._queue=[]}recognize(e,t="eng",r={}){return this._sendJob("recognize",e,t,r)}detect(e,t={}){return this._sendJob("detect",e,"osd",t)}recv(e){this._currentJob.id===e.jobId?this._currentJob.handle({...e,data:"resolve"===e.status&&"recognize"===e.action?a(e.data):e.data}):console.warn(`Job ID ${e.jobId} not known.`)}dequeue(){this._currentJob=null,this._queue.length&&this._queue[0]()}terminate(){this.worker&&o.terminateWorker(this),this.worker=null,this._currentJob=null,this._queue=[]}_sendJob(e,t,r,n){return this._delay(i=>{i.send(e,{image:t,langs:r,params:n,options:this.options})})}_delay(e){n.null(this.worker)&&(this.worker=o.spawnWorker(this,this.options));const t=new s(this);return this._queue.push(()=>{this._queue.shift(),this._currentJob=t,e(t)}),n.null(this._currentJob)&&this.dequeue(),t}}},1279:function(e,t){e.exports=e=>new Uint8Array(atob(e).split("").map(e=>e.charCodeAt(0)))},1280:function(e,t,r){const{OEM:n,PSM:i}=r(704);e.exports={defaultOptions:{langPath:"https://tessdata.projectnaptha.com/4.0.0"},defaultParams:{tessedit_ocr_engine_mode:n.LSTM_ONLY,tessedit_pageseg_mode:i.SINGLE_BLOCK,tessedit_char_whiltelist:"",tessjs_create_pdf:"0",tessjs_create_hocr:"1",tessjs_create_tsv:"1",tessjs_create_box:"0",tessjs_create_unlv:"0",tessjs_create_osd:"0",tessjs_textonly_pdf:"0",tessjs_pdf_name:"tesseract.js-ocr-result",tessjs_pdf_title:"Tesseract.js OCR Result",tessjs_pdf_auto_download:!0,tessjs_pdf_bin:!1,tessjs_image_rectangle_left:0,tessjs_image_rectangle_top:0,tessjs_image_rectangle_width:-1,tessjs_image_rectangle_height:-1}}},1281:function(e){e.exports=JSON.parse('{"_args":[["tesseract.js@2.0.0-alpha.15","/builds/personal/chef.hellinga.it/CyberChef"]],"_from":"tesseract.js@2.0.0-alpha.15","_id":"tesseract.js@2.0.0-alpha.15","_inBundle":false,"_integrity":"sha512-qM1XUFVlTO+tx6oVRpd9QQ8PwQLxo3qhbfIHByUlUVIqWx6y/U9xlHIaG033/Tjfs2EQ0NAehPTOJ+eNElsXEg==","_location":"/tesseract.js","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"tesseract.js@2.0.0-alpha.15","name":"tesseract.js","escapedName":"tesseract.js","rawSpec":"2.0.0-alpha.15","saveSpec":null,"fetchSpec":"2.0.0-alpha.15"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/tesseract.js/-/tesseract.js-2.0.0-alpha.15.tgz","_spec":"2.0.0-alpha.15","_where":"/builds/personal/chef.hellinga.it/CyberChef","author":"","browser":{"./src/node/index.js":"./src/browser/index.js"},"bugs":{"url":"https://github.com/naptha/tesseract.js/issues"},"collective":{"type":"opencollective","url":"https://opencollective.com/tesseractjs"},"contributors":[{"name":"jeromewu"}],"dependencies":{"axios":"^0.18.0","check-types":"^7.4.0","is-url":"1.2.2","node-fetch":"^2.3.0","opencollective-postinstall":"^2.0.2","resolve-url":"^0.2.1","tesseract.js-core":"^2.0.0-beta.11","tesseract.js-utils":"^1.0.0-beta.8"},"description":"Pure Javascript Multilingual OCR","devDependencies":{"@babel/core":"^7.4.5","@babel/preset-env":"^7.4.5","acorn":"^6.1.1","babel-loader":"^8.0.6","cors":"^2.8.5","eslint":"^5.9.0","eslint-config-airbnb":"^17.1.0","eslint-plugin-import":"^2.14.0","eslint-plugin-jsx-a11y":"^6.1.2","eslint-plugin-react":"^7.11.1","expect.js":"^0.3.1","express":"^4.16.4","mocha":"^5.2.0","mocha-headless-chrome":"^2.0.2","npm-run-all":"^4.1.5","nyc":"^13.1.0","rimraf":"^2.6.3","wait-on":"^3.2.0","webpack":"^4.26.0","webpack-cli":"^3.1.2","webpack-dev-middleware":"^3.4.0"},"homepage":"https://github.com/naptha/tesseract.js","jsdelivr":"dist/tesseract.min.js","license":"Apache-2.0","main":"src/index.js","name":"tesseract.js","repository":{"type":"git","url":"git+https://github.com/naptha/tesseract.js.git"},"scripts":{"build":"rimraf dist && webpack --config scripts/webpack.config.prod.js","lint":"eslint src","postinstall":"opencollective-postinstall || true","prepublishOnly":"npm run build","start":"node scripts/server.js","test":"npm-run-all -p -r start test:all","test:all":"npm-run-all wait test:browser:* test:node","test:browser-tpl":"mocha-headless-chrome -a incognito -a no-sandbox -a disable-setuid-sandbox -t 300000","test:browser:detect":"npm run test:browser-tpl -- -f ./tests/detect.test.html","test:browser:recognize":"npm run test:browser-tpl -- -f ./tests/recognize.test.html","test:node":"nyc mocha --exit --bail --require ./scripts/test-helper.js ./tests/*.test.js","wait":"wait-on http://localhost:3000/package.json"},"unpkg":"dist/tesseract.min.js","version":"2.0.0-alpha.15"}')},1282:function(e,t){e.exports=e=>{const t={...e,paragraphs:[],lines:[],words:[],symbols:[]};return t.blocks.forEach(e=>{const r={...e,page:t,lines:[],words:[],symbols:[]};r.paragraphs.forEach(e=>{const n={...e,block:r,page:t,words:[],symbols:[]};n.lines.forEach(e=>{const i={...e,paragraph:n,block:r,page:t,symbols:[]};i.words.forEach(e=>{const o={...e,line:i,paragraph:n,block:r,page:t};o.symbols.forEach(e=>{const a={...e,word:o,line:i,paragraph:n,block:r,page:t};a.line.symbols.push(a),a.paragraph.symbols.push(a),a.block.symbols.push(a),a.page.symbols.push(a)}),o.paragraph.words.push(o),o.block.words.push(o),o.page.words.push(o)}),i.block.lines.push(i),i.page.lines.push(i)}),n.page.paragraphs.push(n)})}),t}},1283:function(e,t,r){const n=r(703);let i=0;e.exports=class{constructor(e){i+=1,this.id=`Job-${i}-${Math.random().toString(16).slice(3,8)}`,this._worker=e,this._resolve=[],this._reject=[],this._progress=[],this._finally=[]}then(e,t){return new Promise((e,t)=>{this._resolve.push?this._resolve.push(e):e(this._result),this.catch(t)}).then(e,t)}catch(e){return this._reject.push?this._reject.push(e):e(this._reject),this}progress(e){return this._progress.push(e),this}finally(e){return this._finally.push(e),this}send(e,t){n.sendPacket(this._worker,{jobId:this.id,action:e,payload:t})}handle(e){const{data:t}=e;let r=!1;"resolve"===e.status?(0===this._resolve.length&&console.log(t),this._resolve.forEach(e=>{const r=e(t);r&&"function"==typeof r.then&&console.warn("TesseractJob instances do not chain like ES6 Promises. To convert it into a real promise, use Promise.resolve.")}),this._resolve=t,this._worker.dequeue(),r=!0):"reject"===e.status?(0===this._reject.length&&console.error(t),this._reject.forEach(e=>e(t)),this._reject=t,this._worker.dequeue(),r=!0):"progress"===e.status?this._progress.forEach(e=>e(t)):console.warn("Message type unknown",e.status),r&&this._finally.forEach(e=>e(t))}}},13:function(e,t,r){"use strict";var n=r(6),i=r.n(n),o=r(1),a=r.n(o),s=r(2),u=r.n(s),c=r(0),f=r(4),l=r.n(f),h=r(3),p=r.n(h),d=r(22),m=r.n(d),g=r(5),y=r.n(g);
/**
 * 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 v=function(e){function t(){var e;a()(this,t);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(e=l()(this,p()(t).call(this,...n))).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(m()(e),t),e}return y()(t,e),t}(function(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}(Error)),b=r(14),w=r.n(b),x=r(18),A=r(24),E=r.n(A),B=function(){function e(){a()(this,e)}return u()(e,null,[{key:"checkForValue",value:function(e){if(void 0===e)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];throw new Error("fromArrayBuffer has not been implemented")}}]),e}(),F=function(e){function t(){return a()(this,t),l()(this,p()(t).apply(this,arguments))}return y()(t,e),u()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}]),t}(B),k=function(e){function t(){return a()(this,t),l()(this,p()(t).apply(this,arguments))}return y()(t,e),u()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=w.a.isBigNumber(this.value)?c.b.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(e){t.checkForValue(this.value);try{this.value=new w.a(c.b.arrayBufferToStr(this.value,!e))}catch(e){this.value=new w.a(NaN)}}}]),t}(B),_=function(e){function t(){return a()(this,t),l()(this,p()(t).apply(this,arguments))}return y()(t,e),u()(t,null,[{key:"toArrayBuffer",value:function(){var e=this;if(t.checkForValue(this.value),!Object(c.c)())return new Promise((function(t,r){c.b.readFile(e.value).then((function(t){return e.value=t.buffer})).then(t).catch(r)}));this.value=c.b.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new File(this.value,"unknown")}}]),t}(B),C=function(e){function t(){return a()(this,t),l()(this,p()(t).apply(this,arguments))}return y()(t,e),u()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?c.b.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(e){t.checkForValue(this.value),this.value=this.value?c.b.arrayBufferToStr(this.value,!e):""}}]),t}(B),T=function(e){function t(){return a()(this,t),l()(this,p()(t).apply(this,arguments))}return y()(t,e),u()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?c.b.strToArrayBuffer(c.b.unescapeHtml(c.b.stripHtmlTags(this.value,!0))):new ArrayBuffer}}]),t}(C),I=function(e){function t(){return a()(this,t),l()(this,p()(t).apply(this,arguments))}return y()(t,e),u()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?c.b.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(e){t.checkForValue(this.value),this.value=JSON.parse(c.b.arrayBufferToStr(this.value,!e))}}]),t}(B),S=function(e){function t(){return a()(this,t),l()(this,p()(t).apply(this,arguments))}return y()(t,e),u()(t,null,[{key:"toArrayBuffer",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.checkForValue(this.value),!Object(c.c)()){e.next=5;break}this.value=this.value.map((function(e){return Uint8Array.from(e.data)})),e.next=8;break;case 5:return e.next=7,i.a.awrap(t.concatenateTypedArraysWithTypedElements(...this.value));case 7:this.value=e.sent;case 8:case"end":return e.stop()}}),null,this)}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:function(){var e,t,r,n,o,a,s,u,f,l,h,p,d,m=arguments;return i.a.async((function(g){for(;;)switch(g.prev=g.next){case 0:for(e=0,t=m.length,r=new Array(t),n=0;n<t;n++)r[n]=m[n];for(o=0,a=r;o<a.length;o++)s=a[o],e+=s.size;u=new Uint8Array(e),f=0,l=0,h=r;case 6:if(!(l<h.length)){g.next=16;break}return p=h[l],g.next=10,i.a.awrap(c.b.readFile(p));case 10:d=g.sent,u.set(d,f),f+=d.length;case 13:l++,g.next=6;break;case 16:return g.abrupt("return",u);case 17:case"end":return g.stop()}}))}},{key:"concatenateTypedArrays",value:function(){for(var e=0,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0,o=r;i<o.length;i++){var a=o[i];e+=a.length}for(var s=new Uint8Array(e),u=0,c=0,f=r;c<f.length;c++){var l=f[c];s.set(l,u),u+=l.length}return s}}]),t}(B),U=function(e){function t(){return a()(this,t),l()(this,p()(t).apply(this,arguments))}return y()(t,e),u()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value="number"==typeof this.value?c.b.strToArrayBuffer(this.value.toString()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(e){t.checkForValue(this.value),this.value=this.value?parseFloat(c.b.arrayBufferToStr(this.value,!e)):0}}]),t}(B),R=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(a()(this,e),this.value=new ArrayBuffer(0),this.type=e.ARRAY_BUFFER,t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"type"))this.set(t.value,t.type);else if(t&&null!==r)this.set(t,r);else if(t){var n=e.typeEnum(t.constructor.name);this.set(t,n)}}return u()(e,[{key:"get",value:function(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"==typeof t&&(t=e.typeEnum(t)),this.type!==t?Object(c.c)()?(this._translate(t,n),this.value):new Promise((function(e,i){r._translate(t,n).then((function(){e(r.value)})).catch(i)})):this.value}},{key:"set",value:function(t,r){if("string"==typeof r&&(r=e.typeEnum(r)),E.a.debug("Dish type: "+e.enumLookup(r)),this.value=t,this.type=r,!this.valid()){var n=c.b.truncate(JSON.stringify(this.value),25);throw new v(`Data is not a valid ${e.enumLookup(r)}: ${n}`)}}},{key:"presentAs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.clone();return r.get(e,t)}},{key:"detectDishType",value:function(){var e=new Uint8Array(this.value.slice(0,2048)),t=Object(x.a)(e);return t.length&&t[0].mime&&"text/plain"!==!t[0].mime?t[0].mime:null}},{key:"getTitle",value:function(t){var r,n;return i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:r="",o.t0=this.type,o.next=o.t0===e.FILE?4:o.t0===e.LIST_FILE?6:o.t0===e.JSON?8:o.t0===e.NUMBER?10:o.t0===e.BIG_NUMBER?10:o.t0===e.ARRAY_BUFFER?12:o.t0===e.BYTE_ARRAY?12:15;break;case 4:return r=this.value.name,o.abrupt("break",26);case 6:return r=`${this.value.length} file(s)`,o.abrupt("break",26);case 8:return r="application/json",o.abrupt("break",26);case 10:return r=this.value.toString(),o.abrupt("break",26);case 12:if(null===(r=this.detectDishType())){o.next=15;break}return o.abrupt("break",26);case 15:return o.prev=15,(n=this.clone()).value=n.value.slice(0,256),o.next=20,i.a.awrap(n.get(e.STRING));case 20:r=o.sent,o.next=26;break;case 23:o.prev=23,o.t1=o.catch(15),E.a.error(`${e.enumLookup(this.type)} cannot be sliced. ${o.t1}`);case 26:return o.abrupt("return",r.slice(0,t));case 27:case"end":return o.stop()}}),null,this,[[15,23]])}},{key:"valid",value:function(){switch(this.type){case e.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var t=0;t<this.value.length;t++)if("number"!=typeof this.value[t]||this.value[t]<0||this.value[t]>255)return!1;return!0;case e.STRING:case e.HTML:return"string"==typeof this.value;case e.NUMBER:return"number"==typeof this.value;case e.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case e.BIG_NUMBER:if(w.a.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var r=new w.a;return r.c=this.value.c,r.e=this.value.e,r.s=this.value.s,this.value=r,!0}return!1;case e.JSON:return!0;case e.FILE:return this.value instanceof File;case e.LIST_FILE:return this.value instanceof Array&&this.value.reduce((function(e,t){return e&&t instanceof File}),!0);default:return!1}}},{key:"clone",value:function(){var t=new e;switch(this.type){case e.STRING:case e.HTML:case e.NUMBER:case e.BIG_NUMBER:t.set(this.value,this.type);break;case e.BYTE_ARRAY:case e.JSON:t.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case e.ARRAY_BUFFER:t.set(this.value.slice(0),this.type);break;case e.FILE:t.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case e.LIST_FILE:t.set(this.value.map((function(e){return new File([e],e.name,{type:e.type,lastModified:e.lastModified})})),this.type);break;default:throw new v("Cannot clone Dish, unknown type")}return t}},{key:"_translate",value:function(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(E.a.debug(`Translating Dish from ${e.enumLookup(this.type)} to ${e.enumLookup(t)}`),!Object(c.c)())return new Promise((function(n,i){r._toArrayBuffer().then((function(){return r.type=e.ARRAY_BUFFER})).then((function(){r._fromArrayBuffer(t),n()})).catch(i)}));this._toArrayBuffer(),this.type=e.ARRAY_BUFFER,this._fromArrayBuffer(t,n)}},{key:"_toArrayBuffer",value:function(){var t=this,r={browser:{[e.STRING]:function(){return Promise.resolve(C.toArrayBuffer.bind(t)())},[e.NUMBER]:function(){return Promise.resolve(U.toArrayBuffer.bind(t)())},[e.HTML]:function(){return Promise.resolve(T.toArrayBuffer.bind(t)())},[e.ARRAY_BUFFER]:function(){return Promise.resolve()},[e.BIG_NUMBER]:function(){return Promise.resolve(k.toArrayBuffer.bind(t)())},[e.JSON]:function(){return Promise.resolve(I.toArrayBuffer.bind(t)())},[e.FILE]:function(){return _.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return Promise.resolve(S.toArrayBuffer.bind(t)())},[e.BYTE_ARRAY]:function(){return Promise.resolve(F.toArrayBuffer.bind(t)())}},node:{[e.STRING]:function(){return C.toArrayBuffer.bind(t)()},[e.NUMBER]:function(){return U.toArrayBuffer.bind(t)()},[e.HTML]:function(){return T.toArrayBuffer.bind(t)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return k.toArrayBuffer.bind(t)()},[e.JSON]:function(){return I.toArrayBuffer.bind(t)()},[e.FILE]:function(){return _.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return S.toArrayBuffer.bind(t)()},[e.BYTE_ARRAY]:function(){return F.toArrayBuffer.bind(t)()}}};try{return r[Object(c.c)()?"node":"browser"][this.type]()}catch(t){throw new v(`Error translating from ${e.enumLookup(this.type)} to ArrayBuffer: ${t}`)}}},{key:"_fromArrayBuffer",value:function(t,r){var n=this,i={[e.STRING]:function(){return C.fromArrayBuffer.bind(n)(r)},[e.NUMBER]:function(){return U.fromArrayBuffer.bind(n)(r)},[e.HTML]:function(){return T.fromArrayBuffer.bind(n)(r)},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return k.fromArrayBuffer.bind(n)(r)},[e.JSON]:function(){return I.fromArrayBuffer.bind(n)(r)},[e.FILE]:function(){return _.fromArrayBuffer.bind(n)()},[e.LIST_FILE]:function(){return S.fromArrayBuffer.bind(n)()},[e.BYTE_ARRAY]:function(){return F.fromArrayBuffer.bind(n)()}};try{i[t](),this.type=t}catch(r){throw new v(`Error translating from ArrayBuffer to ${e.enumLookup(t)}: ${r}`)}}},{key:"size",get:function(){switch(this.type){case e.BYTE_ARRAY:case e.STRING:case e.HTML:return this.value.length;case e.NUMBER:case e.BIG_NUMBER:return this.value.toString().length;case e.ARRAY_BUFFER:return this.value.byteLength;case e.JSON:return JSON.stringify(this.value).length;case e.FILE:return this.value.size;case e.LIST_FILE:return this.value.reduce((function(e,t){return e+t.size}),0);default:return-1}}}],[{key:"typeEnum",value:function(t){switch(t.toLowerCase()){case"bytearray":case"byte array":return e.BYTE_ARRAY;case"string":return e.STRING;case"number":return e.NUMBER;case"html":return e.HTML;case"arraybuffer":case"array buffer":return e.ARRAY_BUFFER;case"bignumber":case"big number":return e.BIG_NUMBER;case"json":case"object":return e.JSON;case"file":return e.FILE;case"list<file>":return e.LIST_FILE;default:throw new v("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(t){switch(t){case e.BYTE_ARRAY:return"byteArray";case e.STRING:return"string";case e.NUMBER:return"number";case e.HTML:return"html";case e.ARRAY_BUFFER:return"ArrayBuffer";case e.BIG_NUMBER:return"BigNumber";case e.JSON:return"JSON";case e.FILE:return"File";case e.LIST_FILE:return"List<File>";default:throw new v("Invalid data type enum. No matching type.")}}}]),e}();R.BYTE_ARRAY=0,R.STRING=1,R.NUMBER=2,R.HTML=3,R.ARRAY_BUFFER=4,R.BIG_NUMBER=5,R.JSON=6,R.FILE=7,R.LIST_FILE=8;t.a=R},14:function(e,t,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",l=1e14,h=14,p=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,g=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function v(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=h-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function b(e,t){var r,n,i=e.c,o=t.c,a=e.s,s=t.s,u=e.e,c=t.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function w(e,t,r,n){if(e<t||e>r||e!==u(e))throw Error(c+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function x(e){var t=e.c.length-1;return y(e.e/h)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(o=function e(t){var r,n,i,o,B,F,k,_,C,T=$.prototype={constructor:$,toString:null,valueOf:null},I=new $(1),S=20,U=4,R=-7,O=21,P=-1e7,L=1e7,D=!1,j=1,N=0,M={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},z="0123456789abcdefghijklmnopqrstuvwxyz";function $(e,t){var r,o,s,c,l,d,m,g,y=this;if(!(y instanceof $))return new $(e,t);if(null==t){if(e&&!0===e._isBigNumber)return y.s=e.s,void(!e.c||e.e>L?y.c=y.e=null:e.e<P?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,l=e;l>=10;l/=10,c++);return void(c>L?y.c=y.e=null:(y.e=c,y.c=[e]))}g=String(e)}else{if(!a.test(g=String(e)))return i(y,g,d);y.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(l=g.search(/e/i))>0?(c<0&&(c=l),c+=+g.slice(l+1),g=g.substring(0,l)):c<0&&(c=g.length)}else{if(w(t,2,z.length,"Base"),10==t)return V(y=new $(e),S+y.e+1,U);if(g=String(e),d="number"==typeof e){if(0*e!=0)return i(y,g,d,t);if(y.s=1/e<0?(g=g.slice(1),-1):1,$.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else y.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=z.slice(0,t),c=l=0,m=g.length;l<m;l++)if(r.indexOf(o=g.charAt(l))<0){if("."==o){if(l>c){c=m;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,l=-1,c=0;continue}return i(y,String(e),d,t)}d=!1,(c=(g=n(g,t,10,y.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(l=0;48===g.charCodeAt(l);l++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(l,++m)){if(m-=l,d&&$.DEBUG&&m>15&&(e>p||e!==u(e)))throw Error(f+y.s*e);if((c=c-l-1)>L)y.c=y.e=null;else if(c<P)y.c=[y.e=0];else{if(y.e=c,y.c=[],l=(c+1)%h,c<0&&(l+=h),l<m){for(l&&y.c.push(+g.slice(0,l)),m-=h;l<m;)y.c.push(+g.slice(l,l+=h));l=h-(g=g.slice(l)).length}else l-=m;for(;l--;g+="0");y.c.push(+g)}}else y.c=[y.e=0]}function Y(e,t,r,n){var i,o,a,s,u;if(null==r?r=U:w(r,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)u=v(e.c),u=1==n||2==n&&(a<=R||a>=O)?A(u,a):E(u,a,"0");else if(o=(e=V(new $(e),t,r)).e,s=(u=v(e.c)).length,1==n||2==n&&(t<=o||o<=R)){for(;s<t;u+="0",s++);u=A(u,o)}else if(t-=a,u=E(u,o,"0"),o+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function G(e,t){for(var r,n=1,i=new $(e[0]);n<e.length;n++){if(!(r=new $(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function q(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*h-1)>L?e.c=e.e=null:r<P?e.c=[e.e=0]:(e.e=r,e.c=t),e}function V(e,t,r,n){var i,o,a,c,f,p,m,g=e.c,y=d;if(g){e:{for(i=1,c=g[0];c>=10;c/=10,i++);if((o=t-i)<0)o+=h,a=t,m=(f=g[p=0])/y[i-a-1]%10|0;else if((p=s((o+1)/h))>=g.length){if(!n)break e;for(;g.length<=p;g.push(0));f=m=0,i=1,a=(o%=h)-h+1}else{for(f=c=g[p],i=1;c>=10;c/=10,i++);m=(a=(o%=h)-h+i)<0?0:f/y[i-a-1]%10|0}if(n=n||t<0||null!=g[p+1]||(a<0?f:f%y[i-a-1]),n=r<4?(m||n)&&(0==r||r==(e.s<0?3:2)):m>5||5==m&&(4==r||n||6==r&&(o>0?a>0?f/y[i-a]:0:g[p-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=y[(h-t%h)%h],e.e=-t||0):g[0]=e.e=0,e;if(0==o?(g.length=p,c=1,p--):(g.length=p+1,c=y[h-o],g[p]=a>0?u(f/y[i-a]%y[a])*c:0),n)for(;;){if(0==p){for(o=1,a=g[0];a>=10;a/=10,o++);for(a=g[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(e.e++,g[0]==l&&(g[0]=1));break}if(g[p]+=c,g[p]!=l)break;g[p--]=0,c=1}for(o=g.length;0===g[--o];g.pop());}e.e>L?e.c=e.e=null:e.e<P&&(e.c=[e.e=0])}return e}function H(e){var t,r=e.e;return null===r?e.toString():(t=v(e.c),t=r<=R||r>=O?A(t,r):E(t,r,"0"),e.s<0?"-"+t:t)}return $.clone=e,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,g,t),S=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),U=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-g,0,t),w(r[1],0,g,t),R=r[0],O=r[1]):(w(r,-g,g,t),R=-(O=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-g,-1,t),w(r[1],1,g,t),P=r[0],L=r[1];else{if(w(r,-g,g,t),!r)throw Error(c+t+" cannot be zero: "+r);P=-(L=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!r,Error(c+"crypto unavailable");D=r}else D=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),j=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,g,t),N=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(c+t+" not an object: "+r);M=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r);z=r}}return{DECIMAL_PLACES:S,ROUNDING_MODE:U,EXPONENTIAL_AT:[R,O],RANGE:[P,L],CRYPTO:D,MODULO_MODE:j,POW_PRECISION:N,FORMAT:M,ALPHABET:z}},$.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!$.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%h)<1&&(t+=h),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=l||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},$.maximum=$.max=function(){return G(arguments,T.lt)},$.minimum=$.min=function(){return G(arguments,T.gt)},$.random=(o=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,a,f=0,l=[],p=new $(I);if(null==e?e=S:w(e,0,g),i=s(e/h),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));f<i;)(a=131072*t[f]+(t[f+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[f]=r[0],t[f+1]=r[1]):(l.push(a%1e14),f+=2);f=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);f<i;)(a=281474976710656*(31&t[f])+1099511627776*t[f+1]+4294967296*t[f+2]+16777216*t[f+3]+(t[f+4]<<16)+(t[f+5]<<8)+t[f+6])>=9e15?crypto.randomBytes(7).copy(t,f):(l.push(a%1e14),f+=7);f=i/7}if(!D)for(;f<i;)(a=o())<9e15&&(l[f++]=a%1e14);for(i=l[--f],e%=h,i&&e&&(a=d[h-e],l[f]=u(i/a)*a);0===l[f];l.pop(),f--);if(f<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=h);for(f=1,a=l[0];a>=10;a/=10,f++);f<h&&(n-=h-f)}return p.e=n,p.c=l,p}),$.sum=function(){for(var e=1,t=arguments,r=new $(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){function e(e,t,r,n){for(var i,o,a=[0],s=0,u=e.length;s<u;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(t,n,i,o,a){var s,u,c,f,l,h,p,d,m=t.indexOf("."),g=S,y=U;for(m>=0&&(f=N,N=0,t=t.replace(".",""),h=(d=new $(n)).pow(t.length-m),N=f,d.c=e(E(v(h.c),h.e,"0"),10,i,"0123456789"),d.e=d.c.length),c=f=(p=e(t,n,i,a?(s=z,"0123456789"):(s="0123456789",z))).length;0==p[--f];p.pop());if(!p[0])return s.charAt(0);if(m<0?--c:(h.c=p,h.e=c,h.s=o,p=(h=r(h,d,g,y,i)).c,l=h.r,c=h.e),m=p[u=c+g+1],f=i/2,l=l||u<0||null!=p[u+1],l=y<4?(null!=m||l)&&(0==y||y==(h.s<0?3:2)):m>f||m==f&&(4==y||l||6==y&&1&p[u-1]||y==(h.s<0?8:7)),u<1||!p[0])t=l?E(s.charAt(1),-g,s.charAt(0)):s.charAt(0);else{if(p.length=u,l)for(--i;++p[--u]>i;)p[u]=0,u||(++c,p=[1].concat(p));for(f=p.length;!p[--f];);for(m=0,t="";m<=f;t+=s.charAt(p[m++]));t=E(t,c,s.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,u=e.length,c=t%m,f=t/m|0;for(e=e.slice();u--;)s=((i=c*(o=e[u]%m)+(n=f*o+(a=e[u]/m|0)*c)%m*m+s)/r|0)+(n/m|0)+f*a,e[u]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,a,s){var c,f,p,d,m,g,v,b,w,x,A,E,B,F,k,_,C,T=n.s==i.s?1:-1,I=n.c,S=i.c;if(!(I&&I[0]&&S&&S[0]))return new $(n.s&&i.s&&(I?!S||I[0]!=S[0]:S)?I&&0==I[0]||!S?0*T:T/0:NaN);for(w=(b=new $(T)).c=[],T=o+(f=n.e-i.e)+1,s||(s=l,f=y(n.e/h)-y(i.e/h),T=T/h|0),p=0;S[p]==(I[p]||0);p++);if(S[p]>(I[p]||0)&&f--,T<0)w.push(1),d=!0;else{for(F=I.length,_=S.length,p=0,T+=2,(m=u(s/(S[0]+1)))>1&&(S=e(S,m,s),I=e(I,m,s),_=S.length,F=I.length),B=_,A=(x=I.slice(0,_)).length;A<_;x[A++]=0);C=S.slice(),C=[0].concat(C),k=S[0],S[1]>=s/2&&k++;do{if(m=0,(c=t(S,x,_,A))<0){if(E=x[0],_!=A&&(E=E*s+(x[1]||0)),(m=u(E/k))>1)for(m>=s&&(m=s-1),v=(g=e(S,m,s)).length,A=x.length;1==t(g,x,v,A);)m--,r(g,_<v?C:S,v,s),v=g.length,c=1;else 0==m&&(c=m=1),v=(g=S.slice()).length;if(v<A&&(g=[0].concat(g)),r(x,g,A,s),A=x.length,-1==c)for(;t(S,x,_,A)<1;)m++,r(x,_<A?C:S,A,s),A=x.length}else 0===c&&(m++,x=[0]);w[p++]=m,x[0]?x[A++]=I[B]||0:(x=[I[B]],A=1)}while((B++<F||null!=x[0])&&T--);d=null!=x[0],w[0]||w.splice(0,1)}if(s==l){for(p=1,T=w[0];T>=10;T/=10,p++);V(b,o+(b.e=p+f*h-1)+1,a,d)}else b.e=f,b.r=+d;return b}}(),B=/^(-?)0([xbo])(?=\w[\w.]*$)/i,F=/^([^.]+)\.$/,k=/^\.([^.]+)$/,_=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(C,"");if(_.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(B,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(F,"$1").replace(k,"0.$1")),t!=o))return new $(o,i);if($.DEBUG)throw Error(c+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},T.absoluteValue=T.abs=function(){var e=new $(this);return e.s<0&&(e.s=1),e},T.comparedTo=function(e,t){return b(this,new $(e,t))},T.decimalPlaces=T.dp=function(e,t){var r,n,i,o=this;if(null!=e)return w(e,0,g),null==t?t=U:w(t,0,8),V(new $(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-y(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},T.dividedBy=T.div=function(e,t){return r(this,new $(e,t),S,U)},T.dividedToIntegerBy=T.idiv=function(e,t){return r(this,new $(e,t),0,1)},T.exponentiatedBy=T.pow=function(e,t){var r,n,i,o,a,f,l,p,d=this;if((e=new $(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+H(e));if(null!=t&&(t=new $(t)),a=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new $(Math.pow(+H(d),a?2-x(e):+H(e))),t?p.mod(t):p;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new $(NaN);(n=!f&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||a&&d.c[1]>=24e7:d.c[0]<8e13||a&&d.c[0]<=9999975e7)))return o=d.s<0&&x(e)?-0:0,d.e>-1&&(o=1/o),new $(f?1/o:o);N&&(o=s(N/h+2))}for(a?(r=new $(.5),f&&(e.s=1),l=x(e)):l=(i=Math.abs(+H(e)))%2,p=new $(I);;){if(l){if(!(p=p.times(d)).c)break;o?p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}if(i){if(0===(i=u(i/2)))break;l=i%2}else if(V(e=e.times(r),e.e+1,1),e.e>14)l=x(e);else{if(0===(i=+H(e)))break;l=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):n&&(d=d.mod(t))}return n?p:(f&&(p=I.div(p)),t?p.mod(t):o?V(p,N,U,void 0):p)},T.integerValue=function(e){var t=new $(this);return null==e?e=U:w(e,0,8),V(t,t.e+1,e)},T.isEqualTo=T.eq=function(e,t){return 0===b(this,new $(e,t))},T.isFinite=function(){return!!this.c},T.isGreaterThan=T.gt=function(e,t){return b(this,new $(e,t))>0},T.isGreaterThanOrEqualTo=T.gte=function(e,t){return 1===(t=b(this,new $(e,t)))||0===t},T.isInteger=function(){return!!this.c&&y(this.e/h)>this.c.length-2},T.isLessThan=T.lt=function(e,t){return b(this,new $(e,t))<0},T.isLessThanOrEqualTo=T.lte=function(e,t){return-1===(t=b(this,new $(e,t)))||0===t},T.isNaN=function(){return!this.s},T.isNegative=function(){return this.s<0},T.isPositive=function(){return this.s>0},T.isZero=function(){return!!this.c&&0==this.c[0]},T.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new $(e,t)).s,!s||!t)return new $(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/h,c=e.e/h,f=a.c,p=e.c;if(!u||!c){if(!f||!p)return f?(e.s=-t,e):new $(p?a:NaN);if(!f[0]||!p[0])return p[0]?(e.s=-t,e):new $(f[0]?a:3==U?-0:0)}if(u=y(u),c=y(c),f=f.slice(),s=u-c){for((o=s<0)?(s=-s,i=f):(c=u,i=p),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=f.length)<(t=p.length))?s:t,s=t=0;t<n;t++)if(f[t]!=p[t]){o=f[t]<p[t];break}if(o&&(i=f,f=p,p=i,e.s=-e.s),(t=(n=p.length)-(r=f.length))>0)for(;t--;f[r++]=0);for(t=l-1;n>s;){if(f[--n]<p[n]){for(r=n;r&&!f[--r];f[r]=t);--f[r],f[n]+=l}f[n]-=p[n]}for(;0==f[0];f.splice(0,1),--c);return f[0]?q(e,f,c):(e.s=3==U?-1:1,e.c=[e.e=0],e)},T.modulo=T.mod=function(e,t){var n,i,o=this;return e=new $(e,t),!o.c||!e.s||e.c&&!e.c[0]?new $(NaN):!e.c||o.c&&!o.c[0]?new $(o):(9==j?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,j),(e=o.minus(n.times(e))).c[0]||1!=j||(e.s=o.s),e)},T.multipliedBy=T.times=function(e,t){var r,n,i,o,a,s,u,c,f,p,d,g,v,b,w,x=this,A=x.c,E=(e=new $(e,t)).c;if(!(A&&E&&A[0]&&E[0]))return!x.s||!e.s||A&&!A[0]&&!E||E&&!E[0]&&!A?e.c=e.e=e.s=null:(e.s*=x.s,A&&E?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=y(x.e/h)+y(e.e/h),e.s*=x.s,(u=A.length)<(p=E.length)&&(v=A,A=E,E=v,i=u,u=p,p=i),i=u+p,v=[];i--;v.push(0));for(b=l,w=m,i=p;--i>=0;){for(r=0,d=E[i]%w,g=E[i]/w|0,o=i+(a=u);o>i;)r=((c=d*(c=A[--a]%w)+(s=g*c+(f=A[a]/w|0)*d)%w*w+v[o]+r)/b|0)+(s/w|0)+g*f,v[o--]=c%b;v[o]=r}return r?++n:v.splice(0,1),q(e,v,n)},T.negated=function(){var e=new $(this);return e.s=-e.s||null,e},T.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new $(e,t)).s,!i||!t)return new $(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/h,a=e.e/h,s=n.c,u=e.c;if(!o||!a){if(!s||!u)return new $(i/0);if(!s[0]||!u[0])return u[0]?e:new $(s[0]?n:0*i)}if(o=y(o),a=y(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/l|0,s[t]=l===s[t]?0:s[t]%l;return i&&(s=[i].concat(s),++a),q(e,s,a)},T.precision=T.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return w(e,1,g),null==t?t=U:w(t,0,8),V(new $(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},T.shiftedBy=function(e){return w(e,-p,p),this.times("1e"+e)},T.squareRoot=T.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,u=a.s,c=a.e,f=S+4,l=new $("0.5");if(1!==u||!s||!s[0])return new $(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+H(a)))||u==1/0?(((t=v(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=y((c+1)/2)-(c<0||c%2),n=new $(t=u==1/0?"1e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new $(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(o=n,n=l.times(o.plus(r(a,o,f,1))),v(o.c).slice(0,u)===(t=v(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(V(n,n.e+S+2,1),e=!n.times(n).eq(a));break}if(!i&&(V(o,o.e+S+2,0),o.times(o).eq(a))){n=o;break}f+=4,u+=4,i=1}return V(n,n.e+S+1,U,e)},T.toExponential=function(e,t){return null!=e&&(w(e,0,g),e++),Y(this,e,t,1)},T.toFixed=function(e,t){return null!=e&&(w(e,0,g),e=e+this.e+1),Y(this,e,t)},T.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=M;else if("object"!=typeof r)throw Error(c+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,a=n.split("."),s=+r.groupSize,u=+r.secondaryGroupSize,f=r.groupSeparator||"",l=a[0],h=a[1],p=i.s<0,d=p?l.slice(1):l,m=d.length;if(u&&(o=s,s=u,u=o,m-=o),s>0&&m>0){for(o=m%s||s,l=d.substr(0,o);o<m;o+=s)l+=f+d.substr(o,s);u>0&&(l+=f+d.slice(o)),p&&(l="-"+l)}n=h?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+n+(r.suffix||"")},T.toFraction=function(e){var t,n,i,o,a,s,u,f,l,p,m,g,y=this,b=y.c;if(null!=e&&(!(u=new $(e)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+H(u));if(!b)return new $(y);for(t=new $(I),l=n=new $(I),i=f=new $(I),g=v(b),a=t.e=g.length-y.e-1,t.c[0]=d[(s=a%h)<0?h+s:s],e=!e||u.comparedTo(t)>0?a>0?t:l:u,s=L,L=1/0,u=new $(g),f.c[0]=0;p=r(u,t,0,1),1!=(o=n.plus(p.times(i))).comparedTo(e);)n=i,i=o,l=f.plus(p.times(o=l)),f=o,t=u.minus(p.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),f=f.plus(o.times(l)),n=n.plus(o.times(i)),f.s=l.s=y.s,m=r(l,i,a*=2,U).minus(y).abs().comparedTo(r(f,n,a,U).minus(y).abs())<1?[l,i]:[f,n],L=s,m},T.toNumber=function(){return+H(this)},T.toPrecision=function(e,t){return null!=e&&w(e,1,g),Y(this,e,t,2)},T.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=R||o>=O?A(v(r.c),o):E(v(r.c),o,"0"):10===e?t=E(v((r=V(new $(r),S+o+1,U)).c),r.e,"0"):(w(e,2,z.length,"Base"),t=n(E(v(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},T.valueOf=T.toJSON=function(){return H(this)},T._isBigNumber=!0,null!=t&&$.set(t),$}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},1428:function(e,t,r){"use strict";r.r(t);var n=r(6),i=r.n(n),o=r(12),a=r.n(o),s=r(1),u=r.n(s),c=r(2),f=r.n(c),l=r(4),h=r.n(l),p=r(3),d=r.n(p),m=r(5),g=r.n(m),y=r(9),v=r(8),b=r(18),w=r(15),x=r(0),A=r(785),E=r.n(A),B=r(25),F=r.n(B),k=E.a.TesseractWorker,_=function(e){function t(){var e;return u()(this,t),(e=h()(this,d()(t).call(this))).name="Optical Character Recognition",e.module="OCR",e.description="Optical character recognition or optical character reader (OCR) is the mechanical or electronic conversion of images of typed, handwritten or printed text into machine-encoded text.<br><br>Supported image formats: png, jpg, bmp, pbm.",e.infoURL="https://wikipedia.org/wiki/Optical_character_recognition",e.inputType="ArrayBuffer",e.outputType="string",e.args=[{name:"Show confidence",type:"boolean",value:!0}],e}return g()(t,e),f()(t,[{key:"run",value:function(e,t){var r,n,o,s,u,c,f;return i.a.async((function(l){for(;;)switch(l.prev=l.next){case 0:if(r=a()(t,1),n=r[0],Object(x.d)()){l.next=3;break}throw Object(v.a)("This operation only works in a browser");case 3:if(o=Object(b.b)(e)){l.next=6;break}throw new v.a("Invalid File Type");case 6:return s=Object(x.d)()?`${self.docURL}/assets/`:`${F.a.cwd()}/src/core/vendor/`,l.prev=7,u=`data:${o};base64,${Object(w.b)(e)}`,c=new k({workerPath:`${s}tesseract/worker.min.js`,langPath:`${s}tesseract/lang-data`,corePath:`${s}tesseract/tesseract-core.wasm.js`}),l.next=12,i.a.awrap(c.recognize(u).progress((function(e){Object(x.d)()&&self.sendStatusMessage(`Status: ${e.status} - ${(100*parseFloat(e.progress)).toFixed(2)}%`)})));case 12:if(f=l.sent,!n){l.next=17;break}return l.abrupt("return",`Confidence: ${f.confidence}%\n\n${f.text}`);case 17:return l.abrupt("return",f.text);case 18:l.next=23;break;case 20:throw l.prev=20,l.t0=l.catch(7),new v.a(`Error performing OCR on image. (${l.t0})`);case 23:case"end":return l.stop()}}),null,null,[[7,20]])}}]),t}(y.a),C="undefined"==typeof self?{}:self.OpModules||{};C.OCR={"Optical Character Recognition":_};t.default=C},15:function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return a}));var n=r(0),i=r(8);
/**
 * Base64 functions.
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2016
 * @license Apache-2.0
 */
function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),"string"==typeof e&&(e=n.b.strToByteArray(e)),64!==(t=n.b.expandAlphRange(t).join("")).length&&65!==t.length)throw new i.a(`Invalid Base64 alphabet length (${t.length}): ${t}`);for(var r,o,a,s,u,c,f,l="",h=0;h<e.length;)s=(r=e[h++])>>2,u=(3&r)<<4|(o=e[h++])>>4,c=(15&o)<<2|(a=e[h++])>>6,f=63&a,isNaN(o)?c=f=64:isNaN(a)&&(f=64),l+=t.charAt(s)+t.charAt(u)+t.charAt(c)+t.charAt(f);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",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e)return"string"===r?"":[];if(t=t||"A-Za-z0-9+/=",64!==(t=n.b.expandAlphRange(t).join("")).length&&65!==t.length)throw new i.a(`Invalid Base64 alphabet length (${t.length}): ${t}`);var a,s,u,c,f,l,h=[],p=0;if(o){var d=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(d,"")}for(;p<e.length;)a=t.indexOf(e.charAt(p++))<<2|(c=-1===(c=t.indexOf(e.charAt(p++)||"="))?64:c)>>4,s=(15&c)<<4|(f=-1===(f=t.indexOf(e.charAt(p++)||"="))?64:f)>>2,u=(3&f)<<6|(l=-1===(l=t.indexOf(e.charAt(p++)||"="))?64:l),h.push(a),64!==f&&h.push(s),64!==l&&h.push(u);return"string"===r?n.b.byteArrayToUtf8(h):h}},16:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return a}));var n=r(0);
/**
 * 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,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!e)return"";e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var o="",a="0x"===t||"\\x"===t,s=0;s<e.length;s++){var u=e[s].toString(16).padStart(r,"0");o+=a?t+u:u+t,n&&(o+=n),s!==e.length-1&&(s+1)%i==0&&(o+="\n")}var c=n.length+(a?0:t.length);return c?o.slice(0,-c):o}function o(e){if(!e)return"";e instanceof ArrayBuffer&&(e=new Uint8Array(e));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 a(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]|(0x)/gi:n.b.regexRep(t);e=e.replace(i,"")}for(var o=[],a=0;a<e.length;a+=r)o.push(parseInt(e.substr(a,r),16));return o}["Auto"].concat(["Space","Percent","Comma","Semi-colon","Colon","Line feed","CRLF","0x","0x with comma","\\x","None"])},18:function(e,t,r){"use strict";var n=r(12),i=r.n(n),o=r(7),a={Images:[{name:"Joint Photographic Experts Group image",extension:"jpg,jpeg,jpe,thm,mpo",mime:"image/jpeg",description:"",signature:{0:255,1:216,2:255,3:[192,196,219,221,224,225,226,227,228,229,231,232,234,235,236,237,238,254]},extractor:function(e,t){var r=new o.a(e.slice(t));for(;r.hasMore();){var n=r.getBytes(2);if(255!==n[0])throw new Error(`Invalid marker while parsing JPEG at pos ${r.position}: ${n}`);var i=0;switch(n[1]){case 216:case 1:break;case 217:return r.carve();case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 219:case 222:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:i=r.readInt(2,"be"),r.position+=i-2;break;case 223:r.position++;break;case 220:case 221:r.position+=2;break;case 218:i=r.readInt(2,"be"),r.position+=i-2,r.continueUntil(255);break;case 0:case 208:case 209:case 210:case 211:case 212:case 213:case 214:case 215:default:r.continueUntil(255)}}throw new Error("Unable to parse JPEG successfully")}},{name:"Graphics Interchange Format image",extension:"gif",mime:"image/gif",description:"",signature:{0:71,1:73,2:70,3:56,4:[55,57],5:97},extractor:function(e,t){var r=new o.a(e.slice(t));r.continueUntil([33,255]),r.continueUntil([33,249]),r.moveForwardsBy(2);for(;r.hasMore();){for(r.moveForwardsBy(r.readInt(1)+1),r.moveForwardsBy(11);r.getBytes(2)!==[33,249]&&(r.moveBackwardsBy(2),r.moveForwardsBy(r.readInt(1)),r.readInt(1));)r.moveBackwardsBy(1);if(59===r.readInt(1))break;r.moveForwardsBy(1)}return r.carve()}},{name:"Portable Network Graphics image",extension:"png",mime:"image/png",description:"",signature:{0:137,1:80,2:78,3:71,4:13,5:10,6:26,7:10},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveForwardsBy(8);var n=0,i="";for(;"IEND"!==i;)n=r.readInt(4,"be"),i=r.readString(4),r.moveForwardsBy(n+4);return r.carve()}},{name:"WEBP Image",extension:"webp",mime:"image/webp",description:"",signature:{8:87,9:69,10:66,11:80},extractor:null},{name:"Camera Image File Format",extension:"crw",mime:"image/x-canon-crw",description:"",signature:{6:72,7:69,8:65,9:80,10:67,11:67,12:68,13:82},extractor:null},{name:"Canon CR2 raw image",extension:"cr2",mime:"image/x-canon-cr2",description:"",signature:[{0:73,1:73,2:42,3:0,8:67,9:82},{0:77,1:77,2:0,3:42,8:67,9:82}],extractor:null},{name:"Tagged Image File Format image",extension:"tif",mime:"image/tiff",description:"",signature:[{0:73,1:73,2:42,3:0},{0:77,1:77,2:0,3:42}],extractor:null},{name:"Bitmap image",extension:"bmp",mime:"image/bmp",description:"",signature:{0:66,1:77,7:0,9:0,14:[12,40,56,64,108,124],15:0,16:0,17:0},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveForwardsBy(2);var n=r.readInt(4,"le");return r.moveForwardsBy(n-6),r.carve()}},{name:"JPEG Extended Range image",extension:"jxr",mime:"image/vnd.ms-photo",description:"",signature:{0:73,1:73,2:188},extractor:null},{name:"Photoshop image",extension:"psd",mime:"image/vnd.adobe.photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:1,6:0,7:0,8:0,9:0,10:0,11:0},extractor:null},{name:"Photoshop Large Document",extension:"psb",mime:"application/x-photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:2,6:0,7:0,8:0,9:0,10:0,11:0,12:0},extractor:null},{name:"Paint Shop Pro image",extension:"psp",mime:"image/psp",description:"",signature:[{0:80,1:97,2:105,3:110,4:116,5:32,6:83,7:104,8:111,9:112,10:32,11:80,12:114,13:111,14:32,15:73,16:109},{0:126,1:66,2:75,3:0}],extractor:null},{name:"The GIMP image",extension:"xcf",mime:"image/x-xcf",description:"",signature:{0:103,1:105,2:109,3:112,4:32,5:120,6:99,7:102,8:32,9:[102,118],10:[105,48],11:[108,48],12:[101,49,50,51]},extractor:null},{name:"Icon image",extension:"ico",mime:"image/x-icon",description:"",signature:{0:0,1:0,2:1,3:0,4:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],5:0,6:[16,32,48,64,128],7:[16,32,48,64,128],9:0,10:[0,1]},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveTo(4);var n=r.readInt(2,"le");r.moveForwardsBy(8+16*(n-1));var i=r.readInt(4,"le"),a=r.readInt(4,"le");return r.moveTo(a+i),r.carve()}},{name:"Radiance High Dynamic Range image",extension:"hdr",mime:"image/vnd.radiance",description:"",signature:{0:35,1:63,2:82,3:65,4:68,5:73,6:65,7:78,8:67,9:69,10:10},extractor:null},{name:"Sony ARW image",extension:"arw",mime:"image/x-raw",description:"",signature:{0:5,1:0,2:0,3:0,4:65,5:87,6:49,7:46},extractor:null},{name:"Fujifilm Raw Image",extension:"raf",mime:"image/x-raw",description:"",signature:{0:70,1:85,2:74,3:73,4:70,5:73,6:76,7:77,8:67,9:67,10:68,11:45,12:82,13:65,14:87},extractor:null},{name:"Minolta RAW image",extension:"mrw",mime:"image/x-raw",description:"",signature:{0:0,1:77,2:82,3:77},extractor:null},{name:"Adobe Bridge Thumbnail Cache",extension:"bct",mime:"application/octet-stream",description:"",signature:{0:108,1:110,2:98,3:116,4:2,5:0,6:0,7:0},extractor:null},{name:"Microsoft Document Imaging",extension:"mdi",mime:"image/vnd.ms-modi",description:"",signature:{0:69,1:80,2:42,3:0},extractor:null},{name:"Joint Photographic Experts Group image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:47,1:57,2:106,3:47,4:52},extractor:null},{name:"Portable Network Graphics image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:105,1:86,2:66,3:79,4:82,5:119,6:48},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,123d",mime:"application/acad",description:"",signature:{0:65,1:67,2:49,3:48,4:[48,49],5:[48,49,50,51,52,53],6:0},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,dwt",mime:"application/acad",description:"",signature:[{0:65,1:67,2:49,3:48,4:49,5:56,6:0},{0:65,1:67,2:49,3:48,4:50,5:52,6:0},{0:65,1:67,2:49,3:48,4:50,5:55,6:0}],extractor:null}],Video:[{name:"Matroska Multimedia Container",extension:"mkv",mime:"video/x-matroska",description:"",signature:{31:109,32:97,33:116,34:114,35:111,36:115,37:107,38:97},extractor:null},{name:"WEBM video",extension:"webm",mime:"video/webm",description:"",signature:{0:26,1:69,2:223,3:163},extractor:null},{name:"Flash MP4 video",extension:"f4v",mime:"video/mp4",description:"",signature:{4:102,5:116,6:121,7:112,8:[102,70],9:52,10:[118,86],11:32},extractor:null},{name:"MPEG-4 video",extension:"mp4",mime:"video/mp4",description:"",signature:[{0:0,1:0,2:0,3:[24,32],4:102,5:116,6:121,7:112},{0:51,1:103,2:112,3:53},{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:109,9:112,10:52,11:50,16:109,17:112,18:52,19:49,20:109,21:112,22:52,23:50,24:105,25:115,26:111,27:109}],extractor:null},{name:"M4V video",extension:"m4v",mime:"video/x-m4v",description:"",signature:{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:77,9:52,10:86},extractor:null},{name:"Quicktime video",extension:"mov",mime:"video/quicktime",description:"",signature:{0:0,1:0,2:0,3:20,4:102,5:116,6:121,7:112},extractor:null},{name:"Audio Video Interleave",extension:"avi",mime:"video/x-msvideo",description:"",signature:{0:82,1:73,2:70,3:70,8:65,9:86,10:73},extractor:null},{name:"Windows Media Video",extension:"wmv",mime:"video/x-ms-wmv",description:"",signature:{0:48,1:38,2:178,3:117,4:142,5:102,6:207,7:17,8:166,9:217},extractor:null},{name:"MPEG video",extension:"mpg",mime:"video/mpeg",description:"",signature:{0:0,1:0,2:1,3:186},extractor:null},{name:"Flash Video",extension:"flv",mime:"video/x-flv",description:"",signature:{0:70,1:76,2:86,3:1},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveForwardsBy(5);var n=r.readInt(4,"be");r.moveForwardsBy(n-9);var i=-11;for(;r.hasMore();){var a=r.readInt(4,"be"),s=r.readInt(1);if([8,9,18].indexOf(s)<0){r.moveBackwardsBy(1);break}if(a!==i+11){r.moveBackwardsBy(i+11+5);break}i=r.readInt(3,"be"),r.moveForwardsBy(7+i)}return r.carve()}},{name:"OGG Video",extension:"ogv,ogm,opus,ogx",mime:"video/ogg",description:"",signature:[{0:79,1:103,2:103,3:83,4:0,5:2,28:1,29:118,30:105,31:100,32:101,33:111},{0:79,1:103,2:103,3:83,4:0,5:2,28:128,29:116,30:104,31:101,32:111,33:114,34:97},{0:79,1:103,2:103,3:83,4:0,5:2,28:102,29:105,30:115,31:104,32:101,33:97,34:100}],extractor:null}],Audio:[{name:"Waveform Audio",extension:"wav",mime:"audio/x-wav",description:"",signature:{0:82,1:73,2:70,3:70,8:87,9:65,10:86,11:69},extractor:function(e,t){var r=new o.a(e.slice(t));return r.moveTo(4),r.moveTo(r.readInt(4,"le")),r.carve()}},{name:"OGG audio",extension:"ogg",mime:"audio/ogg",description:"",signature:{0:79,1:103,2:103,3:83},extractor:null},{name:"Musical Instrument Digital Interface audio",extension:"midi",mime:"audio/midi",description:"",signature:{0:77,1:84,2:104,3:100},extractor:null},{name:"MPEG-3 audio",extension:"mp3",mime:"audio/mpeg",description:"",signature:[{0:73,1:68,2:51},{0:255,1:251}],extractor:null},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(e,t){var r=new o.a(e.slice(t));return r.continueUntil([37,37,69,79,70]),r.moveForwardsBy(5),r.consumeIf(13),r.consumeIf(10),r.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(e,t){var r=new o.a(e.slice(t)),n=0;if(123!==r.readInt(1))throw new Error("Not a valid RTF file");n++;for(;n>0&&r.hasMore();)switch(r.readInt(1)){case 123:n++;break;case 125:n--;break;case 92:r.consumeIf(92),r.position++}return r.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:s},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:s}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveTo(60);var n=r.readInt(4,"le");r.moveTo(n),r.moveForwardsBy(6);var i=r.readInt(2,"le");r.moveForwardsBy(16);var a=523===r.readInt(2,"le")?112:96;r.moveForwardsBy(a-2),r.moveForwardsBy(32);var s=r.readInt(4,"le"),u=r.readInt(4,"le");if(s>0)return r.moveTo(s+u),r.carve();r.moveForwardsBy(88),r.moveForwardsBy(40*(i-1)),r.moveForwardsBy(16);var c=r.readInt(4,"le"),f=r.readInt(4,"le");return r.moveTo(f+c),r.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveForwardsBy(4);var n=1===r.readInt(1),i=1===r.readInt(1)?"le":"be";r.moveForwardsBy(n?26:34);var a=n?r.readInt(4,i):r.readInt(8,i);r.moveForwardsBy(10);var s=r.readInt(2,i),u=r.readInt(2,i);return r.moveTo(a),r.moveForwardsBy(s*u),r.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:u},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:u},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:s},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(e,t){var r=new o.a(e.slice(t));for(;r.hasMore();){if(r.moveForwardsBy(257),r.getBytes(5).join("")!==[117,115,116,97,114].join("")){r.moveBackwardsBy(262);break}r.moveBackwardsBy(138);var n=0;r.getBytes(11).forEach((function(e,t){n+=(e-48).toString()})),n=512*Math.ceil(parseInt(n,8)/512),r.moveForwardsBy(n+377)}return r.consumeWhile(0),r.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveForwardsBy(3);var n=r.readInt(1);if(r.moveForwardsBy(4),r.readInt(1),r.moveForwardsBy(1),4&n){var i=r.readInt(2,"le");r.moveForwardsby(i)}8&n&&(r.continueUntil(0),r.moveForwardsBy(1));16&n&&(r.continueUntil(0),r.moveForwardsBy(1));2&n&&r.moveForwardsBy(2);return d(r),r.moveForwardsBy(8),r.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(e,t){for(var r=new o.a(e.slice(t)),n=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i<n.length&&(r.continueUntil(n[i]),r.getBytes(5).join("")!==n[i].join(""));i++)r.moveTo(0);return r.moveForwardsBy(4),r.carve()}},{name:"7zip",extension:"7z",mime:"application/x-7z-compressed",description:"",signature:{0:55,1:122,2:188,3:175,4:39,5:28},extractor:null},{name:"Zlib Deflate",extension:"zlib",mime:"application/x-deflate",description:"",signature:{0:120,1:[1,156,218,94]},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveForwardsBy(1),32&r.readInt(1)&&r.moveForwardsBy(4);return d(r),r.moveForwardsBy(4),r.carve()}},{name:"xz compression",extension:"xz",mime:"application/x-xz",description:"",signature:{0:253,1:55,2:122,3:88,4:90,5:0},extractor:function(e,t){var r=new o.a(e.slice(t));return r.continueUntil([0,0,0,0,4,89,90]),r.moveForwardsBy(7),r.carve()}},{name:"Tarball",extension:"tar.z",mime:"application/x-gtar",description:"",signature:{0:31,1:[157,160]},extractor:null},{name:"ISO disk image",extension:"iso",mime:"application/octet-stream",description:"ISO 9660 CD/DVD image file",signature:[{32769:67,32770:68,32771:48,32772:48,32773:49},{34817:67,34818:68,34819:48,34820:48,34821:49},{36865:67,36866:68,36867:48,36868:48,36869:49}],extractor:null},{name:"Virtual Machine Disk",extension:"vmdk",mime:"application/vmdk,application/x-virtualbox-vmdk",description:"",signature:{0:75,1:68,2:77,3:86,5:0,6:0,7:0},extractor:null},{name:"Virtual Hard Drive",extension:"vhd",mime:"application/x-vhd",description:"",signature:{0:99,1:111,2:110,3:101,4:99,5:116,6:105,7:120},extractor:null},{name:"Macintosh disk image",extension:"dmf,dmg",mime:"application/octet-stream",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96,7:96},extractor:null},{name:"ARJ Archive",extension:"arj",mime:"application/x-arj-compressed",description:"",signature:{0:96,1:234,8:[0,16,20],9:0,10:2},extractor:null},{name:"WinAce Archive",extension:"ace",mime:"application/x-ace-compressed",description:"",signature:{7:42,8:42,9:65,10:67,11:69,12:42,13:42},extractor:null},{name:"Macintosh BinHex Encoded File",extension:"hqx",mime:"application/mac-binhex",description:"",signature:{11:109,12:117,13:115,14:116,15:32,16:98,17:101,18:32,19:99,20:111,21:110,22:118,23:101,24:114,25:116,26:101,27:100,28:32,29:119,30:105,31:116,32:104,33:32,34:66,35:105,36:110,37:72,38:101,39:120},extractor:null},{name:"ALZip Archive",extension:"alz",mime:"application/octet-stream",description:"",signature:{0:65,1:76,2:90,3:1,4:10,5:0,6:0,7:0},extractor:null},{name:"KGB Compressed Archive",extension:"kgb",mime:"application/x-kgb-compressed",description:"",signature:{0:75,1:71,2:66,3:95,4:97,5:114,6:99,7:104,8:32,9:45},extractor:null},{name:"Microsoft Cabinet",extension:"cab",mime:"vnd.ms-cab-compressed",description:"",signature:{0:77,1:83,2:67,3:70,4:0,5:0,6:0,7:0},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:95,1:39,2:168,3:137},extractor:null},{name:"lzop compressed",extension:"lzop,lzo",mime:"application/x-lzop",description:"",signature:{0:137,1:76,2:90,3:79,4:0,5:13,6:10,7:26},extractor:null},{name:"Linux deb",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:null},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveTo(16);var n=r.readInt(2);r.moveTo(28);var i=r.readInt(4);return r.moveTo(n*i),r.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveTo(20);var n=r.readInt(4,"le");r.moveTo(n);var i=r.readInt(4,"le");return r.moveForwardsBy(i-4),r.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(e,t){var r=new o.a(e.slice(t));r.moveTo(40);var n=r.readInt(4,"le")-44;r.moveForwardsBy(n);for(;r.hasMore()&&r.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)r.moveForwardsBy(65529);return r.consumeWhile(0),r.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:null},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:null},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:null},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(e,t){var r=new o.a(e.slice(t)),n=0;r.continueUntil([60,112,108,105,115,116]),r.moveForwardsBy(6),n++;for(;n>0&&r.hasMore();)60===r.readInt(1)&&(r.getBytes(5).join("")===[112,108,105,115,116].join("")?n++:r.moveBackwardsBy(5),r.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?n--:r.moveBackwardsBy(7));return r.consumeIf(10),r.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:null},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(e){return e>=1&&e<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(e){return e>=1&&e<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(e){return 0!==e},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:null},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function s(e,t){var r=new o.a(e.slice(t));r.continueUntil([80,75,5,6]),r.moveForwardsBy(20);var n=r.readInt(2,"le");return r.moveForwardsBy(n),r.carve()}function u(e,t){var r="207250237254",n="254237250207",i="206250237254";var a=new o.a(e.slice(t)),s=a.getBytes(4).join("");return a.moveTo(function(e,t,r){var n=28;t&&(n+=4),e.moveTo(16);var i=e.readInt(4,r);return function(e,t,r,n){for(var i=0,o=0;o<n;o++){e.moveTo(t);var a=e.readInt(4,r);25===a?(e.moveTo(t+48),i+=e.readInt(8,r),e.moveTo(t+4),t+=e.readInt(4,r)):1===a&&(e.moveTo(t+36),i+=e.readInt(4,r),e.moveTo(t+4),t+=e.readInt(4,r))}return i}(e,n,r,i)}(a,function(e){return e===r||e===n}(s),function(e){return e===i||e===r}(s)?"le":"be")),a.carve()}for(var c=new Array(288),f=0;f<c.length;f++)c[f]=f<=143?8:f<=255?9:f<=279?7:8;var l=v(c),h=v(new Array(30).fill(5)),p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function d(e){for(var t=0;!t;){t=e.readBits(1);var r=e.readBits(2);if(0===r){e.moveForwardsBy(1);var n=e.readInt(2,"le");e.moveForwardsBy(2+n)}else if(1===r)y(e,l,h);else{if(2!==r)throw new Error(`Invalid block type while parsing DEFLATE stream at pos ${e.position}`);for(var i=e.readBits(5)+257,o=e.readBits(5)+1,a=e.readBits(4)+4,s=new Uint8Array(p.length),u=0;u<a;u++)s[p[u]]=e.readBits(3);for(var c=v(s),f=new Uint8Array(i+o),d=void 0,m=void 0,g=void 0,w=0;w<i+o;)switch(d=b(e,c)){case 16:for(m=3+e.readBits(2);m--;)f[w++]=g;break;case 17:for(m=3+e.readBits(3);m--;)f[w++]=0;g=0;break;case 18:for(m=11+e.readBits(7);m--;)f[w++]=0;g=0;break;default:f[w++]=d,g=d}y(e,v(f.subarray(0,i)),v(f.subarray(i)))}}e.bitPos>0&&e.moveForwardsBy(1)}var m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],g=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function y(e,t,r){for(var n,i=0;(n=b(e,t))&&256!==n;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");n<256||(e.readBits(m[n-257]),n=b(e,r),e.readBits(g[n]))}}function v(e){for(var t=Math.max.apply(Math,e),r=Math.min.apply(Math,e),n=1<<t,i=new Uint32Array(n),o=1,a=0,s=2;o<=t;){for(var u=0;u<e.length;u++)if(e[u]===o){var c=void 0,f=void 0,l=void 0;for(c=0,f=a,l=0;l<o;l++)c=c<<1|1&f,f>>=1;for(var h=o<<16|u,p=c;p<n;p+=s)i[p]=h;a++}o++,a<<=1,s<<=1}return[i,t,r]}function b(e,t){var r=i()(t,2),n=r[0],o=r[1],a=n[e.readBits(o)&(1<<o)-1],s=a>>>16;if(s>o)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${e.position}: ${s}`);return e.moveBackwardsByBits(o-s),65535&a}r(0);
/**
 * File type functions
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2018
 * @license Apache-2.0
 *
 */
function w(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.length){for(var n=0;n<e.length;n++)if(x(e[n],t,r))return!0;return!1}return x(e,t,r)}function x(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(var n in e){var i=parseInt(n,10)+r;switch(typeof e[n]){case"number":if(t[i]!==e[n])return!1;break;case"object":if(e[n].indexOf(t[i])<0)return!1;break;case"function":if(!e[n](t[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${n}`)}}return!0}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(a);if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e&&e.length>1))return[];var r=[],n={};for(var i in a)t.includes(i)&&(n[i]=a[i]);for(var o in n){n[o].forEach((function(t){w(t.signature,e)&&r.push(t)}))}return r}function E(e){return function(e,t){var r=A(t);if(!r||!r.length)return!1;if("string"==typeof e)return r.reduce((function(t,r){var n=!!r.mime.startsWith(e)&&r.mime;return t||n}),!1);if(e instanceof RegExp)return r.reduce((function(t,r){var n=!!e.test(r.mime)&&r.mime;return t||n}),!1);throw new Error("Invalid type input.")}("image",e)}r.d(t,"a",(function(){return A})),r.d(t,"b",(function(){return E}))},2:function(e,t){function r(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)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},22:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},23:function(e,t,r){!function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function a(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)?(a(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))return 63&e;throw Error("Invalid continuation byte")}function f(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|c())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|c()<<6|c())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|c()<<12|c()<<6|c())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n<r;)i+=u(t[n]);return i},e.decode=function(e){t=o(e),r=t.length,n=0;for(var a,s=[];!1!==(a=f());)s.push(a);return function(e){for(var t,r=e.length,n=-1,o="";++n<r;)(t=e[n])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(s)}}(t)},24:function(e,t,r){var n,i;!function(o,a){"use strict";void 0===(i="function"==typeof(n=function(){var e=function(){},t="undefined",r=typeof window!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function i(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 o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(t,r){for(var i=0;i<n.length;i++){var o=n[i];this[o]=i<t?e:this.methodFactory(o,t,r)}this.log=this.debug}function s(e,r,n){return function(){typeof console!==t&&(a.call(this,r,n),this[e].apply(this,arguments))}}function u(n,a,u){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?o:void 0!==console[n]?i(console,n):void 0!==console.log?i(console,"log"):e)}(n)||s.apply(this,arguments)}function c(e,r,i){var o,s=this,c="loglevel";function f(){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===s.levels[e]&&(e=void 0),e}}e&&(c+=":"+e),s.name=e,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=i||u,s.getLevel=function(){return o},s.setLevel=function(r,i){if("string"==typeof r&&void 0!==s.levels[r.toUpperCase()]&&(r=s.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==i&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),a.call(s,r,e),typeof console===t&&r<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(e){f()||s.setLevel(e,!1)},s.enableAll=function(e){s.setLevel(s.levels.TRACE,e)},s.disableAll=function(e){s.setLevel(s.levels.SILENT,e)};var l=f();null==l&&(l=null==r?"WARN":r),s.setLevel(l,!1)}var f=new c,l={};f.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=l[e];return t||(t=l[e]=new c(e,f.getLevel(),f.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return f.noConflict=function(){return typeof window!==t&&window.log===f&&(window.log=h),f},f.getLoggers=function(){return l},f})?n.call(t,r,t,e):n)||(e.exports=i)}()},25:function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!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:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var e=s(h);f=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!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 m(){}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||f||s(p)},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=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,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}},26: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},27:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));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,i=n.b.regexRep(t);e=e.replace(i,"");for(var o=[],a=0;a<e.length;a+=r)o.push(parseInt(e.substr(a,r),2));return o}},28: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.b.charRep(t);var r=[],i=e.split(t);""===i[i.length-1]&&(i=i.slice(0,i.length-1));for(var o=0;o<i.length;o++)r[o]=parseInt(i[o],10);return r}},3:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},38:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},39:function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},4:function(e,t,r){var n=r(38),i=r(22);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?i(e):t}},40:function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=c(e),n=r[0],a=r[1],s=new o(function(e,t,r){return 3*(t+r)/4-r}(0,n,a)),u=0,f=a>0?n-4:n,l=0;l<f;l+=4)t=i[e.charCodeAt(l)]<<18|i[e.charCodeAt(l+1)]<<12|i[e.charCodeAt(l+2)]<<6|i[e.charCodeAt(l+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=255&t;2===a&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,s[u++]=255&t);1===a&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t);return s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(f(e,a,a+16383>s?s:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},41:function(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*m}},42:function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},43:function(e,t,r){var n=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new _(n||[]);return o._invoke=function(e,t,r){var n=f;return function(i,o){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return T()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=B(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=c(e,t,r);if("normal"===u.type){if(n=r.done?p:l,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",l="suspendedYield",h="executing",p="completed",d={};function m(){}function g(){}function y(){}var v={};v[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==r&&n.call(w,o)&&(v=w);var x=y.prototype=m.prototype=Object.create(v);function A(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function E(e){var t;this._invoke=function(r,i){function o(){return new Promise((function(t,o){!function t(r,i,o,a){var s=c(e[r],e,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then((function(e){t("next",e,o,a)}),(function(e){t("throw",e,o,a)})):Promise.resolve(f).then((function(e){u.value=e,o(u)}),(function(e){return t("throw",e,o,a)}))}a(s.arg)}(r,i,t,o)}))}return t=t?t.then(o,o):o()}}function B(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,B(e,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=c(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function F(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function C(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:t,done:!0}}return g.prototype=x.constructor=y,y.constructor=g,y[s]=g.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},A(E.prototype),E.prototype[a]=function(){return this},e.AsyncIterator=E,e.async=function(t,r,n,i){var o=new E(u(t,r,n,i));return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},A(x),x[s]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=C,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},44:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},45:function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}},451:function(e,t,r){"use strict";(function(t){var n=r(113),i=r(1258),o={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:("undefined"!=typeof XMLHttpRequest?s=r(697):void 0!==t&&(s=r(697)),s),transformRequest:[function(e,t){return i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(o)})),e.exports=u}).call(this,r(25))},46:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},5:function(e,t,r){var n=r(39);e.exports=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)}},6:function(e,t,r){e.exports=r(43)},694:function(module,exports,__webpack_require__){"use strict";(function(Buffer){const toBytes=e=>[...e].map(e=>e.charCodeAt(0)),xpiZipFilename=toBytes("META-INF/mozilla.rsa"),oxmlContentTypes=toBytes("[Content_Types].xml"),oxmlRels=toBytes("_rels/.rels");function readUInt64LE(e,t=0){let r=e[t],n=1,i=0;for(;++i<8;)n*=256,r+=e[t+i]*n;return r}const fileType=e=>{if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Uint8Array?e:new Uint8Array(e);if(!(t&&t.length>1))return null;const r=(e,r)=>{r=Object.assign({offset:0},r);for(let n=0;n<e.length;n++)if(r.mask){if(e[n]!==(r.mask[n]&t[n+r.offset]))return!1}else if(e[n]!==t[n+r.offset])return!1;return!0},n=(e,t)=>r(toBytes(e),t);if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(xpiZipFilename,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(n("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(n("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(n("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};const e=(e,t=0)=>e.findIndex((e,r,n)=>r>=t&&80===n[r]&&75===n[r+1]&&3===n[r+2]&&4===n[r+3]);let i=0,o=!1,a=null;do{const s=i+30;if(o||(o=r(oxmlContentTypes,{offset:s})||r(oxmlRels,{offset:s})),a||(n("word/",{offset:s})?a={ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}:n("ppt/",{offset:s})?a={ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}:n("xl/",{offset:s})&&(a={ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),o&&a)return a;i=e(t,s)}while(i>=0);if(a)return a}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){const e=t.subarray(4,4100),r=e.findIndex((e,t,r)=>66===r[t]&&130===r[t+1]);if(-1!==r){const t=r+3,n=r=>[...r].every((r,n)=>e[t+n]===r.charCodeAt(0));if(n("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(n("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217])){let e=30;do{const n=readUInt64LE(t,e+16);if(r([145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101],{offset:e})){if(r([64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43],{offset:e+24}))return{ext:"wma",mime:"audio/x-ms-wma"};if(r([192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43],{offset:e+24}))return{ext:"wmv",mime:"video/x-ms-asf"};break}e+=n}while(e+24<=t.length);return{ext:"asf",mime:"application/vnd.ms-asf"}}if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([102,116,121,112,51,103],{offset:4}))return{ext:"3gp",mime:"video/3gpp"};for(let e=0;e<2&&e<t.length-16;e++){if(r([73,68,51],{offset:e})||r([255,226],{offset:e,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([255,228],{offset:e,mask:[255,228]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,248],{offset:e,mask:[255,252]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,240],{offset:e,mask:[255,252]}))return{ext:"mp4",mime:"audio/mpeg"}}if(r([102,116,121,112,77,52,65],{offset:4}))return{ext:"m4a",mime:"audio/mp4"};if(r([79,112,117,115,72,101,97,100],{offset:28}))return{ext:"opus",mime:"audio/opus"};if(r([79,103,103,83]))return r([128,116,104,101,111,114,97],{offset:28})?{ext:"ogv",mime:"video/ogg"}:r([1,118,105,100,101,111,0],{offset:28})?{ext:"ogm",mime:"video/ogg"}:r([127,70,76,65,67],{offset:28})?{ext:"oga",mime:"audio/ogg"}:r([83,112,101,101,120,32,32],{offset:28})?{ext:"spx",mime:"audio/ogg"}:r([1,118,111,114,98,105,115],{offset:28})?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"};if(r([102,76,97,67]))return{ext:"flac",mime:"audio/x-flac"};if(r([77,65,67,32]))return{ext:"ape",mime:"audio/ape"};if(r([119,118,112,107]))return{ext:"wv",mime:"audio/wavpack"};if(r([35,33,65,77,82,10]))return{ext:"amr",mime:"audio/amr"};if(r([37,80,68,70]))return{ext:"pdf",mime:"application/pdf"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if((67===t[0]||70===t[0])&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([123,92,114,116,102]))return{ext:"rtf",mime:"application/rtf"};if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff",mime:"font/woff"};if(r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(r([37,33]))return{ext:"ps",mime:"application/postscript"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(r([83,81,76,105]))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(r([67,114,50,52]))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(r([77,83,67,70])||r([73,83,99,40]))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121]))return{ext:"deb",mime:"application/x-deb"};if(r([33,60,97,114,99,104,62]))return{ext:"ar",mime:"application/x-unix-archive"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([76,90,73,80]))return{ext:"lz",mime:"application/x-lzip"};if(r([208,207,17,224,161,177,26,225]))return{ext:"msi",mime:"application/x-msi"};if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,76,69,78,68,69,82]))return{ext:"blend",mime:"application/x-blender"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(r([0,0,0,12,106,80,32,32,13,10,135,10])){if(r([106,112,50,32],{offset:20}))return{ext:"jp2",mime:"image/jp2"};if(r([106,112,120,32],{offset:20}))return{ext:"jpx",mime:"image/jpx"};if(r([106,112,109,32],{offset:20}))return{ext:"jpm",mime:"image/jpm"};if(r([109,106,112,50],{offset:20}))return{ext:"mj2",mime:"image/mj2"}}if(r([70,79,82,77]))return{ext:"aif",mime:"audio/aiff"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([102,116,121,112],{offset:4})){if(r([109,105,102,49],{offset:8}))return{ext:"heic",mime:"image/heif"};if(r([109,115,102,49],{offset:8}))return{ext:"heic",mime:"image/heif-sequence"};if(r([104,101,105,99],{offset:8})||r([104,101,105,120],{offset:8}))return{ext:"heic",mime:"image/heic"};if(r([104,101,118,99],{offset:8})||r([104,101,118,120],{offset:8}))return{ext:"heic",mime:"image/heic-sequence"}}return r([171,75,84,88,32,49,49,187,13,10,26,10])?{ext:"ktx",mime:"image/ktx"}:r([68,73,67,77],{offset:128})?{ext:"dcm",mime:"application/dicom"}:r([77,80,43])?{ext:"mpc",mime:"audio/x-musepack"}:r([77,80,67,75])?{ext:"mpc",mime:"audio/x-musepack"}:r([66,69,71,73,78,58])?{ext:"ics",mime:"text/calendar"}:r([103,108,84,70,2,0,0,0])?{ext:"glb",mime:"model/gltf-binary"}:r([212,195,178,161])||r([161,178,195,212])?{ext:"pcap",mime:"application/vnd.tcpdump.pcap"}:null};module.exports=fileType,module.exports.default=fileType,Object.defineProperty(fileType,"minimumBytes",{value:4100}),module.exports.stream=readableStream=>new Promise((resolve,reject)=>{const stream=eval("require")("stream");readableStream.once("readable",()=>{const e=new stream.PassThrough,t=readableStream.read(module.exports.minimumBytes)||readableStream.read();try{e.fileType=fileType(t)}catch(e){reject(e)}readableStream.unshift(t),stream.pipeline?resolve(stream.pipeline(readableStream,e,()=>{})):resolve(readableStream.pipe(e))})})}).call(this,__webpack_require__(11).Buffer)},695:function(e,t,r){e.exports=r(1255)},696:function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},697:function(e,t,r){"use strict";var n=r(113),i=r(1259),o=r(1261),a=r(1262),s=r(1263),u=r(698);e.exports=function(e){return new Promise((function(t,c){var f=e.data,l=e.headers;n.isFormData(f)&&delete l["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",d=e.auth.password||"";l.Authorization="Basic "+btoa(p+":"+d)}if(h.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};i(t,c,n),h=null}},h.onerror=function(){c(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var m=r(1264),g=(e.withCredentials||s(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;g&&(l[e.xsrfHeaderName]=g)}if("setRequestHeader"in h&&n.forEach(l,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete l[t]:h.setRequestHeader(t,e)})),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),c(e),h=null)})),void 0===f&&(f=null),h.send(f)}))}},698:function(e,t,r){"use strict";var n=r(1260);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},699:function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},7:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(1),i=r.n(n),o=r(2),a=r.n(o),s=function(){function e(t){i()(this,e),this.bytes=t,this.length=this.bytes.length,this.position=0,this.bitPos=0}return a()(e,[{key:"getBytes",value:function(e){if(!(this.position>this.length)){var t=this.position+e,r=this.bytes.slice(this.position,t);return this.position=t,this.bitPos=0,r}}},{key:"readString",value:function(e){if(!(this.position>this.length)){for(var t="",r=this.position;r<this.position+e;r++){var n=this.bytes[r];if(0===n)break;t+=String.fromCharCode(n)}return this.position+=e,this.bitPos=0,t}}},{key:"readInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r=0;if("be"===t)for(var n=this.position;n<this.position+e;n++)r<<=8,r|=this.bytes[n];else for(var i=this.position+e-1;i>=this.position;i--)r<<=8,r|=this.bytes[i];return this.position+=e,this.bitPos=0,r}}},{key:"readBits",value:function(e){if(!(this.position>this.length)){var t=0,r=0;for(t=(this.bytes[this.position++]&256-(1<<this.bitPos))>>>this.bitPos,r=8-this.bitPos,this.bitPos=0;r<e;)t|=this.bytes[this.position++]<<r,r+=8;if(r>e){var n=r-e;t&=(1<<e)-1,r-=n,this.position--,this.bitPos=8-n}return t}}},{key:"continueUntil",value:function(e){if(!(this.position>this.length))if(this.bitPos=0,"number"!=typeof e){var t=e.length,r=e[t-1];this.position=t;for(var n=function(e,t){var r=new Array;return e.forEach((function(e,n){r[e]=t-n})),r}(e,t),i=!0;this.position<this.length;){for(;this.position<this.length&&this.bytes[this.position++]!==r;);i=!0;for(var o=t-1;o>=0;o--)if(this.bytes[this.position-t+o]!==e[o]){i=!1,this.position+=n[e[o]];break}if(i){this.position-=t;break}}}else for(;++this.position<this.length&&this.bytes[this.position]!==e;);}},{key:"consumeWhile",value:function(e){for(;this.position<this.length&&this.bytes[this.position]===e;)this.position++;this.bitPos=0}},{key:"consumeIf",value:function(e){this.bytes[this.position]===e&&(this.position++,this.bitPos=0)}},{key:"moveForwardsBy",value:function(e){var t=this.position+e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsBy",value:function(e){var t=this.position-e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(e){if(e<=this.bitPos)this.bitPos-=e;else for(this.bitPos>0&&(e-=this.bitPos,this.bitPos=0);e>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(e),e-=8}},{key:"moveTo",value:function(e){if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"hasMore",value:function(){return this.position<this.length}},{key:"carve",value:function(){return this.bitPos>0&&this.position++,this.bytes.slice(0,this.position)}}]),e}()},700:function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},701:function(e,t,r){var n;!function(i){"use strict";var o,a,s,u,c,f,l,h,p,d,m,g,y;function v(e){return null!=e}function b(e){return"number"==typeof e&&e>d&&e<m}function w(e){return"number"==typeof e&&e%1==0}function x(e,t){return b(e)&&e>t}function A(e,t){return b(e)&&e<t}function E(e,t){return b(e)&&e>=t}function B(e,t){return b(e)&&e<=t}function F(e){return"string"==typeof e}function k(e){return F(e)&&""!==e}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e,t){try{return e instanceof t}catch(e){return!1}}function T(e,t){var r;for(r in t)if(t.hasOwnProperty(r)){if(!1===e.hasOwnProperty(r)||typeof e[r]!=typeof t[r])return!1;if(_(e[r])&&!1===T(e[r],t[r]))return!1}return!0}function I(e){return g(e)}function S(e){return v(e)&&E(e.length,0)}function U(e){return"function"==typeof e}function R(e,t){var r={};return Object.keys(t).forEach((function(n){var i=t[n];U(i)?f.assigned(e)?r[n]=!!i.m:r[n]=i(e[n]):_(i)&&(r[n]=R(e[n],i))})),r}function O(e,t){var r;for(r=0;r<e.length;r+=1)if(e[r]===t)return t;return!t}function P(e,t){var r,n;for(r in e)if(e.hasOwnProperty(r)){if(_(n=e[r])&&P(n,t)===t)return t;if(n===t)return t}return!t}function L(e,t){return Object.keys(t).forEach((function(r){e[r]=t[r]})),e}function D(e,t){return function(){return j(e,arguments,t)}}function j(e,t,r){var n=e.l||e.length,i=t[n],o=t[n+1];return N(e.apply(null,t),k(i)?i:r,U(o)?o:TypeError),t[0]}function N(e,t,r){if(e)return e;throw new(r||Error)(t||"Assertion failed")}function M(e){var t=function(){return z(e.apply(null,arguments))};return t.l=e.length,t}function z(e){return!e}function $(e,t,r){var n=function(){var n,i;if(n=arguments[0],"maybe"===e&&f.assigned(n))return!0;if(!t(n))return!1;n=Y(t,n),i=p.call(arguments,1);try{n.forEach((function(t){if(("maybe"!==e||v(t))&&!r.apply(null,[t].concat(i)))throw 0}))}catch(e){return!1}return!0};return n.l=r.length,n}function Y(e,t){switch(e){case S:return p.call(t);case _:return Object.keys(t).map((function(e){return t[e]}));default:return t}}function G(e,t){return q([e,s,t])}function q(e){var t,r,n,i;return t=e.shift(),r=e.pop(),n=e.pop(),i=r||{},Object.keys(n).forEach((function(r){Object.defineProperty(i,r,{configurable:!1,enumerable:!0,writable:!1,value:t.apply(null,e.concat(n[r],a[r]))})})),i}function V(e,t){return q([e,t,null])}function H(e,t){h.forEach((function(r){e[r].of=V(t,s[r].of)}))}o={v:"value",n:"number",s:"string",b:"boolean",o:"object",t:"type",a:"array",al:"array-like",i:"iterable",d:"date",f:"function",l:"length"},a={},s={},[{n:"equal",f:function(e,t){return e===t},s:"v"},{n:"undefined",f:function(e){return void 0===e},s:"v"},{n:"null",f:function(e){return null===e},s:"v"},{n:"assigned",f:v,s:"v"},{n:"primitive",f:function(e){var t;switch(e){case null:case void 0:case!1:case!0:return!0}return"string"===(t=typeof e)||"number"===t||y&&"symbol"===t},s:"v"},{n:"includes",f:function(e,t){var r,n,i,o,a;if(!v(e))return!1;if(y&&e[Symbol.iterator]&&U(e.values)){r=e.values();do{if((n=r.next()).value===t)return!0}while(!n.done);return!1}for(i=Object.keys(e),o=i.length,a=0;a<o;++a)if(e[i[a]]===t)return!0;return!1},s:"v"},{n:"zero",f:function(e){return 0===e}},{n:"infinity",f:function(e){return e===d||e===m}},{n:"number",f:b},{n:"integer",f:w},{n:"even",f:function(e){return"number"==typeof e&&e%2==0}},{n:"odd",f:function(e){return w(e)&&e%2!=0}},{n:"greater",f:x},{n:"less",f:A},{n:"between",f:function(e,t,r){if(t<r)return x(e,t)&&e<r;return A(e,t)&&e>r}},{n:"greaterOrEqual",f:E},{n:"lessOrEqual",f:B},{n:"inRange",f:function(e,t,r){if(t<r)return E(e,t)&&e<=r;return B(e,t)&&e>=r}},{n:"positive",f:function(e){return x(e,0)}},{n:"negative",f:function(e){return A(e,0)}},{n:"string",f:F,s:"s"},{n:"emptyString",f:function(e){return""===e},s:"s"},{n:"nonEmptyString",f:k,s:"s"},{n:"contains",f:function(e,t){return F(e)&&-1!==e.indexOf(t)},s:"s"},{n:"match",f:function(e,t){return F(e)&&!!e.match(t)},s:"s"},{n:"boolean",f:function(e){return!1===e||!0===e},s:"b"},{n:"object",f:_,s:"o"},{n:"emptyObject",f:function(e){return _(e)&&0===Object.keys(e).length},s:"o"},{n:"nonEmptyObject",f:function(e){return _(e)&&Object.keys(e).length>0},s:"o"},{n:"instanceStrict",f:C,s:"t"},{n:"instance",f:function(e,t){try{return C(e,t)||e.constructor.name===t.name||Object.prototype.toString.call(e)==="[object "+t.name+"]"}catch(e){return!1}},s:"t"},{n:"like",f:T,s:"t"},{n:"array",f:I,s:"a"},{n:"emptyArray",f:function(e){return I(e)&&0===e.length},s:"a"},{n:"nonEmptyArray",f:function(e){return I(e)&&x(e.length,0)},s:"a"},{n:"arrayLike",f:S,s:"al"},{n:"iterable",f:function(e){if(!y)return S(e);return v(e)&&U(e[Symbol.iterator])},s:"i"},{n:"date",f:function(e){return C(e,Date)&&w(e.getTime())},s:"d"},{n:"function",f:U,s:"f"},{n:"hasLength",f:function(e,t){return v(e)&&e.length===t},s:"l"}].map((function(e){var t=e.n;a[t]="Invalid "+o[e.s||"n"],s[t]=e.f})),u={apply:function(e,t){if(c.array(e),U(t))return e.map((function(e){return t(e)}));return c.array(t),c.hasLength(e,t.length),e.map((function(e,r){return t[r](e)}))},map:function(e,t){if(c.object(e),U(t))return function(e,t){var r={};return Object.keys(e).forEach((function(n){r[n]=t(e[n])})),r}(e,t);return c.object(t),R(e,t)},all:function(e){if(I(e))return O(e,!1);return c.object(e),P(e,!1)},any:function(e){if(I(e))return O(e,!0);return c.object(e),P(e,!0)}},h=["array","arrayLike","iterable","object"],p=Array.prototype.slice,d=Number.NEGATIVE_INFINITY,m=Number.POSITIVE_INFINITY,g=Array.isArray,y="function"==typeof Symbol,u=L(u,s),c=G(D,N),f=G(M,z),l=G((function(e){var t=function(){return!!f.assigned(arguments[0])||e.apply(null,arguments)};return t.l=e.length,t.m=!0,t}),(function(e){if(!1===v(e))return!0;return e})),c.not=V(D,f),c.maybe=V(D,l),h.forEach((function(e){s[e].of=q([$.bind(null,null),s[e],s,null])})),H(c,D),H(f,M),h.forEach((function(e){l[e].of=q([$.bind(null,"maybe"),s[e],s,null]),c.maybe[e].of=V(D,l[e].of),c.not[e].of=V(D,f[e].of)})),function(i){void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}(L(u,{assert:c,not:f,maybe:l}))}()},702:function(e,t,r){var n,i;void 0===(i="function"==typeof(n=function(){return function(){var e=arguments.length;if(0===e)throw new Error("resolveUrl requires at least one argument; got none.");var t=document.createElement("base");if(t.href=arguments[0],1===e)return t.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(t,r.firstChild);for(var n,i=document.createElement("a"),o=1;o<e;o++)i.href=arguments[o],n=i.href,t.href=n;return r.removeChild(t),n}})?n.call(t,r,t,e):n)||(e.exports=i)},703:function(e,t,r){(function(e){const n=r(701),i=r(702),o=r(695),a=r(1279),{defaultOptions:s}=r(1280),{version:u}=r(1281),c=(e,t)=>{const r=new FileReader;r.onload=()=>{t(r.result)},r.readAsArrayBuffer(e)},f=e=>{if(n.string(e))return/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(e)?Promise.resolve(a(e.split(",")[1])):o.get(i(e),{responseType:"arraybuffer"}).then(e=>e.data);if(n.instance(e,HTMLElement)){if("IMG"===e.tagName)return f(e.src);if("VIDEO"===e.tagName)return f(e.poster);if("CANVAS"===e.tagName)return new Promise(t=>{e.toBlob(e=>{c(e,t)})})}return n.instance(e,File)||n.instance(e,Blob)?new Promise(t=>{c(e,t)}):Promise.reject()};t.defaultOptions={...s,workerPath:void 0!==e&&"development"===e.env.TESS_ENV?i(`/dist/worker.dev.js?nocache=${Math.random().toString(36).slice(3)}`):`https://unpkg.com/tesseract.js@v${u}/dist/worker.min.js`,corePath:`https://unpkg.com/tesseract.js-core@v2.0.0-beta.10/tesseract-core.${"object"==typeof WebAssembly?"wasm":"asm"}.js`},t.spawnWorker=(e,{workerPath:t})=>{let r;if(Blob&&URL){const e=new Blob([`importScripts("${t}");`],{type:"application/javascript"});r=new Worker(URL.createObjectURL(e))}else r=new Worker(t);return r.onmessage=({data:t})=>{if(t.jobId.startsWith("Job"))e.recv(t);else if(t.jobId.startsWith("Download")){const{path:e,data:r,type:n}=t;((e,t)=>{if(navigator.msSaveBlob)navigator.msSaveBlob(t,e);else{const r=document.createElement("a");if(void 0!==r.download){const n=URL.createObjectURL(t);r.setAttribute("href",n),r.setAttribute("download",e),r.style.visibility="hidden",document.body.appendChild(r),r.click(),document.body.removeChild(r)}}})(e,new Blob([r],{type:n}))}},r},t.terminateWorker=e=>{e.worker.terminate()},t.sendPacket=(e,t)=>{const r={...t};f(r.payload.image).then(e=>new Uint8Array(e)).then(t=>{r.payload.image=Array.from(t),e.worker.postMessage(r)})}}).call(this,r(25))},704:function(e,t){e.exports={OEM:{TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3},PSM:{OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",SINGLE_CHAR:"9",SPARSE_TEXT:"10",SPARSE_TEXT_OSD:"11",RAW_LINE:"12"}}},785:function(e,t,r){const n=r(1250),i=r(1278),o=r(704);e.exports={TesseractWorker:i,utils:n,...o}},8:function(e,t,r){"use strict";var n=r(1),i=r.n(n),o=r(4),a=r.n(o),s=r(3),u=r.n(s),c=r(22),f=r.n(c),l=r(5),h=r.n(l);
/**
 * 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 p=function(e){function t(){var e;i()(this,t);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=a()(this,u()(t).call(this,...n))).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(f()(e),t),e}return h()(t,e),t}(function(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}(Error));t.a=p},9:function(e,t,r){"use strict";var n=r(1),i=r.n(n),o=r(2),a=r.n(o),s=r(13),u=r(0),c=r(16),f=function(){function e(t){i()(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,this.min=null,this.max=null,this.step=1,t&&this._parseConfig(t)}return a()(e,[{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,this.min=e.min,this.max=e.max,this.step=e.step}},{key:"config",get:function(){return this._value}},{key:"value",set:function(t){this._value=e.prepare(t,this.type)},get:function(){return this._value}}],[{key:"prepare",value:function(e,t){var r;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return u.b.parseEscapedChars(e);case"byteArray":return"string"==typeof e?(e=e.replace(/\s+/g,""),Object(c.a)(e)):e;case"number":if(null===e)return e;if(r=parseFloat(e),isNaN(r))throw"Invalid ingredient value. Not a number: "+u.b.truncate(e.toString(),10);return r;default:return e}}}]),e}(),l=function(){function e(){i()(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}return a()(e,[{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=s.a.typeEnum(e)},get:function(){return s.a.enumLookup(this._inputType)}},{key:"outputType",set:function(e){this._outputType=s.a.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)},get:function(){return s.a.enumLookup(this._outputType)}},{key:"presentType",set:function(e){this._presentType=s.a.typeEnum(e)},get:function(){return s.a.enumLookup(this._presentType)}},{key:"args",set:function(e){var t=this;e.forEach((function(e){var r=new f(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),"number"==typeof e.min&&(t.min=e.min),"number"==typeof e.max&&(t.max=e.max),e.step&&(t.step=e.step),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}}]),e}();t.a=l}});