UNPKG

exonum-client-cis

Version:

Light Client for Exonum CIS Blockchain

1 lines 637 kB
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Exonum=e()}}(function(){var define,module,exports;return function i(s,a,u){function c(t,e){if(!a[t]){if(!s[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(f)return f(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=a[t]={exports:{}};s[t][0].call(o.exports,function(e){return c(s[t][1][e]||e)},o,o.exports,i,s,a,u)}return a[t].exports}for(var f="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,r){t.exports=function(e){if(Array.isArray(e))return e}},{}],2:[function(e,t,r){t.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},{}],3:[function(e,t,r){t.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},{}],4:[function(e,t,r){function u(e,t,r,n,o,i,s){try{var a=e[i](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,o)}t.exports=function(a){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=a.apply(e,s);function o(e){u(n,t,r,o,i,"next",e)}function i(e){u(n,t,r,o,i,"throw",e)}o(void 0)})}}},{}],5:[function(e,t,r){t.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],6:[function(e,n,t){var i=e("./setPrototypeOf");function o(e,t,r){return!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){return}}}()?n.exports=o=function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&i(o,r.prototype),o}:n.exports=o=Reflect.construct,o.apply(null,arguments)}n.exports=o},{"./setPrototypeOf":19}],7:[function(e,t,r){function n(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)}}t.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},{}],8:[function(e,t,r){t.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},{}],9:[function(e,t,r){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}t.exports=n},{}],10:[function(e,t,r){var n=e("./setPrototypeOf");t.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)}},{"./setPrototypeOf":19}],11:[function(e,t,r){t.exports=function(e){return e&&e.__esModule?e:{default:e}}},{}],12:[function(e,t,r){var s=e("../helpers/typeof");function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}t.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}},{"../helpers/typeof":22}],13:[function(e,t,r){t.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},{}],14:[function(e,t,r){t.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},{}],15:[function(e,t,r){t.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}},{}],16:[function(e,t,r){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},{}],17:[function(e,t,r){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},{}],18:[function(e,t,r){var n=e("../helpers/typeof"),o=e("./assertThisInitialized");t.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},{"../helpers/typeof":22,"./assertThisInitialized":3}],19:[function(e,r,t){function n(e,t){return r.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}r.exports=n},{}],20:[function(e,t,r){var n=e("./arrayWithHoles"),o=e("./iterableToArrayLimit"),i=e("./nonIterableRest");t.exports=function(e,t){return n(e)||o(e,t)||i()}},{"./arrayWithHoles":1,"./iterableToArrayLimit":15,"./nonIterableRest":16}],21:[function(e,t,r){var n=e("./arrayWithoutHoles"),o=e("./iterableToArray"),i=e("./nonIterableSpread");t.exports=function(e){return n(e)||o(e)||i()}},{"./arrayWithoutHoles":2,"./iterableToArray":14,"./nonIterableSpread":17}],22:[function(e,t,r){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(e){return typeof e}:t.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}t.exports=n},{}],23:[function(e,t,r){var n=e("./getPrototypeOf"),o=e("./setPrototypeOf"),i=e("./isNativeFunction"),s=e("./construct");function a(e){var r="function"==typeof Map?new Map:void 0;return t.exports=a=function(e){if(null===e||!i(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return s(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},a(e)}t.exports=a},{"./construct":6,"./getPrototypeOf":9,"./isNativeFunction":13,"./setPrototypeOf":19}],24:[function(e,t,r){t.exports=e("regenerator-runtime")},{"regenerator-runtime":78}],25:[function(e,t,r){"use strict";t.exports=function(e,t){var r=new Array(arguments.length-1),i=0,n=2,s=!0;for(;n<arguments.length;)r[i++]=arguments[n++];return new Promise(function(n,o){r[i]=function(e){if(s)if(s=!1,e)o(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];n.apply(null,t)}};try{e.apply(t||null,r)}catch(e){s&&(s=!1,o(e))}})}},{}],26:[function(e,t,r){"use strict";var n=r;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;1<--t%4&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var c=new Array(64),u=new Array(123),o=0;o<64;)u[c[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,r){for(var n,o=null,i=[],s=0,a=0;t<r;){var u=e[t++];switch(a){case 0:i[s++]=c[u>>2],n=(3&u)<<4,a=1;break;case 1:i[s++]=c[n|u>>4],n=(15&u)<<2,a=2;break;case 2:i[s++]=c[n|u>>6],i[s++]=c[63&u],a=0}8191<s&&((o=o||[]).push(String.fromCharCode.apply(String,i)),s=0)}return a&&(i[s++]=c[n],i[s++]=61,1===a&&(i[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))};var f="invalid encoding";n.decode=function(e,t,r){for(var n,o=r,i=0,s=0;s<e.length;){var a=e.charCodeAt(s++);if(61===a&&1<i)break;if(void 0===(a=u[a]))throw Error(f);switch(i){case 0:n=a,i=1;break;case 1:t[r++]=n<<2|(48&a)>>4,n=a,i=2;break;case 2:t[r++]=(15&n)<<4|(60&a)>>2,n=a,i=3;break;case 3:t[r++]=(3&n)<<6|a,i=0}}if(1===i)throw Error(f);return r-o},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],27:[function(e,t,r){"use strict";function n(){this._listeners={}}(t.exports=n).prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},n.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],28:[function(e,t,r){"use strict";function n(e){function t(e,t,r,n){var o=t<0?1:0;if(o&&(t=-t),0===t)e(0<1/t?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(34028234663852886e22<t)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function r(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,s=8388607&n;return 255==i?s?NaN:1/0*o:0==i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(8388608+s)}function n(e,t,r){a[0]=e,t[r]=u[0],t[r+1]=u[1],t[r+2]=u[2],t[r+3]=u[3]}function o(e,t,r){a[0]=e,t[r]=u[3],t[r+1]=u[2],t[r+2]=u[1],t[r+3]=u[0]}function i(e,t){return u[0]=e[t],u[1]=e[t+1],u[2]=e[t+2],u[3]=e[t+3],a[0]}function s(e,t){return u[3]=e[t],u[2]=e[t+1],u[1]=e[t+2],u[0]=e[t+3],a[0]}var a,u,c,f,l,h;function p(e,t,r,n,o,i){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,o,i+t),e(0<1/n?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(17976931348623157e292<n)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+r);else{var a;if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=n*Math.pow(2,-u))>>>0,o,i+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,o,i+r)}}}function d(e,t,r,n,o){var i=e(n,o+t),s=e(n,o+r),a=2*(s>>31)+1,u=s>>>20&2047,c=4294967296*(1048575&s)+i;return 2047==u?c?NaN:1/0*a:0==u?5e-324*a*c:a*Math.pow(2,u-1075)*(c+4503599627370496)}function y(e,t,r){f[0]=e,t[r]=l[0],t[r+1]=l[1],t[r+2]=l[2],t[r+3]=l[3],t[r+4]=l[4],t[r+5]=l[5],t[r+6]=l[6],t[r+7]=l[7]}function g(e,t,r){f[0]=e,t[r]=l[7],t[r+1]=l[6],t[r+2]=l[5],t[r+3]=l[4],t[r+4]=l[3],t[r+5]=l[2],t[r+6]=l[1],t[r+7]=l[0]}function m(e,t){return l[0]=e[t],l[1]=e[t+1],l[2]=e[t+2],l[3]=e[t+3],l[4]=e[t+4],l[5]=e[t+5],l[6]=e[t+6],l[7]=e[t+7],f[0]}function b(e,t){return l[7]=e[t],l[6]=e[t+1],l[5]=e[t+2],l[4]=e[t+3],l[3]=e[t+4],l[2]=e[t+5],l[1]=e[t+6],l[0]=e[t+7],f[0]}return"undefined"!=typeof Float32Array?(a=new Float32Array([-0]),u=new Uint8Array(a.buffer),c=128===u[3],e.writeFloatLE=c?n:o,e.writeFloatBE=c?o:n,e.readFloatLE=c?i:s,e.readFloatBE=c?s:i):(e.writeFloatLE=t.bind(null,v),e.writeFloatBE=t.bind(null,w),e.readFloatLE=r.bind(null,_),e.readFloatBE=r.bind(null,x)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),l=new Uint8Array(f.buffer),h=128===l[7],e.writeDoubleLE=h?y:g,e.writeDoubleBE=h?g:y,e.readDoubleLE=h?m:b,e.readDoubleBE=h?b:m):(e.writeDoubleLE=p.bind(null,v,0,4),e.writeDoubleBE=p.bind(null,w,4,0),e.readDoubleLE=d.bind(null,_,0,4),e.readDoubleBE=d.bind(null,x,4,0)),e}function v(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function w(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function _(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function x(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=n(n)},{}],29:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],30:[function(e,t,r){"use strict";t.exports=function(r,n,e){var o=e||8192,i=o>>>1,s=null,a=o;return function(e){if(e<1||i<e)return r(e);o<a+e&&(s=r(o),a=0);var t=n.call(s,a,a+=e);return 7&a&&(a=1+(7|a)),t}}},{}],31:[function(e,t,r){"use strict";var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){if(r-t<1)return"";for(var n,o=null,i=[],s=0;t<r;)(n=e[t++])<128?i[s++]=n:191<n&&n<224?i[s++]=(31&n)<<6|63&e[t++]:239<n&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(n>>10),i[s++]=56320+(1023&n)):i[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],8191<s&&((o=o||[]).push(String.fromCharCode.apply(String,i)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))},n.write=function(e,t,r){for(var n,o,i=r,s=0;s<e.length;++s)(n=e.charCodeAt(s))<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&o),++s,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-i}},{}],32:[function(e,t,r){t.exports=e("./lib/axios")},{"./lib/axios":34}],33:[function(l,e,t){"use strict";var h=l("./../utils"),p=l("./../core/settle"),d=l("./../helpers/buildURL"),y=l("../core/buildFullPath"),g=l("./../helpers/parseHeaders"),m=l("./../helpers/isURLSameOrigin"),b=l("../core/createError");e.exports=function(f){return new Promise(function(r,n){var o=f.data,i=f.headers;h.isFormData(o)&&delete i["Content-Type"];var s=new XMLHttpRequest;if(f.auth){var e=f.auth.username||"",t=f.auth.password||"";i.Authorization="Basic "+btoa(e+":"+t)}var a=y(f.baseURL,f.url);if(s.open(f.method.toUpperCase(),d(a,f.params,f.paramsSerializer),!0),s.timeout=f.timeout,s.onreadystatechange=function(){if(s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in s?g(s.getAllResponseHeaders()):null,t={data:f.responseType&&"text"!==f.responseType?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:e,config:f,request:s};p(r,n,t),s=null}},s.onabort=function(){s&&(n(b("Request aborted",f,"ECONNABORTED",s)),s=null)},s.onerror=function(){n(b("Network Error",f,null,s)),s=null},s.ontimeout=function(){var e="timeout of "+f.timeout+"ms exceeded";f.timeoutErrorMessage&&(e=f.timeoutErrorMessage),n(b(e,f,"ECONNABORTED",s)),s=null},h.isStandardBrowserEnv()){var u=l("./../helpers/cookies"),c=(f.withCredentials||m(a))&&f.xsrfCookieName?u.read(f.xsrfCookieName):void 0;c&&(i[f.xsrfHeaderName]=c)}if("setRequestHeader"in s&&h.forEach(i,function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:s.setRequestHeader(t,e)}),h.isUndefined(f.withCredentials)||(s.withCredentials=!!f.withCredentials),f.responseType)try{s.responseType=f.responseType}catch(e){if("json"!==f.responseType)throw e}"function"==typeof f.onDownloadProgress&&s.addEventListener("progress",f.onDownloadProgress),"function"==typeof f.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",f.onUploadProgress),f.cancelToken&&f.cancelToken.promise.then(function(e){s&&(s.abort(),n(e),s=null)}),void 0===o&&(o=null),s.send(o)})}},{"../core/buildFullPath":40,"../core/createError":41,"./../core/settle":45,"./../helpers/buildURL":49,"./../helpers/cookies":51,"./../helpers/isURLSameOrigin":53,"./../helpers/parseHeaders":55,"./../utils":57}],34:[function(e,t,r){"use strict";var n=e("./utils"),o=e("./helpers/bind"),i=e("./core/Axios"),s=e("./core/mergeConfig");function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=a(e("./defaults"));u.Axios=i,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=e("./cancel/Cancel"),u.CancelToken=e("./cancel/CancelToken"),u.isCancel=e("./cancel/isCancel"),u.all=function(e){return Promise.all(e)},u.spread=e("./helpers/spread"),t.exports=u,t.exports.default=u},{"./cancel/Cancel":35,"./cancel/CancelToken":36,"./cancel/isCancel":37,"./core/Axios":38,"./core/mergeConfig":44,"./defaults":47,"./helpers/bind":48,"./helpers/spread":56,"./utils":57}],35:[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,t.exports=n},{}],36:[function(e,t,r){"use strict";var n=e("./Cancel");function o(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))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},{"./Cancel":35}],37:[function(e,t,r){"use strict";t.exports=function(e){return!(!e||!e.__CANCEL__)}},{}],38:[function(e,t,r){"use strict";var o=e("./../utils"),n=e("../helpers/buildURL"),i=e("./InterceptorManager"),s=e("./dispatchRequest"),a=e("./mergeConfig");function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e,t){"string"==typeof e?(e=t||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){r.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){r.push(e.fulfilled,e.rejected)});r.length;)n=n.then(r.shift(),r.shift());return n},u.prototype.getUri=function(e){return e=a(this.defaults,e),n(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(r){u.prototype[r]=function(e,t){return this.request(o.merge(t||{},{method:r,url:e}))}}),o.forEach(["post","put","patch"],function(n){u.prototype[n]=function(e,t,r){return this.request(o.merge(r||{},{method:n,url:e,data:t}))}}),t.exports=u},{"../helpers/buildURL":49,"./../utils":57,"./InterceptorManager":39,"./dispatchRequest":42,"./mergeConfig":44}],39:[function(e,t,r){"use strict";var n=e("./../utils");function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},{"./../utils":57}],40:[function(e,t,r){"use strict";var n=e("../helpers/isAbsoluteURL"),o=e("../helpers/combineURLs");t.exports=function(e,t){return e&&!n(t)?o(e,t):t}},{"../helpers/combineURLs":50,"../helpers/isAbsoluteURL":52}],41:[function(e,t,r){"use strict";var s=e("./enhanceError");t.exports=function(e,t,r,n,o){var i=new Error(e);return s(i,t,r,n,o)}},{"./enhanceError":43}],42:[function(e,t,r){"use strict";var n=e("./../utils"),o=e("./transformData"),i=e("../cancel/isCancel"),s=e("../defaults");function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return a(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(a(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},{"../cancel/isCancel":37,"../defaults":47,"./../utils":57,"./transformData":46}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},{}],44:[function(e,t,r){"use strict";var u=e("../utils");t.exports=function(t,r){r=r||{};var n={},e=["url","method","params","data"],o=["headers","auth","proxy"],i=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];u.forEach(e,function(e){void 0!==r[e]&&(n[e]=r[e])}),u.forEach(o,function(e){u.isObject(r[e])?n[e]=u.deepMerge(t[e],r[e]):void 0!==r[e]?n[e]=r[e]:u.isObject(t[e])?n[e]=u.deepMerge(t[e]):void 0!==t[e]&&(n[e]=t[e])}),u.forEach(i,function(e){void 0!==r[e]?n[e]=r[e]:void 0!==t[e]&&(n[e]=t[e])});var s=e.concat(o).concat(i),a=Object.keys(r).filter(function(e){return-1===s.indexOf(e)});return u.forEach(a,function(e){void 0!==r[e]?n[e]=r[e]:void 0!==t[e]&&(n[e]=t[e])}),n}},{"../utils":57}],45:[function(e,t,r){"use strict";var o=e("./createError");t.exports=function(e,t,r){var n=r.config.validateStatus;!n||n(r.status)?e(r):t(o("Request failed with status code "+r.status,r.config,null,r.request,r))}},{"./createError":41}],46:[function(e,t,r){"use strict";var n=e("./../utils");t.exports=function(t,r,e){return n.forEach(e,function(e){t=e(t,r)}),t}},{"./../utils":57}],47:[function(a,u,e){(function(e){"use strict";var r=a("./utils"),n=a("./helpers/normalizeHeaderName"),t={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var i,s={adapter:("undefined"!=typeof XMLHttpRequest?i=a("./adapters/xhr"):void 0!==e&&"[object process]"===Object.prototype.toString.call(e)&&(i=a("./adapters/http")),i),transformRequest:[function(e,t){return n(t,"Accept"),n(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(o(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 200<=e&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){s.headers[e]={}}),r.forEach(["post","put","patch"],function(e){s.headers[e]=r.merge(t)}),u.exports=s}).call(this,a("_process"))},{"./adapters/http":33,"./adapters/xhr":33,"./helpers/normalizeHeaderName":54,"./utils":57,_process:66}],48:[function(e,t,r){"use strict";t.exports=function(r,n){return function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];return r.apply(n,e)}}},{}],49:[function(e,t,r){"use strict";var s=e("./../utils");function a(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,"]")}t.exports=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(s.isURLSearchParams(t))n=t.toString();else{var o=[];s.forEach(t,function(e,t){null!=e&&(s.isArray(e)?t+="[]":e=[e],s.forEach(e,function(e){s.isDate(e)?e=e.toISOString():s.isObject(e)&&(e=JSON.stringify(e)),o.push(a(t)+"="+a(e))}))}),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}},{"./../utils":57}],50:[function(e,t,r){"use strict";t.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},{}],51:[function(e,t,r){"use strict";var a=e("./../utils");t.exports=a.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var s=[];s.push(e+"="+encodeURIComponent(t)),a.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),a.isString(n)&&s.push("path="+n),a.isString(o)&&s.push("domain="+o),!0===i&&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(){}}},{"./../utils":57}],52:[function(e,t,r){"use strict";t.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},{}],53:[function(e,t,r){"use strict";var n,o,i,s=e("./../utils");function a(e){var t=e;return o&&(i.setAttribute("href",t),t=i.href),i.setAttribute("href",t),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}t.exports=s.isStandardBrowserEnv()?(o=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a"),n=a(window.location.href),function(e){var t=s.isString(e)?a(e):e;return t.protocol===n.protocol&&t.host===n.host}):function(){return!0}},{"./../utils":57}],54:[function(e,t,r){"use strict";var o=e("../utils");t.exports=function(r,n){o.forEach(r,function(e,t){t!==n&&t.toUpperCase()===n.toUpperCase()&&(r[n]=e,delete r[t])})}},{"../utils":57}],55:[function(e,t,r){"use strict";var i=e("./../utils"),s=["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"];t.exports=function(e){var t,r,n,o={};return e&&i.forEach(e.split("\n"),function(e){if(n=e.indexOf(":"),t=i.trim(e.substr(0,n)).toLowerCase(),r=i.trim(e.substr(n+1)),t){if(o[t]&&0<=s.indexOf(t))return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}}),o}},{"./../utils":57}],56:[function(e,t,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},{}],57:[function(e,t,r){"use strict";var o=e("./helpers/bind"),n=Object.prototype.toString;function i(e){return"[object Array]"===n.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===n.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}t.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===n.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},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:a,isUndefined:s,isDate:function(e){return"[object Date]"===n.call(e)},isFile:function(e){return"[object File]"===n.call(e)},isBlob:function(e){return"[object Blob]"===n.call(e)},isFunction:u,isStream:function(e){return a(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function r(){var n={};function e(e,t){"object"==typeof n[t]&&"object"==typeof e?n[t]=r(n[t],e):n[t]=e}for(var t=0,o=arguments.length;t<o;t++)c(arguments[t],e);return n},deepMerge:function r(){var n={};function e(e,t){"object"==typeof n[t]&&"object"==typeof e?n[t]=r(n[t],e):n[t]="object"==typeof e?r({},e):e}for(var t=0,o=arguments.length;t<o;t++)c(arguments[t],e);return n},extend:function(r,e,n){return c(e,function(e,t){r[t]=n&&"function"==typeof e?o(e,n):e}),r},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},{"./helpers/bind":48}],58:[function(e,t,r){"use strict";r.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){for(var t,r=l(e),n=r[0],o=r[1],i=new f(function(e,t){return 3*(e+t)/4-t}(n,o)),s=0,a=0<o?n-4:n,u=0;u<a;u+=4)t=c[e.charCodeAt(u)]<<18|c[e.charCodeAt(u+1)]<<12|c[e.charCodeAt(u+2)]<<6|c[e.charCodeAt(u+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=255&t;2===o&&(t=c[e.charCodeAt(u)]<<2|c[e.charCodeAt(u+1)]>>4,i[s++]=255&t);1===o&&(t=c[e.charCodeAt(u)]<<10|c[e.charCodeAt(u+1)]<<4|c[e.charCodeAt(u+2)]>>2,i[s++]=t>>8&255,i[s++]=255&t);return i},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],i=0,s=r-n;i<s;i+=16383)o.push(u(e,i,s<i+16383?s:i+16383));1==n?(t=e[r-1],o.push(a[t>>2]+a[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"="));return o.join("")};for(var a=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o<i;++o)a[o]=n[o],c[n.charCodeAt(o)]=o;function l(e){var t=e.length;if(0<t%4)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 u(e,t,r){for(var n,o,i=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(a[(o=n)>>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],59:[function(e,t,r){var Y=function(u){"use strict";var m=1e7,l=7,t=9007199254740992,r=w(t),h="0123456789abcdefghijklmnopqrstuvwxyz",p="function"==typeof BigInt;function d(e,t,r,n){return void 0===e?d[0]:void 0!==t&&(10!=+t||r)?q(e,t,r,n):J(e)}function y(e,t){this.value=e,this.sign=t,this.isSmall=!1}function g(e){this.value=e,this.sign=e<0,this.isSmall=!0}function b(e){this.value=e}function v(e){return-t<e&&e<t}function w(e){return e<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}function _(e){x(e);var t=e.length;if(t<4&&j(e,r)<0)switch(t){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*m;default:return e[0]+(e[1]+e[2]*m)*m}return e}function x(e){for(var t=e.length;0===e[--t];);e.length=t+1}function A(e){for(var t=new Array(e),r=-1;++r<e;)t[r]=0;return t}function C(e){return 0<e?Math.floor(e):Math.ceil(e)}function n(e,t){var r,n,o=e.length,i=t.length,s=new Array(o),a=0,u=m;for(n=0;n<i;n++)a=u<=(r=e[n]+t[n]+a)?1:0,s[n]=r-a*u;for(;n<o;)a=(r=e[n]+a)===u?1:0,s[n++]=r-a*u;return 0<a&&s.push(a),s}function S(e,t){return e.length>=t.length?n(e,t):n(t,e)}function o(e,t){var r,n,o=e.length,i=new Array(o),s=m;for(n=0;n<o;n++)r=e[n]-s+t,t=Math.floor(r/s),i[n]=r-t*s,t+=1;for(;0<t;)i[n++]=t%s,t=Math.floor(t/s);return i}function k(e,t){var r,n,o=e.length,i=t.length,s=new Array(o),a=0,u=m;for(r=0;r<i;r++)a=(n=e[r]-a-t[r])<0?(n+=u,1):0,s[r]=n;for(r=i;r<o;r++){if(!((n=e[r]-a)<0)){s[r++]=n;break}n+=u,s[r]=n}for(;r<o;r++)s[r]=e[r];return x(s),s}function c(e,t,r){var n,o,i=e.length,s=new Array(i),a=-t,u=m;for(n=0;n<i;n++)o=e[n]+a,a=Math.floor(o/u),o%=u,s[n]=o<0?o+u:o;return"number"==typeof(s=_(s))?(r&&(s=-s),new g(s)):new y(s,r)}function E(e,t){var r,n,o,i,s=e.length,a=t.length,u=A(s+a),c=m;for(o=0;o<s;++o){i=e[o];for(var f=0;f<a;++f)r=i*t[f]+u[o+f],n=Math.floor(r/c),u[o+f]=r-n*c,u[o+f+1]+=n}return x(u),u}function P(e,t){var r,n,o=e.length,i=new Array(o),s=m,a=0;for(n=0;n<o;n++)r=e[n]*t+a,a=Math.floor(r/s),i[n]=r-a*s;for(;0<a;)i[n++]=a%s,a=Math.floor(a/s);return i}function O(e,t){for(var r=[];0<t--;)r.push(0);return r.concat(e)}function i(e,t,r){return new y(e<m?P(t,e):E(t,w(e)),r)}function s(e){var t,r,n,o,i=e.length,s=A(i+i),a=m;for(n=0;n<i;n++){r=0-(o=e[n])*o;for(var u=n;u<i;u++)t=o*e[u]*2+s[n+u]+r,r=Math.floor(t/a),s[n+u]=t-r*a;s[n+i]=r}return x(s),s}function B(e,t){var r,n,o,i,s=e.length,a=A(s),u=m;for(o=0,r=s-1;0<=r;--r)o=(i=o*u+e[r])-(n=C(i/t))*t,a[r]=0|n;return[a,0|o]}function F(e,t){var r,n=J(t);if(p)return[new b(e.value/n.value),new b(e.value%n.value)];var o,i=e.value,s=n.value;if(0===s)throw new Error("Cannot divide by zero");if(e.isSmall)return n.isSmall?[new g(C(i/s)),new g(i%s)]:[d[0],e];if(n.isSmall){if(1===s)return[e,d[0]];if(-1==s)return[e.negate(),d[0]];var a=Math.abs(s);if(a<m){o=_((r=B(i,a))[0]);var u=r[1];return e.sign&&(u=-u),"number"==typeof o?(e.sign!==n.sign&&(o=-o),[new g(o),new g(u)]):[new y(o,e.sign!==n.sign),new g(u)]}s=w(a)}var c=j(i,s);if(-1===c)return[d[0],e];if(0===c)return[d[e.sign===n.sign?1:-1],d[0]];o=(r=(i.length+s.length<=200?function(e,t){var r,n,o,i,s,a,u,c=e.length,f=t.length,l=m,h=A(t.length),p=t[f-1],d=Math.ceil(l/(2*p)),y=P(e,d),g=P(t,d);for(y.length<=c&&y.push(0),g.push(0),p=g[f-1],n=c-f;0<=n;n--){for(r=l-1,y[n+f]!==p&&(r=Math.floor((y[n+f]*l+y[n+f-1])/p)),i=o=0,a=g.length,s=0;s<a;s++)o+=r*g[s],u=Math.floor(o/l),i+=y[n+s]-(o-u*l),o=u,i=i<0?(y[n+s]=i+l,-1):(y[n+s]=i,0);for(;0!==i;){for(--r,s=o=0;s<a;s++)o=(o+=y[n+s]-l+g[s])<0?(y[n+s]=o+l,0):(y[n+s]=o,1);i+=o}h[n]=r}return y=B(y,d)[0],[_(h),_(y)]}:function(e,t){for(var r,n,o,i,s,a=e.length,u=t.length,c=[],f=[],l=m;a;)if(f.unshift(e[--a]),x(f),j(f,t)<0)c.push(0);else{o=f[(n=f.length)-1]*l+f[n-2],i=t[u-1]*l+t[u-2],u<n&&(o=(o+1)*l),r=Math.ceil(o/i);do{if(j(s=P(t,r),f)<=0)break;r--}while(r);c.push(r),f=k(f,s)}return c.reverse(),[_(c),_(f)]})(i,s))[0];var f=e.sign!==n.sign,l=r[1],h=e.sign;return[o="number"==typeof o?(f&&(o=-o),new g(o)):new y(o,f),l="number"==typeof l?(h&&(l=-l),new g(l)):new y(l,h)]}function j(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var r=e.length-1;0<=r;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function f(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function T(e,t){for(var r,n,o,i=e.prev(),s=i,a=0;s.isEven();)s=s.divide(2),a++;e:for(n=0;n<t.length;n++)if(!e.lesser(t[n])&&!(o=Y(t[n]).modPow(s,e)).isUnit()&&!o.equals(i)){for(r=a-1;0!=r;r--){if((o=o.square().mod(e)).isUnit())return!1;if(o.equals(i))continue e}return!1}return!0}y.prototype=Object.create(d.prototype),g.prototype=Object.create(d.prototype),b.prototype=Object.create(d.prototype),y.prototype.plus=y.prototype.add=function(e){var t=J(e);if(this.sign!==t.sign)return this.subtract(t.negate());var r=this.value,n=t.value;return t.isSmall?new y(o(r,Math.abs(n)),this.sign):new y(S(r,n),this.sign)},g.prototype.plus=g.prototype.add=function(e){var t=J(e),r=this.value;if(r<0!==t.sign)return this.subtract(t.negate());var n=t.value;if(t.isSmall){if(v(r+n))return new g(r+n);n=w(Math.abs(n))}return new y(o(n,Math.abs(r)),r<0)},b.prototype.plus=b.prototype.add=function(e){return new b(this.value+J(e).value)},y.prototype.minus=y.prototype.subtract=function(e){var t=J(e);if(this.sign!==t.sign)return this.add(t.negate());var r,n,o,i,s=this.value,a=t.value;return t.isSmall?c(s,Math.abs(a),this.sign):(r=s,n=a,o=this.sign,0<=j(r,n)?i=k(r,n):(i=k(n,r),o=!o),"number"==typeof(i=_(i))?(o&&(i=-i),new g(i)):new y(i,o))},g.prototype.minus=g.prototype.subtract=function(e){var t=J(e),r=this.value;if(r<0!==t.sign)return this.add(t.negate());var n=t.value;return t.isSmall?new g(r-n):c(n,Math.abs(r),0<=r)},b.prototype.minus=b.prototype.subtract=function(e){return new b(this.value-J(e).value)},y.prototype.negate=function(){return new y(this.value,!this.sign)},g.prototype.negate=function(){var e=this.sign,t=new g(-this.value);return t.sign=!e,t},b.prototype.negate=function(){return new b(-this.value)},y.prototype.abs=function(){return new y(this.value,!1)},g.prototype.abs=function(){return new g(Math.abs(this.value))},b.prototype.abs=function(){return new b(0<=this.value?this.value:-this.value)},y.prototype.times=y.prototype.multiply=function(e){var t,r,n,o=J(e),i=this.value,s=o.value,a=this.sign!==o.sign;if(o.isSmall){if(0===s)return d[0];if(1===s)return this;if(-1===s)return this.negate();if((t=Math.abs(s))<m)return new y(P(i,t),a);s=w(t)}return r=i.length,n=s.length,new y((0<-.012*r-.012*n+15e-6*r*n?function e(t,r){var n=Math.max(t.length,r.length);if(n<=30)return E(t,r);n=Math.ceil(n/2);var o=t.slice(n),i=t.slice(0,n),s=r.slice(n),a=r.slice(0,n),u=e(i,a),c=e(o,s),f=e(S(i,o),S(a,s)),l=S(S(u,O(k(k(f,u),c),n)),O(c,2*n));return x(l),l}:E)(i,s),a)},g.prototype._multiplyBySmall=function(e){return v(e.value*this.value)?new g(e.value*this.value):i(Math.abs(e.value),w(Math.abs(this.value)),this.sign!==e.sign)},y.prototype._multiplyBySmall=function(e){return 0===e.value?d[0]:1===e.value?this:-1===e.value?this.negate():i(Math.abs(e.value),this.value,this.sign!==e.sign)},g.prototype.times=g.prototype.multiply=function(e){return J(e)._multiplyBySmall(this)},b.prototype.times=b.prototype.multiply=function(e){return new b(this.value*J(e).value)},y.prototype.square=function(){return new y(s(this.value),!1)},g.prototype.square=function(){var e=this.value*this.value;return v(e)?new g(e):new y(s(w(Math.abs(this.value))),!1)},b.prototype.square=function(e){return new b(this.value*this.value)},b.prototype.divmod=g.prototype.divmod=y.prototype.divmod=function(e){var t=F(this,e);return{quotient:t[0],remainder:t[1]}},y.prototype.divide=function(e){return F(this,e)[0]},b.prototype.over=b.prototype.divide=function(e){return new b(this.value/J(e).value)},g.prototype.over=g.prototype.divide=y.prototype.over=y.prototype.divide,y.prototype.mod=function(e){return F(this,e)[1]},b.prototype.mod=b.prototype.remainder=function(e){return new b(this.value%J(e).value)},g.prototype.remainder=g.prototype.mod=y.prototype.remainder=y.prototype.mod,y.prototype.pow=function(e){var t,r,n,o=J(e),i=this.value,s=o.value;if(0===s)return d[1];if(0===i)return d[0];if(1===i)return d[1];if(-1===i)return o.isEven()?d[1]:d[-1];if(o.sign)return d[0];if(!o.isSmall)throw new Error("The exponent "+o.toString()+" is too large.");if(this.isSmall&&v(t=Math.pow(i,s)))return new g(C(t));for(r=this,n=d[1];!0&s&&(n=n.times(r),--s),0!==s;)s/=2,r=r.square();return n},g.prototype.pow=y.prototype.pow,b.prototype.pow=function(e){var t=J(e),r=this.value,n=t.value,o=BigInt(0),i=BigInt(1),s=BigInt(2);if(n===o)return d[1];if(r===o)return d[0];if(r===i)return d[1];if(r===BigInt(-1))return t.isEven()?d[1]:d[-1];if(t.isNegative())return new b(o);for(var a=this,u=d[1];(n&i)===i&&(u=u.times(a),--n),n!==o;)n/=s,a=a.square();return u},b.prototype.modPow=g.prototype.modPow=y.prototype.modPow=function(e,t){if(e=J(e),(t=J(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=d[1],n=this.mod(t);for(e.isNegative()&&(e=e.multiply(d[-1]),n=n.modInv(t));e.isPositive();){if(n.isZero())return d[0];e.isOdd()&&(r=r.multiply(n).mod(t)),e=e.divide(2),n=n.square().mod(t)}return r},y.prototype.compareAbs=function(e){var t=J(e),r=this.value,n=t.value;return t.isSmall?1:j(r,n)},g.prototype.compareAbs=function(e){var t=J(e),r=Math.abs(this.value),n=t.value;return t.isSmall?r===(n=Math.abs(n))?0:n<r?1:-1:-1},b.prototype.compareAbs=function(e){var t=this.value,r=J(e).value;return(t=0<=t?t:-t)===(r=0<=r?r:-r)?0:r<t?1:-1},y.prototype.compareTo=y.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=J(e),r=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:j(r,n)*(this.sign?-1:1)},g.prototype.compareTo=g.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=J(e),r=this.value,n=t.value;return t.isSmall?r==n?0:n<r?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},b.prototype.compareTo=b.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,r=J(e).value;return t===r?0:r<t?1:-1},b.prototype.eq=b.prototype.equals=g.prototype.eq=g.prototype.equals=y.prototype.eq=y.prototype.equals=function(e){return 0===this.compare(e)},b.prototype.neq=b.prototype.notEquals=g.prototype.neq=g.prototype.notEquals=y.prototype.neq=y.prototype.notEquals=function(e){return 0!==this.compare(e)},b.prototype.gt=b.prototype.greater=g.prototype.gt=g.prototype.greater=y.prototype.gt=y.prototype.greater=function(e){return 0<this.compare(e)},b.prototype.lt=b.prototype.lesser=g.prototype.lt=g.prototype.lesser=y.prototype.lt=y.prototype.lesser=function(e){return this.compare(e)<0},b.prototype.geq=b.prototype.greaterOrEquals=g.prototype.geq=g.prototype.greaterOrEquals=y.prototype.geq=y.prototype.greaterOrEquals=function(e){return 0<=this.compare(e)},b.prototype.leq=b.prototype.lesserOrEquals=g.prototype.leq=g.prototype.lesserOrEquals=y.prototype.leq=y.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},y.prototype.isEven=function(){return 0==(1&this.value[0])},g.prototype.isEven=function(){return 0==(1&this.value)},b.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},y.prototype.isOdd=function(){return 1==(1&this.value[0])},g.prototype.isOdd=function(){return 1==(1&this.value)},b.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},y.prototype.isPositive=function(){return!this.sign},b.prototype.isPositive=g.prototype.isPositive=function(){return 0<this.value},y.prototype.isNegative=function(){return this.sign},b.prototype.isNegative=g.prototype.isNegative=function(){return this.value<0},y.prototype.isUnit=function(){return!1},g.prototype.isUnit=function(){return 1===Math.abs(this.value)},b.prototype.isUnit=function(){return this.abs().value===BigInt(1)},y.prototype.isZero=function(){return!1},g.prototype.isZero=function(){return 0===this.value},b.prototype.isZero=function(){return this.value===BigInt(0)},b.prototype.isDivisibleBy=g.prototype.isDivisibleBy=y.prototype.isDivisibleBy=function(e){var t=J(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},b.prototype.isPrime=g.prototype.isPrime=y.prototype.isPrime=function(e){var t=f(this);if(t!==u)return t;var r=this.abs(),n=r.bitLength();if(n<=64)return T(r,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var o=Math.log(2)*n.toJSNumber(),i=Math.ceil(!0===e?2*Math.pow(o,2):o),s=[],a=0;a<i;a++)s.push(Y(a+2));return T(r,s)},b.prototype.isProbablePrime=g.prototype.isProbablePrime=y.prototype.isProbablePrime=function(e,t){var r=f(this);if(r!==u)return r;for(var n=this.abs(),o=e===u?5:e,i=[],s=0;s<o;s++)i.push(Y.randBetween(2,n.minus(2),t));return T(n,i)},b.prototype.modInv=g.prototype.modInv=y.prototype.modInv=function(e){for(var t,r,n,o=Y.zero,i=Y.one,s=J(e),a=this.abs();!a.isZero();)t=s.divide(a),r=o,n=s,o=i,s=a,i=r.subtract(t.multiply(i)),a=n.subtract(t.multiply(a));if(!s.isUnit())throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(e)),this.isNegative()?o.negate():o},y.prototype.next=function(){var e=this.value;return this.sign?c(e,1,this.sign):new y(o(e,1),this.sign)},g.prototype.next=function(){var e=this.value;return e+1<t?new g(e+1):new y(r,!1)},b.prototype.next=function(){return new b(this.value+BigInt(1))},y.prototype.prev=function(){var e=this.value;return this.sign?new y(o(e,1),!0):c(e,1,this.sign)},g.prototype.prev=function(){var e=this.value;return-t<e-1?new g(e-1):new y(r,!0)},b.prototype.prev=function(){return new b(this.value-BigInt(1))};for(var a=[1];2*a[a.length-1]<=m;)a.push(2*a[a.length-1]);var D=a.length,K=a[D-1];function I(e){return Math.abs(e)<=m}function R(e,t,r){t=J(t);for(var n=e.isNegative(),o=t.isNegative(),i=n?e.not():e,s=o?t.not():t,a=0,u=0,c=null,f=null,l=[];!i.isZero()||!s.isZero();)a=(c=F(i,K))[1].toJSNumber(),n&&(a=K-1-a),u=(f=F(s,K))[1].toJSNumber(),o&&(u=K-1-u),i=c[0],s=f[0],l.push(r(a,u));for(var h=0!==r(n?1:0,o?1:0)?Y(-1):Y(0),p=l.length-1;0<=p;--p)h=h.multiply(K).add(Y(l[p]));return h}b.prototype.shiftLeft=g.prototype.shiftLeft=y.prototype.shiftLeft=function(e){var t=J(e).toJSNumber();if(!I(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;D<=t;)r=r.multiply(K),t-=D-1;return r.multiply(a[t])},b.prototype.shiftRight=g.prototype.shiftRight=y.prototype.shiftRight=function(e){var t,r=J(e).toJSNumber();if(!I(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;D<=r;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=F(n,K))[1].isNegative()?t[0].prev():t[0],r-=D-1}return(t=F(n,a[r]))[1].isNegative()?t[0].prev():t[0]},b.prototype.not=g.prototype.not=y.prototype.not=function(){return this.negate().prev()},b.prototype.and=g.prototype.and=y.prototype.and=function(e){return R(this,e,function(e,t){return e&t})},b.prototype.or=g.prototype.or=y.prototype.or=function(e){return R(this,e,function(e,t){return e|t})},b.prototype.xor=g.prototype.xor=y.prototype.xor=function(e){return R(this,e,function(e,t){return e^t})};var L=1<<30,N=(m&-m)*(m&-m)|L;function U(e){var t=e.value,r="number"==typeof t?t|L:"bigint"==typeof t?t|BigInt(L):t[0]+t[1]*m|N;return r&-r}function G(e,t){return e=J(e),t=J(t),e.greater(t)?e:t}function M(e,t){return e=J(e),t=J(t),e.lesser(t)?e:t}function H(e,t){if(e=J(e).abs(),t=J(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,n,o=d[1];e.isEven()&&t.isEven();)r=M(U(e),U(t)),e=e.divide(r),t=t.divide(r),o=o.multiply(r);for(;e.isEven();)e=e.divide(U(e));do{for(;t.isEven();)t=t.divide(U(t));e.greater(t)&&(n=t,t=e,e=n),t=t.subtract(e)}while(!t.isZero());return o.isUnit()?e:e.multiply(o)}b.prototype.bitLength=g.prototype.bitLength=y.prototype.bitLength=function(){var e=this;return e.compareTo(Y(0))<0&&(e=e.negate().subtract(Y(1))),0===e.compareTo(Y(0))?Y(0):Y(function e(t,r){if(r.compareTo(t)<=0){var n=e(t,r.square(r)),o=n.p,i=n.e,s=o.multiply(r);return s.compareTo(t)<=0?{p:s,e:2*i+1}:{p:o,e:2*i}}return{p:Y(1),e:0}}(e,Y(2)).e).add(Y(1))};var q=function(e,t,r,n){r=r||h,e=String(e),n||(e=e.toLowerCase(),r=r.toLowerCase());var o,i=e.length,s=Math.abs(t),a={};for(o=0;o<r.length;o++)a[r[o]]=o;for(o=0;o<i;o++){if("-"!==(f=e[o])&&(f in a&&a[f]>=s)){if("1"===f&&1===s)continue;throw new Error(f+" is not a valid digit in base "+t+".")}}t=J(t);var u=[],c="-"===e[0];for(o=c?1:0;o<e.length;o++){var f;if((f=e[o])in a)u.push(J(a[f]));else{if("<"!==f)throw new Error(f+" is not a valid character");for(var l=o;">"!==e[++o]&&o<e.length;);u.push(J(e.slice(l+1,o)))}}return z(u,t,c)};function z(e,t,r){var n,o=d[0],i=d[1];for(n=e.length-1;0<=n;n--)o=o.add(e[n].times(i)),i=i.times(t);return r?o.negate():o}function W(e,t){if((t=Y(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var o,i=[],s=e;s.isNegative()||0<=s.compareAbs(t);){s=(o=s.divmod(t)).quotient;var a=o.remainder;a.isNegative()&&(a=t.minus(a).abs(),s=s.next()),i.push(a.toJSNumber())}return i.push(s.toJSNumber()),{value:i.reverse(),isNegative:n}}function V(e,t,n){var r=W(e,t);return(r.isNegative?"-":"")+r.value.map(function(e){return(t=e)<(r=(r=n)||h).length?r[t]:"<"+t+">";var t,r}).join("")}function X(e){if(v(+e)){var t=+e;if(t===C(t))return p?new b(BigInt(t)):new g(t);throw new Error("Invalid integer: "+e)}var r="-"===e[0];r&&(e=e.slice(1));var n=e.split(/e/i);if(2<n.length)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var o=n[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==C(o)||!v(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var i=n[0],s=i.indexOf(".");if(0<=s&&(o-=i.length-s-1,i=i.slice(0,s)+i.slice(s+1)),o<0)throw new Error("Cannot include negative exponent part for integers");e=i+=new Array(o+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(p)return new b(BigInt(r?"-"+e:e));for(var a=[],u=e.length,c=l,f=u-c;0<u;)a.push(+e.slice(f,u)),(f-=c)<0&&(f=0),u-=c;return x(a),new y(a,r)}function J(e){return"number"==typeof e?function(e){if(p)return new b(BigInt(e));if(v(e)){if(e!==C(e))throw new Error(e+" is not an integer.");return new g(e)}return X(e.toString())}(e):"string"==typeof e?X(e):"bigint"==typeof e?new b(e):e}y.prototype.toArray=function(e){return W(this,e)},g.prototype.toArray=function(e){return W(this,e)},b.prototype.toArray=function(e){return W(this,e)},y.prototype.toString=function(e,t){if(e===u&&(e=10),10!==e)return V(this,e,t);for(var r,n=this.value,o=n.length,i=String(n[--o]);0<=--o;)r=String(n[o]),i+="0000000".slice(r.length)+r;return(this.sign?"-":"")+i},b.prototype.toString=g.prototype.toString=function(e,t){return e===u&&(e=10),10!=e?V(this,e,t):String(this.value)},b.prototype.toJSON=y.prototype.toJSON=g.prototype.toJSON=function(){return this.toString()},y.prototype.toJSNumber=y.prototype.valueOf=function(){return parseInt(this.toString(),10)},g.prototype.toJSNumber=g.prototype.valueOf=function(){return this.value},b.prototype.valueOf=b.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var e=0;e<1e3;e++)d[e]=J(e),0<e&&(d[-e]=J(-e));return d.one=d[1],d.zero=d[0],d.minusOne=d[-1],d.max=G,d.min=M,d.gcd=H,d.lcm=function(e,t){return e=J(e).abs(),t=J(t).abs(),e.divide(H(e,t)).multiply(t)},d.isInstance=function(e){return e instanceof y||e instanceof g||e instanceof b},d.randBetween=function(e,t,r){e=J(e),t=J(t);var n=r||Math.random,o=M(e,t),i=G(e,t).subtract(o).add(1);if(i.isSmall)return o.add(Math.floor(n()*i));for(var s=W(i,m).value,a=[],u=!0,c=0;c<s.length;c++){var f=u?s[c]:m,l=C(n()*f);a.push(l),l<f&&(u=!1)}return o.add(d.fromArray(a,m,!1))},d.fromArray=function(e,t,r){return z(e.map(J),J(t||10),r)},d}();void 0!==t&&t.hasOwnProperty("exports")&&(t.exports=Y),"function"==typeof define&&define.amd&&define(function(){return Y})},{}],60:[function(e,t,r){t.exports=function(e,t,r,n,o){var i,s;if(void 0===n)n=0;else if((n|=0)<0||n>=e.length)throw new RangeError("invalid lower bound");if(void 0===o)o=e.length-1;else if((o|=0)<n||o>=e.length)throw new RangeError("invalid upper bound");for(;n<=o;)if((s=+r(e[i=n+(o-n>>>1)],t,i,e))<0)n=i+1;else{if(!(0<s))return i;o=i-1}return~n}},{}],61:[function(e,t,r){},{}],62:[function(e,t,r){"use strict";var n=e("base64-js"),i=e("ieee754");r.Buffer=l,r.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(o<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=l.prototype,t}function l(e,t,r){if("number"!=typeof e)return a(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}function a(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=s(r),o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(R(e,ArrayBuffer)||e&&R(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=l.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);var o=function(e){if(l.isBuffer(e)){var t=0|h(e.length),r=s(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(void 0!==e.length)return"number"!=typeof e.length||L(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),s(e<0?0:0|h(e))}function f(e){for(var t=e.length<0?0:0|h(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e){if(o<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||R(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(o)return n?-1:D(e).length;t=(""+t).toLowerCase(),o=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),L(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var i,s=1,a=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/=s=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var f=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===u)return f*s}else-1!==f&&(i-=i-f),f=-1}else for(a<r+u&&(r=a-u),i=r;0<=i;i--){for(var l=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){l=!1;break}if(l)return i}return-1}function m(e,t,r,n){r=Number(r)||0;var o=e.length-r;(!n||o<(n=Number(n)))&&(n=o);var i=t.length;i/2<n&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(L(a))return s;e[r+s]=a}return s}function b(e,t,r,n){return I(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return I(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function w(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,u,c=e[o],f=null,l=239<c?4:223<c?3:191<c?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=e[o+1]))&&127<(u=(31&c)<<6|63&i)&&(f=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&2047<(u=(15&c)<<12|(63&i)<<6|63&s)&&(u<55296||57343<u)&&(f=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&65535<(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)&&u<1114112&&(f=u)}null===f?(f=65533,l=1):65535<f&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}r.kMaxLength=o,(l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),l.poolSize=8192,l.from=function(e,t,r){return a(e,t,r)},l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,l.alloc=function(e,t,r){return o=t,i=r,u(n=e),n<=0||void 0===o?s(n):"string"==typeof i?s(n).fill(o,i):s(n).fill(o);var n,o,i},l.allocUnsafe=function(e){return c(e)},l.allocUnsafeSlow=function(e){return c(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(R(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),R(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},l.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}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(r=t=0;r<e.length;++r)t+=e[r].length;var n=l.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(R(i,Uint8Array)&&(i=l.from(i)),!l.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},l.byteLength=p,l.prototype._isBuffer=!0,l.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)d(this,t,t+1);return this},l.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)d(this,t,t+3),d(this,t+1,t+2);return this},l.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)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},l.prototype.toLocaleString=l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?_(this,0,e):function(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 S(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return w(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},l.prototype.compare=function(e,t,r,n,o){if(R(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=t)return 0;if(o<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(n,o),c=e.slice(t,r),f=0;f<a;++f)if(u[f]!==c[f]){i=u[f],s=c[f];break}return i<s?-1:s<i?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},l.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 o=this.length-t;if((void 0===r||o<r)&&(r=o),0<e.length&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var i,s,a,u,c,f,l=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return c=t,f=r,I(D(e,(u=this).length-c),u,c,f);case"ascii":return b(this,e,t,r);case"latin1":case"binary":return b(this,e,t,r);case"base64":return i=this,s=t,a=r,I(K(e),i,s,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,e,t,r);default:if(l)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),l=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function A(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function C(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function S(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||n<r)&&(r=n);for(var o="",i=t;i<r;++i)o+=T(e[i]);return o}function k(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function E(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<i)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){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return t=+t,r>>>=0,o||O(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||O(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=l.prototype,n},l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e+--t],o=1;0<t&&(o*=256);)n+=this[e+--t]*o;return n},l.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return(o*=128)<=n&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=t,o=1,i=this[e+--n];0<n&&(o*=256);)i+=this[e+--n]*o;return(o*=128)<=i&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;0<=--i&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),t=t||0,0<n&&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("Index out of range");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 o=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=o-1;0<=i;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},l.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}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 i;if(t>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(i=t;i<r;++i)this[i]=e;else{var s=l.isBuffer(e)?e:l.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var j=/[^+/0-9A-Za-z-_]/g;function T(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if(55295<(r=e.charCodeAt(s))&&r<57344){if(!o){if(56319<r){-1<(t-=3)&&i.push(239,191,189);continue}if(s+1===n){-1<(t-=3)&&i.push(239,191,189);continue}o=r;continue}if(r<56320){-1<(t-=3)&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&-1<(t-=3)&&i.push(239,191,189);if(o=null,r<128){if(--t<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function R(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function L(e){return e!=e}},{"base64-js":58,ieee754:63}],63:[function(e,t,r){r.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=e[t+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=a;0<f;i=256*i+e[t+l],l+=h,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=n;0<f;s=256*s+e[t+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var s,a,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),2<=(t+=1<=s+l?h/u:h*Math.pow(2,1-l))*u&&(s++,u/=2),f<=s+l?(a=0,s=f):1<=s+l?(a=(t*u-1)*Math.pow(2,o),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),s=0));8<=o;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,c+=o;0<c;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*y}},{}],64:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],65:[function(e,t,r){t.exports=n;var p=null;try{p=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function d(e){return!0===(e&&e.__isLong__)}Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=d;var i={},s={};function o(e,t){var r,n,o;return t?(o=0<=(e>>>=0)&&e<256)&&(n=s[e])?n:(r=g(e,(0|e)<0?-1:0,!0),o&&(s[e]=r),r):(o=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=g(e,e<0?-1:0,!1),o&&(i[e]=r),r)}function y(e,t){if(isNaN(e))return t?h:v;if(t){if(e<0)return h;if(u<=e)return C}else{if(e<=-c)return S;if(c<=e+1)return A}return e<0?y(-e,t).neg():g(e%a|0,e/a|0,t)}function g(e,t,r){return new n(e,t,r)}n.fromInt=o,n.fromNumber=y,n.fromBits=g;var f=Math.pow;function l(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return v;if(t="number"==typeof t?(r=t,!1):!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if(0<(n=e.indexOf("-")))throw Error("interior hyphen");if(0===n)return l(e.substring(1),t,r).neg();for(var o=y(f(r,8)),i=v,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),u=parseInt(e.substring(s,s+a),r);if(a<8){var c=y(f(r,a));i=i.mul(c).add(y(u))}else i=(i=i.mul(o)).add(y(u))}return i.unsigned=t,i}function m(e,t){return"number"==typeof e?y(e,t):"string"==typeof e?l(e,t):g(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}n.fromString=l,n.fromValue=m;var a=4294967296,u=a*a,c=u/2,b=o(1<<24),v=o(0);n.ZERO=v;var h=o(0,!0);n.UZERO=h;var w=o(1);n.ONE=w;var _=o(1,!0);n.UONE=_;var x=o(-1);n.NEG_ONE=x;var A=g(-1,2147483647,!1);n.MAX_VALUE=A;var C=g(-1,-1,!0);n.MAX_UNSIGNED_VALUE=C;var S=g(0,-2147483648,!1);n.MIN_VALUE=S;var k=n.prototype;k.toInt=function(){return this.unsigned?this.low>>>0:this.low},k.toNumber=function(){return this.unsigned?(this.high>>>0)*a+(this.low>>>0):this.high*a+(this.low>>>0)},k.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(S)){var t=y(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=y(f(e,6),this.unsigned),i=this,s="";;){var a=i.div(o),u=(i.sub(a.mul(o)).toInt()>>>0).toString(e);if((i=a).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},k.getHighBits=function(){return this.high},k.getHighBitsUnsigned=function(){return this.high>>>0},k.getLowBits=function(){return this.low},k.getLowBitsUnsigned=function(){return this.low>>>0},k.getNumBitsAbs=function(){if(this.isNegative())return this.eq(S)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;0<t&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},k.isZero=function(){return 0===this.high&&0===this.low},k.eqz=k.isZero,k.isNegative=function(){return!this.unsigned&&this.high<0},k.isPositive=function(){return this.unsigned||0<=this.high},k.isOdd=function(){return 1==(1&this.low)},k.isEven=function(){return 0==(1&this.low)},k.equals=function(e){return d(e)||(e=m(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},k.eq=k.equals,k.notEquals=function(e){return!this.eq(e)},k.neq=k.notEquals,k.ne=k.notEquals,k.lessThan=function(e){return this.comp(e)<0},k.lt=k.lessThan,k.lessThanOrEqual=function(e){return this.comp(e)<=0},k.lte=k.lessThanOrEqual,k.le=k.lessThanOrEqual,k.greaterThan=function(e){return 0<this.comp(e)},k.gt=k.greaterThan,k.greaterThanOrEqual=function(e){return 0<=this.comp(e)},k.gte=k.greaterThanOrEqual,k.ge=k.greaterThanOrEqual,k.compare=function(e){if(d(e)||(e=m(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},k.comp=k.compare,k.negate=function(){return!this.unsigned&&this.eq(S)?S:this.not().add(w)},k.neg=k.negate,k.add=function(e){d(e)||(e=m(e));var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,s=65535&e.high,a=e.low>>>16,u=0,c=0,f=0,l=0;return f+=(l+=o+(65535&e.low))>>>16,c+=(f+=n+a)>>>16,u+=(c+=r+s)>>>16,u+=t+i,g((f&=65535)<<16|(l&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},k.subtract=function(e){return d(e)||(e=m(e)),this.add(e.neg())},k.sub=k.subtract,k.multiply=function(e){if(this.isZero())return v;if(d(e)||(e=m(e)),p)return g(p.mul(this.low,this.high,e.low,e.high),p.get_high(),this.unsigned);if(e.isZero())return v;if(this.eq(S))return e.isOdd()?S:v;if(e.eq(S))return this.isOdd()?S:v;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(b)&&e.lt(b))return y(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,s=65535&e.high,a=e.low>>>16,u=65535&e.low,c=0,f=0,l=0,h=0;return l+=(h+=o*u)>>>16,f+=(l+=n*u)>>>16,l&=65535,f+=(l+=o*a)>>>16,c+=(f+=r*u)>>>16,f&=65535,c+=(f+=n*a)>>>16,f&=65535,c+=(f+=o*s)>>>16,c+=t*u+r*a+n*s+o*i,g((l&=65535)<<16|(h&=65535),(c&=65535)<<16|(f&=65535),this.unsigned)},k.mul=k.multiply,k.divide=function(e){if(d(e)||(e=m(e)),e.isZero())throw Error("division by zero");var t,r,n;if(p)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?g((this.unsigned?p.div_u:p.div_s)(this.low,this.high,e.low,e.high),p.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?h:v;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return h;if(e.gt(this.shru(1)))return _;n=h}else{if(this.eq(S))return e.eq(w)||e.eq(x)?S:e.eq(S)?w:(t=this.shr(1).div(e).shl(1)).eq(v)?e.isNegative()?w:x:(r=this.sub(e.mul(t)),n=t.add(r.div(e)));else if(e.eq(S))return this.unsigned?h:v;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=v}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),i=o<=48?1:f(2,o-48),s=y(t),a=s.mul(e);a.isNegative()||a.gt(r);)a=(s=y(t-=i,this.unsigned)).mul(e);s.isZero()&&(s=w),n=n.add(s),r=r.sub(a)}return n},k.div=k.divide,k.modulo=function(e){return d(e)||(e=m(e)),p?g((this.unsigned?p.rem_u:p.rem_s)(this.low,this.high,e.low,e.high),p.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},k.mod=k.modulo,k.rem=k.modulo,k.not=function(){return g(~this.low,~this.high,this.unsigned)},k.and=function(e){return d(e)||(e=m(e)),g(this.low&e.low,this.high&e.high,this.unsigned)},k.or=function(e){return d(e)||(e=m(e)),g(this.low|e.low,this.high|e.high,this.unsigned)},k.xor=function(e){return d(e)||(e=m(e)),g(this.low^e.low,this.high^e.high,this.unsigned)},k.shiftLeft=function(e){return d(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?g(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):g(0,this.low<<e-32,this.unsigned)},k.shl=k.shiftLeft,k.shiftRight=function(e){return d(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?g(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):g(this.high>>e-32,0<=this.high?0:-1,this.unsigned)},k.shr=k.shiftRight,k.shiftRightUnsigned=function(e){if(d(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?g(this.low>>>e|t<<32-e,t>>>e,this.unsigned):g(32===e?t:t>>>e-32,0,this.unsigned)},k.shru=k.shiftRightUnsigned,k.shr_u=k.shiftRightUnsigned,k.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},k.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},k.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},k.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},k.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},{}],66:[function(e,t,r){var n,o,i=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var c,f=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?f=c.concat(f):h=-1,f.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=f.length;t;){for(c=f,f=[];++h<t;)c&&c[h].run();h=-1,t=f.length}c=null,l=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];f.push(new y(e,t)),1!==f.length||l||u(d)},y.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=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,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}},{}],67:[function(e,t,r){"use strict";t.exports=e("./src/index-minimal")},{"./src/index-minimal":68}],68:[function(e,t,r){"use strict";var n=r;function o(){n.Reader._configure(n.BufferReader),n.util._configure()}n.build="minimal",n.Writer=e("./writer"),n.BufferWriter=e("./writer_buffer"),n.Reader=e("./reader"),n.BufferReader=e("./reader_buffer"),n.util=e("./util/minimal"),n.rpc=e("./rpc"),n.roots=e("./roots"),n.configure=o,n.Writer._configure(n.BufferWriter),o()},{"./reader":69,"./reader_buffer":70,"./roots":71,"./rpc":72,"./util/minimal":75,"./writer":76,"./writer_buffer":77}],69:[function(e,t,r){"use strict";t.exports=u;var n,o=e("./util/minimal"),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c,f="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")};function l(){var e=new i(0,0),t=0;if(!(4<this.len-this.pos)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,4<this.len-this.pos){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}u.create=o.Buffer?function(e){return(u.create=function(e){return o.Buffer.isBuffer(e)?new n(e):f(e)})(e)}:f,u.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,u.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return c}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},u.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},u.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){n=e;var t=o.Long?"toLong":"toNumber";o.merge(u.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},{"./util/minimal":75}],70:[function(e,t,r){"use strict";t.exports=i;var n=e("./reader");(i.prototype=Object.create(n.prototype)).constructor=i;var o=e("./util/minimal");function i(e){n.call(this,e)}o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice),i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{"./reader":69,"./util/minimal":75}],71:[function(e,t,r){"use strict";t.exports={}},{}],72:[function(e,t,r){"use strict";r.Service=e("./rpc/service")},{"./rpc/service":73}],73:[function(e,t,r){"use strict";t.exports=n;var a=e("../util/minimal");function n(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");a.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}((n.prototype=Object.create(a.EventEmitter.prototype)).constructor=n).prototype.rpcCall=function e(r,t,n,o,i){if(!o)throw TypeError("request must be specified");var s=this;if(!i)return a.asPromise(e,s,r,t,n,o);if(s.rpcImpl)try{return s.rpcImpl(r,t[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return s.emit("error",e,r),i(e);if(null!==t){if(!(t instanceof n))try{t=n[s.responseDelimited?"decodeDelimited":"decode"](t)}catch(e){return s.emit("error",e,r),i(e)}return s.emit("data",t,r),i(null,t)}s.end(!0)})}catch(e){return s.emit("error",e,r),void setTimeout(function(){i(e)},0)}else setTimeout(function(){i(Error("already ended"))},0)},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{"../util/minimal":75}],74:[function(e,t,r){"use strict";t.exports=o;var n=e("../util/minimal");function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,4294967295<++r&&(r=0,4294967295<++n&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0==r?0==t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{"../util/minimal":75}],75:[function(r,e,i){(function(e){"use strict";var n=i;function o(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)void 0!==e[n[o]]&&r||(e[n[o]]=t[n[o]]);return e}function t(e){function r(e,t){if(!(this instanceof r))return new r(e,t);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),t&&o(this,t)}return(r.prototype=Object.create(Error.prototype)).constructor=r,Object.defineProperty(r.prototype,"name",{get:function(){return e}}),r.prototype.toString=function(){return this.name+": "+this.message},r}n.asPromise=r("@protobufjs/aspromise"),n.base64=r("@protobufjs/base64"),n.EventEmitter=r("@protobufjs/eventemitter"),n.float=r("@protobufjs/float"),n.inquire=r("@protobufjs/inquire"),n.utf8=r("@protobufjs/utf8"),n.pool=r("@protobufjs/pool"),n.LongBits=r("./longbits"),n.global="undefined"!=typeof window&&window||void 0!==e&&e||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isNode=Boolean(n.global.process&&n.global.process.versions&&n.global.process.versions.node),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||0<(Array.isArray(r)?r.length:Object.keys(r).length))},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=t,n.ProtocolError=t("ProtocolError"),n.oneOfGetter=function(e){for(var r={},t=0;t<e.length;++t)r[e[t]]=1;return function(){for(var e=Object.keys(this),t=e.length-1;-1<t;--t)if(1===r[e[t]]&&void 0!==this[e[t]]&&null!==this[e[t]])return e[t]}},n.oneOfSetter=function(r){return function(e){for(var t=0;t<r.length;++t)r[t]!==e&&delete this[r[t]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var r=n.Buffer;r?(n._Buffer_from=r.from!==Uint8Array.from&&r.from||function(e,t){return new r(e,t)},n._Buffer_allocUnsafe=r.allocUnsafe||function(e){return new r(e)}):n._Buffer_from=n._Buffer_allocUnsafe=null}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./longbits":74,"@protobufjs/aspromise":25,"@protobufjs/base64":26,"@protobufjs/eventemitter":27,"@protobufjs/float":28,"@protobufjs/inquire":29,"@protobufjs/pool":30,"@protobufjs/utf8":31}],76:[function(e,t,r){"use strict";t.exports=l;var n,o=e("./util/minimal"),i=o.LongBits,s=o.base64,a=o.utf8;function u(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function f(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}function h(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function d(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;127<e.lo;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}l.create=o.Buffer?function(){return(l.create=function(){return new n})()}:function(){return new l},l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,r){return this.tail=this.tail.next=new u(e,t,r),this.len+=t,this},(p.prototype=Object.create(u.prototype)).fn=function(e,t,r){for(;127<e;)t[r++]=127&e|128,e>>>=7;t[r]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(d,10,i.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.int64=l.prototype.uint64=function(e){var t=i.from(e);return this._push(d,t.length(),t)},l.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(d,t.length(),t)},l.prototype.bool=function(e){return this._push(h,1,e?1:0)},l.prototype.sfixed32=l.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},l.prototype.sfixed64=l.prototype.fixed64=function(e){var t=i.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(o.isString(e)){var r=l.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new f(this),this.head=this.tail=new u(c,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(c,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},l._configure=function(e){n=e}},{"./util/minimal":75}],77:[function(e,t,r){"use strict";t.exports=s;var n=e("./writer");(s.prototype=Object.create(n.prototype)).constructor=s;var o=e("./util/minimal"),i=o.Buffer;function s(){n.call(this)}s.alloc=function(e){return(s.alloc=o._Buffer_allocUnsafe)(e)};var a=i&&i.prototype instanceof Uint8Array&&"set"===i.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};function u(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}s.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(a,t,e),this},s.prototype.string=function(e){var t=i.byteLength(e);return this.uint32(t),t&&this._push(u,t,e),this}},{"./util/minimal":75,"./writer":76}],78:[function(e,t,r){var n=function(i){"use strict";var u,e=Object.prototype,c=e.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},o=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",n=t.toStringTag||"@@toStringTag";function s(e,t,r,n){var i,s,a,u,o=t&&t.prototype instanceof m?t:m,c=Object.create(o.prototype),f=new E(n||[]);return c._invoke=(i=e,s=r,a=f,u=h,function(e,t){if(u===d)throw new Error("Generator is already running");if(u===y){if("throw"===e)throw t;return O()}for(a.method=e,a.arg=t;;){var r=a.delegate;if(r){var n=C(r,a);if(n){if(n===g)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(u===h)throw u=y,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);u=d;var o=l(i,s,a);if("normal"===o.type){if(u=a.done?y:p,o.arg===g)continue;return{value:o.arg,done:a.done}}"throw"===o.type&&(u=y,a.method="throw",a.arg=o.arg)}}),c}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}i.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function a(){}function f(){}var b={};b[o]=function(){return this};var v=Object.getPrototypeOf,w=v&&v(v(P([])));w&&w!==e&&c.call(w,o)&&(b=w);var _=f.prototype=m.prototype=Object.create(b);function x(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function A(u){var t;this._invoke=function(r,n){function e(){return new Promise(function(e,t){!function t(e,r,n,o){var i=l(u[e],u,r);if("throw"!==i.type){var s=i.arg,a=s.value;return a&&"object"==typeof a&&c.call(a,"__await")?Promise.resolve(a.__await).then(function(e){t("next",e,n,o)},function(e){t("throw",e,n,o)}):Promise.resolve(a).then(function(e){s.value=e,n(s)},function(e){return t("throw",e,n,o)})}o(i.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}}function C(e,t){var r=e.iterator[t.method];if(r===u){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=u,C(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,g;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=u),t.delegate=null,g):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function S(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(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(c.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=u,e.done=!0,e};return n.next=n}}return{next:O}}function O(){return{value:u,done:!0}}return a.prototype=_.constructor=f,f.constructor=a,f[n]=a.displayName="GeneratorFunction",i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,n in e||(e[n]="GeneratorFunction")),e.prototype=Object.create(_),e},i.awrap=function(e){return{__await:e}},x(A.prototype),A.prototype[r]=function(){return this},i.AsyncIterator=A,i.async=function(e,t,r,n){var o=new A(s(e,t,r,n));return i.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},x(_),_[n]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},i.keys=function(r){var n=[];for(var e in r)n.push(e);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},i.values=P,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&c.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=u)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function e(e,t){return i.type="throw",i.arg=r,n.next=e,t&&(n.method="next",n.arg=u),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var o=this.tryEntries[t],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var s=c.call(o,"catchLoc"),a=c.call(o,"finallyLoc");if(s&&a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},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),g},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=u),g}},i}("object"==typeof t?t.exports:{});try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},{}],79:[function(e,t,r){var n=e("buffer"),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:62}],80:[function(e,t,r){var f=e("safe-buffer").Buffer;function n(e,t){this._block=f.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=f.from(e,t));for(var r=this._block,n=this._blockSize,o=e.length,i=this._len,s=0;s<o;){for(var a=i%n,u=Math.min(o-s,n-a),c=0;c<u;c++)r[a+c]=e[s+c];s+=u,(i+=u)%n==0&&this._update(r)}return this._len+=o,this},n.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,1+t),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},{"safe-buffer":79}],81:[function(e,t,r){(r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":82,"./sha1":83,"./sha224":84,"./sha256":85,"./sha384":86,"./sha512":87}],82:[function(e,t,r){var n=e("inherits"),o=e("./hash"),i=e("safe-buffer").Buffer,m=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,o.call(this,64,56)}n(a,o),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(e){for(var t,r,n,o,i,s,a=this._w,u=0|this._a,c=0|this._b,f=0|this._c,l=0|this._d,h=0|this._e,p=0;p<16;++p)a[p]=e.readInt32BE(4*p);for(;p<80;++p)a[p]=a[p-3]^a[p-8]^a[p-14]^a[p-16];for(var d=0;d<80;++d){var y=~~(d/20),g=0|((s=u)<<5|s>>>27)+(n=c,o=f,i=l,0===(r=y)?n&o|~n&i:2===r?n&o|n&i|o&i:n^o^i)+h+a[d]+m[y];h=l,l=f,f=(t=c)<<30|t>>>2,c=u,u=g}this._a=u+this._a|0,this._b=c+this._b|0,this._c=f+this._c|0,this._d=l+this._d|0,this._e=h+this._e|0},a.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=a},{"./hash":80,inherits:64,"safe-buffer":79}],83:[function(e,t,r){var n=e("inherits"),o=e("./hash"),i=e("safe-buffer").Buffer,b=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,o.call(this,64,56)}n(a,o),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(e){for(var t,r,n,o,i,s,a,u=this._w,c=0|this._a,f=0|this._b,l=0|this._c,h=0|this._d,p=0|this._e,d=0;d<16;++d)u[d]=e.readInt32BE(4*d);for(;d<80;++d)u[d]=(t=u[d-3]^u[d-8]^u[d-14]^u[d-16])<<1|t>>>31;for(var y=0;y<80;++y){var g=~~(y/20),m=0|((a=c)<<5|a>>>27)+(o=f,i=l,s=h,0===(n=g)?o&i|~o&s:2===n?o&i|o&s|i&s:o^i^s)+p+u[y]+b[g];p=h,h=l,l=(r=f)<<30|r>>>2,f=c,c=m}this._a=c+this._a|0,this._b=f+this._b|0,this._c=l+this._c|0,this._d=h+this._d|0,this._e=p+this._e|0},a.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=a},{"./hash":80,inherits:64,"safe-buffer":79}],84:[function(e,t,r){var n=e("inherits"),o=e("./sha256"),i=e("./hash"),s=e("safe-buffer").Buffer,a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}n(u,o),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=u},{"./hash":80,"./sha256":85,inherits:64,"safe-buffer":79}],85:[function(e,t,r){var n=e("inherits"),o=e("./hash"),i=e("safe-buffer").Buffer,_=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function a(){this.init(),this._w=s,o.call(this,64,56)}n(a,o),a.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},a.prototype._update=function(e){for(var t,r,n,o,i,s,a,u=this._w,c=0|this._a,f=0|this._b,l=0|this._c,h=0|this._d,p=0|this._e,d=0|this._f,y=0|this._g,g=0|this._h,m=0;m<16;++m)u[m]=e.readInt32BE(4*m);for(;m<64;++m)u[m]=0|(((r=u[m-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)+u[m-7]+(((t=u[m-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3)+u[m-16];for(var b=0;b<64;++b){var v=g+(((a=p)>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+((s=y)^p&(d^s))+_[b]+u[b]|0,w=0|(((i=c)>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+((n=c)&(o=f)|l&(n|o));g=y,y=d,d=p,p=h+v|0,h=l,l=f,f=c,c=v+w|0}this._a=c+this._a|0,this._b=f+this._b|0,this._c=l+this._c|0,this._d=h+this._d|0,this._e=p+this._e|0,this._f=d+this._f|0,this._g=y+this._g|0,this._h=g+this._h|0},a.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=a},{"./hash":80,inherits:64,"safe-buffer":79}],86:[function(e,t,r){var n=e("inherits"),o=e("./sha512"),i=e("./hash"),s=e("safe-buffer").Buffer,a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}n(u,o),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var n=s.allocUnsafe(48);function e(e,t,r){n.writeInt32BE(e,r),n.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),n},t.exports=u},{"./hash":80,"./sha512":87,inherits:64,"safe-buffer":79}],87:[function(e,t,r){var n=e("inherits"),o=e("./hash"),i=e("safe-buffer").Buffer,$=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function a(){this.init(),this._w=s,o.call(this,128,112)}function ee(e,t,r){return r^e&(t^r)}function te(e,t,r){return e&t|r&(e|t)}function re(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function ne(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function oe(e,t){return e>>>0<t>>>0?1:0}n(a,o),a.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},a.prototype._update=function(e){for(var t,r,n,o,i,s,a,u,c=this._w,f=0|this._ah,l=0|this._bh,h=0|this._ch,p=0|this._dh,d=0|this._eh,y=0|this._fh,g=0|this._gh,m=0|this._hh,b=0|this._al,v=0|this._bl,w=0|this._cl,_=0|this._dl,x=0|this._el,A=0|this._fl,C=0|this._gl,S=0|this._hl,k=0;k<32;k+=2)c[k]=e.readInt32BE(4*k),c[k+1]=e.readInt32BE(4*k+4);for(;k<160;k+=2){var E=c[k-30],P=c[k-30+1],O=((a=E)>>>1|(u=P)<<31)^(a>>>8|u<<24)^a>>>7,B=((i=P)>>>1|(s=E)<<31)^(i>>>8|s<<24)^(i>>>7|s<<25);E=c[k-4],P=c[k-4+1];var F=((n=E)>>>19|(o=P)<<13)^(o>>>29|n<<3)^n>>>6,j=((t=P)>>>19|(r=E)<<13)^(r>>>29|t<<3)^(t>>>6|r<<26),T=c[k-14],D=c[k-14+1],K=c[k-32],I=c[k-32+1],R=B+D|0,L=O+T+oe(R,B)|0;L=(L=L+F+oe(R=R+j|0,j)|0)+K+oe(R=R+I|0,I)|0,c[k]=L,c[k+1]=R}for(var N=0;N<160;N+=2){L=c[N],R=c[N+1];var U=te(f,l,h),G=te(b,v,w),M=re(f,b),H=re(b,f),q=ne(d,x),z=ne(x,d),W=$[N+1],V=ee(d,y,g),X=ee(x,A,C),J=S+z|0,Y=m+q+oe(J,S)|0;Y=(Y=(Y=Y+V+oe(J=J+X|0,X)|0)+$[N]+oe(J=J+W|0,W)|0)+L+oe(J=J+R|0,R)|0;var Z=H+G|0,Q=M+U+oe(Z,H)|0;m=g,S=C,g=y,C=A,y=d,A=x,d=p+Y+oe(x=_+J|0,_)|0,p=h,_=w,h=l,w=v,l=f,v=b,f=Y+Q+oe(b=J+Z|0,J)|0}this._al=this._al+b|0,this._bl=this._bl+v|0,this._cl=this._cl+w|0,this._dl=this._dl+_|0,this._el=this._el+x|0,this._fl=this._fl+A|0,this._gl=this._gl+C|0,this._hl=this._hl+S|0,this._ah=this._ah+f+oe(this._al,b)|0,this._bh=this._bh+l+oe(this._bl,v)|0,this._ch=this._ch+h+oe(this._cl,w)|0,this._dh=this._dh+p+oe(this._dl,_)|0,this._eh=this._eh+d+oe(this._el,x)|0,this._fh=this._fh+y+oe(this._fl,A)|0,this._gh=this._gh+g+oe(this._gl,C)|0,this._hh=this._hh+m+oe(this._hl,S)|0},a.prototype._hash=function(){var n=i.allocUnsafe(64);function e(e,t,r){n.writeInt32BE(e,r),n.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),n},t.exports=a},{"./hash":80,inherits:64,"safe-buffer":79}],88:[function(e,t,r){!function(i){"use strict";var y=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},s=function(){throw new Error("no PRNG")},o=new Uint8Array(16),r=new Uint8Array(32);r[0]=9;var c=y(),f=y([1]),g=y([56129,1]),l=y([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=y([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),n=y([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),a=y([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=y([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function u(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function d(e,t,r,n,o){var i,s=0;for(i=0;i<o;i++)s|=e[t+i]^r[n+i];return(1&s-1>>>8)-1}function m(e,t,r,n){return d(e,t,r,n,16)}function b(e,t,r,n){return d(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=i,x=s,A=a,C=u,S=c,k=f,E=l,P=h,O=p,B=d,F=y,j=g,T=m,D=b,K=v,I=w,R=0;R<20;R+=2)_^=(o=(T^=(o=(O^=(o=(S^=(o=_+T|0)<<7|o>>>25)+_|0)<<9|o>>>23)+S|0)<<13|o>>>19)+O|0)<<18|o>>>14,k^=(o=(x^=(o=(D^=(o=(B^=(o=k+x|0)<<7|o>>>25)+k|0)<<9|o>>>23)+B|0)<<13|o>>>19)+D|0)<<18|o>>>14,F^=(o=(E^=(o=(A^=(o=(K^=(o=F+E|0)<<7|o>>>25)+F|0)<<9|o>>>23)+K|0)<<13|o>>>19)+A|0)<<18|o>>>14,I^=(o=(j^=(o=(P^=(o=(C^=(o=I+j|0)<<7|o>>>25)+I|0)<<9|o>>>23)+C|0)<<13|o>>>19)+P|0)<<18|o>>>14,_^=(o=(C^=(o=(A^=(o=(x^=(o=_+C|0)<<7|o>>>25)+_|0)<<9|o>>>23)+x|0)<<13|o>>>19)+A|0)<<18|o>>>14,k^=(o=(S^=(o=(P^=(o=(E^=(o=k+S|0)<<7|o>>>25)+k|0)<<9|o>>>23)+E|0)<<13|o>>>19)+P|0)<<18|o>>>14,F^=(o=(B^=(o=(O^=(o=(j^=(o=F+B|0)<<7|o>>>25)+F|0)<<9|o>>>23)+j|0)<<13|o>>>19)+O|0)<<18|o>>>14,I^=(o=(K^=(o=(D^=(o=(T^=(o=I+K|0)<<7|o>>>25)+I|0)<<9|o>>>23)+T|0)<<13|o>>>19)+D|0)<<18|o>>>14;_=_+i|0,x=x+s|0,A=A+a|0,C=C+u|0,S=S+c|0,k=k+f|0,E=E+l|0,P=P+h|0,O=O+p|0,B=B+d|0,F=F+y|0,j=j+g|0,T=T+m|0,D=D+b|0,K=K+v|0,I=I+w|0,e[0]=_>>>0&255,e[1]=_>>>8&255,e[2]=_>>>16&255,e[3]=_>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=A>>>0&255,e[9]=A>>>8&255,e[10]=A>>>16&255,e[11]=A>>>24&255,e[12]=C>>>0&255,e[13]=C>>>8&255,e[14]=C>>>16&255,e[15]=C>>>24&255,e[16]=S>>>0&255,e[17]=S>>>8&255,e[18]=S>>>16&255,e[19]=S>>>24&255,e[20]=k>>>0&255,e[21]=k>>>8&255,e[22]=k>>>16&255,e[23]=k>>>24&255,e[24]=E>>>0&255,e[25]=E>>>8&255,e[26]=E>>>16&255,e[27]=E>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=O>>>0&255,e[33]=O>>>8&255,e[34]=O>>>16&255,e[35]=O>>>24&255,e[36]=B>>>0&255,e[37]=B>>>8&255,e[38]=B>>>16&255,e[39]=B>>>24&255,e[40]=F>>>0&255,e[41]=F>>>8&255,e[42]=F>>>16&255,e[43]=F>>>24&255,e[44]=j>>>0&255,e[45]=j>>>8&255,e[46]=j>>>16&255,e[47]=j>>>24&255,e[48]=T>>>0&255,e[49]=T>>>8&255,e[50]=T>>>16&255,e[51]=T>>>24&255,e[52]=D>>>0&255,e[53]=D>>>8&255,e[54]=D>>>16&255,e[55]=D>>>24&255,e[56]=K>>>0&255,e[57]=K>>>8&255,e[58]=K>>>16&255,e[59]=K>>>24&255,e[60]=I>>>0&255,e[61]=I>>>8&255,e[62]=I>>>16&255,e[63]=I>>>24&255}(e,t,r,n)}function w(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=0;_<20;_+=2)i^=(o=(m^=(o=(p^=(o=(c^=(o=i+m|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+p|0)<<18|o>>>14,f^=(o=(s^=(o=(b^=(o=(d^=(o=f+s|0)<<7|o>>>25)+f|0)<<9|o>>>23)+d|0)<<13|o>>>19)+b|0)<<18|o>>>14,y^=(o=(l^=(o=(a^=(o=(v^=(o=y+l|0)<<7|o>>>25)+y|0)<<9|o>>>23)+v|0)<<13|o>>>19)+a|0)<<18|o>>>14,w^=(o=(g^=(o=(h^=(o=(u^=(o=w+g|0)<<7|o>>>25)+w|0)<<9|o>>>23)+u|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(u^=(o=(a^=(o=(s^=(o=i+u|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+a|0)<<18|o>>>14,f^=(o=(c^=(o=(h^=(o=(l^=(o=f+c|0)<<7|o>>>25)+f|0)<<9|o>>>23)+l|0)<<13|o>>>19)+h|0)<<18|o>>>14,y^=(o=(d^=(o=(p^=(o=(g^=(o=y+d|0)<<7|o>>>25)+y|0)<<9|o>>>23)+g|0)<<13|o>>>19)+p|0)<<18|o>>>14,w^=(o=(v^=(o=(b^=(o=(m^=(o=w+v|0)<<7|o>>>25)+w|0)<<9|o>>>23)+m|0)<<13|o>>>19)+b|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=f>>>0&255,e[5]=f>>>8&255,e[6]=f>>>16&255,e[7]=f>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var _=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function x(e,t,r,n,o,i,s){var a,u,c=new Uint8Array(16),f=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;64<=o;){for(v(f,c,s,_),u=0;u<64;u++)e[t+u]=r[n+u]^f[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;o-=64,t+=64,n+=64}if(0<o)for(v(f,c,s,_),u=0;u<o;u++)e[t+u]=r[n+u]^f[u];return 0}function A(e,t,r,n,o){var i,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;64<=r;){for(v(u,a,o,_),s=0;s<64;s++)e[t+s]=u[s];for(i=1,s=8;s<16;s++)i=i+(255&a[s])|0,a[s]=255&i,i>>>=8;r-=64,t+=64}if(0<r)for(v(u,a,o,_),s=0;s<r;s++)e[t+s]=u[s];return 0}function C(e,t,r,n,o){var i=new Uint8Array(32);w(i,n,o,_);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return A(e,t,r,s,i)}function S(e,t,r,n,o,i,s){var a=new Uint8Array(32);w(a,i,s,_);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=i[c+16];return x(e,t,r,n,o,u,a)}var k=function(e){var t,r,n,o,i,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,t=255&e[this.fin=0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function E(e,t,r,n,o,i){var s=new k(i);return s.update(r,n,o),s.finish(e,t),0}function P(e,t,r,n,o,i){var s=new Uint8Array(16);return E(s,0,r,n,o,i),m(e,t,s,0)}function O(e,t,r,n,o){var i;if(r<32)return-1;for(S(e,0,t,0,r,n,o),E(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function B(e,t,r,n,o){var i,s=new Uint8Array(32);if(r<32)return-1;if(C(s,0,32,n,o),0!==P(t,16,t,32,r-32,s))return-1;for(S(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function F(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function j(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function T(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function D(e,t){var r,n,o,i=y(),s=y();for(r=0;r<16;r++)s[r]=t[r];for(j(s),j(s),j(s),n=0;n<2;n++){for(i[0]=s[0]-65517,r=1;r<15;r++)i[r]=s[r]-65535-(i[r-1]>>16&1),i[r-1]&=65535;i[15]=s[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,T(s,i,1-o)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function K(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return D(r,e),D(n,t),b(r,0,n,0)}function I(e){var t=new Uint8Array(32);return D(t,e),1&t[0]}function R(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function N(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,o,i=0,s=0,a=0,u=0,c=0,f=0,l=0,h=0,p=0,d=0,y=0,g=0,m=0,b=0,v=0,w=0,_=0,x=0,A=0,C=0,S=0,k=0,E=0,P=0,O=0,B=0,F=0,j=0,T=0,D=0,K=0,I=r[0],R=r[1],L=r[2],N=r[3],U=r[4],G=r[5],M=r[6],H=r[7],q=r[8],z=r[9],W=r[10],V=r[11],X=r[12],J=r[13],Y=r[14],Z=r[15];i+=(n=t[0])*I,s+=n*R,a+=n*L,u+=n*N,c+=n*U,f+=n*G,l+=n*M,h+=n*H,p+=n*q,d+=n*z,y+=n*W,g+=n*V,m+=n*X,b+=n*J,v+=n*Y,w+=n*Z,s+=(n=t[1])*I,a+=n*R,u+=n*L,c+=n*N,f+=n*U,l+=n*G,h+=n*M,p+=n*H,d+=n*q,y+=n*z,g+=n*W,m+=n*V,b+=n*X,v+=n*J,w+=n*Y,_+=n*Z,a+=(n=t[2])*I,u+=n*R,c+=n*L,f+=n*N,l+=n*U,h+=n*G,p+=n*M,d+=n*H,y+=n*q,g+=n*z,m+=n*W,b+=n*V,v+=n*X,w+=n*J,_+=n*Y,x+=n*Z,u+=(n=t[3])*I,c+=n*R,f+=n*L,l+=n*N,h+=n*U,p+=n*G,d+=n*M,y+=n*H,g+=n*q,m+=n*z,b+=n*W,v+=n*V,w+=n*X,_+=n*J,x+=n*Y,A+=n*Z,c+=(n=t[4])*I,f+=n*R,l+=n*L,h+=n*N,p+=n*U,d+=n*G,y+=n*M,g+=n*H,m+=n*q,b+=n*z,v+=n*W,w+=n*V,_+=n*X,x+=n*J,A+=n*Y,C+=n*Z,f+=(n=t[5])*I,l+=n*R,h+=n*L,p+=n*N,d+=n*U,y+=n*G,g+=n*M,m+=n*H,b+=n*q,v+=n*z,w+=n*W,_+=n*V,x+=n*X,A+=n*J,C+=n*Y,S+=n*Z,l+=(n=t[6])*I,h+=n*R,p+=n*L,d+=n*N,y+=n*U,g+=n*G,m+=n*M,b+=n*H,v+=n*q,w+=n*z,_+=n*W,x+=n*V,A+=n*X,C+=n*J,S+=n*Y,k+=n*Z,h+=(n=t[7])*I,p+=n*R,d+=n*L,y+=n*N,g+=n*U,m+=n*G,b+=n*M,v+=n*H,w+=n*q,_+=n*z,x+=n*W,A+=n*V,C+=n*X,S+=n*J,k+=n*Y,E+=n*Z,p+=(n=t[8])*I,d+=n*R,y+=n*L,g+=n*N,m+=n*U,b+=n*G,v+=n*M,w+=n*H,_+=n*q,x+=n*z,A+=n*W,C+=n*V,S+=n*X,k+=n*J,E+=n*Y,P+=n*Z,d+=(n=t[9])*I,y+=n*R,g+=n*L,m+=n*N,b+=n*U,v+=n*G,w+=n*M,_+=n*H,x+=n*q,A+=n*z,C+=n*W,S+=n*V,k+=n*X,E+=n*J,P+=n*Y,O+=n*Z,y+=(n=t[10])*I,g+=n*R,m+=n*L,b+=n*N,v+=n*U,w+=n*G,_+=n*M,x+=n*H,A+=n*q,C+=n*z,S+=n*W,k+=n*V,E+=n*X,P+=n*J,O+=n*Y,B+=n*Z,g+=(n=t[11])*I,m+=n*R,b+=n*L,v+=n*N,w+=n*U,_+=n*G,x+=n*M,A+=n*H,C+=n*q,S+=n*z,k+=n*W,E+=n*V,P+=n*X,O+=n*J,B+=n*Y,F+=n*Z,m+=(n=t[12])*I,b+=n*R,v+=n*L,w+=n*N,_+=n*U,x+=n*G,A+=n*M,C+=n*H,S+=n*q,k+=n*z,E+=n*W,P+=n*V,O+=n*X,B+=n*J,F+=n*Y,j+=n*Z,b+=(n=t[13])*I,v+=n*R,w+=n*L,_+=n*N,x+=n*U,A+=n*G,C+=n*M,S+=n*H,k+=n*q,E+=n*z,P+=n*W,O+=n*V,B+=n*X,F+=n*J,j+=n*Y,T+=n*Z,v+=(n=t[14])*I,w+=n*R,_+=n*L,x+=n*N,A+=n*U,C+=n*G,S+=n*M,k+=n*H,E+=n*q,P+=n*z,O+=n*W,B+=n*V,F+=n*X,j+=n*J,T+=n*Y,D+=n*Z,w+=(n=t[15])*I,s+=38*(x+=n*L),a+=38*(A+=n*N),u+=38*(C+=n*U),c+=38*(S+=n*G),f+=38*(k+=n*M),l+=38*(E+=n*H),h+=38*(P+=n*q),p+=38*(O+=n*z),d+=38*(B+=n*W),y+=38*(F+=n*V),g+=38*(j+=n*X),m+=38*(T+=n*J),b+=38*(D+=n*Y),v+=38*(K+=n*Z),i=(n=(i+=38*(_+=n*R))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=u,e[4]=c,e[5]=f,e[6]=l,e[7]=h,e[8]=p,e[9]=d,e[10]=y,e[11]=g,e[12]=m,e[13]=b,e[14]=v,e[15]=w}function G(e,t){U(e,t,t)}function M(e,t){var r,n=y();for(r=0;r<16;r++)n[r]=t[r];for(r=253;0<=r;r--)G(n,n),2!==r&&4!==r&&U(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function H(e,t,r){var n,o,i=new Uint8Array(32),s=new Float64Array(80),a=y(),u=y(),c=y(),f=y(),l=y(),h=y();for(o=0;o<31;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,R(s,r),o=0;o<16;o++)u[o]=s[o],f[o]=a[o]=c[o]=0;for(a[0]=f[0]=1,o=254;0<=o;--o)T(a,u,n=i[o>>>3]>>>(7&o)&1),T(c,f,n),L(l,a,c),N(a,a,c),L(c,u,f),N(u,u,f),G(f,l),G(h,a),U(a,c,a),U(c,u,l),L(l,a,c),N(a,a,c),G(u,a),N(c,f,h),U(a,c,g),L(a,a,f),U(c,c,a),U(a,f,h),U(f,u,s),G(u,l),T(a,u,n),T(c,f,n);for(o=0;o<16;o++)s[o+16]=a[o],s[o+32]=c[o],s[o+48]=u[o],s[o+64]=f[o];var p=s.subarray(32),d=s.subarray(16);return M(p,p),U(d,d,p),D(e,d),0}function q(e,t){return H(e,t,r)}function z(e,t){return s(t,32),q(e,t)}function W(e,t,r){var n=new Uint8Array(32);return H(n,r,t),w(e,o,n,_)}k.prototype.blocks=function(e,t,r){for(var n,o,i,s,a,u,c,f,l,h,p,d,y,g,m,b,v,w,_,x=this.fin?0:2048,A=this.h[0],C=this.h[1],S=this.h[2],k=this.h[3],E=this.h[4],P=this.h[5],O=this.h[6],B=this.h[7],F=this.h[8],j=this.h[9],T=this.r[0],D=this.r[1],K=this.r[2],I=this.r[3],R=this.r[4],L=this.r[5],N=this.r[6],U=this.r[7],G=this.r[8],M=this.r[9];16<=r;)h=l=0,h+=(A+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*T,h+=(C+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*M),h+=(S+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*G),h+=(k+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*U),l=(h+=(E+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*N))>>>13,h&=8191,h+=(P+=a>>>1&8191)*(5*L),h+=(O+=8191&(a>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*R),h+=(B+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*I),h+=(F+=8191&(c>>>8|(f=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*K),p=l+=(h+=(j+=f>>>5|x)*(5*D))>>>13,p+=A*D,p+=C*T,p+=S*(5*M),p+=k*(5*G),l=(p+=E*(5*U))>>>13,p&=8191,p+=P*(5*N),p+=O*(5*L),p+=B*(5*R),p+=F*(5*I),l+=(p+=j*(5*K))>>>13,p&=8191,d=l,d+=A*K,d+=C*D,d+=S*T,d+=k*(5*M),l=(d+=E*(5*G))>>>13,d&=8191,d+=P*(5*U),d+=O*(5*N),d+=B*(5*L),d+=F*(5*R),y=l+=(d+=j*(5*I))>>>13,y+=A*I,y+=C*K,y+=S*D,y+=k*T,l=(y+=E*(5*M))>>>13,y&=8191,y+=P*(5*G),y+=O*(5*U),y+=B*(5*N),y+=F*(5*L),g=l+=(y+=j*(5*R))>>>13,g+=A*R,g+=C*I,g+=S*K,g+=k*D,l=(g+=E*T)>>>13,g&=8191,g+=P*(5*M),g+=O*(5*G),g+=B*(5*U),g+=F*(5*N),m=l+=(g+=j*(5*L))>>>13,m+=A*L,m+=C*R,m+=S*I,m+=k*K,l=(m+=E*D)>>>13,m&=8191,m+=P*T,m+=O*(5*M),m+=B*(5*G),m+=F*(5*U),b=l+=(m+=j*(5*N))>>>13,b+=A*N,b+=C*L,b+=S*R,b+=k*I,l=(b+=E*K)>>>13,b&=8191,b+=P*D,b+=O*T,b+=B*(5*M),b+=F*(5*G),v=l+=(b+=j*(5*U))>>>13,v+=A*U,v+=C*N,v+=S*L,v+=k*R,l=(v+=E*I)>>>13,v&=8191,v+=P*K,v+=O*D,v+=B*T,v+=F*(5*M),w=l+=(v+=j*(5*G))>>>13,w+=A*G,w+=C*U,w+=S*N,w+=k*L,l=(w+=E*R)>>>13,w&=8191,w+=P*I,w+=O*K,w+=B*D,w+=F*T,_=l+=(w+=j*(5*M))>>>13,_+=A*M,_+=C*G,_+=S*U,_+=k*N,l=(_+=E*L)>>>13,_&=8191,_+=P*R,_+=O*I,_+=B*K,_+=F*D,A=h=8191&(l=(l=((l+=(_+=j*T)>>>13)<<2)+l|0)+(h&=8191)|0),C=p+=l>>>=13,S=d&=8191,k=y&=8191,E=g&=8191,P=m&=8191,O=b&=8191,B=v&=8191,F=w&=8191,j=_&=8191,t+=16,r-=16;this.h[0]=A,this.h[1]=C,this.h[2]=S,this.h[3]=k,this.h[4]=E,this.h[5]=P,this.h[6]=O,this.h[7]=B,this.h[8]=F,this.h[9]=j},k.prototype.finish=function(e,t){var r,n,o,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+r,r=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,n=(1^r)-1,i=0;i<10;i++)s[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,r){var n,o;if(this.leftover){for(r<(o=16-this.leftover)&&(o=r),n=0;n<o;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(16<=r&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var V=O,X=B;var J=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(e,t,r,n){for(var o,i,s,a,u,c,f,l,h,p,d,y,g,m,b,v,w,_,x,A,C,S,k,E,P=new Int32Array(16),O=new Int32Array(16),B=e[0],F=e[1],j=e[2],T=e[3],D=e[4],K=e[5],I=e[6],R=e[7],L=t[0],N=t[1],U=t[2],G=t[3],M=t[4],H=t[5],q=t[6],z=t[7],W=0;128<=n;){for(w=0;w<16;w++)_=8*w+W,P[w]=r[_+0]<<24|r[_+1]<<16|r[_+2]<<8|r[_+3],O[w]=r[_+4]<<24|r[_+5]<<16|r[_+6]<<8|r[_+7];for(w=0;w<80;w++)if(o=F,i=j,s=T,l=N,h=U,p=G,C=65535&(A=z),S=A>>>16,k=65535&(x=R),E=x>>>16,C+=65535&(A=((d=M)>>>14|(a=D)<<18)^(M>>>18|D<<14)^(D>>>9|M<<23)),S+=A>>>16,k+=65535&(x=(D>>>14|M<<18)^(D>>>18|M<<14)^(M>>>9|D<<23)),E+=x>>>16,C+=65535&(A=M&(y=H)^~M&(g=q)),S+=A>>>16,k+=65535&(x=D&(u=K)^~D&(c=I)),E+=x>>>16,x=J[2*w],C+=65535&(A=J[2*w+1]),S+=A>>>16,k+=65535&x,E+=x>>>16,x=P[w%16],S+=(A=O[w%16])>>>16,k+=65535&x,E+=x>>>16,k+=(S+=(C+=65535&A)>>>16)>>>16,C=65535&(A=v=65535&C|S<<16),S=A>>>16,k=65535&(x=b=65535&k|(E+=k>>>16)<<16),E=x>>>16,C+=65535&(A=(L>>>28|B<<4)^(B>>>2|L<<30)^(B>>>7|L<<25)),S+=A>>>16,k+=65535&(x=(B>>>28|L<<4)^(L>>>2|B<<30)^(L>>>7|B<<25)),E+=x>>>16,S+=(A=L&N^L&U^N&U)>>>16,k+=65535&(x=B&F^B&j^F&j),E+=x>>>16,f=65535&(k+=(S+=(C+=65535&A)>>>16)>>>16)|(E+=k>>>16)<<16,m=65535&C|S<<16,C=65535&(A=p),S=A>>>16,k=65535&(x=s),E=x>>>16,S+=(A=v)>>>16,k+=65535&(x=b),E+=x>>>16,F=B,j=o,T=i,D=s=65535&(k+=(S+=(C+=65535&A)>>>16)>>>16)|(E+=k>>>16)<<16,K=a,I=u,R=c,B=f,N=L,U=l,G=h,M=p=65535&C|S<<16,H=d,q=y,z=g,L=m,w%16==15)for(_=0;_<16;_++)x=P[_],C=65535&(A=O[_]),S=A>>>16,k=65535&x,E=x>>>16,x=P[(_+9)%16],C+=65535&(A=O[(_+9)%16]),S+=A>>>16,k+=65535&x,E+=x>>>16,b=P[(_+1)%16],C+=65535&(A=((v=O[(_+1)%16])>>>1|b<<31)^(v>>>8|b<<24)^(v>>>7|b<<25)),S+=A>>>16,k+=65535&(x=(b>>>1|v<<31)^(b>>>8|v<<24)^b>>>7),E+=x>>>16,b=P[(_+14)%16],S+=(A=((v=O[(_+14)%16])>>>19|b<<13)^(b>>>29|v<<3)^(v>>>6|b<<26))>>>16,k+=65535&(x=(b>>>19|v<<13)^(v>>>29|b<<3)^b>>>6),E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,P[_]=65535&k|E<<16,O[_]=65535&C|S<<16;C=65535&(A=L),S=A>>>16,k=65535&(x=B),E=x>>>16,x=e[0],S+=(A=t[0])>>>16,k+=65535&x,E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,e[0]=B=65535&k|E<<16,t[0]=L=65535&C|S<<16,C=65535&(A=N),S=A>>>16,k=65535&(x=F),E=x>>>16,x=e[1],S+=(A=t[1])>>>16,k+=65535&x,E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,e[1]=F=65535&k|E<<16,t[1]=N=65535&C|S<<16,C=65535&(A=U),S=A>>>16,k=65535&(x=j),E=x>>>16,x=e[2],S+=(A=t[2])>>>16,k+=65535&x,E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,e[2]=j=65535&k|E<<16,t[2]=U=65535&C|S<<16,C=65535&(A=G),S=A>>>16,k=65535&(x=T),E=x>>>16,x=e[3],S+=(A=t[3])>>>16,k+=65535&x,E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,e[3]=T=65535&k|E<<16,t[3]=G=65535&C|S<<16,C=65535&(A=M),S=A>>>16,k=65535&(x=D),E=x>>>16,x=e[4],S+=(A=t[4])>>>16,k+=65535&x,E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,e[4]=D=65535&k|E<<16,t[4]=M=65535&C|S<<16,C=65535&(A=H),S=A>>>16,k=65535&(x=K),E=x>>>16,x=e[5],S+=(A=t[5])>>>16,k+=65535&x,E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,e[5]=K=65535&k|E<<16,t[5]=H=65535&C|S<<16,C=65535&(A=q),S=A>>>16,k=65535&(x=I),E=x>>>16,x=e[6],S+=(A=t[6])>>>16,k+=65535&x,E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,e[6]=I=65535&k|E<<16,t[6]=q=65535&C|S<<16,C=65535&(A=z),S=A>>>16,k=65535&(x=R),E=x>>>16,x=e[7],S+=(A=t[7])>>>16,k+=65535&x,E+=x>>>16,E+=(k+=(S+=(C+=65535&A)>>>16)>>>16)>>>16,e[7]=R=65535&k|E<<16,t[7]=z=65535&C|S<<16,W+=128,n-=128}return n}function Z(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),a=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(o,i,t,r),r%=128,n=0;n<r;n++)s[n]=t[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,u(s,r-8,a/536870912|0,a<<3),Y(o,i,s,r),n=0;n<8;n++)u(e,8*n,o[n],i[n]);return 0}function Q(e,t){var r=y(),n=y(),o=y(),i=y(),s=y(),a=y(),u=y(),c=y(),f=y();N(r,e[1],e[0]),N(f,t[1],t[0]),U(r,r,f),L(n,e[0],e[1]),L(f,t[0],t[1]),U(n,n,f),U(o,e[3],t[3]),U(o,o,h),U(i,e[2],t[2]),L(i,i,i),N(s,n,r),N(a,i,o),L(u,i,o),L(c,n,r),U(e[0],s,a),U(e[1],c,u),U(e[2],u,a),U(e[3],s,c)}function $(e,t,r){var n;for(n=0;n<4;n++)T(e[n],t[n],r)}function ee(e,t){var r=y(),n=y(),o=y();M(o,t[2]),U(r,t[0],o),U(n,t[1],o),D(e,n),e[31]^=I(r)<<7}function te(e,t,r){var n,o;for(F(e[0],c),F(e[1],f),F(e[2],f),F(e[3],c),o=255;0<=o;--o)$(e,t,n=r[o/8|0]>>(7&o)&1),Q(t,e),Q(e,e),$(e,t,n)}function re(e,t){var r=[y(),y(),y(),y()];F(r[0],n),F(r[1],a),F(r[2],f),U(r[3],n,a),te(e,r,t)}function ne(e,t,r){var n,o=new Uint8Array(64),i=[y(),y(),y(),y()];for(r||s(t,32),Z(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,re(i,o),ee(e,i),n=0;n<32;n++)t[n+32]=e[n];return 0}var oe=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,o,i;for(n=63;32<=n;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*oe[o-(n-32)],r=t[o]+128>>8,t[o]-=256*r;t[o]+=r,t[n]=0}for(o=r=0;o<32;o++)t[o]+=r-(t[31]>>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function se(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function ae(e,t,r,n){var o,i,s=new Uint8Array(64),a=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),f=[y(),y(),y(),y()];Z(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64;var l=r+64;for(o=0;o<r;o++)e[64+o]=t[o];for(o=0;o<32;o++)e[32+o]=s[32+o];for(Z(u,e.subarray(32),r+32),se(u),re(f,u),ee(e,f),o=32;o<64;o++)e[o]=n[o];for(Z(a,e,r+64),se(a),o=0;o<64;o++)c[o]=0;for(o=0;o<32;o++)c[o]=u[o];for(o=0;o<32;o++)for(i=0;i<32;i++)c[o+i]+=a[o]*s[i];return ie(e.subarray(32),c),l}function ue(e,t){var r=y(),n=y(),o=y(),i=y(),s=y(),a=y(),u=y();if(F(e[2],f),R(e[1],t),G(o,e[1]),U(i,o,l),N(o,o,e[2]),L(i,e[2],i),G(s,i),G(a,s),U(u,a,s),U(r,u,o),U(r,r,i),function(e,t){var r,n=y();for(r=0;r<16;r++)n[r]=t[r];for(r=250;0<=r;r--)G(n,n),1!==r&&U(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(r,r),U(r,r,o),U(r,r,i),U(r,r,i),U(e[0],r,i),G(n,e[0]),U(n,n,i),K(n,o)&&U(e[0],e[0],p),G(n,e[0]),U(n,n,i),K(n,o))return 1;I(e[0])===t[31]>>7&&N(e[0],c,e[0]),U(e[3],e[0],e[1])}function ce(e,t,r,n){var o,i=new Uint8Array(32),s=new Uint8Array(64),a=[y(),y(),y(),y()],u=[y(),y(),y(),y()];if(r<64)return-1;if(ue(u,n))return-1;for(o=0;o<r;o++)e[o]=t[o];for(o=0;o<32;o++)e[o+32]=n[o];if(Z(s,e,r),se(s),te(a,u,s),re(u,t.subarray(32)),Q(a,u),ee(i,a),r-=64,b(t,0,i,0)){for(o=0;o<r;o++)e[o]=0;return-1}for(o=0;o<r;o++)e[o]=t[o+64];return r}function fe(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function le(){var e,t;for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(e=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+e+", use Uint8Array")}function he(e){for(var t=0;t<e.length;t++)e[t]=0}i.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:S,crypto_stream:C,crypto_stream_salsa20_xor:x,crypto_stream_salsa20:A,crypto_onetimeauth:E,crypto_onetimeauth_verify:P,crypto_verify_16:m,crypto_verify_32:b,crypto_secretbox:O,crypto_secretbox_open:B,crypto_scalarmult:H,crypto_scalarmult_base:q,crypto_box_beforenm:W,crypto_box_afternm:V,crypto_box:function(e,t,r,n,o,i){var s=new Uint8Array(32);return W(s,o,i),V(e,t,r,n,s)},crypto_box_open:function(e,t,r,n,o,i){var s=new Uint8Array(32);return W(s,o,i),X(e,t,r,n,s)},crypto_box_keypair:z,crypto_hash:Z,crypto_sign:ae,crypto_sign_keypair:ne,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},i.util||(i.util={},i.util.decodeUTF8=i.util.encodeUTF8=i.util.encodeBase64=i.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),i.randomBytes=function(e){var t=new Uint8Array(e);return s(t,e),t},i.secretbox=function(e,t,r){le(e,t,r),fe(r,t);for(var n=new Uint8Array(32+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+32]=e[i];return O(o,n,n.length,t,r),o.subarray(16)},i.secretbox.open=function(e,t,r){le(e,t,r),fe(r,t);for(var n=new Uint8Array(16+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+16]=e[i];return!(n.length<32)&&(0===B(o,n,n.length,t,r)&&o.subarray(32))},i.secretbox.keyLength=32,i.secretbox.nonceLength=24,i.secretbox.overheadLength=16,i.scalarMult=function(e,t){if(le(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return H(r,e,t),r},i.scalarMult.base=function(e){if(le(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return q(t,e),t},i.scalarMult.scalarLength=32,i.scalarMult.groupElementLength=32,i.box=function(e,t,r,n){var o=i.box.before(r,n);return i.secretbox(e,t,o)},i.box.before=function(e,t){le(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return W(r,e,t),r},i.box.after=i.secretbox,i.box.open=function(e,t,r,n){var o=i.box.before(r,n);return i.secretbox.open(e,t,o)},i.box.open.after=i.secretbox.open,i.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return z(e,t),{publicKey:e,secretKey:t}},i.box.keyPair.fromSecretKey=function(e){if(le(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return q(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},i.box.publicKeyLength=32,i.box.secretKeyLength=32,i.box.sharedKeyLength=32,i.box.nonceLength=24,i.box.overheadLength=i.secretbox.overheadLength,i.sign=function(e,t){if(le(e,t),64!==t.length)throw new Error("bad secret key size");var r=new Uint8Array(64+e.length);return ae(r,e,e.length,t),r},i.sign.open=function(e,t){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(le(e,t),32!==t.length)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ce(r,e,e.length,t);if(n<0)return null;for(var o=new Uint8Array(n),i=0;i<o.length;i++)o[i]=r[i];return o},i.sign.detached=function(e,t){for(var r=i.sign(e,t),n=new Uint8Array(64),o=0;o<n.length;o++)n[o]=r[o];return n},i.sign.detached.verify=function(e,t,r){if(le(e,t,r),64!==t.length)throw new Error("bad signature size");if(32!==r.length)throw new Error("bad public key size");var n,o=new Uint8Array(64+e.length),i=new Uint8Array(64+e.length);for(n=0;n<64;n++)o[n]=t[n];for(n=0;n<e.length;n++)o[n+64]=e[n];return 0<=ce(i,o,o.length,r)},i.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return ne(e,t),{publicKey:e,secretKey:t}},i.sign.keyPair.fromSecretKey=function(e){if(le(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},i.sign.keyPair.fromSeed=function(e){if(le(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},i.sign.publicKeyLength=32,i.sign.secretKeyLength=64,i.sign.seedLength=32,i.sign.signatureLength=64,i.hash=function(e){le(e);var t=new Uint8Array(64);return Z(t,e,e.length),t},i.hash.hashLength=64,i.verify=function(e,t){return le(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===d(e,0,t,0,e.length))},i.setPRNG=function(e){s=e},function(){var o="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(o&&o.getRandomValues){i.setPRNG(function(e,t){var r,n=new Uint8Array(t);for(r=0;r<t;r+=65536)o.getRandomValues(n.subarray(r,r+Math.min(t-r,65536)));for(r=0;r<t;r++)e[r]=n[r];he(n)})}else void 0!==e&&(o=e("crypto"))&&o.randomBytes&&i.setPRNG(function(e,t){var r,n=o.randomBytes(t);for(r=0;r<t;r++)e[r]=n[r];he(n)})}()}(void 0!==t&&t.exports?t.exports:self.nacl=self.nacl||{})},{crypto:61}],89:[function(e,t,r){"use strict";var n,pe=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/typeof"));n=function(e){var t,r,n,o,i,s,a,u,c,f,l,h,p,d=e.Reader,y=e.Writer,g=e.util,m=e.roots.default||(e.roots.default={});function b(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function v(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function w(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function _(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function x(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function A(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function C(e){if(this.validator_keys=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function S(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function k(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function E(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function P(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function O(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function B(e){if(this.transactions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function F(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function j(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function T(e){if(this.precommits=[],this.transactions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function D(e){if(this.transactions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function K(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function I(e){if(this.txs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function R(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function L(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function N(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function U(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function G(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function M(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function H(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function q(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function z(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function W(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function V(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function X(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function J(e){if(this.entry=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function Y(e){if(this.precommits=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function Z(e){if(this.blocks_proofs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function Q(e){if(this.txs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function $(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function ee(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function te(e){if(this.keys=[],this.bytes_array=[],this.string_array=[],this.num_array=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function re(e){if(this.num_map={},this.string_map={},this.bytes_map={},this.point_map={},this.key_string_map={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function ne(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function oe(e){if(this.proof=[],this.entries=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function ie(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function se(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function ae(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function ue(e){if(this.entries=[],this.proof=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function ce(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function fe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function le(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}function he(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return m.exonum=((l={}).crypto=((t={}).Hash=(b.prototype.data=g.newBuffer([]),b.create=function(e){return new b(e)},b.encode=function(e,t){return t=t||y.create(),null!=e.data&&e.hasOwnProperty("data")&&t.uint32(10).bytes(e.data),t},b.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},b.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.crypto.Hash;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.data=e.bytes();break;default:e.skipType(7&o)}}return n},b.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},b.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||g.isString(e.data))?"data: buffer expected":null},b.fromObject=function(e){if(e instanceof m.exonum.crypto.Hash)return e;var t=new m.exonum.crypto.Hash;return null!=e.data&&("string"==typeof e.data?g.base64.decode(e.data,t.data=g.newBuffer(g.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),t},b.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(t.bytes===String?r.data="":(r.data=[],t.bytes!==Array&&(r.data=g.newBuffer(r.data)))),null!=e.data&&e.hasOwnProperty("data")&&(r.data=t.bytes===String?g.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),r},b.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},b),t.PublicKey=(v.prototype.data=g.newBuffer([]),v.create=function(e){return new v(e)},v.encode=function(e,t){return t=t||y.create(),null!=e.data&&e.hasOwnProperty("data")&&t.uint32(10).bytes(e.data),t},v.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},v.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.crypto.PublicKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.data=e.bytes();break;default:e.skipType(7&o)}}return n},v.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},v.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||g.isString(e.data))?"data: buffer expected":null},v.fromObject=function(e){if(e instanceof m.exonum.crypto.PublicKey)return e;var t=new m.exonum.crypto.PublicKey;return null!=e.data&&("string"==typeof e.data?g.base64.decode(e.data,t.data=g.newBuffer(g.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),t},v.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(t.bytes===String?r.data="":(r.data=[],t.bytes!==Array&&(r.data=g.newBuffer(r.data)))),null!=e.data&&e.hasOwnProperty("data")&&(r.data=t.bytes===String?g.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),r},v.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},v),t.Signature=(w.prototype.data=g.newBuffer([]),w.create=function(e){return new w(e)},w.encode=function(e,t){return t=t||y.create(),null!=e.data&&e.hasOwnProperty("data")&&t.uint32(10).bytes(e.data),t},w.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},w.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.crypto.Signature;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.data=e.bytes();break;default:e.skipType(7&o)}}return n},w.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},w.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||g.isString(e.data))?"data: buffer expected":null},w.fromObject=function(e){if(e instanceof m.exonum.crypto.Signature)return e;var t=new m.exonum.crypto.Signature;return null!=e.data&&("string"==typeof e.data?g.base64.decode(e.data,t.data=g.newBuffer(g.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),t},w.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(t.bytes===String?r.data="":(r.data=[],t.bytes!==Array&&(r.data=g.newBuffer(r.data)))),null!=e.data&&e.hasOwnProperty("data")&&(r.data=t.bytes===String?g.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),r},w.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},w),t),l.Block=(_.prototype.chain_id=g.Long?g.Long.fromBits(0,0,!0):0,_.prototype.proposer_id=0,_.prototype.height=g.Long?g.Long.fromBits(0,0,!0):0,_.prototype.tx_count=0,_.prototype.prev_hash=null,_.prototype.tx_hash=null,_.prototype.state_hash=null,_.create=function(e){return new _(e)},_.encode=function(e,t){return t=t||y.create(),null!=e.proposer_id&&e.hasOwnProperty("proposer_id")&&t.uint32(8).uint32(e.proposer_id),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint64(e.height),null!=e.tx_count&&e.hasOwnProperty("tx_count")&&t.uint32(24).uint32(e.tx_count),null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&m.exonum.crypto.Hash.encode(e.prev_hash,t.uint32(34).fork()).ldelim(),null!=e.tx_hash&&e.hasOwnProperty("tx_hash")&&m.exonum.crypto.Hash.encode(e.tx_hash,t.uint32(42).fork()).ldelim(),null!=e.state_hash&&e.hasOwnProperty("state_hash")&&m.exonum.crypto.Hash.encode(e.state_hash,t.uint32(50).fork()).ldelim(),null!=e.chain_id&&e.hasOwnProperty("chain_id")&&t.uint32(56).uint64(e.chain_id),t},_.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},_.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.Block;e.pos<r;){var o=e.uint32();switch(o>>>3){case 7:n.chain_id=e.uint64();break;case 1:n.proposer_id=e.uint32();break;case 2:n.height=e.uint64();break;case 3:n.tx_count=e.uint32();break;case 4:n.prev_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 5:n.tx_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 6:n.state_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},_.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},_.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.chain_id&&e.hasOwnProperty("chain_id")&&!(g.isInteger(e.chain_id)||e.chain_id&&g.isInteger(e.chain_id.low)&&g.isInteger(e.chain_id.high))?"chain_id: integer|Long expected":null!=e.proposer_id&&e.hasOwnProperty("proposer_id")&&!g.isInteger(e.proposer_id)?"proposer_id: integer expected":null!=e.height&&e.hasOwnProperty("height")&&!(g.isInteger(e.height)||e.height&&g.isInteger(e.height.low)&&g.isInteger(e.height.high))?"height: integer|Long expected":null!=e.tx_count&&e.hasOwnProperty("tx_count")&&!g.isInteger(e.tx_count)?"tx_count: integer expected":null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&(t=m.exonum.crypto.Hash.verify(e.prev_hash))?"prev_hash."+t:null!=e.tx_hash&&e.hasOwnProperty("tx_hash")&&(t=m.exonum.crypto.Hash.verify(e.tx_hash))?"tx_hash."+t:null!=e.state_hash&&e.hasOwnProperty("state_hash")&&(t=m.exonum.crypto.Hash.verify(e.state_hash))?"state_hash."+t:null;var t},_.fromObject=function(e){if(e instanceof m.exonum.Block)return e;var t=new m.exonum.Block;if(null!=e.chain_id&&(g.Long?(t.chain_id=g.Long.fromValue(e.chain_id)).unsigned=!0:"string"==typeof e.chain_id?t.chain_id=parseInt(e.chain_id,10):"number"==typeof e.chain_id?t.chain_id=e.chain_id:"object"===(0,pe.default)(e.chain_id)&&(t.chain_id=new g.LongBits(e.chain_id.low>>>0,e.chain_id.high>>>0).toNumber(!0))),null!=e.proposer_id&&(t.proposer_id=e.proposer_id>>>0),null!=e.height&&(g.Long?(t.height=g.Long.fromValue(e.height)).unsigned=!0:"string"==typeof e.height?t.height=parseInt(e.height,10):"number"==typeof e.height?t.height=e.height:"object"===(0,pe.default)(e.height)&&(t.height=new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0))),null!=e.tx_count&&(t.tx_count=e.tx_count>>>0),null!=e.prev_hash){if("object"!==(0,pe.default)(e.prev_hash))throw TypeError(".exonum.Block.prev_hash: object expected");t.prev_hash=m.exonum.crypto.Hash.fromObject(e.prev_hash)}if(null!=e.tx_hash){if("object"!==(0,pe.default)(e.tx_hash))throw TypeError(".exonum.Block.tx_hash: object expected");t.tx_hash=m.exonum.crypto.Hash.fromObject(e.tx_hash)}if(null!=e.state_hash){if("object"!==(0,pe.default)(e.state_hash))throw TypeError(".exonum.Block.state_hash: object expected");t.state_hash=m.exonum.crypto.Hash.fromObject(e.state_hash)}return t},_.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(r.proposer_id=0,g.Long){var n=new g.Long(0,0,!0);r.height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.height=t.longs===String?"0":0;r.tx_count=0,r.prev_hash=null,r.tx_hash=null,r.state_hash=null,g.Long?(n=new g.Long(0,0,!0),r.chain_id=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.chain_id=t.longs===String?"0":0}return null!=e.proposer_id&&e.hasOwnProperty("proposer_id")&&(r.proposer_id=e.proposer_id),null!=e.height&&e.hasOwnProperty("height")&&("number"==typeof e.height?r.height=t.longs===String?String(e.height):e.height:r.height=t.longs===String?g.Long.prototype.toString.call(e.height):t.longs===Number?new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0):e.height),null!=e.tx_count&&e.hasOwnProperty("tx_count")&&(r.tx_count=e.tx_count),null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&(r.prev_hash=m.exonum.crypto.Hash.toObject(e.prev_hash,t)),null!=e.tx_hash&&e.hasOwnProperty("tx_hash")&&(r.tx_hash=m.exonum.crypto.Hash.toObject(e.tx_hash,t)),null!=e.state_hash&&e.hasOwnProperty("state_hash")&&(r.state_hash=m.exonum.crypto.Hash.toObject(e.state_hash,t)),null!=e.chain_id&&e.hasOwnProperty("chain_id")&&("number"==typeof e.chain_id?r.chain_id=t.longs===String?String(e.chain_id):e.chain_id:r.chain_id=t.longs===String?g.Long.prototype.toString.call(e.chain_id):t.longs===Number?new g.LongBits(e.chain_id.low>>>0,e.chain_id.high>>>0).toNumber(!0):e.chain_id),r},_.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},_),l.TxLocation=(x.prototype.block_height=g.Long?g.Long.fromBits(0,0,!0):0,x.prototype.position_in_block=g.Long?g.Long.fromBits(0,0,!0):0,x.create=function(e){return new x(e)},x.encode=function(e,t){return t=t||y.create(),null!=e.block_height&&e.hasOwnProperty("block_height")&&t.uint32(8).uint64(e.block_height),null!=e.position_in_block&&e.hasOwnProperty("position_in_block")&&t.uint32(16).uint64(e.position_in_block),t},x.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},x.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.TxLocation;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.block_height=e.uint64();break;case 2:n.position_in_block=e.uint64();break;default:e.skipType(7&o)}}return n},x.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},x.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.block_height&&e.hasOwnProperty("block_height")&&!(g.isInteger(e.block_height)||e.block_height&&g.isInteger(e.block_height.low)&&g.isInteger(e.block_height.high))?"block_height: integer|Long expected":null!=e.position_in_block&&e.hasOwnProperty("position_in_block")&&!(g.isInteger(e.position_in_block)||e.position_in_block&&g.isInteger(e.position_in_block.low)&&g.isInteger(e.position_in_block.high))?"position_in_block: integer|Long expected":null},x.fromObject=function(e){if(e instanceof m.exonum.TxLocation)return e;var t=new m.exonum.TxLocation;return null!=e.block_height&&(g.Long?(t.block_height=g.Long.fromValue(e.block_height)).unsigned=!0:"string"==typeof e.block_height?t.block_height=parseInt(e.block_height,10):"number"==typeof e.block_height?t.block_height=e.block_height:"object"===(0,pe.default)(e.block_height)&&(t.block_height=new g.LongBits(e.block_height.low>>>0,e.block_height.high>>>0).toNumber(!0))),null!=e.position_in_block&&(g.Long?(t.position_in_block=g.Long.fromValue(e.position_in_block)).unsigned=!0:"string"==typeof e.position_in_block?t.position_in_block=parseInt(e.position_in_block,10):"number"==typeof e.position_in_block?t.position_in_block=e.position_in_block:"object"===(0,pe.default)(e.position_in_block)&&(t.position_in_block=new g.LongBits(e.position_in_block.low>>>0,e.position_in_block.high>>>0).toNumber(!0))),t},x.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(g.Long){var n=new g.Long(0,0,!0);r.block_height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.block_height=t.longs===String?"0":0;g.Long?(n=new g.Long(0,0,!0),r.position_in_block=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.position_in_block=t.longs===String?"0":0}return null!=e.block_height&&e.hasOwnProperty("block_height")&&("number"==typeof e.block_height?r.block_height=t.longs===String?String(e.block_height):e.block_height:r.block_height=t.longs===String?g.Long.prototype.toString.call(e.block_height):t.longs===Number?new g.LongBits(e.block_height.low>>>0,e.block_height.high>>>0).toNumber(!0):e.block_height),null!=e.position_in_block&&e.hasOwnProperty("position_in_block")&&("number"==typeof e.position_in_block?r.position_in_block=t.longs===String?String(e.position_in_block):e.position_in_block:r.position_in_block=t.longs===String?g.Long.prototype.toString.call(e.position_in_block):t.longs===Number?new g.LongBits(e.position_in_block.low>>>0,e.position_in_block.high>>>0).toNumber(!0):e.position_in_block),r},x.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},x),l.ValidatorKeys=(A.prototype.consensus_key=null,A.prototype.service_key=null,A.create=function(e){return new A(e)},A.encode=function(e,t){return t=t||y.create(),null!=e.consensus_key&&e.hasOwnProperty("consensus_key")&&m.exonum.crypto.PublicKey.encode(e.consensus_key,t.uint32(10).fork()).ldelim(),null!=e.service_key&&e.hasOwnProperty("service_key")&&m.exonum.crypto.PublicKey.encode(e.service_key,t.uint32(18).fork()).ldelim(),t},A.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},A.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.ValidatorKeys;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.consensus_key=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 2:n.service_key=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},A.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},A.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.consensus_key&&e.hasOwnProperty("consensus_key")&&(t=m.exonum.crypto.PublicKey.verify(e.consensus_key))?"consensus_key."+t:null!=e.service_key&&e.hasOwnProperty("service_key")&&(t=m.exonum.crypto.PublicKey.verify(e.service_key))?"service_key."+t:null;var t},A.fromObject=function(e){if(e instanceof m.exonum.ValidatorKeys)return e;var t=new m.exonum.ValidatorKeys;if(null!=e.consensus_key){if("object"!==(0,pe.default)(e.consensus_key))throw TypeError(".exonum.ValidatorKeys.consensus_key: object expected");t.consensus_key=m.exonum.crypto.PublicKey.fromObject(e.consensus_key)}if(null!=e.service_key){if("object"!==(0,pe.default)(e.service_key))throw TypeError(".exonum.ValidatorKeys.service_key: object expected");t.service_key=m.exonum.crypto.PublicKey.fromObject(e.service_key)}return t},A.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.consensus_key=null,r.service_key=null),null!=e.consensus_key&&e.hasOwnProperty("consensus_key")&&(r.consensus_key=m.exonum.crypto.PublicKey.toObject(e.consensus_key,t)),null!=e.service_key&&e.hasOwnProperty("service_key")&&(r.service_key=m.exonum.crypto.PublicKey.toObject(e.service_key,t)),r},A.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},A),l.Config=(C.prototype.validator_keys=g.emptyArray,C.prototype.first_round_timeout=g.Long?g.Long.fromBits(0,0,!0):0,C.prototype.status_timeout=g.Long?g.Long.fromBits(0,0,!0):0,C.prototype.peers_timeout=g.Long?g.Long.fromBits(0,0,!0):0,C.prototype.txs_block_limit=0,C.prototype.max_message_len=0,C.prototype.min_propose_timeout=g.Long?g.Long.fromBits(0,0,!0):0,C.prototype.max_propose_timeout=g.Long?g.Long.fromBits(0,0,!0):0,C.prototype.propose_timeout_threshold=0,C.create=function(e){return new C(e)},C.encode=function(e,t){if(t=t||y.create(),null!=e.validator_keys&&e.validator_keys.length)for(var r=0;r<e.validator_keys.length;++r)m.exonum.ValidatorKeys.encode(e.validator_keys[r],t.uint32(10).fork()).ldelim();return null!=e.first_round_timeout&&e.hasOwnProperty("first_round_timeout")&&t.uint32(16).uint64(e.first_round_timeout),null!=e.status_timeout&&e.hasOwnProperty("status_timeout")&&t.uint32(24).uint64(e.status_timeout),null!=e.peers_timeout&&e.hasOwnProperty("peers_timeout")&&t.uint32(32).uint64(e.peers_timeout),null!=e.txs_block_limit&&e.hasOwnProperty("txs_block_limit")&&t.uint32(40).uint32(e.txs_block_limit),null!=e.max_message_len&&e.hasOwnProperty("max_message_len")&&t.uint32(48).uint32(e.max_message_len),null!=e.min_propose_timeout&&e.hasOwnProperty("min_propose_timeout")&&t.uint32(56).uint64(e.min_propose_timeout),null!=e.max_propose_timeout&&e.hasOwnProperty("max_propose_timeout")&&t.uint32(64).uint64(e.max_propose_timeout),null!=e.propose_timeout_threshold&&e.hasOwnProperty("propose_timeout_threshold")&&t.uint32(72).uint32(e.propose_timeout_threshold),t},C.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},C.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.Config;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.validator_keys&&n.validator_keys.length||(n.validator_keys=[]),n.validator_keys.push(m.exonum.ValidatorKeys.decode(e,e.uint32()));break;case 2:n.first_round_timeout=e.uint64();break;case 3:n.status_timeout=e.uint64();break;case 4:n.peers_timeout=e.uint64();break;case 5:n.txs_block_limit=e.uint32();break;case 6:n.max_message_len=e.uint32();break;case 7:n.min_propose_timeout=e.uint64();break;case 8:n.max_propose_timeout=e.uint64();break;case 9:n.propose_timeout_threshold=e.uint32();break;default:e.skipType(7&o)}}return n},C.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},C.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.validator_keys&&e.hasOwnProperty("validator_keys")){if(!Array.isArray(e.validator_keys))return"validator_keys: array expected";for(var t=0;t<e.validator_keys.length;++t){var r=m.exonum.ValidatorKeys.verify(e.validator_keys[t]);if(r)return"validator_keys."+r}}return null!=e.first_round_timeout&&e.hasOwnProperty("first_round_timeout")&&!(g.isInteger(e.first_round_timeout)||e.first_round_timeout&&g.isInteger(e.first_round_timeout.low)&&g.isInteger(e.first_round_timeout.high))?"first_round_timeout: integer|Long expected":null!=e.status_timeout&&e.hasOwnProperty("status_timeout")&&!(g.isInteger(e.status_timeout)||e.status_timeout&&g.isInteger(e.status_timeout.low)&&g.isInteger(e.status_timeout.high))?"status_timeout: integer|Long expected":null!=e.peers_timeout&&e.hasOwnProperty("peers_timeout")&&!(g.isInteger(e.peers_timeout)||e.peers_timeout&&g.isInteger(e.peers_timeout.low)&&g.isInteger(e.peers_timeout.high))?"peers_timeout: integer|Long expected":null!=e.txs_block_limit&&e.hasOwnProperty("txs_block_limit")&&!g.isInteger(e.txs_block_limit)?"txs_block_limit: integer expected":null!=e.max_message_len&&e.hasOwnProperty("max_message_len")&&!g.isInteger(e.max_message_len)?"max_message_len: integer expected":null!=e.min_propose_timeout&&e.hasOwnProperty("min_propose_timeout")&&!(g.isInteger(e.min_propose_timeout)||e.min_propose_timeout&&g.isInteger(e.min_propose_timeout.low)&&g.isInteger(e.min_propose_timeout.high))?"min_propose_timeout: integer|Long expected":null!=e.max_propose_timeout&&e.hasOwnProperty("max_propose_timeout")&&!(g.isInteger(e.max_propose_timeout)||e.max_propose_timeout&&g.isInteger(e.max_propose_timeout.low)&&g.isInteger(e.max_propose_timeout.high))?"max_propose_timeout: integer|Long expected":null!=e.propose_timeout_threshold&&e.hasOwnProperty("propose_timeout_threshold")&&!g.isInteger(e.propose_timeout_threshold)?"propose_timeout_threshold: integer expected":null},C.fromObject=function(e){if(e instanceof m.exonum.Config)return e;var t=new m.exonum.Config;if(e.validator_keys){if(!Array.isArray(e.validator_keys))throw TypeError(".exonum.Config.validator_keys: array expected");t.validator_keys=[];for(var r=0;r<e.validator_keys.length;++r){if("object"!==(0,pe.default)(e.validator_keys[r]))throw TypeError(".exonum.Config.validator_keys: object expected");t.validator_keys[r]=m.exonum.ValidatorKeys.fromObject(e.validator_keys[r])}}return null!=e.first_round_timeout&&(g.Long?(t.first_round_timeout=g.Long.fromValue(e.first_round_timeout)).unsigned=!0:"string"==typeof e.first_round_timeout?t.first_round_timeout=parseInt(e.first_round_timeout,10):"number"==typeof e.first_round_timeout?t.first_round_timeout=e.first_round_timeout:"object"===(0,pe.default)(e.first_round_timeout)&&(t.first_round_timeout=new g.LongBits(e.first_round_timeout.low>>>0,e.first_round_timeout.high>>>0).toNumber(!0))),null!=e.status_timeout&&(g.Long?(t.status_timeout=g.Long.fromValue(e.status_timeout)).unsigned=!0:"string"==typeof e.status_timeout?t.status_timeout=parseInt(e.status_timeout,10):"number"==typeof e.status_timeout?t.status_timeout=e.status_timeout:"object"===(0,pe.default)(e.status_timeout)&&(t.status_timeout=new g.LongBits(e.status_timeout.low>>>0,e.status_timeout.high>>>0).toNumber(!0))),null!=e.peers_timeout&&(g.Long?(t.peers_timeout=g.Long.fromValue(e.peers_timeout)).unsigned=!0:"string"==typeof e.peers_timeout?t.peers_timeout=parseInt(e.peers_timeout,10):"number"==typeof e.peers_timeout?t.peers_timeout=e.peers_timeout:"object"===(0,pe.default)(e.peers_timeout)&&(t.peers_timeout=new g.LongBits(e.peers_timeout.low>>>0,e.peers_timeout.high>>>0).toNumber(!0))),null!=e.txs_block_limit&&(t.txs_block_limit=e.txs_block_limit>>>0),null!=e.max_message_len&&(t.max_message_len=e.max_message_len>>>0),null!=e.min_propose_timeout&&(g.Long?(t.min_propose_timeout=g.Long.fromValue(e.min_propose_timeout)).unsigned=!0:"string"==typeof e.min_propose_timeout?t.min_propose_timeout=parseInt(e.min_propose_timeout,10):"number"==typeof e.min_propose_timeout?t.min_propose_timeout=e.min_propose_timeout:"object"===(0,pe.default)(e.min_propose_timeout)&&(t.min_propose_timeout=new g.LongBits(e.min_propose_timeout.low>>>0,e.min_propose_timeout.high>>>0).toNumber(!0))),null!=e.max_propose_timeout&&(g.Long?(t.max_propose_timeout=g.Long.fromValue(e.max_propose_timeout)).unsigned=!0:"string"==typeof e.max_propose_timeout?t.max_propose_timeout=parseInt(e.max_propose_timeout,10):"number"==typeof e.max_propose_timeout?t.max_propose_timeout=e.max_propose_timeout:"object"===(0,pe.default)(e.max_propose_timeout)&&(t.max_propose_timeout=new g.LongBits(e.max_propose_timeout.low>>>0,e.max_propose_timeout.high>>>0).toNumber(!0))),null!=e.propose_timeout_threshold&&(t.propose_timeout_threshold=e.propose_timeout_threshold>>>0),t},C.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.validator_keys=[]),t.defaults){if(g.Long){var n=new g.Long(0,0,!0);r.first_round_timeout=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.first_round_timeout=t.longs===String?"0":0;g.Long?(n=new g.Long(0,0,!0),r.status_timeout=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.status_timeout=t.longs===String?"0":0,g.Long?(n=new g.Long(0,0,!0),r.peers_timeout=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.peers_timeout=t.longs===String?"0":0,r.txs_block_limit=0,r.max_message_len=0,g.Long?(n=new g.Long(0,0,!0),r.min_propose_timeout=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.min_propose_timeout=t.longs===String?"0":0,g.Long?(n=new g.Long(0,0,!0),r.max_propose_timeout=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.max_propose_timeout=t.longs===String?"0":0,r.propose_timeout_threshold=0}if(e.validator_keys&&e.validator_keys.length){r.validator_keys=[];for(var o=0;o<e.validator_keys.length;++o)r.validator_keys[o]=m.exonum.ValidatorKeys.toObject(e.validator_keys[o],t)}return null!=e.first_round_timeout&&e.hasOwnProperty("first_round_timeout")&&("number"==typeof e.first_round_timeout?r.first_round_timeout=t.longs===String?String(e.first_round_timeout):e.first_round_timeout:r.first_round_timeout=t.longs===String?g.Long.prototype.toString.call(e.first_round_timeout):t.longs===Number?new g.LongBits(e.first_round_timeout.low>>>0,e.first_round_timeout.high>>>0).toNumber(!0):e.first_round_timeout),null!=e.status_timeout&&e.hasOwnProperty("status_timeout")&&("number"==typeof e.status_timeout?r.status_timeout=t.longs===String?String(e.status_timeout):e.status_timeout:r.status_timeout=t.longs===String?g.Long.prototype.toString.call(e.status_timeout):t.longs===Number?new g.LongBits(e.status_timeout.low>>>0,e.status_timeout.high>>>0).toNumber(!0):e.status_timeout),null!=e.peers_timeout&&e.hasOwnProperty("peers_timeout")&&("number"==typeof e.peers_timeout?r.peers_timeout=t.longs===String?String(e.peers_timeout):e.peers_timeout:r.peers_timeout=t.longs===String?g.Long.prototype.toString.call(e.peers_timeout):t.longs===Number?new g.LongBits(e.peers_timeout.low>>>0,e.peers_timeout.high>>>0).toNumber(!0):e.peers_timeout),null!=e.txs_block_limit&&e.hasOwnProperty("txs_block_limit")&&(r.txs_block_limit=e.txs_block_limit),null!=e.max_message_len&&e.hasOwnProperty("max_message_len")&&(r.max_message_len=e.max_message_len),null!=e.min_propose_timeout&&e.hasOwnProperty("min_propose_timeout")&&("number"==typeof e.min_propose_timeout?r.min_propose_timeout=t.longs===String?String(e.min_propose_timeout):e.min_propose_timeout:r.min_propose_timeout=t.longs===String?g.Long.prototype.toString.call(e.min_propose_timeout):t.longs===Number?new g.LongBits(e.min_propose_timeout.low>>>0,e.min_propose_timeout.high>>>0).toNumber(!0):e.min_propose_timeout),null!=e.max_propose_timeout&&e.hasOwnProperty("max_propose_timeout")&&("number"==typeof e.max_propose_timeout?r.max_propose_timeout=t.longs===String?String(e.max_propose_timeout):e.max_propose_timeout:r.max_propose_timeout=t.longs===String?g.Long.prototype.toString.call(e.max_propose_timeout):t.longs===Number?new g.LongBits(e.max_propose_timeout.low>>>0,e.max_propose_timeout.high>>>0).toNumber(!0):e.max_propose_timeout),null!=e.propose_timeout_threshold&&e.hasOwnProperty("propose_timeout_threshold")&&(r.propose_timeout_threshold=e.propose_timeout_threshold),r},C.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},C),l.AppliedConfig=(S.prototype.actual_from=g.Long?g.Long.fromBits(0,0,!0):0,S.prototype.prev_hash=null,S.prototype.consensus_config=null,S.create=function(e){return new S(e)},S.encode=function(e,t){return t=t||y.create(),null!=e.actual_from&&e.hasOwnProperty("actual_from")&&t.uint32(8).uint64(e.actual_from),null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&m.exonum.crypto.Hash.encode(e.prev_hash,t.uint32(18).fork()).ldelim(),null!=e.consensus_config&&e.hasOwnProperty("consensus_config")&&m.exonum.Config.encode(e.consensus_config,t.uint32(26).fork()).ldelim(),t},S.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},S.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.AppliedConfig;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.actual_from=e.uint64();break;case 2:n.prev_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 3:n.consensus_config=m.exonum.Config.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},S.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},S.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.actual_from&&e.hasOwnProperty("actual_from")&&!(g.isInteger(e.actual_from)||e.actual_from&&g.isInteger(e.actual_from.low)&&g.isInteger(e.actual_from.high))?"actual_from: integer|Long expected":null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&(t=m.exonum.crypto.Hash.verify(e.prev_hash))?"prev_hash."+t:null!=e.consensus_config&&e.hasOwnProperty("consensus_config")&&(t=m.exonum.Config.verify(e.consensus_config))?"consensus_config."+t:null;var t},S.fromObject=function(e){if(e instanceof m.exonum.AppliedConfig)return e;var t=new m.exonum.AppliedConfig;if(null!=e.actual_from&&(g.Long?(t.actual_from=g.Long.fromValue(e.actual_from)).unsigned=!0:"string"==typeof e.actual_from?t.actual_from=parseInt(e.actual_from,10):"number"==typeof e.actual_from?t.actual_from=e.actual_from:"object"===(0,pe.default)(e.actual_from)&&(t.actual_from=new g.LongBits(e.actual_from.low>>>0,e.actual_from.high>>>0).toNumber(!0))),null!=e.prev_hash){if("object"!==(0,pe.default)(e.prev_hash))throw TypeError(".exonum.AppliedConfig.prev_hash: object expected");t.prev_hash=m.exonum.crypto.Hash.fromObject(e.prev_hash)}if(null!=e.consensus_config){if("object"!==(0,pe.default)(e.consensus_config))throw TypeError(".exonum.AppliedConfig.consensus_config: object expected");t.consensus_config=m.exonum.Config.fromObject(e.consensus_config)}return t},S.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(g.Long){var n=new g.Long(0,0,!0);r.actual_from=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.actual_from=t.longs===String?"0":0;r.prev_hash=null,r.consensus_config=null}return null!=e.actual_from&&e.hasOwnProperty("actual_from")&&("number"==typeof e.actual_from?r.actual_from=t.longs===String?String(e.actual_from):e.actual_from:r.actual_from=t.longs===String?g.Long.prototype.toString.call(e.actual_from):t.longs===Number?new g.LongBits(e.actual_from.low>>>0,e.actual_from.high>>>0).toNumber(!0):e.actual_from),null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&(r.prev_hash=m.exonum.crypto.Hash.toObject(e.prev_hash,t)),null!=e.consensus_config&&e.hasOwnProperty("consensus_config")&&(r.consensus_config=m.exonum.Config.toObject(e.consensus_config,t)),r},S.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},S),l.consensus=((o={}).CoreMessage=(k.prototype.any_tx=null,k.prototype.precommit=null,Object.defineProperty(k.prototype,"kind",{get:g.oneOfGetter(r=["any_tx","precommit"]),set:g.oneOfSetter(r)}),k.create=function(e){return new k(e)},k.encode=function(e,t){return t=t||y.create(),null!=e.any_tx&&e.hasOwnProperty("any_tx")&&m.exonum.runtime.AnyTx.encode(e.any_tx,t.uint32(10).fork()).ldelim(),null!=e.precommit&&e.hasOwnProperty("precommit")&&m.exonum.consensus.Precommit.encode(e.precommit,t.uint32(18).fork()).ldelim(),t},k.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},k.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.CoreMessage;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.any_tx=m.exonum.runtime.AnyTx.decode(e,e.uint32());break;case 2:n.precommit=m.exonum.consensus.Precommit.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},k.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},k.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";var t={};if(null!=e.any_tx&&e.hasOwnProperty("any_tx")&&(t.kind=1,r=m.exonum.runtime.AnyTx.verify(e.any_tx)))return"any_tx."+r;if(null!=e.precommit&&e.hasOwnProperty("precommit")){if(1===t.kind)return"kind: multiple values";var r;if(t.kind=1,r=m.exonum.consensus.Precommit.verify(e.precommit))return"precommit."+r}return null},k.fromObject=function(e){if(e instanceof m.exonum.consensus.CoreMessage)return e;var t=new m.exonum.consensus.CoreMessage;if(null!=e.any_tx){if("object"!==(0,pe.default)(e.any_tx))throw TypeError(".exonum.consensus.CoreMessage.any_tx: object expected");t.any_tx=m.exonum.runtime.AnyTx.fromObject(e.any_tx)}if(null!=e.precommit){if("object"!==(0,pe.default)(e.precommit))throw TypeError(".exonum.consensus.CoreMessage.precommit: object expected");t.precommit=m.exonum.consensus.Precommit.fromObject(e.precommit)}return t},k.toObject=function(e,t){t=t||{};var r={};return null!=e.any_tx&&e.hasOwnProperty("any_tx")&&(r.any_tx=m.exonum.runtime.AnyTx.toObject(e.any_tx,t),t.oneofs&&(r.kind="any_tx")),null!=e.precommit&&e.hasOwnProperty("precommit")&&(r.precommit=m.exonum.consensus.Precommit.toObject(e.precommit,t),t.oneofs&&(r.kind="precommit")),r},k.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},k),o.SignedMessage=(E.prototype.chain_id_bytes=g.newBuffer([]),E.prototype.payload=g.newBuffer([]),E.prototype.author=null,E.prototype.signature=null,E.create=function(e){return new E(e)},E.encode=function(e,t){return t=t||y.create(),null!=e.chain_id_bytes&&e.hasOwnProperty("chain_id_bytes")&&t.uint32(10).bytes(e.chain_id_bytes),null!=e.payload&&e.hasOwnProperty("payload")&&t.uint32(18).bytes(e.payload),null!=e.author&&e.hasOwnProperty("author")&&m.exonum.crypto.PublicKey.encode(e.author,t.uint32(26).fork()).ldelim(),null!=e.signature&&e.hasOwnProperty("signature")&&m.exonum.crypto.Signature.encode(e.signature,t.uint32(34).fork()).ldelim(),t},E.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},E.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.SignedMessage;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.chain_id_bytes=e.bytes();break;case 2:n.payload=e.bytes();break;case 3:n.author=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 4:n.signature=m.exonum.crypto.Signature.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},E.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},E.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.chain_id_bytes&&e.hasOwnProperty("chain_id_bytes")&&!(e.chain_id_bytes&&"number"==typeof e.chain_id_bytes.length||g.isString(e.chain_id_bytes))?"chain_id_bytes: buffer expected":null!=e.payload&&e.hasOwnProperty("payload")&&!(e.payload&&"number"==typeof e.payload.length||g.isString(e.payload))?"payload: buffer expected":null!=e.author&&e.hasOwnProperty("author")&&(t=m.exonum.crypto.PublicKey.verify(e.author))?"author."+t:null!=e.signature&&e.hasOwnProperty("signature")&&(t=m.exonum.crypto.Signature.verify(e.signature))?"signature."+t:null;var t},E.fromObject=function(e){if(e instanceof m.exonum.consensus.SignedMessage)return e;var t=new m.exonum.consensus.SignedMessage;if(null!=e.chain_id_bytes&&("string"==typeof e.chain_id_bytes?g.base64.decode(e.chain_id_bytes,t.chain_id_bytes=g.newBuffer(g.base64.length(e.chain_id_bytes)),0):e.chain_id_bytes.length&&(t.chain_id_bytes=e.chain_id_bytes)),null!=e.payload&&("string"==typeof e.payload?g.base64.decode(e.payload,t.payload=g.newBuffer(g.base64.length(e.payload)),0):e.payload.length&&(t.payload=e.payload)),null!=e.author){if("object"!==(0,pe.default)(e.author))throw TypeError(".exonum.consensus.SignedMessage.author: object expected");t.author=m.exonum.crypto.PublicKey.fromObject(e.author)}if(null!=e.signature){if("object"!==(0,pe.default)(e.signature))throw TypeError(".exonum.consensus.SignedMessage.signature: object expected");t.signature=m.exonum.crypto.Signature.fromObject(e.signature)}return t},E.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(t.bytes===String?r.chain_id_bytes="":(r.chain_id_bytes=[],t.bytes!==Array&&(r.chain_id_bytes=g.newBuffer(r.chain_id_bytes))),t.bytes===String?r.payload="":(r.payload=[],t.bytes!==Array&&(r.payload=g.newBuffer(r.payload))),r.author=null,r.signature=null),null!=e.chain_id_bytes&&e.hasOwnProperty("chain_id_bytes")&&(r.chain_id_bytes=t.bytes===String?g.base64.encode(e.chain_id_bytes,0,e.chain_id_bytes.length):t.bytes===Array?Array.prototype.slice.call(e.chain_id_bytes):e.chain_id_bytes),null!=e.payload&&e.hasOwnProperty("payload")&&(r.payload=t.bytes===String?g.base64.encode(e.payload,0,e.payload.length):t.bytes===Array?Array.prototype.slice.call(e.payload):e.payload),null!=e.author&&e.hasOwnProperty("author")&&(r.author=m.exonum.crypto.PublicKey.toObject(e.author,t)),null!=e.signature&&e.hasOwnProperty("signature")&&(r.signature=m.exonum.crypto.Signature.toObject(e.signature,t)),r},E.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},E),o.Connect=(P.prototype.host="",P.prototype.time=null,P.prototype.user_agent="",P.create=function(e){return new P(e)},P.encode=function(e,t){return t=t||y.create(),null!=e.host&&e.hasOwnProperty("host")&&t.uint32(10).string(e.host),null!=e.time&&e.hasOwnProperty("time")&&m.google.protobuf.Timestamp.encode(e.time,t.uint32(18).fork()).ldelim(),null!=e.user_agent&&e.hasOwnProperty("user_agent")&&t.uint32(26).string(e.user_agent),t},P.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},P.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.Connect;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.host=e.string();break;case 2:n.time=m.google.protobuf.Timestamp.decode(e,e.uint32());break;case 3:n.user_agent=e.string();break;default:e.skipType(7&o)}}return n},P.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},P.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.host&&e.hasOwnProperty("host")&&!g.isString(e.host))return"host: string expected";if(null!=e.time&&e.hasOwnProperty("time")){var t=m.google.protobuf.Timestamp.verify(e.time);if(t)return"time."+t}return null!=e.user_agent&&e.hasOwnProperty("user_agent")&&!g.isString(e.user_agent)?"user_agent: string expected":null},P.fromObject=function(e){if(e instanceof m.exonum.consensus.Connect)return e;var t=new m.exonum.consensus.Connect;if(null!=e.host&&(t.host=String(e.host)),null!=e.time){if("object"!==(0,pe.default)(e.time))throw TypeError(".exonum.consensus.Connect.time: object expected");t.time=m.google.protobuf.Timestamp.fromObject(e.time)}return null!=e.user_agent&&(t.user_agent=String(e.user_agent)),t},P.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.host="",r.time=null,r.user_agent=""),null!=e.host&&e.hasOwnProperty("host")&&(r.host=e.host),null!=e.time&&e.hasOwnProperty("time")&&(r.time=m.google.protobuf.Timestamp.toObject(e.time,t)),null!=e.user_agent&&e.hasOwnProperty("user_agent")&&(r.user_agent=e.user_agent),r},P.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},P),o.Status=(O.prototype.height=g.Long?g.Long.fromBits(0,0,!0):0,O.prototype.last_hash=null,O.prototype.pool_size=g.Long?g.Long.fromBits(0,0,!0):0,O.create=function(e){return new O(e)},O.encode=function(e,t){return t=t||y.create(),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(8).uint64(e.height),null!=e.last_hash&&e.hasOwnProperty("last_hash")&&m.exonum.crypto.Hash.encode(e.last_hash,t.uint32(18).fork()).ldelim(),null!=e.pool_size&&e.hasOwnProperty("pool_size")&&t.uint32(24).uint64(e.pool_size),t},O.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},O.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.Status;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.height=e.uint64();break;case 2:n.last_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 3:n.pool_size=e.uint64();break;default:e.skipType(7&o)}}return n},O.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},O.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.height&&e.hasOwnProperty("height")&&!(g.isInteger(e.height)||e.height&&g.isInteger(e.height.low)&&g.isInteger(e.height.high)))return"height: integer|Long expected";if(null!=e.last_hash&&e.hasOwnProperty("last_hash")){var t=m.exonum.crypto.Hash.verify(e.last_hash);if(t)return"last_hash."+t}return null!=e.pool_size&&e.hasOwnProperty("pool_size")&&!(g.isInteger(e.pool_size)||e.pool_size&&g.isInteger(e.pool_size.low)&&g.isInteger(e.pool_size.high))?"pool_size: integer|Long expected":null},O.fromObject=function(e){if(e instanceof m.exonum.consensus.Status)return e;var t=new m.exonum.consensus.Status;if(null!=e.height&&(g.Long?(t.height=g.Long.fromValue(e.height)).unsigned=!0:"string"==typeof e.height?t.height=parseInt(e.height,10):"number"==typeof e.height?t.height=e.height:"object"===(0,pe.default)(e.height)&&(t.height=new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0))),null!=e.last_hash){if("object"!==(0,pe.default)(e.last_hash))throw TypeError(".exonum.consensus.Status.last_hash: object expected");t.last_hash=m.exonum.crypto.Hash.fromObject(e.last_hash)}return null!=e.pool_size&&(g.Long?(t.pool_size=g.Long.fromValue(e.pool_size)).unsigned=!0:"string"==typeof e.pool_size?t.pool_size=parseInt(e.pool_size,10):"number"==typeof e.pool_size?t.pool_size=e.pool_size:"object"===(0,pe.default)(e.pool_size)&&(t.pool_size=new g.LongBits(e.pool_size.low>>>0,e.pool_size.high>>>0).toNumber(!0))),t},O.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(g.Long){var n=new g.Long(0,0,!0);r.height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.height=t.longs===String?"0":0;r.last_hash=null,g.Long?(n=new g.Long(0,0,!0),r.pool_size=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.pool_size=t.longs===String?"0":0}return null!=e.height&&e.hasOwnProperty("height")&&("number"==typeof e.height?r.height=t.longs===String?String(e.height):e.height:r.height=t.longs===String?g.Long.prototype.toString.call(e.height):t.longs===Number?new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0):e.height),null!=e.last_hash&&e.hasOwnProperty("last_hash")&&(r.last_hash=m.exonum.crypto.Hash.toObject(e.last_hash,t)),null!=e.pool_size&&e.hasOwnProperty("pool_size")&&("number"==typeof e.pool_size?r.pool_size=t.longs===String?String(e.pool_size):e.pool_size:r.pool_size=t.longs===String?g.Long.prototype.toString.call(e.pool_size):t.longs===Number?new g.LongBits(e.pool_size.low>>>0,e.pool_size.high>>>0).toNumber(!0):e.pool_size),r},O.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},O),o.Propose=(B.prototype.validator=0,B.prototype.height=g.Long?g.Long.fromBits(0,0,!0):0,B.prototype.round=0,B.prototype.prev_hash=null,B.prototype.transactions=g.emptyArray,B.create=function(e){return new B(e)},B.encode=function(e,t){if(t=t||y.create(),null!=e.validator&&e.hasOwnProperty("validator")&&t.uint32(8).uint32(e.validator),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint64(e.height),null!=e.round&&e.hasOwnProperty("round")&&t.uint32(24).uint32(e.round),null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&m.exonum.crypto.Hash.encode(e.prev_hash,t.uint32(34).fork()).ldelim(),null!=e.transactions&&e.transactions.length)for(var r=0;r<e.transactions.length;++r)m.exonum.crypto.Hash.encode(e.transactions[r],t.uint32(42).fork()).ldelim();return t},B.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},B.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.Propose;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.validator=e.uint32();break;case 2:n.height=e.uint64();break;case 3:n.round=e.uint32();break;case 4:n.prev_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 5:n.transactions&&n.transactions.length||(n.transactions=[]),n.transactions.push(m.exonum.crypto.Hash.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},B.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},B.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.validator&&e.hasOwnProperty("validator")&&!g.isInteger(e.validator))return"validator: integer expected";if(null!=e.height&&e.hasOwnProperty("height")&&!(g.isInteger(e.height)||e.height&&g.isInteger(e.height.low)&&g.isInteger(e.height.high)))return"height: integer|Long expected";if(null!=e.round&&e.hasOwnProperty("round")&&!g.isInteger(e.round))return"round: integer expected";if(null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&(r=m.exonum.crypto.Hash.verify(e.prev_hash)))return"prev_hash."+r;if(null!=e.transactions&&e.hasOwnProperty("transactions")){if(!Array.isArray(e.transactions))return"transactions: array expected";for(var t=0;t<e.transactions.length;++t){var r;if(r=m.exonum.crypto.Hash.verify(e.transactions[t]))return"transactions."+r}}return null},B.fromObject=function(e){if(e instanceof m.exonum.consensus.Propose)return e;var t=new m.exonum.consensus.Propose;if(null!=e.validator&&(t.validator=e.validator>>>0),null!=e.height&&(g.Long?(t.height=g.Long.fromValue(e.height)).unsigned=!0:"string"==typeof e.height?t.height=parseInt(e.height,10):"number"==typeof e.height?t.height=e.height:"object"===(0,pe.default)(e.height)&&(t.height=new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0))),null!=e.round&&(t.round=e.round>>>0),null!=e.prev_hash){if("object"!==(0,pe.default)(e.prev_hash))throw TypeError(".exonum.consensus.Propose.prev_hash: object expected");t.prev_hash=m.exonum.crypto.Hash.fromObject(e.prev_hash)}if(e.transactions){if(!Array.isArray(e.transactions))throw TypeError(".exonum.consensus.Propose.transactions: array expected");t.transactions=[];for(var r=0;r<e.transactions.length;++r){if("object"!==(0,pe.default)(e.transactions[r]))throw TypeError(".exonum.consensus.Propose.transactions: object expected");t.transactions[r]=m.exonum.crypto.Hash.fromObject(e.transactions[r])}}return t},B.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.transactions=[]),t.defaults){if(r.validator=0,g.Long){var n=new g.Long(0,0,!0);r.height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.height=t.longs===String?"0":0;r.round=0,r.prev_hash=null}if(null!=e.validator&&e.hasOwnProperty("validator")&&(r.validator=e.validator),null!=e.height&&e.hasOwnProperty("height")&&("number"==typeof e.height?r.height=t.longs===String?String(e.height):e.height:r.height=t.longs===String?g.Long.prototype.toString.call(e.height):t.longs===Number?new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0):e.height),null!=e.round&&e.hasOwnProperty("round")&&(r.round=e.round),null!=e.prev_hash&&e.hasOwnProperty("prev_hash")&&(r.prev_hash=m.exonum.crypto.Hash.toObject(e.prev_hash,t)),e.transactions&&e.transactions.length){r.transactions=[];for(var o=0;o<e.transactions.length;++o)r.transactions[o]=m.exonum.crypto.Hash.toObject(e.transactions[o],t)}return r},B.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},B),o.Prevote=(F.prototype.validator=0,F.prototype.height=g.Long?g.Long.fromBits(0,0,!0):0,F.prototype.round=0,F.prototype.propose_hash=null,F.prototype.locked_round=0,F.create=function(e){return new F(e)},F.encode=function(e,t){return t=t||y.create(),null!=e.validator&&e.hasOwnProperty("validator")&&t.uint32(8).uint32(e.validator),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint64(e.height),null!=e.round&&e.hasOwnProperty("round")&&t.uint32(24).uint32(e.round),null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&m.exonum.crypto.Hash.encode(e.propose_hash,t.uint32(34).fork()).ldelim(),null!=e.locked_round&&e.hasOwnProperty("locked_round")&&t.uint32(40).uint32(e.locked_round),t},F.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},F.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.Prevote;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.validator=e.uint32();break;case 2:n.height=e.uint64();break;case 3:n.round=e.uint32();break;case 4:n.propose_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 5:n.locked_round=e.uint32();break;default:e.skipType(7&o)}}return n},F.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},F.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.validator&&e.hasOwnProperty("validator")&&!g.isInteger(e.validator))return"validator: integer expected";if(null!=e.height&&e.hasOwnProperty("height")&&!(g.isInteger(e.height)||e.height&&g.isInteger(e.height.low)&&g.isInteger(e.height.high)))return"height: integer|Long expected";if(null!=e.round&&e.hasOwnProperty("round")&&!g.isInteger(e.round))return"round: integer expected";if(null!=e.propose_hash&&e.hasOwnProperty("propose_hash")){var t=m.exonum.crypto.Hash.verify(e.propose_hash);if(t)return"propose_hash."+t}return null!=e.locked_round&&e.hasOwnProperty("locked_round")&&!g.isInteger(e.locked_round)?"locked_round: integer expected":null},F.fromObject=function(e){if(e instanceof m.exonum.consensus.Prevote)return e;var t=new m.exonum.consensus.Prevote;if(null!=e.validator&&(t.validator=e.validator>>>0),null!=e.height&&(g.Long?(t.height=g.Long.fromValue(e.height)).unsigned=!0:"string"==typeof e.height?t.height=parseInt(e.height,10):"number"==typeof e.height?t.height=e.height:"object"===(0,pe.default)(e.height)&&(t.height=new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0))),null!=e.round&&(t.round=e.round>>>0),null!=e.propose_hash){if("object"!==(0,pe.default)(e.propose_hash))throw TypeError(".exonum.consensus.Prevote.propose_hash: object expected");t.propose_hash=m.exonum.crypto.Hash.fromObject(e.propose_hash)}return null!=e.locked_round&&(t.locked_round=e.locked_round>>>0),t},F.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(r.validator=0,g.Long){var n=new g.Long(0,0,!0);r.height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.height=t.longs===String?"0":0;r.round=0,r.propose_hash=null,r.locked_round=0}return null!=e.validator&&e.hasOwnProperty("validator")&&(r.validator=e.validator),null!=e.height&&e.hasOwnProperty("height")&&("number"==typeof e.height?r.height=t.longs===String?String(e.height):e.height:r.height=t.longs===String?g.Long.prototype.toString.call(e.height):t.longs===Number?new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0):e.height),null!=e.round&&e.hasOwnProperty("round")&&(r.round=e.round),null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&(r.propose_hash=m.exonum.crypto.Hash.toObject(e.propose_hash,t)),null!=e.locked_round&&e.hasOwnProperty("locked_round")&&(r.locked_round=e.locked_round),r},F.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},F),o.Precommit=(j.prototype.validator=0,j.prototype.height=g.Long?g.Long.fromBits(0,0,!0):0,j.prototype.round=0,j.prototype.propose_hash=null,j.prototype.block_hash=null,j.prototype.time=null,j.create=function(e){return new j(e)},j.encode=function(e,t){return t=t||y.create(),null!=e.validator&&e.hasOwnProperty("validator")&&t.uint32(8).uint32(e.validator),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint64(e.height),null!=e.round&&e.hasOwnProperty("round")&&t.uint32(24).uint32(e.round),null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&m.exonum.crypto.Hash.encode(e.propose_hash,t.uint32(34).fork()).ldelim(),null!=e.block_hash&&e.hasOwnProperty("block_hash")&&m.exonum.crypto.Hash.encode(e.block_hash,t.uint32(42).fork()).ldelim(),null!=e.time&&e.hasOwnProperty("time")&&m.google.protobuf.Timestamp.encode(e.time,t.uint32(50).fork()).ldelim(),t},j.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},j.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.Precommit;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.validator=e.uint32();break;case 2:n.height=e.uint64();break;case 3:n.round=e.uint32();break;case 4:n.propose_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 5:n.block_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 6:n.time=m.google.protobuf.Timestamp.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},j.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},j.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.validator&&e.hasOwnProperty("validator")&&!g.isInteger(e.validator)?"validator: integer expected":null!=e.height&&e.hasOwnProperty("height")&&!(g.isInteger(e.height)||e.height&&g.isInteger(e.height.low)&&g.isInteger(e.height.high))?"height: integer|Long expected":null!=e.round&&e.hasOwnProperty("round")&&!g.isInteger(e.round)?"round: integer expected":null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&(t=m.exonum.crypto.Hash.verify(e.propose_hash))?"propose_hash."+t:null!=e.block_hash&&e.hasOwnProperty("block_hash")&&(t=m.exonum.crypto.Hash.verify(e.block_hash))?"block_hash."+t:null!=e.time&&e.hasOwnProperty("time")&&(t=m.google.protobuf.Timestamp.verify(e.time))?"time."+t:null;var t},j.fromObject=function(e){if(e instanceof m.exonum.consensus.Precommit)return e;var t=new m.exonum.consensus.Precommit;if(null!=e.validator&&(t.validator=e.validator>>>0),null!=e.height&&(g.Long?(t.height=g.Long.fromValue(e.height)).unsigned=!0:"string"==typeof e.height?t.height=parseInt(e.height,10):"number"==typeof e.height?t.height=e.height:"object"===(0,pe.default)(e.height)&&(t.height=new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0))),null!=e.round&&(t.round=e.round>>>0),null!=e.propose_hash){if("object"!==(0,pe.default)(e.propose_hash))throw TypeError(".exonum.consensus.Precommit.propose_hash: object expected");t.propose_hash=m.exonum.crypto.Hash.fromObject(e.propose_hash)}if(null!=e.block_hash){if("object"!==(0,pe.default)(e.block_hash))throw TypeError(".exonum.consensus.Precommit.block_hash: object expected");t.block_hash=m.exonum.crypto.Hash.fromObject(e.block_hash)}if(null!=e.time){if("object"!==(0,pe.default)(e.time))throw TypeError(".exonum.consensus.Precommit.time: object expected");t.time=m.google.protobuf.Timestamp.fromObject(e.time)}return t},j.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(r.validator=0,g.Long){var n=new g.Long(0,0,!0);r.height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.height=t.longs===String?"0":0;r.round=0,r.propose_hash=null,r.block_hash=null,r.time=null}return null!=e.validator&&e.hasOwnProperty("validator")&&(r.validator=e.validator),null!=e.height&&e.hasOwnProperty("height")&&("number"==typeof e.height?r.height=t.longs===String?String(e.height):e.height:r.height=t.longs===String?g.Long.prototype.toString.call(e.height):t.longs===Number?new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0):e.height),null!=e.round&&e.hasOwnProperty("round")&&(r.round=e.round),null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&(r.propose_hash=m.exonum.crypto.Hash.toObject(e.propose_hash,t)),null!=e.block_hash&&e.hasOwnProperty("block_hash")&&(r.block_hash=m.exonum.crypto.Hash.toObject(e.block_hash,t)),null!=e.time&&e.hasOwnProperty("time")&&(r.time=m.google.protobuf.Timestamp.toObject(e.time,t)),r},j.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},j),o.BlockResponse=(T.prototype.to=null,T.prototype.block=null,T.prototype.precommits=g.emptyArray,T.prototype.transactions=g.emptyArray,T.create=function(e){return new T(e)},T.encode=function(e,t){if(t=t||y.create(),null!=e.to&&e.hasOwnProperty("to")&&m.exonum.crypto.PublicKey.encode(e.to,t.uint32(10).fork()).ldelim(),null!=e.block&&e.hasOwnProperty("block")&&m.exonum.Block.encode(e.block,t.uint32(18).fork()).ldelim(),null!=e.precommits&&e.precommits.length)for(var r=0;r<e.precommits.length;++r)t.uint32(26).bytes(e.precommits[r]);if(null!=e.transactions&&e.transactions.length)for(r=0;r<e.transactions.length;++r)m.exonum.crypto.Hash.encode(e.transactions[r],t.uint32(34).fork()).ldelim();return t},T.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},T.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.BlockResponse;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.to=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 2:n.block=m.exonum.Block.decode(e,e.uint32());break;case 3:n.precommits&&n.precommits.length||(n.precommits=[]),n.precommits.push(e.bytes());break;case 4:n.transactions&&n.transactions.length||(n.transactions=[]),n.transactions.push(m.exonum.crypto.Hash.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},T.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},T.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.to&&e.hasOwnProperty("to")&&(r=m.exonum.crypto.PublicKey.verify(e.to)))return"to."+r;if(null!=e.block&&e.hasOwnProperty("block")&&(r=m.exonum.Block.verify(e.block)))return"block."+r;if(null!=e.precommits&&e.hasOwnProperty("precommits")){if(!Array.isArray(e.precommits))return"precommits: array expected";for(var t=0;t<e.precommits.length;++t)if(!(e.precommits[t]&&"number"==typeof e.precommits[t].length||g.isString(e.precommits[t])))return"precommits: buffer[] expected"}if(null!=e.transactions&&e.hasOwnProperty("transactions")){if(!Array.isArray(e.transactions))return"transactions: array expected";for(t=0;t<e.transactions.length;++t){var r;if(r=m.exonum.crypto.Hash.verify(e.transactions[t]))return"transactions."+r}}return null},T.fromObject=function(e){if(e instanceof m.exonum.consensus.BlockResponse)return e;var t=new m.exonum.consensus.BlockResponse;if(null!=e.to){if("object"!==(0,pe.default)(e.to))throw TypeError(".exonum.consensus.BlockResponse.to: object expected");t.to=m.exonum.crypto.PublicKey.fromObject(e.to)}if(null!=e.block){if("object"!==(0,pe.default)(e.block))throw TypeError(".exonum.consensus.BlockResponse.block: object expected");t.block=m.exonum.Block.fromObject(e.block)}if(e.precommits){if(!Array.isArray(e.precommits))throw TypeError(".exonum.consensus.BlockResponse.precommits: array expected");t.precommits=[];for(var r=0;r<e.precommits.length;++r)"string"==typeof e.precommits[r]?g.base64.decode(e.precommits[r],t.precommits[r]=g.newBuffer(g.base64.length(e.precommits[r])),0):e.precommits[r].length&&(t.precommits[r]=e.precommits[r])}if(e.transactions){if(!Array.isArray(e.transactions))throw TypeError(".exonum.consensus.BlockResponse.transactions: array expected");for(t.transactions=[],r=0;r<e.transactions.length;++r){if("object"!==(0,pe.default)(e.transactions[r]))throw TypeError(".exonum.consensus.BlockResponse.transactions: object expected");t.transactions[r]=m.exonum.crypto.Hash.fromObject(e.transactions[r])}}return t},T.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.precommits=[],r.transactions=[]),t.defaults&&(r.to=null,r.block=null),null!=e.to&&e.hasOwnProperty("to")&&(r.to=m.exonum.crypto.PublicKey.toObject(e.to,t)),null!=e.block&&e.hasOwnProperty("block")&&(r.block=m.exonum.Block.toObject(e.block,t)),e.precommits&&e.precommits.length){r.precommits=[];for(var n=0;n<e.precommits.length;++n)r.precommits[n]=t.bytes===String?g.base64.encode(e.precommits[n],0,e.precommits[n].length):t.bytes===Array?Array.prototype.slice.call(e.precommits[n]):e.precommits[n]}if(e.transactions&&e.transactions.length)for(r.transactions=[],n=0;n<e.transactions.length;++n)r.transactions[n]=m.exonum.crypto.Hash.toObject(e.transactions[n],t);return r},T.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},T),o.TransactionsResponse=(D.prototype.to=null,D.prototype.transactions=g.emptyArray,D.create=function(e){return new D(e)},D.encode=function(e,t){if(t=t||y.create(),null!=e.to&&e.hasOwnProperty("to")&&m.exonum.crypto.PublicKey.encode(e.to,t.uint32(10).fork()).ldelim(),null!=e.transactions&&e.transactions.length)for(var r=0;r<e.transactions.length;++r)t.uint32(18).bytes(e.transactions[r]);return t},D.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},D.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.TransactionsResponse;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.to=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 2:n.transactions&&n.transactions.length||(n.transactions=[]),n.transactions.push(e.bytes());break;default:e.skipType(7&o)}}return n},D.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},D.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.to&&e.hasOwnProperty("to")){var t=m.exonum.crypto.PublicKey.verify(e.to);if(t)return"to."+t}if(null!=e.transactions&&e.hasOwnProperty("transactions")){if(!Array.isArray(e.transactions))return"transactions: array expected";for(var r=0;r<e.transactions.length;++r)if(!(e.transactions[r]&&"number"==typeof e.transactions[r].length||g.isString(e.transactions[r])))return"transactions: buffer[] expected"}return null},D.fromObject=function(e){if(e instanceof m.exonum.consensus.TransactionsResponse)return e;var t=new m.exonum.consensus.TransactionsResponse;if(null!=e.to){if("object"!==(0,pe.default)(e.to))throw TypeError(".exonum.consensus.TransactionsResponse.to: object expected");t.to=m.exonum.crypto.PublicKey.fromObject(e.to)}if(e.transactions){if(!Array.isArray(e.transactions))throw TypeError(".exonum.consensus.TransactionsResponse.transactions: array expected");t.transactions=[];for(var r=0;r<e.transactions.length;++r)"string"==typeof e.transactions[r]?g.base64.decode(e.transactions[r],t.transactions[r]=g.newBuffer(g.base64.length(e.transactions[r])),0):e.transactions[r].length&&(t.transactions[r]=e.transactions[r])}return t},D.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.transactions=[]),t.defaults&&(r.to=null),null!=e.to&&e.hasOwnProperty("to")&&(r.to=m.exonum.crypto.PublicKey.toObject(e.to,t)),e.transactions&&e.transactions.length){r.transactions=[];for(var n=0;n<e.transactions.length;++n)r.transactions[n]=t.bytes===String?g.base64.encode(e.transactions[n],0,e.transactions[n].length):t.bytes===Array?Array.prototype.slice.call(e.transactions[n]):e.transactions[n]}return r},D.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},D),o.ProposeRequest=(K.prototype.to=null,K.prototype.height=g.Long?g.Long.fromBits(0,0,!0):0,K.prototype.propose_hash=null,K.create=function(e){return new K(e)},K.encode=function(e,t){return t=t||y.create(),null!=e.to&&e.hasOwnProperty("to")&&m.exonum.crypto.PublicKey.encode(e.to,t.uint32(10).fork()).ldelim(),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint64(e.height),null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&m.exonum.crypto.Hash.encode(e.propose_hash,t.uint32(26).fork()).ldelim(),t},K.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},K.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.ProposeRequest;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.to=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 2:n.height=e.uint64();break;case 3:n.propose_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},K.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},K.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.to&&e.hasOwnProperty("to")&&(t=m.exonum.crypto.PublicKey.verify(e.to))?"to."+t:null!=e.height&&e.hasOwnProperty("height")&&!(g.isInteger(e.height)||e.height&&g.isInteger(e.height.low)&&g.isInteger(e.height.high))?"height: integer|Long expected":null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&(t=m.exonum.crypto.Hash.verify(e.propose_hash))?"propose_hash."+t:null;var t},K.fromObject=function(e){if(e instanceof m.exonum.consensus.ProposeRequest)return e;var t=new m.exonum.consensus.ProposeRequest;if(null!=e.to){if("object"!==(0,pe.default)(e.to))throw TypeError(".exonum.consensus.ProposeRequest.to: object expected");t.to=m.exonum.crypto.PublicKey.fromObject(e.to)}if(null!=e.height&&(g.Long?(t.height=g.Long.fromValue(e.height)).unsigned=!0:"string"==typeof e.height?t.height=parseInt(e.height,10):"number"==typeof e.height?t.height=e.height:"object"===(0,pe.default)(e.height)&&(t.height=new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0))),null!=e.propose_hash){if("object"!==(0,pe.default)(e.propose_hash))throw TypeError(".exonum.consensus.ProposeRequest.propose_hash: object expected");t.propose_hash=m.exonum.crypto.Hash.fromObject(e.propose_hash)}return t},K.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(r.to=null,g.Long){var n=new g.Long(0,0,!0);r.height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.height=t.longs===String?"0":0;r.propose_hash=null}return null!=e.to&&e.hasOwnProperty("to")&&(r.to=m.exonum.crypto.PublicKey.toObject(e.to,t)),null!=e.height&&e.hasOwnProperty("height")&&("number"==typeof e.height?r.height=t.longs===String?String(e.height):e.height:r.height=t.longs===String?g.Long.prototype.toString.call(e.height):t.longs===Number?new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0):e.height),null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&(r.propose_hash=m.exonum.crypto.Hash.toObject(e.propose_hash,t)),r},K.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},K),o.TransactionsRequest=(I.prototype.to=null,I.prototype.txs=g.emptyArray,I.create=function(e){return new I(e)},I.encode=function(e,t){if(t=t||y.create(),null!=e.to&&e.hasOwnProperty("to")&&m.exonum.crypto.PublicKey.encode(e.to,t.uint32(10).fork()).ldelim(),null!=e.txs&&e.txs.length)for(var r=0;r<e.txs.length;++r)m.exonum.crypto.Hash.encode(e.txs[r],t.uint32(18).fork()).ldelim();return t},I.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},I.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.TransactionsRequest;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.to=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 2:n.txs&&n.txs.length||(n.txs=[]),n.txs.push(m.exonum.crypto.Hash.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},I.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},I.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.to&&e.hasOwnProperty("to")&&(r=m.exonum.crypto.PublicKey.verify(e.to)))return"to."+r;if(null!=e.txs&&e.hasOwnProperty("txs")){if(!Array.isArray(e.txs))return"txs: array expected";for(var t=0;t<e.txs.length;++t){var r;if(r=m.exonum.crypto.Hash.verify(e.txs[t]))return"txs."+r}}return null},I.fromObject=function(e){if(e instanceof m.exonum.consensus.TransactionsRequest)return e;var t=new m.exonum.consensus.TransactionsRequest;if(null!=e.to){if("object"!==(0,pe.default)(e.to))throw TypeError(".exonum.consensus.TransactionsRequest.to: object expected");t.to=m.exonum.crypto.PublicKey.fromObject(e.to)}if(e.txs){if(!Array.isArray(e.txs))throw TypeError(".exonum.consensus.TransactionsRequest.txs: array expected");t.txs=[];for(var r=0;r<e.txs.length;++r){if("object"!==(0,pe.default)(e.txs[r]))throw TypeError(".exonum.consensus.TransactionsRequest.txs: object expected");t.txs[r]=m.exonum.crypto.Hash.fromObject(e.txs[r])}}return t},I.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.txs=[]),t.defaults&&(r.to=null),null!=e.to&&e.hasOwnProperty("to")&&(r.to=m.exonum.crypto.PublicKey.toObject(e.to,t)),e.txs&&e.txs.length){r.txs=[];for(var n=0;n<e.txs.length;++n)r.txs[n]=m.exonum.crypto.Hash.toObject(e.txs[n],t)}return r},I.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},I),o.PrevotesRequest=(R.prototype.to=null,R.prototype.height=g.Long?g.Long.fromBits(0,0,!0):0,R.prototype.round=0,R.prototype.propose_hash=null,R.prototype.validators=null,R.create=function(e){return new R(e)},R.encode=function(e,t){return t=t||y.create(),null!=e.to&&e.hasOwnProperty("to")&&m.exonum.crypto.PublicKey.encode(e.to,t.uint32(10).fork()).ldelim(),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint64(e.height),null!=e.round&&e.hasOwnProperty("round")&&t.uint32(24).uint32(e.round),null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&m.exonum.crypto.Hash.encode(e.propose_hash,t.uint32(34).fork()).ldelim(),null!=e.validators&&e.hasOwnProperty("validators")&&m.exonum.common.BitVec.encode(e.validators,t.uint32(42).fork()).ldelim(),t},R.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},R.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.PrevotesRequest;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.to=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 2:n.height=e.uint64();break;case 3:n.round=e.uint32();break;case 4:n.propose_hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 5:n.validators=m.exonum.common.BitVec.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},R.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},R.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.to&&e.hasOwnProperty("to")&&(t=m.exonum.crypto.PublicKey.verify(e.to))?"to."+t:null!=e.height&&e.hasOwnProperty("height")&&!(g.isInteger(e.height)||e.height&&g.isInteger(e.height.low)&&g.isInteger(e.height.high))?"height: integer|Long expected":null!=e.round&&e.hasOwnProperty("round")&&!g.isInteger(e.round)?"round: integer expected":null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&(t=m.exonum.crypto.Hash.verify(e.propose_hash))?"propose_hash."+t:null!=e.validators&&e.hasOwnProperty("validators")&&(t=m.exonum.common.BitVec.verify(e.validators))?"validators."+t:null;var t},R.fromObject=function(e){if(e instanceof m.exonum.consensus.PrevotesRequest)return e;var t=new m.exonum.consensus.PrevotesRequest;if(null!=e.to){if("object"!==(0,pe.default)(e.to))throw TypeError(".exonum.consensus.PrevotesRequest.to: object expected");t.to=m.exonum.crypto.PublicKey.fromObject(e.to)}if(null!=e.height&&(g.Long?(t.height=g.Long.fromValue(e.height)).unsigned=!0:"string"==typeof e.height?t.height=parseInt(e.height,10):"number"==typeof e.height?t.height=e.height:"object"===(0,pe.default)(e.height)&&(t.height=new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0))),null!=e.round&&(t.round=e.round>>>0),null!=e.propose_hash){if("object"!==(0,pe.default)(e.propose_hash))throw TypeError(".exonum.consensus.PrevotesRequest.propose_hash: object expected");t.propose_hash=m.exonum.crypto.Hash.fromObject(e.propose_hash)}if(null!=e.validators){if("object"!==(0,pe.default)(e.validators))throw TypeError(".exonum.consensus.PrevotesRequest.validators: object expected");t.validators=m.exonum.common.BitVec.fromObject(e.validators)}return t},R.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(r.to=null,g.Long){var n=new g.Long(0,0,!0);r.height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.height=t.longs===String?"0":0;r.round=0,r.propose_hash=null,r.validators=null}return null!=e.to&&e.hasOwnProperty("to")&&(r.to=m.exonum.crypto.PublicKey.toObject(e.to,t)),null!=e.height&&e.hasOwnProperty("height")&&("number"==typeof e.height?r.height=t.longs===String?String(e.height):e.height:r.height=t.longs===String?g.Long.prototype.toString.call(e.height):t.longs===Number?new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0):e.height),null!=e.round&&e.hasOwnProperty("round")&&(r.round=e.round),null!=e.propose_hash&&e.hasOwnProperty("propose_hash")&&(r.propose_hash=m.exonum.crypto.Hash.toObject(e.propose_hash,t)),null!=e.validators&&e.hasOwnProperty("validators")&&(r.validators=m.exonum.common.BitVec.toObject(e.validators,t)),r},R.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},R),o.PeersRequest=(L.prototype.to=null,L.create=function(e){return new L(e)},L.encode=function(e,t){return t=t||y.create(),null!=e.to&&e.hasOwnProperty("to")&&m.exonum.crypto.PublicKey.encode(e.to,t.uint32(10).fork()).ldelim(),t},L.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},L.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.PeersRequest;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.to=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},L.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},L.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.to&&e.hasOwnProperty("to")){var t=m.exonum.crypto.PublicKey.verify(e.to);if(t)return"to."+t}return null},L.fromObject=function(e){if(e instanceof m.exonum.consensus.PeersRequest)return e;var t=new m.exonum.consensus.PeersRequest;if(null!=e.to){if("object"!==(0,pe.default)(e.to))throw TypeError(".exonum.consensus.PeersRequest.to: object expected");t.to=m.exonum.crypto.PublicKey.fromObject(e.to)}return t},L.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.to=null),null!=e.to&&e.hasOwnProperty("to")&&(r.to=m.exonum.crypto.PublicKey.toObject(e.to,t)),r},L.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},L),o.BlockRequest=(N.prototype.to=null,N.prototype.height=g.Long?g.Long.fromBits(0,0,!0):0,N.create=function(e){return new N(e)},N.encode=function(e,t){return t=t||y.create(),null!=e.to&&e.hasOwnProperty("to")&&m.exonum.crypto.PublicKey.encode(e.to,t.uint32(10).fork()).ldelim(),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint64(e.height),t},N.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},N.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.BlockRequest;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.to=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 2:n.height=e.uint64();break;default:e.skipType(7&o)}}return n},N.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},N.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.to&&e.hasOwnProperty("to")){var t=m.exonum.crypto.PublicKey.verify(e.to);if(t)return"to."+t}return null!=e.height&&e.hasOwnProperty("height")&&!(g.isInteger(e.height)||e.height&&g.isInteger(e.height.low)&&g.isInteger(e.height.high))?"height: integer|Long expected":null},N.fromObject=function(e){if(e instanceof m.exonum.consensus.BlockRequest)return e;var t=new m.exonum.consensus.BlockRequest;if(null!=e.to){if("object"!==(0,pe.default)(e.to))throw TypeError(".exonum.consensus.BlockRequest.to: object expected");t.to=m.exonum.crypto.PublicKey.fromObject(e.to)}return null!=e.height&&(g.Long?(t.height=g.Long.fromValue(e.height)).unsigned=!0:"string"==typeof e.height?t.height=parseInt(e.height,10):"number"==typeof e.height?t.height=e.height:"object"===(0,pe.default)(e.height)&&(t.height=new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0))),t},N.toObject=function(e,t){var r={};if((t=t||{}).defaults)if(r.to=null,g.Long){var n=new g.Long(0,0,!0);r.height=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.height=t.longs===String?"0":0;return null!=e.to&&e.hasOwnProperty("to")&&(r.to=m.exonum.crypto.PublicKey.toObject(e.to,t)),null!=e.height&&e.hasOwnProperty("height")&&("number"==typeof e.height?r.height=t.longs===String?String(e.height):e.height:r.height=t.longs===String?g.Long.prototype.toString.call(e.height):t.longs===Number?new g.LongBits(e.height.low>>>0,e.height.high>>>0).toNumber(!0):e.height),r},N.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},N),o.PoolTransactionsRequest=(U.prototype.to=null,U.create=function(e){return new U(e)},U.encode=function(e,t){return t=t||y.create(),null!=e.to&&e.hasOwnProperty("to")&&m.exonum.crypto.PublicKey.encode(e.to,t.uint32(10).fork()).ldelim(),t},U.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},U.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.PoolTransactionsRequest;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.to=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},U.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},U.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.to&&e.hasOwnProperty("to")){var t=m.exonum.crypto.PublicKey.verify(e.to);if(t)return"to."+t}return null},U.fromObject=function(e){if(e instanceof m.exonum.consensus.PoolTransactionsRequest)return e;var t=new m.exonum.consensus.PoolTransactionsRequest;if(null!=e.to){if("object"!==(0,pe.default)(e.to))throw TypeError(".exonum.consensus.PoolTransactionsRequest.to: object expected");t.to=m.exonum.crypto.PublicKey.fromObject(e.to)}return t},U.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.to=null),null!=e.to&&e.hasOwnProperty("to")&&(r.to=m.exonum.crypto.PublicKey.toObject(e.to,t)),r},U.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},U),o.ExonumMessage=(G.prototype.any_tx=null,G.prototype.connect=null,G.prototype.status=null,G.prototype.precommit=null,G.prototype.propose=null,G.prototype.prevote=null,G.prototype.transactions_response=null,G.prototype.block_response=null,G.prototype.propose_request=null,G.prototype.transactions_request=null,G.prototype.prevotes_request=null,G.prototype.peers_request=null,G.prototype.block_request=null,G.prototype.pool_transactions_request=null,Object.defineProperty(G.prototype,"kind",{get:g.oneOfGetter(n=["any_tx","connect","status","precommit","propose","prevote","transactions_response","block_response","propose_request","transactions_request","prevotes_request","peers_request","block_request","pool_transactions_request"]),set:g.oneOfSetter(n)}),G.create=function(e){return new G(e)},G.encode=function(e,t){return t=t||y.create(),null!=e.any_tx&&e.hasOwnProperty("any_tx")&&m.exonum.runtime.AnyTx.encode(e.any_tx,t.uint32(10).fork()).ldelim(),null!=e.connect&&e.hasOwnProperty("connect")&&m.exonum.consensus.Connect.encode(e.connect,t.uint32(18).fork()).ldelim(),null!=e.status&&e.hasOwnProperty("status")&&m.exonum.consensus.Status.encode(e.status,t.uint32(26).fork()).ldelim(),null!=e.precommit&&e.hasOwnProperty("precommit")&&m.exonum.consensus.Precommit.encode(e.precommit,t.uint32(34).fork()).ldelim(),null!=e.propose&&e.hasOwnProperty("propose")&&m.exonum.consensus.Propose.encode(e.propose,t.uint32(42).fork()).ldelim(),null!=e.prevote&&e.hasOwnProperty("prevote")&&m.exonum.consensus.Prevote.encode(e.prevote,t.uint32(50).fork()).ldelim(),null!=e.transactions_response&&e.hasOwnProperty("transactions_response")&&m.exonum.consensus.TransactionsResponse.encode(e.transactions_response,t.uint32(58).fork()).ldelim(),null!=e.block_response&&e.hasOwnProperty("block_response")&&m.exonum.consensus.BlockResponse.encode(e.block_response,t.uint32(66).fork()).ldelim(),null!=e.propose_request&&e.hasOwnProperty("propose_request")&&m.exonum.consensus.ProposeRequest.encode(e.propose_request,t.uint32(74).fork()).ldelim(),null!=e.transactions_request&&e.hasOwnProperty("transactions_request")&&m.exonum.consensus.TransactionsRequest.encode(e.transactions_request,t.uint32(82).fork()).ldelim(),null!=e.prevotes_request&&e.hasOwnProperty("prevotes_request")&&m.exonum.consensus.PrevotesRequest.encode(e.prevotes_request,t.uint32(90).fork()).ldelim(),null!=e.peers_request&&e.hasOwnProperty("peers_request")&&m.exonum.consensus.PeersRequest.encode(e.peers_request,t.uint32(98).fork()).ldelim(),null!=e.block_request&&e.hasOwnProperty("block_request")&&m.exonum.consensus.BlockRequest.encode(e.block_request,t.uint32(106).fork()).ldelim(),null!=e.pool_transactions_request&&e.hasOwnProperty("pool_transactions_request")&&m.exonum.consensus.PoolTransactionsRequest.encode(e.pool_transactions_request,t.uint32(114).fork()).ldelim(),t},G.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},G.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.consensus.ExonumMessage;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.any_tx=m.exonum.runtime.AnyTx.decode(e,e.uint32());break;case 2:n.connect=m.exonum.consensus.Connect.decode(e,e.uint32());break;case 3:n.status=m.exonum.consensus.Status.decode(e,e.uint32());break;case 4:n.precommit=m.exonum.consensus.Precommit.decode(e,e.uint32());break;case 5:n.propose=m.exonum.consensus.Propose.decode(e,e.uint32());break;case 6:n.prevote=m.exonum.consensus.Prevote.decode(e,e.uint32());break;case 7:n.transactions_response=m.exonum.consensus.TransactionsResponse.decode(e,e.uint32());break;case 8:n.block_response=m.exonum.consensus.BlockResponse.decode(e,e.uint32());break;case 9:n.propose_request=m.exonum.consensus.ProposeRequest.decode(e,e.uint32());break;case 10:n.transactions_request=m.exonum.consensus.TransactionsRequest.decode(e,e.uint32());break;case 11:n.prevotes_request=m.exonum.consensus.PrevotesRequest.decode(e,e.uint32());break;case 12:n.peers_request=m.exonum.consensus.PeersRequest.decode(e,e.uint32());break;case 13:n.block_request=m.exonum.consensus.BlockRequest.decode(e,e.uint32());break;case 14:n.pool_transactions_request=m.exonum.consensus.PoolTransactionsRequest.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},G.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},G.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";var t={};if(null!=e.any_tx&&e.hasOwnProperty("any_tx")&&(t.kind=1,r=m.exonum.runtime.AnyTx.verify(e.any_tx)))return"any_tx."+r;if(null!=e.connect&&e.hasOwnProperty("connect")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.Connect.verify(e.connect))return"connect."+r}if(null!=e.status&&e.hasOwnProperty("status")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.Status.verify(e.status))return"status."+r}if(null!=e.precommit&&e.hasOwnProperty("precommit")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.Precommit.verify(e.precommit))return"precommit."+r}if(null!=e.propose&&e.hasOwnProperty("propose")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.Propose.verify(e.propose))return"propose."+r}if(null!=e.prevote&&e.hasOwnProperty("prevote")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.Prevote.verify(e.prevote))return"prevote."+r}if(null!=e.transactions_response&&e.hasOwnProperty("transactions_response")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.TransactionsResponse.verify(e.transactions_response))return"transactions_response."+r}if(null!=e.block_response&&e.hasOwnProperty("block_response")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.BlockResponse.verify(e.block_response))return"block_response."+r}if(null!=e.propose_request&&e.hasOwnProperty("propose_request")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.ProposeRequest.verify(e.propose_request))return"propose_request."+r}if(null!=e.transactions_request&&e.hasOwnProperty("transactions_request")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.TransactionsRequest.verify(e.transactions_request))return"transactions_request."+r}if(null!=e.prevotes_request&&e.hasOwnProperty("prevotes_request")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.PrevotesRequest.verify(e.prevotes_request))return"prevotes_request."+r}if(null!=e.peers_request&&e.hasOwnProperty("peers_request")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.PeersRequest.verify(e.peers_request))return"peers_request."+r}if(null!=e.block_request&&e.hasOwnProperty("block_request")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,r=m.exonum.consensus.BlockRequest.verify(e.block_request))return"block_request."+r}if(null!=e.pool_transactions_request&&e.hasOwnProperty("pool_transactions_request")){if(1===t.kind)return"kind: multiple values";var r;if(t.kind=1,r=m.exonum.consensus.PoolTransactionsRequest.verify(e.pool_transactions_request))return"pool_transactions_request."+r}return null},G.fromObject=function(e){if(e instanceof m.exonum.consensus.ExonumMessage)return e;var t=new m.exonum.consensus.ExonumMessage;if(null!=e.any_tx){if("object"!==(0,pe.default)(e.any_tx))throw TypeError(".exonum.consensus.ExonumMessage.any_tx: object expected");t.any_tx=m.exonum.runtime.AnyTx.fromObject(e.any_tx)}if(null!=e.connect){if("object"!==(0,pe.default)(e.connect))throw TypeError(".exonum.consensus.ExonumMessage.connect: object expected");t.connect=m.exonum.consensus.Connect.fromObject(e.connect)}if(null!=e.status){if("object"!==(0,pe.default)(e.status))throw TypeError(".exonum.consensus.ExonumMessage.status: object expected");t.status=m.exonum.consensus.Status.fromObject(e.status)}if(null!=e.precommit){if("object"!==(0,pe.default)(e.precommit))throw TypeError(".exonum.consensus.ExonumMessage.precommit: object expected");t.precommit=m.exonum.consensus.Precommit.fromObject(e.precommit)}if(null!=e.propose){if("object"!==(0,pe.default)(e.propose))throw TypeError(".exonum.consensus.ExonumMessage.propose: object expected");t.propose=m.exonum.consensus.Propose.fromObject(e.propose)}if(null!=e.prevote){if("object"!==(0,pe.default)(e.prevote))throw TypeError(".exonum.consensus.ExonumMessage.prevote: object expected");t.prevote=m.exonum.consensus.Prevote.fromObject(e.prevote)}if(null!=e.transactions_response){if("object"!==(0,pe.default)(e.transactions_response))throw TypeError(".exonum.consensus.ExonumMessage.transactions_response: object expected");t.transactions_response=m.exonum.consensus.TransactionsResponse.fromObject(e.transactions_response)}if(null!=e.block_response){if("object"!==(0,pe.default)(e.block_response))throw TypeError(".exonum.consensus.ExonumMessage.block_response: object expected");t.block_response=m.exonum.consensus.BlockResponse.fromObject(e.block_response)}if(null!=e.propose_request){if("object"!==(0,pe.default)(e.propose_request))throw TypeError(".exonum.consensus.ExonumMessage.propose_request: object expected");t.propose_request=m.exonum.consensus.ProposeRequest.fromObject(e.propose_request)}if(null!=e.transactions_request){if("object"!==(0,pe.default)(e.transactions_request))throw TypeError(".exonum.consensus.ExonumMessage.transactions_request: object expected");t.transactions_request=m.exonum.consensus.TransactionsRequest.fromObject(e.transactions_request)}if(null!=e.prevotes_request){if("object"!==(0,pe.default)(e.prevotes_request))throw TypeError(".exonum.consensus.ExonumMessage.prevotes_request: object expected");t.prevotes_request=m.exonum.consensus.PrevotesRequest.fromObject(e.prevotes_request)}if(null!=e.peers_request){if("object"!==(0,pe.default)(e.peers_request))throw TypeError(".exonum.consensus.ExonumMessage.peers_request: object expected");t.peers_request=m.exonum.consensus.PeersRequest.fromObject(e.peers_request)}if(null!=e.block_request){if("object"!==(0,pe.default)(e.block_request))throw TypeError(".exonum.consensus.ExonumMessage.block_request: object expected");t.block_request=m.exonum.consensus.BlockRequest.fromObject(e.block_request)}if(null!=e.pool_transactions_request){if("object"!==(0,pe.default)(e.pool_transactions_request))throw TypeError(".exonum.consensus.ExonumMessage.pool_transactions_request: object expected");t.pool_transactions_request=m.exonum.consensus.PoolTransactionsRequest.fromObject(e.pool_transactions_request)}return t},G.toObject=function(e,t){t=t||{};var r={};return null!=e.any_tx&&e.hasOwnProperty("any_tx")&&(r.any_tx=m.exonum.runtime.AnyTx.toObject(e.any_tx,t),t.oneofs&&(r.kind="any_tx")),null!=e.connect&&e.hasOwnProperty("connect")&&(r.connect=m.exonum.consensus.Connect.toObject(e.connect,t),t.oneofs&&(r.kind="connect")),null!=e.status&&e.hasOwnProperty("status")&&(r.status=m.exonum.consensus.Status.toObject(e.status,t),t.oneofs&&(r.kind="status")),null!=e.precommit&&e.hasOwnProperty("precommit")&&(r.precommit=m.exonum.consensus.Precommit.toObject(e.precommit,t),t.oneofs&&(r.kind="precommit")),null!=e.propose&&e.hasOwnProperty("propose")&&(r.propose=m.exonum.consensus.Propose.toObject(e.propose,t),t.oneofs&&(r.kind="propose")),null!=e.prevote&&e.hasOwnProperty("prevote")&&(r.prevote=m.exonum.consensus.Prevote.toObject(e.prevote,t),t.oneofs&&(r.kind="prevote")),null!=e.transactions_response&&e.hasOwnProperty("transactions_response")&&(r.transactions_response=m.exonum.consensus.TransactionsResponse.toObject(e.transactions_response,t),t.oneofs&&(r.kind="transactions_response")),null!=e.block_response&&e.hasOwnProperty("block_response")&&(r.block_response=m.exonum.consensus.BlockResponse.toObject(e.block_response,t),t.oneofs&&(r.kind="block_response")),null!=e.propose_request&&e.hasOwnProperty("propose_request")&&(r.propose_request=m.exonum.consensus.ProposeRequest.toObject(e.propose_request,t),t.oneofs&&(r.kind="propose_request")),null!=e.transactions_request&&e.hasOwnProperty("transactions_request")&&(r.transactions_request=m.exonum.consensus.TransactionsRequest.toObject(e.transactions_request,t),t.oneofs&&(r.kind="transactions_request")),null!=e.prevotes_request&&e.hasOwnProperty("prevotes_request")&&(r.prevotes_request=m.exonum.consensus.PrevotesRequest.toObject(e.prevotes_request,t),t.oneofs&&(r.kind="prevotes_request")),null!=e.peers_request&&e.hasOwnProperty("peers_request")&&(r.peers_request=m.exonum.consensus.PeersRequest.toObject(e.peers_request,t),t.oneofs&&(r.kind="peers_request")),null!=e.block_request&&e.hasOwnProperty("block_request")&&(r.block_request=m.exonum.consensus.BlockRequest.toObject(e.block_request,t),t.oneofs&&(r.kind="block_request")),null!=e.pool_transactions_request&&e.hasOwnProperty("pool_transactions_request")&&(r.pool_transactions_request=m.exonum.consensus.PoolTransactionsRequest.toObject(e.pool_transactions_request,t),t.oneofs&&(r.kind="pool_transactions_request")),r},G.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},G),o),l.common=((i={}).BitVec=(M.prototype.data=g.newBuffer([]),M.prototype.len=g.Long?g.Long.fromBits(0,0,!0):0,M.create=function(e){return new M(e)},M.encode=function(e,t){return t=t||y.create(),null!=e.data&&e.hasOwnProperty("data")&&t.uint32(10).bytes(e.data),null!=e.len&&e.hasOwnProperty("len")&&t.uint32(16).uint64(e.len),t},M.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},M.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.common.BitVec;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.data=e.bytes();break;case 2:n.len=e.uint64();break;default:e.skipType(7&o)}}return n},M.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},M.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||g.isString(e.data))?"data: buffer expected":null!=e.len&&e.hasOwnProperty("len")&&!(g.isInteger(e.len)||e.len&&g.isInteger(e.len.low)&&g.isInteger(e.len.high))?"len: integer|Long expected":null},M.fromObject=function(e){if(e instanceof m.exonum.common.BitVec)return e;var t=new m.exonum.common.BitVec;return null!=e.data&&("string"==typeof e.data?g.base64.decode(e.data,t.data=g.newBuffer(g.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.len&&(g.Long?(t.len=g.Long.fromValue(e.len)).unsigned=!0:"string"==typeof e.len?t.len=parseInt(e.len,10):"number"==typeof e.len?t.len=e.len:"object"===(0,pe.default)(e.len)&&(t.len=new g.LongBits(e.len.low>>>0,e.len.high>>>0).toNumber(!0))),t},M.toObject=function(e,t){var r={};if((t=t||{}).defaults)if(t.bytes===String?r.data="":(r.data=[],t.bytes!==Array&&(r.data=g.newBuffer(r.data))),g.Long){var n=new g.Long(0,0,!0);r.len=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.len=t.longs===String?"0":0;return null!=e.data&&e.hasOwnProperty("data")&&(r.data=t.bytes===String?g.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),null!=e.len&&e.hasOwnProperty("len")&&("number"==typeof e.len?r.len=t.longs===String?String(e.len):e.len:r.len=t.longs===String?g.Long.prototype.toString.call(e.len):t.longs===Number?new g.LongBits(e.len.low>>>0,e.len.high>>>0).toNumber(!0):e.len),r},M.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},M),i),l.runtime=((s={}).CallInfo=(H.prototype.instance_id=0,H.prototype.method_id=0,H.create=function(e){return new H(e)},H.encode=function(e,t){return t=t||y.create(),null!=e.instance_id&&e.hasOwnProperty("instance_id")&&t.uint32(8).uint32(e.instance_id),null!=e.method_id&&e.hasOwnProperty("method_id")&&t.uint32(16).uint32(e.method_id),t},H.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},H.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.runtime.CallInfo;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.instance_id=e.uint32();break;case 2:n.method_id=e.uint32();break;default:e.skipType(7&o)}}return n},H.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},H.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.instance_id&&e.hasOwnProperty("instance_id")&&!g.isInteger(e.instance_id)?"instance_id: integer expected":null!=e.method_id&&e.hasOwnProperty("method_id")&&!g.isInteger(e.method_id)?"method_id: integer expected":null},H.fromObject=function(e){if(e instanceof m.exonum.runtime.CallInfo)return e;var t=new m.exonum.runtime.CallInfo;return null!=e.instance_id&&(t.instance_id=e.instance_id>>>0),null!=e.method_id&&(t.method_id=e.method_id>>>0),t},H.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.instance_id=0,r.method_id=0),null!=e.instance_id&&e.hasOwnProperty("instance_id")&&(r.instance_id=e.instance_id),null!=e.method_id&&e.hasOwnProperty("method_id")&&(r.method_id=e.method_id),r},H.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},H),s.AnyTx=(q.prototype.call_info=null,q.prototype.arguments=g.newBuffer([]),q.create=function(e){return new q(e)},q.encode=function(e,t){return t=t||y.create(),null!=e.call_info&&e.hasOwnProperty("call_info")&&m.exonum.runtime.CallInfo.encode(e.call_info,t.uint32(10).fork()).ldelim(),null!=e.arguments&&e.hasOwnProperty("arguments")&&t.uint32(18).bytes(e.arguments),t},q.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},q.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.runtime.AnyTx;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.call_info=m.exonum.runtime.CallInfo.decode(e,e.uint32());break;case 2:n.arguments=e.bytes();break;default:e.skipType(7&o)}}return n},q.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},q.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.call_info&&e.hasOwnProperty("call_info")){var t=m.exonum.runtime.CallInfo.verify(e.call_info);if(t)return"call_info."+t}return null!=e.arguments&&e.hasOwnProperty("arguments")&&!(e.arguments&&"number"==typeof e.arguments.length||g.isString(e.arguments))?"arguments: buffer expected":null},q.fromObject=function(e){if(e instanceof m.exonum.runtime.AnyTx)return e;var t=new m.exonum.runtime.AnyTx;if(null!=e.call_info){if("object"!==(0,pe.default)(e.call_info))throw TypeError(".exonum.runtime.AnyTx.call_info: object expected");t.call_info=m.exonum.runtime.CallInfo.fromObject(e.call_info)}return null!=e.arguments&&("string"==typeof e.arguments?g.base64.decode(e.arguments,t.arguments=g.newBuffer(g.base64.length(e.arguments)),0):e.arguments.length&&(t.arguments=e.arguments)),t},q.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.call_info=null,t.bytes===String?r.arguments="":(r.arguments=[],t.bytes!==Array&&(r.arguments=g.newBuffer(r.arguments)))),null!=e.call_info&&e.hasOwnProperty("call_info")&&(r.call_info=m.exonum.runtime.CallInfo.toObject(e.call_info,t)),null!=e.arguments&&e.hasOwnProperty("arguments")&&(r.arguments=t.bytes===String?g.base64.encode(e.arguments,0,e.arguments.length):t.bytes===Array?Array.prototype.slice.call(e.arguments):e.arguments),r},q.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},q),s.ArtifactId=(z.prototype.runtime_id=0,z.prototype.name="",z.create=function(e){return new z(e)},z.encode=function(e,t){return t=t||y.create(),null!=e.runtime_id&&e.hasOwnProperty("runtime_id")&&t.uint32(8).uint32(e.runtime_id),null!=e.name&&e.hasOwnProperty("name")&&t.uint32(18).string(e.name),t},z.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},z.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.runtime.ArtifactId;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.runtime_id=e.uint32();break;case 2:n.name=e.string();break;default:e.skipType(7&o)}}return n},z.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},z.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.runtime_id&&e.hasOwnProperty("runtime_id")&&!g.isInteger(e.runtime_id)?"runtime_id: integer expected":null!=e.name&&e.hasOwnProperty("name")&&!g.isString(e.name)?"name: string expected":null},z.fromObject=function(e){if(e instanceof m.exonum.runtime.ArtifactId)return e;var t=new m.exonum.runtime.ArtifactId;return null!=e.runtime_id&&(t.runtime_id=e.runtime_id>>>0),null!=e.name&&(t.name=String(e.name)),t},z.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.runtime_id=0,r.name=""),null!=e.runtime_id&&e.hasOwnProperty("runtime_id")&&(r.runtime_id=e.runtime_id),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),r},z.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},z),s.ArtifactSpec=(W.prototype.artifact=null,W.prototype.payload=g.newBuffer([]),W.create=function(e){return new W(e)},W.encode=function(e,t){return t=t||y.create(),null!=e.artifact&&e.hasOwnProperty("artifact")&&m.exonum.runtime.ArtifactId.encode(e.artifact,t.uint32(10).fork()).ldelim(),null!=e.payload&&e.hasOwnProperty("payload")&&t.uint32(18).bytes(e.payload),t},W.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},W.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.runtime.ArtifactSpec;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.artifact=m.exonum.runtime.ArtifactId.decode(e,e.uint32());break;case 2:n.payload=e.bytes();break;default:e.skipType(7&o)}}return n},W.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},W.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.artifact&&e.hasOwnProperty("artifact")){var t=m.exonum.runtime.ArtifactId.verify(e.artifact);if(t)return"artifact."+t}return null!=e.payload&&e.hasOwnProperty("payload")&&!(e.payload&&"number"==typeof e.payload.length||g.isString(e.payload))?"payload: buffer expected":null},W.fromObject=function(e){if(e instanceof m.exonum.runtime.ArtifactSpec)return e;var t=new m.exonum.runtime.ArtifactSpec;if(null!=e.artifact){if("object"!==(0,pe.default)(e.artifact))throw TypeError(".exonum.runtime.ArtifactSpec.artifact: object expected");t.artifact=m.exonum.runtime.ArtifactId.fromObject(e.artifact)}return null!=e.payload&&("string"==typeof e.payload?g.base64.decode(e.payload,t.payload=g.newBuffer(g.base64.length(e.payload)),0):e.payload.length&&(t.payload=e.payload)),t},W.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.artifact=null,t.bytes===String?r.payload="":(r.payload=[],t.bytes!==Array&&(r.payload=g.newBuffer(r.payload)))),null!=e.artifact&&e.hasOwnProperty("artifact")&&(r.artifact=m.exonum.runtime.ArtifactId.toObject(e.artifact,t)),null!=e.payload&&e.hasOwnProperty("payload")&&(r.payload=t.bytes===String?g.base64.encode(e.payload,0,e.payload.length):t.bytes===Array?Array.prototype.slice.call(e.payload):e.payload),r},W.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},W),s.InstanceSpec=(V.prototype.id=0,V.prototype.name="",V.prototype.artifact=null,V.create=function(e){return new V(e)},V.encode=function(e,t){return t=t||y.create(),null!=e.id&&e.hasOwnProperty("id")&&t.uint32(8).uint32(e.id),null!=e.name&&e.hasOwnProperty("name")&&t.uint32(18).string(e.name),null!=e.artifact&&e.hasOwnProperty("artifact")&&m.exonum.runtime.ArtifactId.encode(e.artifact,t.uint32(26).fork()).ldelim(),t},V.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},V.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.runtime.InstanceSpec;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.id=e.uint32();break;case 2:n.name=e.string();break;case 3:n.artifact=m.exonum.runtime.ArtifactId.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},V.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},V.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!g.isInteger(e.id))return"id: integer expected";if(null!=e.name&&e.hasOwnProperty("name")&&!g.isString(e.name))return"name: string expected";if(null!=e.artifact&&e.hasOwnProperty("artifact")){var t=m.exonum.runtime.ArtifactId.verify(e.artifact);if(t)return"artifact."+t}return null},V.fromObject=function(e){if(e instanceof m.exonum.runtime.InstanceSpec)return e;var t=new m.exonum.runtime.InstanceSpec;if(null!=e.id&&(t.id=e.id>>>0),null!=e.name&&(t.name=String(e.name)),null!=e.artifact){if("object"!==(0,pe.default)(e.artifact))throw TypeError(".exonum.runtime.InstanceSpec.artifact: object expected");t.artifact=m.exonum.runtime.ArtifactId.fromObject(e.artifact)}return t},V.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.id=0,r.name="",r.artifact=null),null!=e.id&&e.hasOwnProperty("id")&&(r.id=e.id),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.artifact&&e.hasOwnProperty("artifact")&&(r.artifact=m.exonum.runtime.ArtifactId.toObject(e.artifact,t)),r},V.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},V),s),l.KeyValue=(X.prototype.key="",X.prototype.value=g.newBuffer([]),X.create=function(e){return new X(e)},X.encode=function(e,t){return t=t||y.create(),null!=e.key&&e.hasOwnProperty("key")&&t.uint32(10).string(e.key),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(18).bytes(e.value),t},X.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},X.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.KeyValue;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.key=e.string();break;case 2:n.value=e.bytes();break;default:e.skipType(7&o)}}return n},X.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},X.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!g.isString(e.key)?"key: string expected":null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||g.isString(e.value))?"value: buffer expected":null},X.fromObject=function(e){if(e instanceof m.exonum.KeyValue)return e;var t=new m.exonum.KeyValue;return null!=e.key&&(t.key=String(e.key)),null!=e.value&&("string"==typeof e.value?g.base64.decode(e.value,t.value=g.newBuffer(g.base64.length(e.value)),0):e.value.length&&(t.value=e.value)),t},X.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.key="",t.bytes===String?r.value="":(r.value=[],t.bytes!==Array&&(r.value=g.newBuffer(r.value)))),null!=e.key&&e.hasOwnProperty("key")&&(r.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(r.value=t.bytes===String?g.base64.encode(e.value,0,e.value.length):t.bytes===Array?Array.prototype.slice.call(e.value):e.value),r},X.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},X),l.KeyValueSequence=(J.prototype.entry=g.emptyArray,J.create=function(e){return new J(e)},J.encode=function(e,t){if(t=t||y.create(),null!=e.entry&&e.entry.length)for(var r=0;r<e.entry.length;++r)m.exonum.KeyValue.encode(e.entry[r],t.uint32(10).fork()).ldelim();return t},J.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},J.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.KeyValueSequence;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.entry&&n.entry.length||(n.entry=[]),n.entry.push(m.exonum.KeyValue.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},J.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},J.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.entry&&e.hasOwnProperty("entry")){if(!Array.isArray(e.entry))return"entry: array expected";for(var t=0;t<e.entry.length;++t){var r=m.exonum.KeyValue.verify(e.entry[t]);if(r)return"entry."+r}}return null},J.fromObject=function(e){if(e instanceof m.exonum.KeyValueSequence)return e;var t=new m.exonum.KeyValueSequence;if(e.entry){if(!Array.isArray(e.entry))throw TypeError(".exonum.KeyValueSequence.entry: array expected");t.entry=[];for(var r=0;r<e.entry.length;++r){if("object"!==(0,pe.default)(e.entry[r]))throw TypeError(".exonum.KeyValueSequence.entry: object expected");t.entry[r]=m.exonum.KeyValue.fromObject(e.entry[r])}}return t},J.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.entry=[]),e.entry&&e.entry.length){r.entry=[];for(var n=0;n<e.entry.length;++n)r.entry[n]=m.exonum.KeyValue.toObject(e.entry[n],t)}return r},J.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},J),l.proofs=((a={}).BlockProof=(Y.prototype.block=null,Y.prototype.precommits=g.emptyArray,Y.create=function(e){return new Y(e)},Y.encode=function(e,t){if(t=t||y.create(),null!=e.block&&e.hasOwnProperty("block")&&m.exonum.Block.encode(e.block,t.uint32(10).fork()).ldelim(),null!=e.precommits&&e.precommits.length)for(var r=0;r<e.precommits.length;++r)m.exonum.consensus.SignedMessage.encode(e.precommits[r],t.uint32(18).fork()).ldelim();return t},Y.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Y.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proofs.BlockProof;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.block=m.exonum.Block.decode(e,e.uint32());break;case 2:n.precommits&&n.precommits.length||(n.precommits=[]),n.precommits.push(m.exonum.consensus.SignedMessage.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},Y.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Y.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.block&&e.hasOwnProperty("block")&&(r=m.exonum.Block.verify(e.block)))return"block."+r;if(null!=e.precommits&&e.hasOwnProperty("precommits")){if(!Array.isArray(e.precommits))return"precommits: array expected";for(var t=0;t<e.precommits.length;++t){var r;if(r=m.exonum.consensus.SignedMessage.verify(e.precommits[t]))return"precommits."+r}}return null},Y.fromObject=function(e){if(e instanceof m.exonum.proofs.BlockProof)return e;var t=new m.exonum.proofs.BlockProof;if(null!=e.block){if("object"!==(0,pe.default)(e.block))throw TypeError(".exonum.proofs.BlockProof.block: object expected");t.block=m.exonum.Block.fromObject(e.block)}if(e.precommits){if(!Array.isArray(e.precommits))throw TypeError(".exonum.proofs.BlockProof.precommits: array expected");t.precommits=[];for(var r=0;r<e.precommits.length;++r){if("object"!==(0,pe.default)(e.precommits[r]))throw TypeError(".exonum.proofs.BlockProof.precommits: object expected");t.precommits[r]=m.exonum.consensus.SignedMessage.fromObject(e.precommits[r])}}return t},Y.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.precommits=[]),t.defaults&&(r.block=null),null!=e.block&&e.hasOwnProperty("block")&&(r.block=m.exonum.Block.toObject(e.block,t)),e.precommits&&e.precommits.length){r.precommits=[];for(var n=0;n<e.precommits.length;++n)r.precommits[n]=m.exonum.consensus.SignedMessage.toObject(e.precommits[n],t)}return r},Y.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},Y),a.ConfigChangeProof=(Z.prototype.configs_proof=null,Z.prototype.configs_index_proof=null,Z.prototype.blocks_proofs=g.emptyArray,Z.prototype.foreign_proof=g.newBuffer([]),Z.create=function(e){return new Z(e)},Z.encode=function(e,t){if(t=t||y.create(),null!=e.configs_proof&&e.hasOwnProperty("configs_proof")&&m.exonum.proof.ListProof.encode(e.configs_proof,t.uint32(10).fork()).ldelim(),null!=e.configs_index_proof&&e.hasOwnProperty("configs_index_proof")&&m.exonum.proof.MapProof.encode(e.configs_index_proof,t.uint32(18).fork()).ldelim(),null!=e.blocks_proofs&&e.blocks_proofs.length)for(var r=0;r<e.blocks_proofs.length;++r)m.exonum.proofs.BlockProof.encode(e.blocks_proofs[r],t.uint32(26).fork()).ldelim();return null!=e.foreign_proof&&e.hasOwnProperty("foreign_proof")&&t.uint32(34).bytes(e.foreign_proof),t},Z.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Z.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proofs.ConfigChangeProof;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.configs_proof=m.exonum.proof.ListProof.decode(e,e.uint32());break;case 2:n.configs_index_proof=m.exonum.proof.MapProof.decode(e,e.uint32());break;case 3:n.blocks_proofs&&n.blocks_proofs.length||(n.blocks_proofs=[]),n.blocks_proofs.push(m.exonum.proofs.BlockProof.decode(e,e.uint32()));break;case 4:n.foreign_proof=e.bytes();break;default:e.skipType(7&o)}}return n},Z.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Z.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.configs_proof&&e.hasOwnProperty("configs_proof")&&(r=m.exonum.proof.ListProof.verify(e.configs_proof)))return"configs_proof."+r;if(null!=e.configs_index_proof&&e.hasOwnProperty("configs_index_proof")&&(r=m.exonum.proof.MapProof.verify(e.configs_index_proof)))return"configs_index_proof."+r;if(null!=e.blocks_proofs&&e.hasOwnProperty("blocks_proofs")){if(!Array.isArray(e.blocks_proofs))return"blocks_proofs: array expected";for(var t=0;t<e.blocks_proofs.length;++t){var r;if(r=m.exonum.proofs.BlockProof.verify(e.blocks_proofs[t]))return"blocks_proofs."+r}}return null!=e.foreign_proof&&e.hasOwnProperty("foreign_proof")&&!(e.foreign_proof&&"number"==typeof e.foreign_proof.length||g.isString(e.foreign_proof))?"foreign_proof: buffer expected":null},Z.fromObject=function(e){if(e instanceof m.exonum.proofs.ConfigChangeProof)return e;var t=new m.exonum.proofs.ConfigChangeProof;if(null!=e.configs_proof){if("object"!==(0,pe.default)(e.configs_proof))throw TypeError(".exonum.proofs.ConfigChangeProof.configs_proof: object expected");t.configs_proof=m.exonum.proof.ListProof.fromObject(e.configs_proof)}if(null!=e.configs_index_proof){if("object"!==(0,pe.default)(e.configs_index_proof))throw TypeError(".exonum.proofs.ConfigChangeProof.configs_index_proof: object expected");t.configs_index_proof=m.exonum.proof.MapProof.fromObject(e.configs_index_proof)}if(e.blocks_proofs){if(!Array.isArray(e.blocks_proofs))throw TypeError(".exonum.proofs.ConfigChangeProof.blocks_proofs: array expected");t.blocks_proofs=[];for(var r=0;r<e.blocks_proofs.length;++r){if("object"!==(0,pe.default)(e.blocks_proofs[r]))throw TypeError(".exonum.proofs.ConfigChangeProof.blocks_proofs: object expected");t.blocks_proofs[r]=m.exonum.proofs.BlockProof.fromObject(e.blocks_proofs[r])}}return null!=e.foreign_proof&&("string"==typeof e.foreign_proof?g.base64.decode(e.foreign_proof,t.foreign_proof=g.newBuffer(g.base64.length(e.foreign_proof)),0):e.foreign_proof.length&&(t.foreign_proof=e.foreign_proof)),t},Z.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.blocks_proofs=[]),t.defaults&&(r.configs_proof=null,r.configs_index_proof=null,t.bytes===String?r.foreign_proof="":(r.foreign_proof=[],t.bytes!==Array&&(r.foreign_proof=g.newBuffer(r.foreign_proof)))),null!=e.configs_proof&&e.hasOwnProperty("configs_proof")&&(r.configs_proof=m.exonum.proof.ListProof.toObject(e.configs_proof,t)),null!=e.configs_index_proof&&e.hasOwnProperty("configs_index_proof")&&(r.configs_index_proof=m.exonum.proof.MapProof.toObject(e.configs_index_proof,t)),e.blocks_proofs&&e.blocks_proofs.length){r.blocks_proofs=[];for(var n=0;n<e.blocks_proofs.length;++n)r.blocks_proofs[n]=m.exonum.proofs.BlockProof.toObject(e.blocks_proofs[n],t)}return null!=e.foreign_proof&&e.hasOwnProperty("foreign_proof")&&(r.foreign_proof=t.bytes===String?g.base64.encode(e.foreign_proof,0,e.foreign_proof.length):t.bytes===Array?Array.prototype.slice.call(e.foreign_proof):e.foreign_proof),r},Z.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},Z),a.ForeignTxProof=(Q.prototype.txs=g.emptyArray,Q.prototype.results_proof=null,Q.prototype.results_index_proof=null,Q.create=function(e){return new Q(e)},Q.encode=function(e,t){if(t=t||y.create(),null!=e.txs&&e.txs.length)for(var r=0;r<e.txs.length;++r)m.exonum.consensus.SignedMessage.encode(e.txs[r],t.uint32(18).fork()).ldelim();return null!=e.results_proof&&e.hasOwnProperty("results_proof")&&m.exonum.proof.MapProof.encode(e.results_proof,t.uint32(26).fork()).ldelim(),null!=e.results_index_proof&&e.hasOwnProperty("results_index_proof")&&m.exonum.proof.MapProof.encode(e.results_index_proof,t.uint32(34).fork()).ldelim(),t},Q.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Q.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proofs.ForeignTxProof;e.pos<r;){var o=e.uint32();switch(o>>>3){case 2:n.txs&&n.txs.length||(n.txs=[]),n.txs.push(m.exonum.consensus.SignedMessage.decode(e,e.uint32()));break;case 3:n.results_proof=m.exonum.proof.MapProof.decode(e,e.uint32());break;case 4:n.results_index_proof=m.exonum.proof.MapProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},Q.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Q.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.txs&&e.hasOwnProperty("txs")){if(!Array.isArray(e.txs))return"txs: array expected";for(var t=0;t<e.txs.length;++t)if(r=m.exonum.consensus.SignedMessage.verify(e.txs[t]))return"txs."+r}var r;return null!=e.results_proof&&e.hasOwnProperty("results_proof")&&(r=m.exonum.proof.MapProof.verify(e.results_proof))?"results_proof."+r:null!=e.results_index_proof&&e.hasOwnProperty("results_index_proof")&&(r=m.exonum.proof.MapProof.verify(e.results_index_proof))?"results_index_proof."+r:null},Q.fromObject=function(e){if(e instanceof m.exonum.proofs.ForeignTxProof)return e;var t=new m.exonum.proofs.ForeignTxProof;if(e.txs){if(!Array.isArray(e.txs))throw TypeError(".exonum.proofs.ForeignTxProof.txs: array expected");t.txs=[];for(var r=0;r<e.txs.length;++r){if("object"!==(0,pe.default)(e.txs[r]))throw TypeError(".exonum.proofs.ForeignTxProof.txs: object expected");t.txs[r]=m.exonum.consensus.SignedMessage.fromObject(e.txs[r])}}if(null!=e.results_proof){if("object"!==(0,pe.default)(e.results_proof))throw TypeError(".exonum.proofs.ForeignTxProof.results_proof: object expected");t.results_proof=m.exonum.proof.MapProof.fromObject(e.results_proof)}if(null!=e.results_index_proof){if("object"!==(0,pe.default)(e.results_index_proof))throw TypeError(".exonum.proofs.ForeignTxProof.results_index_proof: object expected");t.results_index_proof=m.exonum.proof.MapProof.fromObject(e.results_index_proof)}return t},Q.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.txs=[]),t.defaults&&(r.results_proof=null,r.results_index_proof=null),e.txs&&e.txs.length){r.txs=[];for(var n=0;n<e.txs.length;++n)r.txs[n]=m.exonum.consensus.SignedMessage.toObject(e.txs[n],t)}return null!=e.results_proof&&e.hasOwnProperty("results_proof")&&(r.results_proof=m.exonum.proof.MapProof.toObject(e.results_proof,t)),null!=e.results_index_proof&&e.hasOwnProperty("results_index_proof")&&(r.results_index_proof=m.exonum.proof.MapProof.toObject(e.results_index_proof,t)),r},Q.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},Q),a),l.tests=((u={}).Point=($.prototype.x=0,$.prototype.y=0,$.create=function(e){return new $(e)},$.encode=function(e,t){return t=t||y.create(),null!=e.x&&e.hasOwnProperty("x")&&t.uint32(8).uint32(e.x),null!=e.y&&e.hasOwnProperty("y")&&t.uint32(16).uint32(e.y),t},$.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},$.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.tests.Point;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.x=e.uint32();break;case 2:n.y=e.uint32();break;default:e.skipType(7&o)}}return n},$.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},$.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.x&&e.hasOwnProperty("x")&&!g.isInteger(e.x)?"x: integer expected":null!=e.y&&e.hasOwnProperty("y")&&!g.isInteger(e.y)?"y: integer expected":null},$.fromObject=function(e){if(e instanceof m.exonum.tests.Point)return e;var t=new m.exonum.tests.Point;return null!=e.x&&(t.x=e.x>>>0),null!=e.y&&(t.y=e.y>>>0),t},$.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.x=0,r.y=0),null!=e.x&&e.hasOwnProperty("x")&&(r.x=e.x),null!=e.y&&e.hasOwnProperty("y")&&(r.y=e.y),r},$.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},$),u.TestProtobufConvert=(ee.prototype.key=null,ee.prototype.hash=null,ee.prototype.unsigned_32=0,ee.prototype.unsigned_64=g.Long?g.Long.fromBits(0,0,!0):0,ee.prototype.regular_i32=0,ee.prototype.regular_i64=g.Long?g.Long.fromBits(0,0,!1):0,ee.prototype.fixed_u32=0,ee.prototype.fixed_u64=g.Long?g.Long.fromBits(0,0,!1):0,ee.prototype.fixed_i32=0,ee.prototype.fixed_i64=g.Long?g.Long.fromBits(0,0,!1):0,ee.prototype.float_32=0,ee.prototype.float_64=0,ee.prototype.boolean=!1,ee.prototype.s_i32=0,ee.prototype.s_i64=g.Long?g.Long.fromBits(0,0,!1):0,ee.prototype.bytes_field=g.newBuffer([]),ee.prototype.string_field="",ee.prototype.message_field=null,ee.prototype.bit_vec=null,ee.prototype.time=null,ee.create=function(e){return new ee(e)},ee.encode=function(e,t){return t=t||y.create(),null!=e.key&&e.hasOwnProperty("key")&&m.exonum.crypto.PublicKey.encode(e.key,t.uint32(10).fork()).ldelim(),null!=e.hash&&e.hasOwnProperty("hash")&&m.exonum.crypto.Hash.encode(e.hash,t.uint32(18).fork()).ldelim(),null!=e.unsigned_32&&e.hasOwnProperty("unsigned_32")&&t.uint32(24).uint32(e.unsigned_32),null!=e.unsigned_64&&e.hasOwnProperty("unsigned_64")&&t.uint32(32).uint64(e.unsigned_64),null!=e.regular_i32&&e.hasOwnProperty("regular_i32")&&t.uint32(40).int32(e.regular_i32),null!=e.regular_i64&&e.hasOwnProperty("regular_i64")&&t.uint32(48).int64(e.regular_i64),null!=e.fixed_u32&&e.hasOwnProperty("fixed_u32")&&t.uint32(61).fixed32(e.fixed_u32),null!=e.fixed_u64&&e.hasOwnProperty("fixed_u64")&&t.uint32(65).fixed64(e.fixed_u64),null!=e.fixed_i32&&e.hasOwnProperty("fixed_i32")&&t.uint32(77).sfixed32(e.fixed_i32),null!=e.fixed_i64&&e.hasOwnProperty("fixed_i64")&&t.uint32(81).sfixed64(e.fixed_i64),null!=e.float_32&&e.hasOwnProperty("float_32")&&t.uint32(93).float(e.float_32),null!=e.float_64&&e.hasOwnProperty("float_64")&&t.uint32(97).double(e.float_64),null!=e.boolean&&e.hasOwnProperty("boolean")&&t.uint32(104).bool(e.boolean),null!=e.s_i32&&e.hasOwnProperty("s_i32")&&t.uint32(112).sint32(e.s_i32),null!=e.s_i64&&e.hasOwnProperty("s_i64")&&t.uint32(120).sint64(e.s_i64),null!=e.bytes_field&&e.hasOwnProperty("bytes_field")&&t.uint32(130).bytes(e.bytes_field),null!=e.string_field&&e.hasOwnProperty("string_field")&&t.uint32(138).string(e.string_field),null!=e.message_field&&e.hasOwnProperty("message_field")&&m.exonum.tests.Point.encode(e.message_field,t.uint32(146).fork()).ldelim(),null!=e.bit_vec&&e.hasOwnProperty("bit_vec")&&m.exonum.common.BitVec.encode(e.bit_vec,t.uint32(154).fork()).ldelim(),null!=e.time&&e.hasOwnProperty("time")&&m.google.protobuf.Timestamp.encode(e.time,t.uint32(162).fork()).ldelim(),t},ee.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ee.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.tests.TestProtobufConvert;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.key=m.exonum.crypto.PublicKey.decode(e,e.uint32());break;case 2:n.hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;case 3:n.unsigned_32=e.uint32();break;case 4:n.unsigned_64=e.uint64();break;case 5:n.regular_i32=e.int32();break;case 6:n.regular_i64=e.int64();break;case 7:n.fixed_u32=e.fixed32();break;case 8:n.fixed_u64=e.fixed64();break;case 9:n.fixed_i32=e.sfixed32();break;case 10:n.fixed_i64=e.sfixed64();break;case 11:n.float_32=e.float();break;case 12:n.float_64=e.double();break;case 13:n.boolean=e.bool();break;case 14:n.s_i32=e.sint32();break;case 15:n.s_i64=e.sint64();break;case 16:n.bytes_field=e.bytes();break;case 17:n.string_field=e.string();break;case 18:n.message_field=m.exonum.tests.Point.decode(e,e.uint32());break;case 19:n.bit_vec=m.exonum.common.BitVec.decode(e,e.uint32());break;case 20:n.time=m.google.protobuf.Timestamp.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},ee.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ee.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&(t=m.exonum.crypto.PublicKey.verify(e.key))?"key."+t:null!=e.hash&&e.hasOwnProperty("hash")&&(t=m.exonum.crypto.Hash.verify(e.hash))?"hash."+t:null!=e.unsigned_32&&e.hasOwnProperty("unsigned_32")&&!g.isInteger(e.unsigned_32)?"unsigned_32: integer expected":null!=e.unsigned_64&&e.hasOwnProperty("unsigned_64")&&!(g.isInteger(e.unsigned_64)||e.unsigned_64&&g.isInteger(e.unsigned_64.low)&&g.isInteger(e.unsigned_64.high))?"unsigned_64: integer|Long expected":null!=e.regular_i32&&e.hasOwnProperty("regular_i32")&&!g.isInteger(e.regular_i32)?"regular_i32: integer expected":null!=e.regular_i64&&e.hasOwnProperty("regular_i64")&&!(g.isInteger(e.regular_i64)||e.regular_i64&&g.isInteger(e.regular_i64.low)&&g.isInteger(e.regular_i64.high))?"regular_i64: integer|Long expected":null!=e.fixed_u32&&e.hasOwnProperty("fixed_u32")&&!g.isInteger(e.fixed_u32)?"fixed_u32: integer expected":null!=e.fixed_u64&&e.hasOwnProperty("fixed_u64")&&!(g.isInteger(e.fixed_u64)||e.fixed_u64&&g.isInteger(e.fixed_u64.low)&&g.isInteger(e.fixed_u64.high))?"fixed_u64: integer|Long expected":null!=e.fixed_i32&&e.hasOwnProperty("fixed_i32")&&!g.isInteger(e.fixed_i32)?"fixed_i32: integer expected":null!=e.fixed_i64&&e.hasOwnProperty("fixed_i64")&&!(g.isInteger(e.fixed_i64)||e.fixed_i64&&g.isInteger(e.fixed_i64.low)&&g.isInteger(e.fixed_i64.high))?"fixed_i64: integer|Long expected":null!=e.float_32&&e.hasOwnProperty("float_32")&&"number"!=typeof e.float_32?"float_32: number expected":null!=e.float_64&&e.hasOwnProperty("float_64")&&"number"!=typeof e.float_64?"float_64: number expected":null!=e.boolean&&e.hasOwnProperty("boolean")&&"boolean"!=typeof e.boolean?"boolean: boolean expected":null!=e.s_i32&&e.hasOwnProperty("s_i32")&&!g.isInteger(e.s_i32)?"s_i32: integer expected":null!=e.s_i64&&e.hasOwnProperty("s_i64")&&!(g.isInteger(e.s_i64)||e.s_i64&&g.isInteger(e.s_i64.low)&&g.isInteger(e.s_i64.high))?"s_i64: integer|Long expected":null!=e.bytes_field&&e.hasOwnProperty("bytes_field")&&!(e.bytes_field&&"number"==typeof e.bytes_field.length||g.isString(e.bytes_field))?"bytes_field: buffer expected":null!=e.string_field&&e.hasOwnProperty("string_field")&&!g.isString(e.string_field)?"string_field: string expected":null!=e.message_field&&e.hasOwnProperty("message_field")&&(t=m.exonum.tests.Point.verify(e.message_field))?"message_field."+t:null!=e.bit_vec&&e.hasOwnProperty("bit_vec")&&(t=m.exonum.common.BitVec.verify(e.bit_vec))?"bit_vec."+t:null!=e.time&&e.hasOwnProperty("time")&&(t=m.google.protobuf.Timestamp.verify(e.time))?"time."+t:null;var t},ee.fromObject=function(e){if(e instanceof m.exonum.tests.TestProtobufConvert)return e;var t=new m.exonum.tests.TestProtobufConvert;if(null!=e.key){if("object"!==(0,pe.default)(e.key))throw TypeError(".exonum.tests.TestProtobufConvert.key: object expected");t.key=m.exonum.crypto.PublicKey.fromObject(e.key)}if(null!=e.hash){if("object"!==(0,pe.default)(e.hash))throw TypeError(".exonum.tests.TestProtobufConvert.hash: object expected");t.hash=m.exonum.crypto.Hash.fromObject(e.hash)}if(null!=e.unsigned_32&&(t.unsigned_32=e.unsigned_32>>>0),null!=e.unsigned_64&&(g.Long?(t.unsigned_64=g.Long.fromValue(e.unsigned_64)).unsigned=!0:"string"==typeof e.unsigned_64?t.unsigned_64=parseInt(e.unsigned_64,10):"number"==typeof e.unsigned_64?t.unsigned_64=e.unsigned_64:"object"===(0,pe.default)(e.unsigned_64)&&(t.unsigned_64=new g.LongBits(e.unsigned_64.low>>>0,e.unsigned_64.high>>>0).toNumber(!0))),null!=e.regular_i32&&(t.regular_i32=0|e.regular_i32),null!=e.regular_i64&&(g.Long?(t.regular_i64=g.Long.fromValue(e.regular_i64)).unsigned=!1:"string"==typeof e.regular_i64?t.regular_i64=parseInt(e.regular_i64,10):"number"==typeof e.regular_i64?t.regular_i64=e.regular_i64:"object"===(0,pe.default)(e.regular_i64)&&(t.regular_i64=new g.LongBits(e.regular_i64.low>>>0,e.regular_i64.high>>>0).toNumber())),null!=e.fixed_u32&&(t.fixed_u32=e.fixed_u32>>>0),null!=e.fixed_u64&&(g.Long?(t.fixed_u64=g.Long.fromValue(e.fixed_u64)).unsigned=!1:"string"==typeof e.fixed_u64?t.fixed_u64=parseInt(e.fixed_u64,10):"number"==typeof e.fixed_u64?t.fixed_u64=e.fixed_u64:"object"===(0,pe.default)(e.fixed_u64)&&(t.fixed_u64=new g.LongBits(e.fixed_u64.low>>>0,e.fixed_u64.high>>>0).toNumber())),null!=e.fixed_i32&&(t.fixed_i32=0|e.fixed_i32),null!=e.fixed_i64&&(g.Long?(t.fixed_i64=g.Long.fromValue(e.fixed_i64)).unsigned=!1:"string"==typeof e.fixed_i64?t.fixed_i64=parseInt(e.fixed_i64,10):"number"==typeof e.fixed_i64?t.fixed_i64=e.fixed_i64:"object"===(0,pe.default)(e.fixed_i64)&&(t.fixed_i64=new g.LongBits(e.fixed_i64.low>>>0,e.fixed_i64.high>>>0).toNumber())),null!=e.float_32&&(t.float_32=Number(e.float_32)),null!=e.float_64&&(t.float_64=Number(e.float_64)),null!=e.boolean&&(t.boolean=Boolean(e.boolean)),null!=e.s_i32&&(t.s_i32=0|e.s_i32),null!=e.s_i64&&(g.Long?(t.s_i64=g.Long.fromValue(e.s_i64)).unsigned=!1:"string"==typeof e.s_i64?t.s_i64=parseInt(e.s_i64,10):"number"==typeof e.s_i64?t.s_i64=e.s_i64:"object"===(0,pe.default)(e.s_i64)&&(t.s_i64=new g.LongBits(e.s_i64.low>>>0,e.s_i64.high>>>0).toNumber())),null!=e.bytes_field&&("string"==typeof e.bytes_field?g.base64.decode(e.bytes_field,t.bytes_field=g.newBuffer(g.base64.length(e.bytes_field)),0):e.bytes_field.length&&(t.bytes_field=e.bytes_field)),null!=e.string_field&&(t.string_field=String(e.string_field)),null!=e.message_field){if("object"!==(0,pe.default)(e.message_field))throw TypeError(".exonum.tests.TestProtobufConvert.message_field: object expected");t.message_field=m.exonum.tests.Point.fromObject(e.message_field)}if(null!=e.bit_vec){if("object"!==(0,pe.default)(e.bit_vec))throw TypeError(".exonum.tests.TestProtobufConvert.bit_vec: object expected");t.bit_vec=m.exonum.common.BitVec.fromObject(e.bit_vec)}if(null!=e.time){if("object"!==(0,pe.default)(e.time))throw TypeError(".exonum.tests.TestProtobufConvert.time: object expected");t.time=m.google.protobuf.Timestamp.fromObject(e.time)}return t},ee.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(r.key=null,r.hash=null,r.unsigned_32=0,g.Long){var n=new g.Long(0,0,!0);r.unsigned_64=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.unsigned_64=t.longs===String?"0":0;r.regular_i32=0,g.Long?(n=new g.Long(0,0,!1),r.regular_i64=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.regular_i64=t.longs===String?"0":0,r.fixed_u32=0,g.Long?(n=new g.Long(0,0,!1),r.fixed_u64=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.fixed_u64=t.longs===String?"0":0,r.fixed_i32=0,g.Long?(n=new g.Long(0,0,!1),r.fixed_i64=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.fixed_i64=t.longs===String?"0":0,r.float_32=0,r.float_64=0,r.boolean=!1,r.s_i32=0,g.Long?(n=new g.Long(0,0,!1),r.s_i64=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.s_i64=t.longs===String?"0":0,t.bytes===String?r.bytes_field="":(r.bytes_field=[],t.bytes!==Array&&(r.bytes_field=g.newBuffer(r.bytes_field))),r.string_field="",r.message_field=null,r.bit_vec=null,r.time=null}return null!=e.key&&e.hasOwnProperty("key")&&(r.key=m.exonum.crypto.PublicKey.toObject(e.key,t)),null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=m.exonum.crypto.Hash.toObject(e.hash,t)),null!=e.unsigned_32&&e.hasOwnProperty("unsigned_32")&&(r.unsigned_32=e.unsigned_32),null!=e.unsigned_64&&e.hasOwnProperty("unsigned_64")&&("number"==typeof e.unsigned_64?r.unsigned_64=t.longs===String?String(e.unsigned_64):e.unsigned_64:r.unsigned_64=t.longs===String?g.Long.prototype.toString.call(e.unsigned_64):t.longs===Number?new g.LongBits(e.unsigned_64.low>>>0,e.unsigned_64.high>>>0).toNumber(!0):e.unsigned_64),null!=e.regular_i32&&e.hasOwnProperty("regular_i32")&&(r.regular_i32=e.regular_i32),null!=e.regular_i64&&e.hasOwnProperty("regular_i64")&&("number"==typeof e.regular_i64?r.regular_i64=t.longs===String?String(e.regular_i64):e.regular_i64:r.regular_i64=t.longs===String?g.Long.prototype.toString.call(e.regular_i64):t.longs===Number?new g.LongBits(e.regular_i64.low>>>0,e.regular_i64.high>>>0).toNumber():e.regular_i64),null!=e.fixed_u32&&e.hasOwnProperty("fixed_u32")&&(r.fixed_u32=e.fixed_u32),null!=e.fixed_u64&&e.hasOwnProperty("fixed_u64")&&("number"==typeof e.fixed_u64?r.fixed_u64=t.longs===String?String(e.fixed_u64):e.fixed_u64:r.fixed_u64=t.longs===String?g.Long.prototype.toString.call(e.fixed_u64):t.longs===Number?new g.LongBits(e.fixed_u64.low>>>0,e.fixed_u64.high>>>0).toNumber():e.fixed_u64),null!=e.fixed_i32&&e.hasOwnProperty("fixed_i32")&&(r.fixed_i32=e.fixed_i32),null!=e.fixed_i64&&e.hasOwnProperty("fixed_i64")&&("number"==typeof e.fixed_i64?r.fixed_i64=t.longs===String?String(e.fixed_i64):e.fixed_i64:r.fixed_i64=t.longs===String?g.Long.prototype.toString.call(e.fixed_i64):t.longs===Number?new g.LongBits(e.fixed_i64.low>>>0,e.fixed_i64.high>>>0).toNumber():e.fixed_i64),null!=e.float_32&&e.hasOwnProperty("float_32")&&(r.float_32=t.json&&!isFinite(e.float_32)?String(e.float_32):e.float_32),null!=e.float_64&&e.hasOwnProperty("float_64")&&(r.float_64=t.json&&!isFinite(e.float_64)?String(e.float_64):e.float_64),null!=e.boolean&&e.hasOwnProperty("boolean")&&(r.boolean=e.boolean),null!=e.s_i32&&e.hasOwnProperty("s_i32")&&(r.s_i32=e.s_i32),null!=e.s_i64&&e.hasOwnProperty("s_i64")&&("number"==typeof e.s_i64?r.s_i64=t.longs===String?String(e.s_i64):e.s_i64:r.s_i64=t.longs===String?g.Long.prototype.toString.call(e.s_i64):t.longs===Number?new g.LongBits(e.s_i64.low>>>0,e.s_i64.high>>>0).toNumber():e.s_i64),null!=e.bytes_field&&e.hasOwnProperty("bytes_field")&&(r.bytes_field=t.bytes===String?g.base64.encode(e.bytes_field,0,e.bytes_field.length):t.bytes===Array?Array.prototype.slice.call(e.bytes_field):e.bytes_field),null!=e.string_field&&e.hasOwnProperty("string_field")&&(r.string_field=e.string_field),null!=e.message_field&&e.hasOwnProperty("message_field")&&(r.message_field=m.exonum.tests.Point.toObject(e.message_field,t)),null!=e.bit_vec&&e.hasOwnProperty("bit_vec")&&(r.bit_vec=m.exonum.common.BitVec.toObject(e.bit_vec,t)),null!=e.time&&e.hasOwnProperty("time")&&(r.time=m.google.protobuf.Timestamp.toObject(e.time,t)),r},ee.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},ee),u.TestProtobufConvertRepeated=(te.prototype.keys=g.emptyArray,te.prototype.bytes_array=g.emptyArray,te.prototype.string_array=g.emptyArray,te.prototype.num_array=g.emptyArray,te.create=function(e){return new te(e)},te.encode=function(e,t){if(t=t||y.create(),null!=e.keys&&e.keys.length)for(var r=0;r<e.keys.length;++r)m.exonum.crypto.PublicKey.encode(e.keys[r],t.uint32(10).fork()).ldelim();if(null!=e.bytes_array&&e.bytes_array.length)for(r=0;r<e.bytes_array.length;++r)t.uint32(18).bytes(e.bytes_array[r]);if(null!=e.string_array&&e.string_array.length)for(r=0;r<e.string_array.length;++r)t.uint32(26).string(e.string_array[r]);if(null!=e.num_array&&e.num_array.length){for(t.uint32(34).fork(),r=0;r<e.num_array.length;++r)t.uint32(e.num_array[r]);t.ldelim()}return t},te.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},te.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.tests.TestProtobufConvertRepeated;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.keys&&n.keys.length||(n.keys=[]),n.keys.push(m.exonum.crypto.PublicKey.decode(e,e.uint32()));break;case 2:n.bytes_array&&n.bytes_array.length||(n.bytes_array=[]),n.bytes_array.push(e.bytes());break;case 3:n.string_array&&n.string_array.length||(n.string_array=[]),n.string_array.push(e.string());break;case 4:if(n.num_array&&n.num_array.length||(n.num_array=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos<i;)n.num_array.push(e.uint32());else n.num_array.push(e.uint32());break;default:e.skipType(7&o)}}return n},te.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},te.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.keys&&e.hasOwnProperty("keys")){if(!Array.isArray(e.keys))return"keys: array expected";for(var t=0;t<e.keys.length;++t){var r=m.exonum.crypto.PublicKey.verify(e.keys[t]);if(r)return"keys."+r}}if(null!=e.bytes_array&&e.hasOwnProperty("bytes_array")){if(!Array.isArray(e.bytes_array))return"bytes_array: array expected";for(t=0;t<e.bytes_array.length;++t)if(!(e.bytes_array[t]&&"number"==typeof e.bytes_array[t].length||g.isString(e.bytes_array[t])))return"bytes_array: buffer[] expected"}if(null!=e.string_array&&e.hasOwnProperty("string_array")){if(!Array.isArray(e.string_array))return"string_array: array expected";for(t=0;t<e.string_array.length;++t)if(!g.isString(e.string_array[t]))return"string_array: string[] expected"}if(null!=e.num_array&&e.hasOwnProperty("num_array")){if(!Array.isArray(e.num_array))return"num_array: array expected";for(t=0;t<e.num_array.length;++t)if(!g.isInteger(e.num_array[t]))return"num_array: integer[] expected"}return null},te.fromObject=function(e){if(e instanceof m.exonum.tests.TestProtobufConvertRepeated)return e;var t=new m.exonum.tests.TestProtobufConvertRepeated;if(e.keys){if(!Array.isArray(e.keys))throw TypeError(".exonum.tests.TestProtobufConvertRepeated.keys: array expected");t.keys=[];for(var r=0;r<e.keys.length;++r){if("object"!==(0,pe.default)(e.keys[r]))throw TypeError(".exonum.tests.TestProtobufConvertRepeated.keys: object expected");t.keys[r]=m.exonum.crypto.PublicKey.fromObject(e.keys[r])}}if(e.bytes_array){if(!Array.isArray(e.bytes_array))throw TypeError(".exonum.tests.TestProtobufConvertRepeated.bytes_array: array expected");for(t.bytes_array=[],r=0;r<e.bytes_array.length;++r)"string"==typeof e.bytes_array[r]?g.base64.decode(e.bytes_array[r],t.bytes_array[r]=g.newBuffer(g.base64.length(e.bytes_array[r])),0):e.bytes_array[r].length&&(t.bytes_array[r]=e.bytes_array[r])}if(e.string_array){if(!Array.isArray(e.string_array))throw TypeError(".exonum.tests.TestProtobufConvertRepeated.string_array: array expected");for(t.string_array=[],r=0;r<e.string_array.length;++r)t.string_array[r]=String(e.string_array[r])}if(e.num_array){if(!Array.isArray(e.num_array))throw TypeError(".exonum.tests.TestProtobufConvertRepeated.num_array: array expected");for(t.num_array=[],r=0;r<e.num_array.length;++r)t.num_array[r]=e.num_array[r]>>>0}return t},te.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.keys=[],r.bytes_array=[],r.string_array=[],r.num_array=[]),e.keys&&e.keys.length){r.keys=[];for(var n=0;n<e.keys.length;++n)r.keys[n]=m.exonum.crypto.PublicKey.toObject(e.keys[n],t)}if(e.bytes_array&&e.bytes_array.length)for(r.bytes_array=[],n=0;n<e.bytes_array.length;++n)r.bytes_array[n]=t.bytes===String?g.base64.encode(e.bytes_array[n],0,e.bytes_array[n].length):t.bytes===Array?Array.prototype.slice.call(e.bytes_array[n]):e.bytes_array[n];if(e.string_array&&e.string_array.length)for(r.string_array=[],n=0;n<e.string_array.length;++n)r.string_array[n]=e.string_array[n];if(e.num_array&&e.num_array.length)for(r.num_array=[],n=0;n<e.num_array.length;++n)r.num_array[n]=e.num_array[n];return r},te.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},te),u.TestProtobufConvertMap=(re.prototype.num_map=g.emptyObject,re.prototype.string_map=g.emptyObject,re.prototype.bytes_map=g.emptyObject,re.prototype.point_map=g.emptyObject,re.prototype.key_string_map=g.emptyObject,re.create=function(e){return new re(e)},re.encode=function(e,t){if(t=t||y.create(),null!=e.num_map&&e.hasOwnProperty("num_map"))for(var r=Object.keys(e.num_map),n=0;n<r.length;++n)t.uint32(10).fork().uint32(8).uint32(r[n]).uint32(16).uint64(e.num_map[r[n]]).ldelim();if(null!=e.string_map&&e.hasOwnProperty("string_map"))for(r=Object.keys(e.string_map),n=0;n<r.length;++n)t.uint32(18).fork().uint32(8).uint32(r[n]).uint32(18).string(e.string_map[r[n]]).ldelim();if(null!=e.bytes_map&&e.hasOwnProperty("bytes_map"))for(r=Object.keys(e.bytes_map),n=0;n<r.length;++n)t.uint32(34).fork().uint32(8).uint32(r[n]).uint32(18).bytes(e.bytes_map[r[n]]).ldelim();if(null!=e.point_map&&e.hasOwnProperty("point_map"))for(r=Object.keys(e.point_map),n=0;n<r.length;++n)t.uint32(42).fork().uint32(8).uint32(r[n]),m.exonum.tests.Point.encode(e.point_map[r[n]],t.uint32(18).fork()).ldelim().ldelim();if(null!=e.key_string_map&&e.hasOwnProperty("key_string_map"))for(r=Object.keys(e.key_string_map),n=0;n<r.length;++n)t.uint32(50).fork().uint32(10).string(r[n]).uint32(16).uint64(e.key_string_map[r[n]]).ldelim();return t},re.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},re.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r,n=void 0===t?e.len:e.pos+t,o=new m.exonum.tests.TestProtobufConvertMap;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:e.skip().pos++,o.num_map===g.emptyObject&&(o.num_map={}),r=e.uint32(),e.pos++,o.num_map[r]=e.uint64();break;case 2:e.skip().pos++,o.string_map===g.emptyObject&&(o.string_map={}),r=e.uint32(),e.pos++,o.string_map[r]=e.string();break;case 4:e.skip().pos++,o.bytes_map===g.emptyObject&&(o.bytes_map={}),r=e.uint32(),e.pos++,o.bytes_map[r]=e.bytes();break;case 5:e.skip().pos++,o.point_map===g.emptyObject&&(o.point_map={}),r=e.uint32(),e.pos++,o.point_map[r]=m.exonum.tests.Point.decode(e,e.uint32());break;case 6:e.skip().pos++,o.key_string_map===g.emptyObject&&(o.key_string_map={}),r=e.string(),e.pos++,o.key_string_map[r]=e.uint64();break;default:e.skipType(7&i)}}return o},re.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},re.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.num_map&&e.hasOwnProperty("num_map")){if(!g.isObject(e.num_map))return"num_map: object expected";for(var t=Object.keys(e.num_map),r=0;r<t.length;++r){if(!g.key32Re.test(t[r]))return"num_map: integer key{k:uint32} expected";if(!(g.isInteger(e.num_map[t[r]])||e.num_map[t[r]]&&g.isInteger(e.num_map[t[r]].low)&&g.isInteger(e.num_map[t[r]].high)))return"num_map: integer|Long{k:uint32} expected"}}if(null!=e.string_map&&e.hasOwnProperty("string_map")){if(!g.isObject(e.string_map))return"string_map: object expected";for(t=Object.keys(e.string_map),r=0;r<t.length;++r){if(!g.key32Re.test(t[r]))return"string_map: integer key{k:uint32} expected";if(!g.isString(e.string_map[t[r]]))return"string_map: string{k:uint32} expected"}}if(null!=e.bytes_map&&e.hasOwnProperty("bytes_map")){if(!g.isObject(e.bytes_map))return"bytes_map: object expected";for(t=Object.keys(e.bytes_map),r=0;r<t.length;++r){if(!g.key32Re.test(t[r]))return"bytes_map: integer key{k:uint32} expected";if(!(e.bytes_map[t[r]]&&"number"==typeof e.bytes_map[t[r]].length||g.isString(e.bytes_map[t[r]])))return"bytes_map: buffer{k:uint32} expected"}}if(null!=e.point_map&&e.hasOwnProperty("point_map")){if(!g.isObject(e.point_map))return"point_map: object expected";for(t=Object.keys(e.point_map),r=0;r<t.length;++r){if(!g.key32Re.test(t[r]))return"point_map: integer key{k:uint32} expected";var n=m.exonum.tests.Point.verify(e.point_map[t[r]]);if(n)return"point_map."+n}}if(null!=e.key_string_map&&e.hasOwnProperty("key_string_map")){if(!g.isObject(e.key_string_map))return"key_string_map: object expected";for(t=Object.keys(e.key_string_map),r=0;r<t.length;++r)if(!(g.isInteger(e.key_string_map[t[r]])||e.key_string_map[t[r]]&&g.isInteger(e.key_string_map[t[r]].low)&&g.isInteger(e.key_string_map[t[r]].high)))return"key_string_map: integer|Long{k:string} expected"}return null},re.fromObject=function(e){if(e instanceof m.exonum.tests.TestProtobufConvertMap)return e;var t=new m.exonum.tests.TestProtobufConvertMap;if(e.num_map){if("object"!==(0,pe.default)(e.num_map))throw TypeError(".exonum.tests.TestProtobufConvertMap.num_map: object expected");t.num_map={};for(var r=Object.keys(e.num_map),n=0;n<r.length;++n)g.Long?(t.num_map[r[n]]=g.Long.fromValue(e.num_map[r[n]])).unsigned=!0:"string"==typeof e.num_map[r[n]]?t.num_map[r[n]]=parseInt(e.num_map[r[n]],10):"number"==typeof e.num_map[r[n]]?t.num_map[r[n]]=e.num_map[r[n]]:"object"===(0,pe.default)(e.num_map[r[n]])&&(t.num_map[r[n]]=new g.LongBits(e.num_map[r[n]].low>>>0,e.num_map[r[n]].high>>>0).toNumber(!0))}if(e.string_map){if("object"!==(0,pe.default)(e.string_map))throw TypeError(".exonum.tests.TestProtobufConvertMap.string_map: object expected");for(t.string_map={},r=Object.keys(e.string_map),n=0;n<r.length;++n)t.string_map[r[n]]=String(e.string_map[r[n]])}if(e.bytes_map){if("object"!==(0,pe.default)(e.bytes_map))throw TypeError(".exonum.tests.TestProtobufConvertMap.bytes_map: object expected");for(t.bytes_map={},r=Object.keys(e.bytes_map),n=0;n<r.length;++n)"string"==typeof e.bytes_map[r[n]]?g.base64.decode(e.bytes_map[r[n]],t.bytes_map[r[n]]=g.newBuffer(g.base64.length(e.bytes_map[r[n]])),0):e.bytes_map[r[n]].length&&(t.bytes_map[r[n]]=e.bytes_map[r[n]])}if(e.point_map){if("object"!==(0,pe.default)(e.point_map))throw TypeError(".exonum.tests.TestProtobufConvertMap.point_map: object expected");for(t.point_map={},r=Object.keys(e.point_map),n=0;n<r.length;++n){if("object"!==(0,pe.default)(e.point_map[r[n]]))throw TypeError(".exonum.tests.TestProtobufConvertMap.point_map: object expected");t.point_map[r[n]]=m.exonum.tests.Point.fromObject(e.point_map[r[n]])}}if(e.key_string_map){if("object"!==(0,pe.default)(e.key_string_map))throw TypeError(".exonum.tests.TestProtobufConvertMap.key_string_map: object expected");for(t.key_string_map={},r=Object.keys(e.key_string_map),n=0;n<r.length;++n)g.Long?(t.key_string_map[r[n]]=g.Long.fromValue(e.key_string_map[r[n]])).unsigned=!0:"string"==typeof e.key_string_map[r[n]]?t.key_string_map[r[n]]=parseInt(e.key_string_map[r[n]],10):"number"==typeof e.key_string_map[r[n]]?t.key_string_map[r[n]]=e.key_string_map[r[n]]:"object"===(0,pe.default)(e.key_string_map[r[n]])&&(t.key_string_map[r[n]]=new g.LongBits(e.key_string_map[r[n]].low>>>0,e.key_string_map[r[n]].high>>>0).toNumber(!0))}return t},re.toObject=function(e,t){var r,n={};if(((t=t||{}).objects||t.defaults)&&(n.num_map={},n.string_map={},n.bytes_map={},n.point_map={},n.key_string_map={}),e.num_map&&(r=Object.keys(e.num_map)).length){n.num_map={};for(var o=0;o<r.length;++o)"number"==typeof e.num_map[r[o]]?n.num_map[r[o]]=t.longs===String?String(e.num_map[r[o]]):e.num_map[r[o]]:n.num_map[r[o]]=t.longs===String?g.Long.prototype.toString.call(e.num_map[r[o]]):t.longs===Number?new g.LongBits(e.num_map[r[o]].low>>>0,e.num_map[r[o]].high>>>0).toNumber(!0):e.num_map[r[o]]}if(e.string_map&&(r=Object.keys(e.string_map)).length)for(n.string_map={},o=0;o<r.length;++o)n.string_map[r[o]]=e.string_map[r[o]];if(e.bytes_map&&(r=Object.keys(e.bytes_map)).length)for(n.bytes_map={},o=0;o<r.length;++o)n.bytes_map[r[o]]=t.bytes===String?g.base64.encode(e.bytes_map[r[o]],0,e.bytes_map[r[o]].length):t.bytes===Array?Array.prototype.slice.call(e.bytes_map[r[o]]):e.bytes_map[r[o]];if(e.point_map&&(r=Object.keys(e.point_map)).length)for(n.point_map={},o=0;o<r.length;++o)n.point_map[r[o]]=m.exonum.tests.Point.toObject(e.point_map[r[o]],t);if(e.key_string_map&&(r=Object.keys(e.key_string_map)).length)for(n.key_string_map={},o=0;o<r.length;++o)"number"==typeof e.key_string_map[r[o]]?n.key_string_map[r[o]]=t.longs===String?String(e.key_string_map[r[o]]):e.key_string_map[r[o]]:n.key_string_map[r[o]]=t.longs===String?g.Long.prototype.toString.call(e.key_string_map[r[o]]):t.longs===Number?new g.LongBits(e.key_string_map[r[o]].low>>>0,e.key_string_map[r[o]].high>>>0).toNumber(!0):e.key_string_map[r[o]];return n},re.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},re),u.TestFixedArrays=(ne.prototype.fixed_array_8=g.newBuffer([]),ne.prototype.fixed_array_16=g.newBuffer([]),ne.prototype.fixed_array_32=g.newBuffer([]),ne.create=function(e){return new ne(e)},ne.encode=function(e,t){return t=t||y.create(),null!=e.fixed_array_8&&e.hasOwnProperty("fixed_array_8")&&t.uint32(10).bytes(e.fixed_array_8),null!=e.fixed_array_16&&e.hasOwnProperty("fixed_array_16")&&t.uint32(18).bytes(e.fixed_array_16),null!=e.fixed_array_32&&e.hasOwnProperty("fixed_array_32")&&t.uint32(26).bytes(e.fixed_array_32),t},ne.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ne.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.tests.TestFixedArrays;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.fixed_array_8=e.bytes();break;case 2:n.fixed_array_16=e.bytes();break;case 3:n.fixed_array_32=e.bytes();break;default:e.skipType(7&o)}}return n},ne.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ne.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.fixed_array_8&&e.hasOwnProperty("fixed_array_8")&&!(e.fixed_array_8&&"number"==typeof e.fixed_array_8.length||g.isString(e.fixed_array_8))?"fixed_array_8: buffer expected":null!=e.fixed_array_16&&e.hasOwnProperty("fixed_array_16")&&!(e.fixed_array_16&&"number"==typeof e.fixed_array_16.length||g.isString(e.fixed_array_16))?"fixed_array_16: buffer expected":null!=e.fixed_array_32&&e.hasOwnProperty("fixed_array_32")&&!(e.fixed_array_32&&"number"==typeof e.fixed_array_32.length||g.isString(e.fixed_array_32))?"fixed_array_32: buffer expected":null},ne.fromObject=function(e){if(e instanceof m.exonum.tests.TestFixedArrays)return e;var t=new m.exonum.tests.TestFixedArrays;return null!=e.fixed_array_8&&("string"==typeof e.fixed_array_8?g.base64.decode(e.fixed_array_8,t.fixed_array_8=g.newBuffer(g.base64.length(e.fixed_array_8)),0):e.fixed_array_8.length&&(t.fixed_array_8=e.fixed_array_8)),null!=e.fixed_array_16&&("string"==typeof e.fixed_array_16?g.base64.decode(e.fixed_array_16,t.fixed_array_16=g.newBuffer(g.base64.length(e.fixed_array_16)),0):e.fixed_array_16.length&&(t.fixed_array_16=e.fixed_array_16)),null!=e.fixed_array_32&&("string"==typeof e.fixed_array_32?g.base64.decode(e.fixed_array_32,t.fixed_array_32=g.newBuffer(g.base64.length(e.fixed_array_32)),0):e.fixed_array_32.length&&(t.fixed_array_32=e.fixed_array_32)),t},ne.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(t.bytes===String?r.fixed_array_8="":(r.fixed_array_8=[],t.bytes!==Array&&(r.fixed_array_8=g.newBuffer(r.fixed_array_8))),t.bytes===String?r.fixed_array_16="":(r.fixed_array_16=[],t.bytes!==Array&&(r.fixed_array_16=g.newBuffer(r.fixed_array_16))),t.bytes===String?r.fixed_array_32="":(r.fixed_array_32=[],t.bytes!==Array&&(r.fixed_array_32=g.newBuffer(r.fixed_array_32)))),null!=e.fixed_array_8&&e.hasOwnProperty("fixed_array_8")&&(r.fixed_array_8=t.bytes===String?g.base64.encode(e.fixed_array_8,0,e.fixed_array_8.length):t.bytes===Array?Array.prototype.slice.call(e.fixed_array_8):e.fixed_array_8),null!=e.fixed_array_16&&e.hasOwnProperty("fixed_array_16")&&(r.fixed_array_16=t.bytes===String?g.base64.encode(e.fixed_array_16,0,e.fixed_array_16.length):t.bytes===Array?Array.prototype.slice.call(e.fixed_array_16):e.fixed_array_16),null!=e.fixed_array_32&&e.hasOwnProperty("fixed_array_32")&&(r.fixed_array_32=t.bytes===String?g.base64.encode(e.fixed_array_32,0,e.fixed_array_32.length):t.bytes===Array?Array.prototype.slice.call(e.fixed_array_32):e.fixed_array_32),r},ne.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},ne),u),l.proof=((f={}).ListProof=(oe.prototype.proof=g.emptyArray,oe.prototype.entries=g.emptyArray,oe.prototype.length=g.Long?g.Long.fromBits(0,0,!0):0,oe.create=function(e){return new oe(e)},oe.encode=function(e,t){if(t=t||y.create(),null!=e.proof&&e.proof.length)for(var r=0;r<e.proof.length;++r)m.exonum.proof.HashedEntry.encode(e.proof[r],t.uint32(10).fork()).ldelim();if(null!=e.entries&&e.entries.length)for(r=0;r<e.entries.length;++r)m.exonum.proof.ListProofEntry.encode(e.entries[r],t.uint32(18).fork()).ldelim();return null!=e.length&&e.hasOwnProperty("length")&&t.uint32(24).uint64(e.length),t},oe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},oe.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proof.ListProof;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.proof&&n.proof.length||(n.proof=[]),n.proof.push(m.exonum.proof.HashedEntry.decode(e,e.uint32()));break;case 2:n.entries&&n.entries.length||(n.entries=[]),n.entries.push(m.exonum.proof.ListProofEntry.decode(e,e.uint32()));break;case 3:n.length=e.uint64();break;default:e.skipType(7&o)}}return n},oe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},oe.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.proof&&e.hasOwnProperty("proof")){if(!Array.isArray(e.proof))return"proof: array expected";for(var t=0;t<e.proof.length;++t)if(r=m.exonum.proof.HashedEntry.verify(e.proof[t]))return"proof."+r}if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(t=0;t<e.entries.length;++t){var r;if(r=m.exonum.proof.ListProofEntry.verify(e.entries[t]))return"entries."+r}}return null!=e.length&&e.hasOwnProperty("length")&&!(g.isInteger(e.length)||e.length&&g.isInteger(e.length.low)&&g.isInteger(e.length.high))?"length: integer|Long expected":null},oe.fromObject=function(e){if(e instanceof m.exonum.proof.ListProof)return e;var t=new m.exonum.proof.ListProof;if(e.proof){if(!Array.isArray(e.proof))throw TypeError(".exonum.proof.ListProof.proof: array expected");t.proof=[];for(var r=0;r<e.proof.length;++r){if("object"!==(0,pe.default)(e.proof[r]))throw TypeError(".exonum.proof.ListProof.proof: object expected");t.proof[r]=m.exonum.proof.HashedEntry.fromObject(e.proof[r])}}if(e.entries){if(!Array.isArray(e.entries))throw TypeError(".exonum.proof.ListProof.entries: array expected");for(t.entries=[],r=0;r<e.entries.length;++r){if("object"!==(0,pe.default)(e.entries[r]))throw TypeError(".exonum.proof.ListProof.entries: object expected");t.entries[r]=m.exonum.proof.ListProofEntry.fromObject(e.entries[r])}}return null!=e.length&&(g.Long?(t.length=g.Long.fromValue(e.length)).unsigned=!0:"string"==typeof e.length?t.length=parseInt(e.length,10):"number"==typeof e.length?t.length=e.length:"object"===(0,pe.default)(e.length)&&(t.length=new g.LongBits(e.length.low>>>0,e.length.high>>>0).toNumber(!0))),t},oe.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.proof=[],r.entries=[]),t.defaults)if(g.Long){var n=new g.Long(0,0,!0);r.length=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.length=t.longs===String?"0":0;if(e.proof&&e.proof.length){r.proof=[];for(var o=0;o<e.proof.length;++o)r.proof[o]=m.exonum.proof.HashedEntry.toObject(e.proof[o],t)}if(e.entries&&e.entries.length)for(r.entries=[],o=0;o<e.entries.length;++o)r.entries[o]=m.exonum.proof.ListProofEntry.toObject(e.entries[o],t);return null!=e.length&&e.hasOwnProperty("length")&&("number"==typeof e.length?r.length=t.longs===String?String(e.length):e.length:r.length=t.longs===String?g.Long.prototype.toString.call(e.length):t.longs===Number?new g.LongBits(e.length.low>>>0,e.length.high>>>0).toNumber(!0):e.length),r},oe.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},oe),f.HashedEntry=(ie.prototype.key=null,ie.prototype.hash=null,ie.create=function(e){return new ie(e)},ie.encode=function(e,t){return t=t||y.create(),null!=e.key&&e.hasOwnProperty("key")&&m.exonum.proof.ProofListKey.encode(e.key,t.uint32(10).fork()).ldelim(),null!=e.hash&&e.hasOwnProperty("hash")&&m.exonum.crypto.Hash.encode(e.hash,t.uint32(18).fork()).ldelim(),t},ie.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ie.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proof.HashedEntry;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.key=m.exonum.proof.ProofListKey.decode(e,e.uint32());break;case 2:n.hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},ie.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ie.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&(t=m.exonum.proof.ProofListKey.verify(e.key))?"key."+t:null!=e.hash&&e.hasOwnProperty("hash")&&(t=m.exonum.crypto.Hash.verify(e.hash))?"hash."+t:null;var t},ie.fromObject=function(e){if(e instanceof m.exonum.proof.HashedEntry)return e;var t=new m.exonum.proof.HashedEntry;if(null!=e.key){if("object"!==(0,pe.default)(e.key))throw TypeError(".exonum.proof.HashedEntry.key: object expected");t.key=m.exonum.proof.ProofListKey.fromObject(e.key)}if(null!=e.hash){if("object"!==(0,pe.default)(e.hash))throw TypeError(".exonum.proof.HashedEntry.hash: object expected");t.hash=m.exonum.crypto.Hash.fromObject(e.hash)}return t},ie.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.key=null,r.hash=null),null!=e.key&&e.hasOwnProperty("key")&&(r.key=m.exonum.proof.ProofListKey.toObject(e.key,t)),null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=m.exonum.crypto.Hash.toObject(e.hash,t)),r},ie.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},ie),f.ListProofEntry=(se.prototype.index=g.Long?g.Long.fromBits(0,0,!0):0,se.prototype.value=g.newBuffer([]),se.create=function(e){return new se(e)},se.encode=function(e,t){return t=t||y.create(),null!=e.index&&e.hasOwnProperty("index")&&t.uint32(8).uint64(e.index),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(18).bytes(e.value),t},se.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},se.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proof.ListProofEntry;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.index=e.uint64();break;case 2:n.value=e.bytes();break;default:e.skipType(7&o)}}return n},se.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},se.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.index&&e.hasOwnProperty("index")&&!(g.isInteger(e.index)||e.index&&g.isInteger(e.index.low)&&g.isInteger(e.index.high))?"index: integer|Long expected":null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||g.isString(e.value))?"value: buffer expected":null},se.fromObject=function(e){if(e instanceof m.exonum.proof.ListProofEntry)return e;var t=new m.exonum.proof.ListProofEntry;return null!=e.index&&(g.Long?(t.index=g.Long.fromValue(e.index)).unsigned=!0:"string"==typeof e.index?t.index=parseInt(e.index,10):"number"==typeof e.index?t.index=e.index:"object"===(0,pe.default)(e.index)&&(t.index=new g.LongBits(e.index.low>>>0,e.index.high>>>0).toNumber(!0))),null!=e.value&&("string"==typeof e.value?g.base64.decode(e.value,t.value=g.newBuffer(g.base64.length(e.value)),0):e.value.length&&(t.value=e.value)),t},se.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(g.Long){var n=new g.Long(0,0,!0);r.index=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.index=t.longs===String?"0":0;t.bytes===String?r.value="":(r.value=[],t.bytes!==Array&&(r.value=g.newBuffer(r.value)))}return null!=e.index&&e.hasOwnProperty("index")&&("number"==typeof e.index?r.index=t.longs===String?String(e.index):e.index:r.index=t.longs===String?g.Long.prototype.toString.call(e.index):t.longs===Number?new g.LongBits(e.index.low>>>0,e.index.high>>>0).toNumber(!0):e.index),null!=e.value&&e.hasOwnProperty("value")&&(r.value=t.bytes===String?g.base64.encode(e.value,0,e.value.length):t.bytes===Array?Array.prototype.slice.call(e.value):e.value),r},se.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},se),f.ProofListKey=(ae.prototype.index=g.Long?g.Long.fromBits(0,0,!0):0,ae.prototype.height=0,ae.create=function(e){return new ae(e)},ae.encode=function(e,t){return t=t||y.create(),null!=e.index&&e.hasOwnProperty("index")&&t.uint32(8).uint64(e.index),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint32(e.height),t},ae.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ae.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proof.ProofListKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.index=e.uint64();break;case 2:n.height=e.uint32();break;default:e.skipType(7&o)}}return n},ae.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ae.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.index&&e.hasOwnProperty("index")&&!(g.isInteger(e.index)||e.index&&g.isInteger(e.index.low)&&g.isInteger(e.index.high))?"index: integer|Long expected":null!=e.height&&e.hasOwnProperty("height")&&!g.isInteger(e.height)?"height: integer expected":null},ae.fromObject=function(e){if(e instanceof m.exonum.proof.ProofListKey)return e;var t=new m.exonum.proof.ProofListKey;return null!=e.index&&(g.Long?(t.index=g.Long.fromValue(e.index)).unsigned=!0:"string"==typeof e.index?t.index=parseInt(e.index,10):"number"==typeof e.index?t.index=e.index:"object"===(0,pe.default)(e.index)&&(t.index=new g.LongBits(e.index.low>>>0,e.index.high>>>0).toNumber(!0))),null!=e.height&&(t.height=e.height>>>0),t},ae.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(g.Long){var n=new g.Long(0,0,!0);r.index=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.index=t.longs===String?"0":0;r.height=0}return null!=e.index&&e.hasOwnProperty("index")&&("number"==typeof e.index?r.index=t.longs===String?String(e.index):e.index:r.index=t.longs===String?g.Long.prototype.toString.call(e.index):t.longs===Number?new g.LongBits(e.index.low>>>0,e.index.high>>>0).toNumber(!0):e.index),null!=e.height&&e.hasOwnProperty("height")&&(r.height=e.height),r},ae.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},ae),f.MapProof=(ue.prototype.entries=g.emptyArray,ue.prototype.proof=g.emptyArray,ue.create=function(e){return new ue(e)},ue.encode=function(e,t){if(t=t||y.create(),null!=e.entries&&e.entries.length)for(var r=0;r<e.entries.length;++r)m.exonum.proof.OptionalEntry.encode(e.entries[r],t.uint32(10).fork()).ldelim();if(null!=e.proof&&e.proof.length)for(r=0;r<e.proof.length;++r)m.exonum.proof.MapProofEntry.encode(e.proof[r],t.uint32(18).fork()).ldelim();return t},ue.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ue.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proof.MapProof;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.entries&&n.entries.length||(n.entries=[]),n.entries.push(m.exonum.proof.OptionalEntry.decode(e,e.uint32()));break;case 2:n.proof&&n.proof.length||(n.proof=[]),n.proof.push(m.exonum.proof.MapProofEntry.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},ue.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ue.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t<e.entries.length;++t)if(r=m.exonum.proof.OptionalEntry.verify(e.entries[t]))return"entries."+r}if(null!=e.proof&&e.hasOwnProperty("proof")){if(!Array.isArray(e.proof))return"proof: array expected";for(t=0;t<e.proof.length;++t){var r;if(r=m.exonum.proof.MapProofEntry.verify(e.proof[t]))return"proof."+r}}return null},ue.fromObject=function(e){if(e instanceof m.exonum.proof.MapProof)return e;var t=new m.exonum.proof.MapProof;if(e.entries){if(!Array.isArray(e.entries))throw TypeError(".exonum.proof.MapProof.entries: array expected");t.entries=[];for(var r=0;r<e.entries.length;++r){if("object"!==(0,pe.default)(e.entries[r]))throw TypeError(".exonum.proof.MapProof.entries: object expected");t.entries[r]=m.exonum.proof.OptionalEntry.fromObject(e.entries[r])}}if(e.proof){if(!Array.isArray(e.proof))throw TypeError(".exonum.proof.MapProof.proof: array expected");for(t.proof=[],r=0;r<e.proof.length;++r){if("object"!==(0,pe.default)(e.proof[r]))throw TypeError(".exonum.proof.MapProof.proof: object expected");t.proof[r]=m.exonum.proof.MapProofEntry.fromObject(e.proof[r])}}return t},ue.toObject=function(e,t){var r={};if(((t=t||{}).arrays||t.defaults)&&(r.entries=[],r.proof=[]),e.entries&&e.entries.length){r.entries=[];for(var n=0;n<e.entries.length;++n)r.entries[n]=m.exonum.proof.OptionalEntry.toObject(e.entries[n],t)}if(e.proof&&e.proof.length)for(r.proof=[],n=0;n<e.proof.length;++n)r.proof[n]=m.exonum.proof.MapProofEntry.toObject(e.proof[n],t);return r},ue.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},ue),f.OptionalEntry=(ce.prototype.key=g.newBuffer([]),ce.prototype.value=g.newBuffer([]),ce.prototype.no_value=null,Object.defineProperty(ce.prototype,"maybe_value",{get:g.oneOfGetter(c=["value","no_value"]),set:g.oneOfSetter(c)}),ce.create=function(e){return new ce(e)},ce.encode=function(e,t){return t=t||y.create(),null!=e.key&&e.hasOwnProperty("key")&&t.uint32(10).bytes(e.key),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(18).bytes(e.value),null!=e.no_value&&e.hasOwnProperty("no_value")&&m.google.protobuf.Empty.encode(e.no_value,t.uint32(26).fork()).ldelim(),t},ce.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ce.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proof.OptionalEntry;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.key=e.bytes();break;case 2:n.value=e.bytes();break;case 3:n.no_value=m.google.protobuf.Empty.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},ce.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ce.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";var t={};if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||g.isString(e.key)))return"key: buffer expected";if(null!=e.value&&e.hasOwnProperty("value")&&(t.maybe_value=1,!(e.value&&"number"==typeof e.value.length||g.isString(e.value))))return"value: buffer expected";if(null!=e.no_value&&e.hasOwnProperty("no_value")){if(1===t.maybe_value)return"maybe_value: multiple values";t.maybe_value=1;var r=m.google.protobuf.Empty.verify(e.no_value);if(r)return"no_value."+r}return null},ce.fromObject=function(e){if(e instanceof m.exonum.proof.OptionalEntry)return e;var t=new m.exonum.proof.OptionalEntry;if(null!=e.key&&("string"==typeof e.key?g.base64.decode(e.key,t.key=g.newBuffer(g.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.value&&("string"==typeof e.value?g.base64.decode(e.value,t.value=g.newBuffer(g.base64.length(e.value)),0):e.value.length&&(t.value=e.value)),null!=e.no_value){if("object"!==(0,pe.default)(e.no_value))throw TypeError(".exonum.proof.OptionalEntry.no_value: object expected");t.no_value=m.google.protobuf.Empty.fromObject(e.no_value)}return t},ce.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(t.bytes===String?r.key="":(r.key=[],t.bytes!==Array&&(r.key=g.newBuffer(r.key)))),null!=e.key&&e.hasOwnProperty("key")&&(r.key=t.bytes===String?g.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.value&&e.hasOwnProperty("value")&&(r.value=t.bytes===String?g.base64.encode(e.value,0,e.value.length):t.bytes===Array?Array.prototype.slice.call(e.value):e.value,t.oneofs&&(r.maybe_value="value")),null!=e.no_value&&e.hasOwnProperty("no_value")&&(r.no_value=m.google.protobuf.Empty.toObject(e.no_value,t),t.oneofs&&(r.maybe_value="no_value")),r},ce.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},ce),f.MapProofEntry=(fe.prototype.proof_path=g.newBuffer([]),fe.prototype.hash=null,fe.create=function(e){return new fe(e)},fe.encode=function(e,t){return t=t||y.create(),null!=e.proof_path&&e.hasOwnProperty("proof_path")&&t.uint32(10).bytes(e.proof_path),null!=e.hash&&e.hasOwnProperty("hash")&&m.exonum.crypto.Hash.encode(e.hash,t.uint32(18).fork()).ldelim(),t},fe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},fe.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.exonum.proof.MapProofEntry;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.proof_path=e.bytes();break;case 2:n.hash=m.exonum.crypto.Hash.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},fe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},fe.verify=function(e){if("object"!==(0,pe.default)(e)||null===e)return"object expected";if(null!=e.proof_path&&e.hasOwnProperty("proof_path")&&!(e.proof_path&&"number"==typeof e.proof_path.length||g.isString(e.proof_path)))return"proof_path: buffer expected";if(null!=e.hash&&e.hasOwnProperty("hash")){var t=m.exonum.crypto.Hash.verify(e.hash);if(t)return"hash."+t}return null},fe.fromObject=function(e){if(e instanceof m.exonum.proof.MapProofEntry)return e;var t=new m.exonum.proof.MapProofEntry;if(null!=e.proof_path&&("string"==typeof e.proof_path?g.base64.decode(e.proof_path,t.proof_path=g.newBuffer(g.base64.length(e.proof_path)),0):e.proof_path.length&&(t.proof_path=e.proof_path)),null!=e.hash){if("object"!==(0,pe.default)(e.hash))throw TypeError(".exonum.proof.MapProofEntry.hash: object expected");t.hash=m.exonum.crypto.Hash.fromObject(e.hash)}return t},fe.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(t.bytes===String?r.proof_path="":(r.proof_path=[],t.bytes!==Array&&(r.proof_path=g.newBuffer(r.proof_path))),r.hash=null),null!=e.proof_path&&e.hasOwnProperty("proof_path")&&(r.proof_path=t.bytes===String?g.base64.encode(e.proof_path,0,e.proof_path.length):t.bytes===Array?Array.prototype.slice.call(e.proof_path):e.proof_path),null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=m.exonum.crypto.Hash.toObject(e.hash,t)),r},fe.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},fe),f),l),m.google=((p={}).protobuf=((h={}).Timestamp=(le.prototype.seconds=g.Long?g.Long.fromBits(0,0,!1):0,le.prototype.nanos=0,le.create=function(e){return new le(e)},le.encode=function(e,t){return t=t||y.create(),null!=e.seconds&&e.hasOwnProperty("seconds")&&t.uint32(8).int64(e.seconds),null!=e.nanos&&e.hasOwnProperty("nanos")&&t.uint32(16).int32(e.nanos),t},le.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},le.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.google.protobuf.Timestamp;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.seconds=e.int64();break;case 2:n.nanos=e.int32();break;default:e.skipType(7&o)}}return n},le.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},le.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null!=e.seconds&&e.hasOwnProperty("seconds")&&!(g.isInteger(e.seconds)||e.seconds&&g.isInteger(e.seconds.low)&&g.isInteger(e.seconds.high))?"seconds: integer|Long expected":null!=e.nanos&&e.hasOwnProperty("nanos")&&!g.isInteger(e.nanos)?"nanos: integer expected":null},le.fromObject=function(e){if(e instanceof m.google.protobuf.Timestamp)return e;var t=new m.google.protobuf.Timestamp;return null!=e.seconds&&(g.Long?(t.seconds=g.Long.fromValue(e.seconds)).unsigned=!1:"string"==typeof e.seconds?t.seconds=parseInt(e.seconds,10):"number"==typeof e.seconds?t.seconds=e.seconds:"object"===(0,pe.default)(e.seconds)&&(t.seconds=new g.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber())),null!=e.nanos&&(t.nanos=0|e.nanos),t},le.toObject=function(e,t){var r={};if((t=t||{}).defaults){if(g.Long){var n=new g.Long(0,0,!1);r.seconds=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.seconds=t.longs===String?"0":0;r.nanos=0}return null!=e.seconds&&e.hasOwnProperty("seconds")&&("number"==typeof e.seconds?r.seconds=t.longs===String?String(e.seconds):e.seconds:r.seconds=t.longs===String?g.Long.prototype.toString.call(e.seconds):t.longs===Number?new g.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber():e.seconds),null!=e.nanos&&e.hasOwnProperty("nanos")&&(r.nanos=e.nanos),r},le.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},le),h.Empty=(he.create=function(e){return new he(e)},he.encode=function(e,t){return t=t||y.create()},he.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},he.decode=function(e,t){e instanceof d||(e=d.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new m.google.protobuf.Empty;e.pos<r;){var o=e.uint32();e.skipType(7&o)}return n},he.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},he.verify=function(e){return"object"!==(0,pe.default)(e)||null===e?"object expected":null},he.fromObject=function(e){return e instanceof m.google.protobuf.Empty?e:new m.google.protobuf.Empty},he.toObject=function(){return{}},he.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},he),h),p),m},"function"==typeof define&&define.amd?define(["protobufjs/minimal"],n):"function"==typeof e&&"object"===(void 0===t?"undefined":(0,pe.default)(t))&&t&&t.exports&&(t.exports=n(e("protobufjs/minimal")))},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/typeof":22,"protobufjs/minimal":67}],90:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=n(e("@babel/runtime/helpers/classCallCheck")),s=n(e("@babel/runtime/helpers/createClass")),a=e("../types/convert"),o=function(){function o(e){var t,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:256;if((0,i.default)(this,o),"string"==typeof e)this.key=(0,a.binaryStringToUint8Array)((r=256,(t=e)+c.substring(0,r-t.length))),n=e.length;else{if(!(e instanceof Uint8Array&&32===e.length))throw new TypeError("Invalid `bits` parameter");this.key=e.slice(0)}this.bitLength=n,this.hexKey=(0,a.uint8ArrayToHexadecimal)(this.key)}return(0,s.default)(o,[{key:"isTerminal",value:function(){return 256===this.bitLength}},{key:"bit",value:function(e){var t,r,n,o;if(!((e=+e)>=this.bitLength||e<0))return t=this.key,r=e,n=Math.floor(r/8),o=r%8,(t[n]&1<<o)>>o}},{key:"commonPrefixLength",value:function(e){var t,r=Math.min(this.bitLength,e.bitLength);for(t=0;t<r>>3&&this.key[t>>3]===e.key[t>>3];t+=8);for(;t<r&&this.bit(t)===e.bit(t);t++);return t}},{key:"commonPrefix",value:function(e){var t=this.commonPrefixLength(e);return this.truncate(t)}},{key:"startsWith",value:function(e){return this.commonPrefixLength(e)===e.bitLength}},{key:"compare",value:function(e){var t=[this.bitLength,e.bitLength],r=t[0],n=t[1],o=Math.min(r,n),i=this.commonPrefixLength(e);return i===o?Math.sign(r-n):this.bit(i)-e.bit(i)}},{key:"truncate",value:function(e){if((e=+e)>this.bitLength)throw new TypeError("Cannot truncate bit slice to length more than current "+"(current: ".concat(this.bitLength,", requested: ").concat(e,")"));for(var t=new Uint8Array(32),r=0;r<e>>3;r++)t[r]=this.key[r];for(var n=8*(e>>3);n<e;n++)u(t,n,this.bit(n));return new o(t,e)}},{key:"serialize",value:function(e){this.bitLength<128?e.push(this.bitLength):e.push(128+this.bitLength%128,this.bitLength>>7);for(var t=0;t<this.bitLength+7>>3;t++)e.push(this.key[t])}},{key:"toJSON",value:function(){return f((0,a.hexadecimalToBinaryString)(this.hexKey),this.bitLength)}},{key:"toString",value:function(){var e=(0,a.hexadecimalToBinaryString)(this.hexKey);return e=8<this.bitLength?f(e,8)+"...":f(e,this.bitLength),"path(".concat(e,")")}}]),o}();function u(e,t,r){var n=Math.floor(t/8),o=t%8;if(0===r){var i=255-(1<<o);e[n]&=i}else{var s=1<<o;e[n]|=s}}(r.default=o).BYTE_LENGTH=32;var c=function(){for(var e="0",t=0;t<8;t++)e+=e;return e}();function f(e,t){if(e.length<t)throw new Error("Invariant broken: negative zero trimming requested");return e.substring(0,t)}},{"../types/convert":118,"@babel/runtime/helpers/classCallCheck":5,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/interopRequireDefault":11}],91:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.verifyBlock=function(p,d){return new Promise(function(e){var t,r={prev_hash:{data:(0,m.hexadecimalToUint8Array)(p.block.prev_hash)},tx_hash:{data:(0,m.hexadecimalToUint8Array)(p.block.tx_hash)},state_hash:{data:(0,m.hexadecimalToUint8Array)(p.block.state_hash)}};0!==p.block.proposer_id&&(r.proposer_id=p.block.proposer_id),0!==p.block.height&&(r.height=p.block.height),0!==p.block.tx_count&&(r.tx_count=p.block.tx_count);var n=g.exonum.Block.create(r),o=new Uint8Array(g.exonum.Block.encode(n).finish());t=(0,b.hash)(o);for(var i=0;i<p.precommits.length;i++){var s=p.precommits[i],a=(0,m.hexadecimalToUint8Array)(s),u=g.exonum.consensus.SignedMessage.decode(new Uint8Array(a)),c=g.exonum.consensus.ExonumMessage.decode(u.payload);c=c.precommit;var f=g.exonum.consensus.Precommit.toObject(c);if(0!==y.fromValue(f.height).compare(y.fromValue(p.block.height)))throw new Error("Precommit height is not match with block height");if((0,m.uint8ArrayToHexadecimal)(f.block_hash.data)!==t)throw new Error("Precommit block hash is not match with calculated block hash");var l=d[f.validator||0];if((0,m.uint8ArrayToHexadecimal)(u.author.data)!==l)throw new Error("Precommit public key is not match with buffer");var h=(0,m.uint8ArrayToHexadecimal)(u.signature.data);if(!(0,b.verifySignature)(h,l,u.payload))throw new Error("Precommit signature is wrong")}e()})},r.protocol=void 0;var y=n(e("long")),g=n(e("../../proto/protocol.js"));r.protocol=g;var m=e("../types/convert"),b=e("../crypto")},{"../../proto/protocol.js":89,"../crypto":100,"../types/convert":118,"@babel/runtime/helpers/interopRequireWildcard":12,long:65}],92:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MAP_BRANCH_PREFIX=r.MAP_PREFIX=r.LIST_BRANCH_PREFIX=r.LIST_PREFIX=r.BLOB_PREFIX=void 0;r.BLOB_PREFIX=0;r.LIST_PREFIX=2;r.LIST_BRANCH_PREFIX=1;r.MAP_PREFIX=3;r.MAP_BRANCH_PREFIX=4},{}],93:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./merkle");Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}})});var o=e("./merkle-patricia");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}})});var i=e("./block");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}})});var s=e("./transport");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}})});var a=e("./table");Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}})})},{"./block":91,"./merkle":95,"./merkle-patricia":94,"./table":96,"./transport":97}],94:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.MapProofError=r.MapProof=void 0;var o=n(e("@babel/runtime/helpers/possibleConstructorReturn")),i=n(e("@babel/runtime/helpers/getPrototypeOf")),s=n(e("@babel/runtime/helpers/inherits")),a=n(e("@babel/runtime/helpers/wrapNativeSuper")),f=n(e("@babel/runtime/helpers/toConsumableArray")),l=n(e("@babel/runtime/helpers/classCallCheck")),h=n(e("binary-search")),p=e("../crypto"),d=e("../types/hexadecimal"),y=e("./constants"),g=n(e("./ProofPath")),m=e("../types");r.MapProof=function e(t,r,n){if((0,l.default)(this,e),!n)throw new TypeError("Invalid value type");if("function"==typeof n.encode&&"function"!=typeof n.serialize)n.serialize=function(e,t,r){return this.encode(e).finish()};else if("function"!=typeof n.serialize)throw new TypeError("No `hash` or `serialize` method in the value type");if(this.valueType=n,this.proof=function(e){if(!Array.isArray(e))throw new b("malformedProof");if(e.every(function(e){var t=e.path,r=e.hash;return/^[01]{1,256}$/.test(t)&&/^[0-9a-f]{64}$/i.test(r)}))return e.map(function(e){var t=e.path,r=e.hash;return{path:new g.default(t),hash:r}});throw new b("malformedProof")}(t.proof),this.entries=function(e,n,o){function i(e){var t="function"==typeof n.hash?n.hash(e):(0,p.hash)(n.serialize(e,[],0)),r=(0,m.hexadecimalToUint8Array)(t);return new g.default(new Uint8Array(r))}if(Array.isArray(e))return e.map(function(e){var t=e.missing,r=e.key,n=e.value;if(void 0===t&&(void 0===r||void 0===n))throw new b("unknownEntryType");if(void 0!==t&&(void 0!==r||void 0!==n))throw new b("ambiguousEntryType");return void 0!==t?{missing:t,path:i(t)}:{key:r,value:n,path:i(r),hash:(0,p.hash)([y.BLOB_PREFIX].concat((0,f.default)(o.serialize(n,[],0))))}});throw new b("malformedEntries")}(t.entries,r,n),!r||"function"!=typeof r.serialize)throw new TypeError("No `serialize` method in the key type");this.keyType=r,function(){for(var i=this,e=1;e<this.proof.length;e++){var t=[this.proof[e-1],this.proof[e]],r=t[0].path,n=t[1].path;switch(r.compare(n)){case-1:if(n.startsWith(r))throw new b("embeddedPaths",r,n);break;case 0:throw new b("duplicatePath",n);case 1:throw new b("invalidOrdering",r,n)}}this.entries.forEach(function(e){var t=e.path,r=(0,h.default)(i.proof,t,function(e,t){return e.path.compare(t)});if(0<=r)throw new b("duplicatePath",t);var n=-r-1;if(0<n){var o=i.proof[n-1].path;if(t.startsWith(o))throw new b("embeddedPaths",o,t)}})}.call(this);for(var o=this.proof.concat(this.entries).sort(function(e,t){var r=e.path,n=t.path;return r.compare(n)}),i=1;i<o.length;i++){var s=[o[i-1],o[i]],a=s[0].path,u=s[1].path;if(0===a.compare(u))throw new b("duplicatePath",a)}var c=(0,m.hexadecimalToUint8Array)(function(e){function o(e,t){var r,n,o,i,s,a=(r=e.hash,n=t.hash,o=e.path,i=t.path,s=[y.MAP_BRANCH_PREFIX],d.Hash.serialize(r,s,s.length),d.Hash.serialize(n,s,s.length),o.serialize(s),i.serialize(s),s);return(0,p.hash)(a)}function t(e,t){var r=e.pop(),n=e.pop();return e.push({path:t,hash:o(n,r)}),1<e.length?t.commonPrefix(e[e.length-2].path):null}switch(e.length){case 0:return"0000000000000000000000000000000000000000000000000000000000000000";case 1:if(!e[0].path.isTerminal())throw new b("nonTerminalNode",e[0].path);return function(e){var t,r,n,o=e.path,i=e.hash,s=(t=o,r=i,n=[y.MAP_BRANCH_PREFIX,1].concat((0,f.default)(t.key),[0]),d.Hash.serialize(r,n,n.length),n);return(0,p.hash)(s)}(e[0]);default:var r=[],n=e[0].path.commonPrefix(e[1].path);r.push(e[0],e[1]);for(var i=2;i<e.length;i++){for(var s=e[i],a=s.path.commonPrefix(r[r.length-1].path);1<r.length&&a.bitLength<n.bitLength;){var u=t(r,n);u&&(n=u)}r.push(s),n=a}for(;1<r.length;)n=t(r,n);return r[0].hash}}(o.filter(function(e){return!!e.hash})));this.merkleRoot=(0,p.hash)([y.MAP_PREFIX].concat((0,f.default)(c))),this.missingKeys=new Set(this.entries.filter(function(e){return void 0!==e.missing}).map(function(e){return e.missing})),this.entries=new Map(this.entries.filter(function(e){return void 0!==e.key}).map(function(e){return[e.key,e.value]}))};var b=function(e){function r(e){var t;switch((0,l.default)(this,r),e){case"malformedProof":t=(0,o.default)(this,(0,i.default)(r).call(this,"malformed `proof` part of the proof"));break;case"malformedEntries":case"unknownEntryType":case"ambiguousEntryType":t=(0,o.default)(this,(0,i.default)(r).call(this,"malformed `entries` part of the proof"));break;case"embeddedPaths":t=(0,o.default)(this,(0,i.default)(r).call(this,"embedded paths in proof: ".concat(arguments.length<=1?void 0:arguments[1]," is a prefix of ").concat(arguments.length<=2?void 0:arguments[2])));break;case"duplicatePath":t=(0,o.default)(this,(0,i.default)(r).call(this,"duplicate ".concat(arguments.length<=1?void 0:arguments[1]," in proof")));break;case"invalidOrdering":t=(0,o.default)(this,(0,i.default)(r).call(this,"invalid path ordering"));break;case"nonTerminalNode":t=(0,o.default)(this,(0,i.default)(r).call(this,"non-terminal isolated node in proof"));break;default:t=(0,o.default)(this,(0,i.default)(r).call(this,e))}return t}return(0,s.default)(r,e),r}((0,a.default)(Error));r.MapProofError=b},{"../crypto":100,"../types":121,"../types/hexadecimal":120,"./ProofPath":90,"./constants":92,"@babel/runtime/helpers/classCallCheck":5,"@babel/runtime/helpers/getPrototypeOf":9,"@babel/runtime/helpers/inherits":10,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/possibleConstructorReturn":18,"@babel/runtime/helpers/toConsumableArray":21,"@babel/runtime/helpers/wrapNativeSuper":23,"binary-search":60}],95:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.ListProofError=r.ListProof=void 0;var o=n(e("@babel/runtime/helpers/possibleConstructorReturn")),i=n(e("@babel/runtime/helpers/getPrototypeOf")),s=n(e("@babel/runtime/helpers/inherits")),a=n(e("@babel/runtime/helpers/wrapNativeSuper")),u=n(e("@babel/runtime/helpers/slicedToArray")),c=n(e("@babel/runtime/helpers/toConsumableArray")),f=n(e("@babel/runtime/helpers/classCallCheck")),l=n(e("big-integer")),h=n(e("binary-search")),p=e("../types/hexadecimal"),d=e("../types/convert"),y=e("../crypto"),g=e("./constants");function m(e,t){var r=(0,h.default)(e,t+1,function(e,t){var r=e.height;e.index;return t!==r?r-t:1});if(0<=r)throw new Error("Internal error while verifying list proof");var n=-r-1;return e.splice(0,n)}function b(e,t){for(var r=0,n=0,o=[];r<e.length||n<t.length;){var i=[e[r],t[n]],s=i[0],a=i[1];if(s)if(a)if(s.index<a.index)o.push(s),r++;else{if(!(s.index>a.index))throw new _("duplicateHash");o.push(a),n++}else o.push(s),r++;else o.push(a),n++}return o}function v(e,t){for(var r=0;r<e.length;r+=2){var n=[e[r],e[r+1]],o=n[0],i=n[1],s=void 0;if(i){if(o.index%2!=0||i.index!==o.index+1)throw new _("missingHash");s=w(o.hash,i.hash)}else{if(t%2==1||o.index!==t)throw new _("missingHash");s=w(o.hash)}e[r/2]={height:o.height+1,index:o.index/2,hash:s}}e.length=Math.ceil(e.length/2)}function w(e,t){var r=[g.LIST_BRANCH_PREFIX];return p.Hash.serialize(e,r,r.length),t&&p.Hash.serialize(t,r,r.length),(0,y.hash)(r)}r.ListProof=function e(t,r){var n,o=t.proof,i=t.entries,s=t.length;if((0,f.default)(this,e),!r||"function"!=typeof r.serialize)throw new TypeError("No `serialize` method in the value type");if(this.valueType=r,this.proof=function(e){if(!Array.isArray(e))throw new _("malformedProof");if(!e.every(function(e){var t=e.index,r=e.height,n=e.hash;return/^[0-9a-f]{64}$/i.test(n)&&Number.isInteger(t)&&Number.isInteger(r)&&0<r&&r<=58}))throw new _("malformedProof");for(var t=0;t+1<e.length;t++){var r=[e[t],e[t+1]],n=r[0],o=r[1];if(n.height>o.height||n.height===o.height&&n.index>=o.index)throw new _("invalidProofOrdering")}return e}(o),this.entries=function(e,o){if(!Array.isArray(e))throw new _("malformedEntries");for(var t=0;t+1<e.length;t++){var r=[e[t],e[t+1]],n=r[1];if(r[0][0]>=n[0])throw new _("invalidValuesOrdering")}return e.map(function(e){var t=(0,u.default)(e,2),r=t[0],n=t[1];if(!Number.isInteger(r))throw new _("malformedEntries");return{index:r,height:0,value:n,hash:(0,y.hash)([g.BLOB_PREFIX].concat((0,c.default)(o.serialize(n,[],0))))}})}(i,r),this.length=s,0===this.length){if(0!==this.proof.length||0!==this.entries.length)throw new _("malformedEmptyProof");n="0000000000000000000000000000000000000000000000000000000000000000"}else{n=function(e,o){var t=function(e){var t=0;for(;(0,l.default)(2).pow(t).lt(e);)t++;return t+1}(o);if(e[e.length-1].height>=t)throw new _("unexpectedHeight");e.forEach(function(e){var t=e.height,r=e.index,n=0===t?1:Math.pow(2,t-1);if(Math.floor((o-1)/n)<r)throw new _("unexpectedIndex")});for(var r=m(e,0).map(function(e){return{height:1,index:e.index,hash:e.hash}}),n=o-1,i=1;i<t;i++){var s=m(e,i);v(r=b(r,s),n),n=Math.floor(n/2)}return r[0].hash}([].concat((0,c.default)(this.entries),(0,c.default)(this.proof)),this.length)}this.merkleRoot=function(e,t){var r=new Uint8Array(9+y.HASH_LENGTH);r[0]=g.LIST_PREFIX;for(var n=(0,l.default)(t),o=1;o<9;o++){var i,s=n.divmod(256);n=s.quotient,i=s.remainder,r[o]=i}return r.set((0,d.hexadecimalToUint8Array)(e),9),(0,y.hash)(r)}(n,this.length)};var _=function(e){function r(e){var t;switch((0,f.default)(this,r),e){case"malformedProof":case"invalidProofOrdering":t=(0,o.default)(this,(0,i.default)(r).call(this,"malformed `proof` part of the proof"));break;case"malformedEntries":case"invalidValuesOrdering":t=(0,o.default)(this,(0,i.default)(r).call(this,"malformed `entries` in the proof"));break;case"unexpectedHeight":case"unexpectedIndex":t=(0,o.default)(this,(0,i.default)(r).call(this,"proof contains a branch where it is impossible according to list length"));break;case"duplicateHash":t=(0,o.default)(this,(0,i.default)(r).call(this,"proof contains redundant entries"));break;case"missingHash":t=(0,o.default)(this,(0,i.default)(r).call(this,"proof does not contain information to restore index hash"));break;default:t=(0,o.default)(this,(0,i.default)(r).call(this,e))}return t}return(0,s.default)(r,e),r}((0,a.default)(Error));r.ListProofError=_},{"../crypto":100,"../types/convert":118,"../types/hexadecimal":120,"./constants":92,"@babel/runtime/helpers/classCallCheck":5,"@babel/runtime/helpers/getPrototypeOf":9,"@babel/runtime/helpers/inherits":10,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/possibleConstructorReturn":18,"@babel/runtime/helpers/slicedToArray":20,"@babel/runtime/helpers/toConsumableArray":21,"@babel/runtime/helpers/wrapNativeSuper":23,"big-integer":59,"binary-search":60}],96:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.verifyTable=function(e,t,r){var n,o=new h.MapProof(e,p,l.Hash);if(o.merkleRoot!==t)throw new Error("Table proof is corrupted");var i=!0,s=!1,a=void 0;try{for(var u,c=o.entries.keys()[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var f=u.value;Object.compare(f,r)&&(n=o.entries.get(f))}}catch(e){s=!0,a=e}finally{try{i||null==c.return||c.return()}finally{if(s)throw a}}if(void 0!==n)return n;throw new Error("Table not found in the root tree")};var o=n(e("@babel/runtime/helpers/typeof")),i=e("../crypto"),s=e("../types/primitive"),l=e("../types/hexadecimal"),h=e("./merkle-patricia"),p={serialize:function(e){var t=[];return s.Uint16.serialize(e.origin_label,t,t.length,!0),s.Uint32.serialize(e.local_schema_id,t,t.length,!0),s.Uint16.serialize(e.index_id,t,t.length,!0),t},hash:function(e){return(0,i.hash)(this.serialize(e))}};Object.compare=function(e,t){for(var r in e){if(e.hasOwnProperty(r)!==t.hasOwnProperty(r))return!1;switch((0,o.default)(e[r])){case"object":if(!Object.compare(e[r],t[r]))return!1;break;case"function":if(void 0===t[r]||"compare"!==r&&e[r].toString()!==t[r].toString())return!1;break;default:if(e[r]!==t[r])return!1}}for(var n in t)if(void 0===e[n])return!1;return!0}},{"../crypto":100,"../types/hexadecimal":120,"../types/primitive":123,"./merkle-patricia":94,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/typeof":22}],97:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.send=u,r.sendQueue=function(r,n){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:d,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:y,s=0,a=[];return function t(){var e=n[s++];return u(r,e,o,i).then(function(e){return a.push(e),s<n.length?t():a})}()};var l=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator")),h=n(e("axios")),p=e("../types/convert"),d=10,y=500;function u(e,t){return i.apply(this,arguments)}function i(){return(i=(0,o.default)(l.default.mark(function e(t,r){var n,o,i,s,a,u,c,f=arguments;return l.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=function(t){return new Promise(function(e){setTimeout(e,t)})},n=2<f.length&&void 0!==f[2]?f[2]:d,o=3<f.length&&void 0!==f[3]?f[3]:y,"string"!=typeof t)throw new TypeError("Explorer base path endpoint of wrong data type is passed. String is required.");e.next=5;break;case 5:return n=+n,o=+o,"string"!=typeof r&&(r=(0,p.uint8ArrayToHexadecimal)(new Uint8Array(r))),e.next=10,h.default.post("".concat(t),{tx_body:r});case 10:s=e.sent,a=s.data.tx_hash,u=n,c=!1;case 14:if(0<=u)return e.prev=15,e.next=18,h.default.get("".concat(t,"?hash=").concat(a));e.next=32;break;case 18:if("committed"===e.sent.data.type)return e.abrupt("return",a);e.next=21;break;case 21:c=!1,e.next=27;break;case 24:e.prev=24,e.t0=e.catch(15),c=!0;case 27:return u--,e.next=30,i(o);case 30:e.next=14;break;case 32:if(c)throw new Error("The request failed or the blockchain node did not respond.");e.next=36;break;case 36:throw new Error("The transaction was not accepted to the block for the expected period.");case 37:case"end":return e.stop()}},e,null,[[15,24]])}))).apply(this,arguments)}},{"../types/convert":118,"@babel/runtime/helpers/asyncToGenerator":4,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/regenerator":24,axios:32}],98:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CONFIG=void 0;var n={crypto:e("./crypto").CRYPTO.NIST};r.CONFIG=n},{"./crypto":100}],99:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireWildcard"),o=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.hash=function(e,t){var r,n,o=new c.GostDigest({name:"GOST R 34.11",version:2012});if((0,f.isType)(t))r=t.serialize(e);else if((0,l.isTransaction)(t)){var i=e.schema.encode(e.payload).finish(),s=e.chainIdBytes,a=p.hexadecimalToUint8Array(e.author),u=new Uint8Array(s.length+i.length+a.length);u.set(s),u.set(i,s.length),u.set(a,s.length+i.length),r=u}else{if(void 0!==t)throw new TypeError("Wrong type of data.");if(e instanceof Uint8Array)r=e;else{if(!Array.isArray(e))throw new TypeError("Invalid data parameter.");r=new Uint8Array(e)}}return n=o.digest(new Uint8Array(r)),p.uint8ArrayToHexadecimal(new Uint8Array(n))},r.sign=function(e,t,r){var n,o=new c.GostCoding;if(!h.validateHexadecimal(e,u))throw new TypeError("secretKey of wrong type is passed. Hexadecimal expected.");if((0,f.isType)(r))n=new Uint8Array(r.serialize(t));else if((0,l.isTransaction)(r)){var i=new Uint8Array(r.serialize(t)),s=new Uint8Array(r.chain_id_bytes);(n=new Uint8Array(s.length+i.length)).set(s),n.set(i,s.length)}else{if(void 0!==r)throw new TypeError("Wrong type of data.");if(t instanceof Uint8Array)n=t;else{if(!Array.isArray(t))throw new TypeError("Invalid data parameter.");n=new Uint8Array(t)}}var a=o.Hex.decode(e);return c.default.subtle.importKey("raw",a,{id:"id-tc26-gost3410-12-256",keySize:32,length:256,mode:"SIGN",name:"GOST R 34.10",namedCurve:"S-256-A",procreator:"CP",version:2012},!1,["sign"]).then(function(e){return c.default.subtle.sign("GOST R 34.10/GOST R 34.11",e,n)}).then(function(e){return o.Hex.encode(e,"big").split(/[^0-9a-f]+/).join("")})},r.verifySignature=function(e,t,r,n){var o;if(!h.validateHexadecimal(e,y))throw new TypeError("Signature of wrong type is passed. Hexadecimal expected.");if(!h.validateHexadecimal(t,d))throw new TypeError("publicKey of wrong type is passed. Hexadecimal expected.");if((0,f.isType)(n))o=new Uint8Array(n.serialize(r));else if((0,l.isTransaction)(n)){var i=new Uint8Array(n.serialize(r)),s=new Uint8Array(n.chain_id_bytes);(o=new Uint8Array(s.length+i.length)).set(s),o.set(i,s.length)}else{if(void 0!==n)throw new TypeError("Wrong type of data.");r instanceof Uint8Array?o=r:Array.isArray(r)&&(o=new Uint8Array(r))}var a=c.default.coding.Hex.decode(e,"big"),u=c.default.coding.Hex.decode(t);return c.default.subtle.importKey("raw",u,{name:"GOST R 34.10-256/VN",id:"id-tc26-gost3410-12-256",namedCurve:"S-256-A"},!0,["verify"]).then(function(e){return c.default.subtle.verify("GOST R 34.10/GOST R 34.11",e,a,new Uint8Array(o))})},r.keyPair=function(){return c.default.subtle.generateKey({name:"GOST R 34.10-256/VN"},!0,["sign","verify"]).then(function(e){return{publicKey:p.uint8ArrayToHexadecimal(new Uint8Array(e.publicKey.buffer)),secretKey:p.uint8ArrayToHexadecimal(new Uint8Array(e.privateKey.buffer))}})},r.fromSeed=function(e){var t=c.default.subtle.generateKey(e),r=p.uint8ArrayToHexadecimal(t.publicKey),n=p.uint8ArrayToHexadecimal(t.secretKey);return new Promise(function(e){return e({publicKey:r,secretKey:n})})},r.randomUint64=function(){var e=s.default.randomBytes(8);return i.default.fromArray(Array.from(e),256).toString()},r.SIGNATURE_LENGTH=r.HASH_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=void 0;var i=o(e("big-integer")),s=o(e("tweetnacl")),c=n(e("../third-party/exonum-webcrypto-gost")),f=e("../types/generic"),l=e("../types/message"),h=n(e("../types/validate")),p=n(e("../types/convert")),d=64;r.PUBLIC_KEY_LENGTH=d;var u=32;r.SECRET_KEY_LENGTH=u;r.HASH_LENGTH=32;var y=64;r.SIGNATURE_LENGTH=y},{"../third-party/exonum-webcrypto-gost":104,"../types/convert":118,"../types/generic":119,"../types/message":122,"../types/validate":124,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12,"big-integer":59,tweetnacl:88}],100:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault"),o=t("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.hash=function(e,t){return l().hash(e,t)},r.sign=function(e,t,r){return l().sign(e,t,r)},r.verifySignature=function(e,t,r,n){return l().verifySignature(e,t,r,n)},r.keyPair=function(){return l().keyPair()},r.fromSeed=function(e){return l().fromSeed(e)},r.randomUint64=function(){return l().randomUint64()},r.IMPLS=r.CRYPTO=void 0;var i,s=n(t("@babel/runtime/helpers/defineProperty")),a=o(t("./nist")),u=o(t("./gost")),c={NIST:0,GOST:1};r.CRYPTO=c;var f=(i={},(0,s.default)(i,c.GOST,u),(0,s.default)(i,c.NIST,a),i);function l(){var e=t("../config.js").CONFIG;return f[e.crypto]}r.IMPLS=f,Object.defineProperties(e.exports,{PUBLIC_KEY_LENGTH:{enumerable:!0,get:function(){return l().PUBLIC_KEY_LENGTH}},HASH_LENGTH:{enumerable:!0,get:function(){return l().HASH_LENGTH}},SECRET_KEY_LENGTH:{enumerable:!0,get:function(){return l().SECRET_KEY_LENGTH}},SIGNATURE_LENGTH:{enumerable:!0,get:function(){return l().SIGNATURE_LENGTH}}})},{"../config.js":98,"./gost":99,"./nist":101,"@babel/runtime/helpers/defineProperty":8,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12}],101:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireWildcard"),o=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.hash=function(e,t){var r;if((0,f.isType)(t))r=t.serialize(e);else{if((0,l.isTransaction)(t)){var n=e.schema.encode(e.payload).finish(),o=e.chainIdBytes,i=p.hexadecimalToUint8Array(e.author);return(0,s.default)("sha256").update(o).update(n).update(i).digest("hex")}if(void 0!==t)throw new TypeError("Wrong type of data.");if(e instanceof Uint8Array)r=e;else{if(!Array.isArray(e))throw new TypeError("Invalid data parameter.");r=new Uint8Array(e)}}return(0,s.default)("sha256").update(r,"utf8").digest("hex")},r.sign=function(e,t,r){var n,o,i;if(!h.validateHexadecimal(e,64))throw new TypeError("secretKey of wrong type is passed. Hexadecimal expected.");if(n=p.hexadecimalToUint8Array(e),(0,f.isType)(r))o=new Uint8Array(r.serialize(t));else if((0,l.isTransaction)(r)){var s=new Uint8Array(r.chain_id_bytes),a=new Uint8Array(r.serialize(t));(o=new Uint8Array(s.length+a.length)).set(s),o.set(a,s.length)}else{if(void 0!==r)throw new TypeError("Wrong type of data.");if(t instanceof Uint8Array)o=t;else{if(!Array.isArray(t))throw new TypeError("Invalid data parameter.");o=new Uint8Array(t)}}return i=c.default.sign.detached(o,n),new Promise(function(e){return e(p.uint8ArrayToHexadecimal(i))})},r.verifySignature=function(e,t,r,n){var o,i,s;if(!h.validateHexadecimal(e,64))throw new TypeError("Signature of wrong type is passed. Hexadecimal expected.");if(o=p.hexadecimalToUint8Array(e),!h.validateHexadecimal(t))throw new TypeError("publicKey of wrong type is passed. Hexadecimal expected.");if(i=p.hexadecimalToUint8Array(t),(0,f.isType)(n))s=new Uint8Array(n.serialize(r));else if((0,l.isTransaction)(n)){var a=(0,l.chainIdToBytes)(n.chainId),u=new Uint8Array(n.serialize(r));(s=new Uint8Array(a.length+u.length)).set(a),s.set(u,a.length)}else{if(void 0!==n)throw new TypeError("Wrong type of data.");r instanceof Uint8Array?s=r:Array.isArray(r)&&(s=new Uint8Array(r))}return new Promise(function(e){return e(c.default.sign.detached.verify(s,o,i))})},r.keyPair=function(){var e=c.default.sign.keyPair(),t=p.uint8ArrayToHexadecimal(e.publicKey),r=p.uint8ArrayToHexadecimal(e.secretKey);return new Promise(function(e){return e({publicKey:t,secretKey:r})})},r.fromSeed=function(e){var t=c.default.sign.keyPair.fromSeed(e),r=p.uint8ArrayToHexadecimal(t.publicKey),n=p.uint8ArrayToHexadecimal(t.secretKey);return new Promise(function(e){return e({publicKey:r,secretKey:n})})},r.randomUint64=function(){var e=c.default.randomBytes(8);return i.default.fromArray(Array.from(e),256).toString()},r.SECRET_KEY_LENGTH=r.HASH_LENGTH=void 0;var i=o(e("big-integer")),s=o(e("sha.js")),c=o(e("tweetnacl")),f=e("../types/generic"),l=e("../types/message"),h=n(e("../types/validate")),p=n(e("../types/convert"));r.HASH_LENGTH=32;r.SECRET_KEY_LENGTH=64},{"../types/convert":118,"../types/generic":119,"../types/message":122,"../types/validate":124,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12,"big-integer":59,"sha.js":81,tweetnacl:88}],102:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.isObject=function(e){return!("object"!==(0,i.default)(e)||Array.isArray(e)||null===e||e instanceof Date)},r.verifyElement=s,r.cleanZeroValuedFields=function r(n,o){var e=Object.keys(n);e.forEach(function(e){var t;(t=n[e])instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||n[e]instanceof Array?o[e]=n[e]:"object"===(0,i.default)(n[e])?o[e]=r(n[e],{}):s(n[e])&&(o[e]=n[e])});return o};var i=n(e("@babel/runtime/helpers/typeof"));function s(e){switch((0,i.default)(e)){case"string":return"0"!==e&&0!==e.length;case"number":return 0!==e}return!0}},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/typeof":22}],103:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={version:!0,CONFIG:!0};r.CONFIG=r.version=void 0;var o=e("./types");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./crypto");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./blockchain");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))});r.version="@@version";var a=e("./config").CONFIG;r.CONFIG=a},{"./blockchain":93,"./config":98,"./crypto":100,"./types":121}],104:[function(e,t,r){"use strict";t.exports=e("./lib/gostCrypto"),t.exports.GostASN1=e("./lib/gostASN1"),t.exports.GostCert=e("./lib/gostCert"),t.exports.GostCipher=e("./lib/gostCipher"),t.exports.GostCMS=e("./lib/gostCMS"),t.exports.GostCoding=e("./lib/gostCoding"),t.exports.GostDigest=e("./lib/gostDigest"),t.exports.GostEngine=e("./lib/gostEngine"),t.exports.GostKeys=e("./lib/gostKeys"),t.exports.GostRandom=e("./lib/gostRandom"),t.exports.GostSecurity=e("./lib/gostSecurity"),t.exports.GostSign=e("./lib/gostSign"),t.exports.GostViewer=e("./lib/gostViewer")},{"./lib/gostASN1":105,"./lib/gostCMS":106,"./lib/gostCert":107,"./lib/gostCipher":108,"./lib/gostCoding":109,"./lib/gostCrypto":110,"./lib/gostDigest":111,"./lib/gostEngine":112,"./lib/gostKeys":113,"./lib/gostRandom":114,"./lib/gostSecurity":115,"./lib/gostSign":116,"./lib/gostViewer":117}],105:[function(r,n,o){(function(Si){"use strict";function ki(e){return(ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e,t;e=void 0,t=function(e){var t="object"===("undefined"==typeof self?"undefined":ki(self))&&self.self===self&&self||"object"===(void 0===Si?"undefined":ki(Si))&&Si.global===Si&&Si||this,s=t.ArrayBuffer,n=(t.Date,e.security.algorithms),o=e.security.names,c=e.security.identifiers,i=e.security.attributes,a=e.security.parameters,u=e.coding.BER,f=e.coding.PEM,l=e.coding.Chars,h=e.coding.Hex,r=e.coding.Int16;function p(){for(var e={},t=0,r=arguments.length;t<r;t++){var n=arguments[t];if("object"===ki(n))for(var o in n)e[o]=n[o]}return e}function d(e){e instanceof s&&(e=new Uint8Array(e));for(var t=new Uint8Array(e.length),r=0,n=e.length;r<n;r++)t[n-r-1]=e[r];return t.buffer}function y(e){return e instanceof s||e.buffer instanceof s}function g(e){return e<=2?e:e<=4?4:e<=8?8:e<=16?16:e<=32?32:e<=64?64:e<=128?128:e<=256?256:e<512?512:e<1024?1024:void 0}var m=function(e,t){return"0x"+h.encode(e,t)},b=function(e,t,r){"number"==typeof e&&(e=e.toString(16));var n,o,i=e.replace("0x","");return r=r||g(i.length),h.decode((o=r,(n=i).length>=o?n:new Array(o-n.length+1).join("0")+n),t)};function v(e){if(e)throw Error("Invalid format")}function w(e,t,r,n){"object"!==ki(r)&&(r={value:r}),void 0!==n&&(r.enumerable=n),Object.defineProperty(e,t,r)}function _(e,t,r){for(var n in t)w(e,n,t[n],r)}function x(e,t){return Object.getOwnPropertyDescriptor(e,t)}function A(e,t,r,n,o,i){v(void 0===t);var s={tagNumber:r,tagClass:n||0,tagConstructed:o||!1,object:t};return"DER"!==(e=e||"DER")&&"CER"!==e||(s=u.encode(s,e)),"PEM"===e&&(s=f.encode(s,i)),s}function C(t,e,r,n,o){if(v(void 0===t),"string"==typeof t&&(t=f.decode(t,o,!1)),t instanceof s)try{t=f.decode(l.encode(t),o,!0)}catch(e){t=u.decode(t)}return r=r||0,n=n||!1,void 0===t.tagNumber&&(t=A(!0,t.object,e,r,t.object instanceof Array),t=u.decode(t)),v(t.tagClass!==r||t.tagNumber!==e||t.tagConstructed!==n),0===r&&5===e?null:t.object}function S(e,t,r,n){if("function"!=typeof t&&(n=r,r=t,t=function(){e.apply(this,arguments)}),t.prototype=Object.create(e.prototype,{constructor:{value:t},superclass:{value:e.prototype}}),r&&_(t.prototype,r),e!==Object)for(var o in e)t[o]=e[o];return t.super=e,n&&_(t,n,!0),t}function k(t){return S(ee,{encode:function(e){return A(e,this.object,t)}},{decode:function(e){return new this(C(e,t))}})}function E(o){var t=S(k(o),function(e){if(!(this instanceof t))return n=e,S(k(o),function(e){t.super.call(this,e)},{encode:function(e){return A(e,n[this.object],o)}},{decode:function(e){var t=C(e,o);for(var r in n)if(t===n[r])return new this(r);v(!0)}});var n;t.super.apply(this,arguments)});return t}function P(n){return n.combine=function(e,r){for(var t in n.prototype)n.prototype.hasOwnProperty(t)&&!e.hasProperty(t)&&w(e,t,function(t){return{get:function(){return this[r]&&this[r][t]},set:function(e){this[r]||(this[r]={}),this[r][t]=e},configurable:!1,enumerable:!0}}(t))},n}function O(a,u){var i=S(ee,function(e,t){w(this,"items",{writable:!0,value:{}}),"string"==typeof e||e instanceof s?this.decode(e):void 0!==e&&(this.object=e,t&&this.check())},{object:{get:function(){return this},set:function(e){if(e instanceof i)for(var t in this.items=e.items,a){(o=this.getItemClass(t,this.items)).combine&&o.combine(this,t)}else{var r={};for(var t in a){var n=e[t],o=this.getItemClass(t,r);void 0!==n?r[t]=new o(n):o.combine&&(r[t]=new o(e)),o.combine&&o.combine(this,t)}this.items=r}}},getItemClass:function(e){return a[e]},encode:function(e){var t=[],r=this.items;for(var n in a)if(r[n]){var o=r[n].encode(!0);void 0!==o&&t.push(o)}return A(e,t,16,0,!0,u)},decode:function(e){this.object=this.constructor.decode(e)},check:function(){this.constructor.decode(this.encode(!0))}},{encode:function(e,t){return new this(e).encode(t)},decode:function(e){e=C(e,16,0,!0,u);var t=0,r=new this,n=r.items={};for(var o in a){var i=r.getItemClass(o,n),s=i.decode(e[t]);void 0!==s&&(n[o]=s,i.combine&&i.combine(r,o),t++)}return r}});for(var e in a)w(i.prototype,e,function(r){return{get:function(){return this.items[r]&&this.items[r].object},set:function(e){if(void 0!==e){var t=this.getItemClass(r,this.items);this.items[r]=new t(e)}else delete this.items[r]},configurable:!1,enumerable:!a[r].combine}}(e)),a[e].combine&&a[e].combine(i.prototype,e);return i}function B(u,c,f,e,t){var n=O(u,t);return function t(s,a){c=c||"type",f=f||"value",a=a||e||te;var r=S(n,function(e){if(!(this instanceof r))return t.apply(this,arguments);n.apply(this,arguments)},{getItemClass:function(e,t){var r=u[e];if(f===e){var n,o=t&&t[c];if(o){var i=o.object;s&&(n="function"==typeof s?s(i):s[i])}n=n||a||te,r=r===te?n:r(n)}return r}});return w(r.prototype,c,{get:function(){return this.items[c]&&this.items[c].object},set:function(){v(!0)},configurable:!1,enumerable:!0}),r}()}function F(r){return S(r=r||te,{encode:function(e){var t=r.method("encode").call(this,e);return"string"==typeof t||t instanceof s?t:4===t.tagNumber||0!==t.tagClass||t.object instanceof Array?{object:t.object}:{object:u.encode(t,"DER",!0)}}},{decode:function(e){return"string"==typeof e||e instanceof s||(e={object:e.object,header:e.header,content:e.content}),r.decode.call(this,e)}})}function j(r){return S(r=r||te,{encode:function(e){var t=r.method("encode").call(this,e);return"string"==typeof t||t instanceof s?t:{object:[t]}}},{decode:function(e){return"string"==typeof e||e instanceof s?r.decode.call(this,e):r.decode.call(this,e.object[0])}})}function T(r,n){function e(){n.apply(this,arguments)}return S(n,e,{encode:function(e){var t=n.method("encode").call(this,e);return"string"==typeof t||t instanceof s||(t.tagNumber=r,t.tagClass=2,t.tagConstructed=t.object instanceof Array),t}},{decode:function(e){return v(void 0!==e.tagNumber&&(2!==e.tagClass||e.tagNumber!==r)),n.decode.call(this,e)}})}function D(u){return function(n,a){n=n||te;return function t(e,r){var s="function"==typeof n&&void 0!==e?n(e,r):n;if(a){var o=S(ee,function(e){if(!(this instanceof o))return t.apply(this,arguments);w(this,"items",{writable:!0,value:{}}),ee.call(this,e||{})},{object:{get:function(){return this.read(),this},set:function(e){if(e instanceof o)e.read(),this.items=e.items;else{var t={};for(var r in e){var n=e[r];t[r]=this.createItem(n,r)}this.items=t}this.reset()}},createItem:function(e,t){if(a){var r={};r[a.typeName]=t,r[a.valueName]=e}else r=e;return new s(r)},getItemValue:function(e){var t=this.items[e];return a?t.object[a.valueName]:t.object},setItemValue:function(e,t){var r=this.items[e];a?r.object[a.valueName]=t:r.object=t},isItemType:function(e){return a?c[e]:!isNaN(parseInt(e))},reset:function(){var e=this.items;for(var t in this)this.hasOwnProperty(t)&&!this.items[t]&&this.isItemType(t)&&delete this[t];for(var t in e)this[t]=this.getItemValue(t)},read:function(){var e=this.items;for(var t in this)this.isItemType(t)&&(this.items[t]?this.getItemValue(t)!==this[t]&&this.setItemValue(t,this[t]):(e[t]=this.createItem(this[t],t),this[t]=this.getItemValue(t)))},encode:function(e){this.read();var t=this.items,r=[];for(var n in t){var o=t[n].encode(!0);void 0!==o&&r.push(o)}return A(e,r,u,0,!0)},decode:function(e){this.object=this.constructor.decode(e)},check:function(){this.constructor.decode(this.encode(!0))}},{encode:function(e,t){return new this(e).encode(t)},decode:function(e){e=C(e,u,0,!0);for(var t=new this,r=t.items={},n=0,o=e.length;n<o;n++){var i=s.decode(e[n]);r[a?i.object[a.typeName]:n]=i}return t.reset(),t}});return o}var i=S(ee,function(e){if(!(this instanceof i))return t.apply(this,arguments);_(this,{items:{writable:!0,value:[]},values:{writable:!0,value:[]}}),ee.call(this,e||[])},{object:{get:function(){return this.read(),this.values},set:function(e){if(e instanceof i)e.read(),this.items=e.items;else{for(var t=[],r=0,n=e.length;r<n;r++)t[r]=new s(e[r]);this.items=t}this.reset()}},encode:function(e){this.read();for(var t=this.items,r=[],n=0,o=t.length;n<o;n++){var i=t[n].encode(!0);void 0!==i&&r.push(i)}return A(e,r,u,0,!0)},decode:function(e){this.object=this.constructor.decode(e)},check:function(){this.constructor.decode(this.encode(!0))},reset:function(){for(var e=0,t=this.items.length;e<t;e++)this.values.push(this.items[e].object)},read:function(){for(var e=this.items,t=this.values,r=0,n=t.length;r<n;r++)this.items[r]?e[r].object!==t[r]&&(e[r].object=t[r]):(e[r]=new s(t[r]),t[r]=e[r].object)}},{encode:function(e,t){return new this(e).encode(t)},decode:function(e){e=C(e,u,0,!0);var t=new this;t.items=[];for(var r=0,n=e.length;r<n;r++)t.items.push(s.decode(e[r]));return t.reset(),t}});return i}()}}function K(r,t){if(t){var e=S(ee,{object:{get:function(){return this.item?t.decode(this.item.object):void 0},set:function(e){void 0!==e?this.item=new r(t.encode(e)):delete this.item}},encode:function(e){return this.item.encode(e)}},{decode:function(e){var t=new this;return t.item=r.decode(e),t}});for(var n in r)e[n]||(e[n]=r[n]);return e}return r}function I(e){return K(ve(e),{encode:function(e){return[e]},decode:function(e){return e[0]}})}function R(n,r){return S(ee,{object:{get:function(){return this.item&&this.item.object},set:function(e){if(e instanceof ee)for(var t in n)if(e instanceof n[t])return void(this.item=e);v(!(t="function"==typeof r?r(e):r)||!n[t]),e=new n[t](e),this.item=e}},encode:function(e){return this.item.encode(e)}},{decode:function(e){for(var t in n)try{var r=n[t].decode(e);if(void 0!==r)return new this(r)}catch(e){}v(!0)}})}function L(t){return S(t=t||te,{encode:function(){return u.encode(t.method("encode").call(this,!0))}},{encode:function(e,t){return new this(e).encode(t)},decode:function(e){return t.decode.call(this,u.decode(e))}})}function N(t,r){return S(t=t||te,{encode:function(e){if(this.object!==r)return t.method("encode").call(this,e)}},{decode:function(e){if(void 0===e)return new this(r);try{return t.decode.call(this,e)}catch(e){return}}})}function U(t){return S(t=t||te,{},{decode:function(e){if(void 0!==e)try{return t.decode.call(this,e)}catch(e){return}}})}function G(e,t){return K(O({algorithm:me,parameters:U(e)}),t)}function M(e,t){var r=S(B({extnID:me,critical:N(re,!1),extnValue:function(e){return ye(L(e))}},"extnID","extnValue")(e),{object:{get:function(){var e=this._get(r.super,"object");return e&&"object"===ki(e.extnValue)&&this.defineValue(e.extnValue),e},set:function(e){this._set(r.super,"object",e),e&&e.extnValue&&(void 0!==e.extnValue.critical?this.critical=e.extnValue.critical:void 0===this.critical&&t&&(this.critical=t(this.extnID,e.extnValue)))}},extnValue:{get:function(){var e=this._get(r.super,"extnValue");return"object"===ki(e)&&this.defineValue(e),e},set:function(e){this._set(r.super,"extnValue",e),e&&(void 0!==e.critical?this.critical=e.critical:void 0===this.critical&&t&&(this.critical=t(this.extnID,e)))}},defineValue:function(e){if("object"===ki(e)&&!x(e,"critical")){var t=this;w(e,"critical",{get:function(){return t.critical},set:function(e){t.critical=e},enumerable:!0,configurable:!1})}}});return r}var H,q,z,W,V,X,J,Y,Z,Q,$,ee=S(Object,function(e){this.object=e},{_set:function(e,t,r){e.property(t).set.call(this,r)},_get:function(e,t){return e.property(t).get.call(this)},_call:function(e,t,r){return e.method(t).apply(this,r)},hasProperty:function(e){return this.hasOwnProperty(e)||!!this.constructor.property(e)},encode:function(){return this.object}},{decode:function(e){return new this(e)},property:function(e){for(var t=this.prototype;t;){var r=x(t,e);if(r)return r;t=t.superclass}},method:function(e){for(var t=this.prototype;t;){if(t[e])return t[e];t=t.superclass}}}),te=ee,re=k(1),ne=k(22),oe=k(18),ie=k(19),se=k(20),ae=k(12),ue=k(23),ce=k(24),fe=k(28),le=k(30),he=S(k(5),{object:{get:function(){return null},set:function(e){v(null!==e)}}}),pe=E(2),de=E(10),ye=H=S(k(4),function(e){if(!(this instanceof H))return(t=e)?S(t,{encode:function(e){return A(e,t.method("encode").call(this,!0),4)}},{decode:function(e){return t.decode.call(this,C(e,4))}}):H;var t;H.super.apply(this,arguments)}),ge=q=S(k(3),function(e){if(!(this instanceof q))return"object"===ki(e)?(s=e,S(ee,function(e,t){ee.call(this,e),this.numbits=t||0},{encode:function(e){var t=this.object,r=[];if(t instanceof Array){for(var n=0,o=t.length;n<o;n++){var i=s[t[n]];void 0!==i&&(r[i]="1")}for(n=0,o=Math.max(r.length,this.numbits);n<o;n++)r[n]||(r[n]="0");r=r.join("")}else r="0";return A(e,r,3)}},{decode:function(e){var t=C(e,3),r=[];for(var n in s){var o=s[n];"1"===t.charAt(o)&&r.push(n)}return new this(r,t.length)}})):(t=e)?S(t,{encode:function(e){return A(e,t.method("encode").call(this,!0),3)}},{decode:function(e){return t.decode.call(this,C(e,3))}}):q;var t,s;q.super.apply(this,arguments)}),me=S(ee,{encode:function(e){var t=this.object;return v(!(t=/^(\d+\.)+\d+$/.test(t)?t:c[t])),A(e,t,6)}},{decode:function(e){var t=C(e,6);return new this(o[t]||t)}}),be=D(16),ve=D(17),we=R({teletexString:se,printableString:ie,universalString:fe,utf8String:ae,bmpString:le,numericString:oe},function(e){return/^[A-Za-z0-9\.@\+\-\:\=\\\/\?\!\#\$\%\^\&\*\(\)\[\]\{\}\>\<\|\~]*$/.test(e)?"printableString":"utf8String"}),_e=R({utcTime:ue,generalTime:ce},function(e){return 2050<=e.getYear()?"generalTime":"utcTime"}),xe=te,Ae=B({type:me,value:xe}),Ce={typeName:"type",valueName:"value"},Se=I(Ae({serialName:ie,countryName:ie,dnQualifier:ie,emailAddress:ne,domainComponent:ne,SNILS:oe,OGRN:oe,INN:oe},we)),ke=R({rdnSequence:be(Se,Ce)()},"rdnSequence"),Ee=P(O({notBefore:_e,notAfter:_e})),Pe=pe,Oe=B({type:me,value:te}),Be=ve(Oe,Ce),Fe=be(Oe,Ce),je=O({a:pe,b:pe,seed:U(ge)}),Te=ye(S(ee,{encode:function(){var e=this.object,t=Math.max(g(e.x.length-2),g(e.y.length-2))/2,r=new Uint8Array(2*t+1);return r[0]=4,r.set(new Uint8Array(b(e.x,!1,t)),1),r.set(new Uint8Array(b(e.y,!1,t)),1+t),r.buffer}},{decode:function(e){var t=(e.byteLength-1)/2;return new this({x:m(new Uint8Array(e,1,t)),y:m(new Uint8Array(e,1+t,t))})}})),De=O({fieldType:me,parameters:pe}),Ke=O({version:Pe,fieldID:De,curve:je,base:Te,order:pe,cofactor:U(pe)}),Ie=O({publicKeyParamSet:me,digestParamSet:me,encryptionParamSet:U(me)}),Re=(W="id-GostR3411-94-CryptoProParamSet",S(z=(z=me)||te,{encode:function(e){return this.object===W?new he(null).encode(e):z.method("encode").call(this,e)}},{decode:function(e){if(void 0!==e){if(null===e||5===e.tagNumber&&0===e.tagClass)return new this(W);try{return z.decode.call(this,e)}catch(e){return}}}})),Le=R({namedParameters:me,ecParameters:Ke,implicitly:U(he)},function(e){return"string"==typeof e||e instanceof String?"namedParameters":"ecParameters"}),Ne=(V=G(te),X=S(ee,function(e){if(!(this instanceof X))return J(e);X.super.apply(this,arguments)},{encode:function(e){return new V(this.object).encode(e)}},{decode:function(e){return new this(V.decode(e).object)}}),J=function(n){return S(ee,{object:{get:function(){return this.item?this.item.object:void 0},set:function(e){if(e){var t=n[e.id];if(!t)throw new Error("Algorithm not supported");this.item=new t(e)}else delete this.item}},encode:function(e){return this.item.encode(e)}},{decode:function(e){"string"==typeof e&&(e=f.decode(e,void 0,!1)),e instanceof s&&(e=u.decode(e));var t=n[o[e.object[0].object]];if(t){var r=new this;return r.item=t.decode(e),r}throw new Error("Algorithm not supported")}})},X),Ue=G(Le,{encode:function(e){var t;return t="string"==typeof e.namedCurve?i.namedCurve[e.namedCurve]:{version:1,fieldID:{fieldType:"id-prime-Field",parameters:e.curve.p},curve:{a:e.curve.a,b:e.curve.b},base:{x:e.curve.x,y:e.curve.y},order:e.curve.q,cofactor:1},{algorithm:e.id,parameters:t}},decode:function(e){var t=e.parameters,r=n[e.algorithm];if("string"==typeof t||t instanceof String)r=p(r,a[t]);else{if("object"!==ki(t))throw new DataError("Invalid key paramters");r=p(r,{curve:{p:t.fieldID.parameters,a:t.curve.a,b:t.curve.b,x:t.base.x,y:t.base.y,q:t.order}})}return r}}),Ge=G(Ie,{encode:function(e){var t=e.namedCurve?"namedCurve":"namedParam",r=0<=e.name.indexOf("-94")||0<=e.name.indexOf("-2001")||1994===e.version||2001===e.version?e.sBox||"D-A":0<=e.name.indexOf("-512")||512===e.length?"D-512":"D-256";return{algorithm:e.id,parameters:{publicKeyParamSet:i[t][e[t]],digestParamSet:i.sBox[r],encryptionParamSet:e.encParams&&e.encParams.sBox?i.sBox[e.encParams.sBox]:void 0}}},decode:function(e){var t=e.parameters,r=p(n[e.algorithm],a[t.publicKeyParamSet],a[t.digestParamSet]);return t.encryptionParamSet&&(r.encParams=a[t.encryptionParamSet]),r}}),Me=G(te,{encode:function(e){return{algorithm:e.id}},decode:function(e){return n[e.algorithm]}}),He=G(he,{encode:function(e){return{algorithm:e.id,parameters:null}},decode:function(e){return n[e.algorithm]}}),qe=G(Re,{encode:function(e){return{algorithm:e.id,parameters:i.sBox[e.sBox||e.hash&&e.hash.sBox||"D-A"]}},decode:function(e){var t=p(n[e.algorithm]),r=a[e.parameters];return t.hash?t.hash=p(t.hash,r):t=p(t,r),t}}),ze=Ne({ecdsa:Ue,noSignature:He,rsaEncryption:He,"id-sc-gostR3410-2001":Ue,"id-GostR3410-2001":Ge,"id-GostR3410-94":Ge,"id-GostR3410-2001DH":Ge,"id-GostR3410-94DH":Ge,"id-tc26-gost3410-12-256":Ge,"id-tc26-gost3410-12-512":Ge,"id-tc26-agreement-gost-3410-12-256":Ge,"id-tc26-agreement-gost-3410-12-512":Ge,"id-sc-gost28147-gfb":Me,"id-Gost28147-89":Me}),We=Ne({noSignature:He,rsaEncryption:He,sha1withRSAEncryption:He,sha256withRSAEncryption:He,sha384withRSAEncryption:He,sha512withRSAEncryption:He,ecdsa:Me,"ecdsa-with-SHA1":Me,"ecdsa-with-SHA256":Me,"ecdsa-with-SHA384":Me,"ecdsa-with-SHA512":Me,"id-GostR3410-94":He,"id-GostR3410-2001":He,"id-GostR3411-94-with-GostR3410-2001":Me,"id-GostR3411-94-with-GostR3410-94":Me,"id-tc26-gost3410-12-256":He,"id-tc26-gost3410-12-512":He,"id-tc26-signwithdigest-gost3410-12-94":Me,"id-tc26-signwithdigest-gost3410-12-256":Me,"id-tc26-signwithdigest-gost3410-12-512":Me,"id-sc-gostR3410-94":He,"id-sc-gostR3410-2001":He,"id-sc-gostR3411-94-with-gostR3410-94":He,"id-sc-gostR3411-94-with-gostR3410-2001":He}),Ve=Ne({sha1:Me,sha256:He,sha384:He,sha512:He,"id-GostR3411-94":qe,"id-tc26-gost3411-94":qe,"id-tc26-gost3411-12-256":He,"id-tc26-gost3411-12-512":He,"id-sc-gostR3411-94":Me}),Xe=ye,Je=ye,Ye=me,Ze=ye,Qe=O({iv:Ze,encryptionParamSet:Ye}),$e=O({encryptionParamSet:Ye,ukm:U(ye)}),et=G(Qe,{encode:function(e){return{algorithm:e.id,parameters:{iv:e.iv,encryptionParamSet:i.sBox[e.sBox||"E-A"]}}},decode:function(e){var t=p(n[e.algorithm],a[e.parameters.encryptionParamSet]);return t.iv=e.parameters.iv,t}}),tt=G(Ze,{encode:function(e){return{algorithm:e.id,parameters:e.iv}},decode:function(e){var t=p(n[e.algorithm]);return t.iv=e.parameters||new Uint8Array([0,0,0,0,0,0,0,0]),t}}),rt=G($e,{encode:function(e){return{algorithm:e.id,parameters:{encryptionParamSet:i.sBox[e.sBox||"E-A"],ukm:e.ukm}}},decode:function(e){var t=p(n[e.algorithm],a[e.parameters.encryptionParamSet]);return e.parameters.ukm&&(t.ukm=e.parameters.ukm),t}}),nt=Ne({"id-Gost28147-89-None-KeyWrap":rt,"id-Gost28147-89-CryptoPro-KeyWrap":rt}),ot=G(nt,{encode:function(e){return{algorithm:e.id,parameters:e.wrapping}},decode:function(e){var t=p(n[e.algorithm]);return t.wrapping=e.parameters,t}}),it=Ne({"id-sc-gost28147-gfb":tt,"id-Gost28147-89":et}),st=Ne({"id-Gost28147-89-MAC":Qe,"id-HMACGostR3411-94":qe,"id-tc26-hmac-gost-3411-12-256":qe,"id-tc26-hmac-gost-3411-12-512":qe,hmacWithSHA1:Me,hmacWithSHA224:Me,hmacWithSHA256:Me,hmacWithSHA384:Me,hmacWithSHA512:Me,"id-sc-gost28147-mac":Me,"id-sc-hmacWithGostR3411":Me}),at=O({salt:R({specified:ye,otherSource:Ne},function(e){return y(e)?"specified":"otherSource"}),iterationCount:pe,keyLength:U(pe),prf:st}),ut=Ne({PBKDF2:G(at,{encode:function(e){return{algorithm:e.id,parameters:{salt:e.salt,iterationCount:e.iterations,prf:e.hmac}}},decode:function(e){var t=p(n[e.algorithm]);return t.salt=e.parameters.salt,t.iterations=e.parameters.iterationCount,t.hmac=e.parameters.prf,t.hash=t.hmac.hash,t}})}),ct=O({salt:ye,iterationCount:pe}),ft=G(ct,{paramType:ct,encode:function(e){return{algorithm:e.id,parameters:{salt:e.derivation.salt,iterationCount:e.derivation.iterations}}},decode:function(e){var t=p(n[e.algorithm]);return t.derivation=p(t.derivation,{salt:e.parameters.salt,iterations:e.parameters.iterationCount}),t}}),lt=O({keyDerivationFunc:ut,encryptionScheme:it}),ht=G(lt,{encode:function(e){return{algorithm:e.id,parameters:{keyDerivationFunc:e.derivation,encryptionScheme:e.encryption}}},decode:function(e){var t=p(n[e.algorithm]);return t.derivation=e.parameters.keyDerivationFunc,t.encryption=e.parameters.encryptionScheme,t}}),pt=(Ne({"pbeWithSHAAndAES128-CBC":ft,"pbeWithSHAAndAES192-CBC":ft,"pbeWithSHAAndAES256-CBC":ft,"pbeWithSHA256AndAES128-CBC":ft,"pbeWithSHA256AndAES192-CBC":ft,"pbeWithSHA256AndAES256-CBC":ft,"id-sc-pbeWithGost3411AndGost28147":ft,"id-sc-pbeWithGost3411AndGost28147CFB":ft,"pbeWithSHAAnd3-KeyTripleDES-CBC":ft,"pbeWithSHAAnd2-KeyTripleDES-CBC":ft,"pbeWithSHAAnd128BitRC2-CBC":ft,"pbeWithSHAAnd40BitRC2-CBC":ft,pbeUnknownGost:ft,PBES2:ht}),Ne({ecdsa:Ue,rsaEncryption:He,"id-sc-gost28147-gfb":tt,"id-Gost28147-89":et,"id-sc-gostR3410-2001":Ue,"id-GostR3410-2001":Ge,"id-GostR3410-94":Ge,"id-tc26-gost3410-12-256":Ge,"id-tc26-gost3410-12-512":Ge,"id-GostR3410-94-CryptoPro-ESDH":ot,"id-GostR3410-2001-CryptoPro-ESDH":ot,"id-tc26-agreement-gost-3410-12-256":ot,"id-tc26-agreement-gost-3410-12-512":ot,"id-sc-r3410-ESDH-r3411kdf":He,"id-Gost28147-89-None-KeyWrap":rt,"id-Gost28147-89-CryptoPro-KeyWrap":rt,"id-sc-cmsGostWrap":Me,"id-sc-cmsGost28147Wrap":Me,"pbeWithSHAAndAES128-CBC":ft,"pbeWithSHAAndAES192-CBC":ft,"pbeWithSHAAndAES256-CBC":ft,"pbeWithSHA256AndAES128-CBC":ft,"pbeWithSHA256AndAES192-CBC":ft,"pbeWithSHA256AndAES256-CBC":ft,"id-sc-pbeWithGost3411AndGost28147":ft,"id-sc-pbeWithGost3411AndGost28147CFB":ft,"pbeWithSHAAnd3-KeyTripleDES-CBC":ft,"pbeWithSHAAnd2-KeyTripleDES-CBC":ft,"pbeWithSHAAnd128BitRC2-CBC":ft,"pbeWithSHAAnd40BitRC2-CBC":ft,pbeUnknownGost:ft,PBES2:ht})),dt=O({keyDerivationFunc:ut,messageAuthScheme:st}),yt=(Ne({PBMAC1:G(dt,{encode:function(e){return{algorithm:e.id,parameters:{keyDerivationFunc:e.derivation,messageAuthScheme:e.hmac}}},decode:function(e){var t=p(n[e.algorithm]);return t.derivation=e.parameters.keyDerivationFunc,t.hmac=e.parameters.messageAuthScheme,t}})}),Ne({"id-sc-gost28147-gfb":tt,"id-Gost28147-89":et,"pbeWithSHAAndAES128-CBC":ft,"pbeWithSHAAndAES192-CBC":ft,"pbeWithSHAAndAES256-CBC":ft,"pbeWithSHA256AndAES128-CBC":ft,"pbeWithSHA256AndAES192-CBC":ft,"pbeWithSHA256AndAES256-CBC":ft,"id-sc-pbeWithGost3411AndGost28147":ft,"id-sc-pbeWithGost3411AndGost28147CFB":ft,"pbeWithSHAAnd3-KeyTripleDES-CBC":ft,"pbeWithSHAAnd2-KeyTripleDES-CBC":ft,"pbeWithSHAAnd128BitRC2-CBC":ft,"pbeWithSHAAnd40BitRC2-CBC":ft,pbeUnknownGost:ft,PBES2:ht})),gt=K,mt=gt(ge(L(pe)),{encode:function(e){return r.encode(d(e))},decode:function(e){return d(r.decode(e))}}),bt=gt(ge(L(ye)),{encode:function(e){var t=new Uint8Array(e.byteLength+1),r=d(e),n=e.byteLength/2;return t[0]=4,t.set(new Uint8Array(r,n,n),1),t.set(new Uint8Array(r,0,n),1+n),t.buffer},decode:function(e){v(0==(1&e.byteLength));var t=new Uint8Array(e.byteLength-1),r=t.byteLength/2;return t.set(new Uint8Array(e,1+r,r),0),t.set(new Uint8Array(e,1,r),r),d(t)}}),vt=ge(L(ye)),wt=O({algorithm:ze,subjectPublicKey:ge},"PUBLIC KEY"),_t=(Y={"id-sc-gostR3410-2001":bt,"id-sc-gostR3410-94":mt,"id-GostR3410-2001":vt,"id-GostR3410-94":vt,"id-tc26-gost3410-12-256":vt,"id-tc26-gost3410-12-512":vt},K(B({algorithm:ze,subjectPublicKey:te},"algorithm","subjectPublicKey")(function(e){return Y[e.id]}),{encode:function(e){return{algorithm:e.algorithm,subjectPublicKey:e.buffer}},decode:function(e){return{algorithm:e.algorithm,type:"public",extractable:!0,usages:["verify","deriveKey","deriveBits"],buffer:e.subjectPublicKey}}})),xt=ye,At=gt(xt(L(pe)),{encode:function(e){return m(e,!0)},decode:function(e){return b(e,!0)}}),Ct=ye,St=O({keyValueMask:Ct,keyValyePublicKey:ye}),kt=R({privateKey:xt(L(R({keyValueMask:Ct,keyValueInfo:St},function(e){return y(e)?"keyValueMask":"keyValueInfo"}))),keyValueMask:Ct},function(e){return e.enclosed?"keyValueMask":"privateKey"}),Et=(Z={"id-sc-gostR3410-2001":bt,"id-sc-gostR3410-94":mt,"id-GostR3410-2001":vt,"id-GostR3410-94":vt,"id-GostR3410-2001DH":vt,"id-GostR3410-94DH":vt,"id-tc26-gost3410-12-256":vt,"id-tc26-gost3410-12-512":vt,"id-tc26-agreement-gost-3410-12-256":vt,"id-tc26-agreement-gost-3410-12-512":vt},B({version:Pe,privateKeyAlgorithm:ze,privateKeyWrapped:gt(xt(L(O({keyData:pe,keyMac:pe}))),{encode:function(e){var t=e.byteLength-4;return{keyData:m(new Uint8Array(e,0,t)),keyMac:m(new Uint8Array(e,t,4))}},decode:function(e){var t=b(e.keyData),r=b(e.keyMac),n=new Uint8Array(t.byteLength+r.byteLength);return n.set(new Uint8Array(t)),n.set(new Uint8Array(r),t.byteLength),n}}),attributes:te},"privateKeyAlgorithm","attributes")(function(e){return U(T(0,F(Be({"id-sc-gostR3410-2001-publicKey":I(Z[e.id])}))))})),Pt=O({version:Pe,privateKeyAlgorithm:ze,privateKey:xt,attributes:U(T(0,F(Be)))},"PRIVATE KEY"),Ot=ge,Bt=be(O({version:Pe,privateKeyAlgorithm:ze,privateKey:xt,attributes:U(T(0,F(Be))),publicKey:U(T(1,F(Ot)))})),Ft=(Q={"id-sc-gostR3410-2001":At,"id-sc-gostR3410-94":At,"id-GostR3410-2001":kt,"id-GostR3410-94":kt,"id-GostR3410-2001DH":kt,"id-GostR3410-94DH":kt,"id-tc26-gost3410-12-256":kt,"id-tc26-gost3410-12-512":kt,"id-tc26-agreement-gost-3410-12-256":kt,"id-tc26-agreement-gost-3410-12-512":kt},K(B({version:Pe,privateKeyAlgorithm:ze,privateKey:te,attributes:U(T(0,F(Be)))},"privateKeyAlgorithm","privateKey")(function(e){return Q[e.id]}),{encode:function(e){return{version:0,privateKeyAlgorithm:e.algorithm,privateKey:e.buffer}},decode:function(e){return{algorithm:e.privateKeyAlgorithm,type:"private",extractable:!0,usages:["sign","deriveKey","deriveBits"],buffer:y(e.privateKey)?e.privateKey:e.privateKey.keyValueMask}}})),jt=O({encryptionAlgorithm:pt,encryptedData:ye},"ENCRYPTED PRIVATE KEY"),Tt=ge,Dt=pe,Kt=O({cA:N(re,!1),pathLenConstraint:U(pe)}),It=ge({digitalSignature:0,nonRepudiation:1,keyEncipherment:2,dataEncipherment:3,keyAgreement:4,keyCertSign:5,cRLSign:6,encipherOnly:7,decipherOnly:8}),Rt=be(me),Lt=ye,Nt=O({type:me,value:T(0,j(te))}),Ut=O({nameAssigner:U(T(0,F(we))),partyName:U(T(1,F(we)))}),Gt=O({}),Mt=R({otherName:T(0,F(Nt)),rfc822Name:T(1,F(we)),dNSName:T(2,F(we)),x400Address:T(3,F(Gt)),directoryName:T(4,j(ke)),ediPartyName:T(5,F(Ut)),uniformResourceIdentifier:T(6,F(we)),iPAddress:T(7,F(ye)),registeredID:T(8,F(me))},function(e){return"string"==typeof e||e instanceof String?0<=e.indexOf("@")?"rfc822Name":"dNSName":y(e)?"iPAddress":"directoryName"}),Ht=be(Mt),qt=O({keyIdentifier:U(T(0,F(Lt))),authorityCertIssuer:U(T(1,F(Ht))),authorityCertSerialNumber:U(T(2,F(Dt)))}),zt=O({notBefore:U(T(0,F(ce))),notAfter:U(T(1,F(ce)))}),Wt=me,Vt=O({policyQualifierId:me,qualifier:te}),Xt=O({policyIdentifier:Wt,policyQualifiers:U(be(Vt))}),Jt=O({issuerDomainPolicy:Wt,subjectDomainPolicy:Wt}),Yt=pe,Zt=be(O({base:Mt,minimum:N(T(0,F(Yt)),0),maximum:U(T(1,F(Yt)))})),Qt=O({permittedSubtrees:U(T(0,F(Zt))),excludedSubtrees:U(T(1,F(Zt)))}),$t=pe,er=O({requireExplicitPolicy:U(T(0,F($t))),inhibitPolicyMapping:U(T(1,F($t)))}),tr=ge({unused:0,keyCompromise:1,cACompromise:2,affiliationChanged:3,superseded:4,cessationOfOperation:5,certificateHold:6,privilegeWithdrawn:7,aACompromise:8}),rr=R({fullName:T(0,F(Ht)),nameRelativeToCRLIssuer:T(1,F(Se))},function(e){return e instanceof Array?"fullName":"nameRelativeToCRLIssuer"}),nr=be(O({distributionPoint:U(T(0,j(rr))),reasons:U(T(1,F(tr))),cRLIssuer:U(T(2,F(Ht)))})),or=nr,ir=O({accessMethod:me,accessLocation:Mt}),sr=O({signTool:ae,cATool:ae,signToolCert:ae,cAToolCert:ae}),ar=be(M,{typeName:"extnID",valueName:"extnValue"}),ur=ar({authorityKeyIdentifier:qt,subjectKeyIdentifier:Lt,keyUsage:It,privateKeyUsagePeriod:zt,certificatePolicies:be(Xt),policyMappings:be(Jt),subjectAltName:Ht,issuerAltName:Ht,subjectDirectoryAttributes:Fe,basicConstraints:Kt,nameConstraints:Qt,policyConstraints:er,extKeyUsage:Rt,cRLDistributionPoints:nr,inhibitAnyPolicy:$t,freshestCRL:or,authorityInfoAccess:be(ir),subjectInfoAccess:be(ir),subjectSignTool:ae,issuerSignTool:sr},function(e,t){return"keyUsage"===e||"basicConstraints"===e&&void 0===t.pathLenConstraint}),cr=O({r:pe,s:pe}),fr=cr,lr=P(O({version:T(0,j(Pe)),serialNumber:Dt,signature:We,issuer:ke,validity:Ee,subject:ke,subjectPublicKeyInfo:wt,issuerUniqueID:U(T(1,F(Tt))),subjectUniqueID:U(T(2,F(Tt))),extensions:U(T(3,j(ur)))})),hr=O({tbsCertificate:lr,signatureAlgorithm:We,signatureValue:ge},"CERTIFICATE"),pr=ur,dr=Be({challengePassword:I(we),extensionRequest:I(pr),msCertExtensions:I(ur),extendedCertificateAttributes:I(Be)}),yr=P(O({version:pe,subject:ke,subjectPublicKeyInfo:wt,attributes:T(0,F(dr))})),gr=O({requestInfo:yr,signatureAlgorithm:We,signatureValue:ge},"CERTIFICATE REQUEST"),mr=pe,br=de({unspecified:0,keyCompromise:1,cACompromise:2,affiliationChanged:3,superseded:4,cessationOfOperation:5,certificateHold:6,removeFromCRL:8,privilegeWithdrawn:9,aACompromise:10}),vr=ar({authorityKeyIdentifier:qt,issuerAltName:Ht,cRLNumber:mr,deltaCRLIndicator:mr,issuingDistributionPoint:O({distributionPoint:U(T(0,j(rr))),onlyContainsUserCerts:N(T(1,F(re)),!1),onlyContainsCACerts:N(T(2,F(re)),!1),onlySomeReasons:U(T(3,F(tr))),indirectCRL:N(T(4,F(re)),!1),onlyContainsAttributeCerts:N(T(5,F(re)),!1)}),freshestCRL:or},function(e){return"cRLNumber"===e}),wr=ar({cRLReason:br,instructionCode:me,invalidityDate:ce,certificateIssuer:Ht}),_r=P(O({version:U(Pe),signature:We,issuer:ke,thisUpdate:_e,nextUpdate:U(_e),revokedCertificates:U(be(O({userCertificate:Dt,revocationDate:_e,crlEntryExtensions:U(wr)}))),crlExtensions:U(T(0,j(vr)))})),xr=O({tbsCertList:_r,signatureAlgorithm:We,signatureValue:ge},"CRL"),Ar=pe,Cr=O({digestedObjectType:de({publicKey:0,publicKeyCert:1,otherObjectTypes:2}),otherObjectTypeID:U(me),digestAlgorithm:Ve,objectDigest:ge}),Sr=O({issuer:Ht,serial:Dt,issuerUID:U(Tt)}),kr=O({issuerName:U(Ht),baseCertificateID:U(T(0,F(Sr))),objectDigestInfo:U(T(1,F(Cr)))}),Er=O({targetCertificate:Sr,targetName:U(Mt),certDigestInfo:U(Cr)}),Pr=be(R({targetName:T(0,j(Mt)),targetGroup:T(1,j(Mt)),targetCert:T(2,F(Er))})),Or=ar({auditIdentity:ye,targetInformation:Pr,authorityKeyIdentifier:qt,authorityInfoAccess:be(ir),cRLDistributionPoints:nr,noRevAvail:he},function(e){return"auditIdentity"===e||"targetInformation"===e}),Br=O({baseCertificateID:U(T(0,F(Sr))),entityName:U(T(1,F(Ht))),objectDigestInfo:U(T(2,F(Cr)))}),Fr=R({v1Form:Ht,v2Form:T(0,F(kr))},"v2Form"),jr=O({notBeforeTime:ce,notAfterTime:ce}),Tr=O({service:Mt,ident:Mt,authInfo:U(ye)}),Dr=O({roleAuthority:U(T(0,F(Ht))),roleName:T(1,j(Mt))}),Kr=ge({unmarked:0,unclassified:1,restricted:2,confidential:3,secret:4,topSecret:5}),Ir=O({type:T(0,F(me)),value:T(1,F(te))}),Rr=O({policyId:T(0,F(me)),classList:N(T(1,F(Kr)),["unclassified"]),securityCategories:U(T(2,F(ve(Ir))))}),Lr=O({policyAuthority:U(T(0,F(Ht))),values:be(R({octets:ye,oid:me,string:ae},function(e){return"octets"}))}),Nr=P(O({version:Ar,holder:Br,issuer:Fr,signature:We,serialNumber:Dt,attrCertValidityPeriod:jr,attributes:Fe({authenticationInfo:ve(Tr),accessIdentity:ve(Tr),chargingIdentity:I(Lr),group:I(Lr),role:ve(Dr),clearance:ve(Rr)}),issuerUniqueID:U(Tt),extensions:U(Or)})),Ur=O({acinfo:Nr,signatureAlgorithm:We,signatureValue:ge},"ATTRIBUTE CERTIFICATE"),Gr=ye,Mr=ye,Hr=ye,qr=(O({keyInfo:nt,entityUInfo:U(T(0,j(ye))),suppPubInfo:T(2,j(ye))}),K(O({encryptedKey:Xe,maskKey:U(T(0,F(Xe))),macKey:Je}),{encode:function(e){return{encryptedKey:new Uint8Array(new Uint8Array(e,0,32)).buffer,macKey:new Uint8Array(new Uint8Array(e,32,4)).buffer}},decode:function(e){var t=e.encryptedKey,r=e.maskKey,n=e.macKey;if(r)for(var o=new Int32Array(r),i=new Int32Array(t),s=0,a=o.length/i.length;s<a;s++)for(var u=0,c=i.length;u<c;u++)i[u]=i[u]+o[c*s+u]&4294967295;var f=new Uint8Array(t.byteLength+n.byteLength);return f.set(new Uint8Array(t),0),f.set(new Uint8Array(n),32),f.buffer}})),zr=O({encryptionParamSet:Ye,ephemeralPublicKey:U(T(0,F(_t))),ukm:ye}),Wr=K(O({sessionEncryptedKey:qr,transportParameters:U(T(0,F(zr)))}),{encode:function(e){var t=e.algorithm;return{sessionEncryptedKey:e.sessionEncryptedKey,transportParameters:{encryptionParamSet:i.sBox[t.wrapping.sBox||"E-A"],ephemeralPublicKey:t.public,ukm:t.ukm}}},decode:function(e){return{algorithm:{wrapping:a[e.transportParameters.encryptionParamSet],ukm:e.transportParameters.ukm,public:e.transportParameters.ephemeralPublicKey},sessionEncryptedKey:e.sessionEncryptedKey}}}),Vr=K(O({sessionEncryptedKey:qr,ukm:O({ephemeralPublicKey:_t,addedukm:U(T(0,j(Hr)))})}),{encode:function(e){var t=e.algorithm;return{sessionEncryptedKey:e.sessionEncryptedKey,ukm:{ephemeralPublicKey:t.public,addedukm:t.ukm}}},decode:function(e){return{algorithm:{ukm:e.ukm.addedukm,public:e.ukm.ephemeralPublicKey},sessionEncryptedKey:e.sessionEncryptedKey}}}),Xr=($={"id-sc-gostR3410-2001":Vr,"id-sc-gostR3410-94":Vr,"id-GostR3410-2001":Wr,"id-GostR3410-94":Wr,"id-tc26-gost3410-12-256":Wr,"id-tc26-gost3410-12-512":Wr,"id-GostR3410-94-CryptoPro-ESDH":qr,"id-GostR3410-2001-CryptoPro-ESDH":qr,"id-tc26-agreement-gost-3410-12-256":qr,"id-tc26-agreement-gost-3410-12-512":qr,"id-sc-r3410-ESDH-r3411kdf":qr,"id-Gost28147-89-None-KeyWrap":qr,"id-Gost28147-89-CryptoPro-KeyWrap":qr,"id-sc-cmsGostWrap":qr,"id-sc-cmsGost28147Wrap":qr},function(e){var t=$[e.id];return t?L(t):te}),Jr=ge({kccaSoftPassword:0,kccaReservePrimary:1,kccaPrimaryKeyAbsent:2,kccaFKCShared:3}),Yr=ge({pkaExportable:0,pkaUserProtect:1,pkaExchange:2,pkaEphemeral:3,pkaNonCachable:4,pkaDhAllowed:5}),Zr=O({attributes:U(Yr),privateKeyAlgorithm:U(T(0,F(ze)))}),Qr=O({path:ne,hmac:Je}),$r=Ne,en=O({containerAlgoritmIdentifier:U(T(0,F(Ne))),containerName:U(ne),attributes:Jr,primaryPrivateKeyParameters:Zr,hmacPassword:U(T(2,F(Je))),secondaryEncryptedPrivateKey:U(T(3,F(qr))),secondaryPrivateKeyParameters:U(T(4,F(Zr))),primaryCertificate:U(T(5,F(ye(L(hr))))),secondaryCertificate:U(T(6,F(ye(L(hr))))),encryptionContainerName:U(T(7,F(ne))),primaryCertificateLink:U(T(8,F(Qr))),secondaryCertificateLink:U(T(9,F(Qr))),primaryFP:U(T(10,F(ye))),secondaryFP:U(T(11,F(ye))),passwordPolicy:U($r),containerSecurityLevel:U(pe),extensions:U(T(12,F(ar({keyValidity:O({notBefore:U(T(0,F(ce))),notAfter:U(T(1,F(ce)))})})))),secondaryEncryptionContainerName:U(T(13,F(ne)))}),tn=O({keyContainerContent:en,hmacKeyContainerContent:Je}),rn=O({containerName:ne,extElem1:U(te)}),nn=O({primaryKey:Xe,secondaryKey:U(Xe),hmacKey:U(Je)}),on=O({mask:Xe,randomStatus:ye,hmacRandom:Je}),sn=O({keyClass:pe,keyType:pe,algorithm:U(T(0,j(ze))),serialNumber:U(T(1,j(ye))),addSerialNumber:U(T(2,j(ye))),certSerialNumber:U(T(3,j(ye))),subjectUID:U(T(4,j(ye))),recipientUID:U(T(5,j(ye))),validity:U(T(6,j(R({validity:Ee,keyValidity:O({notBefore:U(T(0,F(ce))),notAfter:U(T(1,F(ce)))})},function(){return"keyValidity"})))),keyUID:U(T(7,j(ge))),flags:U(T(10,j(pe)))}),an=O({version:pe,keyInfo:sn,defenceKeyInfo:sn,certificate:U(T(0,j(hr))),publicKey:U(T(1,j(ye)))}),un=pe,cn=me,fn=_e,ln=ye,hn=ye,pn=ye,dn=pe,yn=be(dn),gn=O({bodyPartPath:yn,identifier:me,content:te}),mn=Be({contentType:I(cn),signingTime:I(fn),messageDigest:I(ye)}),bn=Be(function(e){return{countersignature:ve(Sn),unsignedData:ve(gn)}[e]}),vn=mn,wn=Be,_n=Be,xn=O({issuer:ke,serialNumber:Dt}),An=R({issuerAndSerialNumber:xn,subjectKeyIdentifier:T(0,F(ln))},function(e){return y(e)?"subjectKeyIdentifier":"issuerAndSerialNumber"}),Cn=O({version:un,sid:An,digestAlgorithm:Ve,signedAttrs:U(T(0,F(mn))),signatureAlgorithm:We,signatureValue:ye,unsignedAttrs:U(T(1,F(bn)))}),Sn=Cn,kn=ve(Cn),En=ve(Ve),Pn=Ur,On=P(O({version:un,certificate:hr,attributes:wn})),Bn=O({extendedCertificateInfo:On,signatureAlgorithm:We,signatureValue:ge}),Fn=O({otherCertFormat:me,otherCert:te}),jn=P(O({version:pe,subject:R({baseCertificateID:T(0,F(Sr)),subjectName:T(1,F(Ht))},function(e){return e.issuer?"baseCertificateID":"subjectName"}),issuer:Ht,signature:We,serialNumber:Dt,attCertValidityPeriod:jr,attributes:Fe,issuerUniqueID:U(Tt),extensions:U(ur)})),Tn=O({acInfo:jn,signatureAlgorithm:We,signatureValue:ge}),Dn=O({eContentType:cn,eContent:U(T(0,j(ye)))}),Kn=R({certificate:hr,extendedCertificate:T(0,F(Bn)),v1AttrCert:T(1,F(Tn)),v2AttrCert:T(2,F(Pn)),other:T(3,F(Fn))},function(e){return e.holder?"AttributeCertificateV2":e.certificate?"ExtendedCertificate":e.otherCertFormat?"other":"certificate"}),In=O({otherRevInfoFormat:me,otherRevInfo:te}),Rn=R({crl:xr,other:T(1,F(In))},function(e){return e.otherRevInfoFormat?"other":"crl"}),Ln=ve(Kn),Nn=ve(Rn),Un=O({version:un,digestAlgorithms:En,encapContentInfo:Dn,certificates:U(T(0,F(Ln))),crls:U(T(1,F(Nn))),signerInfos:kn}),Gn=R({issuerAndSerialNumber:xn,subjectKeyIdentifier:T(0,F(ln))},function(e){return y(e)?"subjectKeyIdentifier":"issuerAndSerialNumber"}),Mn=O({version:un,rid:Gn,keyEncryptionAlgorithm:pt,encryptedKey:Gr}),Hn=O({keyAttrId:me,keyAttr:U(te)}),qn=O({subjectKeyIdentifier:ln,date:U(ce),other:U(Hn)}),zn=R({issuerAndSerialNumber:xn,rKeyId:T(0,F(qn))},function(e){return y(e)?"rKeyId":"issuerAndSerialNumber"}),Wn=be(O({rid:zn,encryptedKey:Gr})),Vn=O({algorithm:ze,publicKey:ge}),Xn=(O({ephemeralPublicKey:Vn,addedukm:U(T(0,j(Hr)))}),R({issuerAndSerialNumber:xn,subjectKeyIdentifier:T(0,F(ln)),originatorKey:T(1,F(Vn))},function(e){return y(e)?"subjectKeyIdentifier":e.algorithm?"originatorKey":"issuerAndSerialNumber"})),Jn=O({version:un,originator:T(0,j(Xn)),ukm:U(T(1,j(Hr))),keyEncryptionAlgorithm:pt,recipientEncryptedKeys:Wn}),Yn=O({keyIdentifier:ye,date:U(ce),other:U(Hn)}),Zn=O({version:un,kekid:Yn,keyEncryptionAlgorithm:pt,encryptedKey:Gr}),Qn=O({version:un,friendlyName:U(T(0,F(ut))),keyEncryptionAlgorithm:pt,encryptedKey:Gr}),$n=O({oriType:me,oriValue:te}),eo=R({ktri:Mn,kari:T(1,F(Jn)),kekri:T(2,F(Zn)),pwri:T(3,F(Qn)),ori:T(4,F($n))},function(e){return e.rid?"ktri":e.originator?"kari":e.kekid?"kekri":e.oriType?"ori":"pwri"}),to=O({certs:U(T(0,F(Ln))),crls:U(T(1,F(Nn)))}),ro=ve(eo),no=O({contentType:cn,contentEncryptionAlgorithm:yt,encryptedContent:U(T(0,F(Mr)))}),oo=O({version:un,originatorInfo:U(T(0,F(to))),recipientInfos:ro,encryptedContentInfo:no,unprotectedAttrs:U(T(1,F(_n)))}),io=O({version:un,digestAlgorithm:Ve,encapContentInfo:Dn,digest:hn}),so=O({version:un,encryptedContentInfo:no,unprotectedAttrs:U(T(1,F(_n)))}),ao=O({version:un,originatorInfo:U(T(0,F(to))),recipientInfos:ro,macAlgorithm:st,digestAlgorithm:U(T(1,Ve)),encapContentInfo:Dn,authAttrs:U(T(2,F(vn))),mac:pn,unauthAttrs:U(T(3,F(wn)))}),uo=O({version:un,originatorInfo:U(T(0,F(to))),recipientInfos:ro,authEncryptedContentInfo:no,authAttrs:U(T(1,F(vn))),mac:pn,unauthAttrs:U(T(2,F(wn)))}),co=R({encrypted:so,enveloped:T(0,F(oo)),authEnveloped:T(1,F(uo))},function(e){return e.encryptedContentInfo?e.recipientInfos?"enveloped":"encrypted":"authEnveloped"}),fo=B({contentType:cn=me,content:function(e){return T(0,j(e))}},"contentType","content",void 0,"CMS")({data:ye,signedData:P(Un),envelopedData:P(oo),digestedData:P(io),encryptedData:P(so),authData:P(ao),encryptedKeyPkg:P(co),aKeyPackage:P(Bt)}),lo=O({digestAlgorithm:Ve,digest:hn}),ho=Be({friendlyName:I(le),keyProviderNameAttr:I(le),localKeyId:I(ye),certKeyIdentifierPropId:I(ye)}),po=me,yo=me,go=me,mo=Pt,bo=jt,vo=B({certId:me,certValue:function(e){return T(0,j(e))}},"certId","certValue")({x509Certificate:ye(L(hr)),sdsiCertificate:ne},ye),wo=B({crlId:yo,crlValue:function(e){return T(0,j(e))}},"crlId","crlValue")({x509CRL:ye(L(xr))},ye),_o=B({secretTypeId:go,secretValue:function(e){return T(0,j(e))}},"secretTypeId","secretValue")({secret:ye},ye),xo=be(B({bagId:po,bagValue:function(e){return T(0,j(e))},bagAttributes:U(ho)},"bagId","bagValue")(function(e){return{keyBag:mo,pkcs8ShroudedKeyBag:bo,certBag:vo,crlBag:wo,secretBag:_o,safeContentsBag:xo}[e]})),Ao=be(fo),Co=O({mac:lo,macSalt:ye,iterations:N(pe,1)}),So=O({version:pe,authSafe:fo,macData:U(Co)},"PFX"),ko=ae,Eo=ae,Po=O({issuer:Mt,serialNumber:pe}),Oo=wt,Bo=O({intendedAlg:U(T(0,F(Ne))),symmAlg:U(T(1,F(Ne))),encSymmKey:U(T(2,F(ge))),keyAlg:U(T(3,F(Ne))),valueHint:U(T(4,F(ye))),encValue:ge}),Fo=ye,jo=(Gr=R({encryptedValue:Bo,envelopedData:T(0,F(oo))},function(e){return e.encryptedContentInfo?"envelopedData":"encryptedValue"}),R({encryptedPrivKey:T(0,Gr),keyGenParameters:T(1,F(Fo)),archiveRemGenPrivKey:T(2,F(re))})),To=O({pubMethod:pe({dontCare:0,x500:1,web:2,ldap:3}),pubLocation:U(Mt)}),Do=O({action:pe({dontPublish:0,pleasePublish:1}),pubInfos:U(be(To))}),Ko=pe({encrCert:0,challengeResp:1}),Io=R({thisMessage:T(0,F(ge)),subsequentMessage:T(1,F(Ko)),dhMAC:T(2,F(ge)),agreeMAC:T(3,F(Ro)),encryptedKey:T(4,F(oo))}),Ro=(O({salt:ye,owf:Ne,iterationCount:pe,mac:Ne}),O({algId:Ne,value:ge})),Lo=O({authInfo:R({sender:T(0,j(Mt)),publicKeyMAC:Ro}),publicKey:wt}),No=O({poposkInput:U(T(0,Lo)),algorithmIdentifier:Ne,signature:ge}),Uo=R({raVerified:T(0,F(he)),signature:T(1,F(No)),keyEncipherment:T(2,F(Io)),keyAgreement:T(3,F(Io))}),Go=be(Ae({regToken:ko,authenticator:Eo,pkiPublicationInfo:Do,pkiArchiveOptions:jo,oldCertID:Po,protocolEncrKey:Oo})),Mo=O({notBefore:U(T(0,F(_e))),notAfter:U(T(1,F(_e)))}),Ho=O({version:U(T(0,F(Pe))),serialNumber:U(T(1,F(pe))),signingAlg:U(T(2,F(Ne))),issuer:U(T(3,F(ke))),validity:U(T(4,F(Mo))),subject:U(T(5,F(ke))),publicKey:U(T(6,F(wt))),issuerUID:U(T(7,F(Tt))),subjectUID:U(T(8,F(Tt))),extensions:U(T(9,F(ar)))}),qo=O({certReqId:pe,certTemplate:Ho,controls:U(Go)}),zo=ae,Wo=qo,Vo=O({privateKey:Pt,identifier:U(R({string:ae,generalName:Mt},function(e){return"string"==typeof e||e instanceof String?"string":"generalName"}))}),Xo=O({certReq:qo,popo:U(Uo),regInfo:U(be(Ae({utf8Pairs:zo,certReq:Wo,encKeyWithID:Vo})))}),Jo=(be(Xo),O({pendToken:ye,pendTime:ce})),Yo=pe({success:0,failed:2,pending:3,noSupport:4,confirmRequired:5,popRequired:6,partial:7}),Zo=pe({badAlg:0,badMessageCheck:1,badRequest:2,badTime:3,badCertId:4,unsupportedExt:5,mustArchiveKeys:6,badIdentity:7,popRequired:8,popFailed:9,noKeyReuse:10,internalCAError:11,tryLater:12,authDataFail:13}),Qo=O({cMCStatus:Yo,bodyList:be(dn),statusString:U(ae),otherInfo:U(R({failInfo:Zo,pendInfo:Jo}))}),$o=O({pkiDataReference:dn,certReferences:be(dn),extensions:be(M)}),ei=O({pkiDataBodyid:dn,bodyIds:be(dn)}),ti=O({issuerName:Mt,serialNumber:pe}),ri=O({issuerName:ke,cRLName:U(Mt),time:U(ce),reasons:U(tr)}),ni=O({issuerName:ke,serialNumber:pe,reason:br,invalidityDate:U(ce),passphrase:U(ye),comment:U(ae)}),oi=O({bodyPartID:dn,thePOPAlgID:Ne,thePOP:ye}),ii=xn,si=R({bodyPartID:dn,bodyPartPath:yn}),ai=O({cMCStatus:Yo,bodyList:be(si),statusString:U(ae),otherInfo:U(R({failInfo:Zo,pendInfo:Jo,extendedFailInfo:O({failInfoOID:me,failInfoValue:xe})}))}),ui=O({seqNumber:pe,hashAlgorithm:Ne,anchorHashes:be(ye)}),ci=dn,fi=be(dn),li=O({hashAlg:Ne,certHashes:be(ye),pubInfo:Do}),hi=O({pkiDataReference:yn,certReferences:fi,replace:N(re,!0),certTemplate:Ho}),pi=O({bodyList:be(si)}),di=O({proofAlgID:Ne,macAlgId:Ne,witness:ye}),yi=O({keyGenAlgorithm:Ne,macAlgorithm:Ne,witness:ye}),gi=O({bodyPartID:dn,certificationRequest:gr}),mi=O({bodyPartID:dn,contentInfo:fo}),bi=O({bodyPartID:dn,otherMsgType:me,otherMsgValue:te}),vi=R({tcr:T(0,F(gi)),crm:T(1,F(Xo)),orm:T(2,F(O({bodyPartID:dn,requestMessageType:me,requestMessageValue:te})))}),wi=O({request:vi,cms:fo,thePOPAlgID:Ne,witnessAlgID:Ne,witness:ye}),_i=B({bodyPartID:dn,attrType:me,attrValues:function(e){return ve(e)}},"attrType","attrValues",xe)({statusInfo:Qo,identification:ae,identityProof:ye,dataReturn:ye,transactionId:pe,senderNonce:ye,recipientNonce:ye,addExtensions:$o,encryptedPOP:wi,decryptedPOP:oi,lraPOPWitness:ei,getCert:ti,getCRL:ri,revokeRequest:ni,regInfo:ye,responseInfo:ye,queryPending:ye,popLinkRandom:ye,popLinkWitness:ye,confirmCertAcceptance:ii,statusInfoV2:ai,trustedAnchors:ui,authPublish:ci,batchRequests:fi,batchResponses:fi,publishCert:li,modCertTemplate:hi,controlProcessed:pi,popLinkWitnessV2:yi,identityProofV2:di}),xi=O({controlSequence:be(_i),reqSequence:be(vi),cmsSequence:be(mi),otherMsgSequence:be(bi)},"PKI REQUEST"),Ai=O({controlSequence:be(_i),cmsSequence:be(mi),otherMsgSequence:be(bi)},"PKI RESPONSE");function Ci(){}return Ci.prototype={GostPrivateKeyInfo:Ft,GostSubjectPublicKeyInfo:_t,GostKeyContainer:tn,GostKeyContainerName:rn,GostPrivateKeys:nn,GostPrivateMasks:on,ViPNetInfo:an,GostSignature:fr,GostEncryptedKey:Xr,GostWrappedPrivateKey:Et,PrivateKeyInfo:Pt,EncryptedPrivateKeyInfo:jt,SubjectPublicKeyInfo:wt,TBSCertificate:lr,Certificate:hr,CertificationRequestInfo:yr,CertificationRequest:gr,TBSCertList:_r,CertificateList:xr,AttributeCertificateInfo:Nr,AttributeCertificate:Ur,SignedAttributes:mn,UnsignedAttributes:bn,ContentInfo:fo,SafeContents:xo,AuthenticatedSafe:Ao,PFX:So,PKIData:xi,PKIResponse:Ai},e.asn1=new Ci,Ci},"function"==typeof define&&define.amd?define(["gostCrypto","gostCoding","gostSecurity"],t):"object"===(void 0===o?"undefined":ki(o))?n.exports=t(r("./gostCrypto"),r("./gostCoding"),r("./gostSecurity")):e.GostASN1=t(e.gostCrypto,e.GostCoding,e.GostSecurity)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostCoding":109,"./gostCrypto":110,"./gostSecurity":115}],106:[function(r,n,o){(function(K){"use strict";function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e,t;e=void 0,t=function(r){var e="object"===("undefined"==typeof self?"undefined":I(self))&&self.self===self&&self||"object"===(void 0===K?"undefined":I(K))&&K.global===K&&K||this,b=e.Promise,u=e.Object,c=e.ArrayBuffer,t=e.Date,v=r.subtle,w=r.asn1,i=r.coding,f=r.cert,l=r.security.providers;function _(){for(var e={},t=0,r=arguments.length;t<r;t++){var n=arguments[t];if("object"===I(n))for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}function s(e,t,r){for(var n in t)o=e,s=t[i=n],a=r,"object"!==I(s)&&(s={value:s}),void 0!==a&&(s.enumerable=a),u.defineProperty(o,i,s);var o,i,s,a}function n(e,t,r,n){if("function"!=typeof t&&(n=r,r=t,t=function(){e.apply(this,arguments)}),t.prototype=u.create(e.prototype,{constructor:{value:t},superclass:{value:e.prototype}}),r&&s(t.prototype,r,!0),e!==u)for(var o in e)t[o]=e[o];return t.super=e,n&&s(t,n,!0),t}function x(e){try{e()}catch(e){}}function h(e,t){var r=new Uint8Array(e),n=new Uint8Array(t);if(r.length!==n.length)return!1;for(var o=0,i=r.length;o<i;o++)if(r[o]!==n[o])return!1;return!0}var p=function(e,t){e=o(e),t=o(t);var r=Math.max(e.length,t.length);return a(e,r)===a(t,r)};function o(e){var t=I(e);return"undefined"===t||""===e?"0":"number"===t||e instanceof Number?e.toString(16).toLowerCase():e.replace("0x","").toLowerCase()}function a(e,t){return(new Array(t+1).join("0")+e).slice(-t)}function d(e,t){for(var r in e)if(e[r]!==t[r])return!1;for(var r in t)if(e[r]!==t[r])return!1;return!0}function y(e,t,r){for(var n=!1,o=0,i=e.length;o<i;o++)if(r(e[o],t)){n=!0;break}n||e.push(t)}function g(e,t){var r=e.content;switch(e.contentType){case"data":e.content=t.content;break;case"digestedData":case"signedData":case"authData":r.encapContentInfo={eContentType:t.contentType,eContent:t.content};break;case"envelopedData":case"encryptedData":r.encryptedContentInfo={contentType:t.contentType,encryptedContent:t.content}}}function m(e){var t=e.content;switch(e.contentType){case"data":return{contentType:e.contentType,content:e.content};case"digestedData":case"signedData":case"authData":var r=t.encapContentInfo;return{contentType:r.eContentType,content:r.eContent};case"envelopedData":case"encryptedData":var n=t.encryptedContentInfo;return{contentType:n.contentType,content:n.encryptedContent}}}function A(t){var e,r;if(t){if("string"==typeof t)try{t=i.PEM.decode(t)}catch(e){t=i.Chars.decode(t)}if(t instanceof c)try{t=w.ContentInfo.decode(t)}catch(e){t={contentType:"data",content:t}}if(!(r=t.contentType))throw new Error("Invalid content object");return(e=t.content)instanceof c||(e=e.encode()),{contentType:r,content:e}}return t={contentType:"data"}}function C(e){try{e=new w.ContentInfo(e.content,!0)}catch(e){}switch(e.contentType){case"data":return new B(e);case"digestedData":return new F(e);case"signedData":return new j(e);case"encryptedData":return new T(e);case"envelopedData":return new D(e);default:return new w.ContentInfo(e)}}function S(e,t){return e instanceof c?t.extensions&&h(e,t.extensions.subjectKeyIdentifier):d(t.issuer,e.issuer)&&p(t.serialNumber,e.serialNumber)}function k(e){var t=new Uint8Array(e);return r.getRandomValues(t),t.buffer}function E(e,t){if(!t)return new c(0);if(t instanceof c)return t;if("string"!=typeof t)throw new Error("The password must be string or raw data type");if(0<=e.name.indexOf("CPKDF")){for(var r=[],n=0;n<t.length;n++){var o=t.charCodeAt(n);r.push(255&o),r.push(o>>>8&255),r.push(0),r.push(0)}return new Uint8Array(r).buffer}return 0<=e.name.indexOf("PFXKDF")?i.Chars.decode(t+"\0","unicode"):i.Chars.decode(t,"utf8")}function P(){}var O={providerName:"CP-01",autoAddCert:!1,useKeyIdentifier:!1};function B(e,t){if(w.ContentInfo.call(this,e||t||{contentType:"data"}),t&&this.contentType!==(t.contentType||"data"))throw new Error("Invalid content type")}function F(e){B.call(this,e,{contentType:"digestedData",version:0,digestAlgorithm:l[O.providerName].digest,encapContentInfo:{eContentType:"data"},digest:new c(0)})}function j(e){B.call(this,e,{contentType:"signedData",version:1,digestAlgorithms:[],encapContentInfo:{eContentType:"data"},signerInfos:[]})}function T(e){B.call(this,e,{contentType:"encryptedData",version:0,encryptedContentInfo:{contentType:"data",contentEncryptionAlgorithm:l[O.providerName].encryption}})}function D(e){B.call(this,e,{contentType:"envelopedData",version:0,recipientInfos:[],encryptedContentInfo:{contentType:"data",contentEncryptionAlgorithm:l[O.providerName].encryption}})}return P.prototype.options=O,n(w.ContentInfo,B,{isDetached:{value:!1,enumerable:!0,writable:!0},writeDetached:function(e){this.isDetached=e},encode:function(e){if(this.isDetached){var t=m(this);g(this,{contentType:t.contentType});var r=w.ContentInfo.method("encode").call(this,e);return g(this,t),r}return w.ContentInfo.method("encode").call(this,e)},encloseContent:function(e){var t=this;return new b(x).then(function(){return t.setEnclosed(e),t})},setEnclosed:function(e){g(this,A(e))},getEnclosed:function(){return C(m(this))}}),n(P.prototype.DataContentInfo=B,F,{encloseContent:function(t,r){var n=this;return new b(x).then(function(){if(n.setEnclosed(t),r){var e=l[r];n.digestAlgorithm=e&&e.digest||r}return v.digest(n.digestAlgorithm,n.encapContentInfo.eContent)}).then(function(e){n.digest=e})},verify:function(e){var t=this;return new b(x).then(function(){if(e&&t.setEnclosed(e),!(t.encapContentInfo&&t.encapContentInfo.eContent))throw new Error("Detached content is not found");return v.digest(t.digestAlgorithm,t.encapContentInfo.eContent)}).then(function(e){if(!h(e,t.digest))throw Error("Message digest is not verified");return C({contentType:t.encapContentInfo.eContentType,content:t.encapContentInfo.eContent})})}}),P.prototype.DigestedDataContentInfo=F,n(B,j,{addSignature:function(r,n,o,i){var s,a,u,c=this;return new b(x).then(function(){if(!r||!n)throw new Error("Signer key or certificate is not defined");n instanceof Array?n=(u=n)[0]:u=[n];var e=n.getProvider()||l[O.providerName],t=O.useKeyIdentifier&&n.extensions&&n.extensions.subjectKeyIdentifier;if(a=c.encapContentInfo.eContent,s={version:t?2:0,sid:t?n.extensions.subjectKeyIdentifier:{issuer:n.issuer,serialNumber:n.serialNumber},digestAlgorithm:e.digest,signatureAlgorithm:n.subjectPublicKeyInfo.algorithm},i&&(s.unsignedAttrs=i),o)return"object"!==I(o)&&(o={}),v.digest(s.digestAlgorithm,a)}).then(function(e){return e&&(o.contentType=c.encapContentInfo.eContentType,o.messageDigest=e,o.signingTime=new t,s.signedAttrs=o,a=w.SignedAttributes.encode(s.signedAttrs)),v.importKey("pkcs8",w.PrivateKeyInfo.encode(r),r.privateKeyAlgorithm,!1,["sign"])}).then(function(e){var t=_(s.signatureAlgorithm,{hash:s.digestAlgorithm});return v.sign(t,e,a)}).then(function(e){if(s.signatureValue=e,y(c.digestAlgorithms,s.digestAlgorithm,function(e,t){return e.id===t.id}),O.autoAddCert){c.certificates||(c.certificates=[]);for(var t=0,r=u.length;t<r;t++)y(c.certificates,u[t],function(e,t){return d(e.issuer,t.issuer)&&p(e.serialNumber,t.serialNumber)})}c.signerInfos.push(s)})},isDegenerate:{get:function(){return!(this.signerInfos&&0<this.signerInfos.length)}},verify:function(i,e){var r,s=this;return new b(x).then(function(){if(e&&s.setEnclosed(e),!s.signerInfos||0===s.signerInfos.length)throw new Error("No signatures found");return b.all(s.signerInfos.map(function(e,t){var r,n=e.sid,o=n instanceof c?{subjectKeyIdentifier:n}:{issuer:n.issuer,serialNumber:n.serialNumber};return e.signedAttrs&&e.signedAttrs.signingTime&&(r=e.signedAttrs.signingTime),i.getValidCertificate(o,s.certificates,s.crls,r).catch(function(){})}))}).then(function(e){var t=[];if(e.forEach(function(e){e&&t.push(s.verifySignature(e).then(function(e){r=e},function(){}))}),0===t.length)throw new Error("Valid verification path not found");return b.all(t)}).then(function(){if(!r)throw Error("Verification path found but no valid signature");return r})},verifySignature:function(r,n){var o,i,s,a=this;return new b(x).then(function(){if(n&&a.setEnclosed(n),!(i=a.encapContentInfo&&a.encapContentInfo.eContent))throw new Error("Detached content is not found");for(var e=0;e<a.signerInfos.length;e++){if(S(a.signerInfos[e].sid,r)){o=a.signerInfos[e];break}}if(!o)throw new Error("Signature not found for the certificate");if(o.signedAttrs){if(!(s=o.signedAttrs.messageDigest))throw new Error("Message digest must present in signed attributes");i=o.signedAttrs.encode()}if(!i)throw new Error("Data for verification not found");var t=_(o.signatureAlgorithm,{hash:o.digestAlgorithm});return r.verifySignature(i,o.signatureValue,t)}).then(function(e){if(!e)throw new Error("Signature not verified");if(o.signedAttrs)return v.digest(o.digestAlgorithm,a.encapContentInfo.eContent)}).then(function(e){if(e&&!h(e,s))throw new Error("Message digest not verified");return C({contentType:a.encapContentInfo.eContentType,content:a.encapContentInfo.eContent})})}}),P.prototype.SignedDataContentInfo=j,n(B,T,{encloseContent:function(n,o,i){var s,a,t=this;return new b(x).then(function(){if(!(n=A(n)).content)throw new Error("Content for encryption must be specified");var t,e="string"==typeof o?"pbes":"encryption";if(i){var r=l[i];i=r&&r[e]||i}else i=l[O.providerName][e];if(i.derivation)return a=_(i.derivation),s=_(i.encryption),a.salt=k(function(e){switch(e.id){case"pbeWithSHAAnd40BitRC2-CBC":case"pbeWithSHAAnd128BitRC2-CBC":return 8;case"pbeUnknownGost":return 16;case"sha1":return 20;default:return 32}}(i)),v.importKey("raw",E(a,o),a,!1,["deriveKey","deriveBits"]).then(function(e){if(t=e,0<=a.name.indexOf("PFXKDF"))return a.diversifier=2,v.deriveBits(a,t,64)}).then(function(e){return e&&(s.iv=e),a.diversifier=1,v.deriveKey(a,t,s,!1,["encrypt"])}).then(function(e){return e});if(s=_(i),o instanceof c)return v.importKey("raw",o,s,!1,["encrypt"]);if("secret"===o.type)return o;throw new Error("Content encryption key must be raw data or secret key type")}).then(function(e){return s.iv||(s.iv=k(8)),v.encrypt(s,e,n.content)}).then(function(e){return i=i.derivation?(delete a.diversifier,_(i,{derivation:a,encryption:s})):s,t.encryptedContentInfo={contentType:n.contentType,contentEncryptionAlgorithm:i,encryptedContent:e},t})},getEnclosed:function(e,r){var n,o,i,s=this;return new b(x).then(function(){if(r&&s.setEnclosed(r),!(i=s.encryptedContentInfo.encryptedContent))throw new Error("Encrypted content must be specified");var t;if((n=_(s.encryptedContentInfo.contentEncryptionAlgorithm)).derivation)return o=_(n.derivation),n=_(n.encryption),v.importKey("raw",E(o,e),o,!1,["deriveKey","deriveBits"]).then(function(e){if(t=e,0<=o.name.indexOf("PFXKDF"))return o.diversifier=2,v.deriveBits(o,t,64)}).then(function(e){return e&&(n.iv=e),o.diversifier=1,v.deriveKey(o,t,n,!1,["decrypt"])});if(e instanceof c)return v.importKey("raw",e,n,!1,["decrypt"]);if("secret"===e.type)return e;throw new Error("Decryption key must be raw data or secret key type")}).then(function(e){return v.decrypt(n,e,i)}).then(function(e){return C({contentType:s.encryptedContentInfo.contentType,content:e})})}}),P.prototype.EncryptedDataContentInfo=T,n(B,D,{encloseContent:function(t,r){var n=this;return new b(x).then(function(){if(!(t=A(t)).content)throw new Error("Content for encryption must be specified");if(r){var e=l[r];r=e&&e.encryption||r}else r=l[O.providerName].encryption;return v.generateKey(r,!0,["encrypt"])}).then(function(e){return n.contentEncryptionKey=e,r.iv||(r.iv=k(8)),v.encrypt(r,e,t.content)}).then(function(e){return n.encryptedContentInfo={contentType:t.contentType,contentEncryptionAlgorithm:r,encryptedContent:e},n})},addRecipient:function(o,i,n,s){var t,a,r,u,c=this;return new b(x).then(function(){if(o=new f.X509(o),i&&"string"!=typeof i&&!i.algorithm&&(s=n,n=i,i=void 0),a=i?l[i]:o.getProvider(),!c.contentEncryptionKey)throw new Error("The content encryption key is not assigned");if(s){var e;if(s instanceof Array?s=(e=s)[0]:e=[s],O.autoAddCert){c.originatorInfo?c.originatorInfo.certs||(c.originatorInfo.certs=[]):c.originatorInfo={certs:[]};for(var t=0,r=e.length;t<r;t++)y(c.originatorInfo.certs,e[t],function(e,t){return d(e.issuer,t.issuer)&&p(e.serialNumber,t.serialNumber)})}if(a?i=_(a.agreement):a=o.getProvider(),o.subjectPublicKeyInfo.algorithm.namedCurve!==s.subjectPublicKeyInfo.algorithm.namedCurve)throw new Error("The sender and the recipient have different public key algorithms");return v.importKey("pkcs8",n.encode(),n.privateKeyAlgorithm,!1,["deriveKey"])}return a?i=_(o.subjectPublicKeyInfo.algorithm):a=o.getProvider(),v.generateKey(i,!0,["deriveKey"]).then(function(e){return i.public=e.publicKey,e.privateKey})}).then(function(e){return t=e,v.importKey("spki",o.subjectPublicKeyInfo.encode(),o.subjectPublicKeyInfo.algorithm,!1,["deriveKey","deriveBits"])}).then(function(e){return i.ukm=k(8),r=_(a.agreement,{sBox:i.sBox,ukm:i.ukm,public:e}),u=_(i.wrapping||a.wrapping,{ukm:i.ukm}),v.deriveKey(r,t,u,!0,["wrapKey"])}).then(function(e){return i.wrapping=u,v.wrapKey("raw",c.contentEncryptionKey,e,u)}).then(function(e){var t,r=O.useKeyIdentifier&&o.extensions&&o.extensions.subjectKeyIdentifier?o.extensions.subjectKeyIdentifier:{issuer:o.issuer,serialNumber:o.serialNumber};if(s){var n=s.subjectPublicKeyInfo;t={version:3,originator:{algorithm:n.algorithm,publicKey:n.subjectPublicKey},ukm:i.ukm,keyEncryptionAlgorithm:i,recipientEncryptedKeys:[{rid:r,encryptedKey:w.GostEncryptedKey(i).encode(e)}]}}else t={version:0,rid:r,keyEncryptionAlgorithm:i,encryptedKey:w.GostEncryptedKey(i).encode({algorithm:i,sessionEncryptedKey:e})};return c.recipientInfos.push(t),c})},getEnclosed:function(t,c,f,l){var h,p,d,y,g,m=this;return new b(x).then(function(){var e=c.getProvider();if(f&&m.setEnclosed(f),!(p=m.encryptedContentInfo.encryptedContent))throw new Error("Encrypted content must be specified");g=m.encryptedContentInfo.contentEncryptionAlgorithm;for(var t=0;t<m.recipientInfos.length;t++){var r=m.recipientInfos[t],n=_(r.keyEncryptionAlgorithm);if(r.rid){if(S(r.rid,c)){var o=w.GostEncryptedKey(n).decode(r.encryptedKey).object;return h=o.sessionEncryptedKey,n=_(n,o.algorithm),d=_(e.agreement,{ukm:n.ukm,sBox:n.sBox}),y=_(e.wrapping,n.wrapping,{ukm:n.ukm}),n.public}}else{var i=r.recipientEncryptedKeys;if(i)for(var s=0;s<i.length;s++)if(S(i[s].rid,c)){n=_(e.agreement,n,{ukm:r.ukm}),h=w.GostEncryptedKey(n).decode(i[s].encryptedKey).object,y=_((d=n).wrapping||e.wrapping,{ukm:r.ukm});var a=r.originator;if(a.algorithm){var u=new w.SubjectPublicKeyInfo({algorithm:a.algorithm,subjectPublicKey:a.publicKey});return v.importKey("spki",u.encode(),u.algorithm,!1,["deriveKey","deriveBits"])}if(l&&S(a,l))return importKey("pkcs",l.subjectPublicKeyInfo.encode(),l.subjectPublicKeyInfo.algorithm,!1,["deriveKey","deriveBits"]);throw Error("Originator certificate not specified or not valid")}}}throw new Error("Recipient not found or format not supported")}).then(function(e){return d.public=e,v.importKey("pkcs8",t.encode(),t.privateKeyAlgorithm,!1,["deriveKey","deriveBits"])}).then(function(e){return v.deriveKey(d,e,y,!0,["unwrapKey"])}).then(function(e){return v.unwrapKey("raw",h,e,y,g,!1,["decrypt"])}).then(function(e){return v.decrypt(g,e,p)}).then(function(e){return C({contentType:m.encryptedContentInfo.contentType,content:e})})}}),P.prototype.EnvelopedDataContentInfo=D,r.cms=new P,P},"function"==typeof define&&define.amd?define(["gostCrypto","gostASN1","gostCert"],t):"object"===(void 0===o?"undefined":I(o))?n.exports=t(r("./gostCrypto"),r("./gostASN1"),r("./gostCert")):e.GostCMS=t(e.gostCrypto,e.GostASN1,e.GostCert)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostASN1":105,"./gostCert":107,"./gostCrypto":110}],107:[function(t,r,n){(function(D){"use strict";function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e;e=function(r){var e="object"===("undefined"==typeof self?"undefined":K(self))&&self.self===self&&self||"object"===(void 0===D?"undefined":K(D))&&D.global===D&&D||this,y=e.Promise,u=e.Object,n=e.ArrayBuffer,o=e.Date,c=r.subtle,i=r.coding,s=r.asn1,f=r.security.providers;function a(e){for(var t=1,r=arguments.length;t<r;t++){var n=arguments[t];if("object"===K(n))for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}function t(e){var t=function(){};t.prototype=e.prototype;for(var r=[new t],n=1;n<arguments.length;n++)r.push(arguments[n]);return a.apply(this,r)}function l(e){var t=new o;return t.setHours(0,0,0,0),e&&t.setDate(t.getDate()+e),t}function g(e){try{e()}catch(e){}}var h=function(e,t){e=p(e),t=p(t);var r=Math.max(e.length,t.length);return d(e,r)===d(t,r)};function p(e){var t=K(e);return"undefined"===t||""===e?"0":"number"===t||e instanceof Number?e.toString(16).toLowerCase():e.replace("0x","").toLowerCase()}function d(e,t){return(new Array(t+1).join("0")+e).slice(-t)}function m(e,t){for(var r in e)if(e[r]!==t[r])return!1;for(var r in t)if(e[r]!==t[r])return!1;return!0}function b(e,t){var r=e.extensions&&e.extensions.subjectKeyIdentifier;return e&&t&&(!t.issuer||m(e.issuer,t.issuer))&&(!t.serialNumber||h(e.serialNumber,t.serialNumber))&&(!t.subjectKeyIdentifier||function(e,t){var r=new Uint8Array(e),n=new Uint8Array(t);if(r.length!==n.length)return!1;for(var o=0,i=r.length;o<i;o++)if(r[o]!==n[o])return!1;return!0}(r,t.subjectKeyIdentifier))&&(!t.subject||m(e.subject,t.subject))&&(!t.date||e.notBefore.getTime()<=t.date.getTime()&&e.notAfter.getTime()>t.date.getTime())}function v(e,t,r){var n={subject:e.issuer,date:r},o=t&&t.authorityKeyIdentifier;return o&&(n.subjectKeyIdentifier=o.keyIdentifier,o.authorityCertIssuer&&o.authorityCertIssuer[0]&&o.authorityCertSerialNumber&&(n.issuer=o.authorityCertIssuer[0],n.serialNumber=o.authorityCertSerialNumber)),n}function w(e,t){for(var r=[],n=0,o=e.length;n<o;n++)b(e[n],t)&&r.push(e[n]);return r}function _(e,t){return(!t.issuer||m(e.issuer,t.issuer))&&(!t.date||e.thisUpdate.getTime()<t.date.getTime())}function x(e,t){for(var r=[],n=0,o=e.length;n<o;n++)_(e[n],t)&&r.push(e[n]);return r}function A(e){var t=e.id;for(var r in f){var n=f[r];if(n.publicKey.id===t)return n}}function C(e,t,r){for(var n in t)o=e,s=t[i=n],a=r,"object"!==K(s)&&(s={value:s}),void 0!==a&&(s.enumerable=a),u.defineProperty(o,i,s);var o,i,s,a}function t(e,t,r,n){if("function"!=typeof t&&(n=r,r=t,t=function(){e.apply(this,arguments)}),t.prototype=u.create(e.prototype,{constructor:{value:t},superclass:{value:e.prototype}}),r&&C(t.prototype,r,!0),e!==u)for(var o in e)t[o]=e[o];return t.super=e,n&&C(t,n,!0),t}function S(){}var k={providerName:"CP-01",subject:{countryName:"RU",commonName:"Anonymous"},caKeyUsage:["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign"],caExtKeyUsage:["serverAuth","clientAuth","codeSigning","emailProtection","ipsecEndSystem","ipsecTunnel","ipsecUser","timeStamping","OCSPSigning"],userKeyUsage:["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement"],userExtKeyUsage:["clientAuth","emailProtection"],days:7305};S.prototype.options=k;function E(t){try{s.Certificate.call(this,t,!0)}catch(e){try{t=new s.CertificationRequest(t,!0)}catch(e){}t=t||{},s.Certificate.call(this,{version:2,serialNumber:t.serialNumber||function(){var e=new Uint8Array(4);return r.getRandomValues(e),e[0]=127&e[0],i.Int16.encode(e)}(),signature:t.signature||{id:"noSignature"},issuer:t.subject||k.subject,notBefore:t.notBefore||l(),notAfter:t.notAfter||l(t.days||k.days),subject:t.subject||k.subject,subjectPublicKeyInfo:t.subjectPublicKeyInfo||{algorithm:{id:"noSignature"},subjectPublicKey:new n(0)},extensions:t.attributes&&(t.attributes.extensionRequest||t.attributes.msCertExtensions)||t.extensions,signatureAlgorithm:{id:"noSignature"},signatureValue:new n(0)})}}t(s.Certificate,E,{sign:function(i,s){var a=this,e=a.subjectPublicKeyInfo;return new y(g).then(function(){if(!e||!e.algorithm||"noSignature"===e.algorithm)throw new Error("Key pair was not generated for the certificate");if(!i)throw new Error("The private key of the issuer is not defined");return s=s||a,c.digest("SHA-1",e.subjectPublicKey)}).then(function(e){var t=s.getProvider()||f[k.providerName];a.signature&&"noSignature"!==a.signature.id||(a.signature=t.signature),a.signatureAlgorithm=a.signature,a.issuer=s.subject,a.extensions||(a.extensions={});var r=a.extensions,n=s.extensions;if(a===s)r.keyUsage=r.keyUsage||k.caKeyUsage,r.extKeyUsage=r.extKeyUsage||k.caExtKeyUsage,r.basicConstraints=r.basicConstraints||{cA:!0};else{if(!s.checkUsage("keyCertSign",a.notBefore))throw new Error("The issuer's certificate is not valid for signing a certificate");if(r.keyUsage=r.keyUsage||k.userKeyUsage,r.extKeyUsage=r.extKeyUsage||k.userExtKeyUsage,r.basicConstraints=r.basicConstraints||{cA:0<=r.keyUsage.indexOf("keyCertSign")},r.basicConstraints.cA){var o=n&&n.basicConstraints&&n.pathLenConstraint;if(void 0!==o){if(!(0<o))throw new Error("Path length constraint exceeded");r.basicConstraints.pathLenConstraint=o-1}}}return r.subjectKeyIdentifier=e,n&&n.subjectKeyIdentifier&&(r.authorityKeyIdentifier={keyIdentifier:n.subjectKeyIdentifier,authorityCertIssuer:[s.issuer],authorityCertSerialNumber:s.serialNumber}),c.importKey("pkcs8",i.encode(),i.privateKeyAlgorithm,!1,["sign"])}).then(function(e){return c.sign(a.signatureAlgorithm,e,a.tbsCertificate.encode())}).then(function(e){return a.signatureValue=e,a})},generate:function(e){var t,r,n=this;return(r=e?f[e]:this.getProvider()||f[k.providerName])&&(e=a(r.publicKey,{privateKey:r.privateKey})),new y(g).then(function(){return c.generateKey(e,"true",["sign","verify"])}).then(function(e){return t=e.privateKey,c.exportKey("spki",e.publicKey)}).then(function(e){return n.subjectPublicKeyInfo=new s.SubjectPublicKeyInfo(e),c.exportKey("pkcs8",t)}).then(function(e){return new s.PrivateKeyInfo(e)})},getPublicKey:function(){var e=this.subjectPublicKeyInfo,t="rsaEncryption"===e.algorithm.id?["verify"]:["verify","deriveKey","deriveBits"];return c.importKey("spki",e.encode(),e.algorithm,"false",t)},getProvider:function(){return A(this.subjectPublicKeyInfo.algorithm)},verify:function(r,t,n){var o=this,i=o.extensions;return new y(g).then(function(){if(n=n||l(),o.notBefore.getTime()>n.getTime()||o.notAfter.getTime()<=n.getTime())throw new Error("The certificate has not yet started or expired");for(var e in i){if(i[e].critical&&["authorityKeyIdentifier","subjectKeyIdentifier","keyUsage","certificatePolicies","policyMappings","basicConstraints","nameConstraints","policyConstraints","extKeyUsage"].indexOf(e)<0)throw new Error("The critical extension '"+e+"' is unrecognized")}var t=v(o,i,o.notBefore);if(!r&&b(o,t)&&(r=o),r){if(!b(r,t)||!r.checkUsage("keyCertSign",o.notBefore))throw new Error("The issuer's certificate is not valid");return r.verifySignature(o.tbsCertificate.encode(),o.signatureValue,o.signatureAlgorithm)}return!0}).then(function(e){if(!e)throw new Error("The certificate has invalid signature");if(t){if(!_(t,{issuer:o.issuer,date:n}))throw new Error("The issuer's CRL is not valid");if(t.isRevoked(o.serialNumber))throw new Error("The certificate is revoked")}return o})},verifySignature:function(t,r,n){return this.getPublicKey().then(function(e){return c.verify(n,e,r,t)})},checkUsage:function(e,t){var r=this.extensions;return t=t||l(),this.notBefore.getTime()<=t.getTime()&&this.notAfter.getTime()>t.getTime()&&(!r||!(0<["keyCertSign","cRLSign"].indexOf(e)&&r.basicConstraints&&!r.basicConstraints.cA||r.keyUsage&&r.keyUsage.indexOf(e)<0&&r.extKeyUsage&&r.extKeyUsage.indexOf(e)<0))}}),S.prototype.X509=E;function P(e){P.super.call(this,e),this.version||(this.version=1),this.revokedCertificates||(this.revokedCertificates=[]),this.thisUpdate||(this.thisUpdate=l())}function O(t){try{s.CertificationRequest.call(this,t,!0)}catch(e){t=t||{},s.CertificationRequest.call(this,{version:0,subject:t.subject||k.subject,subjectPublicKeyInfo:t.subjectPublicKeyInfo||{algorithm:{id:"noSignature"},subjectPublicKey:new n(0)},attributes:t.attributes||{extensionRequest:{keyUsage:k.userKeyUsage,extKeyUsage:k.userExtKeyUsage}},signatureAlgorithm:{id:"noSignature"},signatureValue:new n(0)})}}function B(e,t){this.certificates=e||[],this.crls=t||[]}function F(e){this.certStore=e}function j(){}function T(e,t,r){this.trustedCACerts=e||[],this.requireCRL=t||!1,this.requireCA=r||!0}return t(s.CertificateList,P,{sign:function(n,o){var i=this;return new y(g).then(function(){if(!n)throw new Error("The issuer's private key is not defined");if(!o)throw new Error("The issuer's certificate is not defined");if(i.issuer){if(!m(i.issuer,o.issuer))throw new Error("The CRL prototype and authority certificate have different issuers")}else i.issuer=o.issuer;if(!o.checkUsage("cRLSign",i.thisUpdate))throw new Error("The issuer's certificate is not valid for signing a CRL");var e=o.getProvider()||f[k.providerName];i.signature||(i.signature=e.signature),i.signatureAlgorithm=i.signature,i.issuer=o.subject,i.crlExtensions||(i.crlExtensions={});var t=i.crlExtensions,r=o.extensions;return r&&r.subjectKeyIdentifier&&(t.authorityKeyIdentifier={keyIdentifier:r.subjectKeyIdentifier,authorityCertIssuer:[o.issuer],authorityCertSerialNumber:o.serialNumber}),t.cRLNumber=t.cRLNumber||0,c.importKey("pkcs8",n.encode(),n.privateKeyAlgorithm,!1,["sign"])}).then(function(e){return c.sign(i.signatureAlgorithm,e,i.tbsCertList.encode())}).then(function(e){return i.signatureValue=e,i})},verify:function(e,t){var r=this,n=r.crlExtensions;return new y(g).then(function(){if(t=t||l(),!r.thisUpdate.getTime()>t.getTime())throw new Error("The CRL has not yet started");if(e){if(!b(e,v(r,n,r.thisUpdate))||!e.checkUsage("cRLSign",r.thisUpdate))throw new Error("The issuer's certificate is not valid");if(!r.signatureValue||!r.signatureAlgorithm)throw new Error("The has no signature");return e.verifySignature(r.tbsCertList.encode(),r.signatureValue,r.signatureAlgorithm)}}).then(function(e){if(!e)throw new Error("The CRL has invalid signature");return r})},isRevoked:function(e,t){var r=this.revokedCertificates;t=t||l();for(var n=0;n<r.length;n++)if(t.getTime()>=r[n].revocationDate.getTime()&&h(r[n].userCertificate,e))return!0;return!1}}),S.prototype.CRL=P,t(s.CertificationRequest,O,{generate:function(e){var t,r,n=this;return(r=e?f[e]:this.getProvider()||f[k.providerName])&&(e=a(r.publicKey,{privateKey:r.privateKey})),new y(g).then(function(){return c.generateKey(e,"true",["sign","verify"])}).then(function(e){return t=e.privateKey,c.exportKey("spki",e.publicKey)}).then(function(e){return n.subjectPublicKeyInfo=new s.SubjectPublicKeyInfo(e),c.exportKey("pkcs8",t)}).then(function(e){return t=new s.PrivateKeyInfo(e),n.sign(t)}).then(function(){return t})},getProvider:function(){return A(this.subjectPublicKeyInfo.algorithm)},sign:function(t){var r=this,n=r.subjectPublicKeyInfo;return new y(g).then(function(){if(!n||!n.algorithm||"noSignature"===n.algorithm)throw new Error("Key pair was not generated for the certificate");if(!t)throw new Error("The private key is not defined");var e=A(n.algorithm)||f[k.providerName];return r.signatureAlgorithm=e.signature,c.importKey("pkcs8",t.encode(),t.privateKeyAlgorithm,!1,["sign"])}).then(function(e){return c.sign(r.signatureAlgorithm,e,r.requestInfo.encode())}).then(function(e){return r.signatureValue=e,r})},verify:function(){var t=this,e=t.subjectPublicKeyInfo;return new y(g).then(function(){return c.importKey("spki",e.encode(),e.algorithm,"false",["verify"])}).then(function(e){return c.verify(t.signatureAlgorithm,e,t.signatureValue,t.requestInfo.encode())}).then(function(e){if(!e)throw new Error("The certification request has invalid signature");return t})}}),S.prototype.Request=O,t(u,B,{getCertificates:function(e){return w(this.certificates,e)},getCRLs:function(e){return x(this.certificates,e)},load:function(e){for(var t=new s.ContentInfo(e),r=t.certificates,n=t.crls,o=0;o<r.length;o++)this.certificates.push(new E(r[o]));for(o=0;o<n.length;o++)this.crls.push(new P(n[o]));return this},store:function(){return new s.ContentInfo({contentType:"signedData",version:0,digestAlgorithms:[],encapContentInfo:{contentType:"data"},certificates:this.certs,crls:this.crls,signerInfos:[]})}}),S.prototype.CertStore=B,t(u,F,{build:function(c,f){var l=this;return new y(g).then(function(){for(var e=new E(c),r=[],t=!1,n=[];e;){var o=[],i=[];if(r.push(e),!t){o=l.certStore.getCRLs({issuer:e.issuer,date:f});var s=v(e,e.extensions,e.notBefore);b(e,s)?t=!0:i=l.certStore.getCertificates(s)}var a=0<i.length&&new E(i[0]),u=0<o.length&&new P(o[0]);u&&n.push(u.verify(a,f)),n.push(e.verify(a,u,f)),e=a}if(!t)throw new Error("Root certificate is not found");return y.all(n).then(function(e){for(var t=0;t<e;t++)if(!e[t])throw new Error("Certification path is not validated");return r})})}}),S.prototype.CertPath=F,t(u,j,{getValidCertificate:function(){}}),t(S.prototype.CertificateTrustPolicy=j,T,{getValidCertificate:function(c,f,l,h){var p,d=this;return new y(g).then(function(){f=f||[],l=l||[];var e=w(d.trustedCACerts,c);if(0<e.length)return new E(e[0]);if(0!==(e=w(f,c)).length){var t=new E(e[0]),r=!1,n=[];for(p=[];t;){var o=[],i=[];if(p.push(t),!r){if(0===(o=x(l,{issuer:t.issuer,date:h})).length&&d.requireCRL)return;if(c=v(t,t.extensions,t.notBefore),0===(i=w(d.trustedCACerts,c)).length){if(!b(t,c)){if(!(0<(i=w(f,c)).length))return;var s=i[0].extensions;if(d.requireCA){if(!s||!s.basicConstraints||!s.basicConstraints.cA)return;if(void 0!==s.basicConstraints.pathLenConstraint&&s.basicConstraints.pathLenConstraint<p.length-1)return}}}else r=!0}var a=0<i.length&&new E(i[0]),u=0<o.length&&new P(o[0]);u&&n.push(u.verify(a,h)),n.push(t.verify(a,u,h)),t=a}if(!r)throw new Error("Trusted root certificate is not found");return y.all(n).then(function(e){for(var t=0;t<e;t++)if(!e[t])throw new Error("Certification path is not validated");return p[0]})}})}}),S.prototype.TrustedCAPolicy=T,r.cert=new S,S},"function"==typeof define&&define.amd?define(["gostCrypto","gostASN1"],e):"object"===(void 0===n?"undefined":K(n))?r.exports=e(t("./gostCrypto"),t("./gostASN1")):(void 0).GostCert=e((void 0).gostCrypto,(void 0).GostASN1)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostASN1":105,"./gostCrypto":110}],108:[function(t,r,n){(function(Fe){"use strict";function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e;e=function(r){var e,n="object"===("undefined"==typeof self?"undefined":je(self))&&self.self===self&&self||"object"===(void 0===Fe?"undefined":je(Fe))&&Fe.global===Fe&&Fe||this,o=n.crypto||n.msCrypto,t=n.ArrayBuffer,i=n.SyntaxError||n.Error,d=n.DataError||n.Error,s=n.NotSupportedError||n.Error,a=(e=new t(2),new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]),u=new Uint8Array([0,0,0,0,0,0,0,0]),y={"E-TEST":[4,2,15,5,9,1,0,8,14,3,11,12,13,7,10,6,12,9,15,14,8,1,3,10,2,7,4,13,6,0,11,5,13,8,14,12,7,3,9,10,1,5,2,4,6,15,0,11,14,9,11,2,5,15,7,1,0,13,12,6,10,4,3,8,3,14,5,9,6,8,0,13,10,11,7,12,2,1,15,4,8,15,6,11,1,9,12,5,13,3,7,10,0,14,2,4,9,11,12,0,3,6,7,5,4,8,14,15,1,10,2,13,12,6,5,2,11,0,9,13,3,14,7,10,15,4,1,8],"E-A":[9,6,3,2,8,11,1,7,10,4,14,15,12,0,13,5,3,7,14,9,8,10,15,0,5,2,6,12,11,4,13,1,14,4,6,2,11,3,13,8,12,15,5,10,0,7,1,9,14,7,10,12,13,1,3,9,0,2,11,4,15,8,5,6,11,5,1,9,8,13,15,0,14,4,2,3,12,7,10,6,3,10,13,12,1,2,0,11,7,5,9,4,8,15,14,6,1,13,2,9,7,10,6,0,8,12,4,5,15,3,11,14,11,10,15,5,0,12,14,8,6,2,3,9,1,7,13,4],"E-B":[8,4,11,1,3,5,0,9,2,14,10,12,13,6,7,15,0,1,2,10,4,13,5,12,9,7,3,15,11,8,6,14,14,12,0,10,9,2,13,11,7,5,8,15,3,6,1,4,7,5,0,13,11,6,1,2,3,10,12,15,4,14,9,8,2,7,12,15,9,5,10,11,1,4,0,13,6,8,14,3,8,3,2,6,4,13,14,11,12,1,7,15,10,0,9,5,5,2,10,11,9,1,12,3,7,4,13,0,6,15,8,14,0,4,11,14,8,3,7,1,10,2,9,6,15,13,5,12],"E-C":[1,11,12,2,9,13,0,15,4,5,8,14,10,7,6,3,0,1,7,13,11,4,5,2,8,14,15,12,9,10,6,3,8,2,5,0,4,9,15,10,3,7,12,13,6,14,1,11,3,6,0,1,5,13,10,8,11,2,9,7,14,15,12,4,8,13,11,0,4,5,1,2,9,3,12,14,6,15,10,7,12,9,11,1,8,14,2,4,7,3,6,5,10,0,15,13,10,9,6,8,13,14,2,0,15,3,5,11,4,1,12,7,7,4,0,5,10,2,15,14,12,6,1,11,13,9,3,8],"E-D":[15,12,2,10,6,4,5,0,7,9,14,13,1,11,8,3,11,6,3,4,12,15,14,2,7,13,8,0,5,10,9,1,1,12,11,0,15,14,6,5,10,13,4,8,9,3,7,2,1,5,14,12,10,7,0,13,6,2,11,4,9,3,15,8,0,12,8,9,13,2,10,11,7,3,6,5,4,14,15,1,8,0,15,3,2,5,14,11,1,10,4,7,12,9,13,6,3,0,6,15,1,14,9,2,13,8,12,4,11,10,5,7,1,10,6,8,15,11,0,4,12,3,5,9,7,13,2,14],"E-SC":[3,6,1,0,5,7,13,9,4,11,8,12,14,15,2,10,7,1,5,2,8,11,9,12,13,0,3,10,15,14,4,6,15,1,4,6,12,8,9,2,14,3,7,10,11,13,5,0,3,4,15,12,5,9,14,0,6,8,7,10,1,11,13,2,6,9,0,7,11,8,4,12,2,14,10,15,1,13,5,3,6,1,2,15,0,11,9,12,7,13,10,5,8,4,14,3,0,2,14,12,9,1,4,7,3,15,6,8,10,13,11,5,5,2,11,8,4,12,7,1,10,6,14,0,9,3,13,15],"E-Z":[12,4,6,2,10,5,11,9,14,8,13,7,0,3,15,1,6,8,2,3,9,10,5,12,1,14,4,7,11,13,0,15,11,3,5,8,2,15,10,13,14,1,7,4,12,9,6,0,12,8,2,1,13,4,15,6,7,0,10,5,3,14,9,11,7,15,5,10,8,1,6,13,0,9,3,14,11,4,2,12,5,13,15,6,9,2,12,10,11,7,8,1,4,3,14,0,8,14,2,5,6,9,1,12,15,4,11,0,13,10,3,7,1,7,14,13,0,5,8,3,4,15,10,6,9,12,11,2],"D-TEST":[4,10,9,2,13,8,0,14,6,11,1,12,7,15,5,3,14,11,4,12,6,13,15,10,2,3,8,1,0,7,5,9,5,8,1,13,10,3,4,2,14,15,12,7,6,0,9,11,7,13,10,1,0,8,9,15,14,4,6,12,11,2,5,3,6,12,7,1,5,15,13,8,4,10,9,14,0,3,11,2,4,11,10,0,7,2,1,13,3,6,8,5,9,12,15,14,13,11,4,1,3,15,5,9,0,10,14,7,6,8,2,12,1,15,13,0,5,7,10,4,9,2,3,14,6,11,8,12],"D-A":[10,4,5,6,8,1,3,7,13,12,14,0,9,2,11,15,5,15,4,0,2,13,11,9,1,7,6,3,12,14,10,8,7,15,12,14,9,4,1,0,3,11,5,2,6,10,8,13,4,10,7,12,0,15,2,8,14,1,6,5,13,11,9,3,7,6,4,11,9,12,2,10,1,8,0,14,15,13,3,5,7,6,2,4,13,9,15,0,10,1,5,11,8,14,12,3,13,14,4,1,7,0,5,10,3,12,8,15,6,2,9,11,1,3,10,9,5,11,4,15,8,6,7,14,13,0,2,12],"D-SC":[11,13,7,0,5,4,1,15,9,14,6,10,3,12,8,2,1,2,7,9,13,11,15,8,14,12,4,0,5,6,10,3,5,1,13,3,15,6,12,7,9,8,11,2,4,14,0,10,13,1,11,4,9,12,14,0,7,5,8,15,6,2,10,3,2,13,10,15,9,11,3,7,8,12,5,14,6,0,1,4,0,4,6,12,5,3,8,13,10,11,15,2,1,9,7,14,1,3,12,8,10,6,11,0,2,14,7,9,15,4,5,13,10,11,6,0,1,3,4,7,14,13,5,15,8,2,9,12]},c=new Uint8Array([105,0,114,34,100,201,4,35,141,58,219,150,70,233,42,196,24,254,172,148,0,237,7,18,192,134,220,194,239,76,169,43]);function g(e){return 2147483648<=e?e-4294967296:e}function m(e){return e<0?e+4294967296:e}function p(e){var t=(r=r||n.GostRandom)?new(r||n.GostRandom):o;if(!t.getRandomValues)throw new s("Random generator not found");t.getRandomValues(e)}function b(e){if(e instanceof t)return e;if(e&&e.buffer&&e.buffer instanceof t)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new d("CryptoOperationData required")}function l(e){return new Uint8Array(b(e))}function v(e){return new Uint8Array(l(e))}function f(e){return(255&e)<<24|(65280&e)<<8|e>>8&65280|e>>24&255}var h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),w=function(){function e(e,t){var r,n,o=0;for(r=0;r<8;r++)1&t&&(o^=e),n=128&e,e=e<<1&255,n&&(e^=195),t>>=1;return 255&o}for(var t=[1,16,32,133,148,192,194,251],r=[],n=0;n<8;n++){r[n]=[];for(var o=0;o<256;o++)r[n][o]=e(t[n],o)}return r}(),_=[4,2,3,1,6,5,0,7,0,5,6,1,3,2,4,0];function x(e){for(var t=0,r=0;r<16;r++)t^=w[_[r]][e[r]];for(r=16;0<r;--r)e[r]=e[r-1];e[0]=t}function A(e){for(var t=e[0],r=0;r<15;r++)e[r]=e[r+1];e[15]=t;var n=0;for(r=0;r<16;r++)n^=w[_[r]][e[r]];e[15]=n}var C=[252,238,221,17,207,110,49,22,251,196,250,218,35,197,4,77,233,119,240,219,147,46,153,186,23,54,241,187,20,205,95,193,249,24,101,90,226,92,239,33,129,28,60,66,139,1,142,79,5,132,2,174,227,106,143,160,6,11,237,152,127,212,211,31,235,52,44,81,234,200,72,171,242,42,104,162,253,58,206,204,181,112,14,86,8,12,118,18,191,114,19,71,156,183,93,135,21,161,150,41,16,123,154,199,243,145,120,111,157,158,178,177,50,117,25,61,255,53,138,126,109,84,198,128,195,189,13,87,223,245,36,169,62,168,67,201,215,121,214,246,124,34,185,3,224,15,236,222,122,148,176,188,220,232,40,80,78,51,10,74,167,151,96,115,30,0,98,68,26,184,56,130,100,159,38,65,173,69,70,146,39,94,85,47,140,163,165,125,105,213,149,59,7,88,179,64,134,172,29,247,48,55,107,228,136,217,231,137,225,27,131,73,76,63,248,254,141,83,170,144,202,216,133,97,32,113,103,164,45,43,9,91,203,155,37,208,190,229,108,82,89,166,116,210,230,244,180,192,209,102,175,194,57,75,99,182],S=function(){for(var e=[],t=0,r=C.length;t<r;t++)e[C[t]]=t;return e}();function k(e,t){for(var r=0;r<16;++r)e[r]^=t[r]}function E(e){for(var t=0;t<16;++t)x(e)}function P(e,t){k(e,t),function(e){for(var t=0;t<16;++t)e[t]=C[e[t]]}(e),E(e)}function O(e,t){k(e,t),function(e){for(var t=0;t<16;++t)A(e)}(e),function(e){for(var t=0;t<16;++t)e[t]=S[e[t]]}(e)}function B(e,t){for(var r=0;r<15;r++)t[r]=0;t[15]=e,E(t)}function F(e){var t,r,n,o,i=new Uint8Array(160),s=new Uint8Array(16);i.set(l(e));for(var a=0;a<4;a++){var u=32*a,c=32*(a+1);i.set(new Uint8Array(i.buffer,u,32),c);for(var f=1;f<9;f++)B(8*a+f,s),t=new Uint8Array(i.buffer,c,16),r=new Uint8Array(i.buffer,16+c,16),n=s,o=new Uint8Array(t),P(t,n),k(t,r),r.set(o)}return i}function j(e,t,r,n){r=r||t.byteOffset;var o=new Uint8Array(t.buffer,r,16);if(n){for(var i=0;i<9;i++)O(o,new Uint8Array(e.buffer,16*(9-i),16));k(o,new Uint8Array(e.buffer,0,16))}else{for(i=0;i<9;i++)P(o,new Uint8Array(e.buffer,16*i,16));k(o,new Uint8Array(e.buffer,144,16))}}function T(e,t,r){var n=t[0]+r&4294967295,o=e[n>>0&15]<<0;o|=e[16+(n>>4&15)]<<4,o|=e[32+(n>>8&15)]<<8,o|=e[48+(n>>12&15)]<<12,o|=e[64+(n>>16&15)]<<16,o|=e[80+(n>>20&15)]<<20,o|=e[96+(n>>24&15)]<<24,n=(o|=e[112+(n>>28&15)]<<28)<<11|o>>>21,n^=t[1],t[1]=t[0],t[0]=n}function D(e,t,r){r=r||t.byteOffset;for(var n=this.sBox,o=new Int32Array(t.buffer,r,2),i=0;i<32;i++)T(n,o,e[i]);var s=o[0];o[0]=o[1],o[1]=s}function K(e,t,r){r=r||t.byteOffset;var n=this.sBox,o=new Int32Array(t.buffer,r,2),i=f(o[0]);o[0]=f(o[1]),o[1]=i;for(var s=0;s<32;s++)T(n,o,e[s]);o[0]=f(o[0]),o[1]=f(o[1])}function I(e,t){for(var r=new Int32Array(32),n=new Int32Array(b(e)),o=0;o<8;o++)r[o]=n[o];if(t){for(o=0;o<8;o++)r[o+8]=r[7-o];for(o=0;o<8;o++)r[o+16]=r[7-o]}else{for(o=0;o<8;o++)r[o+8]=r[o];for(o=0;o<8;o++)r[o+16]=r[o]}for(o=0;o<8;o++)r[o+24]=r[7-o];return r}function R(e,t){for(var r=new Int32Array(32),n=new Int32Array(b(e)),o=0;o<8;o++)r[o]=f(n[o]);if(t){for(o=0;o<8;o++)r[o+8]=r[7-o];for(o=0;o<8;o++)r[o+16]=r[7-o]}else{for(o=0;o<8;o++)r[o+8]=r[o];for(o=0;o<8;o++)r[o+16]=r[o]}for(o=0;o<8;o++)r[o+24]=r[7-o];return r}var L,N,U,G,M,H,q=(L=new Uint8Array([217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173]),function(e){for(var t=new Uint8Array(b(e)),r=Math.min(t.length,128),n=this.effectiveLength,o=Math.floor((n+7)/8),i=255%Math.pow(2,8+n-8*o),s=new Uint8Array(128),a=new Uint16Array(s.buffer),u=0;u<r;u++)s[u]=t[u];for(u=r;u<128;u++)s[u]=L[(s[u-1]+s[u-r])%256];for(s[128-o]=L[s[128-o]&i],u=127-o;0<=u;--u)s[u]=L[s[u+1]^s[u+o]];return a}),z=(M=new Uint16Array(4),H=new Uint16Array([1,2,3,5]),function(e,t,r,n){G=n,M=new Uint16Array(t.buffer,r||t.byteOffset,4),N=e,U=n?63:0,X(W,5),X(V),X(W,6),X(V),X(W,5)});function W(e){var t,r,n,o;G?(M[e]=(n=M[e],o=H[e],65535&(n>>>o|n<<16-o)),M[e]=M[e]-N[U]-(M[(e+3)%4]&M[(e+2)%4])-(~M[(e+3)%4]&M[(e+1)%4]),--U):(M[e]=M[e]+N[U]+(M[(e+3)%4]&M[(e+2)%4])+(~M[(e+3)%4]&M[(e+1)%4]),U+=1,M[e]=(t=M[e],r=H[e],65535&(t<<r|t>>>16-r)))}function V(e){M[e]=G?M[e]-N[63&M[(e+3)%4]]:M[e]+N[63&M[(e+3)%4]]}function X(e,t){t=t||1;for(var r=0;r<t;r++)if(G)for(var n=3;0<=n;--n)e(n);else for(n=0;n<4;n++)e(n)}function J(e,t){for(var r=this.pad(l(t)),n=this.blockSize,o=r.byteLength/n,i=this.keySchedule(e),s=0;s<o;s++)this.process(i,r,n*s);return r.buffer}function Y(e,t){for(var r=v(t),n=this.blockSize,o=r.byteLength/n,i=this.keySchedule(e,1),s=0;s<o;s++)this.process(i,r,n*s,1);return this.unpad(r).buffer}function Z(e,t,r){for(var n=new Uint8Array(r||this.iv),o=v(t),i=n.length,s=new Uint8Array(i),a=this.shiftBits>>3,u=o.length,c=u%a,f=(u-c)/a,l=this.keySchedule(e),h=0;h<f;h++){for(var p=0;p<i;p++)s[p]=n[p];this.process(l,n);for(p=0;p<a;p++)o[h*a+p]^=n[p];for(p=0;p<i-a;p++)n[p]=s[a+p];for(p=0;p<a;p++)n[i-a+p]=o[h*a+p];e=this.keyMeshing(e,n,h,l)}if(0<c){this.process(l,n);for(h=0;h<c;h++)o[f*a+h]^=n[h]}return o.buffer}function Q(e,t,r){for(var n=new Uint8Array(r||this.iv),o=v(t),i=n.length,s=new Uint8Array(i),a=this.shiftBits>>3,u=o.length,c=u%a,f=(u-c)/a,l=this.keySchedule(e),h=0;h<f;h++){for(var p=0;p<i;p++)s[p]=n[p];this.process(l,n);for(p=0;p<a;p++)s[p]=o[h*a+p],o[h*a+p]^=n[p];for(p=0;p<i-a;p++)n[p]=s[a+p];for(p=0;p<a;p++)n[i-a+p]=s[p];e=this.keyMeshing(e,n,h,l)}if(0<c){this.process(l,n);for(h=0;h<c;h++)o[f*a+h]^=n[h]}return o.buffer}function $(e,t,r){for(var n=new Uint8Array(r||this.iv),o=v(t),i=n.length,s=new Uint8Array(i),a=this.shiftBits>>3,u=new Uint8Array(a),c=o.length,f=c%a,l=(c-f)/a,h=this.keySchedule(e),p=0;p<l;p++){for(var d=0;d<i;d++)s[d]=n[d];this.process(h,n);for(d=0;d<a;d++)u[d]=n[d];for(d=0;d<a;d++)o[p*a+d]^=n[d];for(d=0;d<i-a;d++)n[d]=s[a+d];for(d=0;d<a;d++)n[i-a+d]=u[d];e=this.keyMeshing(e,n,p,h)}if(0<f){this.process(h,n);for(p=0;p<f;p++)o[l*a+p]^=n[p]}return o.buffer}function ee(e,t,r){var n=new Uint8Array(r||this.iv),o=v(t),i=this.blockSize,s=new Int8Array(i),a=o.length,u=a%i,c=(a-u)/i,f=this.keySchedule(e),l=new Int32Array(n.buffer);this.process(f,n);for(var h=0;h<c;h++){l[0]=l[0]+16843009&4294967295;var p=m(l[1])+16843012;l[1]=g(p<4294967296?p:p-4294967295);for(var d=0;d<i;d++)s[d]=n[d];this.process(f,l);for(d=0;d<i;d++)o[h*i+d]^=n[d];for(d=0;d<i;d++)n[d]=s[d];e=this.keyMeshing(e,n,h,f)}if(0<u){l[0]=l[0]+16843009&4294967295;p=m(l[1])+16843012;l[1]=g(p<4294967296?p:p-4294967295),this.process(f,l);for(h=0;h<u;h++)o[c*i+h]^=n[h]}return o.buffer}function te(e,t,r){var n=v(t),o=this.blockSize,i=this.shiftBits>>3,s=n.length,a=s%i,u=(s-a)/i,c=new Uint8Array(o),f=new Int32Array(o),l=this.keySchedule(e);c.set(r||this.iv);for(var h=0;h<u;h++){for(var p=0;p<o;p++)f[p]=c[p];this.process(l,c);for(p=0;p<i;p++)n[i*h+p]^=c[p];for(p=0;p<o;p++)c[p]=f[p];for(p=o-1;0<=h;--h){if(!(254<c[p])){c[p]++;break}c[p]-=254}}if(0<a){this.process(l,c);for(p=0;p<a;p++)n[i*u+p]^=c[p]}return n.buffer}function re(e,t,r){for(var n=new Uint8Array(r||this.iv),o=this.blockSize,i=n.length,s=this.pad(l(t)),a=this.keySchedule(e),u=0,c=s.length/o;u<c;u++){for(var f=0;f<o;f++)n[f]^=s[u*o+f];this.process(a,n);for(f=0;f<o;f++)s[u*o+f]=n[f];if(i!==o){for(f=0;f<i-o;f++)n[f]=n[o+f];for(f=0;f<o;f++)n[f+i-o]=s[u*o+f]}e=this.keyMeshing(e,n,u,a)}return s.buffer}function ne(e,t,r){for(var n=new Uint8Array(r||this.iv),o=this.blockSize,i=n.length,s=v(t),a=new Uint8Array(o),u=this.keySchedule(e,1),c=0,f=s.length/o;c<f;c++){for(var l=0;l<o;l++)a[l]=s[c*o+l];this.process(u,s,c*o,1);for(l=0;l<o;l++)s[c*o+l]^=n[l];if(i!==o)for(l=0;l<i-o;l++)n[l]=n[o+l];for(l=0;l<o;l++)n[l+i-o]=a[l];e=this.keyMeshing(e,n,c,u,1)}return this.unpad(s).buffer}function oe(){var e=new Uint8Array(this.keySize);return p(e),e.buffer}function ie(e,t,r){for(var n=Ee.call(this,l(r)),o=this.blockSize,i=n.length/o,s=this.sBox,a=new Int32Array(t.buffer),u=0;u<i;u++){for(var c=0;c<o;c++)t[c]^=n[u*o+c];for(c=0;c<16;c++)T(s,a,e[c])}}function se(e){for(var t=0,r=e.length,n=r-1;0<=n;--n){var o=e[n]>>>7;e[n]=e[n]<<1&255|t,t=o}0!==t&&(16===r?e[15]^=135:e[7]^=27)}function ae(e,t,r){var n=this.blockSize,o=(this.sBox,l(r)),i=new Uint8Array(n);this.process(e,i),se(i),r.byteLength%n!=0&&(o=Pe.call(this,l(r)),se(i));for(var s=0,a=o.length/n;s<a;s++){for(var u=0;u<n;u++)t[u]^=o[s*n+u];if(s===a-1)for(u=0;u<n;u++)t[u]^=i[u];this.process(e,t)}}function ue(e,t,r){var n=this.keySchedule(e),o=new Uint8Array(r||this.iv),i=Math.ceil(this.macLength>>3)||this.blockSize>>1;this.processMAC(n,o,t);var s=new Uint8Array(i);return s.set(new Uint8Array(o.buffer,0,i)),s.buffer}function ce(e,t,r,n){var o=new Uint8Array(ue.call(this,e,r,n)),i=l(t);if(o.length!==i.length)return!1;for(var s=0,a=o.length;s<a;s++)if(o[s]!==i[s])return!1;return!0}function fe(e,t){var r=this.blockSize,n=this.keySize,o=n+(r>>1);if(!this.ukm)throw new d("UKM must be defined");var i=new Uint8Array(this.ukm),s=ue.call(this,e,t,i),a=J.call(this,e,t),u=new Uint8Array(o);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(s),n),u.buffer}function le(e,t){var r=this.blockSize,n=this.keySize,o=n+(r>>1),i=b(t);if(i.byteLength!==o)throw new d("Wrapping key size must be "+o+" bytes");if(!this.ukm)throw new d("UKM must be defined");var s=new Uint8Array(this.ukm),a=new Uint8Array(i,0,n),u=new Uint8Array(i,n,r>>1),c=Y.call(this,e,a);if(!ce.call(this,e,u,c,s))throw new d("Error verify MAC of wrapping key");return c}function he(e,t){for(var r=this.blockSize,n=new Int32Array(b(e)),o=[],i=0;i<r;i++){o[i]=[];for(var s=0;s<8;s++)o[i][s]=t[i]>>>s&1}for(i=0;i<r;i++){var a=new Int32Array(2);for(s=0;s<8;s++)o[i][s]?a[0]=a[0]+n[s]&4294967295:a[1]=a[1]+n[s]&4294967295;var u=new Uint8Array(a.buffer);n=new Int32Array(Z.call(this,n,n,u))}return n}function pe(e,t){var r=this.blockSize,n=this.keySize,o=n+(r>>1);if(!this.ukm)throw new d("UKM must be defined");var i=new Uint8Array(this.ukm),s=he.call(this,e,i),a=ue.call(this,s,t,i),u=J.call(this,s,t),c=new Uint8Array(o);return c.set(new Uint8Array(u),0),c.set(new Uint8Array(a),n),c.buffer}function de(e,t){var r=this.blockSize,n=this.keySize,o=n+(r>>1),i=b(t);if(i.byteLength!==o)throw new d("Wrapping key size must be "+o+" bytes");if(!this.ukm)throw new d("UKM must be defined");var s=new Uint8Array(this.ukm),a=new Uint8Array(i,0,n),u=new Uint8Array(i,n,r>>1),c=he.call(this,e,s),f=Y.call(this,c,a);if(!ce.call(this,c,u,f,s))throw new d("Error verify MAC of wrapping key");return f}function ye(e){var t=this.blockSize>>1,r=this.keySize,n=b(e);if(34!==new Uint8Array(n,0,1)[0])throw new d("Invalid magic number");for(var o=new Uint8Array(n,1,1)[0],i=new Uint8Array(n,2,t),s=new Uint8Array(r),a=0;a<o;a++)for(var u=new Uint8Array(n,2+t+r*a,r),c=0;c<r;c++)s[c]^=u[c];var f=new Uint8Array(r),l=ce.call(this,s,i,f);if(!l)for(var h=["E-A","E-B","E-C","E-D","E-SC"],p=(a=0,h.length);a<p&&(this.sBox=y[h[a]],!(l=ce.call(this,s,i,f)));a++);if(!l)throw new d("Invalid main key MAC");return s.buffer}function ge(e,t){var r=this.blockSize>>1,n=this.keySize,o=b(e),i=b(t);o.byteLength!==n&&(o=ye.call(this,o));var s=J.call(this,o,i),a=ue.call(this,o,i),u=new Uint8Array(r+n);return u.set(new Uint8Array(s),0),u.set(new Uint8Array(a),n),u.buffer}function me(e,t){var r=this.blockSize>>1,n=this.keySize,o=b(e),i=b(t);o.byteLength!==n&&(o=ye.call(this,o));var s=new Uint8Array(i,0,n),a=new Uint8Array(i,n,r),u=Y.call(this,o,s);if(!ce.call(this,o,a,u))throw new d("Invalid key MAC");return u}function be(){return function(e,t){var r=this.blockSize>>1,n=this.keySize,o=8,i=new Uint8Array(b(e));if(i.byteLength!==n)throw new d("Wrong cleartext size "+i.byteLength+" bytes");if(t=t||this.ukm){if(!(0<(t=new Uint8Array(b(t))).byteLength&&t.byteLength%n==0))throw new d("Wrong rand size "+t.byteLength+" bytes");o=t.byteLength/n+1}else p(t=new Uint8Array((o-1)*n));var s=new Uint8Array(o*n+r+2),a=s.buffer,u=new Uint8Array(n),c=ue.call(this,i,u);s[0]=34,s[1]=o,s.set(new Uint8Array(c),2),s.set(t,n+r+2);for(var f=1;f<o;f++)for(var l=new Uint8Array(a,2+r+n*f),h=0;h<n;h++)i[h]^=l[h];return s.set(i,2+r),s.buffer}.call(this,oe.call(this))}function ve(e,t,r,n){var o=n/4,i=new Int32Array(b(e)),s=new Int32Array(b(t)),a=new Int32Array(o);if(r)for(var u=0;u<o;u++)a[u]=s[u]+i[u]&4294967295;else for(u=0;u<o;u++)a[u]=s[u]-i[u]&4294967295;return a.buffer}function we(e,t){return ve(e,t,"VN"===this.procreator,this.keySize)}function _e(e,t){return ve(e,t,"VN"!==this.procreator,this.keySize)}function xe(e,t,r,n,o){return(r+1)*this.blockSize%1024==0&&(e=Y.call(this,e,c),t.set(new Uint8Array(J.call(this,e,t))),n.set(this.keySchedule(e,o))),e}function Ae(e){return e}function Ce(e){return new Uint8Array(e)}function Se(e){var t=e.byteLength,r=this.blockSize,n=r-t%r,o=Math.ceil((t+1)/r)*r,i=new Uint8Array(o);i.set(e);for(var s=t;s<o;s++)i[s]=n;return i}function ke(e){var t=e.byteLength,r=this.blockSize,n=e[t-1],o=t-n;if(r<n)throw d("Invalid padding");var i=new Uint8Array(o);return 0<o&&i.set(new Uint8Array(e.buffer,0,o)),i}function Ee(e){var t=e.byteLength,r=this.blockSize,n=Math.ceil(t/r)*r,o=new Uint8Array(n);o.set(e);for(var i=t;i<n;i++)o[i]=0;return o}function Pe(e){var t=e.byteLength,r=this.blockSize,n=Math.ceil((t+1)/r)*r,o=new Uint8Array(n);o.set(e);for(var i=t+(o[t]=1);i<n;i++)o[i]=0;return o}function Oe(e){for(var t=e.byteLength;1<t&&0===e[t-1];)t--;if(1!==e[t-1])throw d("Invalid padding");t--;var r=new Uint8Array(t);return 0<t&&r.set(new Uint8Array(e.buffer,0,t)),r}function Be(e){var t=e.byteLength,r=this.blockSize,n=r-t%r,o=Math.ceil(t/r)*r,i=new Uint8Array(o),s=new Uint8Array(i.buffer,t,n);return i.set(e),p(s),i}return function(e){if(!a)throw new s("Big endian platform not supported");switch(e=e||{},this.keySize=32,this.blockLength=e.length||64,this.blockSize=this.blockLength>>3,this.name=(e.name||(1===e.version?"RC2":1989===e.version?"GOST 28147":"GOST R 34.12"))+(4<e.version?"-"+(e.version||1989)%100:"")+"-"+(64===this.blockLength?"":this.blockLength+"-")+("MAC"===e.mode?"MAC-"+(e.macLength||this.blockLength>>1):"KW"===e.mode||e.keyWrapping?("NO"!==(e.keyWrapping||"NO")?e.keyWrapping:"")+"KW":(e.block||"ECB")+(("CFB"===e.block||"OFB"===e.block||"CTR"===e.block&&2015===e.version)&&e.shiftBits&&e.shiftBits!==this.blockLength?"-"+e.shiftBits:"")+(e.padding?"-"+(e.padding||("CTR"===e.block||"CFB"===e.block||"OFB"===e.block?"NO":"ZERO"))+"PADDING":"")+("NO"!==(e.keyMeshing||"NO")?"-CPKEYMESHING":""))+(e.procreator?"/"+e.procreator:"")+("string"==typeof e.sBox?"/"+e.sBox:""),this.procreator=e.procreator,e.version||1989){case 1:this.process=z,this.keySchedule=q,this.blockLength=64,this.effectiveLength=e.length||32,this.keySize=8*Math.ceil(this.effectiveLength/8),this.blockSize=this.blockLength>>3;break;case 2015:if(this.version=2015,64===this.blockLength)this.process=K,this.keySchedule=R;else{if(128!==this.blockLength)throw new d("Invalid block length");this.process=j,this.keySchedule=F}this.processMAC=ae;break;case 1989:if(this.version=1989,this.process=D,this.processMAC=ie,this.keySchedule=I,64!==this.blockLength)throw new d("Invalid block length");break;default:throw new s("Algorithm version "+e.version+" not supported")}switch(e.mode||e.keyWrapping&&"KW"||"ES"){case"ES":switch(e.block||"ECB"){case"ECB":this.encrypt=J,this.decrypt=Y;break;case"CTR":1989===this.version?(this.encrypt=ee,this.decrypt=ee):(this.encrypt=te,this.decrypt=te,this.shiftBits=e.shiftBits||this.blockLength);break;case"CBC":this.encrypt=re,this.decrypt=ne;break;case"CFB":this.encrypt=Z,this.decrypt=Q,this.shiftBits=e.shiftBits||this.blockLength;break;case"OFB":this.encrypt=$,this.decrypt=$,this.shiftBits=e.shiftBits||this.blockLength;break;default:throw new s("Block mode "+e.block+" not supported")}switch(e.keyMeshing){case"CP":this.keyMeshing=xe;break;default:this.keyMeshing=Ae}if(this.encrypt===J||this.encrypt===re)switch(e.padding){case"PKCS5P":this.pad=Se,this.unpad=ke;break;case"RANDOM":this.pad=Be,this.unpad=Ce;break;case"BIT":this.pad=Pe,this.unpad=Oe;break;default:this.pad=Ee,this.unpad=Ce}else this.pad=Ce,this.unpad=Ce;this.generateKey=oe;break;case"MAC":this.sign=ue,this.verify=ce,this.generateKey=oe,this.macLength=e.macLength||this.blockLength>>1,this.pad=Ce,this.unpad=Ce,this.keyMeshing=Ae;break;case"KW":switch(this.pad=Ce,this.unpad=Ce,this.keyMeshing=Ae,e.keyWrapping){case"CP":this.wrapKey=pe,this.unwrapKey=de,this.generateKey=oe,this.shiftBits=e.shiftBits||this.blockLength;break;case"SC":this.wrapKey=ge,this.unwrapKey=me,this.generateKey=be;break;default:this.wrapKey=fe,this.unwrapKey=le,this.generateKey=oe}break;case"MASK":this.wrapKey=we,this.unwrapKey=_e,this.generateKey=oe;break;default:throw new s("Mode "+e.mode+" not supported")}var t,r=e.sBox;if(r){if("string"==typeof r){if(t=r.toUpperCase(),!(r=y[t]))throw new i("Unknown sBox name: "+e.sBox)}else if(!r.length||r.length!==y["E-Z"].length)throw new i("Length of sBox must be "+y["E-Z"].length)}else r=2015===this.version?y["E-Z"]:"SC"===this.procreator?y["E-SC"]:y["E-A"];if(this.sBox=r,e.iv){if(this.iv=new Uint8Array(e.iv),this.iv.byteLength!==this.blockSize&&1989===this.version)throw new i("Length of iv must be "+this.blockLength+" bits");if(this.iv.byteLength!==this.blockSize>>1&&this.encrypt===te)throw new i("Length of iv must be "+this.blockLength>>"1 bits");if(this.iv.byteLength%this.blockSize!=0&&this.encrypt!==te)throw new i("Length of iv must be a multiple of "+this.blockLength+" bits")}else this.iv=128===this.blockLength?h:u;if(e.ukm&&(this.ukm=new Uint8Array(e.ukm),8*this.ukm.byteLength!==this.blockLength))throw new i("Length of ukm must be "+this.blockLength+" bits")}},"function"==typeof define&&define.amd?define(["gostRandom"],e):"object"===(void 0===n?"undefined":je(n))?r.exports=e(t("./gostRandom")):(void 0).GostCipher=e((void 0).GostRandom)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostRandom":114}],109:[function(t,r,i){(function(n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e;e=function(e){var t="object"===("undefined"==typeof self?"undefined":o(self))&&self.self===self&&self||"object"===(void 0===n?"undefined":o(n))&&n.global===n&&n||this,j=t.DataError||t.Error,T=t.ArrayBuffer,D=t.Date;function K(e){if(e instanceof T)return e;if(e&&e.buffer&&e.buffer instanceof T)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new j("CryptoOperationData required")}function r(){}var a={decode:function(e){for(var t,r,n=(e=e.replace(/[^A-Za-z0-9\+\/]/g,"")).length,o=3*n+1>>2,i=new Uint8Array(o),s=0,a=0,u=0;u<n;u++){r=3&u;var c=e.charCodeAt(u);if(s|=(c=64<c&&c<91?c-65:96<c&&c<123?c-71:47<c&&c<58?c+4:43===c?62:47===c?63:0)<<18-6*r,3==r||n-u==1){for(t=0;t<3&&a<o;t++,a++)i[a]=s>>>(16>>>t&24)&255;s=0}}return i.buffer},encode:function(e){for(var t=new Uint8Array(K(e)),r=2,n="",o=t.length,i=0,s=0;s<o;s++)if(r=s%3,0<s&&4*s/3%96==0&&(n+="\r\n"),i|=t[s]<<(16>>>r&24),2===r||o-s==1){for(var a=18;0<=a;a-=6){var u=i>>>a&63;u=u<26?u+65:u<52?u+71:u<62?u-4:62===u?43:63===u?47:65,n+=String.fromCharCode(u)}i=0}return n.substr(0,n.length-2+r)+(2===r?"":1===r?"=":"==")}};r.prototype.Base64=a;var I=function(){var u={1026:128,1027:129,8218:130,1107:131,8222:132,8230:133,8224:134,8225:135,8364:136,8240:137,1033:138,8249:139,1034:140,1036:141,1035:142,1039:143,1106:144,8216:145,8217:146,8220:147,8221:148,8226:149,8211:150,8212:151,8482:153,1113:154,8250:155,1114:156,1116:157,1115:158,1119:159,160:160,1038:161,1118:162,1032:163,164:164,1168:165,166:166,167:167,1025:168,169:169,1028:170,171:171,172:172,173:173,174:174,1031:175,176:176,177:177,1030:178,1110:179,1169:180,181:181,182:182,183:183,1105:184,8470:185,1108:186,187:187,1112:188,1029:189,1109:190,1111:191},a={};for(var e in u){a[u[e]]=e}return{decode:function(e,t){t=(t||"win1251").toLowerCase().replace("-","");for(var r=[],n=0,o=e.length;n<o;n++){var i=e.charCodeAt(n);if("utf8"===t)i<128?r.push(i):(i<2048?r.push(192+(i>>>6)):(i<65536?r.push(224+(i>>>12)):(i<2097152?r.push(240+(i>>>18)):(i<67108864?r.push(248+(i>>>24)):(r.push(252+(i>>>30)),r.push(128+(i>>>24&63))),r.push(128+(i>>>18&63))),r.push(128+(i>>>12&63))),r.push(128+(i>>>6&63))),r.push(128+(63&i)));else if("unicode"===t||"ucs2"===t||"utf16"===t){if(i<55296||57344<=i&&i<=65536)r.push(i>>>8),r.push(255&i);else if(65536<=i&&i<1114112){var s=55296+((1047552&(i-=65536))>>10),a=56320+(1023&i);r.push(s>>>8),r.push(255&s),r.push(a>>>8),r.push(255&a)}}else"utf32"===t||"ucs4"===t?(r.push(i>>>24&255),r.push(i>>>16&255),r.push(i>>>8&255),r.push(255&i)):"win1251"===t?(128<=i&&(1040<=i&&i<1104?i-=848:i=u[i]||0),r.push(i)):r.push(255&i)}return new Uint8Array(r).buffer},encode:function(e,t){t=(t||"win1251").toLowerCase().replace("-","");for(var r=[],n=new Uint8Array(K(e)),o=0,i=n.length;o<i;o++){var s=n[o];if("utf8"===t)s=252<=s&&s<254&&o+5<i?1073741824*(s-252)+(n[++o]-128<<24)+(n[++o]-128<<18)+(n[++o]-128<<12)+(n[++o]-128<<6)+n[++o]-128:s>>248&&s<252&&o+4<i?(s-248<<24)+(n[++o]-128<<18)+(n[++o]-128<<12)+(n[++o]-128<<6)+n[++o]-128:s>>240&&s<248&&o+3<i?(s-240<<18)+(n[++o]-128<<12)+(n[++o]-128<<6)+n[++o]-128:224<=s&&s<240&&o+2<i?(s-224<<12)+(n[++o]-128<<6)+n[++o]-128:192<=s&&s<224&&o+1<i?(s-192<<6)+n[++o]-128:s;else if("unicode"===t||"ucs2"===t||"utf16"===t){if(55296<=(s=(s<<8)+n[++o])&&s<57344)s=(s-55296<<10)+((s=((s=n[++o])<<8)+n[++o])-56320)+65536}else"utf32"===t||"ucs4"===t?s=((s=((s=(s<<8)+n[++o])<<8)+n[++o])<<8)+n[++o]:"win1251"===t&&128<=s&&(192<=s&&s<256?s+=848:s=a[s]||0);r.push(String.fromCharCode(s))}return r.join("")}}}();r.prototype.Chars=I;var R={decode:function(e,t){e=e.replace(/[^A-fa-f0-9]/g,"");var r=Math.ceil(e.length/2),n=new Uint8Array(r);if(e=(0<e.length%2?"0":"")+e,t&&("string"!=typeof t||t.toLowerCase().indexOf("little")<0))for(var o=0;o<r;o++)n[o]=parseInt(e.substr(2*(r-o-1),2),16);else for(o=0;o<r;o++)n[o]=parseInt(e.substr(2*o,2),16);return n.buffer},encode:function(e,t){var r=[],n=new Uint8Array(K(e)),o=n.length;if(t&&("string"!=typeof t||t.toLowerCase().indexOf("little")<0))for(var i=0;i<o;i++){var s=o-i-1;r[s]=(0<s&&s%32==0?"\r\n":"")+("00"+n[i].toString(16)).slice(-2)}else for(i=0;i<o;i++)r[i]=(0<i&&i%32==0?"\r\n":"")+("00"+n[i].toString(16)).slice(-2);return r.join("")}};r.prototype.Hex=R;var L={decode:function(e){0===(e=(e||"").replace(/[^\-A-fa-f0-9]/g,"")).length&&(e="0");var t=!1;for("-"===e.charAt(0)&&(t=!0,e=e.substring(1));"0"===e.charAt(0)&&1<e.length;)e=e.substring(1);e=(0<e.length%2?"0":"")+e,(!t&&!/^[0-7]/.test(e)||t&&!/^[0-7]|8[0]+$/.test(e))&&(e="00"+e);for(var r=e.length/2,n=new Uint8Array(r),o=0,i=r-1;0<=i;--i){var s=parseInt(e.substr(2*i,2),16);t&&0<s+o&&(s=256-s-o,o=1),n[i]=s}return n.buffer},encode:function(e){var t=new Uint8Array(K(e)),r=t.length;if(0===t.length)return"0x00";for(var n=[],o=127<t[0],i=0,s=r-1;0<=s;--s){var a=t[s];o&&0<a+i&&(a=256-a-i,i=1),n[s]=("00"+a.toString(16)).slice(-2)}for(n=n.join("");"0"===n.charAt(0);)n=n.substring(1);return(o?"-":"")+"0x"+n}};r.prototype.Int16=L;var u={encode:function(e,t,r){return function e(t,r,n){var o=t.object;void 0===o&&(o=t);var i=t.tagClass=t.tagClass||0;if(0===i){var s=t.tagNumber;if(void 0===s)if("string"==typeof o)s=""===o?5:/^\-?0x[0-9a-fA-F]+$/.test(o)?2:/^(\d+\.)+\d+$/.test(o)?6:/^[01]+$/.test(o)?3:/^(true|false)$/.test(o)?1:/^[0-9a-fA-F]+$/.test(o)?4:19;else if("number"==typeof o)s=2;else if("boolean"==typeof o)s=1;else if(o instanceof Array)s=16;else if(o instanceof D)s=24;else{if(!(o instanceof T||o&&o.buffer instanceof T))throw new j("Unrecognized type for "+o);s=4}}var a,u=t.tagConstructed;if(void 0===u&&(u=t.tagConstructed=o instanceof Array),o instanceof T||o&&o.buffer instanceof T){if(a=new Uint8Array(K(o)),3===s){var c=new Uint8Array(K(a));(a=new Uint8Array(c.length+1))[0]=0,a.set(c,1)}}else if(u){if(!(o instanceof Array))throw new j("Constracted block can't be primitive");for(var f=0,l=[],h=0,p=0,d=o.length;p<d;p++)l[p]=e(o[p],r),f+=l[p].length;for(17===s&&l.sort(function(e,t){for(var r=0,n=Math.min(e.length,t.length);r<n;r++){var o=e[r]-t[r];if(0!=o)return o}return e.length-t.length}),"CER"===r&&(l[d]=new Uint8Array(2),f+=2),a=new Uint8Array(f),p=0,d=l.length;p<d;p++)a.set(l[p],h),h+=l[p].length}else switch(s){case 1:(a=new Uint8Array(1))[0]=o?255:0;break;case 2:case 10:a=L.decode("number"==typeof o?o.toString(16):o);break;case 3:if("string"==typeof o){var y=7-(o.length+7)%8;for(d=Math.ceil(o.length/8),(a=new Uint8Array(d+1))[0]=y,p=0;p<d;p++){for(var g=0,m=0;m<8;m++){var b;g=(g<<1)+((b=8*p+m)<o.length&&"1"===o.charAt(b)?1:0)}a[p+1]=g}}break;case 4:a=R.decode("number"==typeof o?o.toString(16):o);break;case 6:c=o.match(/\d+/g);var v=[];for(p=1;p<c.length;p++){d=+c[p];var w=[];for(1===p&&(d+=40*c[0]);w.push(127&d),d>>>=7;);for(m=w.length-1;0<=m;--m)v.push(w[m]+(0===m?0:128))}a=new Uint8Array(v);break;case 12:a=I.decode(o,"utf8");break;case 18:case 22:case 19:case 20:case 21:case 25:case 26:case 27:for(p=0,d=o.length;p<d;p++)255<o.charCodeAt(p)&&(s=12);a=12===s?I.decode(o,"utf8"):I.decode(o,"ascii");break;case 23:case 24:var _=o.original;if(!_){var x=new D(o);x.setMinutes(x.getMinutes()+x.getTimezoneOffset());for(var A=24===s?x.getMilliseconds().toString():"";0<A.length&&"0"===A.charAt(A.length-1);)A=A.substring(0,A.length-1);0<A.length&&(A="."+A),_=(23===s?x.getYear().toString().slice(-2):x.getFullYear().toString())+("00"+(x.getMonth()+1)).slice(-2)+("00"+x.getDate()).slice(-2)+("00"+x.getHours()).slice(-2)+("00"+x.getMinutes()).slice(-2)+("00"+x.getSeconds()).slice(-2)+A+"Z"}a=I.decode(_,"ascii");break;case 28:a=I.decode(o,"utf32");break;case 30:a=I.decode(o,"utf16")}if((a=a||new Uint8Array(0))instanceof T&&(a=new Uint8Array(a)),!u&&"CER"===r)switch(s){case 3:b=1;case 4:case 12:case 18:case 19:case 20:case 21:case 22:case 25:case 26:case 27:case 28:case 30:for(l=[],h=f=0,p=b=b||0,d=a.length;p<d;p+=1e3-b)l[p]=e({object:new Unit8Array(a.buffer,p,Math.min(1e3-b,d-p)),tagNumber:s,tagClass:0,tagConstructed:!1},r),f+=l[p].length;for(l[d]=new Uint8Array(2),f+=2,a=new Uint8Array(f),p=0,d=l.length;p<d;p++)a.set(l[p],h),h+=l[p].length}if(t.tagNumber=0===i?s:s=t.tagNumber||0,t.content=a,n)return a;var C=[],S=3===i?192:2===i?128:1===i?64:0;if(u&&(S|=32),s<31)S|=31&s,C.push(S);else{S|=31,C.push(S),d=s;for(var k=[];k.push(127&d),d>>>=7;);for(m=k.length-1;0<=m;--m)C.push(k[m]+(0===m?0:128))}if(u&&"CER"===r)C.push(128);else{var E=a.length;if(127<E){for(var P=E,O=[];O.push(255&P),P>>>=8;);for(C.push(O.length+128),m=O.length-1;0<=m;--m)C.push(O[m])}else C.push(E)}var B=t.header=new Uint8Array(C),F=new Uint8Array(B.length+a.length);return F.set(B,0),F.set(a,B.length),F}(e,t,r).buffer},decode:function(e){return function e(t,r){var n,o,i,s,a,u,c,f,l,h=r||0,p=h;if(t.object)n=t.tagNumber,o=t.tagClass,i=t.tagConstructed,s=t.content,a=t.header,u=t.object instanceof T?new Uint8Array(t.object):null,c=t.object instanceof Array?t.object:null,f=u&&u.length||null;else{var d=t,y=d[h++];if(o=y>>6,i=0!=(32&y),31==(n=31&y)){n=0;do{if(9007199254740864<n)throw new j("Convertor not supported tag number more then (2^53 - 1) at position "+r);n=(n<<7)+(127&(y=d[h++]))}while(128&y)}if((f=127&(y=d[h++]))!==y){if(6<f)throw new j("Length over 48 bits not supported at position "+r);if(0===f)f=null;else{for(var g=y=0;g<f;++g)y=(y<<8)+d[h++];f=y}}if(p=h,c=null,i)if(c=[],null!==f){for(var m=p+f;h<m;){var b=e(d,h);c.push(b),h+=b.header.length+b.content.length}if(h!==m)throw new j("Content size is not correct for container starting at offset "+p)}else try{for(;h+=(b=e(d,h)).header.length+b.content.length,0!==b.tagClass||0!==b.tagNumber;)c.push(b);f=h-p}catch(e){throw new j("Exception "+e+" while decoding undefined length content at offset "+p)}a=new Uint8Array(d.buffer,r,p-r),u=s=new Uint8Array(d.buffer,p,f)}if(null!==c&&0===o)switch(n){case 3:l=1;case 4:case 12:case 18:case 19:case 20:case 21:case 22:case 25:case 26:case 27:case 28:case 30:if(l=l||0,0===c.length)throw new j("No constructed encoding content of string type at offset "+p);f=l,g=0;for(var v=c.length;g<v;g++){if((b=c[g]).tagClass!==o||b.tagNumber!==n||b.tagConstructed)throw new j("Invalid constructed encoding of string type at offset "+p);f+=b.content.length-l}u=new Uint8Array(f),g=0,v=c.length;for(var w=l;g<v;g++)b=c[g],0<l?u.set(b.content.subarray(1),w):u.set(b.content,w),w+=b.content.length-l;i=!1,c=null}var _="";if(null===c){if(null===f)throw new j("Invalid tag with undefined length at offset "+p);if(0===o)switch(n){case 1:_=0!==u[0];break;case 2:case 10:if(6<f)_=L.encode(u);else{var x=u[0];for(127<u[0]&&(x-=256),g=1;g<f;g++)x=256*x+u[g];_=x}break;case 3:if(5<f)_=new Uint8Array(u.subarray(1)).buffer;else{var A=u[0];for(b=[],g=f-1;1<=g;--g){var C=u[g];for(w=A;w<8;++w)b.push(C>>w&1?"1":"0");A=0}_=b.reverse().join("")}break;case 4:_=new Uint8Array(u).buffer;break;case 6:b="";var S=v=0;for(g=0;g<f;++g)v=(v<<7)+(127&(x=u[g])),S+=7,128&x||(""===b?b=(k=v<80?v<40?0:1:2)+"."+(v-40*k):b+="."+v.toString(),S=v=0);if(0<S)throw new j("Incompleted OID at offset "+p);_=b;break;case 16:case 17:_=[];break;case 12:_=I.encode(u,"utf8");break;case 18:case 19:case 20:case 21:case 22:case 25:case 26:case 27:_=I.encode(u,"ascii");break;case 28:_=I.encode(u,"utf32");break;case 30:_=I.encode(u,"utf16");break;case 23:case 24:var k,E=23===n;if(b=I.encode(u,"ascii"),!(k=(E?/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/:/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/).exec(b)))throw new j('Unrecognized time format "'+b+'" at offset '+p);E&&(k[1]=+k[1],k[1]+=k[1]<50?2e3:1900);var P=new D(k[1],k[2]-1,+k[3],+(k[4]||"0"),+(k[5]||"0"),+(k[6]||"0"),+(k[7]||"0")),O=P.getTimezoneOffset();!k[8]&&23!==n||("Z"!==k[8].toUpperCase()&&k[9]&&(O+=parseInt(k[9])),P.setMinutes(P.getMinutes()-O)),P.original=b,_=P}else _=new Uint8Array(u).buffer}else _=c;return{tagConstructed:i,tagClass:o,tagNumber:n,header:a,content:s,object:_}}(e.object?e:new Uint8Array(K(e)),0)}};return r.prototype.BER=u,r.prototype.PEM={encode:function(e,t){return(t?"-----BEGIN "+t.toUpperCase()+"-----\r\n":"")+a.encode(e instanceof T?e:u.encode(e))+(t?"\r\n-----END "+t.toUpperCase()+"-----":"")},decode:function(e,t,r,n){var o=/([A-Za-z0-9\+\/\s\=]+)/g.exec(e);o[1].length!==e.length&&(o=!1),!o&&t&&(o=new RegExp("-----\\s?BEGIN "+t.toUpperCase()+"-----([A-Za-z0-9\\+\\/\\s\\=]+)-----\\s?END "+t.toUpperCase()+"-----","g").exec(e));o=o||new RegExp("-----\\s?BEGIN [A-Z0-9\\s]+-----([A-Za-z0-9\\+\\/\\s\\=]+)-----\\s?END [A-Z0-9\\s]+-----","g").exec(e);var i=o&&o[1+(n||0)];if(!i)throw new j("Not valid PEM format");var s=a.decode(i);return r&&(s=u.decode(s)),s}},e&&(e.coding=new r),r},"function"==typeof define&&define.amd?define(["gostCrypto"],e):"object"===(void 0===i?"undefined":o(i))?r.exports=e(t("./gostCrypto")):(void 0).GostCoding=e((void 0).gostCrypto)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostCrypto":110}],110:[function(O,r,n){(function(t){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e;e=function(r){var s="object"===("undefined"==typeof self?"undefined":i(self))&&self.self===self&&self||"object"===(void 0===t?"undefined":i(t))&&t.global===t&&t||this,p=s.crypto||s.msCrypto,l=s.SyntaxError||s.Error,d=s.DataError||s.Error,y=s.NotSupportedError||s.Error,a=s.OperationError||s.Error,h=s.InvalidAccessError||s.Error,g=s.InvalidAccessError||s.Error;function m(t,e){("string"==typeof t||t instanceof String)&&(t={name:t});var r=t.name;if(!r)throw new l("Algorithm name not defined");var n=(n=r.split("/"))[0].split("-").concat(n.slice(1)),o={};if(r=n[0].replace(/[\.\s]/g,""),n=n.slice(1),0<=r.indexOf("28147"))o={name:"GOST 28147",version:1989,mode:(t.mode||("sign"===e||"verify"===e?"MAC":"wrapKey"===e||"unwrapKey"===e?"KW":"ES")).toUpperCase(),length:t.length||64};else if(0<=r.indexOf("3412"))o={name:"GOST R 34.12",version:2015,mode:(t.mode||("sign"===e||"verify"===e?"MAC":"wrapKey"===e||"unwrapKey"===e?"KW":"ES")).toUpperCase(),length:t.length||64};else if(0<=r.indexOf("3411"))o={name:"GOST R 34.11",version:2012,mode:(t.mode||("deriveKey"===e||"deriveBits"===e?"KDF":"sign"===e||"verify"===e?"HMAC":"HASH")).toUpperCase(),length:t.length||256};else if(0<=r.indexOf("3410"))o={name:"GOST R 34.10",version:2012,mode:(t.mode||("deriveKey"===e||"deriveBits"===e?"DH":"SIGN")).toUpperCase(),length:t.length||256};else if(0<=r.indexOf("SHA"))o={name:"SHA",version:160===(t.length||160)?1:2,mode:(t.mode||("deriveKey"===e||"deriveBits"===e?"KDF":"sign"===e||"verify"===e?"HMAC":"HASH")).toUpperCase(),length:t.length||160};else if(0<=r.indexOf("RC2"))o={name:"RC2",version:1,mode:(t.mode||("sign"===e||"verify"===e?"MAC":"wrapKey"===e||"unwrapKey"===e?"KW":"ES")).toUpperCase(),length:t.length||32};else if(0<=r.indexOf("PBKDF2"))(o=m(t.hash,"digest")).mode="PBKDF2";else if(0<=r.indexOf("PFXKDF"))(o=m(t.hash,"digest")).mode="PFXKDF";else if(0<=r.indexOf("CPKDF"))(o=m(t.hash,"digest")).mode="CPKDF";else{if(!(0<=r.indexOf("HMAC")))throw new y("Algorithm not supported");(o=m(t.hash,"digest")).mode="HMAC"}switch(n.forEach(function(e){if(e=e.toUpperCase(),/^[0-9]+$/.test(e))if(0<=["8","16","32"].indexOf(e)||"128"===o.length&&"64"===e)if("ES"===o.mode)o.shiftBits=parseInt(e);else{if("MAC"!==o.mode)throw new y("Algorithm "+o.name+" mode "+e+" not supported");o.macLength=parseInt(e)}else if(0<=["89","94","01","12","15","1989","1994","2001","2012","2015"].indexOf(e)){var t=parseInt(e);t=t<1900?t<80?2e3+t:1900+t:t,o.version=t}else 0<=["1"].indexOf(e)&&"SHA"===o.name?(o.version=1,o.length=160):0<=["256","384","512"].indexOf(e)&&"SHA"===o.name?(o.version=2,o.length=parseInt(e)):0<=["40","128"].indexOf(e)&&"RC2"===o.name?(o.version=1,o.length=parseInt(e)):0<=["64","128","256","512"].indexOf(e)?o.length=parseInt(e):0<=["1000","2000"].indexOf(e)&&(o.iterations=parseInt(e));else if(0<=["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"].indexOf(e))o.sBox=e;else if(0<=["S-TEST","S-A","S-B","S-C","S-D","X-A","X-B","X-C"].indexOf(e))o.namedParam=e;else if(0<=["S-256-TEST","S-256-A","S-256-B","S-256-C","P-256","T-512-TEST","T-512-A","T-512-B","X-256-A","X-256-B","T-256-TEST","T-256-A","T-256-B","S-256-B","T-256-C","S-256-C"].indexOf(e))o.namedCurve=e;else if(0<=["SC","CP","VN"].indexOf(e))o.procreator=e;else if("GOST 28147"===o.name||"GOST R 34.12"===o.name||"RC2"===o.name)if(0<=["ES","MAC","KW","MASK"].indexOf(e))o.mode=e;else if(0<=["ECB","CFB","OFB","CTR","CBC"].indexOf(e))o.mode="ES",o.block=e;else if(0<=["CPKW","NOKW","SCKW"].indexOf(e))o.mode="KW",o.keyWrapping=e.replace("KW","");else if(0<=["ZEROPADDING","PKCS5PADDING","NOPADDING","RANDOMPADDING","BITPADDING"].indexOf(e))o.padding=e.replace("PADDING","");else{if(!(0<=["NOKM","CPKM"].indexOf(e)))throw new y("Algorithm "+o.name+" mode "+e+" not supported");o.keyMeshing=e.replace("KM","")}else if("GOST R 34.11"===o.name||"SHA"===o.name){if(!(0<=["HASH","KDF","HMAC","PBKDF2","PFXKDF","CPKDF"].indexOf(e)))throw new y("Algorithm "+o.name+" mode "+e+" not supported");o.mode=e}else if("GOST R 34.10"===o.name){var r=e.replace(/[\.\s]/g,"");if(0<=r.indexOf("GOST")&&0<=r.indexOf("3411"))o.hash=e;else{if(!["SIGN","DH","MASK"].indexOf(e))throw new y("Algorithm "+o.name+" mode "+e+" not supported");o.mode=e}}}),o.procreator=t.procreator||o.procreator||"CP",o.name){case"GOST R 34.10":o.keySize=o.length/(1994===o.version?4:8);break;case"GOST R 34.11":o.keySize=32;break;case"GOST 28147":case"GOST R 34.12":o.keySize=32;break;case"RC2":o.keySize=Math.ceil(o.length/8);break;case"SHA":o.keySize=o.length/8}switch("ES"===o.mode&&(t.block&&(o.block=t.block),o.block&&(o.block=o.block.toUpperCase()),t.padding&&(o.padding=t.padding),o.padding&&(o.padding=o.padding.toUpperCase()),t.shiftBits&&(o.shiftBits=t.shiftBits),t.keyMeshing&&(o.keyMeshing=t.keyMeshing),o.keyMeshing&&(o.keyMeshing=o.keyMeshing.toUpperCase()),"importKey"!==e&&"generateKey"!==e&&(o.block=o.block||"ECB",o.padding=o.padding||("CBC"===o.block||"ECB"===o.block?"ZERO":"NO"),"CFB"!==o.block&&"OFB"!==o.block||(o.shiftBits=o.shiftBits||o.length),o.keyMeshing=o.keyMeshing||"NO")),"KW"===o.mode&&(t.keyWrapping&&(o.keyWrapping=t.keyWrapping),o.keyWrapping&&(o.keyWrapping=o.keyWrapping.toUpperCase()),"importKey"!==e&&"generateKey"!==e&&(o.keyWrapping=o.keyWrapping||"NO")),["sBox","namedParam","namedCurve","curve","param","modulusLength"].forEach(function(e){t[e]&&(o[e]=t[e])}),"importKey"!==e&&"generateKey"!==e&&("GOST 28147"===o.name?o.sBox=o.sBox||("SC"===o.procreator?"E-SC":"E-A"):"GOST R 34.12"===o.name&&64===o.length?o.sBox="E-Z":"GOST R 34.11"===o.name&&1994===o.version?o.sBox=o.sBox||("SC"===o.procreator?"D-SC":"D-A"):"GOST R 34.10"===o.name&&1994===o.version?o.namedParam=o.namedParam||("DH"===o.mode?"X-A":"S-A"):("GOST R 34.10"===o.name&&2001===o.version||"GOST R 34.10"===o.name&&2012===o.version)&&(o.namedCurve=o.namedCurve||(256===o.length?"SC"===o.procreator?"P-256":"DH"===o.mode?"X-256-A":"S-256-A":"T-512-A"===o.mode))),o.mode){case"DH":t.ukm&&(o.ukm=t.ukm),t.public&&(o.public=t.public);break;case"SIGN":case"KW":t.ukm&&(o.ukm=t.ukm);break;case"ES":case"MAC":t.iv&&(o.iv=t.iv);break;case"KDF":t.label&&(o.label=t.label),t.contex&&(o.context=t.contex);break;case"PBKDF2":case"PFXKDF":t.salt&&(o.salt=t.salt),t.iterations&&(o.iterations=t.iterations),t.diversifier&&(o.diversifier=t.diversifier);break;case"CPKDF":t.salt&&(o.salt=t.salt),t.iterations&&(o.iterations=t.iterations)}if(e&&("ES"!==o.mode&&"SIGN"!==o.mode&&"MAC"!==o.mode&&"HMAC"!==o.mode&&"KW"!==o.mode&&"DH"!==o.mode&&"MASK"!==o.mode&&"generateKey"===e||"ES"!==o.mode&&("encrypt"===e||"decrypt"===e)||"SIGN"!==o.mode&&"MAC"!==o.mode&&"HMAC"!==o.mode&&("sign"===e||"verify"===e)||"HASH"!==o.mode&&"digest"===e||"KW"!==o.mode&&"MASK"!==o.mode&&("wrapKey"===e||"unwrapKey"===e)||"DH"!==o.mode&&"PBKDF2"!==o.mode&&"PFXKDF"!==o.mode&&"CPKDF"!==o.mode&&"KDF"!==o.mode&&("deriveKey"===e||"deriveBits"===e)))throw new y("Algorithm mode "+o.mode+" not valid for method "+e);return t.hash&&(o.hash=t.hash),o.hash&&(("string"==typeof o.hash||o.hash instanceof String)&&o.procreator&&(o.hash=o.hash+"/"+o.procreator),o.hash=m(o.hash,"digest")),t.id&&(o.id=t.id),o}function b(e){if(!p||!p.subtle||!e)return!1;var t="string"==typeof e||e instanceof String?t=e:e.name;return!!t&&((0<=(t=t.toUpperCase()).indexOf("KDF")||0<=t.indexOf("HMAC"))&&e.hash?b(e.hash):-1===t.indexOf("GOST")&&-1===t.indexOf("SHA-1")&&-1===t.indexOf("RC2")&&-1===t.indexOf("?DES"))}function u(e,t){if(!e.algorithm)throw new l("Key algorithm not defined");if(!e.algorithm.name)throw new l("Key algorithm name not defined");var r=e.algorithm.name,n="GOST 28147"===r||"GOST R 34.12"===r||"RC2"===r,o="GOST R 34.11"===r||"SHA"===r,i="GOST R 34.10"===r;if(!n&&!i&&!o)throw new y("Key algorithm "+r+" is unsupproted");if(!e.type)throw new l("Key type not defined");if((n||o)&&"secret"!==e.type||i&&"public"!==e.type&&"private"!==e.type)throw new d("Key type "+e.type+" is not valid for algorithm "+r);if(!e.usages||!e.usages.indexOf)throw new l("Key usages not defined");for(var s=0,a=e.usages.length;s<a;s++){var u=e.usages[s];if(("encrypt"===u||"decrypt"===u)&&"secret"!==e.type||"sign"===u&&"public"===e.type||"verify"===u&&"private"===e.type)throw new h("Key type "+e.type+" is not valid for "+u)}if(t&&-1===e.usages.indexOf(t))throw new g("Key usages is not contain method "+t);if(!e.buffer)throw new l("Key buffer is not defined");var c=8*e.buffer.byteLength,f=8*e.algorithm.keySize;if("secret"===e.type&&c!==(f||256)&&(0<=e.usages.indexOf("encrypt")||0<=e.usages.indexOf("decrypt"))||"private"===e.type&&256!=c&&512!=c||"public"===e.type&&512!=c&&1024!=c)throw new l("Key buffer has wrong size "+c+" bit")}function c(e,t,r){if(u(r,e),t){var n;switch(t.mode){case"ES":n=["sBox","keyMeshing","padding","block"];break;case"SIGN":n=["namedCurve","namedParam","sBox","curve","param","modulusLength"];break;case"MAC":n=["sBox"];break;case"KW":n=["keyWrapping","ukm"];break;case"DH":n=["namedCurve","namedParam","sBox","ukm","curve","param","modulusLength"];break;case"KDF":n=["context","label"];break;case"PBKDF2":n=["sBox","iterations","salt"];break;case"PFXKDF":n=["sBox","iterations","salt","diversifier"];break;case"CPKDF":n=["sBox","salt"]}n&&n.forEach(function(e){r.algorithm[e]&&(t[e]=r.algorithm[e])})}return r.buffer}function v(e,t,r,n,o){var i={type:o||("GOST R 34.10"===e.name?"private":"secret"),extractable:t||"false",algorithm:e,usages:r||[],buffer:n};return u(i),i}function f(e){e instanceof o&&(e=new Uint8Array(e));for(var t=new Uint8Array(e.length),r=0,n=e.length;r<n;r++)t[n-r-1]=e[r];return t.buffer}function w(r){return r&&null===r.oncomplete&&null===r.onerror?new n(function(e,t){r.oncomplete=function(){e(r.result)},r.onerror=function(){t(new a(r.toString()))}}):r}function n(e){var s,a="pending",u=[],c=[];function t(e){try{e()}catch(e){}}try{e(function(e){"pending"===a&&(a="fulfilled",s=e,u.forEach(t))},function(e){"pending"===a&&(a="rejected",s=e,c.forEach(t))})}catch(e){"pending"===a&&(a="rejected",s=e,c.forEach(t))}this.then=function(o,i){return new n(function(t,r){function e(){var e;try{e=o?o(s):s}catch(e){return void r(e)}(e=w(e))&&e.then&&e.then.call?e.then(t,r):t(e)}function n(){var e;try{e=i?i(s):s}catch(e){return void r(e)}(e=w(e))&&e.then&&e.then.call?e.then(t,r):r(e)}"fulfilled"===a?e():"rejected"===a?n():(u.push(e),c.push(n))})},this.catch=function(e){return this.then(void 0,e)}}s.Promise||(s.Promise=(n.all=function(c){return new n(function(r,t){var n=[],o=0;function e(t){return o++,function(e){n[t]=e,0==--o&&r(n)}}function i(e){0<o&&t(e),o=0}for(var s=0,a=c.length;s<a;s++){var u=c[s];u.then&&u.then.call?u.then(e(s),i):n[s]=u}0===o&&r(n)})},n));var _="",x="";"undefined"!=typeof document&&function(){for(var e=/^(.*)gostCrypto(.*)\.js$/i,t=document.querySelectorAll("script"),r=0,n=t.length;r<n;r++){var o=t[r].getAttribute("src"),i=e.exec(o);i&&(_=i[1],x=i[2])}}();var A,C=[],S=0;if(!s.importScripts&&!s.gostEngine)try{(A=new Worker(_+"gostEngine"+x+".js")).onmessage=function(e){for(var t=e.data.id,r=0,n=C.length;r<n&&C[r].id!==t;r++);if(r<n){var o=C[r];C.splice(r,1),e.data.error?o.reject(new a(e.data.error)):o.resolve(e.data.result)}},A.onerror=function(e){for(var t=0,r=C.length;t<r;t++)C[t].reject(e.error);C=[]}}catch(e){A=!1}function k(n,o,i){return new Promise(function(e,t){try{if(A){var r=++S;C.push({id:r,resolve:e,reject:t}),A.postMessage({id:r,algorithm:n,method:o,args:i})}else s.gostEngine?e(s.gostEngine.execute(n,o,i)):t(new a("Module gostEngine not found"))}catch(e){t(e)}})}function E(e){try{e()}catch(e){}}s.importScripts||(s.importScripts=function(){for(var e=0,t=arguments.length;e<t;e++){var r=arguments[e].split("."),n=_+r[0]+x+"."+r[1],o=document.querySelector('script[src="'+n+'"]');o||((o=document.createElement("script")).setAttribute("src",n),document.head.appendChild(o))}}),A||(s.gostEngine=O("./gostEngine"));var o=s.ArrayBuffer,P={};function e(){}return e.prototype.encrypt=function(e,t,r){return new Promise(E).then(function(){return b(e)?p.subtle.encrypt(e,t,r):k(e=m(e,"encrypt"),"encrypt",[c("encrypt",e,t),r])})},e.prototype.decrypt=function(e,t,r){return new Promise(E).then(function(){return b(e)?p.subtle.decrypt(e,t,r):k(e=m(e,"decrypt"),"decrypt",[c("decrypt",e,t),r])})},e.prototype.sign=function(t,e,r){return new Promise(E).then(function(){return b(t)?p.subtle.sign(t,e,r):k(t=m(t,"sign"),"sign",[c("sign",t,e),r]).then(function(e){return"SC"===t.procreator&&"SIGN"===t.mode&&(e=P.asn1.GostSignature.encode(e)),e})})},e.prototype.verify=function(t,r,n,o){return new Promise(E).then(function(){if(b(t))return p.subtle.verify(t,r,n,o);if("SC"===(t=m(t,"verify")).procreator&&"SIGN"===t.mode){var e=P.asn1.GostSignature.decode(n);n={r:e.r,s:e.s}}return k(t,"verify",[c("verify",t,r),n,o])})},e.prototype.digest=function(e,t){return new Promise(E).then(function(){return b(e)?p.subtle.digest(e,t):k(e=m(e,"digest"),"digest",[t])})},e.prototype.generateKey=function(n,o,i){return new Promise(E).then(function(){if(b(n))return p.subtle.generateKey(n,o,i);var t=n.privateKey,r=n.publicKey;return n=m(n,"generateKey"),t=t?m(t,"generateKey"):n,r=r?m(r,"generateKey"):n,k(n,"generateKey",[]).then(function(e){return e.publicKey&&e.privateKey?function(e,t,r,n,o,i){if(!n||!n.indexOf)throw new l("Key usages not defined");var s=n.filter(function(e){return"sign"!==e}),a=n.filter(function(e){return"verify"!==e});return{publicKey:v(e,r,s,o,"public"),privateKey:v(t,r,a,i,"private")}}(r,t,o,i,e.publicKey,e.privateKey):v(n,o,i,e)})})},e.prototype.deriveKey=function(e,t,r,n,o){return new Promise(E).then(function(){return b(e)?p.subtle.deriveKey(e,t,r,n,o):(e=m(e,"deriveKey"),r=m(r,"generateKey"),e.keySize=r.keySize,e.public&&(e.public.algorithm=m(e.public.algorithm),e.public=c("deriveKey",e,e.public)),k(e,"deriveKey",[c("deriveKey",e,t)]).then(function(e){return v(r,n,o,e)}))})},e.prototype.deriveBits=function(e,t,r){return new Promise(E).then(function(){return b(e)?p.subtle.deriveBits(e,t,r):((e=m(e,"deriveBits")).public&&(e.public=c("deriveBits",e,e.public)),k(e,"deriveBits",[c("deriveBits",e,t),r]))})},e.prototype.importKey=function(a,u,c,f,l){var h;return new Promise(E).then(function(){if(b(c))return p.subtle.importKey(a,u,c,f,l);if("raw"===a){if(c=m(c,"importKey"),l&&l.indexOf){var e=c.name.toUpperCase().replace(/[\.\s]/g,"");0<=e.indexOf("3410")&&0<=l.indexOf("sign")?h="private":0<=e.indexOf("3410")&&0<=l.indexOf("verify")&&(h="public")}return u}var t;if("pkcs8"===a)t=P.asn1.GostPrivateKeyInfo.decode(u).object;else{if("spki"!==a)throw new y("Key format not supported");t=P.asn1.GostSubjectPublicKeyInfo.decode(u).object}if(c=m(t.algorithm,"importKey"),h=t.type,!1!==f&&(f=f||t.extractable),l){for(var r=0;r<l.length;r++)if(t.usages.indexOf(l[r])<0)throw d("Key usage not valid for this key")}else l=t.usages;var n=t.buffer,o=c.keySize,i=n.byteLength;if("public"===h||o===i)return n;if(0<i%o)throw new d("Invalid key size");c.mode="MASK",c.procreator="VN";var s=[];for(r=o;r<i;r+=o)s.push(function(t){return function(e){return k(c,"unwrapKey",[t,e]).then(function(e){var t=s.pop();return t?t(e):(delete c.mode,e)})}}(new Uint8Array(n,r,o)));return s.pop()(new Uint8Array(n,0,o))}).then(function(e){return v(c,f,l,e,h)})},e.prototype.exportKey=function(t,r){return new Promise(E).then(function(){if(r&&b(r.algorithm))return p.subtle.exportKey(t,r);if(!r.extractable)throw new g("Key not extractable");var e=c(null,null,r);if("raw"===t)return e;if("pkcs8"===t&&r.algorithm&&r.algorithm.id){if("VN"!==r.algorithm.procreator)return P.asn1.GostPrivateKeyInfo.encode(r);var n,o=r.algorithm;return o.mode="MASK",k(o,"generateKey").then(function(e){return k(o,"wrapKey",[n=e,r.buffer])}).then(function(e){delete o.mode;var t=new Uint8Array(e.byteLength+n.byteLength);t.set(new Uint8Array(e,0,e.byteLength)),t.set(new Uint8Array(n,0,n.byteLength),e.byteLength);var r=t.buffer;return r.enclosed=!0,P.asn1.GostPrivateKeyInfo.encode({algorithm:o,buffer:r})})}if("spki"===t&&r.algorithm&&r.algorithm.id)return P.asn1.GostSubjectPublicKeyInfo.encode(r);throw new y("Key format not supported")})},e.prototype.wrapKey=function(t,r,n,o){return new Promise(E).then(function(){if(b(o))return p.subtle.wrapKey(t,r,n,o);o=m(o,"wrapKey");var e=c(null,null,r);return"SC"===o.procreator&&"private"===r.type&&(e=f(e)),k(o,"wrapKey",[c("wrapKey",o,n),e]).then(function(e){if("raw"===t)return e;throw new y("Key format not supported")})})},e.prototype.unwrapKey=function(e,t,r,n,o,i,s){return new Promise(E).then(function(){if(b(n))return p.subtle.unwrapKey(e,t,r,n,o,i,s);if(n=m(n,"unwrapKey"),o=m(o,"importKey"),"raw"!==e)throw new y("Key format not supported");return k(n,"unwrapKey",[c("unwrapKey",n,r),t]).then(function(e){var t;if(o&&o.name){var r=o.name.toUpperCase().replace(/[\.\s]/g,"");0<=r.indexOf("3410")&&0<=s.indexOf("sign")?t="private":0<=r.indexOf("3410")&&0<=s.indexOf("verify")&&(t="public")}return"SC"===n.procreator&&"private"===t&&(e=f(e)),v(o,i,s,e,t)})})},P.subtle=new e,P.getRandomValues=function(e){var t=(r=r||s.GostRandom)?new r:p;if(!t.getRandomValues)throw new y("Random generator not found");t.getRandomValues(e)},P},"function"==typeof define&&define.amd?define(["gostRandom"],e):"object"===(void 0===n?"undefined":i(n))?r.exports=e(O("./gostRandom")):(void 0).gostCrypto=e((void 0).GostRandom)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostEngine":112,"./gostRandom":114}],111:[function(r,n,o){(function(e){"use strict";function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var t;t=function(n,t){var o="object"===("undefined"==typeof self?"undefined":G(self))&&self.self===self&&self||"object"===(void 0===e?"undefined":G(e))&&e.global===e&&e||this,i=o.crypto||o.msCrypto,P=o.DataError||Error,s=o.NotSupportedError||Error;function O(e,t,r,n,o){for(var i=0;i<o;i++)r[n+i]=e[t+i]}function x(e){for(var t=new Uint8Array(e),r=new Uint8Array(t.length),n=0,o=t.length;n<o;n++)r[o-n-1]=t[n];return r.buffer}function A(e){for(var t,r,n=e.length,o=3*n+1>>2,i=new Uint8Array(o),s=0,a=0,u=0;u<n;u++){r=3&u;var c=e.charCodeAt(u);if(s|=(c=64<c&&c<91?c-65:96<c&&c<123?c-71:47<c&&c<58?c+4:43===c?62:47===c?63:0)<<18-6*r,3==r||n-u==1){for(t=0;t<3&&a<o;t++,a++)i[a]=s>>>(16>>>t&24)&255;s=0}}return i.buffer}function B(e){if(e instanceof ArrayBuffer)return e;if(e&&e.buffer&&e.buffer instanceof ArrayBuffer)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new P("ArrayBuffer or ArrayBufferView required")}var h,p,d,y,g,r=function(){var a=new Int32Array(16),r=new Int32Array(16);r[0]=512;var u,c,f,o=function(){for(var e=new Int32Array(A("B0Wm8lllgN0jTXTMNnR2BRXTYKQIKkKiAWlnkpHgfEv8xIV1jbhOcRbQRS5DdmovH3xlwIEvy+vp2soe2lsIsbebsSFwBHnmVs3L1xui3VXKpwrbwmG1XFiZ1hJrF7WaMQG1Fg9e1WGYKyMKcur+89e1cA9GneNPGi+dqYq1o2+yCroK9ZYemTHbeoZD9LbCCdtiYDc6ycGxnjWQ5A/i03t7KbEUderyix+cUl9e8QY1hD1qKPw5Cscvzius3HT1LtHjhLy+DCLxN+iToepTNL4DUpMzE7fYddYD7YIs16k/NV5orRxynX08XDN+hY5I3eRxXaDhSPnSZhXos98f71f+bHz9WBdg9WPqqX6iVnoWGicjtwD/36P1OiVHF82/vf8PgNc1njVKEIYWHxwVf2MjqWwMQT+amUdHraxr6ktufWRGekBo+jVPkDZyxXG/tsa+wmYf8gq0t5oct6b6z8aO8Jq0mn8YbKRCUfnEZi3AOTB6O8Okb9nTOh2urk+uk9QUOk1WhojzSjyiTEUXNQQFSiiDaUcGNyyCLcWrkgnJk3oZMz5H08mHv+bHxp45VAkkv/6GrFHsxaruFg7H9B7nAr/UDX+k2ahRWTXCrDYvxKXRK43RaZAGm5LLK4n0msTbTTtEtIke3jaccfi3TkFBbgwCqucDp8mTTUJbH5vbWiODUURhcmAqH8uS3DgOVJwHppqKK3uxzrLbC0QKgIQJDeC3Vdk8JEKJJRs6fTreXxbs2JpMlJsiMRZUWo837ZxFmPvHtHTDtjsV0fqYNvRSdjswbB56SzNprwJn558DYTMbiuH/H9t4iv8c50GJ8/PkskjlKjhSbwWApt6+qxst84HNpMprXdhvwEpZot6Ybkd9Hc2678q5SOrvcR2KeWaEFCGAASBhB6vru2v62JT+WmPNxgIw+4nI79CezXsg1xvxSpK8SJkbstnVF/T6UijhiKqkHeeGzJEYne+AXZufITDUEiD4dx3fvDI8pM16sUkEsIAT0roxFvFn5443")),t=new Array(12),r=0;r<12;r++)t[r]=new Int32Array(e.buffer,64*r,16);return t}(),l=new Int32Array(A("5vh+XFtxH9Alg3eACST6FshJ4H6FLqSoW0aGoY8GwWoLMumi13tBbqvaN6RngVxm9heWqBpoZnb13AtwY5GVS0hi84235kvx/1ximmi9hcXLgn2m/NdXlWbTba9pufCJNWyfdEg9g7B8vOyxI4yZoTanAqwxxHCNnrao0C+839aLGfpR5bOuN5zPtUCKEn0LvAx4tQggj1rlM+OEIojs7c7Cx9N3wV/S7HgXtlBdD165TMLAgzaHHYwgXbTLCwStdjyFWyigiS9YjRt59v8yVz/s9p5DEZM+D8DTn4A6GMnuAQom9fOtgxDv6PRBGXmmXc2hDH3pOhBKG+4dEkjpLFO/8tshhHM5tPUMz6aiPQlftLyc2EeYzeiKLYsHHFb5f3dxaVp1apzF8C5xoLoevKZj+atCFeZyLrGeIt5fu3gNuc4PJZS6FIJSDmOXZk2ELwMeagII6phcfyFEob5r8Ho3yxzRY2Lbg+COK0sxHGTPcEebq5YOMoVrqYa53ucetUeMh3r1bOm4/kKIX2HW/RvdAVaWYjjIYiFXkj74qS78l/9CEUR2+J19NQhWRSzrTJDJsOCnElYjCFAt+8sBbC16A/qnpkhF9G6LOL/GxKu9vvj91HfeujqsTOvIB5t58JyxBeiHnQwn+moQrIpYy4lg58FAHQzqGm+BHko1aSiQxPsHc9GW/0NQGi9gnQqf96UW4MY/N5Yc5KazuNqSUhMkdSw44IqbpahkczvsFU8r8SRXVUmzP9dm2xVEDcXHp9F5455Ct5La3xUaYZl/04agNF7AJxQjONVRe22pOaRlGPB3EEADtAJ5HZClrqLdiNJniZxKXQqTD2bfCihlwk7p1CBFCbCLMlU4kWaFKSpBKQe/xTOoQrJ+K2JUTcZzbFMERWKV4Ada9AbpU1GQih8vO2vBI2Fvw3sJ3FJV5cY5Z9Ezsf5oRCmIOcfw5xHiQJuH9xlk+aLpOK3D20sHGQwLTkf5w+v0VTTVdtNriENGEKBa64sC2CDDzfWCMvJRbeGEDb7Cseeg6N4GsPodCHuFS1QNNDM7QuKaZ7zKW3/YpgiKxDfdDsY7s6nZQ+2BIXFNvV5lo7FnYe3nte6haSQx98jVc6v21R/GheGjZxpeBjzUBBDJLSg6uY8ssEACj+vAbLLy95AX1k8Rb6HTPOBzWfGpnuSqeE7WjHTNwAZuKhnVxztC2ocStBYccEXDNxWC5O2TIW2s45BBSTn2/H7F8SGGIjt8wLCUBCusFvv510U3mlJ+v3N8Py6jtoFoM+e42brSeMqpoyo0wi/+u+SBY8z+370NjllAJG6lpnBRxu9LhCrR5CK60GUnnFCM2RSIwhhgjO4xnqVJH3zaF9OU4SgTTJxgCUv0MnLV47Ob9hKlpKrXkcy72kPSb/0PNN4fPJRq0lBPW1RomV7ha9+fr2/qj3eUJkjqWHDdCSu/x+Vtcdl8Z93msv9PIdVJPCdrRjroYAORdntPr4bHH2ihPng11LmgtowRXwMMn9QUHdLJFlggAZg9j33dUySsZKpwP8wXUlTCyYmUjgK0Jj5edtafRsLeUHRvA1h9gARF2z2CknLx5WBYSgKbVgvz+65Ypz/83GKhWl5ObK1M6EupblXOH7jMCPl0eq6CslPBAhRM9/tHG58EKJjz6442BosnrfLv+3rtypf+jApevneOBRP099jPMCwlAcMri/eNkt38F1xVTfhlxX9GBS9f6vMwG6Ky9CSqaLfsu9YNhpmPDzUBBHVMAAAAAAAAAADxLjFNNNDM7HEFIr4GGCO1rygNmTDABcGX/VziXWk8ZRmkHMYzzJoVlYRBcvjHnrjcVDK3k3aEqZQ2wTokkM9YgCsT8zLI71nEQq45fO1PXPoc2O/jq42C8uWslU0pP9Fq2CPokHobfU0iSfg88EO2A8ud2Hn58z3eLS8nNtgmdCpDpB+JHuLfb5iZnRtsEzrUrUbNPfQ2+rs131AmmCXAlk/cqoE+bYXrQbBTfuWlxAVAunWLFghHpBrkO+e7RK/juMQp0GcXl4GZk7vun765rpqN0eyXVCHzVyzdkX5uMWOT19rir/jOR6IgEjfcUzijI0PeyQPuNXn8VsSompHmAbKASNxXUeASlvVk5Lfbe3X3GINRWXoS222VUr3OLjMenbsjHXQwj1INcpP90yLZ4gpEYQwwRnf+7uLStOrUJcow/e4ggAZ1YerKSkcBWhPnSv4UhyZOMCzIg7J78RmlFmTPWbP2gtyoEap8HnivWx1WJvtkjcOytz6RF99bzjTQX3zwarVvXf0lfwrNEycYV03I5nbFKp4HOaflLriqmlSGVT4PPNmjVv9IrqqSe36+dWUlrY4th30ObPn/28hBOx7MoxRQyplpE74w6YPoQK1REAmVbqccsbW2ui20NU5Eab3KTiWgBRWvUoHKD3HhdEWYy40OK/JZP5sxKqhjt++zim4ppPxja2qjoEwtSp09lesO5r8x46KRw5YVVL/VGBacju+by/URXWi8nU4oRrqHXxj6z3Qg0e38uLbiPr2wBzby8eNkroTZKc5libb+cLei9tpPclUOclPXXG1JKQTyOj1XQVmnCoBp6gssEI5J0HPFa7EaEYqrehk55P/XzQlaCw44rO/J+2A2WXn1SJK95pfWfzQix4kz4QUUvGHhwdm5dcm1StImYWDPG82AmkSS7Xj9hnGzzKsqiBqXk3LOv2Z/4dCI1tRbXZhalCfIEagFjD9V3mX1tDGWtQYZ90+WsdZwbkOFnR6Ly0PTNlqrioXM+j2E+ce/mcKV/P2iH9Wh3ktjD82z73Y7i0VtgD9Z+Hz3w4WyfHO+XzGRPJjjrGYzsEghv2FnTCa4+BgP+8mVxMEwyKqghiAQdhqYYFfzQiEBFqr2PHYMBlTMNS3bRcxmfZBCvPRalkvUA4Jo6KDD7zxvPae9ktJp/3O8KQriAgHtIoe33jTN6IWBj9kB7qfdYQWb1vonMhmgNVPVbxrodMzOyeoxJFwug/VUcDRVXaB75JnOJtKsVue+9/0WGFelBU44ag59pFJ0NtFb2Go4HN6f8sr3dWIxdwwysJqu2eJ5yNBd7xCRxgZ02xEQRqJRXlBFI1Ns5HKYAvzFDLz39bY8+nOhaIfNFx8DfSlBr9nyjb0/Xj60Wk87nYTu/jYbZ3FAPbjj0+cHYnEaOij58g/SSH68fHW0nnYndOXyk8frVlwY3PWeT0eLpAxu9E+prctSxpmBLZjax2B4iwbcbkadDvxl+Op1IexOMKX3IZ6OC1Ur7D9lvKV7a93QSWm68bdemZBM2+OU6lcUsgHR5upA9ruwwIJBKErdUPIEY7+PHf/o1/k7k8usuE2Mto5HfIbowd0bOZImjj98WqESCdYvyy89mKvbNcmuZxNpViv9X/UVweFsNs7igB1+su3485sX2pTTfbAN/gGHe8PsdguK2suEld/hU65EBaJHc7e0ELMShXt4PDKr3463cNBoElE7U2c5udLj5mVYTVficbJkaNeJx4/JhJclqTW7+n0a4QKLFTej36ZBiNDNXZvDeN56Ssgsmk2Az7dCd38bg722IHLSiDodM711XnotS6tqj0H02qtruxyV2ZBc/+f9jTG2g6pkIhGbOB/ArvuEQgIsSaD5CMZjAzrjpCivCASTiCat5Bw0GopTx65xIe535qhdxH9cSiWSnoy1OOmqVc3YYwY3eqna2OspoYroe7MnmJVu39pqNeSEFGt9nRmCUJSn1Bz6VaTobL/lyu3J6kLFnKNsNRwOb8F5UYHk3m+rv4n/8MUwGE0X1J1B6xWEBFiSHA1SUCjXOWHxeOwYDKiFapoFcQGO+BHNQJGifD7178wZrxUjn2Mp0jR0UO/5HrmQ4RtKB43Sd1m5Vh3l/GATMZEvH1otqZPAFlTctluiGRo+Ld4JimuZ64pm1x4PguP+jFGtt9VaCNdFM+UPiUH/fwLm3We9SFns4Giqul321S/CSCbj/0p1pWw5Bw2IrN34ZIZUjEaRpG/Rvr0mE1x8DLMPkwOPFTNKgtmEn8G/mmmcMguoVCD65PpSgkOv+QdnntTWz+loowi4Jf1YLESxR5t2kbxe3LO7x+phkEj+ZRYQY6YfgXryM0fVOGg0CaaTY8LOmExt7TAqn9/YbIHZHXseOwYDKmaUZmCJ6/vZ/YMKWY7mc3UgewdEmhQK/ElfLKilcbZZMjQfmG+KRbvC+zgapKBQs3LCVCOjrdgfrzoXJzwLi4a7bP6DJY3IabWiKHkCv9HJgPH1qUvWazg3r4iACnmyyroSVVBDEAg7DUzfNpQOB7nusgTRp85nkLLFYSQT//EltNwm8SuXxSwST4YII1GmLyis75NjL5k35ec1B7BSKTob5ucsMK5XCpxw01hgQa4UJeDeRXSz151MxJK6IoBAxWha8AsMpdyMJxy+Eofx9pxabvOeMX+x4NyGSV0RQCDsNC1pm0B+PxjNS9yjqdRq1RUoDR0U8nmJaSQAAAAAAAAAAFk+t1+hlsYeLk54FgsRa9htSuewWIh/juZf0BOHLj4Gem3bu9MOxOKsl/yJyq7xsQnMszweGdvhifPqxGLuGGR3cM9JqoetxlbFfsplV/bWA5U92m1s+5o2ko2IRFbgfB7rjzeVn2CNMdYXnE6qqSNvrDrX5cAmYkMEn6ZTmRRWq9NmncBSuO6vAsFTp8IKKzzLA243I8AHk8nCPZDhyizDO8ZeL27X00z/VjOXWCSeselOZDJdaqY34W01lHJCCnn45mG+Yj94UhTZBALHRBNILvH98MiWWxP2m8XsFgmpDogpKBTlkr5OGYtUKhB9cszAD8vrr+cbG0nIRCIrcD4lZBZNqEDp1SDGUT4f9PlmusMgP5EM6Kvy7dHCYcR+8IFMuUWs02Hzlf64lEo5IQVcnPAsFiLWrZcYZfP3cXjpvYe6K5vwofREQAWyWWVdCe11vkgkf7wLdZYSLhfP9Cq0SwkXhel6FZZrhU4nVdqf7uCDkkkTR5EyQypGI8ZSuahGW0etPkN0+LRfJBKxXoskF/bweGRLo/shYv5/3aURS7vMJ52kbcEBc+C90CSidiIgjFmivKCKj8SQbbg2803kuQ10OmZn6nFHteBwX0bvJ4LLKhUIsDnsBl719FsefSG1sYPP0FsQ2+czwGApXHefpzZyOUwBfs9VMhGGwxyB2HIOGg1Fp+07j5l6Pd+JWDr8ecft+ysu6aQZhkPvDs5fCc32e04tN09qa+n6NN8Etq3UcDihI/mNIk0KBX6qocliSLhcG/eo4/2XYDCaLrULKm5bo1GCDetCxOH+p1cilI1YKZodg3N/z5zIZLrUUaVbT7XUtypQCL9Tgc49eZdGptjV5C0E5dIrgPx+MIeWV7aed7VzVKA5aUQdgJfQtDMwyvvz4vDP4o533eC+jMNisS4lnElPRqbOcm+529HKQeJCwe7RTbp2Ay/0eqMPsEWyaKk6zeTMr38L6IRUnQgEg1SzwUaCY5JUNcLIDv7S7k438n/f+6cWejOSDGDxTfsSO1LqA+WESgyrU/27kAed6vY4D3iKGctI7FWPDLMqtZ3Estb+9+Dc28oi9PPsthHfWBNUmpxA4z/e31aKztOgwcgSQyLpwwela4FY+m0NdyeVebHh893ZsYt0QirABLjsLZ//q8KU9Kz4qC11kU97v2mx7ytoeMT2L69Iesfhds6AnMZ+XQxnEdiPkuTBTGJ7mdkkPe3+I0qlw9+2i1GQmx8VJi2/bU9m6gVLYry1GuLPWlKqaui+oFP70M4BSO1oCMDmYxTJQ/4WzRWoJxDNBJIxoGlw9ue8imyXzEywM3zoNfyzucBl3vJYfMeA81IhTt5BMrtQlfFeQ5D0k9+HCDliXdLg8UExPBr7i2avkXIK8FGyEbxHfUJ+1O6lcy47TO72474lgmJ4NOsLzEOcA+PdeOckyCh3MorZhn35FLUZReJDsPJXSw+I9+uX4oi2+piapJQ6GcTwaMsWhYZQ7mQJrxH6733zF9XATqukelZ8VJi0xqm2u/uAT0IYjjzCK887xc0L0EM26qo5dxPwL6wb7DMTLCUG26fw00iN1+Zda/LDGh5eubIWH/gg9YQuBlDEbg+fcWvrHZ6EMAGpM3WMqzFe1D/kFP2ieSJlJ8nxcB7wCTJzpMHKcKdxvpQYS6bnaz0OQNgp/4wUyH4PvsP6x3Z0yzYWqWNKapVyjxORGcJe+Tf1Re1NWuo/nugCSZZQujh7ZDfnvQtYLiLmVZ+J4FPiYYCtUuMFKI38bcVaI+NLmTXeFOD1GtCtCcY5BXimWYZeltdhcQlIfLHi1ss6IRVgAgHpFeV3n67RrbAhP2p33LeYgLduuaGmq12fjSSGRM+b/V5FNsVmJljxxrn+m6y9/erNY0G+mXnE76ciFwhAVXZRB3Hs2I5UPsK6UctnHwQ9CtSCrHGvWHn+eHoEXNrJNrI4rzOOBJrtvYZsyUly7iZhXabrvYECkDKV/dCLLBcR+DQEYHO/CurzCZMpdY/8QhyusT59z6k0uiMHSBGIgysk785Ch0zmXA5X1h+w6doas9G61vmbNDzAdXsciTxFgitRDbhAOpKXXHaYwfHbYUo+DQEY1eaMtNYPSI6FXLTPrpYeDfPLM9k6jlWrFKAO10IXAyhiN4nBg4tt0ZyUYpKJX+997Ts668/LuOZOSjFJBkx+ZC9lw9w9Kz4qTFpj2lvT80CpIQxHtHTRV6FhWTGsWTTaHehyZm7jZRF693ZbyG7TZxawXESbpohcIB1JxbkFOHqINGxFExByxLq53f+/SUYep1GvmdUpd7wc4FuhsPeF5GAn21JUbTC6bld4jDBa1wdlD1auyYfGgmEv8pWlq4lE9fvFcX7VKOdZ8kTKjdy7zix9uIiqFUq+Mo2xuh5hm+mT7OiLCfK9nugTtxd0AapLKF0csyGFjxQxlcruSMOBhBOY0bj8t1DTsvmIiTmoapmNHOG5H4iODORzRlp4mVaDdpeHFgLPKtfuI0G/hccTtbPxoU7/kW/hK0Vn53waAjC30QV1DJj8yF7Km6Wj5/cg2p4GrWpgMaK7sfQ4lz50lH7X0mAs9GY5GMD/ml9Qp/NoZ44kNNmDtKRJ1M1orxt1VZK1h388PQIubeobq/xfW0USH2sNcektKVU1dN/99RBtTwPYCBuoe5+MGcbbfqGjrAmBu7vKEq1mFy36eXBDZgEIKccXkyZ3e/9fnAAAAAAAAAAA6yR2pMkG1xVyTdQvBzjfb7dS7mU43bZfN/+8hj31O6OO+oT8tcFX5unrXHMnJZaqGwvavyU1xDmG4SyHKk1OIJlpoovOPgh6+vsut52cS1UFakFWttksslo65qXevqKWIqOwJqgpJYBTyFs7Nq0VgbEekAEXuHWDxR86Sj/laTDgGeHtzzYhveyBHSWR/LoYRFt9TE1SSh2o2mBp3K7wBVj1zHIwneMp1MBiWWt/9XDOIq0DOdWfmFkc2ZdHAk34i5DFqgMYe1T2Y9J/w1bQ8NhYnpE1tW7VNTCWUdPWehwS+WchzSZzLtKMHD1EGjasSSqUYWQHf2ktHXPcb19RS28KcPQNaNiKYLSzDsoerEHTZQnYM4WYfQs9l0kGMPaonszJCpbEZXeiDuLFrQGofOSatV4OcKPepEKcoYJka6Dal7RG25Yvaszth9TX9t4nKrgYXTelPEafJdzv4VvLpsGcbvn+o+tTp2SjkxvYhM4v0lkLgXwQ9FaiGm2AdDkz5XOgu3nvDQ8VXAygldweI2wsT8aU1DfkEDZN9iMFMpHdMt/Hg2xCZwMmPzKZvO9uZvjNauV7b52MNa4rW+IWWTGzwuISkPh/k70gJ7+RUANpRg6QIg0bVimeJ2+uGdMoY5KMPFOiQy9wgv746Rue0LxveSw+7UD3TEDVN9LeU9t16L+uX8KyYk2pwNKlQf0KTo//4Dz9EmQmIOSVaW+n4+Hw9Ai4qY9s0aojD92m2cLH0BCd0cYoj4p50E90h9WFRpRXm6NxC6I4QX98+oNPaB1HpNsKUAflIGya8UYKZD+hKN33NL1HEoFERwZytyMt8uCGzAIQUpMYLeWNvIkrV8qh+bD4kx37a4kkR8wuWun53RGFBCCkO0vlvraKJD7WVYQlXxnI1l07Z0BOYz+gBqaNtnZsRyof94rHmrTJfiHDU0QuEICq7JpPnblXgucUBbp7yCybMiAxpUZl+LZeT7G2Ufd1R/TUi/oNhXukZoKFqWxaoWqYu5kPrvkI63nJoV43okf0pi12hX3NXSd0HvjFC4AKGCC8vmXcsgH3orRmbRuYb5Qm50zJIb9TxOZIlUEKD5PZykIgzcyqZHuk70KaQGCJChhxDE6k9psys4vM2jYt3jVM05bcI7x8Wy+pwwm7aKqFGrPSYTGnNkjgEwIdxSlB/E2yzVrat3BL5IqneWXZhO1x5jI4b9YXNLuk6C1t1TirckVcIUfqYXe0sV2hq3DPCRzorJB/znK4vf9XyF39lyJ4qKTkTGprb5QNOFGZW08f3+RiV4zK7XG8ntmIK7DAHSwKkXudXRE8UDuiwx4RqHZDxuRjySOjmcHO9xaGxX6odtyHtKlz4JbVCa8NVn2dOlgUtAwqP1ncxvQ2AviEldEh3dPh3T2YNkhK+UXnGqRmiOV1GFR+sqWR9ZNmWHRQwB2JnqgQGGWMBltPVAgMvEYDoy0DhMZRN7893DJQeOyGHirqMKj8eVc/9yFNIDDKBQy2ZfAyK4AWwwxpvpbdGyRwh9uV7pmB4WG40fwYFNnKBfiCDtK7zA3nKWPXYFBDDxTHO8yw6KCdOg+OQHZNVz9UojnRdcHhYXe9EvWjfHNPH0urN8EvH9/CbVZIsWc5XNDxbATtFTe/QqftlxYdFDBAZX1sZ9qrcrgH7Bf6h7pO6Dzfr3nLAwT7wXM/BgVxvEY+eNYcEofpiifQfPSOd7StobnCYlNskN0m4kSbWGCAFgWPwJrX+UH8+/rYzqlL5G0Oo0PyiwYI65+bEmvQSRc0e5qSh0rnaZwiGwF8QsTmnuA6TFxyDuOSVktun14+o5naa6NT9FrYPTXn/uCQTBskJSLQCYMlh+ldhCmAwA8UMOLGs8Cghh4okwh0M6QZ1ynyNB89rdQtbG/uCj+u+7Kljkruc8SQ3TGDqrcttbGhajSpKgQGXiOP33tLNaFoa2/MaiO/bvSmlWwZHLlrhRrTUlXVmNTW3jUayWBN5fKufvMcpsKjqYHhct4vlVGtelOYMCWq/1bI9hYVUh2dHihg2VBv4xz6RQc6GJxV8StkewsBgOyarn6oWXzsi0AFDBBeI1DlGYv5QQTvitM0VcwN1wenvuFtZ3+S5eMluQ3naZdaBhWRom5jerYR7xYYIItGCfTfPrepgaseuweK6H2swLeRA4y2XiMfD9ONRXSwVmBn7fcCweqOvrpfS+CDEjjN48R3ws7+vlwNzkhsNUwb0oxds2QWwxkQJuqe0adicyQDnSmz74Ll658o/ILL8q4CqKronPBdJ4ZDGqz6J3SwKM9HH54xt6k4WBvQuOOSLsi8eBmbQAvvBpD7cce/QvhiHzvrEEYDBJloPnpHtVrY3piPQmOmldGQ2AjHKm5jhFMGJ1J7wxnXy+uwRGbXKZeu5n4MCuJljHwU0vEHsFbIgHEiwywwQAuMinrhH9Xaztug3ts46YoOdK0Qk1TcxhWmC+kaF/ZVzBmN3V/+uL2xSb/lMCiviQrt1lum9bStemp5VvCIKZcifhDoZlUys1L5DlNh39rO/jnOx/MEn8kBYf9itWFnf18ul1zPJtIlh/BR7w+GVDuvYy8eQe8Qy/KPUnImNbu5SoiujbrnM0TwTUEHadNmiP2as6uU3jS7uWaAExeSjfGqm6VkoPDFETxU8THUvr2xoRd/caLz6o71tUCHhUnI9lXDfvFOaUTwXezURmPc9VE32PKs/Q1SM0T8AAAAAAAAAABfvG5ZjvVRWhbPNC7xqoUysDa9bds5XI0TdU/m3TG3Ervfp3otbJCUiefIrDpYKzA8aw4JzfpFncSuBYnH4mUhSXNad39f1GjK/WRWHSybGNoVAgMvn8nhiGckNpQmg2k3ghQeO6+JhJy11TEkcEvp19tKbxrT0jOm+YlDKpPZv501OauKDuOwU/LKrxXH4tFuGSg8dkMPFT3r4pNjhO3EXjyCwyCL+QMzuINMuUoT/WRw3rEuaGtVNZ/RN3pTxDZhyqV5AvNZdQQ6l1KC5Zp5/X9wSCaDEpzFLukTaZzNeCi5/w59rI0dVFV0TnignUPLfYjMs1IzQUS9EhtKE8+6TUnNJf26ThE+dssgjAYILz/2J7oieKB2wolX8gT7supFPf6B5G1n45TB5pU9p2IbLINoXP9JF2TzLBGX/E3spSsk1r2SLmj2sit4RJrFET9I87bt0SF8MS6erXW+tVrWF0/YtF/ULWtO1OSWEjir+pLmtO7+vrXQRqDXMgvvgghHIDuopZEqUST3W/jmnj6W8LE4JBPPCU7+4ln7yQH3dydqcksJHNt9vfj1Ae51R19ZmzwiTeyGkW2EAY+Zwer+dJi45BzbOazgWV5xIXxbtyqkOic8UMCv9QtD7D9UO26Djj4hYnNPcMCUkttFB/9Ycr/qn9/C7mcRaIrPnM36oBqBkNhqmDa5esvZO8YVx5XHMyw6KGCAyoY0RelO6H1Q9pZqX9DW3oXprYFPltXaHHCiL7aePqPVCmn2jVgrZEC4Qo7Jwu51f2BKSeOsjfEsW4b5CwwQyyPh2bLrjwLz7ik5E5TT0iVEyOChf1zQ1qq1jMal96JurYGT+wgjjwLC1caPRlsvn4H8/5zSiP26xXcFkVfzWdxHHSYuOQf/SSv7WCIz5ZrFV92yvOJC+LZzJXe3Ykjgls9vmcSm2D2nTMEUfkHreVcB9IuvdpEqkzc+8p0kmywKGenhYyK2+GIvVTaZQEd1f3qfTVbVpHsLM4IlZ0ZqoRdMuPUFfesIL7LMSMEL9EdfUzcwiNQnXew6lo9DJRgK7RAXPSMs9wFhUa5O0J+Ub8wT/UtHQcRTmHMbWz8N2ZM3ZS/8sJZ7ZEBS4CN20gqJhAyjrjpwMpsY10GcvSM13oUm+v6/EVt8MZkDlwdPhaqbDcWK1PtINrlwvsYL4/xBBKge/zbcS3CHchMf3DPthFO2CETjPjQXZNMP8RtuqzjNOWQ1Hwp3YbhaO1aU9QnPug4whXCEuHJF0Eevs70il6488rpcL29rVUp0vcR2H09w4c/fxkRx7cRe5hB4TB3ArxZ6yinWPBE/KC3tQRd2qFmvrF8hHpmj1e7UhPlJqH7zOzzjbKWW4BPk0SDwmDqdQyxrxARk3Fl1Y2nV9eXRlWyemulfBDaYuyTJ7MjaZqTvRNaVCMilsurGxAwiNcBQO4A4wZO6jGUhAxzux11GvJ6P0zEBGTdRWtHY4uVohuylD7E3EI1XecmRcJ87aQXKQgZP61CDFoDK7+xFavMkG9I4WNZzr+GBq74kL1Tnytm/jAIR8YENzBn9kLxNuw9DxgqVGERqnaB2HaG/y/E/VwEqK95PiWHhcrUnuFOoT3MkgbCx5kPfH0thGMw4Qlw5rGjSt/fXvzfYITEDhkowFMcgFKokY3Kr+lxuYA21TrrFdDlHZXQEA6PzCcIV8Lxx5iMqWLlH6YfwRXtM3xi0d73Ylwm165Bsb+BzCDwmgGDZC/7cQA5B+QN+KElIxuRL6bhyjsroCAZb+wYzDp4XSSsaWVCFYWnnKU665PT85sQ2T8p7z5XjDnRJfX/RhqM+lsJSg2EQ2FrWkE36oQIbTNMSkTq7dYclRPrdRuy5FA8VGD1lmmsehpEUwj8sq9cZEJrXE/4GLdRoNtCmBlay+8HcIhxaed2QlJbv0m28obFJNQ537aAjXk/Jy/05W2to9rkN4OrvpvTUxAQi/x8ahTLn+Wm4Xt7WqpR/biAHrvKPPzrQYjuBqTj+ZiTui3qtoae2gujdyFZge6eMxW8oHiowx5slekX6oI1bQXTgZCsws19ji/9+rgJUS8mvnAwF+AjOWTCK+YtGro/FjanMVcOIgDSWx2dtDrHzPKrh5w3XurtiAjJuorS/1QIPhyAYccudXKdUqbcSzoQWadh96DxWimGEeF62c59CC7pssHQeK/EtW2Dqwc5Hdqw19xKDaRwsa7fZ/s7bX/zNsY9MNRqDH3nAEsMWBYLwq62uYqdMt+GlgByC7wb8Z6IYRfLLI1dRFGZfXfBNnb9A/S10J4ZYoDk9P7cxg9oFpAnRkuOwF6n7KM8LQGX5JamiKUK/PXzbdeInA0Y+ArMm4QxatdBs55aOgpWmLea5c/OzY26tQt9XHTgZwwzl7lSbcinXy8USmSr9ZeLRRvjvTpBWsChktwQeE0Aw4ovALt0q2tUJZ5MrSvSK6V0Hb+b7e8bcR4Qjmqy3VfYWZkAaS+29uAfWSF6o04mvYwWkG8IgrbSxPXU7MriXKfIRmX5YS7MyICkdaDGTztocf/9atsDJn4GOFrvV4n9n46GlnTTuJdIzzZj4roU7VKLZbfcK+ssQXnl5XS6ZubukJY5De2dEM0F4AYb2zohmgvDr8JKjuzR70rzX+mLxjR1VrdnX0BHFVx4L0+Rxsb3/3qpsL4CO6v70XuV9MfbIgKT1D6R/8ET8oBrdycNR9bWV6nZkbTNS+SIAAAAAAAAAAIWQnxb1jr6mRilFc6rxLMwKVRK/Odt9Lnjb2Fcx3SbVKc++CGwta0ghi102WDoPmxUs0q36zXisg6ORiOLHlbzDudplX3+Sap7LoBssHYnDB7X4UJ8vqep+6NbJJpQNzza2fhqvO27KhgeYWXAkJav7eEnf0xqzaUx8V8yTKlHi2WQTpg6KJ/8mPqVmxxWmcWxx/DRDdtyJSk9ZUoRjevja8xTpiyC88lcnaMFKuWaHEIjbfGguyLuIcHX5U3pqYi56RljzAsKiYZEW2+WCCE2ofd4BgybnCdzAGnecaZfo7cOcPax9UMimCjOhoHiowMGoK+RSs4uXP3Rr6hNKiOmiKMy+uv2aJ6vq2U4GjHwE9IlSsXgiflBc9Iyw+wSZWWAX4BVt5Iq9RDi08qc9NTGMUormSf9YhbUV75JN/Pt2DGYcIS6SVjS0kxlcxZp5hpzaUZoh0ZA+MpSBBbW+XC0ZSs6M1F8umEONTKI4Epzbm2+pyr7+OdSBsmAJ7wuMQd7R6/aRpY4VTm2mTZ7mSB9UsG+OzxP9iknYXh0ByeH1r8gmURwJTuP2mKMwde5nrVrHgi7sTbJDjdR8KMGZ2nWJ9oM32xzoks3ON8V8Id2jUwWX3lA8VGBqQvKqVD/3k11yen5zYhup4jKHUwdFnfFWoZ4Pwt/kd8Yd07TNnCJ95Yd/A5hqNBuUnrKkFcb07WIGEZRgKJNAY4DnWuhOEbCL53K21tDxb1CSkJHVls9t6GeV7D6e4N98+SdIK1gUMshqPhTuwm20cRnNp42swPbkAYnNEAy265KtvDoCj9/3sqAXwtLTUpwgDav40FyNazSnj5ui93c347RxnY8jHwFFvkI8L1u3wfceVf79iOVdaFMDK1nz7m5ls+nE/wc6qncqwzma5evsh4Ful/hCp1sRDi2y4EhKSzMSd8s92N7dvVEMrHnrn6U1IXlVKpH1x4qwqWhG4GptQ8foC0vwszoIybNUaxYe5TnxwjXrqZC+wb7yN2YGx7IsIJIzYUVpqusBUjtvwyialGlTq5Nazt0nKDj2PhM0DosEVeyhK6BSd6GyxJeP+KKlUSLKE+VAhiJ2E1hi0/HN243f3gi3bP5dHhLInkoXig5WgWsDlphn7l95lTMD7Vmv7XSLq3jXHW2Sny35PlPu9dio+Lp5jCr2GbFpjjnPa5Xdry90kQTi7CqcgOCIZCfOXI/YgluV6sTg2Zk6xgJxRpnDpRcwdvk9GxUfUKKfQp7VBeorx1lGNGZaz9x/S5hhsftTKSNC98chwAgOhkEwhpPNFpb9e3SHJzGScTaxS9NEbIpjoXIbZpo16KZoDkrKtljyOVCaFqTl3k70Loq5N6dDXug/CNkTTmI54mx/loJ5Gjwt9nSIP27wCoMpFjyOWn5C/etlkVyq7kx5gd21GfI0eFrx6A0lXd3j7Zi9cFCJijKpnMysKMpFGdpOZlauWYgPTLMdIg2XmPo31tsmMvlo8LT/zRqgDwlkTyWFRfo61RdeJN5y9GxUfF2yRhVxPoD7/w9+IHhDzytz0qr6vRfqNq7fYrT9ERus0W+Sz0q6p9vHLWfgs0FrXa1J+tO8oxaySRSoixXRUAaK7PkU4nwd6+Me/EBP5Ix1m+2iI37c/RQbUix4TlBw8XwmaBzmlsrBWBXzvDXSpks7tIGngAz/Kf59/fYe2frD1bqksGwmY6ke9ZnRA8EZkTRAQ0H3rU3tafIFVM2dlkm2G9aryMO95+rbE2jRMYmfsCr7ZR0Y41Lh+ufx2jkjWu98psGhu/XgqO5PepE3eAXPmgseMThxYYC/jlvZ+DrL2zzlgAJ15RXTi4l+Ry0/IfD7vMYtlG63ho6jlbo8JI0hlC4J5yI2Rb/eOYP/ZP65AuQbscl3QWMNENlXw8sXIrWNTsyieuxxnK4MO5n+y1GkjBX7FGWsgm0nMyvhvQR6116/AXn3M6+UGWDFZy7JbEGjxHXCf+umUkaE82Tv0P1144c07Z5gBAdDrhj7jimTue8UTThFPrEMYlqBaXhIB0I1XBJIz0LOFKbunhysH9YGMS3Oe4LWukeS6budFBx7H4caB1YWuA3BHEouuEnBmPIfp3d8qRgByNmlBrE0jkh+wnOtQbINHph7OkR0YKtVo8+744TmKANFdvIKG4fRbYl6YXMP4n3v5F1SWIPN5rjKPb63DCNkftAdERl6Nio+oFkjhLYfQPPxiT8QddRX0UQEcdxFWNo0I3A1uNymEWWH/CBDjZtn08mrJtArC1yI7g4lF2/nejgqtdqQJpzEctnY/jFjxB5G+qjLibervHcWQvUvfR3khS8SbzmoxrowJDOboGAFB9fO6IjIj+6Cxhogr65XokSJJteAEfyl5yg2pFjwByvOu49LTL1Je75K820koTyv6Zu3aVV9EvqevQWntanowEuqW4Nr20JzFI+sO3kFkIOEgShRwSHlV9NQbFWw/XL/mWrLTz1hPtoMjmTi3APwhoNW5rlJ6QTq1yq7Cw/8F6S1E1lncGrjyOFvBNU2f/hPMAKNr1cMGEbI/L06IjJbgSD39sqRCNRvojHs6j6mM02UdFM0ByVYQDlmworSSb7W86eanyH1aMy0g6X+li3QhXUbV+ExWv7QAj3lL9GOSw5bXyDmrd8aMy3pbrGrTKPOEPV7ZcYEEI97qNYsPNerB6OhEHPY4WsNrRKRvtVs8vNmQzUywJcuVXcmss7g1AAAAAAAAAAAywKkdt6bUCnk4y/Ui556wnNLZe4shPdeblOGvM1+EK8BtPyE58vKP8/oc1xlkF/VNhO/2g/0wuYRO4csMef26C/hi6JVBSrr6XS3LrxIoeQKvFZBuJ2Xm7RqpeYiArZuROwmsMS7/4emkDtbJ6UDx39oAZD8meZHl6hKOqcajZzdEu3hYDfqfMVUJR3dDchOiMVMfZVr4xNNkWlgSGYrXbCAcsyZCbmStd5ZYsXJfFGBuAOtGbY3ybL1l9lKgjDsCwiqxV9WXaTxMn/SAXKD1q2YkZ54815jarlRlnZ1H1Mk6SFnClN3T7n9PRwV1G1IkvZhlPvaSF9aNdxzEQFbN97T9HBUd6k9wAoOs4HNDY27iNgJxl/kNhYQSZe+rLpVIbcKyVaTsoxZ9MXiJUEYdtXbXrULIfSZVdehnPVcCW+pcka0w/hRn4VS1IeivTg1VGNdGBKXw1Ajwu/chRg78p9h+W7MDJN5U0iTo53cj+1e3wtZqgpUy6wsbRqfOJRc1667oNiqfecqv6AMCcXvKNhMxk889y+/IAP2TbFYeLOnJMffwG7J+AafMj9ogIaCzClqzVHQHJQFXiuuXMDFw2Jw4sIdYwG2O4QnIDgiGcDS8JAOhGq4JFL8byd6F0XSxpU8jOlNiw/gCfj+MJV1PmVbLHmSKE0LmEo31UNH38Tqta6/iAjipZo/0sCQzFa6nKDg//hM0DhMJZXkr63hYt9nCPSzvGMCv2IPI31U68qTQp0QHBGCYAl9T9CM3dTajC+bVy5g7O9winx/GMS0Hzow26Tf6dP/QAbxmn+w8Htfa/fdTcGe9B9tBkcycW6P+fvMhmpknTMwjI3lZ3REZIlxsPlyoCks1hpHJD9ht9jv64UR1MgnZpYctr5A0UejqrNfJfe4Et52FU5AcEQynVE9drZOVwaT80eax9L5Cqibiy5EdwechSl+uZ09haxpfjfmLfx9QMN3byWk7pOeW+BFyFDdj7Wthu1bpxH/GVLpHQvZz2FrNTfgqyVuQI/7lgf2wDECWnoLAvXhFtI8nfPYSGv7UGUMYhz/J8QIdfV9QMtx+l/TSm2qZhbaopBin181SSPshOLshHw9xQfDswJaNmgEPOIFqL+ebE2sCxn6gIvi6b67lLW5nFJ3x0+jeNm8lfA5e8zjMuUM260mJMdPzhKTMnl+Fyns6y6nCavC1rn2mVTR+F2JjL+6uFUahZp2+xfditsb6FiGNi9/tfZBP4/xNs2K0xEPpbu341wKL+7VFMxNEegwEO3Nfxq5oedd5V9C1YHu3kpVwTshtvL1U1/5ThSADMG0bRiIdh684V/bZSmROy0l6JdacYHCcYF/HOLXpVQuUsXLXFMSS/n3pr7vnCgdnnIufSHy9W7OFw2bgdyn5g6bggUctJQbHnEvYjxJ1zMh5Fz6Qvn33MuOen+Lug9gjpiDGgEPtkZHTM8NjolbI6mShVhPsnqVjMK1cgUzVENC1bjphO/zpQEtGzQCHnGMV6Ziaq50GAv/GfwG49gTEjW6nU1qfG3+ydRMF4+G7WVQZSPmoC5SiAN3LVwGIpOJiwH0/gtpHsD42r2K7YJZkUxOOuyYW2e+sQ3wgn+/lqlqaSea1Pja4eeGidzT1f8ugS4aKx+lU9H7rZDW66DKGBrFQ7I0MQ45FgT33yy5eCemJBxpURifAnU1E8zqr3xeZPKln8hMTvokfSseSJ9fWttk1xirR0xIefSnofInCkAVc9qDKpvrrjSXhnloYhxyUUg40qIwIwTwr2U3/XL2hR0GAj46a0S6Z4WIw85u3XNmqJP3zHCs/9TSTim17anfOFYyFHDqamwHw0GMDlpKgyvLsi9WNbrNBLRs0Ah42QoG7lq4DEQ7DzshH0h2yPnlCVjDiRLu3pjRSznNv4sBWTl7KSBy9Bvgh8BAkxPhaN6tJumIR8qjn04UDIScZ4W71f9VHbfz2FOgykbRXVykDc1gIMeH/jRvhLdtzxXD+1fe/aD8oSHkzkuNe2CWAS09msZCrSmKLGQIddi9EPCvFLNXxup7g3SsTWMh2JpFFjLtqWcJxxmyP/dsJLvzKLwGxmLVJpEsCPI84l7EeJKzZrl4KD9vTzm9wIyPnp1oM/1PORewnnn0N1k94G+ywIwQ1oh4QbHRS9oZsm7uMhOdsLSUh2Z12T4vglk3dxmHwFiQ6ax4PUZhdfGCfgP/bIcJlF3AqDU+uH9FFvllirW5Jj+Vc5h+sCDvuFUzC21RSDEq5qkbVCvLQWMx5BPGFgR5QI+OgYDTEaDv81FhwyVQOtBmIvm9lXDViHbZog1LjUmlUzE1VzoMi+Fo02TfkcQh9BsJ5/UKL48SsJsPJMGhLdpJzCypWT3EH1w0Vj5Xpr9U0U82qFaLgq983+BD9kGa6momhclD+Lzl3L+01+kdK7J63d55nQUga0Q8rtbmq217rpHJ9hvoRT64aKx8rlFjEce2UyLjMqTSPBSRuamS0I+1mC4DEcfKcKxkKODJ1NiJW8KWD1X8xXZCPpDsje/Xb/BQft6ecmc9z0XweozC6kqgYFSUH1yxWBD7W7De/Zxe/qHjvJrGk27dS0rcgAPrdBgI+OixDdIUXsG3KIWaIii8n3NQFylEJwoGQk69zNOXKu30Mxwr9gWZd+QKZqiGJVAwKkqBLtbdio2gpwN3R8UV+HqXDpt7MCPqqWAaxXi346o6c/utpg+2mTEequWXAAAAAAAAAAAxDvGdYgS09CKTcaZE22RVDeyvWRqWB5JcpJeLuKYklhwrGQo4dTU2QaKVtYLNYCwyedzBZCYnfcGhlKqfdkJxE52AOybf0KGuUcTUQegwFtgT+kStZd/BrAvyvEXU0hMjvmqSRsUV2UnXTQiSPc84nQUDISfQZucvf97/Xk1jx6R+KgFVJH0HmbFv8S+ov+1GYdQ5jJcqr9/Qu8ijP5VC3KeWlKUdBsuwIOu2faHnJboPBWNpbao05PGkgNX3bKfEOONOlRDq95OegSQ7ZPL8je+uRgctJc8sCPOjWG/wTtelY3WzzzpWIMlHzkDnhlBD+KPdhvGCKVaLeV6sammHgAMBHx27Il31NhLT9xReAxifddowDew8lXDbnDcgyfO7Ih5Xa3PbuHL2UkDk9TbdRDviUYiryKriH/442bNXqP1Dym7n5PEXyqNhS4mkfuz+NOcy4cZinoN0LEMbmbHUzzoWr4PC1mqq5agESZDpHCYnHXZMo71fkcS3TD9YEPl8bdBF+EGixn8a/Rn+YzFPyPlXI42YnOmnCQddUwbujlX8VAKqSPoOSPpWPJAjvrRl376rylI/dmyHfSLYvOHuzE0784XgReO+u2mzYRVzPhDqrWcg/UMots6xDnHl3Cq9zETvZzfgt1I/FY6kErCNmJx0xS22zmGb61mZK5Rd6Ios78oJd29Mo71rjVt+N4TrRz2xy12JMMP7osKbSqB0nCgYFSXOF2toMxHy0MQ45F/Tute+hLcf/G7RWuX6gJs2zbARbF7+dymRhEdSCVjIopBwuVlgRghTEg66pgzBAToMBHx01ohpaR4KxtLaSWhz20l05utHUXqDiv30BZnJWkrNM7TiH5lgRslPwDSX8OarkujRy46iM1TH9WY4VvHZPuFwr3uuTWFr0nvCKuZ8krOaEDl6g3CryLMwS46YkL+WcodjCwKyW2fWB7b8bhXQMcOXzlU/5ha6WwGwBrUlqJut5ilucMhqH1Jdd9NDW24QNXBXPfoLZg77Khf8lat2Mnqel2NL9kutnWRiRYv18YMMrtvD90jFyPVCZpEx/5UEShzcSLDLiSli3zz4uGawueII6TDBNaFPs/BhGnZ8jSYF8hwWATbWtxki/sxUnjcIlDilkH2LC12jjlgD1JxaW8yc6m88vO2uJG07c//l0rh+D94i7c5eVKuxyoGF7B3n+I/oBWG5rV4ahwE1oIwvKtvWZc7MdleAtaeC9YNYPtyKLu3kez/J2Vw1Br7nD4O+ER1sTgXupgO5CVk2dBAQPIG0gJ/eXSxptgJ9DHdKOZCA19XIeVMJ1B4WSHQGtM3WOxgmUF5f+Z3C9JsCmOic0FQKlDy2f7yoS3+JHxfFcj0ds7eN8qZ4qm5x5ztPLhQz5pmgcWcNhPIb5FRiB4KY3zMntNIPL/BJ3OLTdp5c22xgGZZW63pkh0ayB4tHgzLNI1mNy63PHqSVW/DH2oXpoUNAG51Gtf2Spdm77CG4yBOMeQ4Ljhsu4AuabXulYvhXEriTt/H86yj+2AvqlJ1WSmXrikDqTGyZiOhHSigjRTWJixIdjy2r2MAyMazL9Loukcq5hny9eWC+Pe+OJjoMEal3YC/W8MtQ4a0WyTUn6uIulANf/YkoZtEvXeLOGv8bGEGrm/OQn5M53oz+DUOWRyfIxIoL91JFAsaqrlMcm5xe86wQtBNPovpJQqsypT8WWmLlURIrx0FI2nbm49eSSEDl5GSyp9NyrkPWl4TaIztyoQXhGoakigSRSUGmOLS2hSXJ3nhl3eq6rKbPgAIKl3PCULa9iMKE/7tevTOTi6DfRyyPak4q72y3TZUcMkJ5g3IqMY1Bc/fN/784m7IHTAr5OCwCbIpqDwskOgNab9rlPF+Ikx/Gi5iWflOKw0T/WccaqOY54vzgzkOekimiDN4kedjNQBnon6LI69jp9Ea7z/OYJwxDs1M+IoTkVdgvDc2OlFBGUQZvErJs6CDnOVeva8VCbQgezlpAwW+gOxk9T8W/q3t/5mSI3xdNQg6YFO9wWATYgTeshXw518axczJE4YWoIWlcP4lvEfhn9s8GV+Pv9SQaq/J20Clj1S2jZk51uR5eAom9mBB30iiQwf199BNgjzxVN7b9k6kXqhIQfjkZouAGhtq1MJlreNqmsFWe44Juw04v91YIWodtU1ikT/9BN/xYdZWzWUisfKUJXMfV9n77FH9si3VKwL/rJquR3az5aJbvxWekkXPKmjHhHnxcM7vkQYaxMxWpDdt5O2iav+RwtKArp/ogjuR6OntzB/lRjOzVvhSjaCLu7Um5I7FE2Rdwi024s9wxYIghnydl/tOz+o/c8fJ6CZELLTH8pgmbD1LEo3jtbcxQzL9eutmBNGvVghF/ZipPlM6aUNT92d8rJbz7RSB1JmfEK2YfSfy/SSQg/HIyWd0DQ23UGMK7PB9uRRf4crORoIVjvGmvH2jUPqS67ruGtgHK0EwItWkUrJTKywmAyZhUw9hzmjc4ZCb+xcAtusrC3qnXeL4NOz4ED2ctIO65UOWw6jd7spBF8wqxNsu0JWBiAZwHNxIs++hrkwwTKC+hzBzrVC7lN0tTj9KKohs6CBthIjrYnArBNsJEdK0lFJ96I9Pp90ydBr4h9ueZaMXtz1+GgDYnjHf3BdYb61qcME0rR9FS3OCNX557/cI07Pgkd3hYPc0Y6oZ7pnxEFdWqTOGXnVppiZkAAAAAAAAAAOxk9CEzxpbxtXxVacFrEXHBx5JvRn+Ir2VNlv4PPi6XFfk21ajEDhm4pyxSqfGulalRfaoh2xncWNJxBPoY7pRZGKFI8q2HgFzdFina9lfEgnTBUWT7bPrR+xPbxuBW8n1v2RDPYJ9qtj84vdmpqk09n+f69SbAA3S7xwaHFJne32MHNLa4Uio60+0DzQrCb/reryCDwCPUwA1CI07K4buFOMuoXNdulsQCJQ5uJFjrR7w0EwJqXQWv16cfEUJypJeN94TMP2LjuW38HqFEx4Ehss85FZbIrjGOTo2VCRbzzpVWzD6S5WM4WlCb3X0QRzWBKaC156+j5vOH42NwK3ngdV1WU+lAAXvpA6X/+fQSErU8LJDoDHUzB/MVhX7E24+vuGoMYdMe2eXdgYYhOVJ3+KrSn9Yi4iW9qBQ1eHH+dXEXSo+h8MoTf+xgmF1lYTBEnsGdvH/npUDU3UH0zyzcIGrgrnrpFluRHNDi2lWosjBfkPlHEx00S/nsvVLGt10XxmXSQz7QGCJP7sBesf2eWemShEtkV5pWjr+kpd0Ho8YOaHFtpFR+LLTE16IkVoexdjBMoLy+QTrupjLzNn2ZFeNrvGdmO0DwPuo6Rl9pHC0ow+CwCK1OaCoFSh5bsQXFt2EoW9BE4b+NGltcKRXywGF6wwFMdLf16PHRHMNZY8tMSz+nRe+dGoRGnInfa+M2MIJLK/s91fR09uYO76L1jGuD+y1OGEZ25F8K3zQRIHgfdR0jobq9Ypszgap+0a4dd1MZ9xuw/tHIDaMumoRVCQg/koJRcCmsAWNVV6cOp8lpRVGDHQSOZWgmBNS6ChH2UfiIKrdJ133JbvZ5PYrvJ5n1KwQtzUju8LB6hzDJIvGi7Q1Uc5JhQvHTL9CXx0pnTShq8OLhgP18yXSMvtJxfnBnr09JmpOCkKns0duziOOykzRN0XInNBWMJQ+j1g"));function h(e,t){return e[t>>2]>>((3&t)<<3)&255}function p(e,t){for(var r,n,o=0,i=0;i<16;i++)r=(65535&e[i])+(65535&t[i])+(o||0),n=(e[i]>>>16)+(t[i]>>>16)+(r>>>16),e[i]=65535&r|n<<16,o=n>>>16}function d(e){return new Int32Array(e.buffer,e.byteOffset,16)}function y(e,t){for(var r=0;r<16;r++)e[r]=t[r]}function g(){return new Int32Array(16)}function m(e,t){for(var r=0;r<16;r++)e[r]=e[r]^t[r]}var b=g();function i(e,t){y(b,e),m(b,t);for(var r=0;r<8;r++){var n,o,i=h(b,r)<<1;n=l[i],o=l[i+1];for(var s=1;s<8;s++)i=(s<<9)+(h(b,(s<<3)+r)<<1),n^=l[i],o^=l[i+1];e[r<<1]=n,e[1+(r<<1)]=o}}var s=g(),v=g();function w(e,t,r){var n;for(y(s,e),i(s,t),y(v,s),i(s,r),n=0;n<11;n++)i(v,o[n]),i(s,v);i(v,o[11]),m(s,v),m(e,s),m(e,r)}function _(e){var t=d(e);w(f,c,t),p(c,r),p(u,t)}return function(e){u=g(),c=g(),f=g();for(var t=0;t<16;t++)256===this.bitLength&&(f[t]=16843009);var r,n=new Uint8Array(B(e)),o=n.length,i=o%64,s=(o-i)/64;for(t=0;t<s;t++)_.call(this,new Uint8Array(n.buffer,64*t,64));if(function(e){var t=e.length;if(!(63<t)){var r=new Int32Array(16);r[0]=t<<3;for(var n=new Uint8Array(64),o=0;o<t;o++)n[o]=e[o];n[t]=1;var i=d(n),s=d(r);w(f,c,i),p(c,s),p(u,i),w(f,a,c),w(f,a,u)}}.call(this,new Uint8Array(n.buffer,64*s,i)),256===this.bitLength){r=new Int32Array(8);for(t=0;t<8;t++)r[t]=f[8+t]}else{r=new Int32Array(16);for(t=0;t<16;t++)r[t]=f[t]}return"SC"===this.procreator||"VN"===this.procreator?x(r.buffer):r.buffer}}(),F=(g=new Uint8Array([0,255,0,255,0,255,0,255,255,0,255,0,255,0,255,0,0,255,255,0,255,0,0,255,255,0,0,0,255,255,0,255]),function(e){p=new Uint8Array(32),d=new Uint8Array(32),y=new Uint8Array(32),h=new Array(4);for(var t=0;t<4;t++)h[t]=new Uint8Array(32);O(g,0,h[2],0,g.length);var r=new Uint8Array(B(e)),n=r.length,o=n%32,i=(n-o)/32;for(t=0;t<i;t++){var s=new Uint8Array(r.buffer,32*t,32);w.call(this,s),v.call(this,s,0)}if(0<o){s=new Uint8Array(r.buffer,32*i);var a=new Uint8Array(32);O(s,0,a,0,o),w.call(this,a),v.call(this,a,0)}for(var u=new Uint8Array(32),c=8*n,f=0;0<c;)u[f++]=255&c,c=Math.floor(c/256);v.call(this,u,0),v.call(this,y,0);var l=p.buffer;return"SC"===this.procreator&&(l=x(l)),l});function f(e){for(var t=new Uint8Array(32),r=0;r<8;r++)t[4*r]=e[r],t[1+4*r]=e[8+r],t[2+4*r]=e[16+r],t[3+4*r]=e[24+r];return t}function l(e){for(var t=new Uint8Array(8),r=0;r<8;r++)t[r]=e[r]^e[r+8];return O(e,8,e,0,24),O(t,0,e,24,8),e}function m(e){var t=new Uint16Array(e.buffer,0,16),r=t[0]^t[1]^t[2]^t[3]^t[12]^t[15];O(t,1,t,0,15),t[15]=r}function b(e,t,r,n,o){var i=new Uint8Array(8);O(n,o,i,0,8),O(new Uint8Array(this.cipher.encrypt(e,i)),0,t,r,8)}function v(e,t){var r=new Uint8Array(32),n=new Uint8Array(32),o=new Uint8Array(32),i=new Uint8Array(32);O(e,t,d,0,32),O(p,0,n,0,32),O(d,0,o,0,32);for(var s=0;s<32;s++)i[s]=n[s]^o[s];b.call(this,f(i),r,0,p,0);for(var a=1;a<4;a++){var u=l(n);for(s=0;s<32;s++)n[s]=u[s]^h[a][s];o=l(l(o));for(s=0;s<32;s++)i[s]=n[s]^o[s];b.call(this,f(i),r,8*a,p,8*a)}for(var c=0;c<12;c++)m(r);for(c=0;c<32;c++)r[c]=r[c]^d[c];m(r);for(c=0;c<32;c++)r[c]=p[c]^r[c];for(c=0;c<61;c++)m(r);O(r,0,p,0,p.length)}function w(e){for(var t=0,r=0;r<y.length;r++){var n=(255&y[r])+(255&e[r])+t;t=(y[r]=n)>>>8}}var _,C,a=(C=new Uint32Array(80),function(e){var t,r=new Uint8Array(B(e)),n=r.length,o=n+9;o%64&&(o+=64-o%64),(_=new Uint32Array(5))[0]=1732584193,_[1]=4023233417,_[2]=2562383102,_[3]=271733878,_[4]=3285377520;for(var i=0;i<o;i+=64){for(var s=0;s<64;s++){var a=0,u=i+s;if(u<n)a=r[u];else if(u===n)a=128;else{var c=o-u-1;0<=c&&c<4&&(a=n<<3>>>8*c&255)}s%4==0?C[s>>2]=a<<24:C[s>>2]|=a<<8*(3-s%4)}for(s=16;s<80;s++){var f=C[s-3]^C[s-8]^C[s-14]^C[s-16];C[s]=f<<1|f>>>31}j(_,C)}for(s=0;s<5;s++)_[s]=(255&(t=_[s]))<<24|(65280&t)<<8|t>>8&65280|t>>24&255;return _.buffer});function u(e,t,r,n,o){return o+t+r+n+(e<<5|e>>>27)>>>0}function c(e,t,r,n,o,i){return u(e,o,i,1518500249,n^t&(r^n))}function S(e,t,r,n,o,i){return u(e,o,i,1859775393,t^r^n)}function k(e,t,r,n,o,i){return u(e,o,i,2400959708,t&r|n&(t|r))}function E(e,t,r,n,o,i){return u(e,o,i,3395469782,t^r^n)}function j(e,t){for(var r=e[0],n=e[1],o=e[2],i=e[3],s=e[4],a=c,u=0;u<80;u+=5)20===u?a=S:40===u?a=k:60===u&&(a=E),s=a(r,n,o,i,s,t[u]),i=a(s,r,n=(n<<30|n>>>2)>>>0,o,i,t[u+1]),o=a(i,s,r=(r<<30|r>>>2)>>>0,n,o,t[u+2]),n=a(o,i,s=(s<<30|s>>>2)>>>0,r,n,t[u+3]),r=a(n,o,i=(i<<30|i>>>2)>>>0,s,r,t[u+4]),o=(o<<30|o>>>2)>>>0;e[0]+=r,e[1]+=n,e[2]+=o,e[3]+=i,e[4]+=s}function T(e,t){var r=this.digest===F?32:64,n=this.bitLength/8,o=B(e),i=B(t);if(o.byteLength===r)s=new Uint8Array(o);else{var s=new Uint8Array(r);o.byteLength>r?s.set(new Uint8Array(this.digest(o))):s.set(new Uint8Array(o))}for(var a=new Uint8Array(r+i.byteLength),u=new Uint8Array(r+n),c=0;c<r;c++)a[c]=54^s[c],u[c]=92^s[c];return a.set(new Uint8Array(i),r),u.set(new Uint8Array(this.digest(a)),r),this.digest(u)}function D(e,t,r){var n=new Uint8Array(this.sign(e,r)),o=new Uint8Array(t);if(n.length!==o.length)return!1;for(var i=0,s=n.length;i<s;i++)if(n[i]!==o[i])return!1;return!0}function K(){return function(e){var t=(n=n||o.GostRandom)?new(n||o.GostRandom):i;if(t.getRandomValues){var r=new Uint8Array(Math.ceil(e/8));return t.getRandomValues(r),r}throw new s("Random generator not found")}(this.bitLength).buffer}function I(e,t){if(0<t%8)throw new P("Length must multiple of 8");for(var r=this.bitLength/8,n=this.digest===F?32:64,o=t/8,i=this.iterations,s=this.diversifier,a=new Uint8Array(n),u=0;u<n;u++)a[u]=s;var c=new Uint8Array(B(this.salt)),f=c.length,l=n*Math.ceil(f/n),h=new Uint8Array(l);for(u=0;u<l;u++)h[u]=c[u%f];var p=new Uint8Array(B(e)),d=p.length,y=n*Math.ceil(d/n),g=new Uint8Array(y);for(u=0;u<y;u++)g[u]=p[u%d];var m=new Uint8Array(l+y);O(h,0,m,0,l),O(g,0,m,l,y);var b=Math.ceil(o/r),v=new Uint8Array(b*r);for(u=0;u<b;u++){var w=new Uint8Array(n+l+y);O(a,0,w,0,n),O(m,0,w,n,l+y);for(var _=0;_<i;_++)w=new Uint8Array(this.digest(w));O(w,0,v,u*r,r);var x=new Uint8Array(n);for(_=0;_<n;_++)x[_]=w[_%r];var A=(l+y)/n;for(_=0;_<A;_++)for(var C,S=1,k=n-1;0<=k;--k)S=(C=m[n*_+k]+x[k]+S)>>>8,m[n*_+k]=255&C}var E=new Uint8Array(o);return O(v,0,E,0,o),E.buffer}function R(e,t){if(0<t%8)throw new P("Length must be multiple of 8");var r,n=t/8,o=new Uint8Array(B(this.context)),i=this.bitLength/8,s=Math.ceil(n/i);r=this.label?new Uint8Array(B(this.label)):new Uint8Array([38,189,184,120]);for(var a=new Uint8Array(n),u=0;u<s;u++){var c=new Uint8Array(r.length+o.length+4);c[0]=u+1,c.set(r,1),c[r.length+1]=0,c.set(o,r.length+2),c[c.length-2]=t>>>8,c[c.length-1]=255&t,a.set(new Uint8Array(T.call(this,e,c),0,u<s-1?i:n-u*i),u*i)}return a.buffer}function L(e,t){var r=this.diversifier||1;if((t*=r)<this.bitLength/2||0<t%8)throw new P("Length must be more than "+this.bitLength/2+" bits and multiple of 8");var n=this.bitLength/8,o=t/8,i=this.iterations,s=new Uint8Array(B(e)),a=new Uint8Array(B(this.salt)),u=a.byteLength,c=new Uint8Array(u+4);if(O(a,0,c,0,u),137438953408<o)throw new P("Invalid parameters: Length value");for(var f=Math.ceil(o/n),l=new Uint8Array(o),h=1;h<=f;h++){c[u]=h>>>24&255,c[u+1]=h>>>16&255,c[u+2]=h>>>8&255,c[u+3]=255&h;for(var p=new Uint8Array(T.call(this,s,c)),d=p,y=1;y<i;y++){p=new Uint8Array(T.call(this,s,p));for(var g=0;g<n;g++)d[g]=p[g]^d[g]}var m=(h-1)*n;O(d,0,l,m,Math.min(n,o-m))}if(1<r){var b=o/r,v=new Uint8Array(b);return O(l,o-b,v,0,b),v.buffer}return l.buffer}function N(e,t){if(t>this.bitLength||0<t%8)throw new P("Length can't be more than "+this.bitLength+" bits and multiple of 8");var r=this.digest===F?32:64,n=this.bitLength/8,o=!!(e&&0<e.byteLength)&&new Uint8Array(B(e)),i=o?o.length:0,s=this.iterations,a=new Uint8Array(B(this.salt)),u=a.length,c=new Uint8Array(u+i);O(a,0,c,0,u),o&&O(o,0,c,u,i);for(var f=new Uint8Array(this.digest(c)),l=new Uint8Array(r),h=new Uint8Array(r),p=new Uint8Array(r),d="DENEFH028.760246785.IUEFHWUIO.EF",y=0;y<d.length;y++)l[y]=d.charCodeAt(y);c=new Uint8Array(2*(r+n));for(var g=0;g<s;g++){for(y=0;y<r;y++)h[y]=54^l[y],p[y]=92^l[y],l[y]=0;O(h,0,c,0,r),O(f,0,c,r,n),O(p,0,c,r+n,r),O(f,0,c,r+n+r,n),O(new Uint8Array(this.digest(c)),0,l,0,n)}for(y=0;y<n;y++)h[y]=54^l[y],p[y]=92^l[y],l[y]=0;if(O(h,0,c=new Uint8Array(2*n+u+i),0,n),O(a,0,c,n,u),O(p,0,c,n+u,n),o&&O(o,0,c,n+u+n,i),f=this.digest(this.digest(c)),t===this.bitLength)return f;var m=t/8,b=new Uint8Array(m);return O(f,0,b,0,m),b.buffer}function U(e){return this.deriveBits(e,8*this.keySize)}return function(e){switch(e=e||{},this.name=(e.name||"GOST R 34.10")+"-"+(e.version||2012)%100+(1<(e.version||2012)?"-"+(e.length||256):"")+("HASH"!==(e.mode||"HASH")?"-"+e.mode:"")+(e.procreator?"/"+e.procreator:"")+("string"==typeof e.sBox?"/"+e.sBox:""),this.procreator=e.procreator,this.bitLength=e.length||256,e.version||2012){case 1:this.digest=a,this.bitLength=160;break;case 1994:if(this.digest=F,this.sBox=(e.sBox||("SC"===e.procreator?"D-SC":"D-A")).toUpperCase(),!(t=t||o.GostCipher))throw new s("Object GostCipher not found");this.cipher=new t({name:"GOST 28147",block:"ECB",sBox:this.sBox,procreator:this.procreator});break;case 2012:this.digest=r;break;default:throw new s("Algorithm version "+e.version+" not supported")}switch(this.keySize=e.keySize||(e.version<=2?this.bitLength/8:32),e.mode||"HASH"){case"HASH":break;case"HMAC":this.sign=T,this.verify=D,this.generateKey=K;break;case"KDF":this.deriveKey=U,this.deriveBits=R,this.label=e.label,this.context=e.context;break;case"PBKDF2":this.deriveKey=U,this.deriveBits=L,this.generateKey=K,this.salt=e.salt,this.iterations=e.iterations||2e3,this.diversifier=e.diversifier||1;break;case"PFXKDF":this.deriveKey=U,this.deriveBits=I,this.generateKey=K,this.salt=e.salt,this.iterations=e.iterations||2e3,this.diversifier=e.diversifier||1;break;case"CPKDF":this.deriveKey=U,this.deriveBits=N,this.generateKey=K,this.salt=e.salt,this.iterations=e.iterations||2e3;break;default:throw new s("Algorithm mode "+e.mode+" not supported")}}},"function"==typeof define&&define.amd?define(["gostRandom","gostCipher"],t):"object"===(void 0===o?"undefined":G(o))?n.exports=t(r("./gostRandom"),r("./gostCipher")):(void 0).GostDigest=t((void 0).GostRandom,(void 0).GostCipher)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostCipher":108,"./gostRandom":114}],112:[function(r,n,o){(function(c){"use strict";function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e,t;e=void 0,t=function(e,t,r,n){var o="object"===("undefined"==typeof self?"undefined":f(self))&&self.self===self&&self||"object"===(void 0===c?"undefined":f(c))&&c.global===c&&c||this;var i={execute:function(e,t,r){var n=this["get"+function(e,t){if(!t)throw new(o.SyntaxError||Error)("Algorithm not defined");if(!t.name)throw new(o.SyntaxError||Error)("Algorithm name not defined");var r=t.name,n=t.mode;if("GOST 28147"!==r&&"GOST R 34.12"!==r&&"RC2"!==r||"generateKey"!==e&&("MAC"!==n||"sign"!==e&&"verify"!==e)&&("KW"!==n&&"MASK"!==n||"wrapKey"!==e&&"unwrapKey"!==e)&&(n&&"ES"!==n||"encrypt"!==e&&"decrypt"!==e)){if("GOST R 34.11"!==r&&"SHA"!==r||"digest"!==e&&("HMAC"!==n||"sign"!==e&&"verify"!==e&&"generateKey"!==e)&&("KDF"!==n&&"PBKDF2"!==n&&"PFXKDF"!==n&&"CPKDF"!==n||"deriveKey"!==e&&"deriveBits"!==e&&"generateKey"!==e)){if("GOST R 34.10"!==r||"generateKey"!==e&&(n&&"SIGN"!==n||"sign"!==e&&"verify"!==e)&&("MASK"!==n||"wrapKey"!==e&&"unwrapKey"!==e)&&("DH"!==n||"deriveKey"!==e&&"deriveBits"!==e))throw new(o.NotSupportedError||Error)("Algorithm "+r+"-"+n+" is not valid for "+e);return"GostSign"}return"GostDigest"}return"GostCipher"}(t,e)](e);return n[t].apply(n,r)},getGostCipher:function(e){return new(t=t||o.GostCipher)(e)},getGostDigest:function(e){return new(r=r||o.GostDigest)(e)},getGostSign:function(e){return new(n=n||o.GostSign)(e)}};if(o.importScripts)o.onmessage=function(t){try{postMessage({id:t.data.id,result:i.execute(t.data.algorithm,t.data.method,t.data.args)})}catch(e){postMessage({id:t.data.id,error:e.message})}};else{var s="",a="";"undefined"!=typeof document&&function(){for(var e=/^(.*)gostCrypto(.*)\.js$/i,t=document.querySelectorAll("script"),r=0,n=t.length;r<n;r++){var o=t[r].getAttribute("src"),i=e.exec(o);i&&(s=i[1],a=i[2])}}();var u=function(){for(var e=0,t=arguments.length;e<t;e++){var r=arguments[e].split("."),n=s+r[0]+a+"."+r[1],o=document.querySelector('script[src="'+n+'"]');o||((o=document.createElement("script")).setAttribute("src",n),document.head.appendChild(o))}};e||u("gostRandom.js"),t||u("gostCipher.js"),r||u("gostDigest.js"),n||u("gostSign.js")}return i},"function"==typeof define&&define.amd?define(["gostRandom","gostCipher","gostDigest","gostSign"],t):"object"===(void 0===o?"undefined":f(o))?n.exports=t(r("./gostRandom"),r("./gostCipher"),r("./gostDigest"),r("./gostSign")):("undefined"!=typeof importScripts&&(e.GostRandom&&e.GostCipher&&e.GostDigest&&e.GostSign||importScripts("gostRandom.js","gostCipher.js","gostDigest.js","gostSign.js")),e.gostEngine=t(e.GostRandom,e.GostCipher,e.GostDigest,e.GostSign))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostCipher":108,"./gostDigest":111,"./gostRandom":114,"./gostSign":116}],113:[function(r,n,o){(function(W){"use strict";function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e,t;e=void 0,t=function(r){var e="object"===("undefined"==typeof self?"undefined":V(self))&&self.self===self&&self||"object"===(void 0===W?"undefined":V(W))&&W.global===W&&W||this,l=e.Promise,u=e.Object,c=e.ArrayBuffer,n=e.Date,h=r.subtle,f=r.asn1,p=r.coding,d=r.security.providers,y=r.cert,g=r.cms;function m(){for(var e={},t=0,r=arguments.length;t<r;t++){var n=arguments[t];if("object"===V(n))for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}function i(e,t,r){for(var n in t)o=e,s=t[i=n],a=r,"object"!==V(s)&&(s={value:s}),void 0!==a&&(s.enumerable=a),u.defineProperty(o,i,s);var o,i,s,a}function t(e,t,r,n){if("function"!=typeof t&&(n=r,r=t,t=function(){e.apply(this,arguments)}),t.prototype=u.create(e.prototype,{constructor:{value:t},superclass:{value:e.prototype}}),r&&i(t.prototype,r,!0),e!==u)for(var o in e)t[o]=e[o];return t.super=e,n&&i(t,n,!0),t}function b(e){var t=new Uint8Array(e);return r.getRandomValues(t),t.buffer}function v(e){try{e()}catch(e){}}function w(e){if(e instanceof c)return e;if(e&&e.buffer&&e.buffer instanceof c)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new DataError("CryptoOperationData required")}function _(e){var t=new n;return e&&t.setDate(t.getDate()+e),t}function x(e){var t=_(e);return t.setHours(0,0,0,0),t}function A(e,t){var r=new Uint8Array(e),n=new Uint8Array(t);if(r.length===n.length){for(var o=0,i=r.length;o<i;o++)if(r[o]!==n[o])return;return 1}}function C(e,t){var r=new Uint8Array(e,t,4);return r[3]<<24|r[2]<<16|r[1]<<8|r[0]}function s(e,t,r){var n=new Uint8Array(e,t,4);return n[3]=r>>>24,n[2]=r>>>16&255,n[1]=r>>>8&255,n[0]=255&r,n}function a(e,t){if(!t)return new c(0);if(0<=e.name.indexOf("CPKDF")){for(var r=[],n=0;n<t.length;n++){var o=t.charCodeAt(n);r.push(255&o),r.push(o>>>8&255),r.push(0),r.push(0)}return new Uint8Array(r).buffer}return 0<=e.name.indexOf("PFXKDF")?p.Chars.decode(t+"\0","unicode"):p.Chars.decode(t,"utf8")}function o(){}var S={providerName:"CP-01",days:7305};function k(e){f.PrivateKeyInfo.call(this,e)}function E(e){f.EncryptedPrivateKeyInfo.call(this,e)}function P(t){if(t){var r=this;["mk.db3","masks.db3","kek.opq","rand.opq"].forEach(function(e){r[e]=t[e]})}}function O(e,t){f.GostWrappedPrivateKey.call(this,e),P.call(this,t)}function B(e){e&&(this.header=f.GostKeyContainer.decode(e.header),this.name=f.GostKeyContainerName.decode(e.name),this.primary=f.GostPrivateKeys.decode(e.primary),this.masks=f.GostPrivateMasks.decode(e.masks),e.primary2&&e.masks2&&(this.primary2=f.GostPrivateKeys.decode(e.primary2),this.masks2=f.GostPrivateMasks.decode(e.masks2)))}function F(e,t,r){var n,o={name:"CPKDF",hash:0<=(n=e).name.indexOf("-94")||0<=n.name.indexOf("-2001")||1994===n.version||2001===n.version?"GOST R 34.11-94/"+(e.sBox||"D-A"):"GOST R 34.11-256",salt:r,iterations:t?2e3:2};return h.importKey("raw",a(o,t),o,!1,["deriveKey","deriveBits"]).then(function(e){return h.deriveKey(o,e,"GOST 28147",!1,["sign","verify","encrypt","decrypt"])})}function j(e,t,r){var n=m({name:"GOST 28147-MAC"},e.encParams);return F(e,t,r).then(function(e){return h.sign(n,e,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]))})}function T(e,t){var r=m({name:"GOST 28147-MAC"},e.encParams),n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);return h.importKey("raw",n,r,!1,["sign"]).then(function(e){return h.sign(r,e,t.encode())})}function D(e,t,r){var n=m({name:"GOST 28147-MAC"},e.encParams),o=64===t.byteLength?new Uint8Array(new Uint8Array(t,32,32)).buffer:t;return h.importKey("raw",o,n,!1,["sign"]).then(function(e){return h.sign(n,e,r)})}function K(e){return h.generateKey(m(e.algorithm,{ukm:e.buffer}),!0,["sign","verify"]).then(function(e){return new Uint8Array(new Uint8Array(e.publicKey.buffer,0,8)).buffer})}function I(t,e,r,n,o){var i,s,a={name:"GOST 28147-ECB",sBox:t.encParams&&t.encParams.sBox},u=m(t,{mode:"MASK"});return u.name=u.name.replace("-DH",""),h.decrypt(a,e,r).then(function(e){return s=e,h.importKey("raw",n,u,"false",["sign","unwrapKey"])}).then(function(e){return h.unwrapKey("raw",s,e,u,t,"true",["sign"])}).then(function(e){return K(i=e)}).then(function(e){if(!A(e,o))throw new Error("Incorrect fp");return i})}function R(t,r,n,o,i){var s=t.primaryPrivateKeyParameters.privateKeyAlgorithm;return new l(v).then(function(){if(r.hmacKey)throw new Error("Old key format");if(n.randomStatus.byteLength<12)throw new Error("Invalid random status length");return D(s,n.mask,n.randomStatus)}).then(function(e){if(!A(e,n.hmacRandom))throw new Error("Imita for mask is invalid");return F(s,o,new Uint8Array(n.randomStatus,0,12))}).then(function(e){return i&&r.secondaryKey?I(t.secondaryPrivateKeyParameters.privateKeyAlgorithm,e,r.secondaryKey,n.mask,t.secondaryFP):I(s,e,r.primaryKey,n.mask,t.primaryFP)})}function L(a,t,u,e,r,c){return F(a,e,new Uint8Array(u.randomStatus,0,12)).then(function(e){return t=a,r=e,n=c,o=u.mask,i={name:"GOST 28147-ECB",sBox:t.encParams&&t.encParams.sBox},(s=m(t,{mode:"MASK"})).name=s.name.replace("-DH",""),h.importKey("raw",o,s,!1,["sign","wrapKey"]).then(function(e){return h.wrapKey("raw",n,e,s)}).then(function(e){return h.encrypt(i,r,e)});var t,r,n,o,i,s}).then(function(e){return t=t||new f.GostPrivateKeys,r?t.secondaryKey=e:t.primaryKey=e,t})}function N(e){f.ViPNetInfo.call(this,e||{version:3,keyInfo:{keyClass:1,keyType:43556,flags:1},defenceKeyInfo:{keyClass:1024,keyType:24622,keyUID:b(32),flags:-2147483648}})}function U(e){void 0===e&&(e="");var r,n=p.Chars.decode(e,"win1251");return h.digest("GOST R 34.11-94",n).then(function(e){r=e;var t=new Uint8Array(n.byteLength+r.byteLength);return t.set(new Uint8Array(n),0),t.set(new Uint8Array(r),n.byteLength),h.digest("GOST R 34.11-94",t)}).then(function(e){return h.importKey("raw",e,"GOST 28147",!1,["unwrapKey"])}).then(function(e){return h.unwrapKey("raw",r,e,"GOST 28147-MASK/VN","GOST 28147-89","false",["encrypt","decrypt","sign","verify"])})}function G(e){e&&(e instanceof c||e.buffer instanceof c||"string"==typeof e)?this.decode(e):(e=e||{},this.fileType=e.fileType||"ITCS",this.fileVersion=e.fileVersion||16,e.applicationHeader&&(this.applicationHeader=e.applicationHeader),this.entries=e.entries||[])}function M(e){f.PFX.call(this,e||{version:3,authSafe:{contentType:"data"}})}function H(t,e,r){var n={name:"HMAC",hash:t.hash};return h.importKey("raw",a(t,e),t,!1,["deriveKey"]).then(function(e){return h.deriveKey(t,e,n,!1,["sign"])}).then(function(e){return h.sign(n,e,r)})}function q(e,t,r,n){return H(e,t,n).then(function(e){if(!A(r,e))throw new Error("Invalid password, MAC is not verified")})}function z(e){if(this.entries={},e)for(var t in e)this.setEntry(t,e[t])}return o.prototype.options=S,t(f.PrivateKeyInfo,k,{getPrivateKey:function(){var e="rsaEncryption"===this.privateKeyAlgorithm.id?["sign"]:["sign","deriveKey","deriveBits"];return h.importKey("pkcs8",this.encode(),this.privateKeyAlgorithm,"true",e)},setPrivateKey:function(e){var t=this;return h.exportKey("pkcs8",e).then(function(e){return f.PrivateKeyInfo.call(t,e),t})},generate:function(t,e){var r=this;return new l(v).then(function(){return t instanceof y.Request||(t=new y.Request(t)),t.generate(e)}).then(function(e){return f.PrivateKeyInfo.call(r,e),t})}}),o.prototype.PKCS8=k,t(f.EncryptedPrivateKeyInfo,E,{getKey:function(e){var t=this;return new l(v).then(function(){return new g.EncryptedDataContentInfo({contentType:"encryptedData",version:0,encryptedContentInfo:{contentType:"data",contentEncryptionAlgorithm:t.encryptionAlgorithm,encryptedContent:t.encryptedData}}).getEnclosed(e)}).then(function(e){return k.decode(e.content)})},getPrivateKey:function(e){return this.getKey(e).then(function(e){return e.getPrivateKey()})},setKey:function(e,t,r){var n,o=this;return new l(v).then(function(){return e=new k(e),(n=new g.EncryptedDataContentInfo).encloseContent(e.encode(),t,r||S.providerName)}).then(function(){return o.encryptionAlgorithm=n.encryptedContentInfo.contentEncryptionAlgorithm,o.encryptedData=n.encryptedContentInfo.encryptedContent,o})},setPrivateKey:function(e,t,r){var n=this;return(new k).setPrivateKey(e).then(function(e){return n.setKey(e,t,r)})},generate:function(e,t,r,n){var o=this;return new l(v).then(function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(r)}).then(function(e){return o.setKey(e,t,n)}).then(function(){return e})}}),o.prototype.PKCS8Encrypted=E,t(u,P,{getEncryptionKey:function(e){var r=d["SC-01"].wrapping,t=d["SC-01"].encryption,n=d["SC-01"].derivation,o=this["masks.db3"],i=this["mk.db3"],s=this["kek.opq"];return new l(v).then(function(){if(!o||!i||!s)throw new Error("Not enougth key container files");if(32<o.byteLength){if(e)return h.importKey("raw",p.Chars.decode(e,"utf8"),n,!1,["deriveKey","deriveBits"]).then(function(e){return h.deriveKey(m(n,{salt:new Uint8Array([0,0,0,0,0,0,0,0])}),e,t,!1,["decrypt"])}).then(function(e){return new g.EncryptedDataContentInfo(o).getEnclosed(e)}).then(function(e){return e.verify()}).then(function(e){return e.content});throw new Error("Key password is required")}if(e)throw new Error("Key password is not required");return o}).then(function(e){o=e;var t=new Uint8Array(i.byteLength+o.byteLength);return t.set(new Uint8Array(i),0),t.set(new Uint8Array(o),i.byteLength),h.importKey("raw",t.buffer,r,!1,["unwrapKey"])}).then(function(e){return h.unwrapKey("raw",s,e,r,t,!1,["wrapKey","unwrapKey"])})},generateContainer:function(i){var t,s,a=this,r=d["SC-01"].wrapping,u=d["SC-01"].encryption,c=d["SC-01"].derivation,f=d["SC-01"].digest;return new l(v).then(function(){return h.generateKey(r,!0,["wrapKey"])}).then(function(e){var t=(s=e).buffer.byteLength;a["mk.db3"]=new Uint8Array(new Uint8Array(s.buffer,0,t-32)).buffer;var r=new Uint8Array(new Uint8Array(s.buffer,t-32,32)).buffer;if(i){var n=new g.EncryptedDataContentInfo,o=new g.DigestedDataContentInfo;return o.encloseContent(r,f).then(function(){return o={contentType:"digestedData",content:o.encode()},h.importKey("raw",p.Chars.decode(i,"utf8"),c,!1,["deriveKey","deriveBits"])}).then(function(e){return h.deriveKey(m(c,{salt:new Uint8Array([0,0,0,0,0,0,0,0])}),e,u,!1,["encrypt"])}).then(function(e){return n.encloseContent(o,e,u)}).then(function(){return n.encode()})}return r}).then(function(e){return a["masks.db3"]=e,h.generateKey(u,!1,["wrapKey","unwrapKey"])}).then(function(e){return t=e,h.wrapKey("raw",e,s,r)}).then(function(e){return a["kek.opq"]=e,h.generateKey(u,!1,["wrapKey","unwrapKey"])}).then(function(e){return h.wrapKey("raw",e,s,r)}).then(function(e){return a["rand.opq"]=e,t})}}),o.prototype.SignalComKeyContainer=P,t(f.GostWrappedPrivateKey,O,{getKey:function(e){return this.getPrivateKey(e).then(function(e){return(new k).setPrivateKey(e)})},getPrivateKey:function(e){var t,r=this,n=d["SC-01"].wrapping;return new l(v).then(function(){return r.getEncryptionKey(e,!0)}).then(function(e){return h.unwrapKey("raw",r.privateKeyWrapped,e,n,r.privateKeyAlgorithm,!0,["sign","deriveKey","deriveBits"])}).then(function(e){return(t=r.attributes&&r.attributes["id-sc-gostR3410-2001-publicKey"])?h.generateKey(m(e.algorithm,{ukm:e.buffer}),e.extractable,e.usages):{privateKey:e}}).then(function(e){if(t&&!A(e.publicKey.buffer,t))throw new Error("Check public key failed");return e.privateKey})},setKey:function(e,t){var r=this;return new k(e).getPrivateKey().then(function(e){return r.setPrivateKey(e,t)})},setPrivateKey:function(t,e){var r,n=this,o=d["SC-01"].wrapping;return new l(v).then(function(){return n.getEncryptionKey(e).catch(function(){return n.generateContainer(e)})}).then(function(e){return h.wrapKey("raw",t,e,o)}).then(function(e){return r=e,h.generateKey(m(t.algorithm,{ukm:t.buffer}),!0,["sign","verify"])}).then(function(e){return n.object={version:0,privateKeyAlgorithm:t.algorithm,privateKeyWrapped:r,attributes:{"id-sc-gostR3410-2001-publicKey":e.publicKey.buffer}},n})},changePassword:function(e,t){var r=this;return r.getPrivateKey(e).then(function(e){return r.setPrivateKey(e,t)})},generate:function(e,t,r){var n=this;return new l(v).then(function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(r)}).then(function(e){return n.setKey(e,t)}).then(function(){return e})}}),i(O.prototype,P.prototype),o.prototype.SignalComPrivateKeyInfo=O,t(u,B,{getKey:function(e,t){return this.getPrivateKey(e,t).then(function(e){return(new k).setPrivateKey(e)})},getPrivateKey:function(t,r){var n=this,o=n.header.keyContainerContent;return R(o,n.primary,n.masks,t,r).catch(function(e){if(n.primary2&&n.masks2)return R(o,n.primary2,n.masks2,t,r);throw e})},getCertificate:function(e){var t=this.header.keyContainerContent;return new l(v).then(function(){return e?new y.X509(t.secondaryCertificate):new y.X509(t.primaryCertificate)})},getContainerName:function(){return this.name.containerName},setKey:function(e,t,r,n){var o=this;return new k(e).getPrivateKey().then(function(e){return o.setPrivateKey(e,t,r,n)})},setPrivateKey:function(o,i,a,r){var n,u,c=this;return new l(v).then(function(){c.header=c.header||new f.GostKeyContainer({keyContainerContent:{containerAlgoritmIdentifier:{algorithm:"id-CryptoPro-GostPrivateKeys-V2-Full"},attributes:["kccaReservePrimary","kccaPrimaryKeyAbsent"],extensions:{keyValidity:{notAfter:_(r||S.days)}}}}),n=c.header.keyContainerContent;var e=a?n.secondaryPrivateKeyParameters:n.primaryPrivateKeyParameters;if(e)u=e.privateKeyAlgorithm;else if(e={attributes:["pkaExportable","pkaExchange","pkaDhAllowed"],privateKeyAlgorithm:u=m(o.algorithm,{sBox:"D-A",encParams:{block:"CFB",sBox:"E-A",keyMeshing:"CP"}})},a){if(!n.primaryPrivateKeyParameters)throw new Error("Primary key must be defined first");n.secondaryPrivateKeyParameters=e}else{n.primaryPrivateKeyParameters=e;var t=n.attributes.indexOf("kccaPrimaryKeyAbsent");0<=t&&n.attributes.splice(t,1)}var s=[];return[0,1].forEach(function(e){var t,r,n,o,i="masks"+(0<e?"2":"");c[i]||s.push((n=m(t=u,{mode:"MASK"}),o=b(12),n.name=n.name.replace("-DH",""),h.generateKey(n,!0,["wrapKey","unwrapKey"]).then(function(e){return h.exportKey("raw",e)}).then(function(e){return D(t,r=e,o)}).then(function(e){return new f.GostPrivateMasks({mask:r,randomStatus:o,hmacRandom:e})}).then(function(e){c[i]=e})))}),l.all(s)}).then(function(){var n=[];return[0,1].forEach(function(e){var t="primary"+(0<e?"2":""),r="masks"+(0<e?"2":"");n.push(L(u,c[t],c[r],i,a,o).then(function(e){c[t]=e}))}),l.all(n)}).then(function(){return K(o).then(function(e){a?n.secondaryFP=e:n.primaryFP=e})}).then(function(){var e=n.attributes.indexOf("kccaSoftPassword");if(i)return e<0&&n.attributes.push("kccaSoftPassword"),j(u,i,n.primaryFP);0<=e&&n.attributes.splice(e,1)}).then(function(e){return e&&(n.hmacPassword=e),T(u,n)}).then(function(e){return c.header.hmacKeyContainerContent=e,c})},setCertificate:function(t,r,e){var n,o,i=this;return new l(v).then(function(){return i.header=i.header||new f.GostKeyContainer({keyContainerContent:{containerAlgoritmIdentifier:{algorithm:"id-CryptoPro-GostPrivateKeys-V2-Full"},attributes:["kccaReservePrimary","kccaPrimaryKeyAbsent"],extensions:{keyValidity:{notAfter:_(e||S.days)}}}}),n=i.header.keyContainerContent,t=new y.X509(t),o=n.primaryPrivateKeyParameters&&n.primaryPrivateKeyParameters.privateKeyAlgorithm||m(t.subjectPublicKeyInfo.algorithm,{sBox:"D-A",encParams:{block:"CFB",sBox:"E-A",keyMeshing:"CP"}}),t.getPublicKey()}).then(function(e){if(r){if(n.secondaryFP&&!A(n.secondaryFP,new Uint8Array(e.buffer,0,n.secondaryFP.byteLength)))throw new Error("The public key of the certificate does not match the private key");n.secondaryCertificate=t}else{if(n.primaryFP&&!A(n.primaryFP,new Uint8Array(e.buffer,0,n.primaryFP.byteLength)))throw new Error("The public key of the certificate does not match the private key");n.primaryCertificate=t}return T(o,n)}).then(function(e){return i.header.hmacKeyContainerContent=e,i})},setContainerName:function(e){this.name=new f.GostKeyContainerName({containerName:e})},verify:function(r){var n,o,i=this;return new l(v).then(function(){return n=i.header.keyContainerContent,T(o=n.primaryPrivateKeyParameters.privateKeyAlgorithm,n)}).then(function(e){if(!A(e,i.header.hmacKeyContainerContent))throw new Error("Container is not valid.");var t=0<=n.attributes.indexOf("kccaSoftPassword");if(!r&&t)throw new Error("Password is required");if(r&&!t)throw new Error("Password is not reqiured.");return r?j(o,r,n.primaryFP).then(function(e){if(!A(e,n.hmacPassword))throw new Error("Password is not valid.");return i}):i})},changePassword:function(e,t){var r,n=this;return new l(v).then(function(){if(!(r=n.header.keyContainerContent).primaryPrivateKeyParameters)throw new Error("Private key not yet defined");return n.getPrivateKey(e).then(function(e){return n.setPrivateKey(e,t)})}).then(function(){return r.secondaryPrivateKeyParameters?n.getPrivateKey(e,!0).then(function(e){return n.setPrivateKey(e,t,!0)}):n})},generate:function(e,t,r){var n,o,i=this;return new l(v).then(function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(r)}).then(function(e){return o=e,i.setKey(o,t)}).then(function(){return(n=new y.X509(e)).sign(o)}).then(function(){return i.setCertificate(n)}).then(function(){return e})},encode:function(e){return{header:this.header.encode(e),name:this.name.encode(e),masks:this.masks.encode(e),primary:this.primary.encode(e),masks2:this.masks2.encode(e),primary2:this.primary2.encode(e)}}}),o.prototype.CryptoProKeyContainer=B,t(f.ViPNetInfo,N,{getPrivateKey:function(o){var i,s,a=this;return new l(v).then(function(){return o&&"string"!=typeof o?o:U(o)}).then(function(e){o=e,i=a.keyPart,s=new Uint8Array(i,0,i.byteLength-4-8);var t=new Uint8Array(i,s.byteLength,4),r=a.keyInfo.encode(),n=new Uint8Array(s.byteLength+r.byteLength);return n.set(new Uint8Array(s),0),n.set(new Uint8Array(r),s.byteLength),h.verify({name:"GOST 28147-89-MAC"},o,t,n)}).then(function(e){if(!e)throw new Error("Invalid key password");var t=new Uint8Array(i,i.byteLength-8,8);return h.decrypt({name:"GOST 28147-89-CFB",iv:t},o,s)}).then(function(t){var r=t.byteLength/2;if(!1&a.keyInfo.keyClass)return h.importKey("raw",new Int32Array(t,r,r),"GOST 28147",!1,["unwrapKey"]).then(function(e){return h.unwrapKey("raw",new Int32Array(t,0,r),e,"GOST 28147-MASK/VN","GOST 28147-89","false",["encrypt","decrypt","sign","verify"])});var n=a.keyInfo.algorithm||a.certificate&&a.certificate.subjectPublicKeyInfo.algorithm;if(!n)throw new Error("Algorithm is not specified");var o=m(n,{mode:"MASK",procreator:"VN"});o.name=o.name.replace("-DH","");var i=new Uint8Array(t,0,r),e=new Uint8Array(t,r,r);return h.importKey("raw",e,o,"false",["sign","unwrapKey"]).then(function(e){return h.unwrapKey("raw",i,e,o,n,"true",["sign","deriveBits","deriveKey"])}).then(function(e){return a.publicKey?h.generateKey(m(e.algorithm,{ukm:e.buffer}),e.extractable,e.usages):{privateKey:e}}).then(function(e){if(a.publicKey&&!A(e.publicKey.buffer,a.publicKey))throw new Error("Check public key failed");return e.privateKey})})},setPrivateKey:function(r,n,o){var i,t,s,a,u=this;return new l(v).then(function(){return n&&"string"!=typeof n?n:U(n)}).then(function(e){n=e;var t=r.algorithm;if(u.keyInfo.algorithm=t,u.keyInfo.serialNumber=b(16),u.keyInfo.keyUID=b(8),u.keyInfo.validity={notBefore:x(),notAfter:x(o||S.days)},"private"===r.type)return(i=m(t,{mode:"MASK",procreator:"VN"})).name=i.name.replace("-DH",""),u.keyInfo.keyClass=1,u.keyInfo.keyType=43556,h.generateKey(m(t,{ukm:r.buffer}),!0,["sign","verify"]).then(function(e){if(u.publicKey=e.publicKey.buffer,u.certificate){var t=u.certificate.subjectPublicKeyInfo;return h.importKey("spki",t.encode(),t.algorithm,!0,["verify"])}}).then(function(e){e&&!A(e.buffer,u.publicKey)&&delete u.certificate});if("secret"!==r.type)throw new Error("Invalid key type");i="GOST 28147/MASK/VN",delete u.certificate,delete u.publicKey,u.keyInfo.keyClass=64,u.keyInfo.keyType=24622}).then(function(){return h.generateKey(i,!0,["wrapKey","unwrapKey"])}).then(function(e){return t=e,h.wrapKey("raw",r,t,i)}).then(function(e){return(s=new Uint8Array(2*e.byteLength)).set(new Uint8Array(e)),h.exportKey("raw",t)}).then(function(e){s.set(new Uint8Array(e),e.byteLength),a=new Uint8Array(s.byteLength+12);var t={name:"GOST 28147-CFB",iv:b(8)};return a.set(new Uint8Array(t.iv),a.byteLength-8),h.encrypt(t,n,s)}).then(function(e){a.set(new Uint8Array(e));var t=u.keyInfo.encode(),r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e),0),r.set(new Uint8Array(t),e.byteLength),h.sign({name:"GOST 28147-89-MAC"},n,r)}).then(function(e){return a.set(new Uint8Array(e),a.byteLength-12),u.keyPart=a.buffer,u})},encode:function(e){var t=f.ViPNetInfo.method("encode").call(this),r=new Uint8Array(8+t.byteLength+this.keyPart.byteLength);return s(r.buffer,0,4+t.byteLength+this.keyPart.byteLength),r.set(new Uint8Array(t),4),s(r.buffer,4+t.byteLength,this.keyPart.byteLength),r.set(new Uint8Array(this.keyPart),8+t.byteLength),"PEM"===e?p.Base64.encode(r.buffer):r.buffer}},{decode:function(e){"string"==typeof e&&(e=p.Base64.decode(e));var t=C(e=w(e),0);if(e.byteLength!==t+4)throw new Error("Invalid container entry size");var r=p.BER.decode(new Uint8Array(e,4,t)),n=f.ViPNetInfo.decode.call(this,r),o=r.header.byteLength+r.content.byteLength,i=C(e,4+o);if(e.byteLength!==o+i+8)throw new Error("Invalid container key part size");return n.keyPart=new Uint8Array(new Uint8Array(e,o+8,i)).buffer,n}}),o.prototype.ViPNetContainerEntry=N,t(u,G,{getCertificate:function(t){var r=this;return new l(v).then(function(){var e=r.entries[t||0];if(!e)throw new Error("Entry not defined");if(e.certificate)return new y.X509(e.certificate)})},getKey:function(e,t){return this.getPrivateKey(e,t).then(function(e){return(new k).setPrivateKey(e)})},getPrivateKey:function(t,r){var n=this;return new l(v).then(function(){var e=n.entries[r||0];if(!e)throw new Error("Entry not defined");return e.getPrivateKey(t)})},setCertificate:function(t,e){var r,n=this;return new l(v).then(function(){if(r=n.entries[e||0]||(n.entries[e||0]=new N),t=new y.X509(t),r.publicKey)return t.getPublicKey()}).then(function(e){if(e&&!A(r.publicKey,e.buffer))throw new Error("Invalid certificate for private key");return r.certificate=t,n})},setKey:function(e,t,r,n){var o=this;return new k(e).getPrivateKey().then(function(e){return o.setPrivateKey(e,t,r,n)})},setPrivateKey:function(e,t,r,n){var o=this;return new l(v).then(function(){return(o.entries[r||0]||(o.entries[r||0]=new N)).setPrivateKey(e,t,n)}).then(function(){return o})},changePassword:function(e,t){var r=this;return new l(v).then(function(){return r.getPrivateKey(e).then(function(e){return r.setPrivateKey(e,t)})})},generate:function(e,t,r){var n,o,i=this;return new l(v).then(function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(r)}).then(function(e){return o=e,i.setKey(o,t)}).then(function(){return(n=new y.X509(e)).sign(o)}).then(function(){return i.setCertificate(n)}).then(function(){return e})},encode:function(e){var r=[],n=0;this.entries.forEach(function(e){var t=e.encode();n+=t.byteLength,r.push(t)});var t=this.applicationHeader?this.applicationHeader.byteLength:0,o=new Uint8Array(12+t+n);o.set(new Uint8Array(p.Chars.decode(this.fileType,"ascii"))),s(o.buffer,4,this.fileVersion),s(o.buffer,8,t),0<t&&o.set(new Uint8Array(this.applicationHeader),12);var i=12+t;return r.forEach(function(e){o.set(new Uint8Array(e),i),i+=e.byteLength}),"PEM"===e?p.Base64.encode(o.buffer):o.buffer},decode:function(e){e=this.constructor.decode(e),this.fileType=e.fileType,this.fileVersion=e.fileVersion,e.applicationHeader&&(this.applicationHeader=e.applicationHeader),this.entries=e.entries}},{encode:function(e,t){return new this(e).encode(t)},decode:function(e){"string"==typeof e&&(e=p.Base64.decode(e)),e=w(e);var t=p.Chars.encode(new Uint8Array(e,0,4),"ascii");if("ITCS"!==t&&"PKEY"!==t&&"_CCK"!==t&&"_LCK"!==t)throw new Error("Unsupported ViPNet container type");var r=C(e,4),n=r>>>16;if(0!=n&&1!=n||255<(65535&r))throw new Error("Unsupported ViPNet container version");var o,i=C(e,8);0<i&&(o=w(new Uint8Array(e,12,i)));for(var s=12+i,a=[];s<e.byteLength;){var u=C(e,s);a.push(N.decode(new Uint8Array(e,s,u+4))),s=s+u+4}return new G({fileType:t,fileVersion:r,applicationHeader:o,entries:a})}}),o.prototype.ViPNetContainer=G,t(f.PFX,M,{sign:function(o,i){var s=this;return new l(v).then(function(){if(o){var t,r,e;i?e=d[i]:i=d[S.providerName].digest,r=m(r=e?(t=e.digest,e.derivation):{name:"PFXKDF",hash:t=i,iterations:2e3},{salt:b(function(e){switch(e.id){case"pbeWithSHAAnd40BitRC2-CBC":case"pbeWithSHAAnd128BitRC2-CBC":return 8;case"pbeUnknownGost":return 16;case"sha1":return 20;default:return 32}}(t)),diversifier:3});var n=s.authSafe.content;return H(r,o,n).then(function(e){return s.macData={mac:{digestAlgorithm:t,digest:e},macSalt:r.salt,iterations:r.iterations},s})}return s})},verify:function(r){var n,o=this,i=o.authSafe;return new l(v).then(function(){if("data"!==i.contentType)throw new Error("Unsupported format");if(o.macData){if(!r)throw new Error("Password must be defined for the MAC verification");n={name:"PFXKDF",hash:o.macData.mac.digestAlgorithm,salt:o.macData.macSalt,iterations:o.macData.iterations,diversifier:3};var e=o.authSafe.content,t=o.macData.mac.digest;return q(n,r,t,e).catch(function(){return n.name="PBKDF2",q(n,r,t,e)})}}).then(function(){return o})}}),o.prototype.PKCS12=M,t(u,z,{aliases:function(){var e=[];for(var t in this.entries)e.push(t);return e},containsAlias:function(e){return!!this.entries[e]},deleteEntry:function(e){delete this.entries[e]},setEntry:function(e,t){var r={};if(t.key)try{r.key=new k(t.key,!0)}catch(e){try{r.key=new E(t.key,!0)}catch(e){if(!(t.key instanceof c))throw new Error("Unknown Key format");r.key=t.key}}if(t.certs){for(var n=t.certs instanceof Array?t.certs:[t.certs],o=0;o<n.length;o++)try{n[o]=new y.X509(n[o])}catch(e){}r.certs=n}if(t.crls){var i=t.crls instanceof Array?t.crls:[t.crls];for(o=0;o<i.length;o++)try{i[o]=new y.CRL(i[o])}catch(e){}r.crls=i}this.entries[e]=r},getEntry:function(e){return this.entries[e]},load:function(r,n){var o=this;return new l(v).then(function(){return(r=new M(r)).verify(n)}).then(function(){if("data"!==r.authSafe.contentType)throw new Error("Unsupported PFX format");var e=f.AuthenticatedSafe.decode(r.authSafe.content).object,t=[];return e.forEach(function(e){if("data"===e.contentType)t.push(new g.DataContentInfo(e));else{if("encryptedData"!==e.contentType)throw new Error("Unsupported PFX format");t.push(new g.EncryptedDataContentInfo(e).getEnclosed(n))}}),l.all(t)}).then(function(e){var i={};e.forEach(function(e){f.SafeContents.decode(e.content).object.forEach(function(e){var t=p.Hex.encode(e.bagAttributes&&e.bagAttributes.localKeyId||b(4),!0),r=i[t]||(i[t]={});switch(e.bagId){case"keyBag":r.key=new k(e.bagValue);break;case"pkcs8ShroudedKeyBag":r.key=new E(e.bagValue);break;case"secretBag":"secret"===e.bagValue.secretTypeId&&(r.key=e.bagValue.secretValue);break;case"certBag":var n=r.certs||(r.certs=[]);"x509Certificate"===e.bagValue.certId&&n.push(new y.X509(e.bagValue.certValue));break;case"crlBag":var o=r.crls||(r.crls=[]);"x509CRL"===e.bagValue.crlId&&o.push(new y.CRL(e.bagValue.crlValue))}e.bagAttributes&&e.bagAttributes.friendlyName&&(r.friendlyName=e.bagAttributes.friendlyName)})});var t=[];for(var r in i)t.push(function(t){return t.key instanceof E?t.key.getKey(n).then(function(e){return t.key=e,t}).catch(function(){return t}):t}(i[r]));return l.all(t)}).then(function(e){return e.forEach(function(e){var t=e.friendlyName;t?(delete e.friendlyName,o.entries[t]=e):o.entries[function(){for(var e=new Uint8Array(b(16)),t="",r=0;r<16;r++)t+=("00"+e[r].toString(16)).slice(-2);return t.substr(0,8)+"-"+t.substr(8,4)+"-4"+t.substr(13,3)+"-9"+t.substr(17,3)+"-"+t.substr(20,12)}()]=e}),o})},store:function(n,o,i){var s=this,a=[],u=[],r=[];return new l(v).then(function(){i=i?d[i]?d[i].pbes:i:o&&d[o]?d[o].pbes:d[S.providerName].pbes;for(var e in s.entries){var r=new Uint32Array([1]),t=s.entries[e];t.key&&function(e,t){e instanceof c?u.push({bagId:"secretBag",bagValue:{secretTypeId:"secret",secretValue:e,bagAttributes:t}}):e instanceof k?i&&n?a.push((new E).setKey(e,n,i).then(function(e){return{bagId:"pkcs8ShroudedKeyBag",bagValue:e,bagAttributes:t}})):a.push({bagId:"keyBag",bagValue:e,bagAttributes:t}):e instanceof E&&a.push({bagId:"pkcs8ShroudedKeyBag",bagValue:e,bagAttributes:t})}(t.key,{localKeyId:r,friendlyName:e}),t.certs&&t.certs.forEach(function(e){var t={localKeyId:r};e instanceof y.X509&&u.push({bagId:"certBag",bagValue:{certId:"x509Certificate",certValue:e},bagAttributes:t})}),t.crls&&t.crls.forEach(function(e){var t={localKeyId:r};e instanceof y.CRL&&u.push({bagId:"crlBag",bagValue:{crlId:"x509CRL",crlValue:e},bagAttributes:t})})}if(0<a.length)return l.all(a)}).then(function(e){if(e){var t=f.SafeContents.encode(e);r.push(new g.DataContentInfo({contentType:"data",content:t}))}if(0<u.length)return u=f.SafeContents.encode(u),i&&n?(new g.EncryptedDataContentInfo).encloseContent(u,n,i):(new g.DataContentInfo).encloseContent(u)}).then(function(e){r.push(e),r=new f.AuthenticatedSafe(r);var t=new M;return t.authSafe={contentType:"data",content:r.encode()},t.sign(n,o)})}}),o.prototype.KeyStore=z,r.keys=new o,o},"function"==typeof define&&define.amd?define(["gostCrypto","gostASN1","gostCert","gostCMS"],t):"object"===(void 0===o?"undefined":V(o))?n.exports=t(r("./gostCrypto"),r("./gostASN1"),r("./gostCert"),r("./gostCMS")):e.GostKeys=t(e.gostCrypto,e.GostASN1,e.GostCert,e.GostCMS)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostASN1":105,"./gostCMS":106,"./gostCert":107,"./gostCrypto":110}],114:[function(e,t,o){(function(r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e;e=function(){var e="object"===("undefined"==typeof self?"undefined":n(self))&&self.self===self&&self||"object"===(void 0===r?"undefined":n(r))&&r.global===r&&r||this,o=e.crypto||e.msCrypto,i=e.TypeMismatchError||Error,s=e.QuotaExceededError||Error,a={seed:new Uint8Array(1024),getIndex:0,setIndex:0,set:function(e){1024<=this.setIndex&&(this.setIndex=0),this.seed[this.setIndex++]=e},get:function(){return 1024<=this.getIndex&&(this.getIndex=0),this.seed[this.getIndex++]}};if("undefiend"!=typeof document){try{document.addEventListener("mousemove",function(e){a.set(255&(new Date).getTime()^255&(e.clientX||e.pageX)^255&(e.clientY||e.pageY))},!1)}catch(e){}try{document.addEventListener("keydown",function(e){a.set(255&(new Date).getTime()^255&e.keyCode)},!1)}catch(e){}}function t(){}return t.prototype.getRandomValues=function(e){if(!e.byteLength)throw new i("Array is not of an integer type (Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, or Uint32Array)");if(65536<e.byteLength)throw new s("Byte length of array can't be greate then 65536");var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(o&&o.getRandomValues)o.getRandomValues(t);else for(var r=0,n=t.length;r<n;r++)t[r]=255&Math.floor(256*Math.random());for(r=0,n=t.length;r<n;r++)t[r]=t[r]^a.get();return e},t},"function"==typeof define&&define.amd?define(e):"object"===(void 0===o?"undefined":n(o))?t.exports=e():(void 0).GostRandom=e()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],115:[function(t,r,n){(function(c){"use strict";function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e;e=function(e){"object"===("undefined"==typeof self?"undefined":f(self))&&self.self===self&&self||"object"===(void 0===c?"undefined":f(c))&&c.global;function r(){for(var e={},t=0,r=arguments.length;t<r;t++){var n=arguments[t];if("object"===f(n))for(var o in n)e[o]=n[o]}return e}var t={"1.2.643.2.2":"CryptoPro","1.2.643.2.2.3":"id-GostR3411-94-with-GostR3410-2001","1.2.643.2.2.4":"id-GostR3411-94-with-GostR3410-94","1.2.643.2.2.9":"id-GostR3411-94","1.2.643.2.2.10":"id-HMACGostR3411-94","1.2.643.2.2.13.0":"id-Gost28147-89-None-KeyWrap","1.2.643.2.2.13.1":"id-Gost28147-89-CryptoPro-KeyWrap","1.2.643.2.2.14.0":"id-Gost28147-89-None-KeyMeshing","1.2.643.2.2.14.1":"id-Gost28147-89-CryptoPro-KeyMeshing","1.2.643.2.2.19":"id-GostR3410-2001","1.2.643.2.2.20":"id-GostR3410-94","1.2.643.2.2.20.1":"id-GostR3410-94-a","1.2.643.2.2.20.2":"id-GostR3410-94-aBis","1.2.643.2.2.20.3":"id-GostR3410-94-b","1.2.643.2.2.20.4":"id-GostR3410-94-bBis","1.2.643.2.2.21":"id-Gost28147-89","1.2.643.2.2.22":"id-Gost28147-89-MAC","1.2.643.2.2.30.0":"id-GostR3411-94-TestParamSet","1.2.643.2.2.30.1":"id-GostR3411-94-CryptoProParamSet","1.2.643.2.2.30.2":"id-GostR3411-94-CryptoPro-B-ParamSet","1.2.643.2.2.30.3":"id-GostR3411-94-CryptoPro-C-ParamSet","1.2.643.2.2.30.4":"id-GostR3411-94-CryptoPro-D-ParamSet","1.2.643.2.2.31.0":"id-Gost28147-89-TestParamSet","1.2.643.2.2.31.1":"id-Gost28147-89-CryptoPro-A-ParamSet","1.2.643.2.2.31.2":"id-Gost28147-89-CryptoPro-B-ParamSet","1.2.643.2.2.31.3":"id-Gost28147-89-CryptoPro-C-ParamSet","1.2.643.2.2.31.4":"id-Gost28147-89-CryptoPro-D-ParamSet","1.2.643.2.2.31.5":"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet","1.2.643.2.2.31.6":"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet","1.2.643.2.2.31.7":"id-Gost28147-89-CryptoPro-RIC-1-ParamSet ","1.2.643.2.2.31.12":"id-Gost28147-89-CryptoPro-tc26-1","1.2.643.2.2.31.13":"id-Gost28147-89-CryptoPro-tc26-2","1.2.643.2.2.31.14":"id-Gost28147-89-CryptoPro-tc26-3","1.2.643.2.2.31.15":"id-Gost28147-89-CryptoPro-tc26-4","1.2.643.2.2.31.16":"id-Gost28147-89-CryptoPro-tc26-5","1.2.643.2.2.31.17":"id-Gost28147-89-CryptoPro-tc26-6","1.2.643.2.2.32.0":"id-GostR3410-94-TestParamSet","1.2.643.2.2.32.2":"id-GostR3410-94-CryptoPro-A-ParamSet","1.2.643.2.2.32.3":"id-GostR3410-94-CryptoPro-B-ParamSet","1.2.643.2.2.32.4":"id-GostR3410-94-CryptoPro-C-ParamSet","1.2.643.2.2.32.5":"id-GostR3410-94-CryptoPro-D-ParamSet","1.2.643.2.2.33.1":"id-GostR3410-94-CryptoPro-XchA-ParamSet","1.2.643.2.2.33.2":"id-GostR3410-94-CryptoPro-XchB-ParamSet","1.2.643.2.2.33.3":"id-GostR3410-94-CryptoPro-XchC-ParamSet","1.2.643.2.2.34.2":"temporaryAccessToRC","1.2.643.2.2.34.3":"internetContentSignature","1.2.643.2.2.34.4":"adminRC","1.2.643.2.2.34.5":"operatorRC","1.2.643.2.2.34.6":"userRC","1.2.643.2.2.34.7":"clientRC","1.2.643.2.2.34.8":"serverRC","1.2.643.2.2.34.9":"sysAdminRC","1.2.643.2.2.34.10":"arcAdminRC","1.2.643.2.2.34.11":"authorityPersonRC","1.2.643.2.2.34.12":"clientCC","1.2.643.2.2.34.13":"sysAdminCC","1.2.643.2.2.34.14":"arcAdminCC","1.2.643.2.2.34.15":"accessIPSecCA","1.2.643.2.2.34.16":"auditAdminHSM","1.2.643.2.2.34.21":"adminHSM","1.2.643.2.2.34.22":"serverAdminHSH","1.2.643.2.2.34.24":"winlogonCA","1.2.643.2.2.34.25":"timestampServiceUser","1.2.643.2.2.34.26":"statusServiceUser","1.2.643.2.2.34.27":"arcAdminHSM","1.2.643.2.2.34.28":"auditorHSM","1.2.643.2.2.35.0":"id-GostR3410-2001-CryptoPro-TestParamSet","1.2.643.2.2.35.1":"id-GostR3410-2001-CryptoPro-A-ParamSet","1.2.643.2.2.35.2":"id-GostR3410-2001-CryptoPro-B-ParamSet","1.2.643.2.2.35.3":"id-GostR3410-2001-CryptoPro-C-ParamSet","1.2.643.2.2.36.0":"id-GostR3410-2001-CryptoPro-XchA-ParamSet","1.2.643.2.2.36.1":"id-GostR3410-2001-CryptoPro-XchB-ParamSet","1.2.643.2.2.37.1":"id-CryptoPro-GostPrivateKeys-V1","1.2.643.2.2.37.2":"id-CryptoPro-GostPrivateKeys-V2","1.2.643.2.2.37.2.1":"id-CryptoPro-GostPrivateKeys-V2-Full","1.2.643.2.2.37.2.2":"id-CryptoPro-GostPrivateKeys-V2-PartOf","1.2.643.2.2.37.3.1":"intermediateCertificates","1.2.643.2.2.37.3.2":"trustedCertificatesSignature","1.2.643.2.2.37.3.3":"trustedCertificatesExchange","1.2.643.2.2.37.3.10":"keyValidity","1.2.643.2.2.38.1":"personalBaseProlicy","1.2.643.2.2.38.2":"networkBasePolicy","1.2.643.2.2.47.1":"id-CryptoPro-ocsp-treats-exp-key-or-exp-cert-rev","1.2.643.2.2.47.2":"id-CryptoPro-ocsp-crl-locator","1.2.643.2.2.47.3":"id-CryptoPro-ocsp-instant-revocation-indicator","1.2.643.2.2.47.4":"id-CryptoPro-ocsp-revocation-announcement-reference","1.2.643.2.2.47.5":"id-CryptoPro-ocsp-historical-request","1.2.643.2.2.49.2":"limitedLicense","1.2.643.2.2.96":"id-GostR3410-2001-CryptoPro-ESDH","1.2.643.2.2.97":"id-GostR3410-94-CryptoPro-ESDH","1.2.643.2.2.98":"id-GostR3410-2001DH","1.2.643.2.2.99":"id-GostR3410-94DH","1.2.643.2.45.1.1.1":"signatureComment","1.2.643.2.45.1.1.2":"resourceName","1.2.643.2.45.1.1.3":"signatureUsage","1.2.643.3.131.1.1":"INN","1.2.643.3.141.1.1":"RNS FSS","1.2.643.3.141.1.2":"KP FSS","1.2.643.7.1":"tc26","1.2.643.7.1.1.1.1":"id-tc26-gost3410-12-256","1.2.643.7.1.1.1.2":"id-tc26-gost3410-12-512","1.2.643.7.1.1.2.1":"id-tc26-gost3411-94","1.2.643.7.1.1.2.2":"id-tc26-gost3411-12-256","1.2.643.7.1.1.2.3":"id-tc26-gost3411-12-512","1.2.643.7.1.1.3.1":"id-tc26-signwithdigest-gost3410-12-94","1.2.643.7.1.1.3.2":"id-tc26-signwithdigest-gost3410-12-256","1.2.643.7.1.1.3.3":"id-tc26-signwithdigest-gost3410-12-512","1.2.643.7.1.1.4.1":"id-tc26-hmac-gost-3411-12-256","1.2.643.7.1.1.4.2":"id-tc26-hmac-gost-3411-12-512","1.2.643.7.1.1.6.1":"id-tc26-agreement-gost-3410-12-256","1.2.643.7.1.1.6.2":"id-tc26-agreement-gost-3410-12-512","1.2.643.7.1.2.1.1.0":"id-tc26-gost-3410-12-256-paramSetTest","1.2.643.7.1.2.1.1.1":"id-tc26-gost-3410-12-256-paramSetA","1.2.643.7.1.2.1.1.2":"id-tc26-gost-3410-12-256-paramSetB","1.2.643.7.1.2.1.2.0":"id-tc26-gost-3410-12-512-paramSetTest","1.2.643.7.1.2.1.2.1":"id-tc26-gost-3410-12-512-paramSetA","1.2.643.7.1.2.1.2.2":"id-tc26-gost-3410-12-512-paramSetB","1.2.643.7.1.2.1.2.3":"id-tc26-gost-3410-12-512-paramSetC","1.2.643.7.1.2.1.2.4":"id-tc26-gost-3410-12-512-paramSetD","1.2.643.7.1.2.5.1.1":"id-tc26-gost-28147-param-Z","1.2.643.100.1":"OGRN","1.2.643.100.2.1":"SMEV-person","1.2.643.100.2.2":"SMEV-government","1.2.643.100.3":"SNILS","1.2.643.100.4":"KPP","1.2.643.100.5":"OGRNIP","1.2.643.100.6":"internal-government","1.2.643.100.111":"subjectSignTool","1.2.643.100.112":"issuerSignTool","1.2.643.100.113.1":"signToolClassKC1","1.2.643.100.113.2":"signToolClassKC2","1.2.643.100.113.3":"signToolClassKC3","1.2.643.100.113.4":"signToolClassKB1","1.2.643.100.113.5":"signToolClassKB2","1.2.643.100.113.6":"signToolClassKA1","1.2.643.100.114.1":"issuerToolClassKC1","1.2.643.100.114.2":"issuerToolClassKC2","1.2.643.100.114.3":"issuerToolClassKC3","1.2.643.100.114.4":"issuerToolClassKB2","1.2.643.100.114.5":"issuerToolClassKB1","1.2.643.100.114.6":"issuerToolClassKA1","1.2.840.10040.4":"x9cm","1.2.840.10040.4.1":"dsa","1.2.840.10040.4.3":"dsa-with-SHA1","1.2.840.10045":"ansi-x962","1.2.840.10045.1":"id-fieldType","1.2.840.10045.1.1":"id-prime-Field","1.2.840.10045.1.2":"id-characteristic-two-field","1.2.840.10045.2.1":"ecPublicKey","1.2.840.10045.3.0":"characteristicTwo","1.2.840.10045.3.1.1":"secp192r1","1.2.840.10045.3.1.2":"prime192v2","1.2.840.10045.3.1.3":"prime192v3","1.2.840.10045.3.1.4":"prime239v1","1.2.840.10045.3.1.5":"prime239v2","1.2.840.10045.3.1.6":"prime239v3","1.2.840.10045.3.1.7":"secp256r1","1.2.840.10045.4":"ecdsa","1.2.840.10045.4.1":"ecdsa-with-SHA1","1.2.840.10045.4.2":"ecdsa-with-Recommended","1.2.840.10045.4.4":"ecdsa-with-SHA2","1.2.840.10045.4.4.1":"ecdsa-with-SHA224","1.2.840.10045.4.4.2":"ecdsa-with-SHA256","1.2.840.10045.4.4.3":"ecdsa-with-SHA384","1.2.840.10045.4.4.4":"ecdsa-with-SHA512","1.2.840.113533.7.66.13":"PasswordBasedMac","1.3.6.1.4.1.22554.1.1.2.1.2":"pbeWithSHAAndAES128-CBC","1.3.6.1.4.1.22554.1.1.2.1.22":"pbeWithSHAAndAES192-CBC","1.3.6.1.4.1.22554.1.1.2.1.42":"pbeWithSHAAndAES256-CBC","1.3.6.1.4.1.22554.1.2.1.2.1.2":"pbeWithSHA256AndAES128-CBC","1.3.6.1.4.1.22554.1.2.1.2.1.22":"pbeWithSHA256AndAES192-CBC","1.3.6.1.4.1.22554.1.2.1.2.1.42":"pbeWithSHA256AndAES256-CBC","1.2.840.113549":"rsa","1.2.840.113549.1.1.1":"rsaEncryption","1.2.840.113549.1.1.2":"md2withRSAEncryption","1.2.840.113549.1.1.3":"md4withRSAEncryption","1.2.840.113549.1.1.4":"md5withRSAEncryption","1.2.840.113549.1.1.5":"sha1withRSAEncryption","1.2.840.113549.1.1.7":"rsaes-oaep","1.2.840.113549.1.1.8":"mgf1","1.2.840.113549.1.1.9":"pSpecified","1.2.840.113549.1.1.10":"rsassa-pss","1.2.840.113549.1.1.11":"sha256withRSAEncryption","1.2.840.113549.1.1.12":"sha384withRSAEncryption","1.2.840.113549.1.1.13":"sha512withRSAEncryption","1.2.840.113549.1.2.7":"hmacWithSHA1","1.2.840.113549.1.2.8":"hmacWithSHA224","1.2.840.113549.1.2.9":"hmacWithSHA256","1.2.840.113549.1.2.10":"hmacWithSHA384","1.2.840.113549.1.2.11":"hmacWithSHA512","1.2.840.113549.1.3.1":"dhKeyAgreement","1.2.840.113549.1.5.12":"PBKDF2","1.2.840.113549.1.5.13":"PBES2","1.2.840.113549.1.5.14":"PBMAC1","1.2.840.113549.1.7.1":"data","1.2.840.113549.1.7.2":"signedData","1.2.840.113549.1.7.3":"envelopedData","1.2.840.113549.1.7.4":"signedAndEnvelopedData","1.2.840.113549.1.7.5":"digestedData","1.2.840.113549.1.7.6":"encryptedData","1.2.840.113549.1.9.1":"emailAddress","1.2.840.113549.1.9.2":"unstructuredName","1.2.840.113549.1.9.3":"contentType","1.2.840.113549.1.9.4":"messageDigest","1.2.840.113549.1.9.5":"signingTime","1.2.840.113549.1.9.6":"countersignature","1.2.840.113549.1.9.7":"challengePassword","1.2.840.113549.1.9.8":"unstructuredAddress","1.2.840.113549.1.9.9":"extendedCertificateAttributes","1.2.840.113549.1.9.10":"issuerAndSerialNumber","1.2.840.113549.1.9.11":"passwordCheck","1.2.840.113549.1.9.12":"publicKey","1.2.840.113549.1.9.13":"signingDescription","1.2.840.113549.1.9.14":"extensionRequest","1.2.840.113549.1.9.15":"sMimeCapabilities","1.2.840.113549.1.9.16":"sMimeObjectIdentifierRegistry","1.2.840.113549.1.9.16.1.2":"authData","1.2.840.113549.1.9.16.1.4 ":"timestampToken","1.2.840.113549.1.9.16.1.17 ":"firmwareLoadReceipt","1.2.840.113549.1.9.16.1.21":"encKeyWithID","1.2.840.113549.1.9.16.1.23":"authEnvelopedData","1.2.840.113549.1.9.16.2":"sMimeAttributes","1.2.840.113549.1.9.16.2.1":"receiptRequest","1.2.840.113549.1.9.16.2.12":"signingCertificate","1.2.840.113549.1.9.16.2.14":"timeStampToken","1.2.840.113549.1.9.16.2.2":"securityLabel","1.2.840.113549.1.9.16.2.3":"mlExpansionHistory","1.2.840.113549.1.9.16.2.34":"unsignedData","1.2.840.113549.1.9.16.2.47":"signingCertificateV2","1.2.840.113549.1.9.16.3.5":"ESDH","1.2.840.113549.1.9.20":"friendlyName","1.2.840.113549.1.9.21":"localKeyId","1.2.840.113549.1.9.22":"certTypes","1.2.840.113549.1.9.22.1":"x509Certificate","1.2.840.113549.1.9.22.2":"sdsiCertificate","1.2.840.113549.1.9.23":"crlTypes","1.2.840.113549.1.9.23.1":"x509CRL","1.2.840.113549.1.9.24":"secretTypes","1.2.840.113549.1.9.24.1":"secret","1.2.840.113549.1.9.25.1":"pkcs15Token","1.2.840.113549.1.9.25.2":"encryptedPrivateKeyInfo","1.2.840.113549.1.9.25.3":"randomNonce","1.2.840.113549.1.9.25.4":"sequenceNumber","1.2.840.113549.1.9.25.5":"pkcs7PDU","1.2.840.113549.1.9.26.1":"pkcs9String","1.2.840.113549.1.9.26.2":"signingTimeString","1.2.840.113549.1.9.27.1":"caseIgnoreMatch","1.2.840.113549.1.9.27.2":"signingTimeMatch","1.2.840.113549.1.12.0.1":"pkcs-12","1.2.840.113549.1.12.1":"pbe","1.2.840.113549.1.12.1.1":"pbeWithSHAAnd128BitRC4","1.2.840.113549.1.12.1.2":"pbeWithSHAAnd40BitRC4","1.2.840.113549.1.12.1.3":"pbeWithSHAAnd3-KeyTripleDES-CBC","1.2.840.113549.1.12.1.4":"pbeWithSHAAnd2-KeyTripleDES-CBC","1.2.840.113549.1.12.1.5":"pbeWithSHAAnd128BitRC2-CBC","1.2.840.113549.1.12.1.6":"pbeWithSHAAnd40BitRC2-CBC","1.2.840.113549.1.12.1.80":"pbeUnknownGost","1.2.840.113549.1.12.2.1":"pkcs8-key-shrouding","1.2.840.113549.1.12.3.1":"keyBagId","1.2.840.113549.1.12.3.2":"certAndCRLBagId","1.2.840.113549.1.12.3.3":"secretBagId","1.2.840.113549.1.12.3.4":"safeContentsId","1.2.840.113549.1.12.3.5":"pkcs-8ShroudedKeyBagId","1.2.840.113549.1.12.4.1":"x509CertCRLBagId","1.2.840.113549.1.12.4.2":"pkcs-12-SDSICertBag","1.2.840.113549.1.12.10.1.1":"keyBag","1.2.840.113549.1.12.10.1.2":"pkcs8ShroudedKeyBag","1.2.840.113549.1.12.10.1.3":"certBag","1.2.840.113549.1.12.10.1.4":"crlBag","1.2.840.113549.1.12.10.1.5":"secretBag","1.2.840.113549.1.12.10.1.6":"safeContentsBag","1.2.840.113549.2.5":"md-5","1.2.840.113549.3.7":"des-EDE3-CBC","1.3.132.0.34":"secp384r1","1.3.132.0.35":"secp521r1","1.3.132.112":"ecDH","1.3.14.3.2.26":"sha1","1.3.6.1.4.1.311.2.1.14":"msCertExtensions","1.3.6.1.4.1.311.17.1":"keyProviderNameAttr","1.3.6.1.4.1.311.17.2":"localMachineKeyset","1.3.6.1.4.1.311.17.3.20":"certKeyIdentifierPropId","1.3.6.1.4.1.5849":"SignalCom","1.3.6.1.4.1.5849.1.1.1":"id-sc-gost28147-ecb","1.3.6.1.4.1.5849.1.1.2":"id-sc-gost28147-gamma","1.3.6.1.4.1.5849.1.1.3":"id-sc-gost28147-gfb","1.3.6.1.4.1.5849.1.1.4":"id-sc-gost28147-mac","1.3.6.1.4.1.5849.1.1.5":"id-sc-gostR3410-94","1.3.6.1.4.1.5849.1.1.6.1.1.1":"id-sc-gostR3410-94-default","1.3.6.1.4.1.5849.1.1.6.1.1.2":"id-sc-gostR3410-94-test","1.3.6.1.4.1.5849.1.2.1":"id-sc-gostR3411-94","1.3.6.1.4.1.5849.1.3.1":"id-sc-gostR3411-94-with-gostR3410-94","1.3.6.1.4.1.5849.1.3.2":"id-sc-gostR3411-94-with-gostR3410-2001","1.3.6.1.4.1.5849.1.4.1":"id-sc-cmsGostWrap","1.3.6.1.4.1.5849.1.4.2":"id-sc-cmsGost28147Wrap","1.3.6.1.4.1.5849.1.5.1":"id-sc-pbeWithGost3411AndGost28147","1.3.6.1.4.1.5849.1.5.2":"id-sc-pbeWithGost3411AndGost28147CFB","1.3.6.1.4.1.5849.1.6.2":"id-sc-gostR3410-2001","1.3.6.1.4.1.5849.1.7.2":"id-sc-hmacWithGostR3411","1.3.6.1.4.1.5849.1.8.1":"id-sc-r3410-ESDH-r3411kdf","1.3.6.1.4.1.5849.1.8.3":"id-sc-ecdh-singlePass-cofactor-r3411kdf","1.3.6.1.4.1.5849.2.2.1":"id-sc-gostR3410-2001-publicKey","1.3.6.1.5.5.7.0.12":"attribute-cert","1.3.6.1.5.5.7.1.1":"authorityInfoAccess","1.3.6.1.5.5.7.1.4":"auditIdentity","1.3.6.1.5.5.7.1.6":"aaControls","1.3.6.1.5.5.7.1.10":"ac-proxying","1.3.6.1.5.5.7.1.11":"subjectInfoAccess","1.3.6.1.5.5.7.3.1":"serverAuth","1.3.6.1.5.5.7.3.2":"clientAuth","1.3.6.1.5.5.7.3.3":"codeSigning","1.3.6.1.5.5.7.3.4":"emailProtection","1.3.6.1.5.5.7.3.5":"ipsecEndSystem","1.3.6.1.5.5.7.3.6":"ipsecTunnel","1.3.6.1.5.5.7.3.7":"ipsecUser","1.3.6.1.5.5.7.3.8":"timeStamping","1.3.6.1.5.5.7.3.9":"OCSPSigning","1.3.6.1.5.5.7.5.1":"regCtrl","1.3.6.1.5.5.7.5.1.1":"regToken","1.3.6.1.5.5.7.5.1.2":"authenticator","1.3.6.1.5.5.7.5.1.3":"pkiPublicationInfo","1.3.6.1.5.5.7.5.1.4":"pkiArchiveOptions","1.3.6.1.5.5.7.5.1.5":"oldCertID","1.3.6.1.5.5.7.5.1.6":"protocolEncrKey","1.3.6.1.5.5.7.5.2":"regInfoAttr","1.3.6.1.5.5.7.5.2.1":"UTF8Pairs","1.3.6.1.5.5.7.5.2.2":"certReq","1.3.6.1.5.5.7.6.2":"noSignature","1.3.6.1.5.5.7.7.1":"statusInfo","1.3.6.1.5.5.7.7.2":"identification","1.3.6.1.5.5.7.7.3":"identityProof","1.3.6.1.5.5.7.7.4":"dataReturn","1.3.6.1.5.5.7.7.5":"transactionId","1.3.6.1.5.5.7.7.6":"senderNonce","1.3.6.1.5.5.7.7.7":"recipientNonce","1.3.6.1.5.5.7.7.8":"addExtensions","1.3.6.1.5.5.7.7.9":"encryptedPOP","1.3.6.1.5.5.7.7.10":"decryptedPOP","1.3.6.1.5.5.7.7.11":"lraPOPWitness","1.3.6.1.5.5.7.7.15":"getCert","1.3.6.1.5.5.7.7.16":"getCRL","1.3.6.1.5.5.7.7.17":"revokeRequest","1.3.6.1.5.5.7.7.18":"regInfo","1.3.6.1.5.5.7.7.19":"responseInfo","1.3.6.1.5.5.7.7.21":"queryPending","1.3.6.1.5.5.7.7.22":"popLinkRandom","1.3.6.1.5.5.7.7.23":"popLinkWitness","1.3.6.1.5.5.7.7.24":"confirmCertAcceptance","1.3.6.1.5.5.7.7.25":"statusInfoV2","1.3.6.1.5.5.7.7.26":"trustedAnchors","1.3.6.1.5.5.7.7.27":"authPublish","1.3.6.1.5.5.7.7.28":"batchRequests","1.3.6.1.5.5.7.7.29":"batchResponses","1.3.6.1.5.5.7.7.30":"publishCert","1.3.6.1.5.5.7.7.31":"modCertTemplate","1.3.6.1.5.5.7.7.32":"controlProcessed","1.3.6.1.5.5.7.7.33":"popLinkWitnessV2","1.3.6.1.5.5.7.7.34":"identityProofV2","1.3.6.1.5.5.7.9.1":"dateOfBirth","1.3.6.1.5.5.7.9.2":"placeOfBirth","1.3.6.1.5.5.7.9.3":"gender","1.3.6.1.5.5.7.9.4":"countryOfCitizenship","1.3.6.1.5.5.7.9.5":"countryOfResidence","1.3.6.1.5.5.7.10.1":"authenticationInfo","1.3.6.1.5.5.7.10.2":"accessIdentity","1.3.6.1.5.5.7.10.3":"chargingIdentity","1.3.6.1.5.5.7.10.4":"group","1.3.6.1.5.5.7.10.6":"encAttrs","1.3.6.1.5.5.7.12.2":"PKIData","1.3.6.1.5.5.7.12.3":"PKIResponse","1.3.6.1.5.5.7.48.1.1":"ocsp-basic","1.3.6.1.5.5.7.48.1.2":"ocsp-nonce","1.3.6.1.5.5.7.48.1.3":"ocsp-crl","1.3.6.1.5.5.7.48.1.4":"ocsp-response","1.3.6.1.5.5.7.48.1.5":"ocsp-nocheck","1.3.6.1.5.5.7.48.1.6":"ocsp-archive-cutoff","1.3.6.1.5.5.7.48.1.7":"ocsp-service-locator","2.16.840.1.101.2.1.2.78.2":"encryptedKeyPkg","2.16.840.1.101.2.1.2.78.3":"keyPackageReceipt","2.16.840.1.101.2.1.2.78.5":"aKeyPackage","2.16.840.1.101.2.1.2.78.6":"keyPackageError","2.16.840.1.101.3.4":"nistAlgorithms","2.16.840.1.101.3.4.1":"aes","2.16.840.1.101.3.4.1.1":"aes128-ECB","2.16.840.1.101.3.4.1.2":"aes128-CBC","2.16.840.1.101.3.4.1.3":"aes128-OFB","2.16.840.1.101.3.4.1.4":"aes128-CFB","2.16.840.1.101.3.4.1.5":"aes128-wrap","2.16.840.1.101.3.4.1.6":"aes128-GCM","2.16.840.1.101.3.4.1.7":"aes128-CCM","2.16.840.1.101.3.4.1.8":"aes128-wrap-pad","2.16.840.1.101.3.4.1.21":"aes192-ECB","2.16.840.1.101.3.4.1.22":"aes192-CBC","2.16.840.1.101.3.4.1.23":"aes192-OFB","2.16.840.1.101.3.4.1.24":"aes192-CFB","2.16.840.1.101.3.4.1.25":"aes192-wrap","2.16.840.1.101.3.4.1.26":"aes192-GCM","2.16.840.1.101.3.4.1.27":"aes192-CCM","2.16.840.1.101.3.4.1.28":"aes192-wrap-pad","2.16.840.1.101.3.4.1.41":"aes256-ECB","2.16.840.1.101.3.4.1.42":"aes256-CBC","2.16.840.1.101.3.4.1.43":"aes256-OFB","2.16.840.1.101.3.4.1.44":"aes256-CFB","2.16.840.1.101.3.4.1.45":"aes256-wrap","2.16.840.1.101.3.4.1.46":"aes256-GCM","2.16.840.1.101.3.4.1.47":"aes256-CCM","2.16.840.1.101.3.4.1.48":"aes256-wrap-pad","2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512","2.16.840.1.113730.3.1.216":"userPKCS12","2.5.1.5.55":"clearance","2.5.4.0":"objectClass","2.5.4.1":"aliasedEntryName","2.5.4.2":"knowldgeinformation","2.5.4.3":"commonName","2.5.4.4":"surName","2.5.4.5":"serialName","2.5.4.6":"countryName","2.5.4.7":"localityName","2.5.4.8":"stateOrProvinceName","2.5.4.9":"streetAddress","2.5.4.10":"organizationName","2.5.4.11":"organizationalUnitName","2.5.4.12":"title","2.5.4.13":"description","2.5.4.14":"searchGuide","2.5.4.15":"businessCategory","2.5.4.16":"postalAddress","2.5.4.17":"postalCode","2.5.4.18":"postOfficeBox","2.5.4.19":"physicalDeliveryOfficeName","2.5.4.20":"telephoneNumber","2.5.4.21":"telexNumber","2.5.4.22":"teletexTerminalIdentifier","2.5.4.23":"facsimileTelephoneNumber","2.5.4.24":"x121Address","2.5.4.25":"internationalISDNNumber","2.5.4.26":"registeredAddress","2.5.4.27":"destinationIndicator","2.5.4.28":"preferredDeliveryMethod","2.5.4.29":"presentationAddress","2.5.4.30":"supportedApplicationContext","2.5.4.31":"member","2.5.4.32":"owner","2.5.4.33":"roleOccupant","2.5.4.34":"seeAlso","2.5.4.35":"userPassword","2.5.4.36":"userCertificate","2.5.4.37":"cACertificate","2.5.4.38":"authorityRevocationList","2.5.4.39":"certificateRevocationList","2.5.4.40":"crossCertificatePair","2.5.4.41":"name","2.5.4.42":"givenName","2.5.4.43":"initials","2.5.4.44":"generationQualifier","2.5.4.45":"uniqueIdentifier","2.5.4.46":"dnQualifier","2.5.4.47":"enhancedSearchGuide","2.5.4.48":"protocolInformation","2.5.4.49":"distinguishedName","2.5.4.50":"uniqueMember","2.5.4.51":"houseIdentifier","2.5.4.52":"supportedAlgorithms","2.5.4.53":"deltaRevocationList","2.5.4.58":"attributeCertificate","2.5.4.65":"pseudonym","2.5.4.72":"role","2.5.29.1":"authorityKeyIdentifierX","2.5.29.2":"keyAttributesX","2.5.29.3":"certificatePoliciesX","2.5.29.4":"keyUsageRestriction","2.5.29.5":"policyMapping","2.5.29.6":"subtreesConstraint","2.5.29.7":"subjectAltNameX","2.5.29.8":"issuerAltNameX","2.5.29.9":"subjectDirectoryAttributes","2.5.29.10":"basicConstraintsX","2.5.29.11":"nameConstraintsX","2.5.29.12":"policyConstraintsX","2.5.29.13":"basicConstraintsY","2.5.29.14":"subjectKeyIdentifier","2.5.29.15":"keyUsage","2.5.29.16":"privateKeyUsagePeriod","2.5.29.17":"subjectAltName","2.5.29.18":"issuerAltName","2.5.29.19":"basicConstraints","2.5.29.20":"cRLNumber","2.5.29.21":"cRLReason","2.5.29.22":"expirationDate","2.5.29.23":"instructionCode","2.5.29.24":"invalidityDate","2.5.29.25":"cRLDistributionPointsX","2.5.29.26":"issuingDistributionPointX","2.5.29.27":"deltaCRLIndicator","2.5.29.28":"issuingDistributionPoint","2.5.29.29":"certificateIssuer","2.5.29.30":"nameConstraints","2.5.29.31":"cRLDistributionPoints","2.5.29.32":"certificatePolicies","2.5.29.33":"policyMappings","2.5.29.34":"policyConstraintsY","2.5.29.35":"authorityKeyIdentifier","2.5.29.36":"policyConstraints","2.5.29.37":"extKeyUsage","2.5.29.46":"freshestCRL","2.5.29.54":"inhibitAnyPolicy","2.5.29.55":"targetInformation","2.5.29.56":"noRevAvail"},n={};for(var o in t)n[t[o]]=o;var i={"id-GostR3411-94-with-GostR3410-2001":"GOST R 34.10-2001/GOST R 34.11-94","id-GostR3411-94-with-GostR3410-94":"GOST R 34.10-94/GOST R 34.11-94","id-GostR3411-94":"GOST R 34.11-94","id-HMACGostR3411-94":{name:"HMAC",hash:{name:"GOST R 34.11-94"}},"id-Gost28147-89-None-KeyWrap":"GOST 28147-89-KW","id-Gost28147-89-CryptoPro-KeyWrap":"GOST 28147-89-CPKW","id-GostR3410-2001":"GOST R 34.10-2001","id-GostR3410-94":"GOST R 34.10-94","id-GostR3410-94-a":"GOST R 34.10-94","id-GostR3410-94-aBis":"GOST R 34.10-94","id-GostR3410-94-b":"GOST R 34.10-94","id-GostR3410-94-bBis":"GOST R 34.10-94","id-Gost28147-89":"GOST 28147-89","id-Gost28147-89-MAC":"GOST 28147-89-MAC","id-GostR3410-2001-CryptoPro-ESDH":"GOST R 34.10-2001-DH/GOST R 34.11-94","id-GostR3410-94-CryptoPro-ESDH":"GOST R 34.10-94-DH/GOST R 34.11-94","id-GostR3410-2001DH":"GOST R 34.10-2001-DH","id-GostR3410-94DH":"GOST R 34.10-94-DH","id-tc26-gost3410-12-256":"GOST R 34.10-256","id-tc26-gost3410-12-512":"GOST R 34.10-512","id-tc26-gost3411-94":"GOST R 34.11-94","id-tc26-gost3411-12-256":"GOST R 34.11-256","id-tc26-gost3411-12-512":"GOST R 34.11-512","id-tc26-signwithdigest-gost3410-12-94":"GOST R 34.10-256/GOST R 34.11-94","id-tc26-signwithdigest-gost3410-12-256":"GOST R 34.10-256/GOST R 34.11-256","id-tc26-signwithdigest-gost3410-12-512":"GOST R 34.10-512/GOST R 34.11-512","id-tc26-hmac-gost-3411-12-256":{name:"HMAC",hash:{name:"GOST R 34.11-256"}},"id-tc26-hmac-gost-3411-12-512":{name:"HMAC",hash:{name:"GOST R 34.11-512"}},"id-tc26-agreement-gost-3410-12-256":"GOST R 34.10-256-DH/GOST R 34.11-256","id-tc26-agreement-gost-3410-12-512":"GOST R 34.10-512-DH/GOST R 34.11-256","id-sc-gost28147-ecb":"GOST 28147-89-ECB/SC","id-sc-gost28147-gamma":"GOST 28147-89-CTR/SC","id-sc-gost28147-gfb":"GOST 28147-89-CFB/SC","id-sc-gost28147-mac":"GOST 28147-89-MAC/SC","id-sc-gostR3410-94":"GOST R 34.10-94/SC","id-sc-gostR3410-94-default":"GOST R 34.10-94/SC","id-sc-gostR3410-94-test":"GOST R 34.10-94/SC/S-TEST","id-sc-gostR3411-94":"GOST R 34.11-94/SC","id-sc-gostR3411-94-with-gostR3410-94":"GOST R 34.10-94/GOST R 34.11-94/SC","id-sc-gostR3411-94-with-gostR3410-2001":"GOST R 34.10-2001/GOST R 34.11-94/SC","id-sc-cmsGostWrap":"GOST 28147-89-SCKW/SC","id-sc-cmsGost28147Wrap":"GOST 28147-89-KW/SC","id-sc-pbeWithGost3411AndGost28147":{derivation:{name:"GOST R 34.11-94-PBKDF2/SC"},encryption:{name:"GOST 28147-ECB/SC"}},"id-sc-pbeWithGost3411AndGost28147CFB":{derivation:{name:"GOST R 34.11-94-PBKDF2/SC"},encryption:{name:"GOST 28147-CFB/SC"}},"id-sc-gostR3410-2001":"GOST R 34.10-2001/SC","id-sc-hmacWithGostR3411":{name:"HMAC",hash:{name:"GOST R 34.11-94/SC"}},"id-sc-r3410-ESDH-r3411kdf":"GOST R 34.10-2001-DH/GOST R 34.11-94/SC",noSignature:"NONE",rsaEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},sha1withRSAEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}},sha256withRSAEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},sha384withRSAEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}},sha512withRSAEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}},"rsaes-oaep":"RSA-OAEP","rsassa-pss":"RSA-PSS",ecdsa:"ECDSA","ecdsa-with-SHA1":{name:"ECDSA",hash:{name:"SHA-1"}},"ecdsa-with-SHA256":{name:"ECDSA",hash:{name:"SHA-256"}},"ecdsa-with-SHA384":{name:"ECDSA",hash:{name:"SHA-384"}},"ecdsa-with-SHA512":{name:"ECDSA",hash:{name:"SHA-512"}},"pbeWithSHAAndAES128-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-1"}},encryption:{name:"AES-CBC",length:128}},"pbeWithSHAAndAES192-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-1"}},encryption:{name:"AES-CBC",length:192}},"pbeWithSHAAndAES256-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-1"}},encryption:{name:"AES-CBC",length:256}},"pbeWithSHA256AndAES128-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-256"}},encryption:{name:"AES-CBC",length:128}},"pbeWithSHA256AndAES192-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-256"}},encryption:{name:"AES-CBC",length:192}},"pbeWithSHA256AndAES256-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-256"}},encryption:{name:"AES-CBC",length:256}},"pbeWithSHAAnd3-KeyTripleDES-CBC":{derivation:{name:"PFXKDF",iterations:2e3,hash:"SHA-1"},encryption:{name:"3DES",block:"CBC"}},"pbeWithSHAAnd2-KeyTripleDES-CBC":{derivation:{name:"PFXKDF",iterations:2e3,hash:"SHA-1"},encryption:{name:"2DES",block:"CBC"}},"pbeWithSHAAnd128BitRC2-CBC":{derivation:{name:"PFXKDF",iterations:2e3,hash:"SHA-1"},encryption:{name:"RC2",block:"CBC",length:128}},"pbeWithSHAAnd40BitRC2-CBC":{derivation:{name:"PFXKDF",iterations:2e3,hash:"SHA-1"},encryption:{name:"RC2",block:"CBC",length:40}},pbeUnknownGost:{derivation:{name:"PFXKDF",iterations:2e3,hash:"GOST R 34.11-94"},encryption:{name:"GOST 28147-89-CFB"}},ecDH:"ECDH",dhKeyAgreement:"DH","aes128-CBC":{name:"AES-CBC",length:128},"aes128-CFB":{name:"AES-CFB-8",length:128},"aes128-GCM":{name:"AES-GCM",length:128},"aes128-wrap":{name:"AES-KW",length:128},"aes192-CBC":{name:"AES-CBC",length:192},"aes192-CFB":{name:"AES-CFB-8",length:192},"aes192-GCM":{name:"AES-GCM",length:192},"aes192-wrap":{name:"AES-KW",length:192},"aes256-CBC":{name:"AES-CBC",length:256},"aes256-CFB":{name:"AES-CFB-8",length:256},"aes256-GCM":{name:"AES-GCM",length:256},"aes256-wrap":{name:"AES-KW",length:256},sha1:"SHA-1",sha256:"SHA-256",sha384:"SHA-384",sha512:"SHA-512",PBKDF2:"PBKDF2",PBES2:{derivation:{name:"PBKDF2"},encryption:{}},PBMAC1:{derivation:{name:"PBKDF2"},hmac:{}},hmacWithSHA1:"SHA-1-HMAC",hmacWithSHA256:{name:"HMAC",hash:{name:"SHA-256"}},hmacWithSHA384:{name:"HMAC",hash:{name:"SHA-384"}},hmacWithSHA512:{name:"HMAC",hash:{name:"SHA-512"}}};for(var o in i){var s=i[o];"string"==typeof s&&(s={name:s}),i[s.id=o]=s}var a={"CP-94":{title:"Crypto-Pro GOST R 34.10-94 Cryptographic Service Provider",signature:i["id-GostR3411-94-with-GostR3410-94"],publicKey:{id:"id-GostR3410-94",name:"GOST R 34.10-94",namedParam:"X-A"},privateKey:{id:"id-GostR3410-94DH",name:"GOST R 34.10-94-DH",namedParam:"X-A"},digest:i["id-GostR3411-94"],wrapping:{id:"id-Gost28147-89-CryptoPro-KeyWrap",name:"GOST 28147-89-CPKW",sBox:"E-A"},hmac:i["id-HMACGostR3411-94"],agreement:i["id-GostR3410-94-CryptoPro-ESDH"],encryption:{id:"id-Gost28147-89",name:"GOST 28147-89",block:"CFB",sBox:"E-A",keyMeshing:"CP"},derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2",iterations:2e3}},"CP-01":{title:"Crypto-Pro GOST R 34.10-2001 Cryptographic Service Provider",signature:i["id-GostR3411-94-with-GostR3410-2001"],publicKey:{id:"id-GostR3410-2001",name:"GOST R 34.10-2001",namedCurve:"X-256-A"},privateKey:{id:"id-GostR3410-2001DH",name:"GOST R 34.10-2001-DH",namedCurve:"X-256-A"},digest:{id:"id-GostR3411-94",name:"GOST R 34.11-94",sBox:"D-A"},wrapping:{id:"id-Gost28147-89-CryptoPro-KeyWrap",name:"GOST 28147-89-CPKW",sBox:"E-A"},hmac:i["id-HMACGostR3411-94"],agreement:i["id-GostR3410-2001-CryptoPro-ESDH"],encryption:{id:"id-Gost28147-89",name:"GOST 28147-89-CFB-CPKM",sBox:"E-A"},derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2",iterations:2e3}},"TC-256":{title:"Crypto-Pro GOST R 34.10-2012 Cryptographic Service Provider",signature:i["id-tc26-signwithdigest-gost3410-12-256"],publicKey:{id:"id-tc26-gost3410-12-256",name:"GOST R 34.10-256",namedCurve:"X-256-A"},privateKey:{id:"id-tc26-agreement-gost-3410-12-256",name:"GOST R 34.10-256-DH/GOST R 34.11-256",namedCurve:"X-256-A"},digest:i["id-tc26-gost3411-12-256"],wrapping:{id:"id-Gost28147-89-CryptoPro-KeyWrap",name:"GOST 28147-89-CPKW",sBox:"E-A"},hmac:i["id-tc26-hmac-gost-3411-12-256"],agreement:i["id-tc26-agreement-gost-3410-12-256"],encryption:{id:"id-Gost28147-89",name:"GOST 28147-89-CFB-CPKM",sBox:"E-A"},derivation:{id:"PBKDF2",name:"GOST R 34.11-256-12-PBKDF2",iterations:2e3}},"TC-512":{title:"Crypto-Pro GOST R 34.10-2012 Strong Cryptographic Service Provider",signature:i["id-tc26-signwithdigest-gost3410-12-512"],publicKey:{id:"id-tc26-gost3410-12-512",name:"GOST R 34.10-512",namedCurve:"T-512-A"},privateKey:{id:"id-tc26-agreement-gost-3410-12-512",name:"GOST R 34.10-512-DH/GOST R 34.11-256",namedCurve:"T-512-A"},digest:i["id-tc26-gost3411-12-512"],wrapping:{id:"id-Gost28147-89-CryptoPro-KeyWrap",name:"GOST 28147-89-CPKW",sBox:"E-A"},hmac:i["id-tc26-hmac-gost-3411-12-512"],agreement:i["id-tc26-agreement-gost-3410-12-512"],encryption:{id:"id-Gost28147-89",name:"GOST 28147-89-CFB-CPKM",sBox:"E-A"},derivation:{id:"PBKDF2",name:"GOST R 34.11-256-PBKDF2",iterations:2e3}},"SC-94":{title:"Signal-COM GOST Cryptographic Provider",signature:i["id-sc-gostR3411-94-with-gostR3410-94"],publicKey:{id:"id-sc-gostR3410-94",name:"GOST R 34.10-94/SC",namedParam:"S-A"},privateKey:{id:"id-sc-gostR3410-94",name:"GOST R 34.10-94/SC",modulusLength:1024,param:{p:"0xB4E25EFB018E3C8B87505E2A67553C5EDC56C2914B7E4F89D23F03F03377E70A2903489DD60E78418D3D851EDB5317C4871E40B04228C3B7902963C4B7D85D52B9AA88F2AFDBEB28DA8869D6DF846A1D98924E925561BD69300B9DDD05D247B5922D967CBB02671881C57D10E5EF72D3E6DAD4223DC82AA1F7D0294651A480DF",q:"0x972432A437178B30BD96195B773789AB2FFF15594B176DD175B63256EE5AF2CF",a:"0x8FD36731237654BBE41F5F1F8453E71CA414FFC22C25D915309E5D2E62A2A26C7111F3FC79568DAFA028042FE1A52A0489805C0DE9A1A469C844C7CABBEE625C3078888C1D85EEA883F1AD5BC4E6776E8E1A0750912DF64F79956499F1E182475B0B60E2632ADCD8CF94E9C54FD1F3B109D81F00BF2AB8CB862ADF7D40B9369A"}},digest:i["id-sc-gostR3411-94"],encryption:{id:"id-sc-gost28147-gfb",name:"GOST 28147-89-CFB/SC"},hmac:i["id-sc-hmacWithGostR3411"],wrapping:["id-sc-cmsGostWrap"],agreement:i["id-sc-r3410-ESDH-r3411kdf"],derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2/SC",iterations:2048},pbes:{id:"id-sc-pbeWithGost3411AndGost28147CFB",derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2/SC",iterations:2048},encryption:{id:"id-sc-gost28147-gfb",name:"GOST 28147-CFB/SC",iv:new Uint8Array([0,0,0,0,0,0,0,0])}}},"SC-01":{title:"Signal-COM ECGOST Cryptographic Provider",signature:i["id-sc-gostR3411-94-with-gostR3410-2001"],publicKey:{id:"id-sc-gostR3410-2001",name:"GOST R 34.10-2001/SC",namedCurve:"P-256"},privateKey:{id:"id-sc-gostR3410-2001",name:"GOST R 34.10-2001/SC",curve:{p:"0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",a:"0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",b:"0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",x:"0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",y:"0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",q:"0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"}},digest:i["id-sc-gostR3411-94"],encryption:{id:"id-sc-gost28147-gfb",name:"GOST 28147-89-CFB/SC"},hmac:i["id-sc-hmacWithGostR3411"],wrapping:i["id-sc-cmsGostWrap"],agreement:i["id-sc-r3410-ESDH-r3411kdf"],derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2/SC",iterations:2048},pbes:{id:"id-sc-pbeWithGost3411AndGost28147CFB",derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2/SC",iterations:2048},encryption:{id:"id-sc-gost28147-gfb",name:"GOST 28147-CFB/SC",iv:new Uint8Array([0,0,0,0,0,0,0,0])}}},"RSA-2048":{title:"Microsoft Strong Cryptographic Provider",signature:i.sha256withRSAEncryption,publicKey:{id:"rsaEncryption",name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:i.sha256},privateKey:{id:"rsaEncryption",name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:i.sha256},digest:i.sha256,encryption:i["aes256-CFB"],hmac:i.hmacWithSHA256},"ECDSA-256":{title:"Microsoft Base DSS and Diffie-Hellman Cryptographic Provider",signature:i["ecdsa-with-SHA256"],publicKey:{id:"ecdsa",name:"ECDSA",namedCurve:"P-256"},privateKey:{id:"ecdsa",name:"ECDSA",namedCurve:"P-256"},digest:i.sha256,encryption:i["aes256-CFB"],hmac:i.hmacWithSHA256,agreement:i.ecDH}};function u(){}["CP-94","CP-01","TC-256","TC-512","SC-94","SC-01"].forEach(function(e){var t=a[e];t.hmac=r(t.hmac,{hash:t.digest}),t.derivation=r(t.derivation,{hash:t.digest,hmac:t.hmac}),t.pbes=t.pbes||{id:"PBES2",derivation:t.derivation,encryption:t.encryption},t.pbmac=t.pbmac||{id:"PBMAC1",derivation:t.derivation,hmac:t.hmac},t.agreement=r(t.agreement,{wrapping:t.wrapping})}),["RSA-2048","ECDSA-256"].forEach(function(e){var t=a[e];t.derivation=t.derivation||{id:"PBKDF2",name:"PBKDF2",iterations:2048,hash:t.digest},t.pbes=t.pbes||{id:"PBES2",derivation:t.derivation,encryption:t.encryption},t.pbmac=t.pbmac||{id:"PBMAC1",derivation:t.derivation,hmac:t.hmac}}),u.prototype={names:t,identifiers:n,algorithms:i,parameters:{"id-GostR3410-94-TestParamSet":{namedParam:"S-TEST"},"id-GostR3410-94-CryptoPro-A-ParamSet":{namedParam:"S-A"},"id-GostR3410-94-CryptoPro-B-ParamSet":{namedParam:"S-B"},"id-GostR3410-94-CryptoPro-C-ParamSet":{namedParam:"S-C"},"id-GostR3410-94-CryptoPro-D-ParamSet":{namedParam:"S-D"},"id-GostR3410-94-CryptoPro-XchA-ParamSet":{namedParam:"X-A"},"id-GostR3410-94-CryptoPro-XchB-ParamSet":{namedParam:"X-B"},"id-GostR3410-94-CryptoPro-XchC-ParamSet":{namedParam:"X-C"},"id-GostR3410-2001-CryptoPro-TestParamSet":{namedCurve:"S-256-TEST"},"id-GostR3410-2001-CryptoPro-A-ParamSet":{namedCurve:"S-256-A"},"id-GostR3410-2001-CryptoPro-B-ParamSet":{namedCurve:"S-256-B"},"id-GostR3410-2001-CryptoPro-C-ParamSet":{namedCurve:"S-256-C"},"id-GostR3410-2001-CryptoPro-XchA-ParamSet":{namedCurve:"X-256-A"},"id-GostR3410-2001-CryptoPro-XchB-ParamSet":{namedCurve:"X-256-B"},"id-tc26-gost-3410-12-256-paramSetTest":{namedCurve:"T-256-TEST"},"id-tc26-gost-3410-12-256-paramSetA":{namedCurve:"T-256-A"},"id-tc26-gost-3410-12-256-paramSetB":{namedCurve:"T-256-B"},"id-tc26-gost-3410-12-512-paramSetTest":{namedCurve:"T-512-TEST"},"id-tc26-gost-3410-12-512-paramSetA":{namedCurve:"T-512-A"},"id-tc26-gost-3410-12-512-paramSetB":{namedCurve:"T-512-B"},"id-tc26-gost-3410-12-512-paramSetC":{namedCurve:"T-512-C"},"id-tc26-gost-3410-12-512-paramSetD":{namedCurve:"T-512-D"},secp256r1:{namedCurve:"P-256"},secp384r:{namedCurve:"P-384"},secp521r:{namedCurve:"P-521"},"id-GostR3411-94-TestParamSet":{sBox:"D-TEST"},"id-GostR3411-94-CryptoProParamSet":{sBox:"D-A"},"id-GostR3411-94-CryptoPro-A-ParamSet":{sBox:"D-B"},"id-GostR3411-94-CryptoPro-B-ParamSet":{sBox:"D-C"},"id-GostR3411-94-CryptoPro-C-ParamSet":{sBox:"D-D"},"id-Gost28147-89-TestParamSet":{block:"CTR",sBox:"E-TEST"},"id-Gost28147-89-CryptoPro-A-ParamSet":{block:"CFB",sBox:"E-A",keyMeshing:"CP"},"id-Gost28147-89-CryptoPro-B-ParamSet":{block:"CFB",sBox:"E-B",keyMeshing:"CP"},"id-Gost28147-89-CryptoPro-C-ParamSet":{block:"CFB",sBox:"E-C",keyMeshing:"CP"},"id-Gost28147-89-CryptoPro-D-ParamSet":{block:"CFB",sBox:"E-D",keyMeshing:"CP"},"id-Gost28147-89-None-KeyMeshing":{keyMeshing:"NO"},"id-Gost28147-89-CryptoPro-KeyMeshing":{keyMeshing:"CP"},"id-tc26-gost-28147-param-Z":{block:"CFB",sBox:"E-Z"}},attributes:{sBox:{"D-TEST":"id-GostR3411-94-TestParamSet","D-A":"id-GostR3411-94-CryptoProParamSet","D-B":"id-GostR3411-94-CryptoPro-A-ParamSet","D-C":"id-GostR3411-94-CryptoPro-B-ParamSet","D-D":"id-GostR3411-94-CryptoPro-C-ParamSet","E-TEST":"id-Gost28147-89-TestParamSet","E-A":"id-Gost28147-89-CryptoPro-A-ParamSet","E-B":"id-Gost28147-89-CryptoPro-B-ParamSet","E-C":"id-Gost28147-89-CryptoPro-C-ParamSet","E-D":"id-Gost28147-89-CryptoPro-D-ParamSet","E-Z":"id-tc26-gost-28147-param-Z","D-256":"id-tc26-gost3411-12-256","D-512":"id-tc26-gost3411-12-512"},namedParam:{"S-TEST":"id-GostR3410-94-TestParamSet","S-A":"id-GostR3410-94-CryptoPro-A-ParamSet","S-B":"id-GostR3410-94-CryptoPro-B-ParamSet","S-C":"id-GostR3410-94-CryptoPro-C-ParamSet","S-D":"id-GostR3410-94-CryptoPro-D-ParamSet","X-A":"id-GostR3410-94-CryptoPro-XchA-ParamSet","X-B":"id-GostR3410-94-CryptoPro-XchB-ParamSet","X-C":"id-GostR3410-94-CryptoPro-XchC-ParamSet"},namedCurve:{"S-256-TEST":"id-GostR3410-2001-CryptoPro-TestParamSet","S-256-A":"id-GostR3410-2001-CryptoPro-A-ParamSet","S-256-B":"id-GostR3410-2001-CryptoPro-B-ParamSet","S-256-C":"id-GostR3410-2001-CryptoPro-C-ParamSet","X-256-A":"id-GostR3410-2001-CryptoPro-XchA-ParamSet","X-256-B":"id-GostR3410-2001-CryptoPro-XchB-ParamSet","P-256":"secp256r1","T-256-TEST":"id-tc26-gost-3410-12-256-paramSetTest","T-256-A":"id-tc26-gost-3410-12-256-paramSetA","T-256-B":"id-tc26-gost-3410-12-256-paramSetB","T-512-TEST":"id-tc26-gost-3410-12-512-paramSetTest","T-512-A":"id-tc26-gost-3410-12-512-paramSetA","T-512-B":"id-tc26-gost-3410-12-512-paramSetB"}},providers:a},e.security=new u},"function"==typeof define&&define.amd?define(["gostCrypto"],e):"object"===(void 0===n?"undefined":f(n))?r.exports=e(t("./gostCrypto")):(void 0).GostSecurity=e((void 0).gostCrypto)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostCrypto":110}],116:[function(t,r,n){(function(Le){"use strict";function Ne(e){return(Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e;e=function(n,h){var p="object"===("undefined"==typeof self?"undefined":Ne(self))&&self.self===self&&self||"object"===(void 0===Le?"undefined":Ne(Le))&&Le.global===Le&&Le||this,o=p.crypto||p.msCrypto,t=p.ArrayBuffer,w=p.OperationError||p.Error,i=p.DataError||p.Error,d=p.NotSupportedError||p.Error,y={"S-256-TEST":{a:7,b:"0x5FBFF498AA938CE739B8E022FBAFEF40563F6E6A3472FC2A514C0CE9DAE23B7E",p:"0x8000000000000000000000000000000000000000000000000000000000000431",q:"0x8000000000000000000000000000000150FE8A1892976154C59CFC193ACCF5B3",x:2,y:"0x8E2A8A0E65147D4BD6316030E16D19C85C97F0A9CA267122B96ABBCEA7E8FC8"},"S-256-A":{a:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD94",b:166,p:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD97",q:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6C611070995AD10045841B09B761B893",x:1,y:"0x8D91E471E0989CDA27DF505A453F2B7635294F2DDF23E3B122ACC99C9E9F1E14"},"S-256-B":{a:"0x8000000000000000000000000000000000000000000000000000000000000C96",b:"0x3E1AF419A269A5F866A7D3C25C3DF80AE979259373FF2B182F49D4CE7E1BBC8B",p:"0x8000000000000000000000000000000000000000000000000000000000000C99",q:"0x800000000000000000000000000000015F700CFFF1A624E5E497161BCC8A198F",x:1,y:"0x3FA8124359F96680B83D1C3EB2C070E5C545C9858D03ECFB744BF8D717717EFC"},"S-256-C":{a:"0x9B9F605F5A858107AB1EC85E6B41C8AACF846E86789051D37998F7B9022D7598",b:32858,p:"0x9B9F605F5A858107AB1EC85E6B41C8AACF846E86789051D37998F7B9022D759B",q:"0x9B9F605F5A858107AB1EC85E6B41C8AA582CA3511EDDFB74F02F3A6598980BB9",x:0,y:"0x41ECE55743711A8C3CBF3783CD08C0EE4D4DC440D4641A8F366E550DFDB3BB67"},"P-256":{p:"0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",a:"0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",b:"0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",x:"0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",y:"0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",q:"0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"},"T-512-TEST":{a:7,b:"0x1CFF0806A31116DA29D8CFA54E57EB748BC5F377E49400FDD788B649ECA1AC4361834013B2AD7322480A89CA58E0CF74BC9E540C2ADD6897FAD0A3084F302ADC",p:"0x4531ACD1FE0023C7550D267B6B2FEE80922B14B2FFB90F04D4EB7C09B5D2D15DF1D852741AF4704A0458047E80E4546D35B8336FAC224DD81664BBF528BE6373",q:"0x4531ACD1FE0023C7550D267B6B2FEE80922B14B2FFB90F04D4EB7C09B5D2D15DA82F2D7ECB1DBAC719905C5EECC423F1D86E25EDBE23C595D644AAF187E6E6DF",x:"0x24D19CC64572EE30F396BF6EBBFD7A6C5213B3B3D7057CC825F91093A68CD762FD60611262CD838DC6B60AA7EEE804E28BC849977FAC33B4B530F1B120248A9A",y:"0x2BB312A43BD2CE6E0D020613C857ACDDCFBF061E91E5F2C3F32447C259F39B2C83AB156D77F1496BF7EB3351E1EE4E43DC1A18B91B24640B6DBB92CB1ADD371E"},"T-512-A":{p:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC7",a:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC4",b:"0xE8C2505DEDFC86DDC1BD0B2B6667F1DA34B82574761CB0E879BD081CFD0B6265EE3CB090F30D27614CB4574010DA90DD862EF9D4EBEE4761503190785A71C760",q:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF27E69532F48D89116FF22B8D4E0560609B4B38ABFAD2B85DCACDB1411F10B275",x:3,y:"0x7503CFE87A836AE3A61B8816E25450E6CE5E1C93ACF1ABC1778064FDCBEFA921DF1626BE4FD036E93D75E6A50E3A41E98028FE5FC235F5B889A589CB5215F2A4"},"T-512-B":{p:"0x8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006F",a:"0x8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006C",b:"0x687D1B459DC841457E3E06CF6F5E2517B97C7D614AF138BCBF85DC806C4B289F3E965D2DB1416D217F8B276FAD1AB69C50F78BEE1FA3106EFB8CCBC7C5140116",q:"0x800000000000000000000000000000000000000000000000000000000000000149A1EC142565A545ACFDB77BD9D40CFA8B996712101BEA0EC6346C54374F25BD",x:2,y:"0x1A8F7EDA389B094C2C071E3647A8940F3C123B697578C213BE6DD9E6C8EC7335DCB228FD1EDF4A39152CBCAAF8C0398828041055F94CEEEC7E21340780FE41BD"}};y["X-256-A"]=y["S-256-A"],y["X-256-B"]=y["S-256-C"],y["T-256-TEST"]=y["S-256-TEST"],y["T-256-A"]=y["S-256-A"],y["T-256-B"]=y["S-256-B"],y["T-256-C"]=y["S-256-C"];var g={"S-TEST":{modulusLength:512,p:"0xEE8172AE8996608FB69359B89EB82A69854510E2977A4D63BC97322CE5DC3386EA0A12B343E9190F23177539845839786BB0C345D165976EF2195EC9B1C379E3",q:"0x98915E7EC8265EDFCDA31E88F24809DDB064BDC7285DD50D7289F0AC6F49DD2D",a:"0x9e96031500c8774a869582d4afde2127afad2538b4b6270a6f7c8837b50d50f206755984a49e509304d648be2ab5aab18ebe2cd46ac3d8495b142aa6ce23e21c"},"S-A":{modulusLength:1024,p:"0xB4E25EFB018E3C8B87505E2A67553C5EDC56C2914B7E4F89D23F03F03377E70A2903489DD60E78418D3D851EDB5317C4871E40B04228C3B7902963C4B7D85D52B9AA88F2AFDBEB28DA8869D6DF846A1D98924E925561BD69300B9DDD05D247B5922D967CBB02671881C57D10E5EF72D3E6DAD4223DC82AA1F7D0294651A480DF",q:"0x972432A437178B30BD96195B773789AB2FFF15594B176DD175B63256EE5AF2CF",a:"0x8FD36731237654BBE41F5F1F8453E71CA414FFC22C25D915309E5D2E62A2A26C7111F3FC79568DAFA028042FE1A52A0489805C0DE9A1A469C844C7CABBEE625C3078888C1D85EEA883F1AD5BC4E6776E8E1A0750912DF64F79956499F1E182475B0B60E2632ADCD8CF94E9C54FD1F3B109D81F00BF2AB8CB862ADF7D40B9369A"},"S-B":{modulusLength:1024,p:"0xC6971FC57524B30C9018C5E621DE15499736854F56A6F8AEE65A7A404632B1BCF0349FFCAFCB0A103177971FC1612ADCDB8C8CC938C70225C8FD12AFF01B1D064E0AD6FDE6AB9159166CB9F2FC171D92F0CC7B6A6B2CD7FA342ACBE2C9315A42D576B1ECCE77A963157F3D0BD96A8EB0B0F3502AD238101B05116334F1E5B7AB",q:"0xB09D634C10899CD7D4C3A7657403E05810B07C61A688BAB2C37F475E308B0607",a:"0x3D26B467D94A3FFC9D71BF8DB8934084137264F3C2E9EB16DCA214B8BC7C872485336744934FD2EF5943F9ED0B745B90AA3EC8D70CDC91682478B664A2E1F8FB56CEF2972FEE7EDB084AF746419B854FAD02CC3E3646FF2E1A18DD4BEB3C44F7F2745588029649674546CC9187C207FB8F2CECE8E2293F68395C4704AF04BAB5"},"S-C":{modulusLength:1024,p:"0x9D88E6D7FE3313BD2E745C7CDD2AB9EE4AF3C8899E847DE74A33783EA68BC30588BA1F738C6AAF8AB350531F1854C3837CC3C860FFD7E2E106C3F63B3D8A4C034CE73942A6C3D585B599CF695ED7A3C4A93B2B947B7157BB1A1C043AB41EC8566C6145E938A611906DE0D32E562494569D7E999A0DDA5C879BDD91FE124DF1E9",q:"0xFADD197ABD19A1B4653EECF7ECA4D6A22B1F7F893B641F901641FBB555354FAF",a:"0x7447ED7156310599070B12609947A5C8C8A8625CF1CF252B407B331F93D639DDD1BA392656DECA992DD035354329A1E95A6E32D6F47882D960B8F10ACAFF796D13CD9611F853DAB6D2623483E46788708493937A1A29442598AEC2E0742022563440FE9C18740ECE6765AC05FAF024A64B026E7E408840819E962E7E5F401AE3"},"S-D":{modulusLength:1024,p:"0x80F102D32B0FD167D069C27A307ADAD2C466091904DBAA55D5B8CC7026F2F7A1919B890CB652C40E054E1E9306735B43D7B279EDDF9102001CD9E1A831FE8A163EED89AB07CF2ABE8242AC9DEDDDBF98D62CDDD1EA4F5F15D3A42A6677BDD293B24260C0F27C0F1D15948614D567B66FA902BAA11A69AE3BCEADBB83E399C9B5",q:"0xF0F544C418AAC234F683F033511B65C21651A6078BDA2D69BB9F732867502149",a:"0x6BCC0B4FADB3889C1E06ADD23CC09B8AB6ECDEDF73F04632595EE4250005D6AF5F5ADE44CB1E26E6263C672347CFA26F9E9393681E6B759733784CDE5DBD9A14A39369DFD99FA85CC0D10241C4010343F34A91393A706CF12677CBFA1F578D6B6CFBE8A1242CFCC94B3B653A476E145E3862C18CC3FED8257CFEF74CDB205BF1"},"X-A":{modulusLength:1024,p:"0xCA3B3F2EEE9FD46317D49595A9E7518E6C63D8F4EB4D22D10D28AF0B8839F079F8289E603B03530784B9BB5A1E76859E4850C670C7B71C0DF84CA3E0D6C177FE9F78A9D8433230A883CD82A2B2B5C7A3306980278570CDB79BF01074A69C9623348824B0C53791D53C6A78CAB69E1CFB28368611A397F50F541E16DB348DBE5F",q:"0xCAE4D85F80C147704B0CA48E85FB00A9057AA4ACC44668E17F1996D7152690D9",a:"0xBE27D652F2F1E339DA734211B85B06AE4DE236AA8FBEEB3F1ADCC52CD43853777E834A6A518138678A8ADBD3A55C70A7EAB1BA7A0719548677AAF4E609FFB47F6B9D7E45B0D06D83D7ADC53310ABD85783E7317F7EC73268B6A9C08D260B85D8485696CA39C17B17F044D1E050489036ABD381C5E6BF82BA352A1AFF136601AF"},"X-B":{modulusLength:1024,p:"0x9286DBDA91ECCFC3060AA5598318E2A639F5BA90A4CA656157B2673FB191CD0589EE05F4CEF1BD13508408271458C30851CE7A4EF534742BFB11F4743C8F787B11193BA304C0E6BCA25701BF88AF1CB9B8FD4711D89F88E32B37D95316541BF1E5DBB4989B3DF13659B88C0F97A3C1087B9F2D5317D557DCD4AFC6D0A754E279",q:"0xC966E9B3B8B7CDD82FF0F83AF87036C38F42238EC50A876CD390E43D67B6013F",a:"0x7E9C3096676F51E3B2F9884CF0AC2156779496F410E049CED7E53D8B7B5B366B1A6008E5196605A55E89C3190DABF80B9F1163C979FCD18328DAE5E9048811B370107BB7715F82091BB9DE0E33EE2FED6255474F8769FCE5EAFAEEF1CB5A32E0D5C6C2F0FC0B3447072947F5B4C387666993A333FC06568E534AD56D2338D729"},"X-C":{modulusLength:1024,p:"0xB194036ACE14139D36D64295AE6C50FC4B7D65D8B340711366CA93F383653908EE637BE428051D86612670AD7B402C09B820FA77D9DA29C8111A8496DA6C261A53ED252E4D8A69A20376E6ADDB3BDCD331749A491A184B8FDA6D84C31CF05F9119B5ED35246EA4562D85928BA1136A8D0E5A7E5C764BA8902029A1336C631A1D",q:"0x96120477DF0F3896628E6F4A88D83C93204C210FF262BCCB7DAE450355125259",a:"0x3F1817052BAA7598FE3E4F4FC5C5F616E122CFF9EBD89EF81DC7CE8BF56CC64B43586C80F1C4F56DD5718FDD76300BE336784259CA25AADE5A483F64C02A20CF4A10F9C189C433DEFE31D263E6C9764660A731ECCAECB74C8279303731E8CF69205BC73E5A70BDF93E5BB681DAB4EEB9C733CAAB2F673C475E0ECA921D29782E"}},_=28,x=(1<<_)-1,s=1<<_,A=Math.pow(2,52),C=52-_,S=2*_-52;function k(e,t,r,n,o,i,s){for(var a=16383&r,u=r>>14;0<=--s;){var c=16383&e[t],f=e[t++]>>14,l=u*c+f*a;i=((c=a*c+((16383&l)<<14)+n[o]+i)>>28)+(l>>14)+u*f,n[o++]=268435455&c}return i}function E(e){var t=new Array(Math.ceil(e));return t.s=0,t.t=0,t}function P(e,t){for(var r=e.t-1;0<=r;--r)t[r]=e[r];return t.t=e.t,t.s=e.s,t}function c(e){return P(e,E(e.t))}function O(e,t){return e.t=1,e.s=t<0?-1:0,0<t?e[0]=t:t<-1?e[0]=t+s:e.t=0,e}function m(e){var t=E(1);return O(t,e),t}var B=m(0),F=m(1),b=m(3);function j(e){for(var t=e.s&x;0<e.t&&e[e.t-1]===t;)--e.t;return e}function T(e,t,r){for(var n=0,o=0,i=Math.min(t.t,e.t);n<i;)o+=e[n]-t[n],r[n++]=o&x,o>>=_;if(t.t<e.t){for(o-=t.s;n<e.t;)o+=e[n],r[n++]=o&x,o>>=_;o+=e.s}else{for(o+=e.s;n<t.t;)o-=t[n],r[n++]=o&x,o>>=_;o-=t.s}return r.s=o<0?-1:0,o<-1?r[n++]=s+o:0<o&&(r[n++]=o),r.t=n,j(r)}function v(e,t){return T(e,t,E(e.t))}function f(e,t,r){for(var n=0,o=0,i=Math.min(t.t,e.t);n<i;)o+=e[n]+t[n],r[n++]=o&x,o>>=_;if(t.t<e.t){for(o+=t.s;n<e.t;)o+=e[n],r[n++]=o&x,o>>=_;o+=e.s}else{for(o+=e.s;n<t.t;)o+=t[n],r[n++]=o&x,o>>=_;o+=t.s}return r.s=o<0?-1:0,0<o?r[n++]=o:o<-1&&(r[n++]=s+o),r.t=n,j(r)}function D(e,t){return f(e,t,E(e.t))}function a(e,t){return T(B,e,t)}function K(e){return e.s<0?a(t=e,E(t.t)):e;var t}function I(e,t){var r=e.s-t.s;if(0!==r)return r;var n=e.t;if(0!==(r=n-t.t))return e.s<0?-r:r;for(;0<=--n;)if(0!=(r=e[n]-t[n]))return r;return 0}function R(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function L(e,t,r){var n;for(n=e.t-1;0<=n;--n)r[n+t]=e[n];for(n=t-1;0<=n;--n)r[n]=0;return r.t=e.t+t,r.s=e.s,r}function N(e,t,r){for(var n=t;n<e.t;++n)r[n-t]=e[n];return r.t=Math.max(e.t-t,0),r.s=e.s,r}function U(e,t,r){var n,o=t%_,i=_-o,s=(1<<i)-1,a=Math.floor(t/_),u=e.s<<o&x;for(n=e.t-1;0<=n;--n)r[n+a+1]=e[n]>>i|u,u=(e[n]&s)<<o;for(n=a-1;0<=n;--n)r[n]=0;return r[a]=u,r.t=e.t+a+1,r.s=e.s,j(r)}function G(e,t,r){r.s=e.s;var n=Math.floor(t/_);if(!(n>=e.t)){var o=t%_,i=_-o,s=(1<<o)-1;r[0]=e[n]>>o;for(var a=n+1;a<e.t;++a)r[a-n-1]|=(e[a]&s)<<i,r[a-n]=e[a]>>o;return 0<o&&(r[e.t-n-1]|=(e.s&s)<<i),r.t=e.t-n,j(r)}r.t=0}function M(e){return e.t<=0?0:_*(e.t-1)+R(e[e.t-1]^e.s&x)}function u(e,t,r){var n=K(e),o=K(t),i=n.t;for(r.t=i+o.t;0<=--i;)r[i]=0;for(i=0;i<o.t;++i)r[i+n.t]=k(n,0,o[i],r,i,0,n.t);return r.s=0,e.s!==t.s&&T(B,r,r),j(r)}function H(e,t){return u(e,t,E(e.t+t.t))}function r(e,t){for(var r=K(e),n=t.t=2*r.t;0<=--n;)t[n]=0;for(n=0;n<r.t-1;++n){var o=k(r,n,r[n],t,2*n,0,1);(t[n+r.t]+=k(r,n+1,2*r[n],t,2*n+1,o,r.t-n-1))>=r.DV&&(t[n+r.t]-=r.DV,t[n+r.t+1]=1)}return 0<t.t&&(t[t.t-1]+=k(r,n,r[n],t,2*n,0,1)),t.s=0,j(t)}function l(e,t,r,n){var o=K(t);if(o.t<=0)throw new w("Division by zero");var i=K(e);if(i.t<o.t)return r&&O(r,0),n&&P(e,n),r;n=n||E(t.t);var s=E(t.t),a=e.s,u=t.s,c=_-R(o[o.t-1]);0<c?(U(o,c,s),U(i,c,n)):(P(o,s),P(i,n));var f=s.t,l=s[f-1];if(0===l)return r;var h=l*(1<<C)+(1<f?s[f-2]>>S:0),p=A/h,d=(1<<C)/h,y=1<<S,g=n.t,m=g-f,b=r||E(Math.max(e.t-t.t,1));for(L(s,m,b),0<=I(n,b)&&(n[n.t++]=1,T(n,b,n)),L(F,f,b),T(b,s,s);s.t<f;)s[s.t++]=0;for(;0<=--m;){var v=n[--g]===l?x:Math.floor(n[g]*p+(n[g-1]+y)*d);if((n[g]+=k(s,0,v,n,m,0,f))<v)for(L(s,m,b),T(n,b,n);n[g]<--v;)T(n,b,n)}return r&&(N(n,f,r),a!==u&&T(B,r,r)),n.t=f,j(n),0<c&&G(n,c,n),a<0&&T(B,n,n),r}function q(e,t,r){return l(K(e),t,null,r),e.s<0&&0<I(r,B)&&T(t,r,r),r}function z(e,t){return q(e,t,E(t.t))}function W(e){return 0===(0<e.t?1&e[0]:e.s)}function V(e){return 0===I(e,B)}function X(e){return e.s<0?-1:e.t<=0||1===e.t&&e[0]<=0?0:1}function J(e,t){var r=W(t);if(W(e)&&r||0===X(t))return B;for(var n=c(t),o=c(e),i=m(1),s=m(0),a=m(0),u=m(1);0!==X(n);){for(;W(n);)G(n,1,n),r?(W(i)&&W(s)||(f(i,e,i),T(s,t,s)),G(i,1,i)):W(s)||T(s,t,s),G(s,1,s);for(;W(o);)G(o,1,o),r?(W(a)&&W(u)||(f(a,e,a),T(u,t,u)),G(a,1,a)):W(u)||T(u,t,u),G(u,1,u);0<=I(n,o)?(T(n,o,n),r&&T(i,a,i),T(s,u,s)):(T(o,n,o),r&&T(a,i,a),T(u,s,u))}return 0!==I(o,F)?B:0<=I(u,t)?v(u,t):X(u)<0?(f(u,t,u),X(u)<0?D(u,t):u):u}function Y(e,t){var r=Math.floor(t/_);return r>=e.t?0!==e.s:0!=(e[r]&1<<t%_)}function e(e,t){for(var r in t)e.prototype[r]=t[r]}var Z=function(e){this.m=e};e(Z,{convert:function(e){return e.s<0||0<=I(e,this.m)?z(e,this.m):e},revert:function(e){return e},reduce:function(e){q(e,this.m,e)},sqrTo:function(e,t){r(e,t),this.reduce(t)},mulTo:function(e,t,r){u(e,t,r),this.reduce(r)}});var Q=function(e){this.m=e,this.mp=function(e){if(e.t<1)return 0;var t=e[0];if(0==(1&t))return 0;var r=3&t;return 0<(r=(r=(r=(r=r*(2-(15&t)*r)&15)*(2-(255&t)*r)&255)*(2-((65535&t)*r&65535))&65535)*(2-t*r%s)%s)?s-r:-r}(e),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<_-15)-1,this.mt2=2*e.t};function $(e,t,r){if(0!==t){for(;e.t<=r;)e[e.t++]=0;for(e[r]+=t;e[r]>=s;)e[r]-=s,++r>=e.t&&(e[e.t++]=0),++e[r]}}function ee(e){var t,r;this.r2=E(2*e.t),this.q3=E(2*e.t),L(F,2*e.t,this.r2),this.mu=l(t=this.r2,r=e,E(Math.max(t.t-r.t,1)),null),this.m=e}function te(e,t,r){var n,o,i=M(t),s=m(1);if(i<=0)return s;n=i<18?1:i<48?3:i<144?4:i<768?5:6,o=new(i<8?Z:W(r)?ee:Q)(r);var a=new Array,u=3,c=n-1,f=(1<<n)-1;if(a[1]=o.convert(e),1<n){var l=E(2*r.t);for(o.sqrTo(a[1],l);u<=f;)a[u]=E(2*r.t),o.mulTo(l,a[u-2],a[u]),u+=2}var h,p,d=t.t-1,y=!0,g=E(2*r.t);for(i=R(t[d])-1;0<=d;){for(c<=i?h=t[d]>>i-c&f:(h=(t[d]&(1<<i+1)-1)<<c-i,0<d&&(h|=t[d-1]>>_+i-c)),u=n;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=_,--d),y)P(a[h],s),y=!1;else{for(;1<u;)o.sqrTo(s,g),o.sqrTo(g,s),u-=2;0<u?o.sqrTo(s,g):(p=s,s=g,g=p),o.mulTo(g,a[h],s)}for(;0<=d&&0==(t[d]&1<<i);)o.sqrTo(s,g),p=s,s=g,g=p,--i<0&&(i=_-1,--d)}return o.revert(s)}function re(e,t){return e.r.reduce(t),t.q=e.q,t.r=e.r,t}function ne(e,t){return t.q=e.q,t.r=e.r,t}function oe(e,t){var r=D(e,t);return 0<I(r,e.q)&&T(r,e.q,r),ne(e,r)}function ie(e,t){var r=v(e,t);return r.s<0&&f(e.q,r,r),ne(e,r)}function se(e,t){return re(e,H(e,t))}function ae(e){return re(e,r(t=e,E(2*t.t)));var t}function ue(e,t){return re(e,(n=t,o=E((r=e).t),n<0?G(r,-n,o):U(r,n,o),o));var r,n,o}function ce(e){return ne(e,J(e,e.q))}function fe(e,t,r,n){return{curve:e,x:t,y:r,z:n||re(e,F)}}function le(e){return e.zinv||(e.zinv=ce(e.z)),se(e.x,e.zinv)}function he(e){return e.zinv||(e.zinv=ce(e.z)),se(e.y,e.zinv)}function pe(e){return!e.x&&!e.y||V(e.z)&&!V(e.y)}function de(e){return e.curve.infinity}function ye(e){return fe(e.curve,e.x,ne(t=e.y,v(t.q,t)),e.z);var t}function ge(e,t){if(pe(e))return t;if(pe(t))return e;var r=ie(se(t.y,e.z),se(e.y,t.z)),n=ie(se(t.x,e.z),se(e.x,t.z));if(V(n))return(V(r)?me:de)(e);var o=e.x,i=e.y,s=ae(n),a=se(s,n),u=se(o,s),c=se(ae(r),e.z),f=se(ie(se(ie(c,ue(u,1)),t.z),a),n),l=oe(se(ie(ie(se(se(u,b),r),se(i,a)),se(c,r)),t.z),se(r,a)),h=se(se(a,e.z),t.z);return fe(e.curve,f,l,h)}function me(e){if(pe(e))return e;if(0===X(e.y))return de(e);var t=e.x,r=e.y,n=se(r,e.z),o=se(n,r),i=e.curve.a,s=se(ae(t),b);V(i)||(s=oe(s,se(ae(e.z),i)));var a=se(ue(ie(ae(s),se(ue(t,3),o)),1),n),u=ie(se(ue(ie(se(se(s,b),t),ue(o,1)),2),o),se(ae(s),s)),c=ue(se(ae(n),n),3);return fe(e.curve,a,u,c)}function be(e,t){if(pe(e))return e;if(0===X(t))return de(e);var r,n=t,o=H(n,b),i=ye(e),s=e;for(r=M(o)-2;0<r;--r){s=me(s);var a=Y(o,r);a!==Y(n,r)&&(s=ge(s,a?e:i))}return s}function ve(e){var t=new Uint8Array(e),r=E(8*t.length/_);r.t=0;for(var n=r.s=0,o=0,i=t.length;o<i;o++){var s=t[o];0===n?r[r.t++]=s:_<n+8?(r[r.t-1]|=(s&(1<<_-n)-1)<<n,r[r.t++]=s>>_-n):r[r.t-1]|=s<<n,_<=(n+=8)&&(n-=_)}return j(r)}function we(e,t){var r,n=!1,o=[],i=e.t,s=_-i*_%8;if(0<i--)for(s<_&&0<(r=e[i]>>s)&&(n=!0,o.push(r));0<=i;)s<8?(r=(e[i]&(1<<s)-1)<<8-s,r|=e[--i]>>(s+=_-8)):(r=e[i]>>(s-=8)&255,s<=0&&(s+=_,--i)),0<r&&(n=!0),n&&o.push(r);var a=new Uint8Array(t?t/8:o.length);return n&&a.set(o.reverse()),a.buffer}function _e(e){if("number"==typeof e||e instanceof Number)return m(e);for(var t=E((e=(e=e.replace(/[^\-A-Fa-f0-9]/g,""))||"0").length/7),r=e.length,n=!1,o=0;0<=--r;){if("-"!==e.charAt(r)){var i=parseInt(e.charAt(r),16);n=!1,0===o?t[t.t++]=i:_<o+4?(t[t.t-1]|=(i&(1<<_-o)-1)<<o,t[t.t++]=i>>_-o):t[t.t-1]|=i<<o,_<=(o+=4)&&(o-=_)}else n=!0}return n&&T(B,t,t),j(t)}function xe(e){if(e.s<0)return"-"+xe(a(e,E(e.t)));var t,r=!1,n="",o=e.t,i=_-o*_%4;if(0<o--)for(i<_&&0<(t=e[o]>>i)&&(r=!0,n=t.toString(16));0<=o;)i<4?(t=(e[o]&(1<<i)-1)<<4-i,t|=e[--o]>>(i+=_-4)):(t=e[o]>>(i-=4)&15,i<=0&&(i+=_,--o)),0<t&&(r=!0),r&&(n+=t.toString(16));return"0x"+(r?n:"0")}function Ae(e){for(var t=new Uint8Array(e),r=new Uint8Array(t.length),n=0,o=t.length;n<o;n++)r[o-n-1]=t[n];return r.buffer}function Ce(e){return this.hash&&(e=this.hash.digest(e)),("SC"===this.procreator||"VN"===this.procreator&&2012===this.hash.version)&&(e=Ae(e)),e}function Se(e){if(e instanceof t)return e;if(e&&e.buffer&&e.buffer instanceof t)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new i("CryptoOperationData or CryptoOperationDataView required")}function ke(e){var t=Se(e);if(0<t.byteLength%2)throw new i("Buffer length must be even");var r=t.byteLength/2;return[ve(new Uint8Array(t,0,r)),ve(new Uint8Array(t,r,r))]}function Ee(e,t,r){var n=we(e,r),o=we(t,r),i=new Uint8Array(n.byteLength+o.byteLength);return i.set(new Uint8Array(n)),i.set(new Uint8Array(o),n.byteLength),i.buffer}function Pe(e){var t=(n=n||p.GostRandom)?new(n||p.GostRandom):o;if(t.getRandomValues){var r=new Uint8Array(Math.ceil(e/8));return t.getRandomValues(r),r}throw new d("Random generator not found")}function Oe(e,t){var r=Se(t),n=ve(Ce.call(this,r)),o=this.q,i=z(ve(Se(e)),o),s=z(n,o);V(s)&&(s=F);for(var a,u=B;V(u);){for(var c=B;V(c);){var f=z(ve(this.ukm||Pe(this.bitLength)),o);if(this.curve){c=z(le(be(this.P,f)),o)}else{var l=this.p;c=z(te(this.a,f,l),o)}}u=z(D(H(c,i),H(f,s)),o)}return"SC"===this.procreator?a={r:xe(c),s:xe(u)}:(a=Ee(c,u,this.bitLength),"CP"!==this.procreator&&"VN"!==this.procreator||(a=Ae(a))),a}function Be(e,t,r){var n,o,i=this.q;if("SC"===this.procreator)n=_e(t.r),o=_e(t.s);else{"CP"!==this.procreator&&"VN"!==this.procreator||(t=Ae(t));var s=ke(t);o=s[1],n=s[0]}if(0<=I(n,i)||0<=I(o,i))return!1;var a=Se(r),u=z(ve(Ce.call(this,a)),i);0===V(u)&&(u=F);var c=J(u,i),f=z(H(o,c),i),l=v(i,z(H(n,c),i));if(this.curve)var h=ke(e),p=this.curve,d=z(le(function(e,t,r,n){var o;o=M(t)>M(n)?M(t)-1:M(n)-1;for(var i=de(e),s=ge(e,r);0<=o;)i=me(i),Y(t,o)?i=Y(n,o)?ge(i,s):ge(i,e):Y(n,o)&&(i=ge(i,r)),--o;return i}(this.P,f,new fe(p,re(p,h[0]),m=re(p,h[1])),l)),i);else{var y=this.p,g=this.a,m=ve(e);d=z(z(H(te(g,f,y),te(m,l,y)),y),i)}return 0===I(d,n)}function Fe(){var e=this.curve;if(e){for(var t=e.infinity;pe(t);){var r=B;if(this.ukm)r=ve(this.ukm);else for(;V(r);)r=z(ve(Pe(this.bitLength)),this.q);var n=le(t=be(this.P,r)),o=he(t)}return{privateKey:we(r,this.bitLength),publicKey:Ee(n,o,this.bitLength)}}throw new d("Key generation for GOST R 34.10-94 not supported")}function je(){if(this.curve){for(var e=B;V(e);)e=z(ve(Pe(this.bitLength)),this.q);return we(e,this.bitLength)}throw new d("Key generation for GOST R 34.10-94 not supported")}function Te(e,t){if(this.curve){var r=this.q,n=z(ve(Se(t)),r),o=z(ve(Se(e)),r);return we("VN"===this.procreator?z(H(n,o),r):z(H(n,J(o,r)),r))}throw new d("Key wrapping GOST R 34.10-94 not supported")}function De(e,t){if(this.curve){var r=this.q,n=z(ve(Se(t)),r),o=z(ve(Se(e)),r);return we("VN"===this.procreator?z(H(n,J(o,r)),r):z(H(n,o),r))}throw new d("Key wrapping GOST R 34.10-94 not supported")}function Ke(e){var t,r=ve(this.ukm),n=this.q,o=z(ve(Se(e)),n);if(this.curve){var i=be(this.peer_Q,z(H(r,o),n));t=Ee(le(i),he(i),this.bitLength)}else{var s=this.p;this.a;t=we(te(this.peer_y,o,s))}return Ce.call(this,t)}function Ie(e,t){if(t<8||t>this.bitLength||0<t%8)throw new i("Length must be no more than "+this.bitLength+" bits and multiple of 8");var r=t/8,n=Ke.call(this,e),o=new Uint8Array(r);return o.set(new Uint8Array(n,0,r)),o.buffer}function Re(e){var t=Ke.call(this,e),r=new Uint8Array(32);return r.set(new Uint8Array(t,0,32)),r.buffer}return e(Q,{convert:function(e){var t=E(e.t);return L(K(e),this.m.t,t),l(t,this.m,null,t),e.s<0&&0<I(t,B)&&T(this.m,t,t),t},revert:function(e){var t=E(e.t);return P(e,t),this.reduce(t),t},reduce:function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&x;for(e[r=t+this.m.t]+=k(this.m,0,n,e,t,0,this.m.t);e[r]>=s;)e[r]-=s,e[++r]++}j(e),N(e,this.m.t,e),0<=I(e,this.m)&&T(e,this.m,e)},sqrTo:function(e,t){r(e,t),this.reduce(t)},mulTo:function(e,t,r){u(e,t,r),this.reduce(r)}}),e(ee,{convert:function(e){if(e.s<0||e.t>2*this.m.t)return z(e,this.m);if(I(e,this.m)<0)return e;var t=E(e.t);return P(e,t),this.reduce(t),t},revert:function(e){return e},reduce:function(e){for(N(e,this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,j(e)),function(e,t,r,n){--r;var o=n.t=e.t+t.t-r;for(n.s=0;0<=--o;)n[o]=0;for(o=Math.max(r-e.t,0);o<t.t;++o)n[e.t+o-r]=k(e,r-o,t[o],n,0,0,e.t+o-r);j(n),N(n,1,n)}(this.mu,this.r2,this.m.t+1,this.q3),function(e,t,r,n){var o,i=Math.min(e.t+t.t,r);for(n.s=0,n.t=i;0<i;)n[--i]=0;for(o=n.t-e.t;i<o;++i)n[i+e.t]=k(e,0,t[i],n,i,0,e.t);for(o=Math.min(t.t,r);i<o;++i)k(e,0,t[i],n,i,0,r-i);j(n)}(this.m,this.q3,this.m.t+1,this.r2);I(e,this.r2)<0;)$(e,1,this.m.t+1);for(T(e,this.r2,e);0<=I(e,this.m);)T(e,this.m,e)},sqrTo:function(e,t){r(e,t),this.reduce(t)},mulTo:function(e,t,r){u(e,t,r),this.reduce(r)}}),function(e){e=e||{},this.name=(e.name||"GOST R 34.10")+"-"+(e.version||2012)%100+"-"+(e.length||256)+("SIGN"!==(e.mode||"SIGN")?"-"+e.mode:"")+("string"==typeof e.namedParam?"/"+e.namedParam:"")+("string"==typeof e.namedCurve?"/"+e.namedCurve:"")+("string"==typeof e.sBox?"/"+e.sBox:"");var t,r,n,o,i,s,a=e.version||2012;switch(e.mode||"SIGN"){case"SIGN":this.sign=Oe,this.verify=Be,this.generateKey=Fe;break;case"DH":this.deriveBits=Ie,this.deriveKey=Re,this.generateKey=Fe;break;case"MASK":this.wrapKey=De,this.unwrapKey=Te,this.generateKey=je}if(1994===a){u=(u=e.param)||g[this.namedParam=(e.namedParam||"S-A").toUpperCase()],this.modulusLength=e.modulusLength||u.modulusLength||1024,this.p=_e(u.p),this.q=_e(u.q),this.a=_e(u.a),e.public&&(this.peer_y=ve(e.public))}else{var u;u=(u=e.curve)||y[this.namedCurve=(e.namedCurve||"S-256-A").toUpperCase()];var c=this.curve=(t=_e(u.p),r=_e(u.a),n=_e(u.b),(o={}).q=t,o.r=new ee(t),o.a=re(o,r),o.b=re(o,n),o.infinity=fe(o),o);if(this.P=fe(c,re(c,_e(u.x)),re(c,_e(u.y))),this.q=_e(u.q),e.public){var f=ke(e.public);this.peer_Q=new fe(this.curve,re(this.curve,f[0]),re(this.curve,f[1]))}}if(this.curve){if(508<(s=e.length||M(this.q))&&s<=512)s=512;else{if(!(254<s&&s<=256))throw new d("Support keys only 256 or 512 bits length");s=256}i=s}else{if(1016<(s=e.modulusLength||M(this.p))&&s<=1024)s=1024;else{if(!(508<s&&s<=512))throw new d("Support keys only 512 or 1024 bits length");s=512}i=256}this.bitLength=i,this.keyLength=s,this.procreator=e.procreator;var l=e.hash;if(l){if(("string"==typeof l||l instanceof String)&&(l={name:l}),1994===e.version||2001===e.version?(l.version=1994,l.length=256,l.sBox=e.sBox||l.sBox):(l.version=2012,l.length=i),l.procreator=l.procreator||e.procreator,!(h=h||p.GostDigest))throw new d("Object GostDigest not found");this.hash=new h(l)}e.ukm&&(this.ukm=e.ukm)}},"function"==typeof define&&define.amd?define(["gostRandom","gostDigest"],e):"object"===(void 0===n?"undefined":Ne(n))?r.exports=e(t("./gostRandom"),t("./gostDigest")):(void 0).GostSign=e((void 0).GostRandom,(void 0).GostDigest)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gostDigest":111,"./gostRandom":114}],117:[function(e,t,r){"use strict";function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n,o;n=void 0,o=function(e){var u,c=e.coding,f=e.security.names,n=e.asn1,t=(u={0:"EOC",1:"BOOLEAN",2:"INTEGER",3:"BIT STRING",4:"OCTET STRING",5:"NULL",6:"OBJECT IDENTIFIER",7:"ObjectDescriptor",8:"EXTERNAL",9:"REAL",10:"ENUMERATED",11:"EMBEDDED PDV",12:"UTF8String",16:"SEQUENCE",17:"SET",18:"NumericString",19:"PrintableString",20:"TeletexString",21:"VideotexString",22:"IA5String",23:"UTCTime",24:"GeneralizedTime",25:"GraphicString",26:"VisibleString",27:"GeneralString",28:"UniversalString",30:"BMPString"},function(e){if("string"==typeof e||e instanceof String){var t=/([A-Fa-f0-9\s]+)/g.exec(e);e=t&&t[1].length===e.length?c.Hex.decode(e):c.PEM.decode(e)}else try{e=c.PEM.decode(c.Chars.encode(e,"ascii"))}catch(e){}return o(c.BER.decode(e))});function l(e,t){for(var r="",n=new Uint8Array(t),o=0;o<n.length;o++)r+=(o%16==0?(0<o?"</b>":"")+"\r\n"+e+"<b>":" ")+("00"+n[o].toString(16)).slice(-2);return r?r+"</b>":""}function h(e,t,r){var n="";return 0<e.object.length?(n+=" {\r\n",e.object.forEach(function(e){n+=o(e,t,r+" "),t+=e.header.length+e.content.length}),n+="             : "+r+"}"):n+=" {}",n}function o(t,e,r){if(2<t.tagClass)throw new Error("Private and Application tags is not supported");e=e||0,r=r||"";var n=1===t.tagClass?"Application_"+t.tagNumber:2===t.tagClass?"["+t.tagNumber.toString()+"]":3===t.tagClass?"Private_"+t.tagNumber:u[t.tagNumber]||"Universal_"+t.tagNumber.toString(),o="             : ",i=("     "+e).slice(-5)+" "+("00"+t.header[0].toString(16)).slice(-2)+("     "+t.content.length).slice(-5)+": "+r+n;if(t.tagConstructed)i+=h(t,e+t.header.length,r);else switch(n.toUpperCase()){case"OBJECT IDENTIFIER":var s=t.object,a=f[s];i+=" <b>"+(a||"?")+"</b> ("+s+")";break;case"INTEGER":case"ENUMERATED":"number"==typeof t.object?i+=" <b>"+t.object+"</b>":i+=l(o+r+" ",t.content);break;case"GENERALIZEDTIME":case"UTCTIME":i+=" <b>"+t.object+"</b>";break;case"PRINTABLESTRING":case"IA5STRING":case"VISIBLESTRING":case"VIDEOTEXSTRING":case"NUMERICSTRING":case"BMPSTRING":case"UTF8STRING":case"UNIVERSALSTRING":i+=" <b>&quot;"+t.object+"&quot;</b>";break;case"BOOLEAN":i+=" <b>"+(t.object?"true":"false")+"</b>";break;case"OCTET STRING":try{i+=", encapsulates"+h({object:[c.BER.decode(t.content)]},e+t.header.length,r)}catch(e){i+=l(o+r+" ",t.content)}break;case"BIT STRING":if(i+=", unused "+t.content[0]+" bits",t.object instanceof ArrayBuffer)try{i+=", encapsulates"+h({object:[c.BER.decode(t.object)]},e+t.header.length,r)}catch(e){i+=l(o+r+" ",t.object)}else i+="\r\n"+o+r+" <b>"+t.object+"B</b>";break;default:try{i+=", encapsulates"+h({object:[c.BER.decode(t.content)]},e+t.header.length,r)}catch(e){i+=l(o+r+" ",t.content)}}return i+"\r\n"}var r=function(e,t){if("string"==typeof e||e instanceof String){var r=/([A-Fa-f0-9\s]+)/g.exec(e);e=r&&r[1].length===e.length?c.Hex.decode(e):c.PEM.decode(e)}else try{e=c.PEM.decode(c.Chars.encode(e,"ascii"))}catch(e){}return p(t?n[t].decode(e):c.BER.decode(e))};function p(e,t){if(t=t||"",void 0===e)return"<b>undefined</b>";if(e instanceof Array){for(var r=[],n=0,o=0,i=e.length;o<i;o++)r[o]=p(e[o],t+"    "),n+=r[o].replace(/\<[^\>]+\>/g,"").length+2;if(80<n){var s="[",a=0;for(o=0,i=r.length;o<i;o++)s+=(0<o?", ":"")+(0===a&&80<n?"\r\n"+t+"    ":" ")+r[o],80<(a+=r[o].replace(/\<[^\>]+\>/g,"").length+2)&&(a=0);return s+=80<n?"\r\n"+t+"]":" ]"}return"[ "+r.join(", ")+" ]"}if("string"==typeof e||e instanceof String)return""===e.toString()?"<b>null</b>":'<b>"'+e.replace(/([\"])/g,"\\$1")+'"</b>';if("number"==typeof e||e instanceof Number)return"<b>"+e+"</b>";if(e instanceof Date)return"<b>"+JSON.stringify(e)+"</b>";if("boolean"==typeof e||e instanceof Boolean)return"<b>"+e+"</b>";if(e instanceof ArrayBuffer||e instanceof Uint8Array){var u=new Uint8Array(e);for(s="",o=0,i=u.length;o<i;o++)s+=(0<o&&o%16==0?"\r\n"+t+"    ":" ")+"<b>0x"+("00"+u[o].toString(16)).slice(-2)+"</b>"+(o<i-1?",":"");return 16<u.length?"[\r\n"+t+"   "+s+"\r\n"+t+"]":"["+s+" ]"}if("object"!==d(e))return"unrecognized";var c=!0;s="{";for(var f in e)if("function"!=typeof e[f]&&void 0!==e[f]){var l=/^[a-zA-Z\_][a-zA-Z0-9\_]*$/.test(f);c?c=!1:s+=",",s+="\r\n"+t+"    "+(l?"":'"')+f+(l?"":'"')+": "+p(e[f],t+"    ")}return s+=(c?"":"\r\n"+t)+"}"}function i(e,t,r){var n=document.getElementById("print");n&&n.parentNode.removeChild(n),(n=document.createElement("div")).id="print",n.innerHTML='<span class="label">'+e+'</span><pre class="encoded">'+t+"</pre><button onclick=\"(function(x){x.parentNode.removeChild(x);})(document.getElementById('print'))\">Close View</button>";for(var o=r.nextElementSibling;"button"===o.nodeName.toLowerCase();)o=o.nextElementSibling;o.parentNode.insertBefore(n,o)}return{printASN1:t,printSyntax:r,openASN1:function(e){i("ASN.1 Data",t(e.textContent),e)},openSyntax:function(e,t){i("Syntax "+(t?"gostCrypto.asn1."+t+".decode(value):":"gostCrypto.coding.PEM.decode(value):"),r(e.textContent,t),e)}}},"function"==typeof define&&define.amd?define(["gostCrypto","gostCoding","gostSecurity","gostASN1"],o):"object"===(void 0===r?"undefined":d(r))?t.exports=o(e("./gostCrypto"),e("./gostCoding"),e("./gostSecurity"),e("./gostASN1")):n.gostViewer=o(n.gostCrypto,n.gostCoding,n.gostSecurity,n.gostASN1)},{"./gostASN1":105,"./gostCoding":109,"./gostCrypto":110,"./gostSecurity":115}],118:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.hexadecimalToUint8Array=function(e){if("string"!=typeof e)throw new TypeError("Wrong data type passed to convertor. Hexadecimal string is expected");if(!i.validateHexadecimal(e,e.length/2))throw new TypeError("String of wrong type is passed. Hexadecimal expected.");for(var t=new Uint8Array(e.length/2),r=0,n=0;r<e.length;r+=2,n++)t[n]=parseInt(e.substr(r,2),16);return t},r.hexadecimalToBinaryString=function(e){var t="";if("string"!=typeof e)throw new TypeError("Wrong data type passed to convertor. Hexadecimal string is expected");if(!i.validateHexadecimal(e,Math.ceil(e.length/2)))throw new TypeError("String of wrong type is passed. Hexadecimal expected.");for(var r=null,n=0;n<e.length;n++){for(var o=s(parseInt(e[n],16).toString(2));o.length<4;)o+="0";r=r?(t+=o+r,null):o}return t},r.uint8ArrayToHexadecimal=function(e){var t="";if(!(e instanceof Uint8Array))throw new TypeError("Wrong data type of array of 8-bit integers. Uint8Array is expected");for(var r=0;r<e.length;r++){var n=e[r].toString(16);n=1===n.length?"0"+n:n,t+=n}return t.toLowerCase()},r.uint8ArrayToBinaryString=function(e){var t="";if(!(e instanceof Uint8Array))throw new TypeError("Wrong data type of array of 8-bit integers. Uint8Array is expected");for(var r=0;r<e.length;r++){for(var n=s(e[r].toString(2));n.length<8;)n+="0";t+=n}return t},r.binaryStringToUint8Array=function(e){var t=[];if("string"!=typeof e)throw new TypeError("Wrong data type passed to convertor. Binary string is expected");if(!i.validateBinaryString(e))throw new TypeError("String of wrong type is passed. Binary string expected.");for(var r=0;r<e.length;r+=8)t.push(parseInt(s(e.substr(r,8)),2));return new Uint8Array(t)},r.binaryStringToHexadecimal=function(e){var t="";if("string"!=typeof e)throw new TypeError("Wrong data type passed to convertor. Binary string is expected");if(!i.validateBinaryString(e))throw new TypeError("String of wrong type is passed. Binary string expected.");for(var r=0;r<e.length;r+=8){var n=parseInt(s(e.substr(r,8)),2).toString(16);n=1===n.length?"0"+n:n,t+=n}return t.toLowerCase()},r.stringToUint8Array=function(e,t){var r,n=0;if("string"!=typeof e)throw new TypeError("Wrong data type passed to convertor. String is expected");0<t?(r=new Array(t)).fill(0):r=[];for(var o=0;o<e.length;o++){var i=e.charCodeAt(o);i<128?r[n++]=i:(i<2048?r[n++]=i>>6|192:(55296==(64512&i)&&o+1<e.length&&56320==(64512&e.charCodeAt(o+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++o)),r[n++]=i>>18|240,r[n++]=i>>12&63|128):r[n++]=i>>12|224,r[n++]=i>>6&63|128),r[n++]=63&i|128)}return new Uint8Array(r)};var i=n(e("../types/validate"));function s(e){return e.split("").reverse().join("")}},{"../types/validate":124,"@babel/runtime/helpers/interopRequireWildcard":12}],119:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireWildcard"),o=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.newType=function(e){return new c(e)},r.isType=function(e){return e instanceof c};var i=o(e("@babel/runtime/helpers/classCallCheck")),s=o(e("@babel/runtime/helpers/createClass")),a=n(e("../crypto")),u=e("../helpers"),c=function(){function t(e){(0,i.default)(this,t),this.schema=e}return(0,s.default)(t,[{key:"serialize",value:function(e){var t=(0,u.cleanZeroValuedFields)(e,{});return this.schema.encode(t).finish()}},{key:"hash",value:function(e){return a.hash(e,this)}},{key:"sign",value:function(e,t){return a.sign(e,t,this)}},{key:"verifySignature",value:function(e,t,r){return a.verifySignature(e,t,r,this)}}]),t}()},{"../crypto":100,"../helpers":102,"@babel/runtime/helpers/classCallCheck":5,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12}],120:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=r.Digest=r.Hash=r.Uuid=void 0;var o=n(e("./validate")),i=e("../crypto");function s(e,t,r){if(!o.validateHexadecimal(r,t))throw new TypeError("".concat(e," of wrong type is passed: ").concat(r));return r}function a(e,t,r){return Object.defineProperties({},{size:{get:function(){return t},enumerable:!0},name:{get:function(){return r},enumerable:!0},serialize:{get:function(){return e}}})}var u,c,f,l=function(n,o){return function(e,t,r){return n(o(e),t,r)}}.bind(null,function(e,t,r){for(var n=0;n<e.length;n+=2)t[r]=parseInt(e.substr(n,2),16),r++;return t}),h=(c=l,f=a,u=(u=s).bind(null,"Uuid",16),f(c=c(function(e){return u(String(e).replace(/-/g,""))}),function(){return 16},"Uuid"));r.Uuid=h;var p,d,y,g,m=(p=s,d=l,y=a,g=i.HASH_LENGTH,d=d(p=p.bind(null,"Hash",g)),Object.defineProperty(y(d,i.HASH_LENGTH,"Hash"),"hash",{value:function(e){return p(e)&&e}}));r.Hash=m;var b=a(l(s.bind(null,"Digest",64)),function(){return 64},"Digest");r.Digest=b;var v,w=(v=s,a(l(function(e){return v("PublicKey",i.PUBLIC_KEY_LENGTH,e)}),function(){return i.PUBLIC_KEY_LENGTH},"PublicKey"));r.PublicKey=w},{"../crypto":100,"./validate":124,"@babel/runtime/helpers/interopRequireWildcard":12}],121:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./primitive");Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}})});var o=e("./generic");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}})});var i=e("./message");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}})});var s=e("./convert");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}})});var a=e("./hexadecimal");Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}})})},{"./convert":118,"./generic":119,"./hexadecimal":120,"./message":122,"./primitive":123}],122:[function(b,e,v){(function(o,l){"use strict";var e=b("@babel/runtime/helpers/interopRequireWildcard"),t=b("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(v,"__esModule",{value:!0}),v.chainIdToBytes=y,v.isTransaction=function(e){return e instanceof m},v.Transaction=v.Verified=void 0;var h=t(b("@babel/runtime/regenerator")),r=t(b("@babel/runtime/helpers/asyncToGenerator")),s=t(b("@babel/runtime/helpers/classCallCheck")),n=t(b("@babel/runtime/helpers/createClass")),p=e(b("../crypto")),a=b("../helpers"),i=e(b("../../proto/protocol.js")),u=b("./convert"),c=i.exonum.consensus,f=c.CoreMessage,d=c.SignedMessage;function y(e){for(var t=o.BigInt(e),r=new Uint8Array(8),n=0;n<8;n++)r.set([Number(t>>o.BigInt(8)*o.BigInt(n)&o.BigInt(255))],n);return r}var g=function(){function i(e,t,r,n,o){(0,s.default)(this,i),8===t.length?this.chainIdBytes=t:this.chainIdBytes=y(t),this.schema=e,this.payload=r,this.author=n,this.signature=o,this.bytes=d.encode({chain_id_bytes:this.chainIdBytes,payload:e.encode(r).finish(),author:{data:(0,u.hexadecimalToUint8Array)(n)},signature:{data:(0,u.hexadecimalToUint8Array)(o)}}).finish()}var o;return(0,n.default)(i,[{key:"serialize",value:function(){return this.bytes}},{key:"hash",value:function(){var e=this.schema.encode(this.payload).finish(),t=this.chainIdBytes,r=(0,u.hexadecimalToUint8Array)(this.author),n=l.concat([t,e,r]);return p.hash(n)}}],[{key:"sign",value:(o=(0,r.default)(h.default.mark(function e(t,r,n,o){var i,s,a,u,c,f;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.publicKey,s=o.secretKey,a=s,u=y(r),c=t.encode(n).finish(),e.next=6,p.sign(a,l.concat([u,c]));case 6:return f=e.sent,e.abrupt("return",new this(t,r,n,i,f));case 8:case"end":return e.stop()}},e,this)})),function(e,t,r,n){return o.apply(this,arguments)})},{key:"deserialize",value:function(e,t){var r=d.decode(t),n=r.payload,o=r.author,i=r.signature,s=r.chain_id_bytes;if(p.verifySignature((0,u.uint8ArrayToHexadecimal)(i.data),(0,u.uint8ArrayToHexadecimal)(o.data),n)){var a=e.decode(n);return new this(e,s,a,(0,u.uint8ArrayToHexadecimal)(o.data),(0,u.uint8ArrayToHexadecimal)(i.data))}return null}}]),i}();v.Verified=g;var m=function(){function i(e){var t=e.schema,r=e.serviceId,n=e.methodId,o=e.chainId;(0,s.default)(this,i),this.serviceId=r,this.methodId=n,this.schema=t,this.chainId=o||0}return(0,n.default)(i,[{key:"create",value:function(e,t,r){var n=this._serializePayload(e);return void 0===r?g.sign(f,this.chainId,n,t):new g(f,this.chainId,n,t,r)}},{key:"_serializePayload",value:function(e){var t=this.schema.encode((0,a.cleanZeroValuedFields)(e,{})).finish();return{any_tx:{call_info:{instance_id:this.serviceId,method_id:this.methodId},arguments:t}}}},{key:"serialize",value:function(e){return f.encode(this._serializePayload(e)).finish()}},{key:"deserialize",value:function(e){var t=g.deserialize(f,e);if(!t)return null;var r=t.payload.any_tx;return!r||r.call_info.instance_id!==this.serviceId||r.call_info.method_id!==this.methodId?null:(t.payload=this.schema.decode(r.arguments),t)}}]),i}();v.Transaction=m}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer)},{"../../proto/protocol.js":89,"../crypto":100,"../helpers":102,"./convert":118,"@babel/runtime/helpers/asyncToGenerator":4,"@babel/runtime/helpers/classCallCheck":5,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12,"@babel/runtime/regenerator":24,buffer:62}],123:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireWildcard"),o=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.Bool=r.Uint64=r.Uint32=r.Uint16=r.Uint8=void 0;var i=o(e("@babel/runtime/helpers/classCallCheck")),s=o(e("@babel/runtime/helpers/createClass")),c=o(e("big-integer")),a=n(e("./validate"));function u(e,t,r,n,o){for(var i=4<arguments.length&&void 0!==o&&o,s=(0,c.default)(e),a=i?n-1:0;i?0<=a:a<n;i?a--:a++){var u=s.divmod(256);t[r+a]=u.remainder.toJSNumber(),s=u.quotient}return t}var f=function(){function e(){(0,i.default)(this,e)}return(0,s.default)(e,null,[{key:"size",value:function(){return 1}},{key:"serialize",value:function(e,t,r){if(!a.validateInteger(e,0,255,r,this.size()))throw new TypeError("Uint8 of wrong type is passed: "+e);return u(e,t,r,this.size())}}]),e}();r.Uint8=f;var l=function(){function e(){(0,i.default)(this,e)}return(0,s.default)(e,null,[{key:"size",value:function(){return 2}},{key:"serialize",value:function(e,t,r,n){if(!a.validateInteger(e,0,65535,r,this.size()))throw new TypeError("Uint16 of wrong type is passed: "+e);return u(e,t,r,this.size(),n)}}]),e}();r.Uint16=l;var h=function(){function e(){(0,i.default)(this,e)}return(0,s.default)(e,null,[{key:"size",value:function(){return 4}},{key:"serialize",value:function(e,t,r,n){if(!a.validateInteger(e,0,4294967295,r,this.size()))throw new TypeError("Uint32 of wrong type is passed: "+e);return u(e,t,r,this.size(),n)}}]),e}();r.Uint32=h;var p=function(){function e(){(0,i.default)(this,e)}return(0,s.default)(e,null,[{key:"size",value:function(){return 8}},{key:"serialize",value:function(e,t,r,n){if(!a.validateInteger(e,0,0x10000000000000000,r,this.size()))throw new TypeError("Uint16 of wrong type is passed: "+e);return u(e,t,r,this.size(),n)}}]),e}();r.Uint64=p;var d=function(){function e(){(0,i.default)(this,e)}return(0,s.default)(e,null,[{key:"size",value:function(){return 1}},{key:"serialize",value:function(e,t,r){if("boolean"!=typeof e)throw new TypeError("Wrong data type is passed as Boolean. Boolean is required");return u(e?1:0,t,r,this.size())}}]),e}();r.Bool=d},{"./validate":124,"@babel/runtime/helpers/classCallCheck":5,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12,"big-integer":59}],124:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateInteger=function(e,t,r,n,o){if("number"!=typeof e||e<t||r<e)return!1;return!0},r.validateHexadecimal=function(e,t){if(t=t||32,"string"!=typeof e)return!1;if(e.length!==2*t)return!1;for(var r=0;r<e.length;r++)if(isNaN(parseInt(e[r],16)))return!1;return!0},r.validateBytesArray=function(e,t){if(!(Array.isArray(e)||e instanceof Uint8Array))return!1;if(t&&e.length!==t)return!1;for(var r=0;r<e.length;r++)if("number"!=typeof e[r]||e[r]<0||255<e[r])return!1;return!0},r.validateBinaryString=function(e,t){if(void 0!==t&&e.length!==t)return!1;for(var r=0;r<e.length;r++)if("0"!==e[r]&&"1"!==e[r])return!1;return!0}},{}]},{},[103])(103)});