!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cryptoPro",[],t):"object"==typeof exports?exports.cryptoPro=t():e.cryptoPro=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=12)}([function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,_){function o(e){try{i(n.next(e))}catch(e){_(e)}}function s(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}i((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,_,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function s(_){return function(s){return function(_){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return o.label++,{value:_[1],done:!1};case 5:o.label++,n=_[1],_=[0];continue;case 7:_=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1] * @license MIT */ var n=r(38),a=r(39),_=r(40);function o(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function g(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(n)return G(e).length;t=(""+t).toLowerCase(),n=!0}}function p(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 v(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return b(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function C(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function E(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:h(e,t,r,n,a);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):h(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function h(e,t,r,n,a){var _,o=1,s=e.length,i=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,i/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var u=-1;for(_=r;_s&&(r=s-i),_=r;_>=0;_--){for(var l=!0,d=0;da&&(n=a):n=a;var _=t.length;if(_%2!=0)throw new TypeError("Invalid hex string");n>_/2&&(n=_/2);for(var o=0;o>8,a=r%256,_.push(a),_.push(n);return _}(t,e.length-r),e,r,n)}function b(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function w(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+l<=r)switch(l){case 1:c<128&&(u=c);break;case 2:128==(192&(_=e[a+1]))&&(i=(31&c)<<6|63&_)>127&&(u=i);break;case 3:_=e[a+1],o=e[a+2],128==(192&_)&&128==(192&o)&&(i=(15&c)<<12|(63&_)<<6|63&o)>2047&&(i<55296||i>57343)&&(u=i);break;case 4:_=e[a+1],o=e[a+2],s=e[a+3],128==(192&_)&&128==(192&o)&&128==(192&s)&&(i=(15&c)<<18|(63&_)<<12|(63&o)<<6|63&s)>65535&&i<1114112&&(u=i)}null===u?(u=65533,l=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},i.prototype.compare=function(e,t,r,n,a){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var _=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(_,o),c=this.slice(n,a),u=e.slice(t,r),l=0;la)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var _=!1;;)switch(n){case"hex":return A(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":return T(this,e,t,r);case"latin1":case"binary":return y(this,e,t,r);case"base64":return M(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(_)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),_=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;an)&&(r=n);for(var a="",_=t;_r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,a,_){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<_)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,_=Math.min(e.length-r,2);a<_;++a)e[r+a]=(t&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function x(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,_=Math.min(e.length-r,4);a<_;++a)e[r+a]=t>>>8*(n?a:3-a)&255}function L(e,t,r,n,a,_){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(e,t,r,n,_){return _||L(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function k(e,t,r,n,_){return _||L(e,0,r,8),a.write(e,t,r,n,52,8),r+8}i.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},i.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],a=1,_=0;++_=(a*=128)&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,a=1,_=this[e+--n];n>0&&(a*=256);)_+=this[e+--n]*a;return _>=(a*=128)&&(_-=Math.pow(2,8*t)),_},i.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),a.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),a.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),a.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),a.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||D(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,_=0;for(this[t]=255&e;++_=0&&(_*=256);)this[t+a]=e/_&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);D(this,e,t,r,a-1,-a)}var _=0,o=1,s=0;for(this[t]=255&e;++_>0)-s&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);D(this,e,t,r,a-1,-a)}var _=r-1,o=1,s=0;for(this[t+_]=255&e;--_>=0&&(o*=256);)e<0&&0===s&&0!==this[t+_+1]&&(s=1),this[t+_]=(e/o>>0)-s&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,r){return F(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return F(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(_<1e3||!i.TYPED_ARRAY_SUPPORT)for(a=0;a<_;++a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+_),t);return _},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var a=e.charCodeAt(0);a<256&&(e=a)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(_=t;_55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&_.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&_.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&_.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&_.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;_.push(r)}else if(r<2048){if((t-=2)<0)break;_.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;_.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;_.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return _}function B(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}}).call(this,r(37))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var certificate_1=__webpack_require__(6),constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(10),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getUserCertificates=_afterPluginsLoaded_1._afterPluginsLoaded((function(resetCache){void 0===resetCache&&(resetCache=!1);var cadesplugin=window.cadesplugin;return!resetCache&&certificatesCache?certificatesCache:eval(_generateCadesFn_1._generateCadesFn((function(){var e,t,r;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{(t=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates)&&(t=_generateCadesFn_1.__cadesAsyncToken__+t.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID),t=_generateCadesFn_1.__cadesAsyncToken__+t.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,constants_1.CAPICOM_PROPID_KEY_PROV_INFO),r=_generateCadesFn_1.__cadesAsyncToken__+t.Count)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!r)throw new Error("Нет доступных сертификатов");var n=[];try{for(;r;){var a=_generateCadesFn_1.__cadesAsyncToken__+t.Item(r);n.push(new certificate_1.Certificate(a,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+a.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+a.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+a.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+a.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+a.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+a.ValidToDate)),r--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getCadesProp=_afterPluginsLoaded_1._afterPluginsLoaded((function(propName){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate[propName]}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при обращении к свойству сертификата")}return e})))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._extractCommonName=function(e){var t,r;return null===(r=null===(t=e.match(/CN="?(.+?)"?(?:,|$)/))||void 0===t?void 0:t[1])||void 0===r?void 0:r.replace(/"{2}/g,'"')}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getSystemInfo=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var sysInfo={cadesVersion:null,cspVersion:null};return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.About"),sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.PluginVersion,sysInfo.cspVersion=_generateCadesFn_1.__cadesAsyncToken__+e.CSPVersion(),sysInfo.cadesVersion||(sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.Version),sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+sysInfo.cadesVersion.toString(),sysInfo.cspVersion=_generateCadesFn_1.__cadesAsyncToken__+sysInfo.cspVersion.toString()}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении информации о системе")}return sysInfo})))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(13))},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(14)),n(r(8)),n(r(29)),n(r(11)),n(r(30)),n(r(33)),n(r(34)),n(r(35)),n(r(36)),n(r(41)),n(r(42)),n(r(6)),n(r(43)),n(r(44))},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,_){function o(e){try{i(n.next(e))}catch(e){_(e)}}function s(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}i((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,_,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function s(_){return function(s){return function(_){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return o.label++,{value:_[1],done:!1};case 5:o.label++,n=_[1],_=[0];continue;case 7:_=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]=33):"Firefox"===browserSpecs.name?(isFireFox=!0,browserSpecs.version>=52):"Chrome"===browserSpecs.name?browserSpecs.version>=42:"Safari"===browserSpecs.name?(isSafari=!0,browserSpecs.version>=12):void 0)}function CreateObject(e){if(isIOS())return call_ru_cryptopro_npcades_10_native_bridge("CreateObject",[e]);if(isIE()){if(e.match(/X509Enrollment/i))try{return document.getElementById("webClassFactory").CreateObject(e)}catch(t){try{return document.getElementById("certEnrollClassFactory").CreateObject(e)}catch(e){throw"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS"}}try{return document.getElementById("webClassFactory").CreateObject(e)}catch(t){return new ActiveXObject(e)}}return pluginObject.CreateObject(e)}function decimalToHexString(e){return e<0&&(e=4294967295+e+1),e.toString(16).toUpperCase()}function GetMessageFromException(e){var t=e.message;return t?e.number&&(t+=" (0x"+decimalToHexString(e.number)+")"):t=e,t}function getLastError(e){if(isNativeMessageSupported()||isIE()||isIOS())return GetMessageFromException(e);try{return pluginObject.getLastError()}catch(t){return GetMessageFromException(e)}}function ReleasePluginObjects(){return cpcsp_chrome_nmcades.ReleasePluginObjects()}function CreateObjectAsync(e){return pluginObject.CreateObjectAsync(e)}function call_ru_cryptopro_npcades_10_native_bridge(functionName,array){var tmpobj,ex;if(ru_cryptopro_npcades_10_native_bridge.call(functionName,array,(function(e,response){ex=e;var str="tmpobj="+response;eval(str),"string"==typeof tmpobj&&(tmpobj=tmpobj.replace(/\\\n/gm,"\n"),tmpobj=tmpobj.replace(/\\\r/gm,"\r"))})),ex)throw ex;return tmpobj}function show_firefox_missing_extension_dialog(){if(!window.cadesplugin_skip_extension_install){var e=document.createElement("div");e.id="cadesplugin_ovr",e.style="visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)",e.innerHTML="

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.

Скачать расширение

",document.getElementsByTagName("Body")[0].appendChild(e),document.getElementById("cadesplugin_close_install").addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.style.visibility="visible"}}function install_opera_extension(){window.cadesplugin_skip_extension_install?plugin_loaded_error("Плагин недоступен"):document.addEventListener("DOMContentLoaded",(function(){var e=document.createElement("div");e.id="cadesplugin_ovr",e.style="visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)",e.innerHTML="

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо установить расширение из каталога дополнений Opera.

",document.getElementsByTagName("Body")[0].appendChild(e),document.getElementById("cadesplugin_install").addEventListener("click",(function(e){opr.addons.installExtension("epebfcehmdedogndhlcacafjaacknbcm",(function(){document.getElementById("cadesplugin_ovr").style.visibility="hidden",location.reload()}),(function(){}))})),document.getElementById("cadesplugin_close_install").addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.style.visibility="visible",document.getElementById("cadesplugin_ovr_item").addEventListener("click",(function(e){e.stopPropagation()}))}))}function firefox_or_edge_nmcades_onload(){cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}function nmcades_api_onload(){window.postMessage("cadesplugin_echo_request","*"),window.addEventListener("message",(function(e){if("string"==typeof e.data&&e.data.match("cadesplugin_loaded"))if(isFireFox||isEdge||isSafari){var t=e.data.substring(e.data.indexOf("url:")+4),r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("src",t),r.onerror=plugin_loaded_error,r.onload=firefox_or_edge_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(r),failed_extensions++}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}),!1)}function load_extension(){if(isFireFox||isEdge||isSafari)nmcades_api_onload();else{var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src","chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js"),e.onerror=plugin_loaded_error,e.onload=nmcades_api_onload,document.getElementsByTagName("head")[0].appendChild(e),(e=document.createElement("script")).setAttribute("type","text/javascript"),e.setAttribute("src","chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js"),e.onerror=plugin_loaded_error,e.onload=nmcades_api_onload,document.getElementsByTagName("head")[0].appendChild(e)}}function load_npapi_plugin(){var e=document.createElement("object");if(e.setAttribute("id","cadesplugin_object"),e.setAttribute("type","application/x-cades"),e.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(e),pluginObject=document.getElementById("cadesplugin_object"),isIE()){var t=document.createElement("object");t.setAttribute("id","certEnrollClassFactory"),t.setAttribute("classid","clsid:884e2049-217d-11da-b2a4-000e7bbb2b09"),t.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(t);var r=document.createElement("object");r.setAttribute("id","webClassFactory"),r.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),r.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(r)}}function plugin_loaded(){plugin_resolved=1,canPromise?plugin_resolve():window.postMessage("cadesplugin_loaded","*")}function plugin_loaded_error(e){if(isNativeMessageSupported()){if(++failed_extensions<2)return;if(isOpera&&(void 0===e||"object"==typeof e))return void install_opera_extension()}void 0!==e&&"object"!=typeof e||(e="Плагин недоступен"),plugin_resolved=1,canPromise?plugin_reject(e):window.postMessage("cadesplugin_load_error","*")}function check_load_timeout(){1!==plugin_resolved&&(isFireFox&&show_firefox_missing_extension_dialog(),plugin_resolved=1,canPromise?plugin_reject("Истекло время ожидания загрузки плагина"):window.postMessage("cadesplugin_load_error","*"))}function createPromise(e){return new Promise(e)}function check_npapi_plugin(){try{CreateObject("CAdESCOM.About");plugin_loaded()}catch(t){document.getElementById("cadesplugin_object").style.display="none";var e=navigator.mimeTypes["application/x-cades"];if(e)plugin_loaded_error(e.enabledPlugin?"Плагин загружен, но не создаются обьекты":"Ошибка при загрузке плагина");else plugin_loaded_error("Плагин недоступен")}}function check_plugin_working(){var e=document.createElement("div");e.innerHTML="\x3c!--[if lt IE 9]>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0)for(;e>0;){var r=void 0;r=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.ExtendedKeyUsage(),r=_generateCadesFn_1.__cadesAsyncToken__+r.EKUs,r=_generateCadesFn_1.__cadesAsyncToken__+r.Item(e),r=_generateCadesFn_1.__cadesAsyncToken__+r.OID,t.push(r),e--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении ОИД'ов")}return t})))}))},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,_){function o(e){try{i(n.next(e))}catch(e){_(e)}}function s(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}i((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,_,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function s(_){return function(s){return function(_){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return o.label++,{value:_[1],done:!1};case 5:o.label++,n=_[1],_=[0];continue;case 7:_=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]=4}},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,_){function o(e){try{i(n.next(e))}catch(e){_(e)}}function s(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}i((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,a,_,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function s(_){return function(s){return function(_){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return o.label++,{value:_[1],done:!1};case 5:o.label++,n=_[1],_=[0];continue;case 7:_=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0?o-4:o;for(r=0;r>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===s&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===s&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,_=[],o=0,s=r-a;os?s:o+16383));1===a?(t=e[r-1],_.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],_.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return _.join("")};for(var n=[],a=[],_="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=o.length;s0)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 a,_,o=[],s=t;s>18&63]+n[_>>12&63]+n[_>>6&63]+n[63&_]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ t.read=function(e,t,r,n,a){var _,o,s=8*a-n-1,i=(1<>1,u=-7,l=r?a-1:0,d=r?-1:1,f=e[t+l];for(l+=d,_=f&(1<<-u)-1,f>>=-u,u+=s;u>0;_=256*_+e[t+l],l+=d,u-=8);for(o=_&(1<<-u)-1,_>>=-u,u+=n;u>0;o=256*o+e[t+l],l+=d,u-=8);if(0===_)_=1-c;else{if(_===i)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),_-=c}return(f?-1:1)*o*Math.pow(2,_-n)},t.write=function(e,t,r,n,a,_){var o,s,i,c=8*_-a-1,u=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:_-1,g=n?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(i=Math.pow(2,-o))<1&&(o--,i*=2),(t+=o+l>=1?d/i:d*Math.pow(2,1-l))*i>=2&&(o++,i/=2),o+l>=u?(s=0,o=u):o+l>=1?(s=(t*i-1)*Math.pow(2,a),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,a),o=0));a>=8;e[r+f]=255&s,f+=g,s/=256,a-=8);for(o=o<0;e[r+f]=255&o,f+=g,o/=256,c-=8);e[r+f-g]|=128*p}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,_){function o(e){try{i(n.next(e))}catch(e){_(e)}}function s(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}i((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,a,_,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function s(_){return function(s){return function(_){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return o.label++,{value:_[1],done:!1};case 5:o.label++,n=_[1],_=[0];continue;case 7:_=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){o=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]