diff --git a/dist/ruscrypto.min.js b/dist/ruscrypto.min.js index c44f712..d088a2d 100644 --- a/dist/ruscrypto.min.js +++ b/dist/ruscrypto.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RusCryptoJS",[],t):"object"==typeof exports?exports.RusCryptoJS=t():e.RusCryptoJS=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t,n){var r=n(40)("wks"),i=n(17),o=n(1).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(2),i=n(61),o=n(34),a=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(14),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(3),i=n(19);e.exports=n(4)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(31);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(1),i=n(15),o=n(8),a=n(11),c=n(13),u=function(e,t,n){var s,_,l,f,E=e&u.F,p=e&u.G,d=e&u.S,C=e&u.P,h=e&u.B,g=p?r:d?r[t]||(r[t]={}):(r[t]||{}).prototype,I=p?i:i[t]||(i[t]={}),O=I.prototype||(I.prototype={});for(s in p&&(n=t),n)l=((_=!E&&g&&void 0!==g[s])?g:n)[s],f=h&&_?c(l,r):C&&"function"==typeof l?c(Function.call,l):l,g&&a(g,s,l,e&u.U),I[s]!=l&&o(I,s,f),C&&O[s]!=l&&(O[s]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(1),i=n(8),o=n(12),a=n(17)("src"),c=Function.toString,u=(""+c).split("toString");n(15).inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,c){var s="function"==typeof n;s&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(s&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:c?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||c.call(this)}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(35);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){var n=e.exports={version:"2.6.3"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(45),i=n(31);e.exports=function(e){return r(i(e))}},function(e,t){e.exports={}},function(e,t,n){var r=n(63),i=n(47);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(2),i=n(9),o=n(6),a=n(14),c=n(38),u=n(39),s=Math.max,_=Math.min,l=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,E=/\$([$&`']|\d\d?)/g;n(41)("replace",2,(function(e,t,n,p){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=p(n,e,this,t);if(i.done)return i.value;var l=r(e),f=String(this),E="function"==typeof t;E||(t=String(t));var C=l.global;if(C){var h=l.unicode;l.lastIndex=0}for(var g=[];;){var I=u(l,f);if(null===I)break;if(g.push(I),!C)break;""===String(I[0])&&(l.lastIndex=c(f,o(l.lastIndex),h))}for(var O,A="",S=0,v=0;v=S&&(A+=f.slice(S,N)+P,S=N+T.length)}return A+f.slice(S)}];function d(e,t,r,o,a,c){var u=r+e.length,s=o.length,_=E;return void 0!==a&&(a=i(a),_=f),n.call(c,_,(function(n,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var _=+i;if(0===_)return n;if(_>s){var f=l(_/10);return 0===f?n:f<=s?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):n}c=o[_-1]}return void 0===c?"":c}))}}))},function(e,t,n){"use strict";var r=n(2),i=n(6),o=n(38),a=n(39);n(41)("match",1,(function(e,t,n,c){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=c(n,e,this);if(t.done)return t.value;var u=r(e),s=String(this);if(!u.global)return a(u,s);var _=u.unicode;u.lastIndex=0;for(var l,f=[],E=0;null!==(l=a(u,s));){var p=String(l[0]);f[E]=p,""===p&&(u.lastIndex=o(s,i(u.lastIndex),_)),E++}return 0===E?null:f}]}))},function(e,t,n){var r=n(63),i=n(47).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(3).f,i=n(12),o=n(0)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(73),i=n(94),o=n(21),a=n(20);e.exports=n(74)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";n(97);var r=n(2),i=n(33),o=n(4),a=/./.toString,c=function(e){n(11)(RegExp.prototype,"toString",e,!0)};n(7)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?c((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=a.name&&c((function(){return a.call(this)}))},function(e,t,n){"use strict";var r,i,o,a,c=n(16),u=n(1),s=n(13),_=n(32),l=n(10),f=n(5),E=n(35),p=n(51),d=n(98),C=n(55),h=n(76).set,g=n(100)(),I=n(77),O=n(101),A=n(102),S=n(103),v=u.TypeError,T=u.process,N=T&&T.versions,R=N&&N.v8||"",m=u.Promise,y="process"==_(T),D=function(){},P=i=I.f,b=!!function(){try{var e=m.resolve(1),t=(e.constructor={})[n(0)("species")]=function(e){e(D,D)};return(y||"function"==typeof PromiseRejectionEvent)&&e.then(D)instanceof t&&0!==R.indexOf("6.6")&&-1===A.indexOf("Chrome/66")}catch(e){}}(),w=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;g((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,c=i?t.ok:t.fail,u=t.resolve,s=t.reject,_=t.domain;try{c?(i||(2==e._h&&U(e),e._h=1),!0===c?n=r:(_&&_.enter(),n=c(r),_&&(_.exit(),a=!0)),n===t.promise?s(v("Promise-chain cycle")):(o=w(n))?o.call(n,u,s):u(n)):s(r)}catch(e){_&&!a&&_.exit(),s(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&M(e)}))}},M=function(e){h.call(u,(function(){var t,n,r,i=e._v,o=x(e);if(o&&(t=O((function(){y?T.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=y||x(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},x=function(e){return 1!==e._h&&0===(e._a||e._c).length},U=function(e){h.call(u,(function(){var t;y?T.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},K=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw v("Promise can't be resolved itself");(t=w(e))?g((function(){var r={_w:n,_d:!1};try{t.call(e,s(j,r,1),s(K,r,1))}catch(e){K.call(r,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){K.call({_w:n,_d:!1},e)}}};b||(m=function(e){p(this,m,"Promise","_h"),E(e),r.call(this);try{e(s(j,this,1),s(K,this,1))}catch(e){K.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(50)(m.prototype,{then:function(e,t){var n=P(C(this,m));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=y?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=s(j,e,1),this.reject=s(K,e,1)},I.f=P=function(e){return e===m||e===a?new o(e):i(e)}),l(l.G+l.W+l.F*!b,{Promise:m}),n(26)(m,"Promise"),n(48)("Promise"),a=n(15).Promise,l(l.S+l.F*!b,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(c||!b),"Promise",{resolve:function(e){return S(c&&this===a?m:this,e)}}),l(l.S+l.F*!(b&&n(56)((function(e){m.all(e).catch(D)}))),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,o=O((function(){var n=[],o=0,a=1;d(e,!1,(function(e){var c=o++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[c]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=O((function(){d(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){var r=function(e){function t(e){return!!(e&&e.call&&e.apply)}function n(e,n){return t(e[n])?function(){return e[n].apply(e,arguments)}:e[n]}function r(e){return function(){return e}}function i(){e.ready=Promise.resolve(!0),e.isExtensionInstalled=r(Promise.resolve(!1)),e.isPluginInstalled=r(Promise.resolve(!0)),e.loadPlugin=o,window.rutokenLoaded=c}function o(){var e=document.createElement("object");return e.style.setProperty("visibility","hidden","important"),e.style.setProperty("width","0px","important"),e.style.setProperty("height","0px","important"),e.style.setProperty("margin","0px","important"),e.style.setProperty("padding","0px","important"),e.style.setProperty("border-style","none","important"),e.style.setProperty("border-width","0px","important"),e.style.setProperty("max-width","0px","important"),e.style.setProperty("max-height","0px","important"),e.innerHTML="",e.setAttribute("type",f),document.body.appendChild(e),new Promise((function(e,t){l.push(e)}))}function a(){return E.loadPlugin().then((function(e){return function e(r){var i={},o=[];for(var a in r)!function(a){t(r[a].then)?o.push(r[a].then((function(o){return e(o).then((function(e){t(e)?i[a]=n(r,a):i[a]=e}))}))):i[a]=r[a]}(a);return 0==o.length?new Promise((function(e){e(r)})):Promise.all(o).then((function(){return i}))}(e)})).then((function(e){return e.wrapWithOldInterface=u,e}))}function c(e,t){_(e).then((function(e){if(0==l.length)throw"Internal error";l.shift()(e)}))}function u(){var e={};for(var n in this)t(this[n])?e[n]=function(e,t){return function(){var n=arguments[arguments.length-2],r=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0,-2);return t.apply(e,i).then((function(e){n(e)}),(function(e){r(e.message)}))}}(this,this[n]):e[n]=this[n];return new Promise((function(t){t(e)}))}function s(){var e={originalObject:this.originalObject};for(var t in this.originalObject)e[t]=n(this.originalObject,t);return new Promise((function(t){t(e)}))}function _(e){var n={originalObject:e,wrapWithOldInterface:s};for(var r in e)t(e[r])?n[r]=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return new Promise((function(r,i){n.push(r,i),t.apply(e,n)}))}}(e,e[r]):n[r]=e[r];return new Promise((function(e){e(n)}))}var l=[],f="application/x-rutoken-pki",E=window["C3B7563B-BF85-45B7-88FC-7CFF1BD3C2DB"];if(E)!function(){var t=E.initialize().then((function(){return E.isPluginInstalled()})).then((function(t){return e.isExtensionInstalled=r(Promise.resolve(!0)),e.isPluginInstalled=n(E,"isPluginInstalled"),t&&(f="application/x-rutoken-plugin",e.loadPlugin=a),!0}));e.ready=t}();else if(navigator.mimeTypes&&navigator.mimeTypes[f])i();else try{new ActiveXObject("Aktiv.CryptoPlugin"),i()}catch(t){e.ready=Promise.resolve(!0),e.isExtensionInstalled=r(Promise.resolve(!1)),e.isPluginInstalled=r(Promise.resolve(!1))}return e}(r||{});e.exports=r},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(18),i=n(0)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var r=n(2);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(14),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){"use strict";var r=n(60)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(32),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(15),i=n(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(16)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";n(86);var r=n(11),i=n(8),o=n(7),a=n(31),c=n(0),u=n(42),s=c("species"),_=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=c(e),E=!o((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=E?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[s]=function(){return n}),n[f](""),!t})):void 0;if(!E||!p||"replace"===e&&!_||"split"===e&&!l){var d=/./[f],C=n(a,f,""[e],(function(e,t,n,r,i){return t.exec===u?E&&!i?{done:!0,value:d.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),h=C[0],g=C[1];r(String.prototype,e,h),i(RegExp.prototype,f,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},function(e,t,n){"use strict";var r,i,o=n(33),a=RegExp.prototype.exec,c=String.prototype.replace,u=a,s=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),_=void 0!==/()??/.exec("")[1];(s||_)&&(u=function(e){var t,n,r,i,u=this;return _&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),s&&(t=u.lastIndex),r=a.call(u,e),s&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),_&&r&&r.length>1&&c.call(r[0],n,(function(){for(i=1;idocument.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(32),i=n(0)("iterator"),o=n(21);e.exports=n(15).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(2),i=n(35),o=n(0)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r=n(0)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){for(var r=n(27),i=n(22),o=n(11),a=n(1),c=n(8),u=n(21),s=n(0),_=s("iterator"),l=s("toStringTag"),f=u.Array,E={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(E),d=0;d=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(14),i=n(31);e.exports=function(e){return function(t,n){var o,a,c=String(i(t)),u=r(n),s=c.length;return u<0||u>=s?e?"":void 0:(o=c.charCodeAt(u))<55296||o>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?e?c.charAt(u):o:e?c.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){e.exports=!n(4)&&!n(7)((function(){return 7!=Object.defineProperty(n(43)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(1),i=n(87),o=n(3).f,a=n(25).f,c=n(65),u=n(33),s=r.RegExp,_=s,l=s.prototype,f=/a/g,E=/a/g,p=new s(f)!==f;if(n(4)&&(!p||n(7)((function(){return E[n(0)("match")]=!1,s(f)!=f||s(E)==E||"/a/i"!=s(f,"i")})))){s=function(e,t){var n=this instanceof s,r=c(e),o=void 0===t;return!n&&r&&e.constructor===s&&o?e:i(p?new _(r&&!o?e.source:e,t):_((r=e instanceof s)?e.source:e,r&&o?u.call(e):t),n?this:l,s)};for(var d=function(e){e in s||o(s,e,{configurable:!0,get:function(){return _[e]},set:function(t){_[e]=t}})},C=a(_),h=0;C.length>h;)d(C[h++]);l.constructor=s,s.prototype=l,n(11)(r,"RegExp",s)}n(48)("RegExp")},function(e,t,n){var r=n(12),i=n(20),o=n(64)(!1),a=n(46)("IE_PROTO");e.exports=function(e,t){var n,c=i(e),u=0,s=[];for(n in c)n!=a&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~o(s,n)||s.push(n));return s}},function(e,t,n){var r=n(20),i=n(6),o=n(37);e.exports=function(e){return function(t,n,a){var c,u=r(t),s=i(u.length),_=o(a,s);if(e&&n!=n){for(;s>_;)if((c=u[_++])!=c)return!0}else for(;s>_;_++)if((e||_ in u)&&u[_]===n)return e||_||0;return!e&&-1}}},function(e,t,n){var r=n(5),i=n(18),o=n(0)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){for(var r,i=n(1),o=n(8),a=n(17),c=a("typed_array"),u=a("view"),s=!(!i.ArrayBuffer||!i.DataView),_=s,l=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[f[l++]])?(o(r.prototype,c,!0),o(r.prototype,u,!0)):_=!1;e.exports={ABV:s,CONSTR:_,TYPED:c,VIEW:u}},function(e,t,n){var r=n(14),i=n(6);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){"use strict";var r=n(9),i=n(37),o=n(6);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,c=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,s=void 0===u?n:i(u,n);s>c;)t[c++]=e;return t}},function(e,t,n){var r=n(1).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(12),i=n(9),o=n(46)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(13),i=n(45),o=n(9),a=n(6),c=n(92);e.exports=function(e,t){var n=1==e,u=2==e,s=3==e,_=4==e,l=6==e,f=5==e||l,E=t||c;return function(t,c,p){for(var d,C,h=o(t),g=i(h),I=r(c,p,3),O=a(g.length),A=0,S=n?E(t,O):u?E(t,0):void 0;O>A;A++)if((f||A in g)&&(C=I(d=g[A],A,h),e))if(n)S[A]=C;else if(C)switch(e){case 3:return!0;case 5:return d;case 6:return A;case 2:S.push(d)}else if(_)return!1;return l?-1:s||_?_:S}}},function(e,t,n){var r=n(18);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(0)("unscopables"),i=Array.prototype;null==i[r]&&n(8)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";var r=n(16),i=n(10),o=n(11),a=n(8),c=n(21),u=n(95),s=n(26),_=n(70),l=n(0)("iterator"),f=!([].keys&&"next"in[].keys()),E=function(){return this};e.exports=function(e,t,n,p,d,C,h){u(n,t,p);var g,I,O,A=function(e){if(!f&&e in N)return N[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",v="values"==d,T=!1,N=e.prototype,R=N[l]||N["@@iterator"]||d&&N[d],m=R||A(d),y=d?v?A("entries"):m:void 0,D="Array"==t&&N.entries||R;if(D&&(O=_(D.call(new e)))!==Object.prototype&&O.next&&(s(O,S,!0),r||"function"==typeof O[l]||a(O,l,E)),v&&R&&"values"!==R.name&&(T=!0,m=function(){return R.call(this)}),r&&!h||!f&&!T&&N[l]||a(N,l,m),c[t]=m,c[S]=E,d)if(g={values:v?m:A("values"),keys:C?m:A("keys"),entries:y},h)for(I in g)I in N||o(N,I,g[I]);else i(i.P+i.F*(f||T),t,g);return g}},function(e,t,n){var r=n(2);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r,i,o,a=n(13),c=n(99),u=n(69),s=n(43),_=n(1),l=_.process,f=_.setImmediate,E=_.clearImmediate,p=_.MessageChannel,d=_.Dispatch,C=0,h={},g=function(){var e=+this;if(h.hasOwnProperty(e)){var t=h[e];delete h[e],t()}},I=function(e){g.call(e.data)};f&&E||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return h[++C]=function(){c("function"==typeof e?e:Function(e),t)},r(C),C},E=function(e){delete h[e]},"process"==n(18)(l)?r=function(e){l.nextTick(a(g,e,1))}:d&&d.now?r=function(e){d.now(a(g,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=I,r=a(o.postMessage,o,1)):_.addEventListener&&"function"==typeof postMessage&&!_.importScripts?(r=function(e){_.postMessage(e+"","*")},_.addEventListener("message",I,!1)):r="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:f,clear:E}},function(e,t,n){"use strict";var r=n(35);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(3).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(4)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(13),i=n(10),o=n(9),a=n(75),c=n(52),u=n(6),s=n(108),_=n(54);i(i.S+i.F*!n(56)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,l,f=o(e),E="function"==typeof this?this:Array,p=arguments.length,d=p>1?arguments[1]:void 0,C=void 0!==d,h=0,g=_(f);if(C&&(d=r(d,p>2?arguments[2]:void 0,2)),null==g||E==Array&&c(g))for(n=new E(t=u(f.length));t>h;h++)s(n,h,C?d(f[h],h):f[h]);else for(l=g.call(f),n=new E;!(i=l.next()).done;h++)s(n,h,C?a(l,d,[i.value,h],!0):i.value);return n.length=h,n}})},function(e,t,n){n(81)("asyncIterator")},function(e,t,n){var r=n(1),i=n(15),o=n(16),a=n(82),c=n(3).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||c(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(0)},function(e,t,n){"use strict";var r=n(1),i=n(12),o=n(4),a=n(10),c=n(11),u=n(111).KEY,s=n(7),_=n(40),l=n(26),f=n(17),E=n(0),p=n(82),d=n(81),C=n(112),h=n(72),g=n(2),I=n(5),O=n(20),A=n(34),S=n(19),v=n(53),T=n(113),N=n(44),R=n(3),m=n(22),y=N.f,D=R.f,P=T.f,b=r.Symbol,w=r.JSON,L=w&&w.stringify,M=E("_hidden"),x=E("toPrimitive"),U={}.propertyIsEnumerable,K=_("symbol-registry"),j=_("symbols"),B=_("op-symbols"),F=Object.prototype,G="function"==typeof b,V=r.QObject,Y=!V||!V.prototype||!V.prototype.findChild,H=o&&s((function(){return 7!=v(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=y(F,t);r&&delete F[t],D(e,t,n),r&&e!==F&&D(F,t,r)}:D,X=function(e){var t=j[e]=v(b.prototype);return t._k=e,t},k=G&&"symbol"==typeof b.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof b},W=function(e,t,n){return e===F&&W(B,t,n),g(e),t=A(t,!0),g(n),i(j,t)?(n.enumerable?(i(e,M)&&e[M][t]&&(e[M][t]=!1),n=v(n,{enumerable:S(0,!1)})):(i(e,M)||D(e,M,S(1,{})),e[M][t]=!0),H(e,t,n)):D(e,t,n)},J=function(e,t){g(e);for(var n,r=C(t=O(t)),i=0,o=r.length;o>i;)W(e,n=r[i++],t[n]);return e},q=function(e){var t=U.call(this,e=A(e,!0));return!(this===F&&i(j,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(j,e)||i(this,M)&&this[M][e])||t)},z=function(e,t){if(e=O(e),t=A(t,!0),e!==F||!i(j,t)||i(B,t)){var n=y(e,t);return!n||!i(j,t)||i(e,M)&&e[M][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=P(O(e)),r=[],o=0;n.length>o;)i(j,t=n[o++])||t==M||t==u||r.push(t);return r},$=function(e){for(var t,n=e===F,r=P(n?B:O(e)),o=[],a=0;r.length>a;)!i(j,t=r[a++])||n&&!i(F,t)||o.push(j[t]);return o};G||(c((b=function(){if(this instanceof b)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(B,n),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),H(this,e,S(1,n))};return o&&Y&&H(F,e,{configurable:!0,set:t}),X(e)}).prototype,"toString",(function(){return this._k})),N.f=z,R.f=W,n(25).f=T.f=Z,n(36).f=q,n(59).f=$,o&&!n(16)&&c(F,"propertyIsEnumerable",q,!0),p.f=function(e){return X(E(e))}),a(a.G+a.W+a.F*!G,{Symbol:b});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)E(Q[ee++]);for(var te=m(E.store),ne=0;te.length>ne;)d(te[ne++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(K,e+="")?K[e]:K[e]=b(e)},keyFor:function(e){if(!k(e))throw TypeError(e+" is not a symbol!");for(var t in K)if(K[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!G,"Object",{create:function(e,t){return void 0===t?v(e):J(v(e),t)},defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:z,getOwnPropertyNames:Z,getOwnPropertySymbols:$}),w&&a(a.S+a.F*(!G||s((function(){var e=b();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(I(t)||void 0!==e)&&!k(e))return h(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!k(t))return t}),r[1]=t,L.apply(w,r)}}),b.prototype[x]||n(8)(b.prototype,x,b.prototype.valueOf),l(b,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(115)},function(e,t){!function(e){"use strict";e.console||(e.console={});for(var t,n,r=e.console,i=function(){},o=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=o.pop();)r[t]||(r[t]={});for(;n=a.pop();)r[n]||(r[n]=i)}("undefined"==typeof window?this:window)},function(e,t,n){"use strict";var r=n(42);n(10)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){var r=n(5),i=n(88).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){var r=n(5),i=n(2),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(13)(Function.call,n(44).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";if(n(4)){var r=n(16),i=n(1),o=n(7),a=n(10),c=n(66),u=n(90),s=n(13),_=n(51),l=n(19),f=n(8),E=n(50),p=n(14),d=n(6),C=n(67),h=n(37),g=n(34),I=n(12),O=n(32),A=n(5),S=n(9),v=n(52),T=n(53),N=n(70),R=n(25).f,m=n(54),y=n(17),D=n(0),P=n(71),b=n(64),w=n(55),L=n(27),M=n(21),x=n(56),U=n(48),K=n(68),j=n(96),B=n(3),F=n(44),G=B.f,V=F.f,Y=i.RangeError,H=i.TypeError,X=i.Uint8Array,k=Array.prototype,W=u.ArrayBuffer,J=u.DataView,q=P(0),z=P(2),Z=P(3),$=P(4),Q=P(5),ee=P(6),te=b(!0),ne=b(!1),re=L.values,ie=L.keys,oe=L.entries,ae=k.lastIndexOf,ce=k.reduce,ue=k.reduceRight,se=k.join,_e=k.sort,le=k.slice,fe=k.toString,Ee=k.toLocaleString,pe=D("iterator"),de=D("toStringTag"),Ce=y("typed_constructor"),he=y("def_constructor"),ge=c.CONSTR,Ie=c.TYPED,Oe=c.VIEW,Ae=P(1,(function(e,t){return Re(w(e,e[he]),t)})),Se=o((function(){return 1===new X(new Uint16Array([1]).buffer)[0]})),ve=!!X&&!!X.prototype.set&&o((function(){new X(1).set({})})),Te=function(e,t){var n=p(e);if(n<0||n%t)throw Y("Wrong offset!");return n},Ne=function(e){if(A(e)&&Ie in e)return e;throw H(e+" is not a typed array!")},Re=function(e,t){if(!(A(e)&&Ce in e))throw H("It is not a typed array constructor!");return new e(t)},me=function(e,t){return ye(w(e,e[he]),t)},ye=function(e,t){for(var n=0,r=t.length,i=Re(e,r);r>n;)i[n]=t[n++];return i},De=function(e,t,n){G(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,o,a,c=S(e),u=arguments.length,_=u>1?arguments[1]:void 0,l=void 0!==_,f=m(c);if(null!=f&&!v(f)){for(a=f.call(c),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);c=r}for(l&&u>2&&(_=s(_,arguments[2],2)),t=0,n=d(c.length),i=Re(this,n);n>t;t++)i[t]=l?_(c[t],t):c[t];return i},be=function(){for(var e=0,t=arguments.length,n=Re(this,t);t>e;)n[e]=arguments[e++];return n},we=!!X&&o((function(){Ee.call(new X(1))})),Le=function(){return Ee.apply(we?le.call(Ne(this)):Ne(this),arguments)},Me={copyWithin:function(e,t){return j.call(Ne(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Ne(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return K.apply(Ne(this),arguments)},filter:function(e){return me(this,z(Ne(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Ne(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Ne(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){q(Ne(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Ne(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Ne(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return se.apply(Ne(this),arguments)},lastIndexOf:function(e){return ae.apply(Ne(this),arguments)},map:function(e){return Ae(Ne(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ce.apply(Ne(this),arguments)},reduceRight:function(e){return ue.apply(Ne(this),arguments)},reverse:function(){for(var e,t=Ne(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return _e.call(Ne(this),e)},subarray:function(e,t){var n=Ne(this),r=n.length,i=h(e,r);return new(w(n,n[he]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,d((void 0===t?r:h(t,r))-i))}},xe=function(e,t){return me(this,le.call(Ne(this),e,t))},Ue=function(e){Ne(this);var t=Te(arguments[1],1),n=this.length,r=S(e),i=d(r.length),o=0;if(i+t>n)throw Y("Wrong length!");for(;o255?255:255&r),i.v[E](n*t+i.o,r,Se)}(this,n,e)},enumerable:!0})};I?(p=n((function(e,n,r,i){_(e,p,s,"_d");var o,a,c,u,l=0,E=0;if(A(n)){if(!(n instanceof W||"ArrayBuffer"==(u=O(n))||"SharedArrayBuffer"==u))return Ie in n?ye(p,n):Pe.call(p,n);o=n,E=Te(r,t);var h=n.byteLength;if(void 0===i){if(h%t)throw Y("Wrong length!");if((a=h-E)<0)throw Y("Wrong length!")}else if((a=d(i)*t)+E>h)throw Y("Wrong length!");c=a/t}else c=C(n),o=new W(a=c*t);for(f(e,"_d",{b:o,o:E,l:a,e:c,v:new J(o)});l>1,_=23===t?N(2,-24)-N(2,-77):0,l=0,f=e<0||0===e&&1/e<0?1:0;for((e=T(e))!=e||e===S?(i=e!=e?1:0,r=u):(r=R(m(e)/y),e*(o=N(2,-r))<1&&(r--,o*=2),(e+=r+s>=1?_/o:_*N(2,1-s))*o>=2&&(r++,o/=2),r+s>=u?(i=0,r=u):r+s>=1?(i=(e*o-1)*N(2,t),r+=s):(i=e*N(2,s-1)*N(2,t),r=0));t>=8;a[l++]=255&i,i/=256,t-=8);for(r=r<0;a[l++]=255&r,r/=256,c-=8);return a[--l]|=128*f,a}function L(e,t,n){var r,i=8*n-t-1,o=(1<>1,c=i-7,u=n-1,s=e[u--],_=127&s;for(s>>=7;c>0;_=256*_+e[u],u--,c-=8);for(r=_&(1<<-c)-1,_>>=-c,c+=t;c>0;r=256*r+e[u],u--,c-=8);if(0===_)_=1-a;else{if(_===o)return r?NaN:s?-S:S;r+=N(2,t),_-=a}return(s?-1:1)*r*N(2,_-t)}function M(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function x(e){return[255&e]}function U(e){return[255&e,e>>8&255]}function K(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function j(e){return w(e,52,8)}function B(e){return w(e,23,4)}function F(e,t,n){d(e.prototype,t,{get:function(){return this[n]}})}function G(e,t,n,r){var i=E(+n);if(i+t>e[P])throw A("Wrong index!");var o=e[D]._b,a=i+e[b],c=o.slice(a,a+t);return r?c:c.reverse()}function V(e,t,n,r,i,o){var a=E(+n);if(a+t>e[P])throw A("Wrong index!");for(var c=e[D]._b,u=a+e[b],s=r(+i),_=0;_k;)(Y=X[k++])in g||c(g,Y,v[Y]);o||(H.constructor=g)}var W=new I(new g(2)),J=I.prototype.setInt8;W.setInt8(0,2147483648),W.setInt8(1,2147483649),!W.getInt8(0)&&W.getInt8(1)||u(I.prototype,{setInt8:function(e,t){J.call(this,e,t<<24>>24)},setUint8:function(e,t){J.call(this,e,t<<24>>24)}},!0)}else g=function(e){_(this,g,"ArrayBuffer");var t=E(e);this._b=C.call(new Array(t),0),this[P]=t},I=function(e,t,n){_(this,I,"DataView"),_(e,g,"DataView");var r=e[P],i=l(t);if(i<0||i>r)throw A("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw A("Wrong length!");this[D]=e,this[b]=i,this[P]=n},i&&(F(g,"byteLength","_l"),F(I,"buffer","_b"),F(I,"byteLength","_l"),F(I,"byteOffset","_o")),u(I.prototype,{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return M(G(this,4,e,arguments[1]))},getUint32:function(e){return M(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){V(this,1,e,x,t)},setUint8:function(e,t){V(this,1,e,x,t)},setInt16:function(e,t){V(this,2,e,U,t,arguments[2])},setUint16:function(e,t){V(this,2,e,U,t,arguments[2])},setInt32:function(e,t){V(this,4,e,K,t,arguments[2])},setUint32:function(e,t){V(this,4,e,K,t,arguments[2])},setFloat32:function(e,t){V(this,4,e,B,t,arguments[2])},setFloat64:function(e,t){V(this,8,e,j,t,arguments[2])}});h(g,"ArrayBuffer"),h(I,"DataView"),c(I.prototype,a.VIEW,!0),t.ArrayBuffer=g,t.DataView=I},function(e,t,n){var r=n(3),i=n(2),o=n(22);e.exports=n(4)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),c=a.length,u=0;c>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(93);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(5),i=n(72),o=n(0)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(53),i=n(19),o=n(26),a={};n(8)(a,n(0)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(9),i=n(37),o=n(6);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),c=i(e,a),u=i(t,a),s=arguments.length>2?arguments[2]:void 0,_=Math.min((void 0===s?a:i(s,a))-u,a-c),l=1;for(u0;)u in n?n[c]=n[u]:delete n[c],c+=l,u+=l;return n}},function(e,t,n){n(4)&&"g"!=/./g.flags&&n(3).f(RegExp.prototype,"flags",{configurable:!0,get:n(33)})},function(e,t,n){var r=n(13),i=n(75),o=n(52),a=n(2),c=n(6),u=n(54),s={},_={};(t=e.exports=function(e,t,n,l,f){var E,p,d,C,h=f?function(){return e}:u(e),g=r(n,l,t?2:1),I=0;if("function"!=typeof h)throw TypeError(e+" is not iterable!");if(o(h)){for(E=c(e.length);E>I;I++)if((C=t?g(a(p=e[I])[0],p[1]):g(e[I]))===s||C===_)return C}else for(d=h.call(e);!(p=d.next()).done;)if((C=i(d,g,p.value,t))===s||C===_)return C}).BREAK=s,t.RETURN=_},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(1),i=n(76).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,c=r.Promise,u="process"==n(18)(a);e.exports=function(){var e,t,n,s=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(s)};else if(!o||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var _=c.resolve(void 0);n=function(){_.then(s)}}else n=function(){i.call(r,s)};else{var l=!0,f=document.createTextNode("");new o(s).observe(f,{characterData:!0}),n=function(){f.data=l=!l}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(1).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){var r=n(2),i=n(5),o=n(77);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(65),i=n(2),o=n(55),a=n(38),c=n(6),u=n(39),s=n(42),_=n(7),l=Math.min,f=[].push,E=!_((function(){RegExp(4294967295,"y")}));n(41)("split",2,(function(e,t,n,_){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,c,u=[],_=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,E=void 0===t?4294967295:t>>>0,p=new RegExp(e.source,_+"g");(o=s.call(p,i))&&!((a=p.lastIndex)>l&&(u.push(i.slice(l,o.index)),o.length>1&&o.index=E));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!c&&p.test("")||u.push(""):u.push(i.slice(l)),u.length>E?u.slice(0,E):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):p.call(String(i),n,r)},function(e,t){var r=_(p,e,this,t,p!==n);if(r.done)return r.value;var s=i(e),f=String(this),d=o(s,RegExp),C=s.unicode,h=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(E?"y":"g"),g=new d(E?s:"^(?:"+s.source+")",h),I=void 0===t?4294967295:t>>>0;if(0===I)return[];if(0===f.length)return null===u(g,f)?[f]:[];for(var O=0,A=0,S=[];A1?arguments[1]:void 0)}}),n(73)("find")},function(e,t,n){var r=n(9),i=n(22);n(107)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(10),i=n(15),o=n(7);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(e,t,n){"use strict";var r=n(3),i=n(19);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(10);r(r.S+r.F,"Object",{assign:n(110)})},function(e,t,n){"use strict";var r=n(22),i=n(59),o=n(36),a=n(9),c=n(45),u=Object.assign;e.exports=!u||n(7)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=a(e),u=arguments.length,s=1,_=i.f,l=o.f;u>s;)for(var f,E=c(arguments[s++]),p=_?r(E).concat(_(E)):r(E),d=p.length,C=0;d>C;)l.call(E,f=p[C++])&&(n[f]=E[f]);return n}:u},function(e,t,n){var r=n(17)("meta"),i=n(5),o=n(12),a=n(3).f,c=0,u=Object.isExtensible||function(){return!0},s=!n(7)((function(){return u(Object.preventExtensions({}))})),_=function(e){a(e,r,{value:{i:"O"+ ++c,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";_(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;_(e)}return e[r].w},onFreeze:function(e){return s&&l.NEED&&u(e)&&!o(e,r)&&_(e),e}}},function(e,t,n){var r=n(22),i=n(59),o=n(36);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,c=n(e),u=o.f,s=0;c.length>s;)u.call(e,a=c[s++])&&t.push(a);return t}},function(e,t,n){var r=n(20),i=n(25).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(80),core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(83),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(28),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(78),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(23),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(24),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(29),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6__);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){if(!window.cadesplugin){var pluginObject,plugin_resolved=0,plugin_reject,plugin_resolve,isOpera=0,isFireFox=0,isSafari=0,isYandex=0,canPromise=!!window.Promise,cadesplugin;cadesplugin=canPromise?new Promise((function(e,t){plugin_resolve=e,plugin_reject=t})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,t){var n=ru_cryptopro_npcades_10_native_bridge.callbacks[e];n&&n.apply(null,t)},call:function(e,t,n){var r=n&&"function"==typeof n,i=r?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;r&&(ru_cryptopro_npcades_10_native_bridge.callbacks[i]=n);var o=document.createElement("IFRAME"),a=new Array("_CPNP_handle");try{o.setAttribute("src","cpnp-js-call:"+e+":"+i+":"+encodeURIComponent(JSON.stringify(t,a)))}catch(e){alert(e)}document.documentElement.appendChild(o),o.parentNode.removeChild(o),o=null}};cadesplugin.JSModuleVersion="2.3.0",cadesplugin.async_spawn=async_spawn,cadesplugin.set=set_pluginObject,cadesplugin.set_log_level=set_log_level,cadesplugin.getLastError=getLastError,cadesplugin.is_capilite_enabled=is_capilite_enabled,isNativeMessageSupported()&&(cadesplugin.CreateObjectAsync=CreateObjectAsync,cadesplugin.ReleasePluginObjects=ReleasePluginObjects),isNativeMessageSupported()||(cadesplugin.CreateObject=CreateObject),window.cadesplugin_load_timeout?setTimeout(check_load_timeout,window.cadesplugin_load_timeout):setTimeout(check_load_timeout,2e4),set_constantValues(),cadesplugin.current_log_level=cadesplugin.LOG_LEVEL_ERROR,window.cadesplugin=cadesplugin,check_plugin_working()}function check_browser(){var e,t=navigator.userAgent,n=t.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===n[1]&&null!=(e=t.match(/\b(OPR|Edg|YaBrowser)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})}function cpcsp_console_log(e,t){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",t),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",t),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",t))):void 0}function set_log_level(e){e===cadesplugin.LOG_LEVEL_DEBUG||e===cadesplugin.LOG_LEVEL_INFO||e===cadesplugin.LOG_LEVEL_ERROR?(cadesplugin.current_log_level=e,cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = DEBUG"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = INFO"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = ERROR"),isNativeMessageSupported()&&(cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&window.postMessage("set_log_level=debug","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&window.postMessage("set_log_level=info","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&window.postMessage("set_log_level=error","*"))):cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,"cadesplugin_api.js: Incorrect log_level: "+e)}function set_constantValues(){cadesplugin.CAPICOM_MEMORY_STORE=0,cadesplugin.CAPICOM_LOCAL_MACHINE_STORE=1,cadesplugin.CAPICOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_MEMORY_STORE=0,cadesplugin.CADESCOM_LOCAL_MACHINE_STORE=1,cadesplugin.CADESCOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_CONTAINER_STORE=100,cadesplugin.CAPICOM_MY_STORE="My",cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED=0,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE=2,cadesplugin.CADESCOM_XADES_DEFAULT=16,cadesplugin.CADESCOM_XADES_BES=32,cadesplugin.CADESCOM_XADES_T=80,cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1=1488,cadesplugin.CADESCOM_XMLDSIG_TYPE=0,cadesplugin.XmlDsigGost3410UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr3411",cadesplugin.XmlDsigGost3410Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411",cadesplugin.XmlDsigGost3411Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256",cadesplugin.XmlDsigGost3410Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256",cadesplugin.XmlDsigGost3411Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512",cadesplugin.XmlDsigGost3410Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512",cadesplugin.CADESCOM_CADES_DEFAULT=0,cadesplugin.CADESCOM_CADES_BES=1,cadesplugin.CADESCOM_CADES_T=5,cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1=93,cadesplugin.CADESCOM_PKCS7_TYPE=65535,cadesplugin.CADESCOM_ENCODE_BASE64=0,cadesplugin.CADESCOM_ENCODE_BINARY=1,cadesplugin.CADESCOM_ENCODE_ANY=-1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT=0,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN=1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY=2,cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME=0,cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH=0,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME=3,cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME=4,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION=5,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY=6,cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY=7,cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY=8,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID=9,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID=10,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED=11,cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE=12,cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE=128,cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE=9,cadesplugin.CAPICOM_OID_OTHER=0,cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION=10,cadesplugin.CAPICOM_EKU_CLIENT_AUTH=2,cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON=5,cadesplugin.CAPICOM_EKU_OTHER=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_ATTRIBUTE_OTHER=-1,cadesplugin.CADESCOM_STRING_TO_UCS2LE=0,cadesplugin.CADESCOM_BASE64_TO_BINARY=1,cadesplugin.CADESCOM_DISPLAY_DATA_NONE=0,cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT=1,cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2=0,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4=1,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES=3,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES=4,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89=25,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1=0,cadesplugin.CADESCOM_HASH_ALGORITHM_MD2=1,cadesplugin.CADESCOM_HASH_ALGORITHM_MD4=2,cadesplugin.CADESCOM_HASH_ALGORITHM_MD5=3,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256=4,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384=5,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512=6,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411=100,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256=101,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512=102,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC=110,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC=111,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC=112,cadesplugin.LOG_LEVEL_DEBUG=4,cadesplugin.LOG_LEVEL_INFO=2,cadesplugin.LOG_LEVEL_ERROR=1,cadesplugin.CADESCOM_AllowNone=0,cadesplugin.CADESCOM_AllowNoOutstandingRequest=1,cadesplugin.CADESCOM_AllowUntrustedCertificate=2,cadesplugin.CADESCOM_AllowUntrustedRoot=4,cadesplugin.CADESCOM_SkipInstallToStore=268435456,cadesplugin.ENABLE_CARRIER_TYPE_CSP=1,cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM=2,cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM=4,cadesplugin.ENABLE_ANY_CARRIER_TYPE=7,cadesplugin.DISABLE_EVERY_CARRIER_OPERATION=0,cadesplugin.ENABLE_CARRIER_OPEN_ENUM=1,cadesplugin.ENABLE_CARRIER_CREATE=2,cadesplugin.ENABLE_ANY_OPERATION=3,cadesplugin.CADESCOM_PRODUCT_CSP=0,cadesplugin.CADESCOM_PRODUCT_OCSP=1,cadesplugin.CADESCOM_PRODUCT_TSP=2,cadesplugin.MEDIA_TYPE_REGISTRY=1,cadesplugin.MEDIA_TYPE_HDIMAGE=2,cadesplugin.MEDIA_TYPE_CLOUD=4,cadesplugin.MEDIA_TYPE_SCARD=8}function async_spawn(e){function t(e,t){var o;try{o=n[e](t)}catch(e){return Promise.reject(e)}return o.done?o.value:Promise.resolve(o.value).then(r,i)}var n=e(Array.prototype.slice.call(arguments,1)),r=t.bind(t,"next"),i=t.bind(t,"throw");return r()}function isIE(){return"IE"===browserSpecs.name||"MSIE"===browserSpecs.name}function isIOS(){return navigator.userAgent.match(/ipod/i)||navigator.userAgent.match(/ipad/i)||navigator.userAgent.match(/iphone/i)}function isNativeMessageSupported(){return!isIE()&&("Edg"===browserSpecs.name||("YaBrowser"===browserSpecs.name?(isYandex=!0,!0):"Opera"===browserSpecs.name?(isOpera=!0,browserSpecs.version>=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 firefox_or_safari_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||isSafari){var t=e.data.substring(e.data.indexOf("url:")+4),n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",t),n.onerror=plugin_loaded_error,n.onload=firefox_or_safari_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(n)}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}),!1)}function load_extension(){var e;isFireFox||isSafari?nmcades_api_onload():isOpera||isYandex?((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)):((e=document.createElement("script")).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))}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 n=document.createElement("object");n.setAttribute("id","webClassFactory"),n.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),n.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(n)}}function plugin_loaded(){plugin_resolved=1,canPromise?plugin_resolve():window.postMessage("cadesplugin_loaded","*")}function plugin_loaded_error(e){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]>1?new Error("Подключено "+i.length+" токена(ов)"):new Error("Нет подключенных токенов");t=i.shift();var o=e.getPluginVersion(),a=e.getTokenInfo(t);r({version:o,serial:a[0],flags:a[1],label:a[2],type:a[3]})}catch(e){var c=n();throw new Error(e.message||c)}}))}))},this.bind=function(r){return new Promise((function(i){try{if(1===e.getLoggedInState().shift())i();else if(r)e.bindTokenAsync(t,r,(function(e){if(e&&"Error"==e[0]){var t=n(e[1]);throw new Error(t)}i()}));else{if(!e.bindTokenUI(t))throw new Error("Пользователь отменил ввод PIN-кода");i()}}catch(e){var o=n();throw new Error(o||e.message)}}))},this.unbind=function(){return new Promise((function(t){try{1===e.getLoggedInState().shift()&&e.unbindToken(),t()}catch(e){var r=n();throw new Error(r||e.message)}}))},this.clean=function(){return new Promise((function(r){try{var i=e.getCertificateList(t);for(var o in i){var a=i[o].shift();e.deleteContainerOrCertificate(a)}r(o)}catch(e){var c=n();throw new Error(c||e.message)}}))},this.generateCSR=function(t,r,i,o){return i&&i.length||(i=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),o||(o="XA"),new Promise((function(a){try{e.createContainerAsync(o,r,(function(r){if(r&&"Error"==r[0]){var o=n(r[1]);throw new Error(o)}var c=r,s=[];for(var _ in t)t.hasOwnProperty(_)&&s.push(_,t[_]);var l=["certificatePolicies","1.2.643.100.113.1","keyUsage","digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment","extendedKeyUsage",i.toString(),"1.2.643.100.111",'ASN1:FORMAT:UTF8,UTF8:"Криптотокен" (АЛАДДИН Р.Д.)'];e.genCSRAsync(c,s,l,(function(e){if(e&&"Error"==e[0]){var t=n(e[1]);throw new Error(t)}var r=btoa(String.fromCharCode.apply(null,new Uint8Array(e)));a({csr:u(r),containerId:c})}))}))}catch(e){var c=n();throw new Error(c||e.message)}}))},this.writeCertificate=function(t,r){return new Promise((function(i){try{for(var o=[],a=atob(t),c=0;c=u.Data.Validity["Not Before"]&&p<=u.Data.Validity["Not After"],toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}})}catch(e){var d=n();throw new Error(d||e.message)}}))},this.listCertificates=function(){return new Promise((function(i){try{e.getCertificateListAsync(t,(function(o){if(o&&"Error"==o[0]){var a=n(o[1]);throw new Error(a)}for(var c=[],u=0;u1?new Error("Подключено "+r.length+" токена(ов)"):new Error("Нет подключенных токенов");t(r.shift().id)}))})).then((function(r){return t=r,new Promise((function(r,i){e.getTokenInfo({args:{tokenID:t},onSuccess:r,onError:n(i)})}))})).then((function(e){return Object.assign(r,e)}))},this.bind=function(r){return new Promise((function(t,r){e.getLoggedInState({onSuccess:t,onError:n(r)})})).then((function(i){return i.state===JCWebClient2.Vars.AuthState.binded&&i.tokenID===t||new Promise((function(i,o){var a={tokenID:t};r?a.pin=r:a.useUI=!0,e.bindToken({args:a,onSuccess:i,onError:n(o)})}))}))},this.unbind=function(){return new Promise((function(t,r){e.getLoggedInState({onSuccess:t,onError:n(r)})})).then((function(t){return t.state===JCWebClient2.Vars.AuthState.notBinded||new Promise((function(t,r){e.unbindToken({onSuccess:t,onError:n(r)})}))}))},this.clean=function(){return new Promise((function(r,i){e.getContainerList({args:{tokenID:t},onSuccess:r,onError:n(i)})})).then((function(t){var r=Promise.resolve();for(var i in t)r=r.then((function(){return new Promise((function(r,o){e.deletePKIObject({args:{id:t[i].id},onSuccess:r,onError:n(o)})}))}));return r}))},this.generateCSR=function(t,r,i,o){i&&i.length||(i=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),o||(o=JCWebClient2.Vars.KeyAlgorithm.GOST_2012_256);var a,c={certificatePolicies:"1.2.643.100.113.1",keyUsage:"digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment",extendedKeyUsage:i.toString(),"1.2.643.100.111":'ASN1:FORMAT:UTF8,UTF8:"Криптотокен" (АЛАДДИН Р.Д.)'};return new Promise((function(t,i){e.createKeyPair({args:{paramSet:"XA",description:r,algorithm:o},onSuccess:t,onError:n(i)})})).then((function(r){return a=r,new Promise((function(r,i){e.genCSR({args:{id:a,dn:t,exts:c},onSuccess:r,onError:n(i)})}))})).then((function(e){return{csr:s(btoa(String.fromCharCode.apply(null,new Uint8Array(e)))),keyPairId:a}}))},this.writeCertificate=function(t,r){return new Promise((function(i,o){e.writeUserCertificate({args:{keyPairID:r,cert:t},onSuccess:i,onError:n(o)})}))},this.certificateInfo=function(i){return new Promise((function(r,o){e.parseX509Certificate({args:{tokenID:t,id:i},onSuccess:r,onError:n(o)})})).then((function(e){var t=r(e.Data.Subject),n=r(e.Data.Issuer),i=new Date;return{Name:t.CN,Issuer:n,IssuerName:u(n.toString()),Subject:t,SubjectName:u(t.toString()),Version:e.Data.Version,SerialNumber:e.Data["Serial Number"].map(a).join(""),Thumbprint:e.Signature.map(a).join(""),ValidFromDate:e.Data.Validity["Not Before"],ValidToDate:e.Data.Validity["Not After"],HasPrivateKey:!0,IsValid:i>=e.Data.Validity["Not Before"]&&i<=e.Data.Validity["Not After"],Algorithm:e.Data["Subject Public Key Info"]["Public Key Algorithm"],toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nАлгоритм: "+this.Algorithm+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}}}))},this.listCertificates=function(){return new Promise((function(r,i){e.getContainerList({args:{tokenID:t},onSuccess:r,onError:n(i)})})).then((function(r){for(var i=[],a=Promise.resolve(),c=0;c=0}function a(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e)return t.Certificates.then((function(e){return n=e,e.Count})).then((function(e){for(var t=[],r=1;r<=e;r++)t.push(n.Item(r));return Promise.all(t)})).then((function(e){var t=[];for(var n in e)t.push(e[n].SubjectName,e[n].Thumbprint);return Promise.all(t)})).then((function(e){for(var t=[],n=0;n>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}this.init=function(){return window.cadesplugin_skip_extension_install=!0,window.allow_firefox_cadesplugin_async=!0,n(114),e=!!cadesplugin.CreateObjectAsync,new Promise((function(e){if(!window.cadesplugin)throw new Error("КриптоПро ЭЦП Browser plug-in не обнаружен");e()})).then((function(){return e?cadesplugin.then((function(){return cadesplugin.CreateObjectAsync("CAdESCOM.About")})).then((function(e){return e.Version})).then((function(e){return t=e,{version:e}})).catch((function(e){var t=_(e);throw new Error(t)})):new Promise((function(e){try{var n=cadesplugin.CreateObject("CAdESCOM.About");if(!n||!n.Version)throw new Error("КриптоПро ЭЦП Browser plug-in не загружен");e({version:t=n.Version})}catch(e){var r=_(e);throw new Error(r)}}))}))},this.bind=function(e){return r=!0,Promise.resolve(r)},this.unbind=function(){return r=!1,Promise.resolve(r)},this.generateCSR=function(t,n,r,i){var o,a,c,u,s,l,A,v,T,N,m,y,D;return r&&r.length||(r=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),i||(i=S),e?cadesplugin.then((function(){return Promise.all([cadesplugin.CreateObjectAsync("X509Enrollment.CX509Enrollment"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509CertificateRequestPkcs10"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509PrivateKey"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509ExtensionKeyUsage"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509ExtensionEnhancedKeyUsage"),cadesplugin.CreateObjectAsync("X509Enrollment.CObjectIds"),cadesplugin.CreateObjectAsync("X509Enrollment.CX500DistinguishedName"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509Extensions"),cadesplugin.CreateObjectAsync("X509Enrollment.CCspInformations"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509Extension")])})).then((function(e){return o=e[0],a=e[1],c=e[2],s=e[3],l=e[4],A=e[5],N=e[6],u=e[7],m=e[8],D=e[9],m.AddAvailableCsps()})).then((function(){return m.Count})).then((function(e){if(!e)throw new Error("No CSP informations!");for(var t=[],n=0;n1)throw new Error("Подключено "+r+" устройств")}return Promise.all([e.getDeviceInfo(t,e.TOKEN_INFO_READER),e.getDeviceInfo(t,e.TOKEN_INFO_LABEL),e.getDeviceInfo(t,e.TOKEN_INFO_SERIAL),e.getDeviceModel(t),e.getDeviceType(t)])})).then((function(t){return{version:e.version,serial:t[2],reader:t[0],label:t[1].indexOf("Rutoken ECP ")+1?"":t[1],type:t[4],model:t[3]}})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.bind=function(r){return new Promise((function(i,o){e.getDeviceInfo(t,e.TOKEN_INFO_IS_LOGGED_IN).then((function(e){if(e)return i("Пользователь уже авторизован"),!1;if(!r&&!(r=prompt("PIN-код доступа к устройству")))throw new Error("Авторизация на устройстве отменена пользователем");return!0})).then((function(n){if(n)return e.login(t,r).then((function(e){i(!0)}));i(!0)})).then(null,(function(e){var t=n(e);o(t)}))}))},this.unbind=function(){return new Promise((function(r,i){e.getDeviceInfo(t,e.TOKEN_INFO_IS_LOGGED_IN).then((function(e){return!!e||(r("Пользователь не авторизован"),!1)})).then((function(n){return!n||e.logout(t).then((function(e){r(!0)}))})).then(null,(function(e){var t=n(e);i(t)}))}))},this.clean=function(){var r=0;return e.enumerateCertificates(t,e.CERT_CATEGORY_USER).then((function(n){var i=[];for(var o in n){var a=n[o];i.push(e.deleteCertificate(t,a))}return r+=i.length,Promise.all(i)})).then((function(){return e.enumerateKeys(t,"")})).then((function(n){var i=[];for(var o in n){var a=n[o];i.push(e.deleteKeyPair(t,a))}return r+=i.length,Promise.all(i)})).then((function(){return r})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.generateCSR=function(r,i,o,c){var u="";i||(i=""),o&&o.length||(o=["clientAuth","emailProtection"]);var s=c&&e[c]||e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256,_="XA",l=e.HASH_TYPE_GOST3411_94;s===e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_512?(_="A",l=e.HASH_TYPE_GOST3411_12_512):s===e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256&&(l=e.HASH_TYPE_GOST3411_12_256);var f={publicKeyAlgorithm:s,paramset:_};return e.generateKeyPair(t,void 0,i,f).then((function(n){u=n;var i=[];for(var a in r)r.hasOwnProperty(a)&&i.push({rdn:a,value:r[a]});var c={keyUsage:["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment"],extKeyUsage:o},s={subjectSignTool:'СКЗИ "РУТОКЕН ЭЦП"',hashAlgorithm:l};return e.createPkcs10(t,u,i,c,s)})).then((function(e){return{csr:a(e),keyPairId:u}})).then(null,(function(r){u&&e.deleteKeyPair(t,u);var i=n(r);throw new Error(i)}))},this.writeCertificate=function(r){var i=e.CERT_CATEGORY_USER;return e.importCertificate(t,r,i).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.certificateInfo=function(i){var o=!1,a="";return new Promise((function(r){e.getKeyByCertificate(t,i).then((function(e){r(!!e)})).then(null,(function(e){var t=n(e);console.log("getKeyByCertificate",i,t),r(!1)}))})).then((function(n){return o=n,e.getCertificateInfo(t,i,e.CERT_INFO_SERIAL_NUMBER)})).then((function(n){return a=n,e.parseCertificate(t,i)})).then((function(e){var t=e.text.match(/Version: (\d+)/),n=t.length>1?t[1]:void 0,c=e.text.match(/Public Key Algorithm: (.+)$/m),s=c.length>1?c[1]:"",_=r(e.subject),l=r(e.issuer),f=new Date;return{Name:_.commonName||_.CN,Issuer:l,IssuerName:u(l.toString()),Subject:_,SubjectName:u(_.toString()),Version:n,Algorithm:s,SerialNumber:a,Thumbprint:i.replace(/\:/g,""),ValidFromDate:new Date(e.validNotBefore),ValidToDate:new Date(e.validNotAfter),HasPrivateKey:o,IsValid:f>=new Date(e.validNotBefore)&&f<=new Date(e.validNotAfter),toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nАлгоритм: "+this.Algorithm+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет (или не выполнен вход)")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}}})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.listCertificates=function(){var r=[],i=[];return e.enumerateCertificates(t,e.CERT_CATEGORY_USER).then((function(n){r=n;var i=[];for(var o in r)i.push(e.parseCertificate(t,r[o]));return Promise.all(i)})).then((function(e){for(var t in r)i.push({id:r[t],name:o(e[t])});return i})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.readCertificate=function(r){return e.getCertificate(t,r).then((function(e){return a(e)})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.signData=function(r,i){return e.sign(t,i,r,e.DATA_FORMAT_BASE64,{detached:!0}).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.addSign=function(r,i,o){var a=i;return e.sign(t,o,r,e.DATA_FORMAT_BASE64,{detached:!0,CMS:a}).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.verifySign=function(r,i){var o=r;return e.verify(t,i,{data:o,base64:!0,verifyCertificate:!1}).then((function(e){if(!e)throw new Error("подпись не верна");return!0})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.encryptData=function(r,i){return e.getCertificate(t,i).then((function(n){return e.cmsEncrypt(t,"",[n],r,{base64:!0})})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.decryptData=function(r,i){return e.getKeyByCertificate(t,i).then((function(n){return e.cmsDecrypt(t,n,r,{base64:!0})})).then(null,(function(e){var t=n(e);throw new Error(t)}))}};n.d(t,"DN",(function(){return i})),n.d(t,"JaCarta",(function(){return s})),n.d(t,"JaCarta2",(function(){return l})),n.d(t,"CryptoPro",(function(){return N})),n.d(t,"RuToken",(function(){return P}))}])})); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RusCryptoJS",[],t):"object"==typeof exports?exports.RusCryptoJS=t():e.RusCryptoJS=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t,n){var r=n(40)("wks"),i=n(17),o=n(1).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(2),i=n(61),o=n(34),a=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(14),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(3),i=n(19);e.exports=n(4)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(31);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(1),i=n(15),o=n(8),a=n(11),c=n(13),u=function(e,t,n){var s,_,l,f,E=e&u.F,p=e&u.G,d=e&u.S,C=e&u.P,h=e&u.B,g=p?r:d?r[t]||(r[t]={}):(r[t]||{}).prototype,O=p?i:i[t]||(i[t]={}),A=O.prototype||(O.prototype={});for(s in p&&(n=t),n)l=((_=!E&&g&&void 0!==g[s])?g:n)[s],f=h&&_?c(l,r):C&&"function"==typeof l?c(Function.call,l):l,g&&a(g,s,l,e&u.U),O[s]!=l&&o(O,s,f),C&&A[s]!=l&&(A[s]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(1),i=n(8),o=n(12),a=n(17)("src"),c=Function.toString,u=(""+c).split("toString");n(15).inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,c){var s="function"==typeof n;s&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(s&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:c?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||c.call(this)}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(35);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){var n=e.exports={version:"2.6.3"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(45),i=n(31);e.exports=function(e){return r(i(e))}},function(e,t){e.exports={}},function(e,t,n){var r=n(63),i=n(47);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(2),i=n(9),o=n(6),a=n(14),c=n(38),u=n(39),s=Math.max,_=Math.min,l=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,E=/\$([$&`']|\d\d?)/g;n(41)("replace",2,(function(e,t,n,p){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=p(n,e,this,t);if(i.done)return i.value;var l=r(e),f=String(this),E="function"==typeof t;E||(t=String(t));var C=l.global;if(C){var h=l.unicode;l.lastIndex=0}for(var g=[];;){var O=u(l,f);if(null===O)break;if(g.push(O),!C)break;""===String(O[0])&&(l.lastIndex=c(f,o(l.lastIndex),h))}for(var A,I="",S=0,v=0;v=S&&(I+=f.slice(S,N)+D,S=N+T.length)}return I+f.slice(S)}];function d(e,t,r,o,a,c){var u=r+e.length,s=o.length,_=E;return void 0!==a&&(a=i(a),_=f),n.call(c,_,(function(n,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var _=+i;if(0===_)return n;if(_>s){var f=l(_/10);return 0===f?n:f<=s?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):n}c=o[_-1]}return void 0===c?"":c}))}}))},function(e,t,n){"use strict";var r=n(2),i=n(6),o=n(38),a=n(39);n(41)("match",1,(function(e,t,n,c){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=c(n,e,this);if(t.done)return t.value;var u=r(e),s=String(this);if(!u.global)return a(u,s);var _=u.unicode;u.lastIndex=0;for(var l,f=[],E=0;null!==(l=a(u,s));){var p=String(l[0]);f[E]=p,""===p&&(u.lastIndex=o(s,i(u.lastIndex),_)),E++}return 0===E?null:f}]}))},function(e,t,n){var r=n(63),i=n(47).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(3).f,i=n(12),o=n(0)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(73),i=n(94),o=n(21),a=n(20);e.exports=n(74)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";n(97);var r=n(2),i=n(33),o=n(4),a=/./.toString,c=function(e){n(11)(RegExp.prototype,"toString",e,!0)};n(7)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?c((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=a.name&&c((function(){return a.call(this)}))},function(e,t,n){"use strict";var r,i,o,a,c=n(16),u=n(1),s=n(13),_=n(32),l=n(10),f=n(5),E=n(35),p=n(51),d=n(98),C=n(55),h=n(76).set,g=n(100)(),O=n(77),A=n(101),I=n(102),S=n(103),v=u.TypeError,T=u.process,N=T&&T.versions,R=N&&N.v8||"",m=u.Promise,y="process"==_(T),P=function(){},D=i=O.f,b=!!function(){try{var e=m.resolve(1),t=(e.constructor={})[n(0)("species")]=function(e){e(P,P)};return(y||"function"==typeof PromiseRejectionEvent)&&e.then(P)instanceof t&&0!==R.indexOf("6.6")&&-1===I.indexOf("Chrome/66")}catch(e){}}(),w=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;g((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,c=i?t.ok:t.fail,u=t.resolve,s=t.reject,_=t.domain;try{c?(i||(2==e._h&&U(e),e._h=1),!0===c?n=r:(_&&_.enter(),n=c(r),_&&(_.exit(),a=!0)),n===t.promise?s(v("Promise-chain cycle")):(o=w(n))?o.call(n,u,s):u(n)):s(r)}catch(e){_&&!a&&_.exit(),s(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&M(e)}))}},M=function(e){h.call(u,(function(){var t,n,r,i=e._v,o=x(e);if(o&&(t=A((function(){y?T.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=y||x(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},x=function(e){return 1!==e._h&&0===(e._a||e._c).length},U=function(e){h.call(u,(function(){var t;y?T.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},K=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw v("Promise can't be resolved itself");(t=w(e))?g((function(){var r={_w:n,_d:!1};try{t.call(e,s(j,r,1),s(K,r,1))}catch(e){K.call(r,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){K.call({_w:n,_d:!1},e)}}};b||(m=function(e){p(this,m,"Promise","_h"),E(e),r.call(this);try{e(s(j,this,1),s(K,this,1))}catch(e){K.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(50)(m.prototype,{then:function(e,t){var n=D(C(this,m));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=y?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=s(j,e,1),this.reject=s(K,e,1)},O.f=D=function(e){return e===m||e===a?new o(e):i(e)}),l(l.G+l.W+l.F*!b,{Promise:m}),n(26)(m,"Promise"),n(48)("Promise"),a=n(15).Promise,l(l.S+l.F*!b,"Promise",{reject:function(e){var t=D(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(c||!b),"Promise",{resolve:function(e){return S(c&&this===a?m:this,e)}}),l(l.S+l.F*!(b&&n(56)((function(e){m.all(e).catch(P)}))),"Promise",{all:function(e){var t=this,n=D(t),r=n.resolve,i=n.reject,o=A((function(){var n=[],o=0,a=1;d(e,!1,(function(e){var c=o++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[c]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=D(t),r=n.reject,i=A((function(){d(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){var r=function(e){function t(e){return!!(e&&e.call&&e.apply)}function n(e,n){return t(e[n])?function(){return e[n].apply(e,arguments)}:e[n]}function r(e){return function(){return e}}function i(){e.ready=Promise.resolve(!0),e.isExtensionInstalled=r(Promise.resolve(!1)),e.isPluginInstalled=r(Promise.resolve(!0)),e.loadPlugin=o,window.rutokenLoaded=c}function o(){var e=document.createElement("object");return e.style.setProperty("visibility","hidden","important"),e.style.setProperty("width","0px","important"),e.style.setProperty("height","0px","important"),e.style.setProperty("margin","0px","important"),e.style.setProperty("padding","0px","important"),e.style.setProperty("border-style","none","important"),e.style.setProperty("border-width","0px","important"),e.style.setProperty("max-width","0px","important"),e.style.setProperty("max-height","0px","important"),e.innerHTML="",e.setAttribute("type",f),document.body.appendChild(e),new Promise((function(e,t){l.push(e)}))}function a(){return E.loadPlugin().then((function(e){return function e(r){var i={},o=[];for(var a in r)!function(a){t(r[a].then)?o.push(r[a].then((function(o){return e(o).then((function(e){t(e)?i[a]=n(r,a):i[a]=e}))}))):i[a]=r[a]}(a);return 0==o.length?new Promise((function(e){e(r)})):Promise.all(o).then((function(){return i}))}(e)})).then((function(e){return e.wrapWithOldInterface=u,e}))}function c(e,t){_(e).then((function(e){if(0==l.length)throw"Internal error";l.shift()(e)}))}function u(){var e={};for(var n in this)t(this[n])?e[n]=function(e,t){return function(){var n=arguments[arguments.length-2],r=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0,-2);return t.apply(e,i).then((function(e){n(e)}),(function(e){r(e.message)}))}}(this,this[n]):e[n]=this[n];return new Promise((function(t){t(e)}))}function s(){var e={originalObject:this.originalObject};for(var t in this.originalObject)e[t]=n(this.originalObject,t);return new Promise((function(t){t(e)}))}function _(e){var n={originalObject:e,wrapWithOldInterface:s};for(var r in e)t(e[r])?n[r]=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return new Promise((function(r,i){n.push(r,i),t.apply(e,n)}))}}(e,e[r]):n[r]=e[r];return new Promise((function(e){e(n)}))}var l=[],f="application/x-rutoken-pki",E=window["C3B7563B-BF85-45B7-88FC-7CFF1BD3C2DB"];if(E)!function(){var t=E.initialize().then((function(){return E.isPluginInstalled()})).then((function(t){return e.isExtensionInstalled=r(Promise.resolve(!0)),e.isPluginInstalled=n(E,"isPluginInstalled"),t&&(f="application/x-rutoken-plugin",e.loadPlugin=a),!0}));e.ready=t}();else if(navigator.mimeTypes&&navigator.mimeTypes[f])i();else try{new ActiveXObject("Aktiv.CryptoPlugin"),i()}catch(t){e.ready=Promise.resolve(!0),e.isExtensionInstalled=r(Promise.resolve(!1)),e.isPluginInstalled=r(Promise.resolve(!1))}return e}(r||{});e.exports=r},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(18),i=n(0)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var r=n(2);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(14),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){"use strict";var r=n(60)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(32),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(15),i=n(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(16)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";n(86);var r=n(11),i=n(8),o=n(7),a=n(31),c=n(0),u=n(42),s=c("species"),_=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=c(e),E=!o((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=E?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[s]=function(){return n}),n[f](""),!t})):void 0;if(!E||!p||"replace"===e&&!_||"split"===e&&!l){var d=/./[f],C=n(a,f,""[e],(function(e,t,n,r,i){return t.exec===u?E&&!i?{done:!0,value:d.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),h=C[0],g=C[1];r(String.prototype,e,h),i(RegExp.prototype,f,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},function(e,t,n){"use strict";var r,i,o=n(33),a=RegExp.prototype.exec,c=String.prototype.replace,u=a,s=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),_=void 0!==/()??/.exec("")[1];(s||_)&&(u=function(e){var t,n,r,i,u=this;return _&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),s&&(t=u.lastIndex),r=a.call(u,e),s&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),_&&r&&r.length>1&&c.call(r[0],n,(function(){for(i=1;idocument.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(32),i=n(0)("iterator"),o=n(21);e.exports=n(15).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(2),i=n(35),o=n(0)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r=n(0)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){for(var r=n(27),i=n(22),o=n(11),a=n(1),c=n(8),u=n(21),s=n(0),_=s("iterator"),l=s("toStringTag"),f=u.Array,E={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(E),d=0;d=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(14),i=n(31);e.exports=function(e){return function(t,n){var o,a,c=String(i(t)),u=r(n),s=c.length;return u<0||u>=s?e?"":void 0:(o=c.charCodeAt(u))<55296||o>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?e?c.charAt(u):o:e?c.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){e.exports=!n(4)&&!n(7)((function(){return 7!=Object.defineProperty(n(43)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(1),i=n(87),o=n(3).f,a=n(25).f,c=n(65),u=n(33),s=r.RegExp,_=s,l=s.prototype,f=/a/g,E=/a/g,p=new s(f)!==f;if(n(4)&&(!p||n(7)((function(){return E[n(0)("match")]=!1,s(f)!=f||s(E)==E||"/a/i"!=s(f,"i")})))){s=function(e,t){var n=this instanceof s,r=c(e),o=void 0===t;return!n&&r&&e.constructor===s&&o?e:i(p?new _(r&&!o?e.source:e,t):_((r=e instanceof s)?e.source:e,r&&o?u.call(e):t),n?this:l,s)};for(var d=function(e){e in s||o(s,e,{configurable:!0,get:function(){return _[e]},set:function(t){_[e]=t}})},C=a(_),h=0;C.length>h;)d(C[h++]);l.constructor=s,s.prototype=l,n(11)(r,"RegExp",s)}n(48)("RegExp")},function(e,t,n){var r=n(12),i=n(20),o=n(64)(!1),a=n(46)("IE_PROTO");e.exports=function(e,t){var n,c=i(e),u=0,s=[];for(n in c)n!=a&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~o(s,n)||s.push(n));return s}},function(e,t,n){var r=n(20),i=n(6),o=n(37);e.exports=function(e){return function(t,n,a){var c,u=r(t),s=i(u.length),_=o(a,s);if(e&&n!=n){for(;s>_;)if((c=u[_++])!=c)return!0}else for(;s>_;_++)if((e||_ in u)&&u[_]===n)return e||_||0;return!e&&-1}}},function(e,t,n){var r=n(5),i=n(18),o=n(0)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){for(var r,i=n(1),o=n(8),a=n(17),c=a("typed_array"),u=a("view"),s=!(!i.ArrayBuffer||!i.DataView),_=s,l=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[f[l++]])?(o(r.prototype,c,!0),o(r.prototype,u,!0)):_=!1;e.exports={ABV:s,CONSTR:_,TYPED:c,VIEW:u}},function(e,t,n){var r=n(14),i=n(6);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){"use strict";var r=n(9),i=n(37),o=n(6);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,c=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,s=void 0===u?n:i(u,n);s>c;)t[c++]=e;return t}},function(e,t,n){var r=n(1).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(12),i=n(9),o=n(46)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(13),i=n(45),o=n(9),a=n(6),c=n(92);e.exports=function(e,t){var n=1==e,u=2==e,s=3==e,_=4==e,l=6==e,f=5==e||l,E=t||c;return function(t,c,p){for(var d,C,h=o(t),g=i(h),O=r(c,p,3),A=a(g.length),I=0,S=n?E(t,A):u?E(t,0):void 0;A>I;I++)if((f||I in g)&&(C=O(d=g[I],I,h),e))if(n)S[I]=C;else if(C)switch(e){case 3:return!0;case 5:return d;case 6:return I;case 2:S.push(d)}else if(_)return!1;return l?-1:s||_?_:S}}},function(e,t,n){var r=n(18);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(0)("unscopables"),i=Array.prototype;null==i[r]&&n(8)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";var r=n(16),i=n(10),o=n(11),a=n(8),c=n(21),u=n(95),s=n(26),_=n(70),l=n(0)("iterator"),f=!([].keys&&"next"in[].keys()),E=function(){return this};e.exports=function(e,t,n,p,d,C,h){u(n,t,p);var g,O,A,I=function(e){if(!f&&e in N)return N[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",v="values"==d,T=!1,N=e.prototype,R=N[l]||N["@@iterator"]||d&&N[d],m=R||I(d),y=d?v?I("entries"):m:void 0,P="Array"==t&&N.entries||R;if(P&&(A=_(P.call(new e)))!==Object.prototype&&A.next&&(s(A,S,!0),r||"function"==typeof A[l]||a(A,l,E)),v&&R&&"values"!==R.name&&(T=!0,m=function(){return R.call(this)}),r&&!h||!f&&!T&&N[l]||a(N,l,m),c[t]=m,c[S]=E,d)if(g={values:v?m:I("values"),keys:C?m:I("keys"),entries:y},h)for(O in g)O in N||o(N,O,g[O]);else i(i.P+i.F*(f||T),t,g);return g}},function(e,t,n){var r=n(2);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r,i,o,a=n(13),c=n(99),u=n(69),s=n(43),_=n(1),l=_.process,f=_.setImmediate,E=_.clearImmediate,p=_.MessageChannel,d=_.Dispatch,C=0,h={},g=function(){var e=+this;if(h.hasOwnProperty(e)){var t=h[e];delete h[e],t()}},O=function(e){g.call(e.data)};f&&E||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return h[++C]=function(){c("function"==typeof e?e:Function(e),t)},r(C),C},E=function(e){delete h[e]},"process"==n(18)(l)?r=function(e){l.nextTick(a(g,e,1))}:d&&d.now?r=function(e){d.now(a(g,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=O,r=a(o.postMessage,o,1)):_.addEventListener&&"function"==typeof postMessage&&!_.importScripts?(r=function(e){_.postMessage(e+"","*")},_.addEventListener("message",O,!1)):r="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:f,clear:E}},function(e,t,n){"use strict";var r=n(35);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(3).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(4)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(13),i=n(10),o=n(9),a=n(75),c=n(52),u=n(6),s=n(108),_=n(54);i(i.S+i.F*!n(56)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,l,f=o(e),E="function"==typeof this?this:Array,p=arguments.length,d=p>1?arguments[1]:void 0,C=void 0!==d,h=0,g=_(f);if(C&&(d=r(d,p>2?arguments[2]:void 0,2)),null==g||E==Array&&c(g))for(n=new E(t=u(f.length));t>h;h++)s(n,h,C?d(f[h],h):f[h]);else for(l=g.call(f),n=new E;!(i=l.next()).done;h++)s(n,h,C?a(l,d,[i.value,h],!0):i.value);return n.length=h,n}})},function(e,t,n){n(81)("asyncIterator")},function(e,t,n){var r=n(1),i=n(15),o=n(16),a=n(82),c=n(3).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||c(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(0)},function(e,t,n){"use strict";var r=n(1),i=n(12),o=n(4),a=n(10),c=n(11),u=n(111).KEY,s=n(7),_=n(40),l=n(26),f=n(17),E=n(0),p=n(82),d=n(81),C=n(112),h=n(72),g=n(2),O=n(5),A=n(20),I=n(34),S=n(19),v=n(53),T=n(113),N=n(44),R=n(3),m=n(22),y=N.f,P=R.f,D=T.f,b=r.Symbol,w=r.JSON,L=w&&w.stringify,M=E("_hidden"),x=E("toPrimitive"),U={}.propertyIsEnumerable,K=_("symbol-registry"),j=_("symbols"),B=_("op-symbols"),F=Object.prototype,G="function"==typeof b,V=r.QObject,H=!V||!V.prototype||!V.prototype.findChild,Y=o&&s((function(){return 7!=v(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=y(F,t);r&&delete F[t],P(e,t,n),r&&e!==F&&P(F,t,r)}:P,X=function(e){var t=j[e]=v(b.prototype);return t._k=e,t},k=G&&"symbol"==typeof b.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof b},W=function(e,t,n){return e===F&&W(B,t,n),g(e),t=I(t,!0),g(n),i(j,t)?(n.enumerable?(i(e,M)&&e[M][t]&&(e[M][t]=!1),n=v(n,{enumerable:S(0,!1)})):(i(e,M)||P(e,M,S(1,{})),e[M][t]=!0),Y(e,t,n)):P(e,t,n)},J=function(e,t){g(e);for(var n,r=C(t=A(t)),i=0,o=r.length;o>i;)W(e,n=r[i++],t[n]);return e},q=function(e){var t=U.call(this,e=I(e,!0));return!(this===F&&i(j,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(j,e)||i(this,M)&&this[M][e])||t)},z=function(e,t){if(e=A(e),t=I(t,!0),e!==F||!i(j,t)||i(B,t)){var n=y(e,t);return!n||!i(j,t)||i(e,M)&&e[M][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=D(A(e)),r=[],o=0;n.length>o;)i(j,t=n[o++])||t==M||t==u||r.push(t);return r},$=function(e){for(var t,n=e===F,r=D(n?B:A(e)),o=[],a=0;r.length>a;)!i(j,t=r[a++])||n&&!i(F,t)||o.push(j[t]);return o};G||(c((b=function(){if(this instanceof b)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(B,n),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),Y(this,e,S(1,n))};return o&&H&&Y(F,e,{configurable:!0,set:t}),X(e)}).prototype,"toString",(function(){return this._k})),N.f=z,R.f=W,n(25).f=T.f=Z,n(36).f=q,n(59).f=$,o&&!n(16)&&c(F,"propertyIsEnumerable",q,!0),p.f=function(e){return X(E(e))}),a(a.G+a.W+a.F*!G,{Symbol:b});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)E(Q[ee++]);for(var te=m(E.store),ne=0;te.length>ne;)d(te[ne++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(K,e+="")?K[e]:K[e]=b(e)},keyFor:function(e){if(!k(e))throw TypeError(e+" is not a symbol!");for(var t in K)if(K[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!G,"Object",{create:function(e,t){return void 0===t?v(e):J(v(e),t)},defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:z,getOwnPropertyNames:Z,getOwnPropertySymbols:$}),w&&a(a.S+a.F*(!G||s((function(){var e=b();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(O(t)||void 0!==e)&&!k(e))return h(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!k(t))return t}),r[1]=t,L.apply(w,r)}}),b.prototype[x]||n(8)(b.prototype,x,b.prototype.valueOf),l(b,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(115)},function(e,t){!function(e){"use strict";e.console||(e.console={});for(var t,n,r=e.console,i=function(){},o=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=o.pop();)r[t]||(r[t]={});for(;n=a.pop();)r[n]||(r[n]=i)}("undefined"==typeof window?this:window)},function(e,t,n){"use strict";var r=n(42);n(10)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){var r=n(5),i=n(88).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){var r=n(5),i=n(2),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(13)(Function.call,n(44).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";if(n(4)){var r=n(16),i=n(1),o=n(7),a=n(10),c=n(66),u=n(90),s=n(13),_=n(51),l=n(19),f=n(8),E=n(50),p=n(14),d=n(6),C=n(67),h=n(37),g=n(34),O=n(12),A=n(32),I=n(5),S=n(9),v=n(52),T=n(53),N=n(70),R=n(25).f,m=n(54),y=n(17),P=n(0),D=n(71),b=n(64),w=n(55),L=n(27),M=n(21),x=n(56),U=n(48),K=n(68),j=n(96),B=n(3),F=n(44),G=B.f,V=F.f,H=i.RangeError,Y=i.TypeError,X=i.Uint8Array,k=Array.prototype,W=u.ArrayBuffer,J=u.DataView,q=D(0),z=D(2),Z=D(3),$=D(4),Q=D(5),ee=D(6),te=b(!0),ne=b(!1),re=L.values,ie=L.keys,oe=L.entries,ae=k.lastIndexOf,ce=k.reduce,ue=k.reduceRight,se=k.join,_e=k.sort,le=k.slice,fe=k.toString,Ee=k.toLocaleString,pe=P("iterator"),de=P("toStringTag"),Ce=y("typed_constructor"),he=y("def_constructor"),ge=c.CONSTR,Oe=c.TYPED,Ae=c.VIEW,Ie=D(1,(function(e,t){return Re(w(e,e[he]),t)})),Se=o((function(){return 1===new X(new Uint16Array([1]).buffer)[0]})),ve=!!X&&!!X.prototype.set&&o((function(){new X(1).set({})})),Te=function(e,t){var n=p(e);if(n<0||n%t)throw H("Wrong offset!");return n},Ne=function(e){if(I(e)&&Oe in e)return e;throw Y(e+" is not a typed array!")},Re=function(e,t){if(!(I(e)&&Ce in e))throw Y("It is not a typed array constructor!");return new e(t)},me=function(e,t){return ye(w(e,e[he]),t)},ye=function(e,t){for(var n=0,r=t.length,i=Re(e,r);r>n;)i[n]=t[n++];return i},Pe=function(e,t,n){G(e,t,{get:function(){return this._d[n]}})},De=function(e){var t,n,r,i,o,a,c=S(e),u=arguments.length,_=u>1?arguments[1]:void 0,l=void 0!==_,f=m(c);if(null!=f&&!v(f)){for(a=f.call(c),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);c=r}for(l&&u>2&&(_=s(_,arguments[2],2)),t=0,n=d(c.length),i=Re(this,n);n>t;t++)i[t]=l?_(c[t],t):c[t];return i},be=function(){for(var e=0,t=arguments.length,n=Re(this,t);t>e;)n[e]=arguments[e++];return n},we=!!X&&o((function(){Ee.call(new X(1))})),Le=function(){return Ee.apply(we?le.call(Ne(this)):Ne(this),arguments)},Me={copyWithin:function(e,t){return j.call(Ne(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Ne(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return K.apply(Ne(this),arguments)},filter:function(e){return me(this,z(Ne(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Ne(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Ne(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){q(Ne(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Ne(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Ne(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return se.apply(Ne(this),arguments)},lastIndexOf:function(e){return ae.apply(Ne(this),arguments)},map:function(e){return Ie(Ne(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ce.apply(Ne(this),arguments)},reduceRight:function(e){return ue.apply(Ne(this),arguments)},reverse:function(){for(var e,t=Ne(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return _e.call(Ne(this),e)},subarray:function(e,t){var n=Ne(this),r=n.length,i=h(e,r);return new(w(n,n[he]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,d((void 0===t?r:h(t,r))-i))}},xe=function(e,t){return me(this,le.call(Ne(this),e,t))},Ue=function(e){Ne(this);var t=Te(arguments[1],1),n=this.length,r=S(e),i=d(r.length),o=0;if(i+t>n)throw H("Wrong length!");for(;o255?255:255&r),i.v[E](n*t+i.o,r,Se)}(this,n,e)},enumerable:!0})};O?(p=n((function(e,n,r,i){_(e,p,s,"_d");var o,a,c,u,l=0,E=0;if(I(n)){if(!(n instanceof W||"ArrayBuffer"==(u=A(n))||"SharedArrayBuffer"==u))return Oe in n?ye(p,n):De.call(p,n);o=n,E=Te(r,t);var h=n.byteLength;if(void 0===i){if(h%t)throw H("Wrong length!");if((a=h-E)<0)throw H("Wrong length!")}else if((a=d(i)*t)+E>h)throw H("Wrong length!");c=a/t}else c=C(n),o=new W(a=c*t);for(f(e,"_d",{b:o,o:E,l:a,e:c,v:new J(o)});l>1,_=23===t?N(2,-24)-N(2,-77):0,l=0,f=e<0||0===e&&1/e<0?1:0;for((e=T(e))!=e||e===S?(i=e!=e?1:0,r=u):(r=R(m(e)/y),e*(o=N(2,-r))<1&&(r--,o*=2),(e+=r+s>=1?_/o:_*N(2,1-s))*o>=2&&(r++,o/=2),r+s>=u?(i=0,r=u):r+s>=1?(i=(e*o-1)*N(2,t),r+=s):(i=e*N(2,s-1)*N(2,t),r=0));t>=8;a[l++]=255&i,i/=256,t-=8);for(r=r<0;a[l++]=255&r,r/=256,c-=8);return a[--l]|=128*f,a}function L(e,t,n){var r,i=8*n-t-1,o=(1<>1,c=i-7,u=n-1,s=e[u--],_=127&s;for(s>>=7;c>0;_=256*_+e[u],u--,c-=8);for(r=_&(1<<-c)-1,_>>=-c,c+=t;c>0;r=256*r+e[u],u--,c-=8);if(0===_)_=1-a;else{if(_===o)return r?NaN:s?-S:S;r+=N(2,t),_-=a}return(s?-1:1)*r*N(2,_-t)}function M(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function x(e){return[255&e]}function U(e){return[255&e,e>>8&255]}function K(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function j(e){return w(e,52,8)}function B(e){return w(e,23,4)}function F(e,t,n){d(e.prototype,t,{get:function(){return this[n]}})}function G(e,t,n,r){var i=E(+n);if(i+t>e[D])throw I("Wrong index!");var o=e[P]._b,a=i+e[b],c=o.slice(a,a+t);return r?c:c.reverse()}function V(e,t,n,r,i,o){var a=E(+n);if(a+t>e[D])throw I("Wrong index!");for(var c=e[P]._b,u=a+e[b],s=r(+i),_=0;_k;)(H=X[k++])in g||c(g,H,v[H]);o||(Y.constructor=g)}var W=new O(new g(2)),J=O.prototype.setInt8;W.setInt8(0,2147483648),W.setInt8(1,2147483649),!W.getInt8(0)&&W.getInt8(1)||u(O.prototype,{setInt8:function(e,t){J.call(this,e,t<<24>>24)},setUint8:function(e,t){J.call(this,e,t<<24>>24)}},!0)}else g=function(e){_(this,g,"ArrayBuffer");var t=E(e);this._b=C.call(new Array(t),0),this[D]=t},O=function(e,t,n){_(this,O,"DataView"),_(e,g,"DataView");var r=e[D],i=l(t);if(i<0||i>r)throw I("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw I("Wrong length!");this[P]=e,this[b]=i,this[D]=n},i&&(F(g,"byteLength","_l"),F(O,"buffer","_b"),F(O,"byteLength","_l"),F(O,"byteOffset","_o")),u(O.prototype,{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return M(G(this,4,e,arguments[1]))},getUint32:function(e){return M(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){V(this,1,e,x,t)},setUint8:function(e,t){V(this,1,e,x,t)},setInt16:function(e,t){V(this,2,e,U,t,arguments[2])},setUint16:function(e,t){V(this,2,e,U,t,arguments[2])},setInt32:function(e,t){V(this,4,e,K,t,arguments[2])},setUint32:function(e,t){V(this,4,e,K,t,arguments[2])},setFloat32:function(e,t){V(this,4,e,B,t,arguments[2])},setFloat64:function(e,t){V(this,8,e,j,t,arguments[2])}});h(g,"ArrayBuffer"),h(O,"DataView"),c(O.prototype,a.VIEW,!0),t.ArrayBuffer=g,t.DataView=O},function(e,t,n){var r=n(3),i=n(2),o=n(22);e.exports=n(4)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),c=a.length,u=0;c>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(93);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(5),i=n(72),o=n(0)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(53),i=n(19),o=n(26),a={};n(8)(a,n(0)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(9),i=n(37),o=n(6);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),c=i(e,a),u=i(t,a),s=arguments.length>2?arguments[2]:void 0,_=Math.min((void 0===s?a:i(s,a))-u,a-c),l=1;for(u0;)u in n?n[c]=n[u]:delete n[c],c+=l,u+=l;return n}},function(e,t,n){n(4)&&"g"!=/./g.flags&&n(3).f(RegExp.prototype,"flags",{configurable:!0,get:n(33)})},function(e,t,n){var r=n(13),i=n(75),o=n(52),a=n(2),c=n(6),u=n(54),s={},_={};(t=e.exports=function(e,t,n,l,f){var E,p,d,C,h=f?function(){return e}:u(e),g=r(n,l,t?2:1),O=0;if("function"!=typeof h)throw TypeError(e+" is not iterable!");if(o(h)){for(E=c(e.length);E>O;O++)if((C=t?g(a(p=e[O])[0],p[1]):g(e[O]))===s||C===_)return C}else for(d=h.call(e);!(p=d.next()).done;)if((C=i(d,g,p.value,t))===s||C===_)return C}).BREAK=s,t.RETURN=_},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(1),i=n(76).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,c=r.Promise,u="process"==n(18)(a);e.exports=function(){var e,t,n,s=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(s)};else if(!o||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var _=c.resolve(void 0);n=function(){_.then(s)}}else n=function(){i.call(r,s)};else{var l=!0,f=document.createTextNode("");new o(s).observe(f,{characterData:!0}),n=function(){f.data=l=!l}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(1).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){var r=n(2),i=n(5),o=n(77);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(65),i=n(2),o=n(55),a=n(38),c=n(6),u=n(39),s=n(42),_=n(7),l=Math.min,f=[].push,E=!_((function(){RegExp(4294967295,"y")}));n(41)("split",2,(function(e,t,n,_){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,c,u=[],_=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,E=void 0===t?4294967295:t>>>0,p=new RegExp(e.source,_+"g");(o=s.call(p,i))&&!((a=p.lastIndex)>l&&(u.push(i.slice(l,o.index)),o.length>1&&o.index=E));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!c&&p.test("")||u.push(""):u.push(i.slice(l)),u.length>E?u.slice(0,E):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):p.call(String(i),n,r)},function(e,t){var r=_(p,e,this,t,p!==n);if(r.done)return r.value;var s=i(e),f=String(this),d=o(s,RegExp),C=s.unicode,h=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(E?"y":"g"),g=new d(E?s:"^(?:"+s.source+")",h),O=void 0===t?4294967295:t>>>0;if(0===O)return[];if(0===f.length)return null===u(g,f)?[f]:[];for(var A=0,I=0,S=[];I1?arguments[1]:void 0)}}),n(73)("find")},function(e,t,n){var r=n(9),i=n(22);n(107)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(10),i=n(15),o=n(7);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(e,t,n){"use strict";var r=n(3),i=n(19);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(10);r(r.S+r.F,"Object",{assign:n(110)})},function(e,t,n){"use strict";var r=n(22),i=n(59),o=n(36),a=n(9),c=n(45),u=Object.assign;e.exports=!u||n(7)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=a(e),u=arguments.length,s=1,_=i.f,l=o.f;u>s;)for(var f,E=c(arguments[s++]),p=_?r(E).concat(_(E)):r(E),d=p.length,C=0;d>C;)l.call(E,f=p[C++])&&(n[f]=E[f]);return n}:u},function(e,t,n){var r=n(17)("meta"),i=n(5),o=n(12),a=n(3).f,c=0,u=Object.isExtensible||function(){return!0},s=!n(7)((function(){return u(Object.preventExtensions({}))})),_=function(e){a(e,r,{value:{i:"O"+ ++c,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";_(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;_(e)}return e[r].w},onFreeze:function(e){return s&&l.NEED&&u(e)&&!o(e,r)&&_(e),e}}},function(e,t,n){var r=n(22),i=n(59),o=n(36);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,c=n(e),u=o.f,s=0;c.length>s;)u.call(e,a=c[s++])&&t.push(a);return t}},function(e,t,n){var r=n(20),i=n(25).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(80),core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(83),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(28),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(78),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(23),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(24),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(29),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6__);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){if(!window.cadesplugin){var pluginObject,plugin_resolved=0,plugin_reject,plugin_resolve,isOpera=0,isFireFox=0,isSafari=0,isYandex=0,canPromise=!!window.Promise,cadesplugin;cadesplugin=canPromise?new Promise((function(e,t){plugin_resolve=e,plugin_reject=t})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,t){var n=ru_cryptopro_npcades_10_native_bridge.callbacks[e];n&&n.apply(null,t)},call:function(e,t,n){var r=n&&"function"==typeof n,i=r?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;r&&(ru_cryptopro_npcades_10_native_bridge.callbacks[i]=n);var o=document.createElement("IFRAME"),a=new Array("_CPNP_handle");try{o.setAttribute("src","cpnp-js-call:"+e+":"+i+":"+encodeURIComponent(JSON.stringify(t,a)))}catch(e){alert(e)}document.documentElement.appendChild(o),o.parentNode.removeChild(o),o=null}};cadesplugin.JSModuleVersion="2.3.0",cadesplugin.async_spawn=async_spawn,cadesplugin.set=set_pluginObject,cadesplugin.set_log_level=set_log_level,cadesplugin.getLastError=getLastError,cadesplugin.is_capilite_enabled=is_capilite_enabled,isNativeMessageSupported()&&(cadesplugin.CreateObjectAsync=CreateObjectAsync,cadesplugin.ReleasePluginObjects=ReleasePluginObjects),isNativeMessageSupported()||(cadesplugin.CreateObject=CreateObject),window.cadesplugin_load_timeout?setTimeout(check_load_timeout,window.cadesplugin_load_timeout):setTimeout(check_load_timeout,2e4),set_constantValues(),cadesplugin.current_log_level=cadesplugin.LOG_LEVEL_ERROR,window.cadesplugin=cadesplugin,check_plugin_working()}function check_browser(){var e,t=navigator.userAgent,n=t.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===n[1]&&null!=(e=t.match(/\b(OPR|Edg|YaBrowser)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})}function cpcsp_console_log(e,t){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",t),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",t),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",t))):void 0}function set_log_level(e){e===cadesplugin.LOG_LEVEL_DEBUG||e===cadesplugin.LOG_LEVEL_INFO||e===cadesplugin.LOG_LEVEL_ERROR?(cadesplugin.current_log_level=e,cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = DEBUG"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = INFO"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = ERROR"),isNativeMessageSupported()&&(cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&window.postMessage("set_log_level=debug","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&window.postMessage("set_log_level=info","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&window.postMessage("set_log_level=error","*"))):cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,"cadesplugin_api.js: Incorrect log_level: "+e)}function set_constantValues(){cadesplugin.CAPICOM_MEMORY_STORE=0,cadesplugin.CAPICOM_LOCAL_MACHINE_STORE=1,cadesplugin.CAPICOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_MEMORY_STORE=0,cadesplugin.CADESCOM_LOCAL_MACHINE_STORE=1,cadesplugin.CADESCOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_CONTAINER_STORE=100,cadesplugin.CAPICOM_MY_STORE="My",cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED=0,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE=2,cadesplugin.CADESCOM_XADES_DEFAULT=16,cadesplugin.CADESCOM_XADES_BES=32,cadesplugin.CADESCOM_XADES_T=80,cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1=1488,cadesplugin.CADESCOM_XMLDSIG_TYPE=0,cadesplugin.XmlDsigGost3410UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr3411",cadesplugin.XmlDsigGost3410Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411",cadesplugin.XmlDsigGost3411Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256",cadesplugin.XmlDsigGost3410Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256",cadesplugin.XmlDsigGost3411Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512",cadesplugin.XmlDsigGost3410Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512",cadesplugin.CADESCOM_CADES_DEFAULT=0,cadesplugin.CADESCOM_CADES_BES=1,cadesplugin.CADESCOM_CADES_T=5,cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1=93,cadesplugin.CADESCOM_PKCS7_TYPE=65535,cadesplugin.CADESCOM_ENCODE_BASE64=0,cadesplugin.CADESCOM_ENCODE_BINARY=1,cadesplugin.CADESCOM_ENCODE_ANY=-1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT=0,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN=1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY=2,cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME=0,cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH=0,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME=3,cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME=4,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION=5,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY=6,cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY=7,cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY=8,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID=9,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID=10,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED=11,cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE=12,cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE=128,cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE=9,cadesplugin.CAPICOM_OID_OTHER=0,cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION=10,cadesplugin.CAPICOM_EKU_CLIENT_AUTH=2,cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON=5,cadesplugin.CAPICOM_EKU_OTHER=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_ATTRIBUTE_OTHER=-1,cadesplugin.CADESCOM_STRING_TO_UCS2LE=0,cadesplugin.CADESCOM_BASE64_TO_BINARY=1,cadesplugin.CADESCOM_DISPLAY_DATA_NONE=0,cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT=1,cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2=0,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4=1,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES=3,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES=4,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89=25,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1=0,cadesplugin.CADESCOM_HASH_ALGORITHM_MD2=1,cadesplugin.CADESCOM_HASH_ALGORITHM_MD4=2,cadesplugin.CADESCOM_HASH_ALGORITHM_MD5=3,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256=4,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384=5,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512=6,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411=100,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256=101,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512=102,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC=110,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC=111,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC=112,cadesplugin.LOG_LEVEL_DEBUG=4,cadesplugin.LOG_LEVEL_INFO=2,cadesplugin.LOG_LEVEL_ERROR=1,cadesplugin.CADESCOM_AllowNone=0,cadesplugin.CADESCOM_AllowNoOutstandingRequest=1,cadesplugin.CADESCOM_AllowUntrustedCertificate=2,cadesplugin.CADESCOM_AllowUntrustedRoot=4,cadesplugin.CADESCOM_SkipInstallToStore=268435456,cadesplugin.ENABLE_CARRIER_TYPE_CSP=1,cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM=2,cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM=4,cadesplugin.ENABLE_ANY_CARRIER_TYPE=7,cadesplugin.DISABLE_EVERY_CARRIER_OPERATION=0,cadesplugin.ENABLE_CARRIER_OPEN_ENUM=1,cadesplugin.ENABLE_CARRIER_CREATE=2,cadesplugin.ENABLE_ANY_OPERATION=3,cadesplugin.CADESCOM_PRODUCT_CSP=0,cadesplugin.CADESCOM_PRODUCT_OCSP=1,cadesplugin.CADESCOM_PRODUCT_TSP=2,cadesplugin.MEDIA_TYPE_REGISTRY=1,cadesplugin.MEDIA_TYPE_HDIMAGE=2,cadesplugin.MEDIA_TYPE_CLOUD=4,cadesplugin.MEDIA_TYPE_SCARD=8}function async_spawn(e){function t(e,t){var o;try{o=n[e](t)}catch(e){return Promise.reject(e)}return o.done?o.value:Promise.resolve(o.value).then(r,i)}var n=e(Array.prototype.slice.call(arguments,1)),r=t.bind(t,"next"),i=t.bind(t,"throw");return r()}function isIE(){return"IE"===browserSpecs.name||"MSIE"===browserSpecs.name}function isIOS(){return navigator.userAgent.match(/ipod/i)||navigator.userAgent.match(/ipad/i)||navigator.userAgent.match(/iphone/i)}function isNativeMessageSupported(){return!isIE()&&("Edg"===browserSpecs.name||("YaBrowser"===browserSpecs.name?(isYandex=!0,!0):"Opera"===browserSpecs.name?(isOpera=!0,browserSpecs.version>=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="",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 firefox_or_safari_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||isSafari){var t=e.data.substring(e.data.indexOf("url:")+4),n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",t),n.onerror=plugin_loaded_error,n.onload=firefox_or_safari_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(n)}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}),!1)}function load_extension(){var e;isFireFox||isSafari?nmcades_api_onload():isOpera||isYandex?((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)):((e=document.createElement("script")).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))}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 n=document.createElement("object");n.setAttribute("id","webClassFactory"),n.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),n.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(n)}}function plugin_loaded(){plugin_resolved=1,canPromise?plugin_resolve():window.postMessage("cadesplugin_loaded","*")}function plugin_loaded_error(e){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]>1?new Error("Подключено "+i.length+" токена(ов)"):new Error("Нет подключенных токенов");t=i.shift();var o=e.getPluginVersion(),a=e.getTokenInfo(t);r({version:o,serial:a[0],flags:a[1],label:a[2],type:a[3]})}catch(e){var c=n();throw new Error(e.message||c)}}))}))},this.bind=function(r){return new Promise((function(i){try{if(1===e.getLoggedInState().shift())i();else if(r)e.bindTokenAsync(t,r,(function(e){if(e&&"Error"==e[0]){var t=n(e[1]);throw new Error(t)}i()}));else{if(!e.bindTokenUI(t))throw new Error("Пользователь отменил ввод PIN-кода");i()}}catch(e){var o=n();throw new Error(o||e.message)}}))},this.unbind=function(){return new Promise((function(t){try{1===e.getLoggedInState().shift()&&e.unbindToken(),t()}catch(e){var r=n();throw new Error(r||e.message)}}))},this.clean=function(){return new Promise((function(r){try{var i=e.getCertificateList(t);for(var o in i){var a=i[o].shift();e.deleteContainerOrCertificate(a)}r(o)}catch(e){var c=n();throw new Error(c||e.message)}}))},this.generateCSR=function(t,r,i,o){return i&&i.length||(i=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),o||(o="XA"),new Promise((function(a){try{e.createContainerAsync(o,r,(function(r){if(r&&"Error"==r[0]){var o=n(r[1]);throw new Error(o)}var c=r,s=[];for(var _ in t)t.hasOwnProperty(_)&&s.push(_,t[_]);var l=["certificatePolicies","1.2.643.100.113.1","keyUsage","digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment","extendedKeyUsage",i.toString(),"1.2.643.100.111",'ASN1:FORMAT:UTF8,UTF8:"Криптотокен" (АЛАДДИН Р.Д.)'];e.genCSRAsync(c,s,l,(function(e){if(e&&"Error"==e[0]){var t=n(e[1]);throw new Error(t)}var r=btoa(String.fromCharCode.apply(null,new Uint8Array(e)));a({csr:u(r),containerId:c})}))}))}catch(e){var c=n();throw new Error(c||e.message)}}))},this.writeCertificate=function(t,r){return new Promise((function(i){try{for(var o=[],a=atob(t),c=0;c=u.Data.Validity["Not Before"]&&p<=u.Data.Validity["Not After"],toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}})}catch(e){var d=n();throw new Error(d||e.message)}}))},this.listCertificates=function(){return new Promise((function(i){try{e.getCertificateListAsync(t,(function(o){if(o&&"Error"==o[0]){var a=n(o[1]);throw new Error(a)}for(var c=[],u=0;u1?new Error("Подключено "+r.length+" токена(ов)"):new Error("Нет подключенных токенов");t(r.shift().id)}))})).then((function(r){return t=r,new Promise((function(r,i){e.getTokenInfo({args:{tokenID:t},onSuccess:r,onError:n(i)})}))})).then((function(e){return Object.assign(r,e)}))},this.bind=function(r){return new Promise((function(t,r){e.getLoggedInState({onSuccess:t,onError:n(r)})})).then((function(i){return i.state===JCWebClient2.Vars.AuthState.binded&&i.tokenID===t||new Promise((function(i,o){var a={tokenID:t};r?a.pin=r:a.useUI=!0,e.bindToken({args:a,onSuccess:i,onError:n(o)})}))}))},this.unbind=function(){return new Promise((function(t,r){e.getLoggedInState({onSuccess:t,onError:n(r)})})).then((function(t){return t.state===JCWebClient2.Vars.AuthState.notBinded||new Promise((function(t,r){e.unbindToken({onSuccess:t,onError:n(r)})}))}))},this.clean=function(){return new Promise((function(r,i){e.getContainerList({args:{tokenID:t},onSuccess:r,onError:n(i)})})).then((function(t){var r=Promise.resolve();for(var i in t)r=r.then((function(){return new Promise((function(r,o){e.deletePKIObject({args:{id:t[i].id},onSuccess:r,onError:n(o)})}))}));return r}))},this.generateCSR=function(t,r,i,o){i&&i.length||(i=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),o||(o=JCWebClient2.Vars.KeyAlgorithm.GOST_2012_256);var a,c={certificatePolicies:"1.2.643.100.113.1",keyUsage:"digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment",extendedKeyUsage:i.toString(),"1.2.643.100.111":'ASN1:FORMAT:UTF8,UTF8:"Криптотокен" (АЛАДДИН Р.Д.)'};return new Promise((function(t,i){e.createKeyPair({args:{paramSet:"XA",description:r,algorithm:o},onSuccess:t,onError:n(i)})})).then((function(r){return a=r,new Promise((function(r,i){e.genCSR({args:{id:a,dn:t,exts:c},onSuccess:r,onError:n(i)})}))})).then((function(e){return{csr:s(btoa(String.fromCharCode.apply(null,new Uint8Array(e)))),keyPairId:a}}))},this.writeCertificate=function(t,r){return new Promise((function(i,o){e.writeUserCertificate({args:{keyPairID:r,cert:t},onSuccess:i,onError:n(o)})}))},this.certificateInfo=function(i){return new Promise((function(r,o){e.parseX509Certificate({args:{tokenID:t,id:i},onSuccess:r,onError:n(o)})})).then((function(e){var t=r(e.Data.Subject),n=r(e.Data.Issuer),i=new Date;return{Name:t.CN,Issuer:n,IssuerName:u(n.toString()),Subject:t,SubjectName:u(t.toString()),Version:e.Data.Version,SerialNumber:e.Data["Serial Number"].map(a).join(""),Thumbprint:e.Signature.map(a).join(""),ValidFromDate:e.Data.Validity["Not Before"],ValidToDate:e.Data.Validity["Not After"],HasPrivateKey:!0,IsValid:i>=e.Data.Validity["Not Before"]&&i<=e.Data.Validity["Not After"],Algorithm:e.Data["Subject Public Key Info"]["Public Key Algorithm"],toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nАлгоритм: "+this.Algorithm+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}}}))},this.listCertificates=function(){return new Promise((function(r,i){e.getContainerList({args:{tokenID:t},onSuccess:r,onError:n(i)})})).then((function(r){for(var i=[],a=Promise.resolve(),c=0;c=0}function u(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e)return t.Certificates.then((function(e){return n=e,e.Count})).then((function(e){for(var t=[],r=1;r<=e;r++)t.push(n.Item(r));return Promise.all(t)})).then((function(e){var t=[];for(var n in e)t.push(e[n].SubjectName,e[n].Thumbprint);return Promise.all(t)})).then((function(e){for(var t=[],n=0;n>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}this.init=function(){return window.cadesplugin_skip_extension_install=!0,window.allow_firefox_cadesplugin_async=!0,n(114),e=!!cadesplugin.CreateObjectAsync,o=cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY,new Promise((function(e){if(!window.cadesplugin)throw new Error("КриптоПро ЭЦП Browser plug-in не обнаружен");e()})).then((function(){return e?cadesplugin.then((function(){return cadesplugin.CreateObjectAsync("CAdESCOM.About")})).then((function(e){return e.Version})).then((function(e){return t=e,{version:e}})).catch((function(e){var t=l(e);throw new Error(t)})):new Promise((function(e){try{var n=cadesplugin.CreateObject("CAdESCOM.About");if(!n||!n.Version)throw new Error("КриптоПро ЭЦП Browser plug-in не загружен");e({version:t=n.Version})}catch(e){var r=l(e);throw new Error(r)}}))}))},this.bind=function(e){return r=!0,Promise.resolve(r)},this.unbind=function(){return r=!1,Promise.resolve(r)},this.generateCSR=function(t,n,r,i){var o,a,c,u,s,_,I,v,T,N,R,y,P;return r&&r.length||(r=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),i||(i=S),e?cadesplugin.then((function(){return Promise.all([cadesplugin.CreateObjectAsync("X509Enrollment.CX509Enrollment"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509CertificateRequestPkcs10"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509PrivateKey"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509ExtensionKeyUsage"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509ExtensionEnhancedKeyUsage"),cadesplugin.CreateObjectAsync("X509Enrollment.CObjectIds"),cadesplugin.CreateObjectAsync("X509Enrollment.CX500DistinguishedName"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509Extensions"),cadesplugin.CreateObjectAsync("X509Enrollment.CCspInformations"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509Extension")])})).then((function(e){return o=e[0],a=e[1],c=e[2],s=e[3],_=e[4],I=e[5],N=e[6],u=e[7],R=e[8],P=e[9],R.AddAvailableCsps()})).then((function(){return R.Count})).then((function(e){if(!e)throw new Error("No CSP informations!");for(var t=[],n=0;n1)throw new Error("Подключено "+r+" устройств")}return Promise.all([e.getDeviceInfo(t,e.TOKEN_INFO_READER),e.getDeviceInfo(t,e.TOKEN_INFO_LABEL),e.getDeviceInfo(t,e.TOKEN_INFO_SERIAL),e.getDeviceModel(t),e.getDeviceType(t)])})).then((function(t){return{version:e.version,serial:t[2],reader:t[0],label:t[1].indexOf("Rutoken ECP ")+1?"":t[1],type:t[4],model:t[3]}})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.bind=function(r){return new Promise((function(i,o){e.getDeviceInfo(t,e.TOKEN_INFO_IS_LOGGED_IN).then((function(e){if(e)return i("Пользователь уже авторизован"),!1;if(!r&&!(r=prompt("PIN-код доступа к устройству")))throw new Error("Авторизация на устройстве отменена пользователем");return!0})).then((function(n){if(n)return e.login(t,r).then((function(e){i(!0)}));i(!0)})).then(null,(function(e){var t=n(e);o(t)}))}))},this.unbind=function(){return new Promise((function(r,i){e.getDeviceInfo(t,e.TOKEN_INFO_IS_LOGGED_IN).then((function(e){return!!e||(r("Пользователь не авторизован"),!1)})).then((function(n){return!n||e.logout(t).then((function(e){r(!0)}))})).then(null,(function(e){var t=n(e);i(t)}))}))},this.clean=function(){var r=0;return e.enumerateCertificates(t,e.CERT_CATEGORY_USER).then((function(n){var i=[];for(var o in n){var a=n[o];i.push(e.deleteCertificate(t,a))}return r+=i.length,Promise.all(i)})).then((function(){return e.enumerateKeys(t,"")})).then((function(n){var i=[];for(var o in n){var a=n[o];i.push(e.deleteKeyPair(t,a))}return r+=i.length,Promise.all(i)})).then((function(){return r})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.generateCSR=function(r,i,o,c){var u="";i||(i=""),o&&o.length||(o=["clientAuth","emailProtection"]);var s=c&&e[c]||e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256,_="XA",l=e.HASH_TYPE_GOST3411_94;s===e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_512?(_="A",l=e.HASH_TYPE_GOST3411_12_512):s===e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256&&(l=e.HASH_TYPE_GOST3411_12_256);var f={publicKeyAlgorithm:s,paramset:_};return e.generateKeyPair(t,void 0,i,f).then((function(n){u=n;var i=[];for(var a in r)r.hasOwnProperty(a)&&i.push({rdn:a,value:r[a]});var c={keyUsage:["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment"],extKeyUsage:o},s={subjectSignTool:'СКЗИ "РУТОКЕН ЭЦП"',hashAlgorithm:l};return e.createPkcs10(t,u,i,c,s)})).then((function(e){return{csr:a(e),keyPairId:u}})).then(null,(function(r){u&&e.deleteKeyPair(t,u);var i=n(r);throw new Error(i)}))},this.writeCertificate=function(r){var i=e.CERT_CATEGORY_USER;return e.importCertificate(t,r,i).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.certificateInfo=function(i){var o=!1,a="";return new Promise((function(r){e.getKeyByCertificate(t,i).then((function(e){r(!!e)})).then(null,(function(e){var t=n(e);console.log("getKeyByCertificate",i,t),r(!1)}))})).then((function(n){return o=n,e.getCertificateInfo(t,i,e.CERT_INFO_SERIAL_NUMBER)})).then((function(n){return a=n,e.parseCertificate(t,i)})).then((function(e){var t=e.text.match(/Version: (\d+)/),n=t.length>1?t[1]:void 0,c=e.text.match(/Public Key Algorithm: (.+)$/m),s=c.length>1?c[1]:"",_=r(e.subject),l=r(e.issuer),f=new Date;return{Name:_.commonName||_.CN,Issuer:l,IssuerName:u(l.toString()),Subject:_,SubjectName:u(_.toString()),Version:n,Algorithm:s,SerialNumber:a,Thumbprint:i.replace(/\:/g,""),ValidFromDate:new Date(e.validNotBefore),ValidToDate:new Date(e.validNotAfter),HasPrivateKey:o,IsValid:f>=new Date(e.validNotBefore)&&f<=new Date(e.validNotAfter),toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nАлгоритм: "+this.Algorithm+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет (или не выполнен вход)")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}}})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.listCertificates=function(){var r=[],i=[];return e.enumerateCertificates(t,e.CERT_CATEGORY_USER).then((function(n){r=n;var i=[];for(var o in r)i.push(e.parseCertificate(t,r[o]));return Promise.all(i)})).then((function(e){for(var t in r)i.push({id:r[t],name:o(e[t])});return i})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.readCertificate=function(r){return e.getCertificate(t,r).then((function(e){return a(e)})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.signData=function(r,i,o){o||(o={});var a=o.attached;return e.sign(t,i,r,e.DATA_FORMAT_BASE64,{detached:!a}).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.addSign=function(r,i,o,a){a||(a={});var c=a.attached;return c&&(r=""),e.sign(t,o,r,e.DATA_FORMAT_BASE64,{detached:!c,CMS:i}).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.verifySign=function(r,i,o){o||(o={});var a={base64:!0,verifyCertificate:!1};return o.attached||(a.data=r),e.verify(t,i,a).then((function(e){if(!e)throw new Error("подпись не верна");return!0})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.encryptData=function(r,i){return e.getCertificate(t,i).then((function(n){return e.cmsEncrypt(t,"",[n],r,{base64:!0})})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.decryptData=function(r,i){return e.getKeyByCertificate(t,i).then((function(n){return e.cmsDecrypt(t,n,r,{base64:!0})})).then(null,(function(e){var t=n(e);throw new Error(t)}))}};n.d(t,"DN",(function(){return i})),n.d(t,"JaCarta",(function(){return s})),n.d(t,"JaCarta2",(function(){return l})),n.d(t,"CryptoPro",(function(){return N})),n.d(t,"RuToken",(function(){return D}))}])})); //# sourceMappingURL=ruscrypto.min.js.map \ No newline at end of file diff --git a/dist/ruscrypto.min.js.map b/dist/ruscrypto.min.js.map index d5b8a9a..de6b3d4 100644 --- a/dist/ruscrypto.min.js.map +++ b/dist/ruscrypto.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://RusCryptoJS/webpack/universalModuleDefinition","webpack://RusCryptoJS/webpack/bootstrap","webpack://RusCryptoJS/./node_modules/core-js/modules/_wks.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_global.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_an-object.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-dp.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_descriptors.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_is-object.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-length.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_fails.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_hide.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-object.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_export.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_redefine.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_has.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_ctx.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-integer.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_core.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_library.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_uid.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_cof.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_property-desc.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-iobject.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iterators.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-keys.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.replace.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.match.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gopn.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_set-to-string-tag.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.array.iterator.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.to-string.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.promise.js","webpack://RusCryptoJS/./node_modules/rutoken/rutoken.min.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_defined.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_classof.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_flags.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-primitive.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_a-function.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-pie.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-absolute-index.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_advance-string-index.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_regexp-exec-abstract.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_shared.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_fix-re-wks.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_regexp-exec.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_dom-create.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gopd.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iobject.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_shared-key.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_enum-bug-keys.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_set-species.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.typed.uint8-array.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_redefine-all.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_an-instance.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_is-array-iter.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-create.js","webpack://RusCryptoJS/./node_modules/core-js/modules/core.get-iterator-method.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_species-constructor.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-detect.js","webpack://RusCryptoJS/./node_modules/core-js/modules/web.dom.iterable.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.string.iterator.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gops.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_string-at.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_ie8-dom-define.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.constructor.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-keys-internal.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-includes.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_is-regexp.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_typed.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-index.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-fill.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_html.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gpo.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-methods.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_is-array.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_add-to-unscopables.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-define.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-call.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_task.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_new-promise-capability.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.function.name.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.array.from.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es7.symbol.async-iterator.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_wks-define.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_wks-ext.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.symbol.js","webpack://RusCryptoJS/./node_modules/console-polyfill/index.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.exec.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_inherit-if-required.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_set-proto.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_typed-array.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_typed-buffer.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-dps.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-species-create.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-species-constructor.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-step.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-create.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-copy-within.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.flags.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_for-of.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_invoke.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_microtask.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_perform.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_user-agent.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_promise-resolve.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.split.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.array.find.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.object.keys.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-sap.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_create-property.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.object.assign.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-assign.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_meta.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_enum-keys.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gopn-ext.js","webpack://RusCryptoJS/./src/CryptoPro/cadesplugin_api.js","webpack://RusCryptoJS/./src/DN.js","webpack://RusCryptoJS/./src/JaCarta/errors.js","webpack://RusCryptoJS/./src/helpers.js","webpack://RusCryptoJS/./src/JaCarta/index.js","webpack://RusCryptoJS/./src/JaCarta2/errors.js","webpack://RusCryptoJS/./src/JaCarta2/index.js","webpack://RusCryptoJS/./src/CryptoPro/constants.js","webpack://RusCryptoJS/./src/CryptoPro/index.js","webpack://RusCryptoJS/./src/RuToken/errors.js","webpack://RusCryptoJS/./src/RuToken/index.js","webpack://RusCryptoJS/./src/index.js"],"names":["root","factory","exports","module","define","amd","self","this","enumerable","get","getter","value","key","bind","Object","prototype","hasOwnProperty","call","object","property","store","uid","Symbol","USE_SYMBOL","name","global","window","Math","Function","__g","isObject","it","TypeError","anObject","IE8_DOM_DEFINE","toPrimitive","dP","defineProperty","f","O","P","Attributes","e","a","toInteger","min","exec","createDesc","defined","core","hide","redefine","ctx","$export","type","source","own","out","exp","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","IS_BIND","B","target","expProto","undefined","U","W","R","has","SRC","$toString","TPL","split","inspectSource","val","safe","isFunction","join","String","aFunction","fn","that","length","b","c","apply","arguments","ceil","floor","isNaN","version","__e","id","px","random","concat","toString","slice","bitmap","configurable","writable","IObject","$keys","enumBugKeys","keys","toObject","toLength","advanceStringIndex","regExpExec","max","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","REPLACE","$replace","maybeCallNative","searchValue","replaceValue","regexp","res","done","rx","functionalReplace","fullUnicode","unicode","lastIndex","results","result","push","accumulatedResult","nextSourcePosition","i","matched","position","index","captures","j","namedCaptures","groups","replacerArgs","replacement","getSubstitution","str","tailPos","m","symbols","match","ch","capture","charAt","n","MATCH","$match","RegExp","A","matchStr","hiddenKeys","getOwnPropertyNames","def","TAG","tag","stat","addToUnscopables","step","Iterators","toIObject","Array","iterated","kind","_t","_i","_k","Arguments","$flags","DESCRIPTORS","flags","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","LIBRARY","classof","anInstance","forOf","speciesConstructor","task","set","microtask","newPromiseCapabilityModule","perform","userAgent","promiseResolve","process","versions","v8","$Promise","isNode","empty","newPromiseCapability","USE_NATIVE","promise","resolve","FakePromise","constructor","PromiseRejectionEvent","then","indexOf","isThenable","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","exited","handler","fail","reject","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","console","unhandled","isUnhandled","emit","onunhandledrejection","reason","error","_a","v","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","executor","err","onFulfilled","onRejected","C","Promise","r","capability","$$reject","x","iter","all","iterable","values","remaining","$index","alreadyCalled","race","rutoken","t","ready","isExtensionInstalled","isPluginInstalled","loadPlugin","l","rutokenLoaded","s","document","createElement","style","setProperty","innerHTML","setAttribute","body","appendChild","h","y","o","wrapWithOldInterface","p","d","shift","message","originalObject","initialize","navigator","mimeTypes","ActiveXObject","cof","ARG","T","tryGet","callee","ignoreCase","multiline","sticky","valueOf","propertyIsEnumerable","at","builtinExec","mode","copyright","fails","wks","regexpExec","SPECIES","REPLACE_SUPPORTS_NAMED_GROUPS","re","replace","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","KEY","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","nativeMethod","arg2","forceStringMethod","strfn","rxfn","string","arg","re1","re2","regexpFlags","nativeExec","nativeReplace","patchedExec","UPDATES_LAST_INDEX_WRONG","NPCG_INCLUDED","reCopy","is","pIE","gOPD","getOwnPropertyDescriptor","shared","init","data","byteOffset","src","Constructor","forbiddenField","ITERATOR","ArrayProto","dPs","IE_PROTO","Empty","createDict","iframeDocument","iframe","display","contentWindow","open","write","lt","close","create","Properties","getIteratorMethod","D","SAFE_CLOSING","riter","from","skipClosing","arr","next","$iterators","getKeys","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","NAME","explicit","Collection","proto","$at","point","getOwnPropertySymbols","TO_STRING","pos","charCodeAt","inheritIfRequired","gOPN","isRegExp","$RegExp","Base","CORRECT_NEW","tiRE","piRE","fiU","proxy","arrayIndexOf","names","toAbsoluteIndex","IS_INCLUDES","$this","el","fromIndex","Typed","TYPED","VIEW","ABV","ArrayBuffer","DataView","CONSTR","TypedArrayConstructors","number","RangeError","aLen","end","endPos","documentElement","ObjectProto","getPrototypeOf","asc","TYPE","$create","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","callbackfn","isArray","UNSCOPABLES","$iterCreate","setToStringTag","BUGGY","returnThis","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","iterator","ret","defer","channel","port","invoke","html","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","listener","event","args","nextTick","now","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","PromiseCapability","$$resolve","FProto","nameRE","isArrayIter","createProperty","getIterFn","arrayLike","mapfn","mapping","iterFn","wksExt","$Symbol","META","$fails","wksDefine","enumKeys","_create","gOPNExt","$GOPD","$DP","$JSON","JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","isEnum","SymbolRegistry","AllSymbols","OPSymbols","QObject","setter","findChild","setSymbolDesc","protoDesc","wrap","sym","isSymbol","$defineProperty","$defineProperties","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","es6Symbols","wellKnownSymbols","k","keyFor","useSetter","useSimple","defineProperties","replacer","$replacer","prop","method","con","dummy","properties","pop","forced","setPrototypeOf","check","test","buggy","__proto__","$typed","$buffer","propertyDesc","redefineAll","toIndex","createArrayMethod","createArrayIncludes","ArrayIterators","$iterDetect","setSpecies","arrayFill","arrayCopyWithin","Uint8Array","$ArrayBuffer","$DataView","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayFind","arrayFindIndex","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","lastIndexOf","arrayReduce","reduce","arrayReduceRight","reduceRight","arrayJoin","arraySort","sort","arraySlice","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","$map","allocate","LITTLE_ENDIAN","Uint16Array","buffer","FORCED_SET","toOffset","BYTES","offset","validate","speciesFromList","list","fromList","addGetter","internal","$from","$of","TO_LOCALE_BUG","$toLocaleString","copyWithin","start","every","fill","filter","find","predicate","findIndex","forEach","searchElement","includes","separator","map","reverse","middle","some","comparefn","subarray","begin","$begin","BYTES_PER_ELEMENT","$slice","len","isTAIndex","$getDesc","$setDesc","desc","$TypedArrayPrototype$","CLAMPED","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","addElement","round","$offset","$length","byteLength","klass","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","of","Infinity","BaseBuffer","abs","pow","log","LN2","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","NaN","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","view","isLittleEndian","intIndex","_b","pack","conversion","ArrayBufferProto","$setInt8","setInt8","getInt8","setUint8","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","original","descriptor","to","count","inc","BREAK","RETURN","un","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","standalone","toggle","node","createTextNode","observe","characterData","promiseCapability","callRegExpExec","$min","$push","SUPPORTS_Y","SPLIT","$split","internalSplit","limit","lastLength","output","lastLastIndex","splitLimit","separatorCopy","splitter","unicodeMatching","lim","q","z","$find","assign","gOPS","$assign","K","getSymbols","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","windowNames","getWindowNames","cadesplugin","pluginObject","plugin_resolved","plugin_reject","plugin_resolve","isOpera","isFireFox","isSafari","isYandex","canPromise","browserSpecs","check_browser","ru_cryptopro_npcades_10_native_bridge","callbacksCount","callbacks","resultForCallback","callbackId","resultArray","callback","functionName","hasCallback","arrObjs","encodeURIComponent","alert","parentNode","JSModuleVersion","async_spawn","set_pluginObject","set_log_level","getLastError","is_capilite_enabled","isNativeMessageSupported","CreateObjectAsync","ReleasePluginObjects","CreateObject","cadesplugin_load_timeout","check_load_timeout","set_constantValues","current_log_level","LOG_LEVEL_ERROR","check_plugin_working","tem","ua","M","appName","appVersion","splice","cpcsp_console_log","level","msg","LOG_LEVEL_DEBUG","LOG_LEVEL_INFO","info","CAPICOM_MEMORY_STORE","CAPICOM_LOCAL_MACHINE_STORE","CAPICOM_CURRENT_USER_STORE","CADESCOM_MEMORY_STORE","CADESCOM_LOCAL_MACHINE_STORE","CADESCOM_CURRENT_USER_STORE","CADESCOM_CONTAINER_STORE","CAPICOM_MY_STORE","CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED","CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME","CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED","CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING","CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE","CADESCOM_XADES_DEFAULT","CADESCOM_XADES_BES","CADESCOM_XADES_T","CADESCOM_XADES_X_LONG_TYPE_1","CADESCOM_XMLDSIG_TYPE","XmlDsigGost3410UrlObsolete","XmlDsigGost3411UrlObsolete","XmlDsigGost3410Url","XmlDsigGost3411Url","XmlDsigGost3411Url2012256","XmlDsigGost3410Url2012256","XmlDsigGost3411Url2012512","XmlDsigGost3410Url2012512","CADESCOM_CADES_DEFAULT","CADESCOM_CADES_BES","CADESCOM_CADES_T","CADESCOM_CADES_X_LONG_TYPE_1","CADESCOM_PKCS7_TYPE","CADESCOM_ENCODE_BASE64","CADESCOM_ENCODE_BINARY","CADESCOM_ENCODE_ANY","CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT","CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN","CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY","CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME","CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME","CAPICOM_CERTIFICATE_FIND_SHA1_HASH","CAPICOM_CERTIFICATE_FIND_ISSUER_NAME","CAPICOM_CERTIFICATE_FIND_ROOT_NAME","CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME","CAPICOM_CERTIFICATE_FIND_EXTENSION","CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY","CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY","CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY","CAPICOM_CERTIFICATE_FIND_TIME_VALID","CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID","CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED","CAPICOM_CERTIFICATE_FIND_KEY_USAGE","CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE","CAPICOM_PROPID_ENHKEY_USAGE","CAPICOM_OID_OTHER","CAPICOM_OID_KEY_USAGE_EXTENSION","CAPICOM_EKU_CLIENT_AUTH","CAPICOM_EKU_SMARTCARD_LOGON","CAPICOM_EKU_OTHER","CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME","CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME","CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION","CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME","CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME","CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION","CADESCOM_ATTRIBUTE_OTHER","CADESCOM_STRING_TO_UCS2LE","CADESCOM_BASE64_TO_BINARY","CADESCOM_DISPLAY_DATA_NONE","CADESCOM_DISPLAY_DATA_CONTENT","CADESCOM_DISPLAY_DATA_ATTRIBUTE","CADESCOM_ENCRYPTION_ALGORITHM_RC2","CADESCOM_ENCRYPTION_ALGORITHM_RC4","CADESCOM_ENCRYPTION_ALGORITHM_DES","CADESCOM_ENCRYPTION_ALGORITHM_3DES","CADESCOM_ENCRYPTION_ALGORITHM_AES","CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89","CADESCOM_HASH_ALGORITHM_SHA1","CADESCOM_HASH_ALGORITHM_MD2","CADESCOM_HASH_ALGORITHM_MD4","CADESCOM_HASH_ALGORITHM_MD5","CADESCOM_HASH_ALGORITHM_SHA_256","CADESCOM_HASH_ALGORITHM_SHA_384","CADESCOM_HASH_ALGORITHM_SHA_512","CADESCOM_HASH_ALGORITHM_CP_GOST_3411","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC","CADESCOM_AllowNone","CADESCOM_AllowNoOutstandingRequest","CADESCOM_AllowUntrustedCertificate","CADESCOM_AllowUntrustedRoot","CADESCOM_SkipInstallToStore","ENABLE_CARRIER_TYPE_CSP","ENABLE_CARRIER_TYPE_FKC_NO_SM","ENABLE_CARRIER_TYPE_FKC_SM","ENABLE_ANY_CARRIER_TYPE","DISABLE_EVERY_CARRIER_OPERATION","ENABLE_CARRIER_OPEN_ENUM","ENABLE_CARRIER_CREATE","ENABLE_ANY_OPERATION","CADESCOM_PRODUCT_CSP","CADESCOM_PRODUCT_OCSP","CADESCOM_PRODUCT_TSP","MEDIA_TYPE_REGISTRY","MEDIA_TYPE_HDIMAGE","MEDIA_TYPE_CLOUD","MEDIA_TYPE_SCARD","generatorFunc","continuer","verb","generator","isIE","isIOS","call_ru_cryptopro_npcades_10_native_bridge","getElementById","decimalToHexString","toUpperCase","GetMessageFromException","exception","cpcsp_chrome_nmcades","array","tmpobj","ex","response","eval","show_firefox_missing_extension_dialog","cadesplugin_skip_extension_install","ovr","getElementsByTagName","plugin_loaded_error","visibility","firefox_or_safari_nmcades_onload","check_chrome_plugin","plugin_loaded","nmcades_api_onload","url","substring","fileref","onerror","onload","load_extension","load_npapi_plugin","elem","elem1","elem2","createPromise","check_npapi_plugin","mimetype","enabledPlugin","div","readyState","obj","EnableInternalCSP","DN","CKR_CANCEL","CKR_HOST_MEMORY","CKR_SLOT_ID_INVALID","CKR_GENERAL_ERROR","CKR_FUNCTION_FAILED","CKR_ARGUMENTS_BAD","CKR_ATTRIBUTE_READ_ONLY","CKR_ATTRIBUTE_TYPE_INVALID","CKR_ATTRIBUTE_VALUE_INVALID","CKR_DEVICE_ERROR","CKR_DEVICE_MEMORY","CKR_FUNCTION_CANCELED","CKR_KEY_HANDLE_INVALID","CKR_KEY_SIZE_RANGE","CKR_KEY_TYPE_INCONSISTENT","CKR_MECHANISM_INVALID","CKR_MECHANISM_PARAM_INVALID","CKR_OBJECT_HANDLE_INVALID","CKR_OPERATION_ACTIVE","CKR_OPERATION_NOT_INITIALIZED","CKR_PIN_INCORRECT","CKR_PIN_LEN_RANGE","CKR_PIN_LOCKED","CKR_SESSION_HANDLE_INVALID","CKR_SESSION_PARALLEL_NOT_SUPPORTED","CKR_SESSION_EXISTS","CKR_SESSION_READ_ONLY_EXISTS","CKR_SESSION_READ_WRITE_SO_EXISTS","CKR_SIGNATURE_INVALID","CKR_TEMPLATE_INCOMPLETE","CKR_TOKEN_NOT_PRESENT","CKR_TOKEN_WRITE_PROTECTED","CKR_USER_ALREADY_LOGGED_IN","CKR_USER_NOT_LOGGED_IN","CKR_USER_PIN_NOT_INITIALIZED","CKR_USER_TYPE_INVALID","CKR_USER_ANOTHER_ALREADY_LOGGED_IN","CKR_BUFFER_TOO_SMALL","CKR_INFORMATION_SENSITIVE","CKR_CRYPTOKI_NOT_INITIALIZED","CKR_CRYPTOKI_ALREADY_INITIALIZED","CKR_FUNCTION_REJECTED","NOT_STATE_TOKEN_BINDED","NOT_STATE_NOT_BINDED","IS_STATE_NOT_BINDED","NOT_STATE_UNILATERAL_AUTHENTICATION_IN_PROGRESS","NOT_STATE_SECURE_CHANNEL_CONNECTION_IN_PROGRESS","NOT_STATE_SECURE_CHANNEL_ESTABLISHED","CERTIFICATE_NOT_FOUND","PUBLIC_KEY_NOT_FOUND","SERVER_PUBLIC_KEY_NOT_FOUND","INVALID_SERVER_PUBLIC_KEY","DATA_TO_SIGN_ZERO_LENGTH","DATA_TO_VERIFY_ZERO_LENGTH","SIGNATURE_TO_VERIFY_ZERO_LENGTH","INVALID_EC_PARAMS","TOKEN_MEMORY_TOO_SMALL","KEY_SIZE_NOT_64","CERT_NOT_MATCH_PUBLIC_KEY","FAILED_CHECK_BROWSER_VERS","BROWSER_VERS_NOT_SUPPORTED","INVALID_USER_TYPE","PINS_NOT_MATCH","USER_CHANGE_ADMIN_PIN_NOT_STATE_NOT_BINDED","SSL_ERR_GEN_SESSION_KEY","SSL_ERR_GOST_ENGINE","SSL_ERR_SSL_NEW","SSL_ERR_CONNECT","SSL_ERR_SSL_WRITE","SSL_ERR_SSL_READ","SSL_ERR_LOAD_CERT_AND_KEY_FROM_TOKEN","SSL_ERR_GET_PEER_PUBLIC_KEY","CERT_PARS_ERR_GET_PUBLIC_KEY","CERT_PARS_ERR_GET_ISSUER_AND_SER_NUMBER","UNKNOWN_ERROR","oids","oid","short","full","convertDN","dn","field","item","stripDnQuotes","JaCarta","client","tokenId","getError","mnemo","code","getErrorMessage","errors","formatCertificateName","containerName","Data","Subject","rdn","cn","snils","inn","byte2hex","byte","pemSplit","JCWebClient","script","onreadystatechange","onFail","errorMsg","getScript","Error","checkWebBrowserVersion","aTokens","getAllTokens","getPluginVersion","tokenInfo","getTokenInfo","serial","label","userPin","getLoggedInState","bindTokenAsync","bindTokenUI","unbind","unbindToken","clean","aContainers","getCertificateList","containerId","deleteContainerOrCertificate","generateCSR","description","ekuOids","ecParams","createContainerAsync","aDn","exts","genCSRAsync","csr","btoa","fromCharCode","writeCertificate","certificate","aCertificate","der","atob","writeCertificateAsync","certificateInfo","parseX509CertificateEx","dnI","Issuer","dt","Date","Name","CN","IssuerName","SubjectName","Version","SerialNumber","Thumbprint","Signature","ValidFromDate","Validity","ValidToDate","HasPrivateKey","IsValid","listCertificates","getCertificateListAsync","certs","contName","contId","readCertificate","readCertificateEx","signData","dataBase64","signBase64EncodedDataAsync","sign","encryptData","decryptData","CKR_FUNCTION_NOT_SUPPORTED","CKR_KT2_PIN_ALREADY_SET","CKR_PUK_INCORRECT","CKR_CANNOT_UNLOCK","CKR_PUK_INVALID","CKR_SM_REQUIRED","CKR_PKCS7_PUBLIC_KEY_NOT_FOUND","CKR_ICL_LIBRARY_NOT_FOUND","CKR_ICL_JCVERIFY_NOT_FOUND","CKR_ICL_JCVERIFY_CHECKSUM_NOT_FOUND","CKR_ICL_CHECKSUM_NOT_FOUND","CKR_ICL_JCVERIFY_CHECKSUM","CKR_ICL_CHECKSUM","CKR_ICL_NOT_ICL","JaCarta2","errorHandler","makeDN","final","JCWebClient2","defaults","async","getJCWebClientVersion","onSuccess","onError","getAllSlots","slots","tokenExists","tokenID","state","Vars","AuthState","binded","pin","useUI","bindToken","notBinded","getContainerList","containers","deletePKIObject","algorithm","KeyAlgorithm","GOST_2012_256","createKeyPair","paramSet","keyPairId","genCSR","writeUserCertificate","keyPairID","cert","parseX509Certificate","Algorithm","getCertificateBody","signBase64EncodedData","contID","verifySign","signBase64","verifyData","signature","options","useToken","dataByte","receiverCertificate","certByte","senderCertificate","X509KeySpec","X509PrivateKeyExportFlags","X509CertificateEnrollmentContext","X509KeyUsageFlags","X500NameFlags","EncodingType","InstallResponseRestrictionFlags","ProviderTypes","cadesErrorMesages","CryptoPro","canAsync","pluginVersion","hasContainerStore","diff","regExStrip0","segmentsA","segmentsB","parseInt","versionCompare","fetchCertsFromStore","oStore","oCertificates","skipIds","Certificates","certificates","Count","Item","subjects","oDN","string2dn","oCertificate","findCertInStore","certThumbprint","Find","getCertificateObject","Open","Close","hasKey","PrivateKey","privateKey","propset_KeyPin","propset_CachePin","KeyPin","CachePin","subjectName","pair","trim","stringToUtf8ByteArray","allow_firefox_cadesplugin_async","require","oAbout","catch","providerType","oEnroll","oRequest","oPrivateKey","oExtensions","oKeyUsage","oEnhancedKeyUsage","oEnhancedKeyUsageOIDs","aOIDs","oSstOID","oDn","oCspInformations","sCSPName","oSubjectSignTool","objects","AddAvailableCsps","cnt","aPromises","ItemByIndex","aCspInformation","LegacyCsp","Type","aCspInfo","cspType","cspName","bLegacyCsp","nType","sName","propset_KeySpec","propset_Existing","propset_ExportPolicy","propset_ProviderType","propset_ProviderName","propset_Pin","InitializeFromPrivateKey","InitializeEncode","promises","InitializeFromValue","Add","utf8arr","unshift","base64String","Initialize","X509Extensions","ext","strName","Encode","propset_Subject","InitializeFromRequest","CreateRequest","oCspInfo","KeySpec","Existing","ExportPolicy","ProviderName","ProviderType","aEnhancedKeyUsageOIDs","ssOID","shortName","certBase64","existingSha","enroll","InstallResponse","sha","found","infoToString","oInfo","Result","PublicKey","FriendlyName","oParesedSubj","tryContainerStore","Export","oSigner","oSignedData","propset_Certificate","propset_Options","propset_ContentEncoding","propset_Content","SignCades","Certificate","Options","ContentEncoding","Content","signData2","certThumbprint2","pin2","oCertificate2","CoSignCades","addSign","VerifyCades","oEnvelop","oRecipients","envelop","Recipients","recipients","Clear","Encrypt","Decrypt","ALREADY_LOGGED_IN","ASN1_ERROR","BAD_PARAMS","BASE64_DECODE_FAILED","CA_CERTIFICATES_NOT_FOUND","CANNOT_SAVE_PIN_IN_CACHE","CANT_HARDWARE_VERIFY_CMS","CEK_NOT_AUTHENTIC","CERTIFICATE_CATEGORY_BAD","CERTIFICATE_EXISTS","CERTIFICATE_HASH_NOT_UNIQUE","CERTIFICATE_VERIFICATION_ERROR","DATA_INVALID","DEVICE_ERROR","DEVICE_NOT_FOUND","FUNCTION_FAILED","FUNCTION_REJECTED","KEY_FUNCTION_NOT_PERMITTED","KEY_ID_NOT_UNIQUE","KEY_LABEL_NOT_UNIQUE","KEY_NOT_FOUND","LICENCE_READ_ONLY","NOT_ENOUGH_MEMORY","PEM_ERROR","PIN_CHANGED","PIN_INCORRECT","PIN_INVALID","PIN_LENGTH_INVALID","PIN_LOCKED","PKCS11_LOAD_FAILED","SESSION_INVALID","TOKEN_INVALID","UNSUPPORTED_BY_TOKEN","USER_NOT_LOGGED_IN","USER_PIN_NOT_INITIALIZED","WRONG_KEY_TYPE","X509_AKID_ISSUER_SERIAL_MISMATCH","X509_AKID_SKID_MISMATCH","X509_APPLICATION_VERIFICATION","X509_CERT_CHAIN_TOO_LONG","X509_CERT_HAS_EXPIRED","X509_CERT_NOT_YET_VALID","X509_CERT_REJECTED","X509_CERT_REVOKED","X509_CERT_SIGNATURE_FAILURE","X509_CERT_UNTRUSTED","X509_CRL_HAS_EXPIRED","X509_CRL_NOT_YET_VALID","X509_CRL_PATH_VALIDATION_ERROR","X509_CRL_SIGNATURE_FAILURE","X509_DEPTH_ZERO_SELF_SIGNED_CERT","X509_DIFFERENT_CRL_SCOPE","X509_ERROR_IN_CERT_NOT_AFTER_FIELD","X509_ERROR_IN_CERT_NOT_BEFORE_FIELD","X509_ERROR_IN_CRL_LAST_UPDATE_FIELD","X509_ERROR_IN_CRL_NEXT_UPDATE_FIELD","X509_EXCLUDED_VIOLATION","X509_INVALID_CA","X509_INVALID_EXTENSION","X509_INVALID_NON_CA","X509_INVALID_POLICY_EXTENSION","X509_INVALID_PURPOSE","X509_KEYUSAGE_NO_CERTSIGN","X509_KEYUSAGE_NO_CRL_SIGN","X509_KEYUSAGE_NO_DIGITAL_SIGNATURE","X509_NO_EXPLICIT_POLICY","X509_OUT_OF_MEM","X509_PATH_LENGTH_EXCEEDED","X509_PERMITTED_VIOLATION","X509_PROXY_CERTIFICATES_NOT_ALLOWED","X509_PROXY_PATH_LENGTH_EXCEEDED","X509_SELF_SIGNED_CERT_IN_CHAIN","X509_SUBJECT_ISSUER_MISMATCH","X509_SUBTREE_MINMAX","X509_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","X509_UNABLE_TO_DECRYPT_CERT_SIGNATURE","X509_UNABLE_TO_DECRYPT_CRL_SIGNATURE","X509_UNABLE_TO_GET_CRL","X509_UNABLE_TO_GET_CRL_ISSUER","X509_UNABLE_TO_GET_ISSUER_CERT","X509_UNABLE_TO_GET_ISSUER_CERT_LOCALLY","X509_UNABLE_TO_VERIFY_LEAF_SIGNATURE","X509_UNHANDLED_CRITICAL_CRL_EXTENSION","X509_UNHANDLED_CRITICAL_EXTENSION","X509_UNNESTED_RESOURCE","X509_UNSUPPORTED_CONSTRAINT_SYNTAX","X509_UNSUPPORTED_CONSTRAINT_TYPE","X509_UNSUPPORTED_EXTENSION_FEATURE","X509_UNSUPPORTED_NAME_SYNTAX","requiredFunctions","RuToken","plugin","deviceId","ee","errorCodes","subject","cleanPemString","pem","_","chrome","absentFn","enumerateDevices","devices","getDeviceInfo","TOKEN_INFO_READER","TOKEN_INFO_LABEL","TOKEN_INFO_SERIAL","getDeviceModel","getDeviceType","infos","reader","model","TOKEN_INFO_IS_LOGGED_IN","prompt","needToLogIn","login","needToLogOut","logout","enumerateCertificates","CERT_CATEGORY_USER","certId","deleteCertificate","enumerateKeys","keyId","deleteKeyPair","marker","extKeyUsage","publicKeyAlgorithm","PUBLIC_KEY_ALGORITHM_GOST3410_2012_256","paramset","hashAlgorithm","HASH_TYPE_GOST3411_94","PUBLIC_KEY_ALGORITHM_GOST3410_2012_512","HASH_TYPE_GOST3411_12_512","HASH_TYPE_GOST3411_12_256","generateKeyPair","extensions","keyUsage","subjectSignTool","createPkcs10","category","importCertificate","hasPrivateKey","serialNumber","getKeyByCertificate","getCertificateInfo","CERT_INFO_SERIAL_NUMBER","parseCertificate","ver","text","algo","keyAlgorithm","issuer","commonName","validNotBefore","validNotAfter","certIds","getCertificate","DATA_FORMAT_BASE64","detached","CMS","verify","base64","verifyCertificate","cmsEncrypt","cmsDecrypt"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,IARxB,CASmB,oBAATK,KAAuBA,KAAOC,MAAM,WAC9C,O,YCTA,SAGA,cAGA,QACA,oBAGA,YACA,IACA,KACA,YAUA,OANA,mCAGA,OAGA,UA0DA,OArDA,MAGA,MAGA,oBACA,UACA,2BAA2CC,YAAY,EAAMC,IAAKC,KAKlE,gBACA,gDACA,4CAAyDC,MAAO,WAEhE,sCAAkDA,OAAO,KAQzD,kBAEA,GADA,cACA,aACA,qDACA,0BAGA,GAFA,OACA,mCAA0CH,YAAY,EAAMG,MAAOA,IACnE,2DAAiH,OAAOA,EAAMC,IAAQC,KAAK,KAAMD,IACjJ,UAIA,gBACA,sBACA,WAA4B,OAAOT,EAAgB,SACnD,WAAkC,OAAOA,GAEzC,OADA,aACA,GAIA,kBAAuD,OAAOW,OAAOC,UAAUC,eAAeC,KAAKC,EAAQC,IAG3G,OAIA,U,kBClFA,IAAIC,EAAQ,EAAQ,GAAR,CAAqB,OAC7BC,EAAM,EAAQ,IACdC,EAAS,EAAQ,GAAaA,OAC9BC,EAA8B,mBAAVD,GAETnB,EAAOD,QAAU,SAAUsB,GACxC,OAAOJ,EAAMI,KAAUJ,EAAMI,GAC3BD,GAAcD,EAAOE,KAAUD,EAAaD,EAASD,GAAK,UAAYG,MAGjEJ,MAAQ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yE,WAAWxE,EAAU,GAAI,CAACnQ,GAAOrD,EAAY,CACjE8X,QAAQ,OAER50C,KAAK,MAAM,SAAAxK,GACX,IAAM+M,EAAMi1B,EAAShiC,GACrB,MAAM,IAAIsjC,MAAMv2B,OAUlBlP,KAAK6pC,YAAc,SAASJ,EAAYoV,GACvC,OAAO7B,EAAOqD,oBAAoBpD,EAAU4B,GAC3ClyC,MAAK,SAAAqyC,GAAK,OAAIhC,EAAO0E,WAAWzE,EAAU+B,EAAOvV,EAAY,CAC7D8X,QAAQ,OAER50C,KAAK,MAAM,SAAAxK,GACX,IAAM+M,EAAMi1B,EAAShiC,GACrB,MAAM,IAAIsjC,MAAMv2B,QCxenB","file":"ruscrypto.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"RusCryptoJS\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"RusCryptoJS\"] = factory();\n\telse\n\t\troot[\"RusCryptoJS\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 84);\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","var core = module.exports = { version: '2.6.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = false;\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","module.exports = {};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","'use strict';\n\nvar anObject = require('./_an-object');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar toInteger = require('./_to-integer');\nvar advanceStringIndex = require('./_advance-string-index');\nvar regExpExec = require('./_regexp-exec-abstract');\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","'use strict';\n\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar advanceStringIndex = require('./_advance-string-index');\nvar regExpExec = require('./_regexp-exec-abstract');\n\n// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative($match, regexp, this);\n if (res.done) return res.value;\n var rx = anObject(regexp);\n var S = String(this);\n if (!rx.global) return regExpExec(rx, S);\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar userAgent = require('./_user-agent');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function')\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // may throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n if (domain && !exited) domain.exit();\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n","var rutoken=function(n){function t(n){return!!(n&&n.call&&n.apply)}function e(n,e){return t(n[e])?function(){return n[e].apply(n,arguments)}:n[e]}function r(n){return function(){return n}}function i(){n.ready=Promise.resolve(!0),n.isExtensionInstalled=r(Promise.resolve(!1)),n.isPluginInstalled=r(Promise.resolve(!0)),n.loadPlugin=l,window.rutokenLoaded=s}function o(){var t=y.initialize().then(function(){return y.isPluginInstalled()}).then(function(t){return n.isExtensionInstalled=r(Promise.resolve(!0)),n.isPluginInstalled=e(y,\"isPluginInstalled\"),t&&(m=\"application/x-rutoken-plugin\",n.loadPlugin=a),!0});n.ready=t}function u(){n.ready=Promise.resolve(!0),n.isExtensionInstalled=r(Promise.resolve(!1)),n.isPluginInstalled=r(Promise.resolve(!1))}function l(){var n=document.createElement(\"object\");n.style.setProperty(\"visibility\",\"hidden\",\"important\"),n.style.setProperty(\"width\",\"0px\",\"important\"),n.style.setProperty(\"height\",\"0px\",\"important\"),n.style.setProperty(\"margin\",\"0px\",\"important\"),n.style.setProperty(\"padding\",\"0px\",\"important\"),n.style.setProperty(\"border-style\",\"none\",\"important\"),n.style.setProperty(\"border-width\",\"0px\",\"important\"),n.style.setProperty(\"max-width\",\"0px\",\"important\"),n.style.setProperty(\"max-height\",\"0px\",\"important\"),n.innerHTML=\"\",n.setAttribute(\"type\",m),document.body.appendChild(n);var t=new Promise(function(n,t){h.push(n)});return t}function a(){return y.loadPlugin().then(function(n){return c(n)}).then(function(n){return n.wrapWithOldInterface=p,n})}function s(n,t){d(n).then(function(n){if(0==h.length)throw\"Internal error\";var t=h.shift();t(n)})}function c(n){var r={},i=[];for(var o in n)!function(o){t(n[o].then)?i.push(n[o].then(function(i){return c(i).then(function(i){t(i)?r[o]=e(n,o):r[o]=i})})):r[o]=n[o]}(o);return 0==i.length?new Promise(function(t){t(n)}):Promise.all(i).then(function(){return r})}function p(){var n={};for(var e in this)t(this[e])?n[e]=function(n,t){return function(){var e=arguments[arguments.length-2],r=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0,-2);return t.apply(n,i).then(function(n){e(n)},function(n){r(n.message)})}}(this,this[e]):n[e]=this[e];return new Promise(function(t){t(n)})}function f(){var n={originalObject:this.originalObject};for(var t in this.originalObject)n[t]=e(this.originalObject,t);return new Promise(function(t){t(n)})}function d(n){var e={originalObject:n,wrapWithOldInterface:f};for(var r in n)t(n[r])?e[r]=function(n,t){return function(){var e=Array.prototype.slice.call(arguments);return new Promise(function(r,i){e.push(r,i),t.apply(n,e)})}}(n,n[r]):e[r]=n[r];return new Promise(function(n){n(e)})}var h=[],m=\"application/x-rutoken-pki\",y=window[\"C3B7563B-BF85-45B7-88FC-7CFF1BD3C2DB\"];if(y)o();else if(navigator.mimeTypes&&navigator.mimeTypes[m])i();else try{new ActiveXObject(\"Aktiv.CryptoPlugin\");i()}catch(P){u()}return n}(rutoken||{});\"undefined\"!=typeof module&&(module.exports=rutoken);","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","exports.f = {}.propertyIsEnumerable;\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","'use strict';\nvar at = require('./_string-at')(true);\n\n // `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? at(S, index).length : 1);\n};\n","'use strict';\n\nvar classof = require('./_classof');\nvar builtinExec = RegExp.prototype.exec;\n\n // `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw new TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n if (classof(R) !== 'RegExp') {\n throw new TypeError('RegExp#exec called on incompatible receiver');\n }\n return builtinExec.call(R, S);\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n","'use strict';\nrequire('./es6.regexp.exec');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\nvar regexpExec = require('./_regexp-exec');\n\nvar SPECIES = wks('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {\n // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length === 2 && result[0] === 'a' && result[1] === 'b';\n})();\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n re.exec = function () { execCalled = true; return null; };\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n }\n re[SYMBOL]('');\n return !execCalled;\n }) : undefined;\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var fns = exec(\n defined,\n SYMBOL,\n ''[KEY],\n function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }\n );\n var strfn = fns[0];\n var rxfn = fns[1];\n\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n","'use strict';\n\nvar regexpFlags = require('./_flags');\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar LAST_INDEX = 'lastIndex';\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/,\n re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;\n})();\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', regexpFlags.call(re));\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];\n\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n // eslint-disable-next-line no-loop-func\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","require('./_typed-array')('Uint8', 1, function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","exports.f = Object.getOwnPropertySymbols;\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","var global = require('./_global');\nvar inheritIfRequired = require('./_inherit-if-required');\nvar dP = require('./_object-dp').f;\nvar gOPN = require('./_object-gopn').f;\nvar isRegExp = require('./_is-regexp');\nvar $flags = require('./_flags');\nvar $RegExp = global.RegExp;\nvar Base = $RegExp;\nvar proto = $RegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n// \"new\" creates a new object, old webkit buggy here\nvar CORRECT_NEW = new $RegExp(re1) !== re1;\n\nif (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () {\n re2[require('./_wks')('match')] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';\n}))) {\n $RegExp = function RegExp(p, f) {\n var tiRE = this instanceof $RegExp;\n var piRE = isRegExp(p);\n var fiU = f === undefined;\n return !tiRE && piRE && p.constructor === $RegExp && fiU ? p\n : inheritIfRequired(CORRECT_NEW\n ? new Base(piRE && !fiU ? p.source : p, f)\n : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)\n , tiRE ? this : proto, $RegExp);\n };\n var proxy = function (key) {\n key in $RegExp || dP($RegExp, key, {\n configurable: true,\n get: function () { return Base[key]; },\n set: function (it) { Base[key] = it; }\n });\n };\n for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);\n proto.constructor = $RegExp;\n $RegExp.prototype = proto;\n require('./_redefine')(global, 'RegExp', $RegExp);\n}\n\nrequire('./_set-species')('RegExp');\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar uid = require('./_uid');\nvar TYPED = uid('typed_array');\nvar VIEW = uid('view');\nvar ABV = !!(global.ArrayBuffer && global.DataView);\nvar CONSTR = ABV;\nvar i = 0;\nvar l = 9;\nvar Typed;\n\nvar TypedArrayConstructors = (\n 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'\n).split(',');\n\nwhile (i < l) {\n if (Typed = global[TypedArrayConstructors[i++]]) {\n hide(Typed.prototype, TYPED, true);\n hide(Typed.prototype, VIEW, true);\n } else CONSTR = false;\n}\n\nmodule.exports = {\n ABV: ABV,\n CONSTR: CONSTR,\n TYPED: TYPED,\n VIEW: VIEW\n};\n","// https://tc39.github.io/ecma262/#sec-toindex\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length!');\n return length;\n};\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n","'use strict';\nvar ctx = require('./_ctx');\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar toLength = require('./_to-length');\nvar createProperty = require('./_create-property');\nvar getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n","require('./_wks-define')('asyncIterator');\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","exports.f = require('./_wks');\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\nvar regexpExec = require('./_regexp-exec');\nrequire('./_export')({\n target: 'RegExp',\n proto: true,\n forced: regexpExec !== /./.exec\n}, {\n exec: regexpExec\n});\n","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","'use strict';\nif (require('./_descriptors')) {\n var LIBRARY = require('./_library');\n var global = require('./_global');\n var fails = require('./_fails');\n var $export = require('./_export');\n var $typed = require('./_typed');\n var $buffer = require('./_typed-buffer');\n var ctx = require('./_ctx');\n var anInstance = require('./_an-instance');\n var propertyDesc = require('./_property-desc');\n var hide = require('./_hide');\n var redefineAll = require('./_redefine-all');\n var toInteger = require('./_to-integer');\n var toLength = require('./_to-length');\n var toIndex = require('./_to-index');\n var toAbsoluteIndex = require('./_to-absolute-index');\n var toPrimitive = require('./_to-primitive');\n var has = require('./_has');\n var classof = require('./_classof');\n var isObject = require('./_is-object');\n var toObject = require('./_to-object');\n var isArrayIter = require('./_is-array-iter');\n var create = require('./_object-create');\n var getPrototypeOf = require('./_object-gpo');\n var gOPN = require('./_object-gopn').f;\n var getIterFn = require('./core.get-iterator-method');\n var uid = require('./_uid');\n var wks = require('./_wks');\n var createArrayMethod = require('./_array-methods');\n var createArrayIncludes = require('./_array-includes');\n var speciesConstructor = require('./_species-constructor');\n var ArrayIterators = require('./es6.array.iterator');\n var Iterators = require('./_iterators');\n var $iterDetect = require('./_iter-detect');\n var setSpecies = require('./_set-species');\n var arrayFill = require('./_array-fill');\n var arrayCopyWithin = require('./_array-copy-within');\n var $DP = require('./_object-dp');\n var $GOPD = require('./_object-gopd');\n var dP = $DP.f;\n var gOPD = $GOPD.f;\n var RangeError = global.RangeError;\n var TypeError = global.TypeError;\n var Uint8Array = global.Uint8Array;\n var ARRAY_BUFFER = 'ArrayBuffer';\n var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;\n var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\n var PROTOTYPE = 'prototype';\n var ArrayProto = Array[PROTOTYPE];\n var $ArrayBuffer = $buffer.ArrayBuffer;\n var $DataView = $buffer.DataView;\n var arrayForEach = createArrayMethod(0);\n var arrayFilter = createArrayMethod(2);\n var arraySome = createArrayMethod(3);\n var arrayEvery = createArrayMethod(4);\n var arrayFind = createArrayMethod(5);\n var arrayFindIndex = createArrayMethod(6);\n var arrayIncludes = createArrayIncludes(true);\n var arrayIndexOf = createArrayIncludes(false);\n var arrayValues = ArrayIterators.values;\n var arrayKeys = ArrayIterators.keys;\n var arrayEntries = ArrayIterators.entries;\n var arrayLastIndexOf = ArrayProto.lastIndexOf;\n var arrayReduce = ArrayProto.reduce;\n var arrayReduceRight = ArrayProto.reduceRight;\n var arrayJoin = ArrayProto.join;\n var arraySort = ArrayProto.sort;\n var arraySlice = ArrayProto.slice;\n var arrayToString = ArrayProto.toString;\n var arrayToLocaleString = ArrayProto.toLocaleString;\n var ITERATOR = wks('iterator');\n var TAG = wks('toStringTag');\n var TYPED_CONSTRUCTOR = uid('typed_constructor');\n var DEF_CONSTRUCTOR = uid('def_constructor');\n var ALL_CONSTRUCTORS = $typed.CONSTR;\n var TYPED_ARRAY = $typed.TYPED;\n var VIEW = $typed.VIEW;\n var WRONG_LENGTH = 'Wrong length!';\n\n var $map = createArrayMethod(1, function (O, length) {\n return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);\n });\n\n var LITTLE_ENDIAN = fails(function () {\n // eslint-disable-next-line no-undef\n return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;\n });\n\n var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {\n new Uint8Array(1).set({});\n });\n\n var toOffset = function (it, BYTES) {\n var offset = toInteger(it);\n if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');\n return offset;\n };\n\n var validate = function (it) {\n if (isObject(it) && TYPED_ARRAY in it) return it;\n throw TypeError(it + ' is not a typed array!');\n };\n\n var allocate = function (C, length) {\n if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {\n throw TypeError('It is not a typed array constructor!');\n } return new C(length);\n };\n\n var speciesFromList = function (O, list) {\n return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);\n };\n\n var fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = allocate(C, length);\n while (length > index) result[index] = list[index++];\n return result;\n };\n\n var addGetter = function (it, key, internal) {\n dP(it, key, { get: function () { return this._d[internal]; } });\n };\n\n var $from = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iterFn = getIterFn(O);\n var i, length, values, result, step, iterator;\n if (iterFn != undefined && !isArrayIter(iterFn)) {\n for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {\n values.push(step.value);\n } O = values;\n }\n if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);\n for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n };\n\n var $of = function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = allocate(this, length);\n while (length > index) result[index] = arguments[index++];\n return result;\n };\n\n // iOS Safari 6.x fails here\n var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });\n\n var $toLocaleString = function toLocaleString() {\n return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);\n };\n\n var proto = {\n copyWithin: function copyWithin(target, start /* , end */) {\n return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n },\n every: function every(callbackfn /* , thisArg */) {\n return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars\n return arrayFill.apply(validate(this), arguments);\n },\n filter: function filter(callbackfn /* , thisArg */) {\n return speciesFromList(this, arrayFilter(validate(this), callbackfn,\n arguments.length > 1 ? arguments[1] : undefined));\n },\n find: function find(predicate /* , thisArg */) {\n return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n findIndex: function findIndex(predicate /* , thisArg */) {\n return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n forEach: function forEach(callbackfn /* , thisArg */) {\n arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n indexOf: function indexOf(searchElement /* , fromIndex */) {\n return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n includes: function includes(searchElement /* , fromIndex */) {\n return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n join: function join(separator) { // eslint-disable-line no-unused-vars\n return arrayJoin.apply(validate(this), arguments);\n },\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars\n return arrayLastIndexOf.apply(validate(this), arguments);\n },\n map: function map(mapfn /* , thisArg */) {\n return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduce.apply(validate(this), arguments);\n },\n reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduceRight.apply(validate(this), arguments);\n },\n reverse: function reverse() {\n var that = this;\n var length = validate(that).length;\n var middle = Math.floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n },\n some: function some(callbackfn /* , thisArg */) {\n return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n sort: function sort(comparefn) {\n return arraySort.call(validate(this), comparefn);\n },\n subarray: function subarray(begin, end) {\n var O = validate(this);\n var length = O.length;\n var $begin = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(\n O.buffer,\n O.byteOffset + $begin * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)\n );\n }\n };\n\n var $slice = function slice(start, end) {\n return speciesFromList(this, arraySlice.call(validate(this), start, end));\n };\n\n var $set = function set(arrayLike /* , offset */) {\n validate(this);\n var offset = toOffset(arguments[1], 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError(WRONG_LENGTH);\n while (index < len) this[offset + index] = src[index++];\n };\n\n var $iterators = {\n entries: function entries() {\n return arrayEntries.call(validate(this));\n },\n keys: function keys() {\n return arrayKeys.call(validate(this));\n },\n values: function values() {\n return arrayValues.call(validate(this));\n }\n };\n\n var isTAIndex = function (target, key) {\n return isObject(target)\n && target[TYPED_ARRAY]\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n };\n var $getDesc = function getOwnPropertyDescriptor(target, key) {\n return isTAIndex(target, key = toPrimitive(key, true))\n ? propertyDesc(2, target[key])\n : gOPD(target, key);\n };\n var $setDesc = function defineProperty(target, key, desc) {\n if (isTAIndex(target, key = toPrimitive(key, true))\n && isObject(desc)\n && has(desc, 'value')\n && !has(desc, 'get')\n && !has(desc, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !desc.configurable\n && (!has(desc, 'writable') || desc.writable)\n && (!has(desc, 'enumerable') || desc.enumerable)\n ) {\n target[key] = desc.value;\n return target;\n } return dP(target, key, desc);\n };\n\n if (!ALL_CONSTRUCTORS) {\n $GOPD.f = $getDesc;\n $DP.f = $setDesc;\n }\n\n $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {\n getOwnPropertyDescriptor: $getDesc,\n defineProperty: $setDesc\n });\n\n if (fails(function () { arrayToString.call({}); })) {\n arrayToString = arrayToLocaleString = function toString() {\n return arrayJoin.call(this);\n };\n }\n\n var $TypedArrayPrototype$ = redefineAll({}, proto);\n redefineAll($TypedArrayPrototype$, $iterators);\n hide($TypedArrayPrototype$, ITERATOR, $iterators.values);\n redefineAll($TypedArrayPrototype$, {\n slice: $slice,\n set: $set,\n constructor: function () { /* noop */ },\n toString: arrayToString,\n toLocaleString: $toLocaleString\n });\n addGetter($TypedArrayPrototype$, 'buffer', 'b');\n addGetter($TypedArrayPrototype$, 'byteOffset', 'o');\n addGetter($TypedArrayPrototype$, 'byteLength', 'l');\n addGetter($TypedArrayPrototype$, 'length', 'e');\n dP($TypedArrayPrototype$, TAG, {\n get: function () { return this[TYPED_ARRAY]; }\n });\n\n // eslint-disable-next-line max-statements\n module.exports = function (KEY, BYTES, wrapper, CLAMPED) {\n CLAMPED = !!CLAMPED;\n var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + KEY;\n var SETTER = 'set' + KEY;\n var TypedArray = global[NAME];\n var Base = TypedArray || {};\n var TAC = TypedArray && getPrototypeOf(TypedArray);\n var FORCED = !TypedArray || !$typed.ABV;\n var O = {};\n var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];\n var getter = function (that, index) {\n var data = that._d;\n return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);\n };\n var setter = function (that, index, value) {\n var data = that._d;\n if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;\n data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);\n };\n var addElement = function (that, index) {\n dP(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n if (FORCED) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME, '_d');\n var index = 0;\n var offset = 0;\n var buffer, byteLength, length, klass;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new $ArrayBuffer(byteLength);\n } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n buffer = data;\n offset = toOffset($offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - offset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (TYPED_ARRAY in data) {\n return fromList(TypedArray, data);\n } else {\n return $from.call(TypedArray, data);\n }\n hide(that, '_d', {\n b: buffer,\n o: offset,\n l: byteLength,\n e: length,\n v: new $DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);\n hide(TypedArrayPrototype, 'constructor', TypedArray);\n } else if (!fails(function () {\n TypedArray(1);\n }) || !fails(function () {\n new TypedArray(-1); // eslint-disable-line no-new\n }) || !$iterDetect(function (iter) {\n new TypedArray(); // eslint-disable-line no-new\n new TypedArray(null); // eslint-disable-line no-new\n new TypedArray(1.5); // eslint-disable-line no-new\n new TypedArray(iter); // eslint-disable-line no-new\n }, true)) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME);\n var klass;\n // `ws` module bug, temporarily remove validation length for Uint8Array\n // https://github.com/websockets/ws/pull/645\n if (!isObject(data)) return new Base(toIndex(data));\n if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n return $length !== undefined\n ? new Base(data, toOffset($offset, BYTES), $length)\n : $offset !== undefined\n ? new Base(data, toOffset($offset, BYTES))\n : new Base(data);\n }\n if (TYPED_ARRAY in data) return fromList(TypedArray, data);\n return $from.call(TypedArray, data);\n });\n arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {\n if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);\n });\n TypedArray[PROTOTYPE] = TypedArrayPrototype;\n if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;\n }\n var $nativeIterator = TypedArrayPrototype[ITERATOR];\n var CORRECT_ITER_NAME = !!$nativeIterator\n && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);\n var $iterator = $iterators.values;\n hide(TypedArray, TYPED_CONSTRUCTOR, true);\n hide(TypedArrayPrototype, TYPED_ARRAY, NAME);\n hide(TypedArrayPrototype, VIEW, true);\n hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);\n\n if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {\n dP(TypedArrayPrototype, TAG, {\n get: function () { return NAME; }\n });\n }\n\n O[NAME] = TypedArray;\n\n $export($export.G + $export.W + $export.F * (TypedArray != Base), O);\n\n $export($export.S, NAME, {\n BYTES_PER_ELEMENT: BYTES\n });\n\n $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {\n from: $from,\n of: $of\n });\n\n if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);\n\n $export($export.P, NAME, proto);\n\n setSpecies(NAME);\n\n $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });\n\n $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);\n\n if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;\n\n $export($export.P + $export.F * fails(function () {\n new TypedArray(1).slice();\n }), NAME, { slice: $slice });\n\n $export($export.P + $export.F * (fails(function () {\n return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();\n }) || !fails(function () {\n TypedArrayPrototype.toLocaleString.call([1, 2]);\n })), NAME, { toLocaleString: $toLocaleString });\n\n Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;\n if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);\n };\n} else module.exports = function () { /* empty */ };\n","'use strict';\nvar global = require('./_global');\nvar DESCRIPTORS = require('./_descriptors');\nvar LIBRARY = require('./_library');\nvar $typed = require('./_typed');\nvar hide = require('./_hide');\nvar redefineAll = require('./_redefine-all');\nvar fails = require('./_fails');\nvar anInstance = require('./_an-instance');\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nvar toIndex = require('./_to-index');\nvar gOPN = require('./_object-gopn').f;\nvar dP = require('./_object-dp').f;\nvar arrayFill = require('./_array-fill');\nvar setToStringTag = require('./_set-to-string-tag');\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length!';\nvar WRONG_INDEX = 'Wrong index!';\nvar $ArrayBuffer = global[ARRAY_BUFFER];\nvar $DataView = global[DATA_VIEW];\nvar Math = global.Math;\nvar RangeError = global.RangeError;\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = global.Infinity;\nvar BaseBuffer = $ArrayBuffer;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\nvar BUFFER = 'buffer';\nvar BYTE_LENGTH = 'byteLength';\nvar BYTE_OFFSET = 'byteOffset';\nvar $BUFFER = DESCRIPTORS ? '_b' : BUFFER;\nvar $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;\nvar $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;\n\n// IEEE754 conversions based on https://github.com/feross/ieee754\nfunction packIEEE754(value, mLen, nBytes) {\n var buffer = new Array(nBytes);\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var i = 0;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n var e, m, c;\n value = abs(value);\n // eslint-disable-next-line no-self-compare\n if (value != value || value === Infinity) {\n // eslint-disable-next-line no-self-compare\n m = value != value ? 1 : 0;\n e = eMax;\n } else {\n e = floor(log(value) / LN2);\n if (value * (c = pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * pow(2, eBias - 1) * pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);\n buffer[--i] |= s * 128;\n return buffer;\n}\nfunction unpackIEEE754(buffer, mLen, nBytes) {\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = eLen - 7;\n var i = nBytes - 1;\n var s = buffer[i--];\n var e = s & 127;\n var m;\n s >>= 7;\n for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : s ? -Infinity : Infinity;\n } else {\n m = m + pow(2, mLen);\n e = e - eBias;\n } return (s ? -1 : 1) * m * pow(2, e - mLen);\n}\n\nfunction unpackI32(bytes) {\n return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];\n}\nfunction packI8(it) {\n return [it & 0xff];\n}\nfunction packI16(it) {\n return [it & 0xff, it >> 8 & 0xff];\n}\nfunction packI32(it) {\n return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];\n}\nfunction packF64(it) {\n return packIEEE754(it, 52, 8);\n}\nfunction packF32(it) {\n return packIEEE754(it, 23, 4);\n}\n\nfunction addGetter(C, key, internal) {\n dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });\n}\n\nfunction get(view, bytes, index, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = store.slice(start, start + bytes);\n return isLittleEndian ? pack : pack.reverse();\n}\nfunction set(view, bytes, index, conversion, value, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = conversion(+value);\n for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];\n}\n\nif (!$typed.ABV) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n this._b = arrayFill.call(new Array(byteLength), 0);\n this[$LENGTH] = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = buffer[$LENGTH];\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n this[$BUFFER] = buffer;\n this[$OFFSET] = offset;\n this[$LENGTH] = byteLength;\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, BYTE_LENGTH, '_l');\n addGetter($DataView, BUFFER, '_b');\n addGetter($DataView, BYTE_LENGTH, '_l');\n addGetter($DataView, BYTE_OFFSET, '_o');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1]));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packF32, value, arguments[2]);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packF64, value, arguments[2]);\n }\n });\n} else {\n if (!fails(function () {\n $ArrayBuffer(1);\n }) || !fails(function () {\n new $ArrayBuffer(-1); // eslint-disable-line no-new\n }) || fails(function () {\n new $ArrayBuffer(); // eslint-disable-line no-new\n new $ArrayBuffer(1.5); // eslint-disable-line no-new\n new $ArrayBuffer(NaN); // eslint-disable-line no-new\n return $ArrayBuffer.name != ARRAY_BUFFER;\n })) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new BaseBuffer(toIndex(length));\n };\n var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];\n for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);\n }\n if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;\n }\n // iOS Safari 7.x bug\n var view = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataView[PROTOTYPE].setInt8;\n view.setInt8(0, 2147483648);\n view.setInt8(1, 2147483649);\n if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, true);\n}\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\nhide($DataView[PROTOTYPE], $typed.VIEW, true);\nexports[ARRAY_BUFFER] = $ArrayBuffer;\nexports[DATA_VIEW] = $DataView;\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\n\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n var promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var global = require('./_global');\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","'use strict';\n\nvar isRegExp = require('./_is-regexp');\nvar anObject = require('./_an-object');\nvar speciesConstructor = require('./_species-constructor');\nvar advanceStringIndex = require('./_advance-string-index');\nvar toLength = require('./_to-length');\nvar callRegExpExec = require('./_regexp-exec-abstract');\nvar regexpExec = require('./_regexp-exec');\nvar fails = require('./_fails');\nvar $min = Math.min;\nvar $push = [].push;\nvar $SPLIT = 'split';\nvar LENGTH = 'length';\nvar LAST_INDEX = 'lastIndex';\nvar MAX_UINT32 = 0xffffffff;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return $split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy[LAST_INDEX];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);\n };\n } else {\n internalSplit = $split;\n }\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = defined(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n});\n","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","'use strict';\nvar $defineProperty = require('./_object-dp');\nvar createDesc = require('./_property-desc');\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n",";(function () {\n //already loaded\n if(window.cadesplugin)\n return;\n\n var pluginObject;\n var plugin_resolved = 0;\n var plugin_reject;\n var plugin_resolve;\n var isOpera = 0;\n var isFireFox = 0;\n var isSafari = 0;\n var isYandex = 0;\n var canPromise = !!window.Promise;\n var cadesplugin;\n\n if(canPromise)\n {\n cadesplugin = new Promise(function(resolve, reject)\n {\n plugin_resolve = resolve;\n plugin_reject = reject;\n });\n } else\n {\n cadesplugin = {};\n }\n\n function check_browser() {\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n if(/trident/i.test(M[1])){\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n return { name:'IE', version:(tem[1] || '')};\n }\n if(M[1] === 'Chrome'){\n tem = ua.match(/\\b(OPR|Edg|YaBrowser)\\/(\\d+)/);\n if (tem != null)\n return { name: tem[1].replace('OPR', 'Opera'), version: tem[2] };\n }\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null)\n M.splice(1, 1, tem[1]);\n return {name:M[0],version:M[1]};\n }\n var browserSpecs = check_browser();\n\n function cpcsp_console_log(level, msg){\n //IE9 не может писать в консоль если не открыта вкладка developer tools\n if(typeof(console) === 'undefined')\n return;\n if (level <= cadesplugin.current_log_level ){\n if (level === cadesplugin.LOG_LEVEL_DEBUG)\n console.log(\"DEBUG: %s\", msg);\n if (level === cadesplugin.LOG_LEVEL_INFO)\n console.info(\"INFO: %s\", msg);\n if (level === cadesplugin.LOG_LEVEL_ERROR)\n console.error(\"ERROR: %s\", msg);\n return;\n }\n }\n\n function set_log_level(level){\n if (!((level === cadesplugin.LOG_LEVEL_DEBUG) ||\n (level === cadesplugin.LOG_LEVEL_INFO) ||\n (level === cadesplugin.LOG_LEVEL_ERROR))){\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\n return;\n }\n cadesplugin.current_log_level = level;\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\n if(isNativeMessageSupported())\n {\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\n window.postMessage(\"set_log_level=debug\", \"*\");\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\n window.postMessage(\"set_log_level=info\", \"*\");\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\n window.postMessage(\"set_log_level=error\", \"*\");\n }\n }\n\n function set_constantValues()\n {\n cadesplugin.CAPICOM_MEMORY_STORE = 0;\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\n cadesplugin.CADESCOM_MEMORY_STORE = 0;\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\n\n cadesplugin.CAPICOM_MY_STORE = \"My\";\n\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\n\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\n\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\n \n cadesplugin.CADESCOM_XADES_DEFAULT = 0x00000010;\n cadesplugin.CADESCOM_XADES_BES = 0x00000020;\n cadesplugin.CADESCOM_XADES_T = 0x00000050;\n cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1 = 0x000005d0;\n cadesplugin.CADESCOM_XMLDSIG_TYPE = 0x00000000;\n\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\n \n cadesplugin.XmlDsigGost3411Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256\";\n cadesplugin.XmlDsigGost3410Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256\";\n cadesplugin.XmlDsigGost3411Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512\";\n cadesplugin.XmlDsigGost3410Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512\";\n\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\n cadesplugin.CADESCOM_CADES_BES = 1;\n cadesplugin.CADESCOM_CADES_T = 0x5;\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\n cadesplugin.CADESCOM_PKCS7_TYPE = 0xffff;\n\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\n\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\n\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\n\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\n\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\n\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\n\n cadesplugin.CAPICOM_OID_OTHER = 0;\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\n\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\n cadesplugin.CAPICOM_EKU_OTHER = 0;\n\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\n\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\n\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\n\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\n\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\n\n cadesplugin.LOG_LEVEL_DEBUG = 4;\n cadesplugin.LOG_LEVEL_INFO = 2;\n cadesplugin.LOG_LEVEL_ERROR = 1;\n\n cadesplugin.CADESCOM_AllowNone = 0;\n cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1;\n cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2;\n cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4;\n cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000;\n\n cadesplugin.ENABLE_CARRIER_TYPE_CSP = 0x01;\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM = 0x02;\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM = 0x04;\n cadesplugin.ENABLE_ANY_CARRIER_TYPE = 0x07;\n\n cadesplugin.DISABLE_EVERY_CARRIER_OPERATION = 0x00;\n cadesplugin.ENABLE_CARRIER_OPEN_ENUM = 0x01;\n cadesplugin.ENABLE_CARRIER_CREATE = 0x02;\n cadesplugin.ENABLE_ANY_OPERATION = 0x03;\n\n cadesplugin.CADESCOM_PRODUCT_CSP = 0;\n cadesplugin.CADESCOM_PRODUCT_OCSP = 1;\n cadesplugin.CADESCOM_PRODUCT_TSP = 2;\n\n cadesplugin.MEDIA_TYPE_REGISTRY = 0x00000001;\n cadesplugin.MEDIA_TYPE_HDIMAGE = 0x00000002;\n cadesplugin.MEDIA_TYPE_CLOUD = 0x00000004;\n cadesplugin.MEDIA_TYPE_SCARD = 0x00000008;\n }\n\n function async_spawn(generatorFunc) {\n function continuer(verb, arg) {\n var result;\n try {\n result = generator[verb](arg);\n } catch (err) {\n return Promise.reject(err);\n }\n if (result.done) {\n return result.value;\n } else {\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\n }\n }\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\n var onFulfilled = continuer.bind(continuer, \"next\");\n var onRejected = continuer.bind(continuer, \"throw\");\n return onFulfilled();\n }\n\n function isIE() {\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\n return (browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE');\n }\n\n function isIOS() {\n return (navigator.userAgent.match(/ipod/i) ||\n navigator.userAgent.match(/ipad/i) ||\n navigator.userAgent.match(/iphone/i));\n }\n\n function isNativeMessageSupported()\n {\n // В IE работаем через NPAPI\n if(isIE())\n return false;\n // В Edge работаем через NativeMessage\n if (browserSpecs.name === 'Edg') {\n return true;\n }\n if (browserSpecs.name === 'YaBrowser') {\n isYandex = true;\n return true;\n }\n // В Chrome, Firefox, Safari и Opera работаем через асинхронную версию в зависимости от версии\n if(browserSpecs.name === 'Opera') {\n isOpera = true;\n if(browserSpecs.version >= 33){\n return true;\n }\n else{\n return false;\n }\n }\n if(browserSpecs.name === 'Firefox') {\n isFireFox = true;\n if(browserSpecs.version >= 52){\n return true;\n }\n else{\n return false;\n }\n }\n if(browserSpecs.name === 'Chrome') {\n if(browserSpecs.version >= 42){\n return true;\n }\n else{\n return false;\n }\n }\n //В Сафари начиная с 12 версии нет NPAPI\n if(browserSpecs.name === 'Safari') {\n isSafari = true;\n if(browserSpecs.version >= 12) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\n function CreateObject(name) {\n if (isIOS()) {\n // На iOS для создания объектов используется функция\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\n }\n if (isIE()) {\n // В Internet Explorer создаются COM-объекты\n if (name.match(/X509Enrollment/i)) {\n try {\n // Объекты CertEnroll пробуем создавать через нашу фабрику,\n // если не получилось то через CX509EnrollmentWebClassFactory\n var objCertEnrollClassFactory = document.getElementById(\"webClassFactory\");\n return objCertEnrollClassFactory.CreateObject(name);\n }\n catch (e) {\n try {\n var objWebClassFactory = document.getElementById(\"certEnrollClassFactory\");\n return objWebClassFactory.CreateObject(name);\n }\n catch (err) {\n throw (\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\n }\n }\n }\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\n try {\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\n return objWebClassFactory.CreateObject(name);\n }\n catch (e) {\n // Для версий плагина ниже 2.0.12538\n return new ActiveXObject(name);\n }\n }\n // создаются объекты NPAPI\n return pluginObject.CreateObject(name);\n }\n\n function decimalToHexString(number) {\n if (number < 0) {\n number = 0xFFFFFFFF + number + 1;\n }\n\n return number.toString(16).toUpperCase();\n }\n\n function GetMessageFromException(e) {\n var err = e.message;\n if (!err) {\n err = e;\n } else if (e.number) {\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\n }\n return err;\n }\n\n function getLastError(exception) {\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\n return GetMessageFromException(exception);\n }\n\n try {\n return pluginObject.getLastError();\n } catch(e) {\n return GetMessageFromException(exception);\n }\n }\n\n // Функция для удаления созданных объектов\n function ReleasePluginObjects() {\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\n }\n\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\n function CreateObjectAsync(name) {\n return pluginObject.CreateObjectAsync(name);\n }\n\n //Функции для IOS\n var ru_cryptopro_npcades_10_native_bridge = {\n callbacksCount : 1,\n callbacks : {},\n\n // Automatically called by native layer when a result is available\n resultForCallback : function resultForCallback(callbackId, resultArray) {\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\n if (!callback) return;\n callback.apply(null,resultArray);\n },\n\n // Use this in javascript to request native objective-c code\n // functionName : string (I think the name is explicit :p)\n // args : array of arguments\n // callback : function with n-arguments that is going to be called when the native code returned\n call : function call(functionName, args, callback) {\n var hasCallback = callback && typeof callback === \"function\";\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\n\n if (hasCallback)\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\n\n var iframe = document.createElement(\"IFRAME\");\n var arrObjs = new Array(\"_CPNP_handle\");\n try{\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\n } catch(e){\n alert(e);\n }\n document.documentElement.appendChild(iframe);\n iframe.parentNode.removeChild(iframe);\n iframe = null;\n }\n };\n\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\n var tmpobj;\n var ex;\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\n ex = e;\n var str='tmpobj='+response;\n eval(str);\n if (typeof (tmpobj) === \"string\"){\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\n }\n });\n if(ex)\n throw ex;\n return tmpobj;\n }\n\n function show_firefox_missing_extension_dialog()\n {\n if (!window.cadesplugin_skip_extension_install)\n {\n var ovr = document.createElement('div');\n ovr.id = \"cadesplugin_ovr\";\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\n ovr.innerHTML = \"\";\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n\n ovr.addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n ovr.style.visibility=\"visible\";\n }\n }\n function firefox_or_safari_nmcades_onload() {\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\n }\n\n function nmcades_api_onload () {\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\n window.addEventListener(\"message\", function (event){\n if (typeof(event.data) !== \"string\" || !event.data.match(\"cadesplugin_loaded\"))\n return;\n if(isFireFox || isSafari)\n {\n // Для Firefox, Сафари вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", url);\n fileref.onerror = plugin_loaded_error;\n fileref.onload = firefox_or_safari_nmcades_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n }else {\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\n }\n }, false);\n }\n\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge, Safari\n function load_extension()\n {\n if(isFireFox || isSafari){\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\n nmcades_api_onload();\n } else {\n // в асинхронном варианте для Yandex и Opera подключаем расширение из Opera store.\n if (isOpera || isYandex) {\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\n fileref.onerror = plugin_loaded_error;\n fileref.onload = nmcades_api_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n } else {\n // для Chrome, Chromium, Chromium Edge расширение из Chrome store\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\n fileref.onerror = plugin_loaded_error;\n fileref.onload = nmcades_api_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n }\n }\n }\n\n //Загружаем плагин для NPAPI\n function load_npapi_plugin()\n {\n var elem = document.createElement('object');\n elem.setAttribute(\"id\", \"cadesplugin_object\");\n elem.setAttribute(\"type\", \"application/x-cades\");\n elem.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\n pluginObject = document.getElementById(\"cadesplugin_object\");\n if(isIE())\n {\n var elem1 = document.createElement('object');\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\n elem1.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\n var elem2 = document.createElement('object');\n elem2.setAttribute(\"id\", \"webClassFactory\");\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\n elem2.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\n }\n }\n\n //Отправляем событие что все ок.\n function plugin_loaded()\n {\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_resolve();\n }else {\n window.postMessage(\"cadesplugin_loaded\", \"*\");\n }\n }\n\n //Отправляем событие что сломались.\n function plugin_loaded_error(msg)\n {\n if(typeof(msg) === 'undefined' || typeof(msg) === 'object')\n msg = \"Плагин недоступен\";\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_reject(msg);\n } else {\n window.postMessage(\"cadesplugin_load_error\", \"*\");\n }\n }\n\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\n function check_load_timeout()\n {\n if(plugin_resolved === 1)\n return;\n if(isFireFox)\n {\n show_firefox_missing_extension_dialog();\n }\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\n } else {\n window.postMessage(\"cadesplugin_load_error\", \"*\");\n }\n\n }\n\n //Вспомогательная функция для NPAPI\n function createPromise(arg)\n {\n return new Promise(arg);\n }\n\n function check_npapi_plugin (){\n try {\n var oAbout = CreateObject(\"CAdESCOM.About\");\n plugin_loaded();\n }\n catch (err) {\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\n // Объект создать не удалось, проверим, установлен ли\n // вообще плагин. Такая возможность есть не во всех браузерах\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\n if (mimetype) {\n var plugin = mimetype.enabledPlugin;\n if (plugin) {\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\n }else\n {\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\n }\n }else\n {\n plugin_loaded_error(\"Плагин недоступен\");\n }\n }\n }\n\n //Проверяем работает ли плагин\n function check_plugin_working()\n {\n var div = document.createElement(\"div\");\n div.innerHTML = \"\";\n var isIeLessThan9 = (div.getElementsByTagName(\"i\").length === 1);\n if (isIeLessThan9) {\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\n return;\n }\n\n if(isNativeMessageSupported())\n {\n load_extension();\n }else if(!canPromise) {\n window.addEventListener(\"message\", function (event){\n if (event.data !== \"cadesplugin_echo_request\")\n return;\n load_npapi_plugin();\n check_npapi_plugin();\n },\n false);\n }else\n {\n if(document.readyState === \"complete\"){\n load_npapi_plugin();\n check_npapi_plugin();\n } else {\n window.addEventListener(\"load\", function (event) {\n load_npapi_plugin();\n check_npapi_plugin();\n }, false);\n }\n }\n }\n\n function set_pluginObject(obj)\n {\n pluginObject = obj;\n }\n\n function is_capilite_enabled()\n {\n if ((typeof (cadesplugin.EnableInternalCSP) !== 'undefined') && cadesplugin.EnableInternalCSP)\n return true;\n return false;\n };\n\n //Export\n cadesplugin.JSModuleVersion = \"2.3.0\";\n cadesplugin.async_spawn = async_spawn;\n cadesplugin.set = set_pluginObject;\n cadesplugin.set_log_level = set_log_level;\n cadesplugin.getLastError = getLastError;\n cadesplugin.is_capilite_enabled = is_capilite_enabled;\n\n if(isNativeMessageSupported())\n {\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\n }\n\n if(!isNativeMessageSupported())\n {\n cadesplugin.CreateObject = CreateObject;\n }\n\n if(window.cadesplugin_load_timeout)\n {\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\n }\n else\n {\n setTimeout(check_load_timeout, 20000);\n }\n\n set_constantValues();\n\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\n window.cadesplugin = cadesplugin;\n check_plugin_working();\n}());\n","function DN(){};\n\nDN.prototype.toString = function(){\n\tvar ret = '';\n\tfor(var i in this) {\n if(this.hasOwnProperty(i)) {\n ret += i + '=\"' + this[i].replace(/\"/g, '') + '\", ';\n }\n }\n\treturn ret;\n};\n\nexport default DN;","export default {\n CKR_CANCEL: 'пользователь отказался от выполнения операции.',\n CKR_HOST_MEMORY: 'недостаточно памяти для выполнения функции.',\n CKR_SLOT_ID_INVALID: 'неправильный идентификатор слота.',\n CKR_GENERAL_ERROR: 'Критическая ошибка, связанная с аппаратным обеспечением; Неудачная попытка проверки пути сертификации.',\n CKR_FUNCTION_FAILED: 'при выполнении функции возник сбой.',\n CKR_ARGUMENTS_BAD: 'недопустимый аргумент.',\n CKR_ATTRIBUTE_READ_ONLY: 'предпринята попытка присвоения значения атрибуту, который нельзя изменять.',\n CKR_ATTRIBUTE_TYPE_INVALID: 'некорректный тип атрибута.',\n CKR_ATTRIBUTE_VALUE_INVALID: 'атрибут нулевой длины.',\n CKR_DEVICE_ERROR: 'ошибка при обращении к устройству или слоту.',\n CKR_DEVICE_MEMORY: 'для выполнения функции недостаточно памяти в устройстве.',\n CKR_FUNCTION_CANCELED: 'время ожидания выполнения функции истекло.',\n CKR_KEY_HANDLE_INVALID: 'функции передан некорректный дескриптор ключа.',\n CKR_KEY_SIZE_RANGE: 'недопустимый размер ключа.',\n CKR_KEY_TYPE_INCONSISTENT: 'данный тип ключа не может использоваться с данным механизмом.',\n CKR_MECHANISM_INVALID: 'при выполнении криптографической функции был указан неправильный механизм.',\n CKR_MECHANISM_PARAM_INVALID: 'при выполнении криптографической функции были заданы некорректные параметры механизма.',\n CKR_OBJECT_HANDLE_INVALID: 'функции передан некорректный дескриптор объекта.',\n CKR_OPERATION_ACTIVE: 'одна или несколько выполняющихся операций препятствуют выполнению новой операции.',\n CKR_OPERATION_NOT_INITIALIZED: 'выполнение операции без предварительного указания параметров невозможно.',\n CKR_PIN_INCORRECT: 'функции передан неверный PIN-код.',\n CKR_PIN_LEN_RANGE: 'недопустимая длина PIN-кода.',\n CKR_PIN_LOCKED: 'PIN-код заблокирован.',\n CKR_SESSION_HANDLE_INVALID: 'функции передан некорректный дескриптор сессии.',\n CKR_SESSION_PARALLEL_NOT_SUPPORTED: 'невозможно открыть параллельную сессию.',\n CKR_SESSION_EXISTS: 'уже открыта сессия работы с тем же устройством.',\n CKR_SESSION_READ_ONLY_EXISTS: 'сессия открыта только для чтения. Смена режима невозможна.',\n CKR_SESSION_READ_WRITE_SO_EXISTS: 'открыта сессия чтения/записи. Открыть сеанс только для чтения невозможно.',\n CKR_SIGNATURE_INVALID: 'неправильное значение электронной подписи.',\n CKR_TEMPLATE_INCOMPLETE: 'для создания объекта недостаточно атрибутов.',\n CKR_TOKEN_NOT_PRESENT: 'в момент выполнения функции устройство было отключено.',\n CKR_TOKEN_WRITE_PROTECTED: 'устройство недоступно для записи.',\n CKR_USER_ALREADY_LOGGED_IN: 'пользователь уже предъявил PIN-код.',\n CKR_USER_NOT_LOGGED_IN: 'функция не может быть выполнена в гостевом режиме работы устройства.',\n CKR_USER_PIN_NOT_INITIALIZED: 'начальное значение PIN-кода не установлено.',\n CKR_USER_TYPE_INVALID: 'функция не может быть выполнена в текущем режиме работы устройства.',\n CKR_USER_ANOTHER_ALREADY_LOGGED_IN: 'невозможно переключение из режима администратора в режим пользователя или обратно.',\n CKR_BUFFER_TOO_SMALL: 'размер заданного буфера является недостаточным для сохранения результатов функции.',\n CKR_INFORMATION_SENSITIVE: 'запрашиваемый объект недоступен для чтения.',\n CKR_CRYPTOKI_NOT_INITIALIZED: 'выполнение функции без инициализации Единой библиотеки PKCS#11 (библиотеки Cryptoki) невозможно.',\n CKR_CRYPTOKI_ALREADY_INITIALIZED: 'попытка повторно инициализировать библиотеку Cryptoki.',\n CKR_FUNCTION_REJECTED: 'пользователь отменил операцию.',\n NOT_STATE_TOKEN_BINDED: 'значение параметра state отличается от STATE_TOKEN_BINDED (1).',\n NOT_STATE_NOT_BINDED: 'значение параметра state отличается от STATE_TOKEN_BINDED (0).',\n IS_STATE_NOT_BINDED: 'параметр state принимает значение STATE_TOKEN_BINDED (0).',\n NOT_STATE_UNILATERAL_AUTHENTICATION_IN_PROGRESS: 'значение параметра state отличается от STATE_TOKEN_BINDED (4).',\n NOT_STATE_SECURE_CHANNEL_CONNECTION_IN_PROGRESS: 'значение параметра state отличается от STATE_TOKEN_BINDED (2).',\n NOT_STATE_SECURE_CHANNEL_ESTABLISHED: 'значение параметра state отличается от STATE_TOKEN_BINDED (3).',\n CERTIFICATE_NOT_FOUND: 'сертификат не обнаружен.',\n PUBLIC_KEY_NOT_FOUND: 'открытый ключ не обнаружен в памяти поддерживаемого устройства.',\n SERVER_PUBLIC_KEY_NOT_FOUND: 'не найден открытый ключ сервера.',\n INVALID_SERVER_PUBLIC_KEY: 'неверный открытый ключ сервера.',\n DATA_TO_SIGN_ZERO_LENGTH: 'на подпись были представлены данные, имеющие нулевую длину.',\n DATA_TO_VERIFY_ZERO_LENGTH: 'на проверку подписи были представлены данные, имеющие нулевую длину.',\n SIGNATURE_TO_VERIFY_ZERO_LENGTH: 'на проверку была представлена подпись, имеющая нулевую длину.',\n INVALID_EC_PARAMS: 'неверно заданы параметры криптографических преобразований по ГОСТ Р 34.10-2001.',\n TOKEN_MEMORY_TOO_SMALL: 'для выполнения операции в поддерживаемом устройстве недостаточно свободной памяти.',\n KEY_SIZE_NOT_64: 'длина ключа не равна 64 битам.',\n CERT_NOT_MATCH_PUBLIC_KEY: 'сертификат не соответствует открытому ключу.',\n FAILED_CHECK_BROWSER_VERS: 'ошибка проверки версии используемого браузера.',\n BROWSER_VERS_NOT_SUPPORTED: 'используемая версия браузера не поддерживается.',\n INVALID_USER_TYPE: 'неверно указан тип PIN-кода.',\n PINS_NOT_MATCH: 'введённые значения нового PIN-кода неодинаковы.',\n USER_CHANGE_ADMIN_PIN_NOT_STATE_NOT_BINDED: 'cмена PIN-кода администратора невозможна, поскольку значение параметра state отличается от STATE_TOKEN_BINDED (0).',\n SSL_ERR_GEN_SESSION_KEY: 'ошибка при генерации ключа защиты данных, передаваемых между клиентом и сервером.',\n SSL_ERR_GOST_ENGINE: 'ошибка средства защиты, программно выполняющего криптографические преобразования на стороне клиента.',\n SSL_ERR_SSL_NEW: 'ошибка в начале выполнения протокола Handshake.',\n SSL_ERR_CONNECT: 'ошибка при выполнении протокола Handshake.',\n SSL_ERR_SSL_WRITE: 'ошибка при подготовке данных к защищённой передаче.',\n SSL_ERR_SSL_READ: 'ошибка при чтении защищённых для передачи данных.',\n SSL_ERR_LOAD_CERT_AND_KEY_FROM_TOKEN: 'ошибка при попытке считать сертификат и открытый ключ из памяти поддерживаемого устройства.',\n SSL_ERR_GET_PEER_PUBLIC_KEY: 'ошибка при получении открытого ключа сервера.',\n CERT_PARS_ERR_GET_PUBLIC_KEY: 'не удалось считать открытый ключ из сертификата.',\n CERT_PARS_ERR_GET_ISSUER_AND_SER_NUMBER: 'не удалось считать имя удостоверяющего центра и серийный номер из сертификата.',\n UNKNOWN_ERROR: 'неизвестная ошибка.'\n};","import DN from './DN';\n\nconst oids = [\n { oid: '1.2.643.3.131.1.1', short: 'INN', full: 'ИНН' },\n { oid: '1.2.643.100.1', short: 'OGRN', full: 'ОГРН' },\n { oid: '1.2.643.100.5', short: 'OGRNIP', full: 'ОГРНИП' },\n { oid: '1.2.643.100.3', short: 'SNILS', full: 'СНИЛС' },\n { oid: '1.2.840.113549.1.9.1', short: 'E', full: 'emailAddress' },\n { oid: '2.5.4.3', short: 'CN', full: 'commonName' },\n { oid: '2.5.4.4', short: 'SN', full: 'surname' },\n { oid: '2.5.4.42', short: 'G', full: 'givenName' },\n { oid: '2.5.4.6', short: 'C', full: 'countryName' },\n { oid: '2.5.4.7', short: 'L', full: 'localityName' },\n { oid: '2.5.4.8', short: 'S', full: 'stateOrProvinceName' },\n { oid: '2.5.4.9', short: 'STREET', full: 'streetAddress' },\n { oid: '2.5.4.10', short: 'O', full: 'organizationName' },\n { oid: '2.5.4.11', short: 'OU', full: 'organizationalUnitName' },\n { oid: '2.5.4.12', short: 'T', full: 'title' },\n// { oid: '2.5.4.16', short: '?', full: 'postalAddress' },\n];\n\n/**\n * Перевод кирилицы в латиницу в ключах объекта с информацией о сертификате\n * @param {DN} dn \n * @returns {DN}\n */\nexport function convertDN(dn) {\n const result = new DN; \n for (const field of Object.keys(dn)) {\n const oid = oids.find(item => item.oid == field || item.full == field);\n if (oid) {\n result[oid.short] = dn[field];\n }\n else {\n result[field] = dn[field];\n }\n }\n return result;\n}\n\n/**\n * Убирает кавычки из строки DN\n * @param {string} str \n */\nexport function stripDnQuotes(str) \n{\n return str.replace(/=\"/g, '=').replace(/\",/g, ',');\n}\n\n/**\n * compare function takes version numbers of any length and any number size per segment.\n * @see https://stackoverflow.com/a/16187766\n * @param {string} a\n * @param {string} b\n * @returns {number} < 0 if a < b; > 0 if a > b; 0 if a = b\n */\nexport function versionCompare(a, b) {\n let i, diff;\n const regExStrip0 = /(\\.0+)+$/;\n const segmentsA = a.replace(regExStrip0, '').split('.');\n const segmentsB = b.replace(regExStrip0, '').split('.');\n const l = Math.min(segmentsA.length, segmentsB.length);\n\n for (i = 0; i < l; i++) {\n diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10);\n if (diff) {\n return diff;\n }\n }\n return segmentsA.length - segmentsB.length;\n}\n","/**\n * JaCarta GOST simplified library\n * @author Aleksandr.ru\n * @link http://aleksandr.ru\n */\n\nimport DN from '../DN';\nimport errors from './errors';\nimport { convertDN } from '../helpers';\n\nfunction JaCarta() {\n\tvar client, tokenId;\n\n\t/**\n\t * Инициализация и проверка наличия требуемых возможностей\n\t * @returns {Promise} версия, информация о токене\n\t */\n\tthis.init = function(){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (typeof(JCWebClient) !== 'undefined') {\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetScript('https://localhost:24738/JCWebClient.js', resolve, reject);\n\t\t\t}\n\t\t}).then(() => {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tif(typeof JCWebClient != 'undefined') {\n\t\t\t\t\t\t// Установлен клиент одной из версий JC-WebClient (2.x или новой) либо оба клиента\n\t\t\t\t\t\tif(typeof JCWebClient.id == 'undefined') {\n\t\t\t\t\t\t\t// Установлен клиент новой версии, работающей через локальный веб-сервер\n\t\t\t\t\t\t\tclient = JCWebClient();\n\t\t\t\t\t\t\tclient.initialize();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Установлен клиент версии 2.x, работающей через NPAPI и ActiveX\n\t\t\t\t\t\t\tthrow new Error('JaCarta WebClient 2.x не поддерживается');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//Не установлен клиент ни старой, ни новой версии JC-WebClient\n\t\t\t\t\t\tthrow new Error('Не установлен клиент ни старой, ни новой версии JC-WebClient');\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!client.checkWebBrowserVersion()) {\n\t\t\t\t\t\tthrow new Error('Браузер не поддерживается');\n\t\t\t\t\t}\n\n\t\t\t\t\tvar aTokens = client.getAllTokens();\n\t\t\t\t\tif(aTokens && aTokens.length == 1) {\n\t\t\t\t\t\t// OK 1 токен\n\t\t\t\t\t\ttokenId = aTokens.shift();\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(aTokens && aTokens.length > 1) {\n\t\t\t\t\t\tthrow new Error('Подключено ' + aTokens.length + ' токена(ов)');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new Error('Нет подключенных токенов');\n\t\t\t\t\t}\n\t\t\t\t\tvar version = client.getPluginVersion();\n\t\t\t\t\tvar tokenInfo = client.getTokenInfo(tokenId);\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tversion,\n\t\t\t\t\t\tserial: tokenInfo[0], // серийный номер электронного ключа.\n\t\t\t\t\t\tflags: tokenInfo[1], // флаги электронного ключа.\n\t\t\t\t\t\tlabel: tokenInfo[2], // метка электронного ключа.\n\t\t\t\t\t\ttype: tokenInfo[3]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tcatch(e) {\n\t\t\t\t\tvar err = getError();\n\t\t\t\t\tthrow new Error(e.message || err);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Авторизация на токене с пин-кодом юзера\n\t * @param {string} userPin если нет, то предлгает ввести пин через UI плагина\n\t * @returns {Promise}\n\t */\n\tthis.bind = function(userPin) {\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar state = client.getLoggedInState().shift();\n\t\t\t\tif(state === 1) {\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t\telse if(!userPin) {\n\t\t\t\t\tif(client.bindTokenUI(tokenId)) {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new Error('Пользователь отменил ввод PIN-кода');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tclient.bindTokenAsync(tokenId, userPin, function(a){\n\t\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Отменить предъявление PIN-кода. Необходимо вызывать при завершении сеанса работы\n\t * @returns {Promise}\n\t */\n\tthis.unbind = function() {\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar state = client.getLoggedInState().shift();\n\t\t\t\tif(state === 1) {\n\t\t\t\t\tclient.unbindToken();\n\t\t\t\t}\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Очистка токена (удаление всех контейнеров)\n\t * @returns {Promise} количество удаленных контейнеров\n\t */\n\tthis.clean = function(){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar aContainers = client.getCertificateList(tokenId);\n\t\t\t\tfor(var i in aContainers) {\n\t\t\t\t\tvar containerId = aContainers[i].shift();\n\t\t\t\t\tclient.deleteContainerOrCertificate(containerId);\n\t\t\t\t}\n\t\t\t\tresolve(i);\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Создать запрос на сертификат\n\t * @param {DN} dn\n\t * @param {string} description описание контейнера\n\t * @param {array} ekuOids массив OID Extended Key Usage, по-умолчанию Аутентификация клиента '1.3.6.1.5.5.7.3.2' + Защищенная электронная почта '1.3.6.1.5.5.7.3.4'\n\t * @param {string} ecParams параметры эллиптической кривой ключевой пары. Может принимать значения A, B, C, XA, XB.\n\t * @returns {Promise} объект с полями { csr: 'base64 запрос на сертификат', containerId }\n\t * @see DN\n\t */\n\tthis.generateCSR = function(dn, description, ekuOids, ecParams){\n\t\tif(!ekuOids || !ekuOids.length) {\n\t\t\tekuOids = [\n\t\t\t\t'1.3.6.1.5.5.7.3.2', // Аутентификация клиента\n\t\t\t\t'1.3.6.1.5.5.7.3.4' // Защищенная электронная почта\n\t\t\t];\n\t\t}\n\t\tif(!ecParams) ecParams = 'XA';\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tclient.createContainerAsync(ecParams, description, function(a){\n\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar containerId = a;\n\t\t\t\t\t\tvar aDn = [];\n\t\t\t\t\t\tfor(var i in dn) if(dn.hasOwnProperty(i)) {\n\t\t\t\t\t\t\taDn.push(i, dn[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exts = [\n\t\t\t\t\t\t\t'certificatePolicies',\t'1.2.643.100.113.1',\n\t\t\t\t\t\t\t'keyUsage',\t\t\t\t'digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment',\n\t\t\t\t\t\t\t'extendedKeyUsage',\t\tekuOids.toString(),\n\t\t\t\t\t\t\t'1.2.643.100.111',\t\t'ASN1:FORMAT:UTF8,UTF8:\"Криптотокен\" (АЛАДДИН Р.Д.)'\n\t\t\t\t\t\t];\n\t\t\t\t\t\tclient.genCSRAsync(containerId, aDn, exts, function(a){\n\t\t\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// base64(запрос на сертификат в формате PKCS#10)\n\t\t\t\t\t\t\t\tvar csr = btoa(String.fromCharCode.apply(null, new Uint8Array(a)));\n\t\t\t\t\t\t\t\tresolve({\n\t\t\t\t\t\t\t\t\tcsr: pemSplit(csr), \n\t\t\t\t\t\t\t\t\tcontainerId\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\t\t\t\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Записать сертификат в контейнер\n\t * @param {string} certificate base64(массив байт со значением сертификата в формате DER)\n\t * @param {int} идентификатор контейнера куда записывать\n\t * @returns {Promise}\n\t */\n\tthis.writeCertificate = function(certificate, containerId){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar aCertificate = [];\n\t\t\t\tvar der = atob(certificate);\n\t\t\t\tfor(var i=0; i}\n\t */\n\tthis.certificateInfo = function(containerId){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar o = client.parseX509CertificateEx(tokenId, containerId);\n\t\t\t\tvar dn = new DN;\n\t\t\t\tfor(var i in o.Data.Subject) {\n\t\t\t\t\tvar rdn = o.Data.Subject[i].rdn;\n\t\t\t\t\tvar val = o.Data.Subject[i].value;\n\t\t\t\t\tdn[rdn] = val;\n\t\t\t\t}\n\t\t\t\tdn = convertDN(dn);\n\t\t\t\tvar dnI = new DN;\n\t\t\t\tfor(var i in o.Data.Issuer) {\n\t\t\t\t\tvar rdn = o.Data.Issuer[i].rdn;\n\t\t\t\t\tvar val = o.Data.Issuer[i].value;\n\t\t\t\t\tdnI[rdn] = val;\n\t\t\t\t}\n\t\t\t\tvar dt = new Date();\n\t\t\t\tvar info = {\n\t\t\t\t\tName: dn.CN,\n\t\t\t\t\tIssuer: dnI,\n\t\t\t\t\tIssuerName: dnI.CN,\n\t\t\t\t\tSubject: dn,\n\t\t\t\t\tSubjectName: dn.toString(),\n\t\t\t\t\tVersion: o.Data.Version,\n\t\t\t\t\tSerialNumber: o.Data['Serial Number'].map(byte2hex).join(''),\n\t\t\t\t\tThumbprint: o.Signature.map(byte2hex).join(''),\n\t\t\t\t\tValidFromDate: o.Data.Validity['Not Before'],\n\t\t\t\t\tValidToDate: o.Data.Validity['Not After'],\n\t\t\t\t\tHasPrivateKey: true,\n\t\t\t\t\tIsValid: dt >= o.Data.Validity['Not Before'] && dt <= o.Data.Validity['Not After'],\n\t\t\t\t\ttoString: function(){\n\t\t\t\t\t\treturn 'Название: ' + this.Name +\n\t\t\t\t\t\t\t'\\nИздатель: ' + this.IssuerName +\n\t\t\t\t\t\t\t'\\nСубъект: ' + this.SubjectName +\n\t\t\t\t\t\t\t'\\nВерсия: ' + this.Version +\n\t\t\t\t\t\t\t'\\nСерийный №: ' + this.SerialNumber +\n\t\t\t\t\t\t\t'\\nОтпечаток SHA1: ' + this.Thumbprint +\n\t\t\t\t\t\t\t'\\nНе действителен до: ' + this.ValidFromDate +\n\t\t\t\t\t\t\t'\\nНе действителен после: ' + this.ValidToDate +\n\t\t\t\t\t\t\t'\\nПриватный ключ: ' + (this.HasPrivateKey ? 'Есть' : 'Нет') +\n\t\t\t\t\t\t\t'\\nВалидный: ' + (this.IsValid ? 'Да' : 'Нет');\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tresolve(info);\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Получение массива доступных сертификатов\n\t * @returns {Promise} [{id, subject}, ...]\n\t */\n\tthis.listCertificates = function(){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tclient.getCertificateListAsync(tokenId, function(a){\n\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar certs = [];\n\t\t\t\t\t\tfor(var i=0; i} base64(массив байт со значением сертификата в формате DER)\n\t */\n\tthis.readCertificate = function(containerId){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar state = client.getLoggedInState().shift();\n\t\t\t\tif(state === 0) {\n\t\t\t\t\tvar a = client.readCertificateEx(tokenId, containerId);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar a = client.readCertificate(containerId);\n\t\t\t\t}\n\t\t\t\tif(a && a.length) {\n\t\t\t\t\t// base64(массив байт со значением сертификата в формате DER)\n\t\t\t\t\tvar cert = btoa(String.fromCharCode.apply(null, new Uint8Array(a)));\n\t\t\t\t\tresolve(pemSplit(cert));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new Error('Нет сертификата в контейнере');\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Подписать данные. Выдает подпись в формате PKCS#7, опционально закодированную в Base64\n\t * @param {string} data данные (и подпись) закодированы в base64\n\t * @param {int} containerId идентификатор контейнера (сертификата)\n\t * @returns {Promise} строка-подпись в формате PKCS#7, закодированная в Base64.\n\t */\n\tthis.signData = function(dataBase64, containerId){\n\t\tvar attachedSignature = false;\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tclient.signBase64EncodedDataAsync(containerId, dataBase64, attachedSignature, false, function(a){\n\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar sign = pemSplit(a);\n\t\t\t\t\t\tresolve(sign);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Шифрование данных не поддерживается\n\t * @returns {Promise}\n\t */\n\tthis.encryptData = function() {\n\t\treturn new Promise(function () {\n\t\t\tthrow new Error('Encrypt feature is not supported, please upgrade to JaCarta-2 GOST');\n\t\t});\n\t}\n\n\t/**\n\t * Дешифрование данных не поддерживается\n\t * @returns {Promise<>}\n\t */\n\tthis.decryptData = function() {\n\t\treturn new Promise(function () {\n\t\t\tthrow new Error('Decrypt feature is not supported, please upgrade to JaCarta-2 GOST');\n\t\t});\n\t}\n\n\t/**\n\t * Получить ошибку по коду\n\t * @param {string} mnemo мнемонический код ошибки CKR_*\n\t * @returns {string|Boolean} false если нет ошибки (CKR_OK)\n\t */\n\tfunction getError(mnemo) {\n\t\ttry {\n\t\t\tif(!mnemo) {\n\t\t\t\tvar code = client.getLastError();\n\t\t\t\tmnemo = client.getErrorMessage(code);\n\t\t\t}\n\t\t\tif(mnemo == 'CKR_OK') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn errors[mnemo] || mnemo;\n\t\t}\n\t\tcatch(e) {\n\t\t\treturn e.message;\n\t\t}\n\t}\n\n\t/**\n\t * Получить название сертификата\n\t * @param {type} o объект, включающий в себя значения всех полей сертификата.\n\t * @param {type} containerName\n\t * @returns {string} \n\t */\n\tfunction formatCertificateName(o, containerName)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in o.Data.Subject) {\n\t\t\tvar rdn = o.Data.Subject[i].rdn;\n\t\t\tvar val = o.Data.Subject[i].value;\n\t\t\tdn[rdn] = val;\n\t\t}\n\t\tdn.toString = function(){\n\t\t\tvar cn = this['CN'] || this['2.5.4.3'];\n\t\t\tvar snils = this['СНИЛС'] || this['SNILS'] || this['1.2.643.100.3'];\n\t\t\tvar inn = this['ИНН'] || this['INN'] || this['1.2.643.3.131.1.1'];\n\t\t\treturn '' + cn + (inn ? '; ИНН ' + inn : '') + (snils ? '; СНИЛС ' + snils : '') + (containerName ? ' (' + containerName + ')' : '');\n\t\t};\n\t\treturn dn.toString();\n\t}\n\n\tfunction byte2hex(byte) {\n\t\t//console.log('byte %d -> %s', byte, byte.toString(16));\n\t\treturn ('0' + byte.toString(16)).slice(-2);\n\t}\n\n\t// https://gist.github.com/hendriklammers/5231994\n\tfunction pemSplit(str) {\n\t\tvar re = new RegExp('.{1,64}', 'g');\n\t\treturn str.match(re).join('\\n');\n\t}\n\n\t/** \n\t * Функция загрузки скрипта.\n\t * @param src - адрес расположения скрипта;\n\t * @param done - callback-функция, срабатывающая при успешной загрузки скрипта;\n\t * @param fail - callback-функция, срабатывающая при неудачной загрузки скрипта.\n\t*/\n\tfunction getScript(src, done, fail) {\n\t\tvar parent = document.getElementsByTagName('body')[0];\n\n\t\tvar script = document.createElement('script');\n\t\tscript.type = 'text/javascript';\n\t\tscript.src = src;\n\n\t\tif (script.readyState) { // IE\n\t\t\tscript.onreadystatechange = function () {\n\t\t\t\tif (script.readyState === \"loaded\" || script.readyState === \"complete\") {\n\t\t\t\t\tscript.onreadystatechange = null;\n\t\t\t\t\t// На некоторых браузерах мы попадаем сюда и в тех случаях когда скрипт не загружен,\n\t\t\t\t\t// поэтому дополнительно проверяем валидность JCWebClient\n\t\t\t\t\tif (typeof (JCWebClient) === 'undefined') {\n\t\t\t\t\t\tonFail(\"JCWebClient is invalid\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (script.readyState !== \"loading\") {\n\t\t\t\t\tonFail(\"JCWebClient hasn't been loaded\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse { // Others\n\t\t\tscript.onload = done;\n\t\t\tscript.onerror = function() {\n\t\t\t\tonFail(\"JCWebClient hasn't been loaded\");\n\t\t\t};\n\t\t}\n\n\t\tparent.appendChild(script);\n\n\t\tfunction onFail(errorMsg) {\n\t\t\tparent.removeChild(script);\n\t\t\tfail(errorMsg);\n\t\t}\n\t}\n}\n\nexport default JaCarta;\n","export default {\n UNKNOWN_ERROR: 'неизвестная ошибка',\n CKR_CANCEL: 'пользователь отказался от выполнения операции',\n CKR_HOST_MEMORY: 'недостаточно памяти для выполнения функции',\n CKR_SLOT_ID_INVALID: 'неправильный идентификатор слота',\n CKR_GENERAL_ERROR: 'такой код ошибки может означать: критическую ошибку, связанную с аппаратным обеспечением; неудачную попытку проверки пути сертификации.',\n CKR_FUNCTION_NOT_SUPPORTED: 'функция не поддерживается',\n CKR_FUNCTION_FAILED: 'при выполнении функции возник сбой',\n CKR_ARGUMENTS_BAD: 'недопустимый аргумент',\n CKR_ATTRIBUTE_READ_ONLY: 'предпринята попытка присвоения значения атрибуту, который нельзя изменять',\n CKR_ATTRIBUTE_TYPE_INVALID: 'некорректный тип атрибута',\n CKR_ATTRIBUTE_VALUE_INVALID: 'атрибут нулевой длины',\n CKR_DEVICE_ERROR: 'ошибка при обращении к устройству или слоту',\n CKR_DEVICE_MEMORY: 'для выполнения функции недостаточно памяти в устройстве',\n CKR_FUNCTION_CANCELED: 'время ожидания выполнения функции истекло',\n CKR_KEY_HANDLE_INVALID: 'функции передан некорректный дескриптор ключа',\n CKR_KEY_SIZE_RANGE: 'недопустимый размер ключа',\n CKR_KEY_TYPE_INCONSISTENT: 'данный тип ключа не может использоваться с данным механизмом',\n CKR_MECHANISM_INVALID: 'при выполнении криптографической функции был указан неправильный механизм',\n CKR_MECHANISM_PARAM_INVALID: 'при выполнении криптографической функции были заданы некорректные параметры механизма',\n CKR_OBJECT_HANDLE_INVALID: 'функции передан некорректный дескриптор объекта',\n CKR_OPERATION_ACTIVE: 'одна или несколько выполняющихся операций препятствуют выполнению новой операции',\n CKR_OPERATION_NOT_INITIALIZED: 'выполнение операции без предварительного указания параметров невозможно',\n CKR_PIN_INCORRECT: 'функции передан неверный PIN-код',\n CKR_PIN_LEN_RANGE: 'недопустимая длина PIN-кода',\n CKR_PIN_LOCKED: 'PIN-код заблокирован',\n CKR_SESSION_HANDLE_INVALID: 'функции передан некорректный дескриптор сессии',\n CKR_SESSION_PARALLEL_NOT_SUPPORTED: 'невозможно открыть параллельную сессию',\n CKR_SESSION_EXISTS: 'уже открыта сессия работы с тем же устройством',\n CKR_SESSION_READ_ONLY_EXISTS: 'сессия открыта только для чтения. Смена режима невозможна',\n CKR_SESSION_READ_WRITE_SO_EXISTS: 'открыта сессия чтения/записи. Открыть сеанс только для чтения невозможно',\n CKR_SIGNATURE_INVALID: 'неправильное значение электронной подписи',\n CKR_TEMPLATE_INCOMPLETE: 'для создания объекта недостаточно атрибутов',\n CKR_TOKEN_NOT_PRESENT: 'в момент выполнения функции устройство было отключено',\n CKR_TOKEN_WRITE_PROTECTED: 'устройство недоступно для записи',\n CKR_USER_ALREADY_LOGGED_IN: 'пользователь уже предъявил PIN-код',\n CKR_USER_NOT_LOGGED_IN: 'функция не может быть выполнена в гостевом режиме работы устройства',\n CKR_USER_PIN_NOT_INITIALIZED: 'начальное значение PIN-кода не установлено',\n CKR_USER_TYPE_INVALID: 'функция не может быть выполнена в текущем режиме работы устройства',\n CKR_USER_ANOTHER_ALREADY_LOGGED_IN: 'невозможно переключение из режима администратора в режим пользователя или обратно',\n CKR_BUFFER_TOO_SMALL: 'размер заданного буфера является недостаточным для сохранения результатов функции',\n CKR_INFORMATION_SENSITIVE: 'запрашиваемый объект недоступен для чтения',\n CKR_CRYPTOKI_NOT_INITIALIZED: 'выполнение функции без инициализации Единой библиотеки PKCS#11 (библиотеки Cryptoki) невозможно',\n CKR_CRYPTOKI_ALREADY_INITIALIZED: 'попытка повторно инициализировать библиотеку Cryptoki',\n CKR_FUNCTION_REJECTED: 'пользователь отменил операцию',\n NOT_STATE_TOKEN_BINDED: 'значение параметра state отличается от STATE_TOKEN_BINDED (1)',\n NOT_STATE_NOT_BINDED: 'значение параметра state отличается от STATE_TOKEN_BINDED (0)',\n IS_STATE_NOT_BINDED: 'параметр state принимает значение STATE_TOKEN_BINDED (0)',\n NOT_STATE_UNILATERAL_AUTHENTICATION_IN_PROGRESS: 'значение параметра state отличается от STATE_TOKEN_BINDED (4)',\n NOT_STATE_SECURE_CHANNEL_CONNECTION_IN_PROGRESS: 'значение параметра state отличается от STATE_TOKEN_BINDED (2)',\n NOT_STATE_SECURE_CHANNEL_ESTABLISHED: 'значение параметра state отличается от STATE_TOKEN_BINDED (3)',\n CERTIFICATE_NOT_FOUND: 'сертификат не обнаружен',\n PUBLIC_KEY_NOT_FOUND: 'открытый ключ не обнаружен в памяти поддерживаемого устройства',\n SERVER_PUBLIC_KEY_NOT_FOUND: 'не найден открытый ключ сервера',\n INVALID_SERVER_PUBLIC_KEY: 'неверный открытый ключ сервера',\n DATA_TO_SIGN_ZERO_LENGTH: 'на подпись были представлены данные, имеющие нулевую длину',\n DATA_TO_VERIFY_ZERO_LENGTH: 'на проверку подписи были представлены данные, имеющие нулевую длину',\n SIGNATURE_TO_VERIFY_ZERO_LENGTH: 'на проверку была представлена подпись, имеющая нулевую длину',\n INVALID_EC_PARAMS: 'неверно заданы параметры криптографических преобразований по ГОСТ Р 34.10-2001',\n TOKEN_MEMORY_TOO_SMALL: 'для выполнения операции в поддерживаемом устройстве недостаточно свободной памяти',\n KEY_SIZE_NOT_64: 'длина ключа не равна 64 битам',\n CERT_NOT_MATCH_PUBLIC_KEY: 'сертификат не соответствует открытому ключу',\n FAILED_CHECK_BROWSER_VERS: 'ошибка проверки версии используемого браузера',\n BROWSER_VERS_NOT_SUPPORTED: 'используемая версия браузера не поддерживается',\n INVALID_USER_TYPE: 'неверно указан тип PIN-кода',\n PINS_NOT_MATCH: 'введённые значения нового PIN-кода неодинаковы',\n USER_CHANGE_ADMIN_PIN_NOT_STATE_NOT_BINDED: 'cмена PIN-кода администратора невозможна, поскольку значение параметра state отличается от STATE_TOKEN_BINDED (0)',\n SSL_ERR_GEN_SESSION_KEY: 'ошибка при генерации ключа защиты данных, передаваемых между клиентом и сервером',\n SSL_ERR_GOST_ENGINE: 'ошибка средства защиты, программно выполняющего криптографические преобразования на стороне клиента',\n SSL_ERR_SSL_NEW: 'ошибка в начале выполнения протокола Handshake',\n SSL_ERR_CONNECT: 'ошибка при выполнении протокола Handshake',\n SSL_ERR_SSL_WRITE: 'ошибка при подготовке данных к защищённой передаче',\n SSL_ERR_SSL_READ: 'ошибка при чтении защищённых для передачи данных',\n SSL_ERR_LOAD_CERT_AND_KEY_FROM_TOKEN: 'ошибка при попытке считать сертификат и открытый ключ из памяти поддерживаемого устройства',\n SSL_ERR_GET_PEER_PUBLIC_KEY: 'ошибка при получении открытого ключа сервера',\n CERT_PARS_ERR_GET_PUBLIC_KEY: 'не удалось считать открытый ключ из сертификата',\n CERT_PARS_ERR_GET_ISSUER_AND_SER_NUMBER: 'не удалось считать имя удостоверяющего центра и серийный номер из сертификата',\n CKR_KT2_PIN_ALREADY_SET: 'PIN-код уже установлен',\n CKR_PUK_INCORRECT: 'неправильный PUK-код',\n CKR_CANNOT_UNLOCK: 'невозможно разблокировать PIN-код',\n CKR_PUK_INVALID: 'недопустимые символы в значении PUK-кода',\n CKR_SM_REQUIRED: 'для выполнения команды необходимо установить защищённое соединение',\n CKR_PKCS7_PUBLIC_KEY_NOT_FOUND: 'при проверке подписи под PKCS #7 на JaCarta-2 ГОСТ не был найден открытый ключ',\n CKR_ICL_LIBRARY_NOT_FOUND: 'ИКБ не найдена',\n CKR_ICL_JCVERIFY_NOT_FOUND: 'утилита jcverify не найдена',\n CKR_ICL_JCVERIFY_CHECKSUM_NOT_FOUND: 'файл контрольных сумм jcverify не найден',\n CKR_ICL_CHECKSUM_NOT_FOUND: 'файл контрольных сумм ИКБ не найден',\n CKR_ICL_JCVERIFY_CHECKSUM: 'неверные контрольная сумма утилиты jcverify',\n CKR_ICL_CHECKSUM: 'неверная контрольная сумма ИКБ',\n CKR_ICL_NOT_ICL: 'при загрузке ИКБ произошла ошибка. Требуемые функции найдены'\n};","/**\n * JaCarta-2 GOST simplified library\n * @author Aleksandr.ru\n * @link http://aleksandr.ru\n */\nimport DN from '../DN';\nimport errors from './errors';\nimport { convertDN, stripDnQuotes } from '../helpers';\n\nfunction JaCarta2() {\n\n\tvar client, tokenId;\n\t// const debug = process.env.NODE_ENV === 'development';\t\n\n\t/**\n\t * Инициализация и проверка наличия требуемых возможностей\n\t * @returns {Promise} версия, информация о токене\n\t */\n\tthis.init = function() {\n\t\tvar final = {};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (typeof(JCWebClient2) !== 'undefined') {\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetScript('https://localhost:24738/JCWebClient.js', resolve, reject);\n\t\t\t}\n\t\t}).then(() => {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tif(typeof JCWebClient2 != 'undefined') {\n\t\t\t\t\tclient = JCWebClient2;\n\t\t\t\t\tclient.initialize();\n\t\t\t\t\tclient.defaults({\n\t\t\t\t\t\tasync: true\n\t\t\t\t\t});\n\t\t\t\t\tclient.getJCWebClientVersion({\n\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//Не установлен клиент JCWebClient2\n\t\t\t\t\tthrow new Error('Не установлен клиент JCWebClient2');\n\t\t\t\t}\n\t\t\t});\n\t\t}).then(version => {\n\t\t\tconsole.log('JCWebClient2 v.%s', version);\n\t\t\tfinal['version'] = version;\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tclient.getAllSlots({\n\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t});\n\t\t\t});\n\t\t}).then(slots => {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t// console.log('Got %d slots', slots.length, slots);\n\t\t\t\tvar aTokens = slots.filter(a => {\n\t\t\t\t\treturn a.tokenExists;\n\t\t\t\t});\n\t\t\t\tif(aTokens && aTokens.length == 1) {\n\t\t\t\t\t// OK 1 токен\n\t\t\t\t\tvar token = aTokens.shift();\n\t\t\t\t\tresolve(token.id);\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(aTokens && aTokens.length > 1) {\n\t\t\t\t\tthrow new Error('Подключено ' + aTokens.length + ' токена(ов)');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new Error('Нет подключенных токенов');\n\t\t\t\t}\n\t\t\t});\n\t\t}).then(tokenID => {\n\t\t\ttokenId = tokenID;\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tclient.getTokenInfo({\n\t\t\t\t\targs: { tokenID: tokenId },\n\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t});\n\t\t\t});\n\t\t}).then(info => {\n\t\t\treturn Object.assign(final, info);\n\t\t});\n\t};\n\n\t/**\n\t * Авторизация на токене с пин-кодом юзера\n\t * @param {string} userPin если нет, то предлгает ввести пин через UI плагина\n\t * @returns {Promise}\n\t */\n\tthis.bind = function(userPin) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getLoggedInState({\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(result => {\n\t\t\tif(result.state === JCWebClient2.Vars.AuthState.binded && result.tokenID === tokenId) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tvar args = { tokenID: tokenId };\n\t\t\t\t\tif(!userPin) {\n\t\t\t\t\t\targs.useUI = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\targs.pin = userPin;\n\t\t\t\t\t}\n\t\t\t\t\tclient.bindToken({\n\t\t\t\t\t\targs: args,\n\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Отменить предъявление PIN-кода. Необходимо вызывать при завершении сеанса работы\n\t * @returns {Promise}\n\t */\n\tthis.unbind = function() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getLoggedInState({\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(result => {\n\t\t\tif(result.state !== JCWebClient2.Vars.AuthState.notBinded) {\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tclient.unbindToken({\n\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t});\n\t\t\t\t});\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Очистка токена (удаление всех контейнеров)\n\t * @returns {Promise}\n\t */\n\tthis.clean = function(){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getContainerList({\n\t\t\t\targs: {\n\t\t\t\t\ttokenID: tokenId\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(containers => {\n\t\t\tvar p = Promise.resolve();\n\t\t\tfor(var i in containers) {\n\t\t\t\tp = p.then(function(){\n\t\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\t\tclient.deletePKIObject({\n\t\t\t\t\t\t\targs: {\n\t\t\t\t\t\t\t\tid: containers[i].id\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn p;\n\t\t});\n\t};\n\n\t/**\n\t * Создать запрос на сертификат\n\t * @param {DN} dn\n\t * @param {string} description описание контейнера\n\t * @param {array} ekuOids массив OID Extended Key Usage, по-умолчанию Аутентификация клиента '1.3.6.1.5.5.7.3.2' + Защищенная электронная почта '1.3.6.1.5.5.7.3.4'\n\t * @param {string} algorithm Алгоритм \"GOST-2012-256\" (по-умолчанию) или \"GOST-2001\".\n\t * @returns {Promise} объект с полями { csr: 'base64 запрос на сертификат', keyPairId }\n\t * @see DN\n\t */\n\tthis.generateCSR = function(dn, description, ekuOids, algorithm){\n\t\tif(!ekuOids || !ekuOids.length) {\n\t\t\tekuOids = [\n\t\t\t\t'1.3.6.1.5.5.7.3.2', // Аутентификация клиента\n\t\t\t\t'1.3.6.1.5.5.7.3.4' // Защищенная электронная почта\n\t\t\t];\n\t\t}\n\t\tif(!algorithm) {\n\t\t\t// algorithm = JCWebClient2.Vars.KeyAlgorithm.GOST_2001; //default \"GOST-2001\"\n\t\t\talgorithm = JCWebClient2.Vars.KeyAlgorithm.GOST_2012_256; // \"GOST-2012-256\"\n\t\t} \n\t\tvar exts = {\n\t\t\t'certificatePolicies': '1.2.643.100.113.1',\n\t\t\t'keyUsage': 'digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment',\n\t\t\t'extendedKeyUsage': ekuOids.toString(),\n\t\t\t'1.2.643.100.111': 'ASN1:FORMAT:UTF8,UTF8:\"Криптотокен\" (АЛАДДИН Р.Д.)'\n\t\t};\n\t\tvar paramSet = 'XA';\n\t\tvar id;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.createKeyPair({\n\t\t\t\targs: {\n\t\t\t\t\tparamSet: paramSet,\n\t\t\t\t\tdescription: description,\n\t\t\t\t\talgorithm: algorithm\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(keyPairId => {\n\t\t\tid = keyPairId;\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tclient.genCSR({\n\t\t\t\t\targs: {\n\t\t\t\t\t\tid: id,\n \t\t\t\t\tdn: dn,\n \t\t\t\t\texts: exts\n\t\t\t\t\t},\n\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t});\n\t\t\t});\n\t\t}).then(a => {\n\t\t\t// base64(запрос на сертификат в формате PKCS#10)\n\t\t\tvar csr = btoa(String.fromCharCode.apply(null, new Uint8Array(a)));\n\t\t\treturn { \n\t\t\t\tcsr: pemSplit(csr),\n\t\t\t\tkeyPairId: id\n\t\t\t};\n\t\t});\n\t};\n\n\t/**\n\t * Записать сертификат в контейнер\n\t * @param {string} certificate base64(массив байт со значением сертификата в формате DER)\n\t * @param {int} keyPairId идентификатор контейнера куда записывать\n\t * @returns {Promise} идентификатор образованного контейнера.\n\t */\n\tthis.writeCertificate = function(certificate, keyPairId) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.writeUserCertificate({\n\t\t\t\targs: {\n\t\t\t\t\tkeyPairID: keyPairId,\n\t\t\t\t\tcert: certificate\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Получение информации о сертификате.\n\t * @param {int} containerId идентификатор контейнера (сертификата)\n\t * @returns {Promise}\n\t */\n\tthis.certificateInfo = function(containerId) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.parseX509Certificate({\n\t\t\t\targs: {\n\t\t\t\t\ttokenID: tokenId,\n\t\t\t\t\tid: containerId\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(o => {\n\t\t\tvar dn = makeDN(o.Data.Subject);\n\t\t\tvar dnI = makeDN(o.Data.Issuer);\n\t\t\tvar dt = new Date();\n\t\t\tvar info = {\n\t\t\t\tName: dn.CN,\n\t\t\t\tIssuer: dnI,\t\t\t\n\t\t\t\tIssuerName: stripDnQuotes(dnI.toString()),\n\t\t\t\tSubject: dn,\n\t\t\t\tSubjectName: stripDnQuotes(dn.toString()),\n\t\t\t\tVersion: o.Data.Version,\n\t\t\t\tSerialNumber: o.Data['Serial Number'].map(byte2hex).join(''),\n\t\t\t\tThumbprint: o.Signature.map(byte2hex).join(''),\n\t\t\t\tValidFromDate: o.Data.Validity['Not Before'],\n\t\t\t\tValidToDate: o.Data.Validity['Not After'],\n\t\t\t\tHasPrivateKey: true,\n\t\t\t\tIsValid: dt >= o.Data.Validity['Not Before'] && dt <= o.Data.Validity['Not After'],\n\t\t\t\tAlgorithm: o.Data['Subject Public Key Info']['Public Key Algorithm'],\n\t\t\t\t//ProviderName: '', //TODO\n\t\t\t\t//ProviderType: undefined, //TODO\n\t\t\t\ttoString: function() {\n\t\t\t\t\treturn 'Название: ' + this.Name +\n\t\t\t\t\t\t '\\nИздатель: ' + this.IssuerName +\n\t\t\t\t\t\t '\\nСубъект: ' + this.SubjectName +\n\t\t\t\t\t\t '\\nВерсия: ' + this.Version +\n\t\t\t\t\t\t '\\nАлгоритм: ' + this.Algorithm + // PublicKey Algorithm\n\t\t\t\t\t\t '\\nСерийный №: ' + this.SerialNumber +\n\t\t\t\t\t\t '\\nОтпечаток SHA1: ' + this.Thumbprint +\n\t\t\t\t\t\t '\\nНе действителен до: ' + this.ValidFromDate +\n\t\t\t\t\t\t '\\nНе действителен после: ' + this.ValidToDate +\n\t\t\t\t\t\t '\\nПриватный ключ: ' + (this.HasPrivateKey ? 'Есть' : 'Нет') +\n\t\t\t\t\t\t '\\nВалидный: ' + (this.IsValid ? 'Да' : 'Нет');\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn info;\n\t\t});\n\t};\n\n\t/**\n\t * Получение массива доступных сертификатов\n\t * @returns {Promise} [{ id, name }, ...]\n\t */\n\tthis.listCertificates = function() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getContainerList({\n\t\t\t\targs: {\n\t\t\t\t\ttokenID: tokenId\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(a => {\n\t\t\tvar certs = [];\n\t\t\tvar p = Promise.resolve();\n\t\t\tfor(var i=0; i {\n\t\t\t\t\t\t\tclient.parseX509Certificate({\n\t\t\t\t\t\t\t\targs: {\n\t\t\t\t\t\t\t\t\ttokenID: tokenId,\n\t\t\t\t\t\t\t\t\tid: contId\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}).then(o => {\n\t\t\t\t\t\t\tcerts.push({\n\t\t\t\t\t\t\t\tid: contId,\n\t\t\t\t\t\t\t\tname: formatCertificateName(o, contName)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn certs.length;\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})(contId, contName);\n\t\t\t}\n\t\t\treturn p.then(function(){\n\t\t\t\treturn certs;\n\t\t\t});\n\t\t});\n\t};\n\t\n\t/**\n\t * Получить сертификат из контейнера\n\t * @param {int} containerId\n\t * @returns {Promise} base64(массив байт со значением сертификата в формате DER)\n\t */\n\tthis.readCertificate = function(containerId) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getCertificateBody({\n\t\t\t\targs: {\n\t\t\t\t\tid: containerId,\n\t\t\t\t\ttokenID: tokenId\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(a => {\n\t\t\tif(a && a.length) {\n\t\t\t\t// base64(массив байт со значением сертификата в формате DER)\n\t\t\t\tvar cert = btoa(String.fromCharCode.apply(null, new Uint8Array(a)));\n\t\t\t\treturn pemSplit(cert);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Error('Нет сертификата в контейнере');\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Подписать данные. Выдает подпись в формате PKCS#7, опционально закодированную в Base64\n\t * @param {string} data данные (и подпись) закодированы в base64\n\t * @param {int} containerId идентификатор контейнера (сертификата)\n\t * @returns {Promise} строка-подпись в формате PKCS#7, закодированная в Base64.\n\t */\n\tthis.signData = function(dataBase64, containerId){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.signBase64EncodedData({\n\t\t\t\targs: {\n\t\t\t\t\tcontID: containerId,\n\t\t\t\t\tdata: dataBase64\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(sign => {\n\t\t\treturn pemSplit(sign);\n\t\t});\n\t};\n\n\t/**\n\t * Проверить подпись.\n\t * @param {string} dataBase64\n\t * @param {string} signBase64 существующая подпись\n\t * @returns {Promise} true или reject\n\t */\n\tthis.verifySign = function(dataBase64, signBase64){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.verifyData({\n\t\t\t\targs: {\n\t\t\t\t\tsignature: Array.from(atob(signBase64), c => c.charCodeAt(0)),\n\t\t\t\t\tdata: Array.from(atob(dataBase64), c => c.charCodeAt(0)),\n\t\t\t\t\toptions: {\n\t\t\t\t\t\ttokenID: tokenId,\n\t\t\t\t\t\tuseToken: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Шифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {int} containerId идентификатор контейнера (сертификата)\n\t * @returns {Promise} base64 enveloped data\n\t */\n\tthis.encryptData = function(dataBase64, containerId) {\n\t\t// https://stackoverflow.com/questions/21797299/convert-base64-string-to-arraybuffer/21797381\n\t\tconst dataByte = Array.from(atob(dataBase64), c => c.charCodeAt(0));\n\t\treturn this.readCertificate(containerId).then(cert => new Promise((resolve, reject) => {\n\t\t\tclient.encryptData({\n\t\t\t\targs: {\n\t\t\t\t\tcontID: containerId,\n\t\t\t\t\treceiverCertificate: cert,\n\t\t\t\t\tdata: dataByte // Данные для шифрования в виде массива байт.\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t})).then(data => {\n\t\t\tconst base64 = btoa(String.fromCharCode.apply(null, new Uint8Array(data)));\n\t\t\treturn pemSplit(base64);\n\t\t});\n\t};\n\n\t/**\n\t * Дешифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {int} containerId идентификатор контейнера (ключа)\n\t * @returns {Promise} base64\n\t */\n\tthis.decryptData = function(dataBase64, containerId) {\n\t\tconst dataByte = Array.from(atob(dataBase64), c => c.charCodeAt(0));\n\t\treturn this.readCertificate(containerId).then(cert => new Promise((resolve, reject) => {\n\t\t\tconst certByte = Array.from(atob(cert), c => c.charCodeAt(0));\n\t\t\tclient.decryptData({\n\t\t\t\targs: {\n\t\t\t\t\tcontID: containerId,\n\t\t\t\t\tsenderCertificate: certByte, // Сертификат отправителя в виде массива байт.\n\t\t\t\t\tdata: dataByte // Массив байт с зашифрованными данными в формате CMS.\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t})).then(data => btoa(String.fromCharCode.apply(null, new Uint8Array(data))));\n\t};\n\n\tfunction errorHandler(reject)\n\t{\n\t\treturn function(e) {\n\t\t\tif(client && e.name === 'JCWebClientError' && errors[e.message]) {\n\t\t\t\t// подменяем сообщение на более понятное\n\t\t\t\te.message = errors[e.message];\n\t\t\t}\n\t\t\treject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Создать DN из массива [{rdn: ..., value: ...}, ...]\n\t * @param {[index: number]: { rdn: string, value: string }} obj \n\t * @returns {DN}\n\t */\n\tfunction makeDN(obj)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in obj) {\n\t\t\tvar rdn = obj[i].rdn;\n\t\t\tvar val = obj[i].value;\n\t\t\tif (rdn && val) {\n\t\t\t\tdn[rdn] = val;\n\t\t\t}\n\t\t}\n\t\treturn convertDN(dn);\n\t}\n\n\t/**\n\t * Получить название сертификата\n\t * @param {type} o объект, включающий в себя значения всех полей сертификата.\n\t * @param {type} containerName\n\t * @returns {string} \n\t */\n\tfunction formatCertificateName(o, containerName)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in o.Data.Subject) {\n\t\t\tvar rdn = o.Data.Subject[i].rdn;\n\t\t\tvar val = o.Data.Subject[i].value;\n\t\t\tdn[rdn] = val;\n\t\t}\n\t\tdn.toString = function(){\n\t\t\tvar cn = this['CN'] || this['2.5.4.3'];\n\t\t\tvar snils = this['СНИЛС'] || this['SNILS'] || this['1.2.643.100.3'];\n\t\t\tvar inn = this['ИНН'] || this['INN'] || this['1.2.643.3.131.1.1'];\n\t\t\treturn '' + cn + (inn ? '; ИНН ' + inn : '') + (snils ? '; СНИЛС ' + snils : '') + (containerName ? ' (' + containerName + ')' : '');\n\t\t};\n\t\treturn dn.toString();\n\t}\n\n\tfunction byte2hex(byte) {\n\t\t//console.log('byte %d -> %s', byte, byte.toString(16));\n\t\treturn ('0' + byte.toString(16)).slice(-2);\n\t}\n\n\t// https://gist.github.com/hendriklammers/5231994\n\tfunction pemSplit(str) {\n\t\tvar re = new RegExp('.{1,64}', 'g');\n\t\treturn str.match(re).join('\\n');\n\t}\n\n\t/** \n\t * Функция загрузки скрипта.\n\t * @param src - адрес расположения скрипта;\n\t * @param done - callback-функция, срабатывающая при успешной загрузки скрипта;\n\t * @param fail - callback-функция, срабатывающая при неудачной загрузки скрипта.\n\t*/\n\tfunction getScript(src, done, fail) {\n\t\tvar parent = document.getElementsByTagName('body')[0];\n\n\t\tvar script = document.createElement('script');\n\t\tscript.type = 'text/javascript';\n\t\tscript.src = src;\n\n\t\tif (script.readyState) { // IE\n\t\t\tscript.onreadystatechange = function () {\n\t\t\t\tif (script.readyState === \"loaded\" || script.readyState === \"complete\") {\n\t\t\t\t\tscript.onreadystatechange = null;\n\t\t\t\t\t// На некоторых браузерах мы попадаем сюда и в тех случаях когда скрипт не загружен,\n\t\t\t\t\t// поэтому дополнительно проверяем валидность JCWebClient2\n\t\t\t\t\tif (typeof (JCWebClient2) === 'undefined') {\n\t\t\t\t\t\tonFail(\"JCWebClient is invalid\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (script.readyState !== \"loading\") {\n\t\t\t\t\tonFail(\"JCWebClient hasn't been loaded\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse { // Others\n\t\t\tscript.onload = done;\n\t\t\tscript.onerror = function() {\n\t\t\t\tonFail(\"JCWebClient hasn't been loaded\");\n\t\t\t};\n\t\t}\n\n\t\tparent.appendChild(script);\n\n\t\tfunction onFail(errorMsg) {\n\t\t\tparent.removeChild(script);\n\t\t\tfail(errorMsg);\n\t\t}\n\t}\n}\n\nexport default JaCarta2;\n","export const X509KeySpec = {\n XCN_AT_NONE : 0x0,\n XCN_AT_KEYEXCHANGE : 0x1,\n XCN_AT_SIGNATURE : 0x2\n};\nexport const X509PrivateKeyExportFlags = {\n XCN_NCRYPT_ALLOW_EXPORT_NONE : 0,\n XCN_NCRYPT_ALLOW_EXPORT_FLAG : 0x1,\n XCN_NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG : 0x2,\n XCN_NCRYPT_ALLOW_ARCHIVING_FLAG : 0x4,\n XCN_NCRYPT_ALLOW_PLAINTEXT_ARCHIVING_FLAG : 0x8\n};\nexport const X509CertificateEnrollmentContext = {\n ContextUser : 0x1,\n ContextMachine : 0x2,\n ContextAdministratorForceMachine : 0x3\n};\nexport const X509KeyUsageFlags = {\n XCN_CERT_NO_KEY_USAGE : 0,\n XCN_CERT_DIGITAL_SIGNATURE_KEY_USAGE : 0x80,\n XCN_CERT_NON_REPUDIATION_KEY_USAGE : 0x40,\n XCN_CERT_KEY_ENCIPHERMENT_KEY_USAGE : 0x20,\n XCN_CERT_DATA_ENCIPHERMENT_KEY_USAGE : 0x10,\n XCN_CERT_KEY_AGREEMENT_KEY_USAGE : 0x8,\n XCN_CERT_KEY_CERT_SIGN_KEY_USAGE : 0x4,\n XCN_CERT_OFFLINE_CRL_SIGN_KEY_USAGE : 0x2,\n XCN_CERT_CRL_SIGN_KEY_USAGE : 0x2,\n XCN_CERT_ENCIPHER_ONLY_KEY_USAGE : 0x1,\n XCN_CERT_DECIPHER_ONLY_KEY_USAGE : ( 0x80 << 8 )\n};\nexport const X500NameFlags = {\n XCN_CERT_NAME_STR_NONE : 0,\n XCN_CERT_SIMPLE_NAME_STR : 1,\n XCN_CERT_OID_NAME_STR : 2,\n XCN_CERT_X500_NAME_STR : 3,\n XCN_CERT_XML_NAME_STR : 4,\n XCN_CERT_NAME_STR_SEMICOLON_FLAG : 0x40000000,\n XCN_CERT_NAME_STR_NO_PLUS_FLAG : 0x20000000,\n XCN_CERT_NAME_STR_NO_QUOTING_FLAG : 0x10000000,\n XCN_CERT_NAME_STR_CRLF_FLAG : 0x8000000,\n XCN_CERT_NAME_STR_COMMA_FLAG : 0x4000000,\n XCN_CERT_NAME_STR_REVERSE_FLAG : 0x2000000,\n XCN_CERT_NAME_STR_FORWARD_FLAG : 0x1000000,\n XCN_CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG : 0x10000,\n XCN_CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG : 0x20000,\n XCN_CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG : 0x40000,\n XCN_CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG : 0x80000,\n XCN_CERT_NAME_STR_DISABLE_UTF8_DIR_STR_FLAG : 0x100000\n};\nexport const EncodingType = {\n XCN_CRYPT_STRING_BASE64HEADER : 0,\n XCN_CRYPT_STRING_BASE64 : 0x1,\n XCN_CRYPT_STRING_BINARY : 0x2,\n XCN_CRYPT_STRING_BASE64REQUESTHEADER : 0x3,\n XCN_CRYPT_STRING_HEX : 0x4,\n XCN_CRYPT_STRING_HEXASCII : 0x5,\n XCN_CRYPT_STRING_BASE64_ANY : 0x6,\n XCN_CRYPT_STRING_ANY : 0x7,\n XCN_CRYPT_STRING_HEX_ANY : 0x8,\n XCN_CRYPT_STRING_BASE64X509CRLHEADER : 0x9,\n XCN_CRYPT_STRING_HEXADDR : 0xa,\n XCN_CRYPT_STRING_HEXASCIIADDR : 0xb,\n XCN_CRYPT_STRING_HEXRAW : 0xc,\n XCN_CRYPT_STRING_NOCRLF : 0x40000000,\n XCN_CRYPT_STRING_NOCR : 0x80000000\n};\nexport const InstallResponseRestrictionFlags = {\n AllowNone : 0x00000000,\n AllowNoOutstandingRequest : 0x00000001,\n AllowUntrustedCertificate : 0x00000002,\n AllowUntrustedRoot : 0x00000004\n};\n\nexport const ProviderTypes = {\n GOST_R_34_10_2001: 75, // Crypto-Pro GOST R 34.10-2001 KC1 CSP\n GOST_R_34_10_2012: 80 // Crypto-Pro GOST R 34.10-2012 KC1 CSP\n};\n\nexport const cadesErrorMesages = {\n '0x800B010A': 'Не удается построить цепочку сертификатов до доверенного корневого центра, убедитесь что установлены все корневые и промежуточные сертификаты [0x800B010A]',\n '0x80090020': 'Внутренняя ошибка [0x80090020]. Если используется внешний токен, убедитесь, что ввели корректный PIN-код', // 2148073504\n '0x8007065B': 'Истекла лицензия на КриптоПро CSP [0x8007065B]',\n '0x800B0109': 'Отсутствует сертификат УЦ в хранилище корневых сертификатов [0x800B0109]', // A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.\n '0x8009200C': 'Не удается найти сертификат и закрытый ключ для расшифровки [0x8009200C]',\n '0x80090008': 'Указан неверный алгоритм (используется устаревшая версия КриптоПро CSP или КриптоПро ЭЦП Browser plug-in) [0x80090008]', // 2148073480\n '0x000004C7': 'Операция отменена пользователем [0x000004C7]', // Не удается получить доступ к сертификатам\n '0x8009000D': 'Нет доступа к закрытому ключу. Ввод пароля отменен или произошел сбой в запомненных паролях [0x8009000D]',\n // untested:\n '0x8009200B': 'Не удается найти закрытый ключ для подписи, убедитесь что сертификат установлен правильно [0x8009200B]',\n '0x8010006E': 'Действие отменено пользователем [0x8010006E]', // 2148532334\n 'NPObject' : 'Не удается подписать, убедитесь что выбранный сертификат подходит для подписи', // Error calling method on NPObject!\n 'Automation server': 'Библиотека CAPICOM не была автоматически зарегистрирована или заблокирована на Вашем компьютере (2146827859)',\n 'сервером программирования': 'Библиотека CAPICOM не была автоматически зарегистрирована или заблокирована на Вашем компьютере (2146827859)'\n};\n","/**\n * CryptoPRO simplified library\n * @author Aleksandr.ru\n * @link http://aleksandr.ru\n */\n\nimport DN from '../DN';\nimport { \n\tX509KeySpec, \n\tX509PrivateKeyExportFlags, \n\tX509CertificateEnrollmentContext, \n\tX509KeyUsageFlags, \n\tX500NameFlags, \n\tEncodingType, \n\tInstallResponseRestrictionFlags, \n\tProviderTypes, \n\tcadesErrorMesages \n} from './constants';\nimport { convertDN, versionCompare } from '../helpers';\n\nfunction CryptoPro() {\n\t//If the string contains fewer than 128 bytes, the Length field of the TLV triplet requires only one byte to specify the content length.\n\t//If the string is more than 127 bytes, bit 7 of the Length field is set to 1 and bits 6 through 0 specify the number of additional bytes used to identify the content length.\n\tconst maxLengthCSPName = 127;\n\t\n\t// https://www.cryptopro.ru/forum2/default.aspx?g=posts&m=38467#post38467\n\tconst asn1UTF8StringTag = 0x0c; // 12, UTF8String\n\n\tlet canAsync;\n\tlet pluginVersion = '';\n\tlet binded = false;\n\n\t/**\n\t * Инициализация и проверка наличия требуемых возможностей\n\t * @returns {Promise} версия\n\t */\n\tthis.init = function(){\n\t\twindow.cadesplugin_skip_extension_install = true; // считаем что уже все установлено\n\t\twindow.allow_firefox_cadesplugin_async = true; // FF 52+\n\n\t\trequire('./cadesplugin_api');\n\t\tcanAsync = !!cadesplugin.CreateObjectAsync;\n\n\t\treturn new Promise(resolve => {\n\t\t\tif(!window.cadesplugin) {\n\t\t\t\tthrow new Error('КриптоПро ЭЦП Browser plug-in не обнаружен');\n\t\t\t}\n\t\t\tresolve();\n\t\t}).then(() => {\n\t\t\tif(canAsync) {\n\t\t\t\treturn cadesplugin.then(function(){\n\t\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAdESCOM.About\");\n\t\t\t\t}).then(function(oAbout){\n\t\t\t\t\treturn oAbout.Version;\n\t\t\t\t}).then(function(version) {\n\t\t\t\t\tpluginVersion = version;\n\t\t\t\t\treturn { version };\n\t\t\t\t}).catch(function(e) {\n\t\t\t\t\t// 'Плагин не загружен'\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst oAbout = cadesplugin.CreateObject(\"CAdESCOM.About\");\n\t\t\t\t\t\tif(!oAbout || !oAbout.Version) {\n\t\t\t\t\t\t\tthrow new Error('КриптоПро ЭЦП Browser plug-in не загружен');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpluginVersion = oAbout.Version;\n\t\t\t\t\t\tresolve({\n\t\t\t\t\t\t\tversion: pluginVersion\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tcatch(e) {\n\t\t\t\t\t\t// 'Плагин не загружен'\n\t\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Включает кеширование ПИНов от контейнеров чтоб не тробовать повторного ввода\n\t * возможно не поддерживается в ИЕ\n\t * @see https://www.cryptopro.ru/forum2/default.aspx?g=posts&t=10170\n\t * @param {string} userPin не используется\n\t * @returns {Promise} new binded state\n\t */\n\tthis.bind = function(userPin) {\n\t\tbinded = true;\n\t\treturn Promise.resolve(binded);\n\t};\n\n\t/**\n\t * Заглушка для совместимости\n\t * @returns {Promise} new binded state\n\t */\n\tthis.unbind = function() {\n\t\tbinded = false;\n\t\treturn Promise.resolve(binded);\n\t};\n\n\t/**\n\t * Создание CSR.\n\t * @param {DN} dn\n\t * @param {string} pin\n\t * @param {string[]} ekuOids массив OID Extended Key Usage, по-умолчанию Аутентификация клиента '1.3.6.1.5.5.7.3.2' + Защищенная электронная почта '1.3.6.1.5.5.7.3.4'\n\t * @param {int} providerType по умолчанию 80 (ГОСТ Р 34.10-2012) или 75 (ГОСТ Р 34.10-2001)\n\t * @returns {Promise} объект с полями { csr: 'base64 запрос на сертификат' }\n\t * @see DN\n\t */\n\tthis.generateCSR = function(dn, pin, ekuOids, providerType){\n\t\tif(!ekuOids || !ekuOids.length) {\n\t\t\tekuOids = [\n\t\t\t\t'1.3.6.1.5.5.7.3.2', // Аутентификация клиента\n\t\t\t\t'1.3.6.1.5.5.7.3.4' // Защищенная электронная почта\n\t\t\t];\n\t\t}\n\t\tif(!providerType) {\n\t\t\tproviderType = ProviderTypes.GOST_R_34_10_2012;\n\t\t}\n\t\tif(canAsync) {\n\t\t\tlet oEnroll, oRequest, oPrivateKey, oExtensions, oKeyUsage, oEnhancedKeyUsage, oEnhancedKeyUsageOIDs, aOIDs, oSstOID, oDn, oCspInformations, sCSPName, oSubjectSignTool;\n\t\t\treturn cadesplugin.then(function(){\n\t\t\t\treturn Promise.all([\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509Enrollment'), // 0\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509CertificateRequestPkcs10'), // 1\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509PrivateKey'), // 2\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509ExtensionKeyUsage'), // 3\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509ExtensionEnhancedKeyUsage'), // 4\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CObjectIds'), // 5\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX500DistinguishedName'), // 6\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509Extensions'), // 7\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CCspInformations'), // 8\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509Extension') //9\n\t\t\t\t]);\n\t\t\t}).then(function(objects){\n\t\t\t\toEnroll = objects[0];\n\t\t\t\toRequest = objects[1];\n\t\t\t\toPrivateKey = objects[2];\n\t\t\t\toKeyUsage = objects[3];\n\t\t\t\toEnhancedKeyUsage = objects[4];\n\t\t\t\toEnhancedKeyUsageOIDs = objects[5];\n\t\t\t\toDn = objects[6];\n\t\t\t\toExtensions = objects[7];\n\t\t\t\toCspInformations = objects[8];\n\t\t\t\toSubjectSignTool = objects[9];\n\n\t\t\t\treturn oCspInformations.AddAvailableCsps();\n\t\t\t}).then(function(){\n\t\t\t\treturn oCspInformations.Count;\n\t\t\t}).then(function(cnt){\n\t\t\t\tif(!cnt) throw new Error('No CSP informations!');\n\t\t\t\tconst aPromises = [];\n\t\t\t\tfor(let i=0; i {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCspInformations = cadesplugin.CreateObject('X509Enrollment.CCspInformations');\n\t\t\t\t\tconst oEnroll = cadesplugin.CreateObject('X509Enrollment.CX509Enrollment');\n\t\t\t\t\tconst oRequest = cadesplugin.CreateObject('X509Enrollment.CX509CertificateRequestPkcs10');\n\t\t\t\t\tconst oPrivateKey = cadesplugin.CreateObject('X509Enrollment.CX509PrivateKey');\n\t\t\t\t\tconst oKeyUsage = cadesplugin.CreateObject('X509Enrollment.CX509ExtensionKeyUsage');\n\t\t\t\t\tconst oEnhancedKeyUsage = cadesplugin.CreateObject('X509Enrollment.CX509ExtensionEnhancedKeyUsage');\n\t\t\t\t\tconst oEnhancedKeyUsageOIDs = cadesplugin.CreateObject('X509Enrollment.CObjectIds');\n\t\t\t\t\tconst oDn = cadesplugin.CreateObject('X509Enrollment.CX500DistinguishedName');\n\n\t\t\t\t\tlet cspType, cspName;\n\t\t\t\t\toCspInformations.AddAvailableCsps();\n\t\t\t\t\tfor(let i=0; i} thumbprint\n\t */\n\tthis.writeCertificate = function(certBase64){\n\t\tif(canAsync) {\n\t\t\tlet oEnroll, existingSha = [];\n\t\t\treturn this.listCertificates().then(function(certs){\n\t\t\t\tfor(let i in certs) {\n\t\t\t\t\texistingSha.push(certs[i].id);\n\t\t\t\t}\n\t\t\t\treturn cadesplugin.CreateObjectAsync('X509Enrollment.CX509Enrollment');\n\t\t\t}).then(function(enroll){\n\t\t\t\toEnroll = enroll;\n\t\t\t\treturn oEnroll.Initialize(X509CertificateEnrollmentContext.ContextUser);\n\t\t\t}).then(function(){\n\t\t\t\treturn oEnroll.InstallResponse(InstallResponseRestrictionFlags.AllowNone, certBase64, EncodingType.XCN_CRYPT_STRING_BASE64, '');\n\t\t\t}).then(this.listCertificates).then(function(certs){\n\t\t\t\tfor(let i in certs) {\n\t\t\t\t\tconst sha = certs[i].id;\n\t\t\t\t\tif(existingSha.indexOf(sha) < 0) {\n\t\t\t\t\t\treturn sha;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new Error('Не удалось найти установленный сертификат по отпечатку');\n\t\t\t}).catch(function(e){\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst existingSha = [];\n\t\t\t\t\tlet oStore = cadesplugin.CreateObject(\"CAPICOM.Store\");\n\t\t\t\t\toStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE, cadesplugin.CAPICOM_MY_STORE, cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t\t\tlet oCertificates = oStore.Certificates;\n\t\t\t\t\tfor(let i=1; i<=oCertificates.Count; i++) {\n\t\t\t\t\t\texistingSha.push(oCertificates.Item(i).Thumbprint);\n\t\t\t\t\t}\n\t\t\t\t\toStore.Close();\n\n\t\t\t\t\tconst oEnroll = cadesplugin.CreateObject('X509Enrollment.CX509Enrollment');\n\t\t\t\t\toEnroll.Initialize(X509CertificateEnrollmentContext.ContextUser);\n\t\t\t\t\toEnroll.InstallResponse(InstallResponseRestrictionFlags.AllowNone, certBase64, EncodingType.XCN_CRYPT_STRING_BASE64, '');\n\n\t\t\t\t\toStore = cadesplugin.CreateObject(\"CAPICOM.Store\");\n\t\t\t\t\toStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE, cadesplugin.CAPICOM_MY_STORE, cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t\t\toCertificates = oStore.Certificates;\n\t\t\t\t\tlet found = false;\n\t\t\t\t\tlet sha = '';\n\t\t\t\t\tfor(let i=1; i<=oCertificates.Count; i++) {\n\t\t\t\t\t\tsha = oCertificates.Item(i).Thumbprint;\n\t\t\t\t\t\tif(existingSha.indexOf(sha) < 0) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\toStore.Close();\n\t\t\t\t\tif(found) {\n\t\t\t\t\t\tresolve(sha);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new Error('Не удалось найти установленный сертификат по отпечатку');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Получение информации о сертификате.\n\t * @param {string} certThumbprint\n\t * @returns {Promise}\n\t */\n\tthis.certificateInfo = function(certThumbprint){\n\t\tconst infoToString = function () {\n\t\t\treturn 'Название: ' + this.Name +\n\t\t\t\t\t'\\nИздатель: ' + this.IssuerName +\n\t\t\t\t\t'\\nСубъект: ' + this.SubjectName +\n\t\t\t\t\t'\\nВерсия: ' + this.Version +\n\t\t\t\t\t'\\nАлгоритм: ' + this.Algorithm + // PublicKey Algorithm\n\t\t\t\t\t'\\nСерийный №: ' + this.SerialNumber +\n\t\t\t\t\t'\\nОтпечаток SHA1: ' + this.Thumbprint +\n\t\t\t\t\t'\\nНе действителен до: ' + this.ValidFromDate +\n\t\t\t\t\t'\\nНе действителен после: ' + this.ValidToDate +\n\t\t\t\t\t'\\nПриватный ключ: ' + (this.HasPrivateKey ? 'Есть' : 'Нет') +\n\t\t\t\t\t'\\nКриптопровайдер: ' + this.ProviderName + // PrivateKey ProviderName\n\t\t\t\t\t'\\nВалидный: ' + (this.IsValid ? 'Да' : 'Нет');\n\t\t};\n\n\t\tif(canAsync) {\n\t\t\tlet oInfo = {};\n\t\t\treturn getCertificateObject(certThumbprint)\n\t\t\t.then(oCertificate => Promise.all([\n\t\t\t\toCertificate.HasPrivateKey(),\n\t\t\t\toCertificate.IsValid().then(v => v.Result),\n\t\t\t\toCertificate.IssuerName,\n\t\t\t\toCertificate.SerialNumber,\n\t\t\t\toCertificate.SubjectName,\n\t\t\t\toCertificate.Thumbprint,\n\t\t\t\toCertificate.ValidFromDate,\n\t\t\t\toCertificate.ValidToDate,\n\t\t\t\toCertificate.Version,\n\t\t\t\toCertificate.PublicKey().then(k => k.Algorithm).then(a => a.FriendlyName),\n\t\t\t\toCertificate.HasPrivateKey().then(key => !key && ['', undefined] || oCertificate.PrivateKey.then(k => Promise.all([\n\t\t\t\t\tk.ProviderName, k.ProviderType\n\t\t\t\t])))\n\t\t\t]))\n\t\t\t.then(a => {\n\t\t\t\toInfo = {\n\t\t\t\t\tHasPrivateKey: a[0],\n\t\t\t\t\tIsValid: a[1],\n\t\t\t\t\tIssuerName: a[2],\n\t\t\t\t\tIssuer: undefined,\n\t\t\t\t\tSerialNumber: a[3],\n\t\t\t\t\tSubjectName: a[4],\n\t\t\t\t\tSubject: undefined,\n\t\t\t\t\tName: undefined,\n\t\t\t\t\tThumbprint: a[5],\n\t\t\t\t\tValidFromDate: new Date(a[6]),\n\t\t\t\t\tValidToDate: new Date(a[7]),\n\t\t\t\t\tVersion: a[8],\n\t\t\t\t\tAlgorithm: a[9],\n\t\t\t\t\tProviderName: a[10][0],\n\t\t\t\t\tProviderType: a[10][1]\n\t\t\t\t};\n\t\t\n\t\t\t\toInfo.Subject = string2dn(oInfo.SubjectName);\n\t\t\t\toInfo.Issuer = string2dn(oInfo.IssuerName);\n\t\t\t\toInfo.Name = oInfo.Subject['CN'];\n\t\t\t\toInfo.toString = infoToString;\n\t\t\t\treturn oInfo;\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint);\n\t\t\t\t\tconst hasKey = oCertificate.HasPrivateKey();\n\t\t\t\t\tconst oParesedSubj = string2dn(oCertificate.SubjectName);\n\t\t\t\t\tconst oInfo = {\n\t\t\t\t\t\tHasPrivateKey: hasKey,\n\t\t\t\t\t\tIsValid: oCertificate.IsValid().Result,\t\t\t\t\t\t\n\t\t\t\t\t\tIssuerName: oCertificate.IssuerName,\n\t\t\t\t\t\tIssuer: string2dn(oCertificate.IssuerName),\n\t\t\t\t\t\tSerialNumber: oCertificate.SerialNumber,\n\t\t\t\t\t\tSubjectName: oCertificate.SubjectName,\n\t\t\t\t\t\tSubject: oParesedSubj,\n\t\t\t\t\t\tName: oParesedSubj['CN'],\n\t\t\t\t\t\tThumbprint: oCertificate.Thumbprint,\n\t\t\t\t\t\tValidFromDate: new Date(oCertificate.ValidFromDate),\n\t\t\t\t\t\tValidToDate: new Date(oCertificate.ValidToDate),\n\t\t\t\t\t\tVersion: oCertificate.Version,\n\t\t\t\t\t\tAlgorithm: oCertificate.PublicKey().Algorithm.FriendlyName,\n\t\t\t\t\t\tProviderName: hasKey && oCertificate.PrivateKey.ProviderName || '',\n\t\t\t\t\t\tProviderType: hasKey && oCertificate.PrivateKey.ProviderType || undefined,\n\n\t\t\t\t\t};\n\t\t\t\t\toInfo.toString = infoToString;\n\t\t\t\t\tresolve(oInfo);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Получение массива доступных сертификатов\n\t * @returns {Promise} [ {id: thumbprint, name: subject}, ...]\n\t */\n\tthis.listCertificates = function(){\n\t\tconst tryContainerStore = hasContainerStore();\n\n\t\tif(canAsync) {\n\t\t\tlet oStore, ret;\n\t\t\treturn cadesplugin.then(function(){\n\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAPICOM.Store\");\n\t\t\t}).then(store => {\n\t\t\t\toStore = store;\n\t\t\t\treturn oStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,\n\t\t\t\t\tcadesplugin.CAPICOM_MY_STORE,\n\t\t\t\t\tcadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t}).then(() => {\n\t\t\t\treturn fetchCertsFromStore(oStore);\n\t\t\t}).then(certs => {\n\t\t\t\tret = certs;\n\t\t\t\treturn oStore.Close();\n\t\t\t}).then(() => {\n\t\t\t\tif (tryContainerStore) {\n\t\t\t\t\tlet certificates;\n\t\t\t\t\treturn oStore.Open(cadesplugin.CADESCOM_CONTAINER_STORE).then(() => {\n\t\t\t\t\t\tconst skipIds = ret.map(a => a.id);\n\t\t\t\t\t\treturn fetchCertsFromStore(oStore, skipIds);\n\t\t\t\t\t}).then(certs => {\n\t\t\t\t\t\tcertificates = certs;\n\t\t\t\t\t\treturn oStore.Close();\n\t\t\t\t\t}).then(() => {\n\t\t\t\t\t\treturn certificates;\n\t\t\t\t\t}).catch(e => {\n\t\t\t\t\t\tconsole.log(e);\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t}).then(certs => {\n\t\t\t\tret.push(...certs);\n\t\t\t\treturn ret;\n\t\t\t}).catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oStore = cadesplugin.CreateObject(\"CAPICOM.Store\");\n\t\t\t\t\toStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,\n\t\t\t\t\t\tcadesplugin.CAPICOM_MY_STORE,\n\t\t\t\t\t\tcadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t\t\tconst ret = fetchCertsFromStore(oStore);\n\t\t\t\t\toStore.Close();\n\n\t\t\t\t\tif (tryContainerStore) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\toStore.Open(cadesplugin.CADESCOM_CONTAINER_STORE);\n\t\t\t\t\t\t\tconst skipIds = ret.map(a => a.id);\n\t\t\t\t\t\t\tconst certs = fetchCertsFromStore(oStore, skipIds);\n\t\t\t\t\t\t\toStore.Close();\n\t\t\t\t\t\t\tret.push(...certs);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\tconsole.log(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresolve(ret);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Чтение сертификата\n\t * @param {string} certThumbprint\n\t * @returns {Promise} base64\n\t */\n\tthis.readCertificate = function(certThumbprint){\n\t\tif(canAsync) {\n\t\t\treturn getCertificateObject(certThumbprint)\n\t\t\t.then(cert => cert.Export(cadesplugin.CADESCOM_ENCODE_BASE64))\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint);\n\t\t\t\t\tconst data = oCertificate.Export(cadesplugin.CADESCOM_ENCODE_BASE64);\n\t\t\t\t\tresolve(data);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Подпись данных (отсоединенная).\n\t * @param {string} dataBase64\n\t * @param {string} certThumbprint\n\t * @param {string} pin будет запрошен, если отсутствует\n\t * @returns {Promise} base64\n\t */\n\tthis.signData = function(dataBase64, certThumbprint, pin){\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oSigner, oSignedData;\n\t\t\treturn getCertificateObject(certThumbprint, pin)\n\t\t\t.then(certificate => {\n\t\t\t\toCertificate = certificate;\n\t\t\t\treturn Promise.all([\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CPSigner\"),\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CadesSignedData\")\n\t\t\t\t]);\n\t\t\t})\n\t\t\t.then(objects => {\n\t\t\t\toSigner = objects[0];\n\t\t\t\toSignedData = objects[1];\n\t\t\t\treturn Promise.all([\n\t\t\t\t\toSigner.propset_Certificate(oCertificate),\n\t\t\t\t\t// oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN),\n\t\t\t\t\toSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY),\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\toSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY)\n\t\t\t\t]);\n\t\t\t})\n\t\t\t.then(() => oSignedData.propset_Content(dataBase64))\n\t\t\t.then(() => oSignedData.SignCades(oSigner, cadesplugin.CADESCOM_CADES_BES, true))\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint, pin);\n\t\t\t\t\tconst oSigner = cadesplugin.CreateObject(\"CAdESCOM.CPSigner\");\n\t\t\t\t\toSigner.Certificate = oCertificate;\n\t\t\t\t\t// oSigner.Options = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN;\n\t\t\t\t\toSigner.Options = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY;\n\n\t\t\t\t\tconst oSignedData = cadesplugin.CreateObject(\"CAdESCOM.CadesSignedData\");\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\toSignedData.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\toSignedData.Content = dataBase64;\n\n\t\t\t\t\tconst sSignedMessage = oSignedData.SignCades(oSigner, cadesplugin.CADESCOM_CADES_BES, true);\n\t\t\t\t\tresolve(sSignedMessage);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Совместная подпись данных (двумя сертификатами).\n\t * @param {string} dataBase64\n\t * @param {string} certThumbprint SHA1 отпечаток первого сертификата\n\t * @param {string} pin будет запрошен, если отсутствует\n\t * @param {string} certThumbprint2 SHA1 отпечаток второго сертификата\n\t * @param {string} pin2 будет запрошен, если отсутствует\n\t * @returns {Promise} base64\n\t */\n\tthis.signData2 = function(dataBase64, certThumbprint, pin, certThumbprint2, pin2){\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oCertificate2, oSigner, oSignedData;\n\t\t\treturn Promise.all([\n\t\t\t\tgetCertificateObject(certThumbprint, pin),\n\t\t\t\tgetCertificateObject(certThumbprint2, pin2)\n\t\t\t])\n\t\t\t.then(certs => {\n\t\t\t\toCertificate = certs[0];\n\t\t\t\toCertificate2 = certs[1];\n\t\t\t\treturn Promise.all([\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CPSigner\"),\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CadesSignedData\")\n\t\t\t\t]);\n\t\t\t})\n\t\t\t.then(objects => {\n\t\t\t\toSigner = objects[0];\n\t\t\t\toSignedData = objects[1];\n\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\treturn oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n\t\t\t})\n\t\t\t.then(() => oSignedData.propset_Content(dataBase64))\n\t\t\t.then(() => Promise.all([\n\t\t\t\toSigner.propset_Certificate(oCertificate),\n\t\t\t\t// oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN),\n\t\t\t\toSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)\n\t\t\t]))\n\t\t\t.then(() => oSignedData.SignCades(oSigner, cadesplugin.CADESCOM_CADES_BES, true))\n\t\t\t.then(() => Promise.all([\n\t\t\t\toSigner.propset_Certificate(oCertificate2),\n\t\t\t\t// oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN),\n\t\t\t\toSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)\n\t\t\t]))\n\t\t\t.then(() => oSignedData.CoSignCades(oSigner, cadesplugin.CADESCOM_CADES_BES))\n\t\t\t.catch(e => {\n\t\t\t\tconsole.log(arguments);\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint, pin);\n\t\t\t\t\tconst oCertificate2 = getCertificateObject(certThumbprint2, pin2);\n\n\t\t\t\t\tconst oSignedData = cadesplugin.CreateObject(\"CAdESCOM.CadesSignedData\");\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\toSignedData.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\toSignedData.Content = dataBase64;\n\n\t\t\t\t\tconst oSigner = cadesplugin.CreateObject(\"CAdESCOM.CPSigner\");\n\t\t\t\t\toSigner.Certificate = oCertificate;\n\t\t\t\t\t// oSigner.Options = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN;\n\t\t\t\t\toSigner.Options = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY;\n\t\t\t\t\tconst sSignedMessage = oSignedData.SignCades(oSigner, cadesplugin.CADESCOM_CADES_BES, true);\n\n\t\t\t\t\toSigner.Certificate = oCertificate2;\n\t\t\t\t\t// oSigner.Options = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN;\n\t\t\t\t\toSigner.Options = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY;\n\t\t\t\t\tconst sSignedMessage2 = oSignedData.CoSignCades(oSigner, cadesplugin.CADESCOM_CADES_BES);\n\n\t\t\t\t\tresolve(sSignedMessage2);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Добавить подпись к существующей.\n\t * @param {string} dataBase64\n\t * @param {string} signBase64 существующая подпись\n\t * @param {string} certThumbprint SHA1 отпечаток первого сертификата\n\t * @param {string} pin будет запрошен, если отсутствует\n\t * @returns {Promise} base64\n\t */\n\tthis.addSign = function(dataBase64, signBase64, certThumbprint, pin){\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oSigner, oSignedData;\n\t\t\treturn getCertificateObject(certThumbprint, pin)\n\t\t\t.then(certificate => {\n\t\t\t\toCertificate = certificate;\n\t\t\t\treturn Promise.all([\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CPSigner\"),\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CadesSignedData\")\n\t\t\t\t]);\n\t\t\t})\n\t\t\t.then(objects => {\n\t\t\t\toSigner = objects[0];\n\t\t\t\toSignedData = objects[1];\n\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\treturn oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\treturn oSignedData.propset_Content(dataBase64);\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\treturn oSignedData.VerifyCades(signBase64, cadesplugin.CADESCOM_CADES_BES, true).catch(function(e){\n\t\t\t\t\tconsole.log('Existing sign not verified: %o', e);\n\t\t\t\t\t// Для создания второй подписи успешная проверка не требуется.\n\t\t\t\t\t// Вы можете перехватить исключение при проверке, и добавить подпись вторую.\n\t\t\t\t\t// Проверка нужна только для того что бы подпись попала внутрь SignedData.\n\t\t\t\t});\n\t\t\t})\n\t\t\t.then(() => Promise.all([\n\t\t\t\toSigner.propset_Certificate(oCertificate),\n\t\t\t\t// oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN),\n\t\t\t\toSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)\n\t\t\t]))\n\t\t\t.then(() => oSignedData.CoSignCades(oSigner, cadesplugin.CADESCOM_CADES_BES))\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint, pin);\n\t\t\t\t\tconst oSignedData = cadesplugin.CreateObject(\"CAdESCOM.CadesSignedData\");\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\toSignedData.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\toSignedData.Content = dataBase64;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\toSignedData.VerifyCades(signBase64, cadesplugin.CADESCOM_CADES_BES, true);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(e) {\n\t\t\t\t\t\tconsole.log('Existing sign not verified: %o', e);\n\t\t\t\t\t\t// Для создания второй подписи успешная проверка не требуется.\n\t\t\t\t\t\t// Вы можете перехватить исключение при проверке, и добавить подпись вторую.\n\t\t\t\t\t\t// Проверка нужна только для того что бы подпись попала внутрь SignedData.\n\t\t\t\t\t}\n\n\t\t\t\t\tconst oSigner = cadesplugin.CreateObject(\"CAdESCOM.CPSigner\");\n\t\t\t\t\toSigner.Certificate = oCertificate;\n\t\t\t\t\t// oSigner.Options = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN;\n\t\t\t\t\toSigner.Options = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY;\n\t\t\t\t\tconst sSignedMessage = oSignedData.CoSignCades(oSigner, cadesplugin.CADESCOM_CADES_BES);\n\n\t\t\t\t\tresolve(sSignedMessage);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Проверить подпись.\n\t * @param {string} dataBase64\n\t * @param {string} signBase64 существующая подпись\n\t * @returns {Promise} true или reject\n\t */\n\tthis.verifySign = function(dataBase64, signBase64){\n\t\tif(canAsync) {\n\t\t\tlet oSignedData;\n\t\t\treturn cadesplugin.then(function(){\n\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAdESCOM.CadesSignedData\");\n\t\t\t}).then(function(object){\n\t\t\t\toSignedData = object;\n\n\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\treturn oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n\t\t\t}).then(function(){\n\t\t\t\treturn oSignedData.propset_Content(dataBase64);\n\t\t\t}).then(function(){\n\t\t\t\treturn oSignedData.VerifyCades(signBase64, cadesplugin.CADESCOM_CADES_BES, true);\n\t\t\t}).then(function(){\n\t\t\t\t//console.log('sign2: %s', sign2);\n\t\t\t\treturn true;\n\t\t\t}).catch(function(e){\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oSignedData = cadesplugin.CreateObject(\"CAdESCOM.CadesSignedData\");\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\toSignedData.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\toSignedData.Content = dataBase64;\n\t\t\t\t\toSignedData.VerifyCades(signBase64, cadesplugin.CADESCOM_CADES_BES, true);\n\t\t\t\t\tresolve(true);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Шифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {string} certThumbprint SHA1 отпечаток сертификата\n\t * @returns {Promise} base64 enveloped data\n\t */\n\tthis.encryptData = function(dataBase64, certThumbprint) {\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oEnvelop, oRecipients;\n\t\t\treturn getCertificateObject(certThumbprint)\n\t\t\t.then(certificate => {\n\t\t\t\toCertificate = certificate;\n\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAdESCOM.CPEnvelopedData\");\n\t\t\t})\n\t\t\t.then(envelop => {\n\t\t\t\toEnvelop = envelop;\n\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\treturn oEnvelop.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n\t\t\t})\n\t\t\t.then(() => oEnvelop.propset_Content(dataBase64))\n\t\t\t.then(() => oEnvelop.Recipients)\n\t\t\t.then(recipients => {\n\t\t\t\toRecipients = recipients;\n\t\t\t\treturn oRecipients.Clear();\n\t\t\t})\n\t\t\t.then(() => oRecipients.Add(oCertificate))\n\t\t\t.then(() => oEnvelop.Encrypt())\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint);\n\t\t\t\t\tconst oEnvelop = cadesplugin.CreateObject(\"CAdESCOM.CPEnvelopedData\");\n\t\t\t\t\toEnvelop.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\toEnvelop.Content = dataBase64;\n\t\t\t\t\toEnvelop.Recipients.Clear();\n\t\t\t\t\toEnvelop.Recipients.Add(oCertificate);\n\t\t\t\t\tconst encryptedData = oEnvelop.Encrypt();\n\t\t\t\t\tresolve(encryptedData);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Дешифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {string} certThumbprint SHA1 отпечаток сертификата\n\t * @param {string} pin будет запрошен, если отсутствует\n\t * @returns {Promise} base64\n\t */\n\tthis.decryptData = function(dataBase64, certThumbprint, pin) {\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oEnvelop, oRecipients;\n\t\t\treturn getCertificateObject(certThumbprint, pin)\n\t\t\t.then(certificate => {\n\t\t\t\toCertificate = certificate;\n\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAdESCOM.CPEnvelopedData\");\n\t\t\t})\n\t\t\t.then(envelop => {\n\t\t\t\toEnvelop = envelop;\n\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\treturn oEnvelop.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n\t\t\t})\n\t\t\t// .then(() => oEnvelop.propset_Content(dataBase64))\n\t\t\t.then(() => oEnvelop.Recipients)\n\t\t\t.then(recipients => {\n\t\t\t\toRecipients = recipients;\n\t\t\t\treturn oRecipients.Clear();\n\t\t\t})\n\t\t\t.then(() => oRecipients.Add(oCertificate))\n\t\t\t.then(() => oEnvelop.Decrypt(dataBase64))\n\t\t\t.then(() => oEnvelop.Content)\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint, pin);\n\t\t\t\t\tconst oEnvelop = cadesplugin.CreateObject(\"CAdESCOM.CPEnvelopedData\");\n\t\t\t\t\toEnvelop.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\t// oEnvelop.Content = dataBase64;\n\t\t\t\t\toEnvelop.Recipients.Clear();\n\t\t\t\t\toEnvelop.Recipients.Add(oCertificate);\n\t\t\t\t\toEnvelop.Decrypt(dataBase64);\n\t\t\t\t\tresolve(oEnvelop.Content);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tfunction hasContainerStore() {\n\t\t//В версии плагина 2.0.13292+ есть возможность получить сертификаты из\n\t\t//закрытых ключей и не установленных в хранилище\n\t\t// но не смотря на это, все равно приходится собирать список сертификатов\n\t\t// старым и новым способом тк в новом будет отсутствовать часть старого\n\t\t// предположительно ГОСТ-2001 с какими-то определенными Extended Key Usage OID\n\n\t\treturn versionCompare(pluginVersion, '2.0.13292') >= 0;\n\t}\n\n\tfunction fetchCertsFromStore(oStore, skipIds = []) {\n\t\tif (canAsync) {\n\t\t\tlet oCertificates;\n\t\t\treturn oStore.Certificates.then(certificates => {\n\t\t\t\toCertificates = certificates;\n\t\t\t\treturn certificates.Count;\n\t\t\t}).then(count => {\n\t\t\t\tconst certs = [];\n\t\t\t\tfor (let i = 1; i <= count; i++) certs.push(oCertificates.Item(i));\n\t\t\t\treturn Promise.all(certs);\n\t\t\t}).then(certificates => {\n\t\t\t\tconst certs = [];\n\t\t\t\tfor (let i in certificates) certs.push(certificates[i].SubjectName, certificates[i].Thumbprint);\n\t\t\t\treturn Promise.all(certs);\n\t\t\t}).then(subjects => {\n\t\t\t\tconst certs = [];\n\t\t\t\tfor (let i = 0; i < subjects.length; i += 2) {\n\t\t\t\t\tconst id = subjects[i + 1];\n\t\t\t\t\tif (skipIds.indexOf(id) + 1) break;\n\t\t\t\t\tconst oDN = string2dn(subjects[i]);\n\t\t\t\t\tcerts.push({\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tname: formatCertificateName(oDN)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn certs;\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tconst oCertificates = oStore.Certificates;\n\t\t\tconst certs = [];\n\t\t\tfor (let i = 1; i <= oCertificates.Count; i++) {\n\t\t\t\tconst oCertificate = oCertificates.Item(i);\n\t\t\t\tconst id = oCertificate.Thumbprint;\n\t\t\t\tif (skipIds.indexOf(id) + 1) break;\n\t\t\t\tconst oDN = string2dn(oCertificate.SubjectName);\n\t\t\t\tcerts.push({\n\t\t\t\t\tid,\n\t\t\t\t\tname: formatCertificateName(oDN)\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn certs;\n\t\t}\n\t}\n\n\tfunction findCertInStore(oStore, certThumbprint) {\n\t\tif(canAsync) {\n\t\t\treturn oStore.Certificates\n\t\t\t\t.then(certificates => certificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, certThumbprint))\n\t\t\t\t.then(certificates => certificates.Count.then(count => {\n\t\t\t\t\tif (count === 1) {\n\t\t\t\t\t\treturn certificates.Item(1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t}\n\t\telse {\n\t\t\tconst oCertificates = oStore.Certificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, certThumbprint);\n\t\t\tif (oCertificates.Count === 1) {\n\t\t\t\treturn oCertificates.Item(1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getCertificateObject(certThumbprint, pin) {\n\t\tif(canAsync) {\n\t\t\tlet oStore, oCertificate;\n\t\t\treturn cadesplugin\n\t\t\t.then(() => cadesplugin.CreateObjectAsync(\"CAPICOM.Store\")) //TODO: CADESCOM.Store ?\n\t\t\t.then(o => {\n\t\t\t\toStore = o;\n\t\t\t\treturn oStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,\n\t\t\t\t\t\t\t\t cadesplugin.CAPICOM_MY_STORE,\n\t\t\t\t\t\t\t\t cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t})\n\t\t\t.then(() => findCertInStore(oStore, certThumbprint))\n\t\t\t.then(cert => oStore.Close().then(() => {\n\t\t\t\tif (!cert && hasContainerStore()) return oStore.Open(cadesplugin.CADESCOM_CONTAINER_STORE)\n\t\t\t\t\t.then(() => findCertInStore(oStore, certThumbprint))\n\t\t\t\t\t.then(c => oStore.Close().then(() => c));\n\t\t\t\telse return cert;\n\t\t\t}))\n\t\t\t.then(certificate => {\n\t\t\t\tif(!certificate) {\n\t\t\t\t\tthrow new Error(\"Не обнаружен сертификат c отпечатком \" + certThumbprint);\n\t\t\t\t}\n\t\t\t\treturn oCertificate = certificate;\n\t\t\t})\n\t\t\t.then(() => oCertificate.HasPrivateKey())\n\t\t\t.then(hasKey => {\n\t\t\t\tlet p = Promise.resolve();\n\t\t\t\tif (hasKey && pin) {\n\t\t\t\t\tp = p.then(() => oCertificate.PrivateKey).then(privateKey => Promise.all([\n\t\t\t\t\t\tprivateKey.propset_KeyPin(pin ? pin : ''),\n\t\t\t\t\t\tprivateKey.propset_CachePin(binded)\n\t\t\t\t\t]));\n\t\t\t\t}\n\t\t\t\treturn p;\n\t\t\t})\n\t\t\t.then(() => oCertificate);\n\t\t}\n\t\telse {\n\t\t\tlet oCertificate;\n\t\t\tconst oStore = cadesplugin.CreateObject(\"CAPICOM.Store\");\n\t\t\toStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,\n\t\t\t\t\t\tcadesplugin.CAPICOM_MY_STORE,\n\t\t\t\t\t\tcadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\toCertificate = findCertInStore(oStore, certThumbprint);\n\t\t\toStore.Close();\n\n\t\t\tif (!oCertificate && hasContainerStore()) {\n\t\t\t\toStore.Open(cadesplugin.CADESCOM_CONTAINER_STORE);\n\t\t\t\toCertificate = findCertInStore(oStore, certThumbprint);\n\t\t\t\toStore.Close();\n\t\t\t}\n\n\t\t\tif(!oCertificate) {\n\t\t\t\tthrow new Error(\"Не обнаружен сертификат c отпечатком \" + certThumbprint);\n\t\t\t}\n\n\t\t\tif (oCertificate.HasPrivateKey && pin) {\n\t\t\t\toCertificate.PrivateKey.KeyPin = pin ? pin : '';\n\t\t\t\tif(oCertificate.PrivateKey.CachePin !== undefined) {\n\t\t\t\t\t// возможно не поддерживается в ИЕ\n\t\t\t\t\t// https://www.cryptopro.ru/forum2/default.aspx?g=posts&t=10170\n\t\t\t\t\toCertificate.PrivateKey.CachePin = binded;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn oCertificate;\n\t\t}\n\t}\n\n\t/**\n\t * Получить текст ошибки\n\t * @param {Error} e\n\t * @returns {string}\n\t */\n\tfunction getError(e) {\n\t\tconsole.log('Crypto-Pro error', e.message || e);\n\t\tif(e.message) {\n\t\t\tfor(var i in cadesErrorMesages) {\n\t\t\t\tif(cadesErrorMesages.hasOwnProperty(i)) {\n\t\t\t\t\tif(e.message.indexOf(i) + 1) {\n\t\t\t\t\t\te.message = cadesErrorMesages[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn e.message || e;\n\t}\n\n\t/**\n\t * Разобрать субъект в объект DN\n\t * @param {string} subjectName\n\t * @returns {DN}\n\t */\n\tfunction string2dn(subjectName){\n\t\tvar dn = new DN;\n\t\tvar pairs = subjectName.match(/([а-яёА-ЯЁa-zA-Z0-9\\.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g).map(el => el.replace(/,$/, ''));\n\t\tpairs.forEach(pair => {\n\t\t\tvar d = pair.match(/([^=]+)=(.*)/);\n\t\t\tif (d.length === 3) {\n\t\t\t\tvar rdn = d[1].trim().replace(/^OID\\./, '');\n\t\t\t\tvar val = d[2].trim().replace(/^\"(.*)\"$/, '$1');\n\t\t\t\tdn[rdn] = val;\n\t\t\t}\n\t\t});\n\t\treturn convertDN(dn);\n\t}\n\n\t/**\n\t * Получить название сертификата\n\t * @param {DN} o объект, включающий в себя значения всех полей сертификата с латинскими ключами\n\t * @see convertDN\n\t * @returns {String}\n\t */\n\tfunction formatCertificateName(o) {\n\t\tvar snils = o['SNILS'];\n\t\tvar inn = o['INN'];\n\t\treturn '' + o['CN'] + (inn ? '; ИНН ' + inn : '') + (snils ? '; СНИЛС ' + snils : '');\n\t}\n\n\t/**\n\t * https://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array/28227607#28227607\n\t * @param {string} str\n\t * @returns {Array}\n\t */\n\tfunction stringToUtf8ByteArray(str) {\n\t\t// TODO(user): Use native implementations if/when available\n\t\tvar out = [], p = 0;\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tvar c = str.charCodeAt(i);\n\t\t\tif (c < 128) {\n\t\t\t\tout[p++] = c;\n\t\t\t}\n\t\t\telse if (c < 2048) {\n\t\t\t\tout[p++] = (c >> 6) | 192;\n\t\t\t\tout[p++] = (c & 63) | 128;\n\t\t\t}\n\t\t\telse if (\n\t\t\t\t\t((c & 0xFC00) == 0xD800) && (i + 1) < str.length &&\n\t\t\t\t\t((str.charCodeAt(i + 1) & 0xFC00) == 0xDC00)) {\n\t\t\t\t// Surrogate Pair\n\t\t\t\tc = 0x10000 + ((c & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF);\n\t\t\t\tout[p++] = (c >> 18) | 240;\n\t\t\t\tout[p++] = ((c >> 12) & 63) | 128;\n\t\t\t\tout[p++] = ((c >> 6) & 63) | 128;\n\t\t\t\tout[p++] = (c & 63) | 128;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout[p++] = (c >> 12) | 224;\n\t\t\t\tout[p++] = ((c >> 6) & 63) | 128;\n\t\t\t\tout[p++] = (c & 63) | 128;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n}\n\nexport default CryptoPro;\n","export default {\n ALREADY_LOGGED_IN: 'Пользователь уже авторизован',\n ASN1_ERROR: 'Ошибка разбора структуры ASN1',\n BAD_PARAMS: 'Неправильные параметры',\n BASE64_DECODE_FAILED: 'Ошибка декодирования из base64',\n CA_CERTIFICATES_NOT_FOUND: 'Корневые сертификаты отсутствуют',\n CANNOT_SAVE_PIN_IN_CACHE: 'Невозможно сохранить PIN-код',\n CANT_HARDWARE_VERIFY_CMS: 'Проверка множественной подписи с вычислением хеша на устройстве не поддерживается',\n CEK_NOT_AUTHENTIC: 'Контейнер в формате CMS поврежден или переданный ключ не является ключом получателя',\n CERTIFICATE_CATEGORY_BAD: 'Некорректная категория сертификата',\n CERTIFICATE_EXISTS: 'Сертификат с таким телом уже существует на устройстве',\n CERTIFICATE_HASH_NOT_UNIQUE: 'Идентификатор сертификата не уникален',\n CERTIFICATE_NOT_FOUND: 'Сертификат не найден на устройстве',\n CERTIFICATE_VERIFICATION_ERROR: 'Ошибка проверки сертификата',\n DATA_INVALID: 'Неверные данные',\n DEVICE_ERROR: 'Ошибка устройства.',\n DEVICE_NOT_FOUND: 'Устройство не найдено',\n FUNCTION_FAILED: 'Невозможно выполнить операцию',\n FUNCTION_REJECTED: 'Операция отклонена пользователем',\n KEY_FUNCTION_NOT_PERMITTED: 'Операция запрещена для данного типа ключа',\n KEY_ID_NOT_UNIQUE: 'Идентификатор ключевой пары не уникален',\n KEY_LABEL_NOT_UNIQUE: 'Метка ключевой пары не уникальна',\n KEY_NOT_FOUND: 'Не найдена соответствующая ключевая пара.',\n LICENCE_READ_ONLY: 'Лицензия доступна только для чтения',\n NOT_ENOUGH_MEMORY: 'Недостаточно памяти',\n PEM_ERROR: 'Ошибка декодирования PEM',\n PIN_CHANGED: 'PIN-код был изменен извне',\n PIN_INCORRECT: 'Введен неправильный PIN-код',\n PIN_INVALID: 'PIN-код содержит недопустимые символы',\n PIN_LENGTH_INVALID: 'Введен слишком короткий PIN-код',\n PIN_LOCKED: 'PIN-код заблокирован',\n PKCS11_LOAD_FAILED: 'Не удалось загрузить модуль PKCS#11',\n SESSION_INVALID: 'Текущая сессия устарела',\n TOKEN_INVALID: 'Ошибка чтения/записи устройства.',\n UNSUPPORTED_BY_TOKEN: 'Операция не поддерживается токеном',\n USER_NOT_LOGGED_IN: 'Пользователь не авторизован',\n USER_PIN_NOT_INITIALIZED: 'PIN-код пользователя не инициализирован',\n WRONG_KEY_TYPE: 'Неправильный тип ключа',\n X509_AKID_ISSUER_SERIAL_MISMATCH: 'Несовпадение серийного номера субьекта и доверенного центра',\n X509_AKID_SKID_MISMATCH: 'Несовпадение идентификатора ключа у субьекта и доверенного центра',\n X509_APPLICATION_VERIFICATION: 'Ошибка проверки приложения',\n X509_CERT_CHAIN_TOO_LONG: 'Слишком длинная цепочка сертификатов',\n X509_CERT_HAS_EXPIRED: 'Срок действия сертификата истек',\n X509_CERT_NOT_YET_VALID: 'Срок действия сертификата еще не начался',\n X509_CERT_REJECTED: 'Сертифкат отклонен',\n X509_CERT_REVOKED: 'Сертификат отозван',\n X509_CERT_SIGNATURE_FAILURE: 'Неверная подпись сертификата',\n X509_CERT_UNTRUSTED: 'Недоверенный сертификат',\n X509_CRL_HAS_EXPIRED: 'Срок действия CRL истек',\n X509_CRL_NOT_YET_VALID: 'Срок действия CRL еще не начался',\n X509_CRL_PATH_VALIDATION_ERROR: 'Неправильный путь CRL',\n X509_CRL_SIGNATURE_FAILURE: 'Неверная подпись CRL',\n X509_DEPTH_ZERO_SELF_SIGNED_CERT: 'Недоверенный самоподписанный сертификат',\n X509_DIFFERENT_CRL_SCOPE: 'Другая область CRL',\n X509_ERROR_IN_CERT_NOT_AFTER_FIELD: 'Некорректные данные в поле \"notAfter\" у сертификата',\n X509_ERROR_IN_CERT_NOT_BEFORE_FIELD: 'Некорректные данные в поле \"notBefore\" у сертификата',\n X509_ERROR_IN_CRL_LAST_UPDATE_FIELD: 'Некорректные данные в поле \"lastUpdate\" у CRL',\n X509_ERROR_IN_CRL_NEXT_UPDATE_FIELD: 'Некорректные данные в поле \"nextUpdate\" у CRL',\n X509_EXCLUDED_VIOLATION: 'Неправильная структура сертфиката',\n X509_INVALID_CA: 'Неверный корневой сертификат',\n X509_INVALID_EXTENSION: 'Неверное или некорректное расширение сертификата',\n X509_INVALID_NON_CA: 'Неверный некорневой сертфикат, помеченный как корневой',\n X509_INVALID_POLICY_EXTENSION: 'Неверное или некорректное расширение политик сертификата',\n X509_INVALID_PURPOSE: 'Неподдерживаемое назначение сертификата',\n X509_KEYUSAGE_NO_CERTSIGN: 'Ключ не может быть использован для подписи сертификатов',\n X509_KEYUSAGE_NO_CRL_SIGN: 'Ключ не может быть использован для подписи CRL',\n X509_KEYUSAGE_NO_DIGITAL_SIGNATURE: 'Ключ не может быть использован для цифровой подписи',\n X509_NO_EXPLICIT_POLICY: 'Явные политики отсутствуют',\n X509_OUT_OF_MEM: 'Нехватает памяти',\n X509_PATH_LENGTH_EXCEEDED: 'Превышена длина пути',\n X509_PERMITTED_VIOLATION: 'Неправильная структура сертифката',\n X509_PROXY_CERTIFICATES_NOT_ALLOWED: 'Проксирующие сертификаты недопустимы',\n X509_PROXY_PATH_LENGTH_EXCEEDED: 'Превышина длина пути прокси',\n X509_SELF_SIGNED_CERT_IN_CHAIN: 'В цепочке обнаружен недоверенный самоподписанный сертификат',\n X509_SUBJECT_ISSUER_MISMATCH: 'Несовпадения субьекта и эмитента',\n X509_SUBTREE_MINMAX: 'Неправильная структура сертифката',\n X509_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: 'Невозможно раскодировать открытый ключ эмитента',\n X509_UNABLE_TO_DECRYPT_CERT_SIGNATURE: 'Невозможно расшифровать подпись сертификата',\n X509_UNABLE_TO_DECRYPT_CRL_SIGNATURE: 'Невозможно расшифровать подпись CRL',\n X509_UNABLE_TO_GET_CRL: 'Невозможно получить CRL',\n X509_UNABLE_TO_GET_CRL_ISSUER: 'Невозможно получить CRL подписанта',\n X509_UNABLE_TO_GET_ISSUER_CERT: 'Невозможно получить сертификат подписанта',\n X509_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: 'Невозможно получить локальный сертификат подписанта',\n X509_UNABLE_TO_VERIFY_LEAF_SIGNATURE: 'Невозможно проверить первый сертификат',\n X509_UNHANDLED_CRITICAL_CRL_EXTENSION: 'Неподдерживаемое расширение CRL',\n X509_UNHANDLED_CRITICAL_EXTENSION: 'Неподдерживаемое расширение',\n X509_UNNESTED_RESOURCE: 'RFC 3779 неправильное наследование ресурсов',\n X509_UNSUPPORTED_CONSTRAINT_SYNTAX: 'Неправильная структура сертифката',\n X509_UNSUPPORTED_CONSTRAINT_TYPE: 'Неправильная структура сертфиката',\n X509_UNSUPPORTED_EXTENSION_FEATURE: 'Неподдерживаемое расширение возможностей',\n X509_UNSUPPORTED_NAME_SYNTAX: 'Неправильная структура сертфиката'\n};","/**\n * RuToken simplified library\n * @author Aleksandr.ru\n * @link http://aleksandr.ru\n */\n\nimport rutoken from 'rutoken';\nimport DN from '../DN';\nimport errors from './errors';\nimport { convertDN, stripDnQuotes } from '../helpers';\n\nconst requiredFunctions = [\n\t'cmsDecrypt',\n\t'cmsEncrypt',\n\t'createPkcs10',\n\t'deleteCertificate',\n\t'deleteKeyPair',\n\t'enumerateCertificates',\n\t'enumerateDevices',\n\t'enumerateKeys',\n\t'generateKeyPair',\n\t'getCertificate',\n\t'getCertificateInfo',\n\t'getDeviceInfo',\n\t'getDeviceModel',\n\t'getDeviceType',\n\t'getKeyByCertificate',\n\t'importCertificate',\n\t'login',\n\t'logout',\n\t'parseCertificate',\n\t'sign',\n\t'verify'\n];\n\nfunction RuToken() {\n\tvar plugin, deviceId;\n\n\t/**\n\t * Инициализация и проверка наличия требуемых возможностей\n\t * @returns {Promise} версия, информация о токене\n\t */\n\tthis.init = function(){\n\t\treturn rutoken.ready.then( _ => {\n\t\t\tif (window.chrome) {\n\t\t\t\treturn rutoken.isExtensionInstalled();\n\t\t\t} else {\n\t\t\t\treturn Promise.resolve(true);\n\t\t\t}\n\t\t}).then(result => {\n\t\t\tif (result) {\n\t\t\t\treturn rutoken.isPluginInstalled();\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Rutoken Extension wasn't found\");\n\t\t\t}\n\t\t}).then(result => {\n\t\t\tif (result) {\n\t\t\t\treturn rutoken.loadPlugin();\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Rutoken Plugin wasn't found\");\n\t\t\t}\n\t\t}).then(result => {\n\t\t\tconst absentFn = requiredFunctions.filter(fn => !result[fn]);\n\t\t\tif (absentFn.length) {\n\t\t\t\tconsole.log('Missing plugin functions: ', absentFn);\n\t\t\t\tthrow new Error(\"Отсутствует функционал, убедитесь, что у вас установлен Рутокен Плагин и вы используете Рутокен ЭЦП 2.0\");\n\t\t\t}\n\t\t\t//Можно начинать работать с плагином\n\t\t\tplugin = result;\n\t\t\treturn plugin.enumerateDevices();\n\t\t}).then(devices => {\n\t\t\tconst len = devices.length;\n\t\t\tif (len === 1) {\n\t\t\t\tdeviceId = devices.shift();\n\t\t\t}\n\t\t\telse if(len === 0) {\n\t\t\t\tthrow new Error(\"Не обнаружено подключенных устройств\");\n\t\t\t}\n\t\t\telse if(len > 1) {\n\t\t\t\tthrow new Error('Подключено ' + len + ' устройств');\n\t\t\t}\n\t\t\treturn Promise.all([\n\t\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_READER), // имя считывателя \n\t\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_LABEL), // метка токена \t\t\t\t\t\n\t\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_SERIAL), // серийный номер токена\n\t\t\t\tplugin.getDeviceModel(deviceId),\n\t\t\t\tplugin.getDeviceType(deviceId)\n\t\t\t]);\n\t\t}).then(infos => {\n\t\t\treturn {\n\t\t\t\tversion: plugin.version,\n\t\t\t\tserial: infos[2],\n\t\t\t\treader: infos[0],\n\t\t\t\tlabel: infos[1].indexOf('Rutoken ECP ') + 1 ? '' : infos[1],\n\t\t\t\ttype: infos[4],\n\t\t\t\tmodel: infos[3]\n\t\t\t};\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Авторизация на токене с пин-кодом юзера\n\t * @param {string} userPin если нет, то предлгает ввести пин через prompt\n\t * @returns {Promise}\n\t */\n\tthis.bind = function(userPin) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_IS_LOGGED_IN).then(result => {\n\t\t\t\tif(result) {\n\t\t\t\t\tresolve('Пользователь уже авторизован');\n\t\t\t\t\treturn false; // no need to log in\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!userPin) {\n\t\t\t\t\t\tuserPin = prompt('PIN-код доступа к устройству');\n\t\t\t\t\t\tif (!userPin) throw new Error('Авторизация на устройстве отменена пользователем');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true; // need to log in \n\t\t\t}).then(needToLogIn => {\n\t\t\t\tif (needToLogIn) {\n\t\t\t\t\treturn plugin.login(deviceId, userPin).then( _ => {\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresolve(true);\n\t\t\t\t}\n\t\t\t}).then(null, e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\treject(err);\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Отменить предъявление PIN-кода. Необходимо вызывать при завершении сеанса работы\n\t * @returns {Promise}\n\t */\n\tthis.unbind = function() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_IS_LOGGED_IN).then(result => {\n\t\t\t\tif(!result) {\n\t\t\t\t\tresolve('Пользователь не авторизован');\n\t\t\t\t\treturn false; // no need to log out\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn true; // need to log out \n\t\t\t\t}\n\t\t\t}).then(needToLogOut => {\n\t\t\t\tif (needToLogOut) {\n\t\t\t\t\treturn plugin.logout(deviceId).then( _ => {\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}).then(null, e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\treject(err);\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Очистка токена (удаление всех сертификатов и ключей)\n\t * @returns {Promise} количество удаленных элементов\n\t */\n\tthis.clean = function(){\n\t\tlet count = 0;\n\t\treturn plugin.enumerateCertificates(deviceId, plugin.CERT_CATEGORY_USER).then(results => {\n\t\t\tlet promises = [];\n\t\t\tfor (let i in results) {\n\t\t\t\tconst certId = results[i];\n\t\t\t\tpromises.push(plugin.deleteCertificate(deviceId, certId));\n\t\t\t}\n\t\t\tcount += promises.length;\n\t\t\treturn Promise.all(promises);\n\t\t}).then(() => {\n\t\t\tconst marker = ''; // Идентификатор группы ключей, \"\" - все ключи\n\t\t\treturn plugin.enumerateKeys(deviceId, marker);\n\t\t}).then(results => {\n\t\t\tlet promises = [];\n\t\t\tfor (let i in results) {\n\t\t\t\tconst keyId = results[i];\n\t\t\t\tpromises.push(plugin.deleteKeyPair(deviceId, keyId));\n\t\t\t}\n\t\t\tcount += promises.length;\n\t\t\treturn Promise.all(promises);\n\t\t}).then(() => {\n\t\t\treturn count;\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Создать запрос на сертификат\n\t * @param {DN} dn\n\t * @param {string} marker Идентификатор группы ключей\n\t * @param {array} extKeyUsage массив OID Extended Key Usage, по-умолчанию Аутентификация клиента '1.3.6.1.5.5.7.3.2' + Защищенная электронная почта '1.3.6.1.5.5.7.3.4'\n\t * @param {string} algorithm Алгоритм \"PUBLIC_KEY_ALGORITHM_GOST3410_2012_256\" (по-умолчанию) или \"PUBLIC_KEY_ALGORITHM_GOST3410_2001\".\n\t * @returns {Promise} объект с полями { csr: 'base64 запрос на сертификат', containerId }\n\t * @see DN\n\t */\n\tthis.generateCSR = function(dn, marker, extKeyUsage, algorithm){\n\t\tlet keyId = '';\n\t\tif (!marker) {\n\t\t\tmarker = '';\n\t\t}\n\t\tif (!extKeyUsage || !extKeyUsage.length) {\n\t\t\textKeyUsage = [\n\t\t\t\t'clientAuth', // 1.3.6.1.5.5.7.3.2', // Аутентификация клиента\n\t\t\t\t'emailProtection', // '1.3.6.1.5.5.7.3.4' // Защищенная электронная почта\n\t\t\t];\n\t\t}\n\t\tconst publicKeyAlgorithm = algorithm && plugin[algorithm] || plugin.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256;\n\t\tlet paramset = 'XA';\n\t\tlet hashAlgorithm = plugin.HASH_TYPE_GOST3411_94;\n\t\tif (publicKeyAlgorithm === plugin.PUBLIC_KEY_ALGORITHM_GOST3410_2012_512) {\n\t\t\tparamset = 'A';\n\t\t\thashAlgorithm = plugin.HASH_TYPE_GOST3411_12_512;\n\t\t} \n\t\telse if (publicKeyAlgorithm === plugin.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256) {\n\t\t\thashAlgorithm = plugin.HASH_TYPE_GOST3411_12_256;\n\t\t}\n\t\tconst reserved = undefined;\n\t\tconst options = {\n\t\t\tpublicKeyAlgorithm,\n\t\t\tparamset\n\t\t};\n\t\treturn plugin.generateKeyPair(deviceId, reserved, marker, options).then(result => {\n\t\t\tkeyId = result;\n\t\t\tlet subject = [];\n\t\t\tfor (let i in dn) if(dn.hasOwnProperty(i)) {\n\t\t\t\tsubject.push({\n\t\t\t\t\trdn: i,\n\t\t\t\t\tvalue: dn[i]\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst keyUsage = [\n\t\t\t\t\"digitalSignature\"\n\t\t\t\t,\"nonRepudiation\"\n\t\t\t\t,\"keyEncipherment\"\n\t\t\t\t,\"dataEncipherment\"\n\t\t\t];\n\t\t\tconst extensions = {\n\t\t\t\tkeyUsage,\n\t\t\t\textKeyUsage\n\t\t\t};\n\t\t\tconst subjectSignTool = 'СКЗИ \"РУТОКЕН ЭЦП\"';\n\t\t\tconst options = {\n\t\t\t\tsubjectSignTool,\n\t\t\t\thashAlgorithm\n\t\t\t};\n\t\t\treturn plugin.createPkcs10(deviceId, keyId, subject, extensions, options);\n\t\t}).then(result => {\n\t\t\treturn {\n\t\t\t\tcsr: cleanPemString(result),\n\t\t\t\tkeyPairId: keyId\n\t\t\t};\n\t\t}).then(null, e => {\n\t\t\tif(keyId) {\n\t\t\t\tplugin.deleteKeyPair(deviceId, keyId);\n\t\t\t}\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Записать сертификат на токен\n\t * @param {string} certificate base64(массив байт со значением сертификата в формате DER)\n\t * @returns {Promise}\n\t */\n\tthis.writeCertificate = function(certificate){\n\t\tconst category = plugin.CERT_CATEGORY_USER;\n\t\treturn plugin.importCertificate(deviceId, certificate, category).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Получение информации о сертификате.\n\t * @param {int} certId идентификатор сертификата\n\t * @returns {Promise}\n\t */\n\tthis.certificateInfo = function(certId){\n\t\tlet hasPrivateKey = false;\n\t\tlet serialNumber = '';\n\t\treturn new Promise(resolve => {\n\t\t\tplugin.getKeyByCertificate(deviceId, certId).then(keyId => {\n\t\t\t\tresolve(!!keyId);\n\t\t\t}).then(null, e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tconsole.log('getKeyByCertificate', certId, err);\n\t\t\t\tresolve(false);\n\t\t\t});\n\t\t}).then(result => {\n\t\t\thasPrivateKey = result;\n\t\t\treturn plugin.getCertificateInfo(deviceId, certId, plugin.CERT_INFO_SERIAL_NUMBER);\n\t\t}).then(result => {\n\t\t\tserialNumber = result;\n\t\t\treturn plugin.parseCertificate(deviceId, certId);\n\t\t}).then(o => {\n\t\t\tconst ver = o.text.match(/Version: (\\d+)/);\n\t\t\tconst version = ver.length > 1 ? ver[1] : undefined;\n\t\t\tconst algo = o.text.match(/Public Key Algorithm: (.+)$/m);\n\t\t\tconst keyAlgorithm = algo.length > 1 ? algo[1] : '';\n\t\t\tconst dn = makeDN(o.subject);\n\t\t\tconst dnI = makeDN(o.issuer);\n\t\t\tconst dt = new Date();\n\t\t\tconst info = {\n\t\t\t\tName: dn.commonName || dn.CN,\n\t\t\t\tIssuer: dnI,\n\t\t\t\tIssuerName: stripDnQuotes(dnI.toString()),\n\t\t\t\tSubject: dn,\n\t\t\t\tSubjectName: stripDnQuotes(dn.toString()),\n\t\t\t\tVersion: version,\n\t\t\t\tAlgorithm: keyAlgorithm,\n\t\t\t\tSerialNumber: serialNumber,\n\t\t\t\tThumbprint: certId.replace(/\\:/g, ''),\n\t\t\t\tValidFromDate: new Date(o.validNotBefore),\n\t\t\t\tValidToDate: new Date(o.validNotAfter),\n\t\t\t\tHasPrivateKey: hasPrivateKey,\n\t\t\t\tIsValid: dt >= new Date(o.validNotBefore) && dt <= new Date(o.validNotAfter),\n\t\t\t\t//ProviderName: '', //TODO\n\t\t\t\t//ProviderType: undefined, //TODO\n\t\t\t\ttoString: function(){\n\t\t\t\t\treturn 'Название: ' + this.Name +\n\t\t\t\t\t\t'\\nИздатель: ' + this.IssuerName +\n\t\t\t\t\t\t'\\nСубъект: ' + this.SubjectName +\n\t\t\t\t\t\t'\\nВерсия: ' + this.Version +\n\t\t\t\t\t\t'\\nАлгоритм: ' + this.Algorithm + // PublicKey Algorithm\n\t\t\t\t\t\t'\\nСерийный №: ' + this.SerialNumber +\n\t\t\t\t\t\t'\\nОтпечаток SHA1: ' + this.Thumbprint +\n\t\t\t\t\t\t'\\nНе действителен до: ' + this.ValidFromDate +\n\t\t\t\t\t\t'\\nНе действителен после: ' + this.ValidToDate +\n\t\t\t\t\t\t'\\nПриватный ключ: ' + (this.HasPrivateKey ? 'Есть' : 'Нет (или не выполнен вход)') +\n\t\t\t\t\t\t'\\nВалидный: ' + (this.IsValid ? 'Да' : 'Нет');\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn info;\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Получение массива доступных сертификатов\n\t * @returns {Promise} [{id, subject}, ...]\n\t */\n\tthis.listCertificates = function(){\n\t\tlet certIds = [];\n\t\tlet certs = [];\n\t\treturn plugin.enumerateCertificates(deviceId, plugin.CERT_CATEGORY_USER).then(results => {\n\t\t\tcertIds = results;\n\t\t\tlet promises = [];\n\t\t\tfor (let i in certIds) {\n\t\t\t\tpromises.push(plugin.parseCertificate(deviceId, certIds[i]));\n\t\t\t}\n\t\t\treturn Promise.all(promises);\n\t\t}).then(results => {\n\t\t\tfor (let i in certIds) {\n\t\t\t\tcerts.push({\n\t\t\t\t\tid: certIds[i],\n\t\t\t\t\tname: formatCertificateName(results[i])\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn certs;\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\t\n\t/**\n\t * Получить сертификат\n\t * @param {string} certId \n\t * @returns {Promise} base64(массив байт со значением сертификата в формате DER)\n\t */\n\tthis.readCertificate = function(certId){\n\t\treturn plugin.getCertificate(deviceId, certId).then(result => {\n\t\t\treturn cleanPemString(result);\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Подписать данные. Выдает подпись в формате PKCS#7, опционально закодированную в Base64\n\t * @param {string} data данные (и подпись) закодированы в base64\n\t * @param {string} certId идентификатор сертификата\n\t * @returns {Promise} строка-подпись в формате PKCS#7, закодированная в Base64.\n\t */\n\tthis.signData = function(dataBase64, certId){\n\t\tconst detached = true;\n\t\treturn plugin.sign(deviceId, certId, dataBase64, plugin.DATA_FORMAT_BASE64, {\n\t\t\tdetached\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Добавить подпись к существующей.\n\t * @param {string} dataBase64\n\t * @param {string} signBase64 существующая подпись\n\t * @param {string} certId идентификатор сертификата\n\t * @returns {Promise} base64\n\t */\n\tthis.addSign = function(dataBase64, signBase64, certId){\n\t\tconst detached = true;\n\t\tconst CMS = signBase64;\n\t\treturn plugin.sign(deviceId, certId, dataBase64, plugin.DATA_FORMAT_BASE64, {\n\t\t\tdetached,\n\t\t\tCMS\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Проверить подпись.\n\t * @param {string} dataBase64\n\t * @param {string} signBase64 существующая подпись\n\t * @returns {Promise} true или reject\n\t */\n\tthis.verifySign = function(dataBase64, signBase64){\n\t\tconst data = dataBase64;\n\t\tconst base64 = true;\n\t\tconst verifyCertificate = false;\n\t\treturn plugin.verify(deviceId, signBase64, {\n\t\t\tdata,\n\t\t\tbase64,\n\t\t\tverifyCertificate\n\t\t}).then(result => {\n\t\t\tif (!result) {\n\t\t\t\t// потмоу что в крипто-про тоже так\n\t\t\t\tthrow new Error('подпись не верна');\n\t\t\t}\n\t\t\treturn true;\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Шифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {string} certId идентификатор сертификата\n\t * @returns {Promise} base64 enveloped data\n\t */\n\tthis.encryptData = function(dataBase64, certId) {\n\t\treturn plugin.getCertificate(deviceId, certId)\n\t\t.then(cert => plugin.cmsEncrypt(deviceId, \"\", [cert], dataBase64, {\n\t\t\tbase64: true\n\t\t}))\n\t\t.then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Дешифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {string} certId идентификатор сертификата\n\t * @returns {Promise} base64\n\t */\n\tthis.decryptData = function(dataBase64, certId) {\n\t\treturn plugin.getKeyByCertificate(deviceId, certId)\n\t\t.then(keyId => plugin.cmsDecrypt(deviceId, keyId, dataBase64, {\n\t\t\tbase64: true\n\t\t}))\n\t\t.then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Получить ошибку по коду\n\t * @param {string|Error} e код ошибки или объект\n\t * @returns {string} текст ошибки\n\t */\n\tfunction getError(e) {\n\t\tconst ee = e.message && e.message.match(/^[0-9]+$/) && e.message || e;\n\t\tlet mnemo = '';\n\t\tif (plugin) for(let i in plugin.errorCodes) {\n\t\t\tif (plugin.errorCodes[i] == ee) {\n\t\t\t\tmnemo = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn mnemo && errors[mnemo] || mnemo || e.message || e;\n\t}\n\n\t/**\n\t * Создать DN из массива [{rdn: ..., value: ...}, ...]\n\t * @param {[index: number]: { rdn: string, value: string }} obj \n\t * @returns {DN}\n\t */\n\tfunction makeDN(obj)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in obj) {\n\t\t\tvar rdn = obj[i].rdn;\n\t\t\tvar val = obj[i].value;\n\t\t\tif (rdn && val) {\n\t\t\t\tdn[rdn] = val;\n\t\t\t}\n\t\t}\n\t\treturn convertDN(dn);\n\t}\n\n\t/**\n\t * Получить название сертификата\n\t * @param {type} o объект, включающий в себя значения всех полей сертификата.\n\t * @param {type} containerName не обязательно\n\t * @returns {string} \n\t */\n\tfunction formatCertificateName(o, containerName)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in o.subject) {\n\t\t\tvar rdn = o.subject[i].rdn;\n\t\t\tvar val = o.subject[i].value;\n\t\t\tdn[rdn] = val;\n\t\t}\n\t\tdn.toString = function(){\n\t\t\tvar cn = this['commonName'] || this['CN'] || this['2.5.4.3'];\n\t\t\tvar snils = this['СНИЛС'] || this['SNILS'] || this['1.2.643.100.3'];\n\t\t\tvar inn = this['ИНН'] || this['INN'] || this['1.2.643.3.131.1.1'];\n\t\t\treturn '' + cn + (inn ? '; ИНН ' + inn : '') + (snils ? '; СНИЛС ' + snils : '') + (containerName ? ' (' + containerName + ')' : '');\n\t\t};\n\t\treturn dn.toString();\n\t}\n\n\t/**\n\t * Убирает все лишнее из PEM, кроме непрерывного base64 \n\t * @param {String} pem \n\t * @returns {String}\n\t */\n\tfunction cleanPemString(pem) {\n\t\treturn pem.replace(/^-+(BEGIN|END)[^-]+-+$/gm, '').trim();\n\t}\n}\n\nexport default RuToken;\n","import 'console-polyfill';\n\nexport { default as DN } from './DN';\nexport { default as JaCarta } from './JaCarta';\nexport { default as JaCarta2 } from './JaCarta2';\nexport { default as CryptoPro } from './CryptoPro';\nexport { default as RuToken } from './RuToken';\n\nif(module.hot) {\n module.hot.accept();\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://RusCryptoJS/webpack/universalModuleDefinition","webpack://RusCryptoJS/webpack/bootstrap","webpack://RusCryptoJS/./node_modules/core-js/modules/_wks.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_global.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_an-object.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-dp.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_descriptors.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_is-object.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-length.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_fails.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_hide.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-object.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_export.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_redefine.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_has.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_ctx.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-integer.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_core.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_library.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_uid.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_cof.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_property-desc.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-iobject.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iterators.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-keys.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.replace.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.match.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gopn.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_set-to-string-tag.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.array.iterator.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.to-string.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.promise.js","webpack://RusCryptoJS/./node_modules/rutoken/rutoken.min.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_defined.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_classof.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_flags.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-primitive.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_a-function.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-pie.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-absolute-index.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_advance-string-index.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_regexp-exec-abstract.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_shared.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_fix-re-wks.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_regexp-exec.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_dom-create.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gopd.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iobject.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_shared-key.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_enum-bug-keys.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_set-species.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.typed.uint8-array.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_redefine-all.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_an-instance.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_is-array-iter.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-create.js","webpack://RusCryptoJS/./node_modules/core-js/modules/core.get-iterator-method.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_species-constructor.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-detect.js","webpack://RusCryptoJS/./node_modules/core-js/modules/web.dom.iterable.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.string.iterator.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gops.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_string-at.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_ie8-dom-define.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.constructor.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-keys-internal.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-includes.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_is-regexp.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_typed.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_to-index.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-fill.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_html.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gpo.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-methods.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_is-array.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_add-to-unscopables.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-define.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-call.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_task.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_new-promise-capability.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.function.name.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.array.from.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es7.symbol.async-iterator.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_wks-define.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_wks-ext.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.symbol.js","webpack://RusCryptoJS/./node_modules/console-polyfill/index.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.exec.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_inherit-if-required.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_set-proto.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_typed-array.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_typed-buffer.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-dps.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-species-create.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-species-constructor.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-step.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_iter-create.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_array-copy-within.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.flags.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_for-of.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_invoke.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_microtask.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_perform.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_user-agent.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_promise-resolve.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.regexp.split.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.array.find.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.object.keys.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-sap.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_create-property.js","webpack://RusCryptoJS/./node_modules/core-js/modules/es6.object.assign.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-assign.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_meta.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_enum-keys.js","webpack://RusCryptoJS/./node_modules/core-js/modules/_object-gopn-ext.js","webpack://RusCryptoJS/./src/CryptoPro/cadesplugin_api.js","webpack://RusCryptoJS/./src/DN.js","webpack://RusCryptoJS/./src/JaCarta/errors.js","webpack://RusCryptoJS/./src/helpers.js","webpack://RusCryptoJS/./src/JaCarta/index.js","webpack://RusCryptoJS/./src/JaCarta2/errors.js","webpack://RusCryptoJS/./src/JaCarta2/index.js","webpack://RusCryptoJS/./src/CryptoPro/constants.js","webpack://RusCryptoJS/./src/CryptoPro/index.js","webpack://RusCryptoJS/./src/RuToken/errors.js","webpack://RusCryptoJS/./src/RuToken/index.js","webpack://RusCryptoJS/./src/index.js"],"names":["root","factory","exports","module","define","amd","self","this","enumerable","get","getter","value","key","bind","Object","prototype","hasOwnProperty","call","object","property","store","uid","Symbol","USE_SYMBOL","name","global","window","Math","Function","__g","isObject","it","TypeError","anObject","IE8_DOM_DEFINE","toPrimitive","dP","defineProperty","f","O","P","Attributes","e","a","toInteger","min","exec","createDesc","defined","core","hide","redefine","ctx","$export","type","source","own","out","exp","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","IS_BIND","B","target","expProto","undefined","U","W","R","has","SRC","$toString","TPL","split","inspectSource","val","safe","isFunction","join","String","aFunction","fn","that","length","b","c","apply","arguments","ceil","floor","isNaN","version","__e","id","px","random","concat","toString","slice","bitmap","configurable","writable","IObject","$keys","enumBugKeys","keys","toObject","toLength","advanceStringIndex","regExpExec","max","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","REPLACE","$replace","maybeCallNative","searchValue","replaceValue","regexp","res","done","rx","functionalReplace","fullUnicode","unicode","lastIndex","results","result","push","accumulatedResult","nextSourcePosition","i","matched","position","index","captures","j","namedCaptures","groups","replacerArgs","replacement","getSubstitution","str","tailPos","m","symbols","match","ch","capture","charAt","n","MATCH","$match","RegExp","A","matchStr","hiddenKeys","getOwnPropertyNames","def","TAG","tag","stat","addToUnscopables","step","Iterators","toIObject","Array","iterated","kind","_t","_i","_k","Arguments","$flags","DESCRIPTORS","flags","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","LIBRARY","classof","anInstance","forOf","speciesConstructor","task","set","microtask","newPromiseCapabilityModule","perform","userAgent","promiseResolve","process","versions","v8","$Promise","isNode","empty","newPromiseCapability","USE_NATIVE","promise","resolve","FakePromise","constructor","PromiseRejectionEvent","then","indexOf","isThenable","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","exited","handler","fail","reject","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","console","unhandled","isUnhandled","emit","onunhandledrejection","reason","error","_a","v","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","executor","err","onFulfilled","onRejected","C","Promise","r","capability","$$reject","x","iter","all","iterable","values","remaining","$index","alreadyCalled","race","rutoken","t","ready","isExtensionInstalled","isPluginInstalled","loadPlugin","l","rutokenLoaded","s","document","createElement","style","setProperty","innerHTML","setAttribute","body","appendChild","h","y","o","wrapWithOldInterface","p","d","shift","message","originalObject","initialize","navigator","mimeTypes","ActiveXObject","cof","ARG","T","tryGet","callee","ignoreCase","multiline","sticky","valueOf","propertyIsEnumerable","at","builtinExec","mode","copyright","fails","wks","regexpExec","SPECIES","REPLACE_SUPPORTS_NAMED_GROUPS","re","replace","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","KEY","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","nativeMethod","arg2","forceStringMethod","strfn","rxfn","string","arg","re1","re2","regexpFlags","nativeExec","nativeReplace","patchedExec","UPDATES_LAST_INDEX_WRONG","NPCG_INCLUDED","reCopy","is","pIE","gOPD","getOwnPropertyDescriptor","shared","init","data","byteOffset","src","Constructor","forbiddenField","ITERATOR","ArrayProto","dPs","IE_PROTO","Empty","createDict","iframeDocument","iframe","display","contentWindow","open","write","lt","close","create","Properties","getIteratorMethod","D","SAFE_CLOSING","riter","from","skipClosing","arr","next","$iterators","getKeys","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","NAME","explicit","Collection","proto","$at","point","getOwnPropertySymbols","TO_STRING","pos","charCodeAt","inheritIfRequired","gOPN","isRegExp","$RegExp","Base","CORRECT_NEW","tiRE","piRE","fiU","proxy","arrayIndexOf","names","toAbsoluteIndex","IS_INCLUDES","$this","el","fromIndex","Typed","TYPED","VIEW","ABV","ArrayBuffer","DataView","CONSTR","TypedArrayConstructors","number","RangeError","aLen","end","endPos","documentElement","ObjectProto","getPrototypeOf","asc","TYPE","$create","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","callbackfn","isArray","UNSCOPABLES","$iterCreate","setToStringTag","BUGGY","returnThis","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","iterator","ret","defer","channel","port","invoke","html","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","listener","event","args","nextTick","now","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","PromiseCapability","$$resolve","FProto","nameRE","isArrayIter","createProperty","getIterFn","arrayLike","mapfn","mapping","iterFn","wksExt","$Symbol","META","$fails","wksDefine","enumKeys","_create","gOPNExt","$GOPD","$DP","$JSON","JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","isEnum","SymbolRegistry","AllSymbols","OPSymbols","QObject","setter","findChild","setSymbolDesc","protoDesc","wrap","sym","isSymbol","$defineProperty","$defineProperties","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","es6Symbols","wellKnownSymbols","k","keyFor","useSetter","useSimple","defineProperties","replacer","$replacer","prop","method","con","dummy","properties","pop","forced","setPrototypeOf","check","test","buggy","__proto__","$typed","$buffer","propertyDesc","redefineAll","toIndex","createArrayMethod","createArrayIncludes","ArrayIterators","$iterDetect","setSpecies","arrayFill","arrayCopyWithin","Uint8Array","$ArrayBuffer","$DataView","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayFind","arrayFindIndex","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","lastIndexOf","arrayReduce","reduce","arrayReduceRight","reduceRight","arrayJoin","arraySort","sort","arraySlice","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","$map","allocate","LITTLE_ENDIAN","Uint16Array","buffer","FORCED_SET","toOffset","BYTES","offset","validate","speciesFromList","list","fromList","addGetter","internal","$from","$of","TO_LOCALE_BUG","$toLocaleString","copyWithin","start","every","fill","filter","find","predicate","findIndex","forEach","searchElement","includes","separator","map","reverse","middle","some","comparefn","subarray","begin","$begin","BYTES_PER_ELEMENT","$slice","len","isTAIndex","$getDesc","$setDesc","desc","$TypedArrayPrototype$","CLAMPED","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","addElement","round","$offset","$length","byteLength","klass","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","of","Infinity","BaseBuffer","abs","pow","log","LN2","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","NaN","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","view","isLittleEndian","intIndex","_b","pack","conversion","ArrayBufferProto","$setInt8","setInt8","getInt8","setUint8","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","original","descriptor","to","count","inc","BREAK","RETURN","un","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","standalone","toggle","node","createTextNode","observe","characterData","promiseCapability","callRegExpExec","$min","$push","SUPPORTS_Y","SPLIT","$split","internalSplit","limit","lastLength","output","lastLastIndex","splitLimit","separatorCopy","splitter","unicodeMatching","lim","q","z","$find","assign","gOPS","$assign","K","getSymbols","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","windowNames","getWindowNames","cadesplugin","pluginObject","plugin_resolved","plugin_reject","plugin_resolve","isOpera","isFireFox","isSafari","isYandex","canPromise","browserSpecs","check_browser","ru_cryptopro_npcades_10_native_bridge","callbacksCount","callbacks","resultForCallback","callbackId","resultArray","callback","functionName","hasCallback","arrObjs","encodeURIComponent","alert","parentNode","JSModuleVersion","async_spawn","set_pluginObject","set_log_level","getLastError","is_capilite_enabled","isNativeMessageSupported","CreateObjectAsync","ReleasePluginObjects","CreateObject","cadesplugin_load_timeout","check_load_timeout","set_constantValues","current_log_level","LOG_LEVEL_ERROR","check_plugin_working","tem","ua","M","appName","appVersion","splice","cpcsp_console_log","level","msg","LOG_LEVEL_DEBUG","LOG_LEVEL_INFO","info","CAPICOM_MEMORY_STORE","CAPICOM_LOCAL_MACHINE_STORE","CAPICOM_CURRENT_USER_STORE","CADESCOM_MEMORY_STORE","CADESCOM_LOCAL_MACHINE_STORE","CADESCOM_CURRENT_USER_STORE","CADESCOM_CONTAINER_STORE","CAPICOM_MY_STORE","CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED","CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME","CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED","CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING","CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE","CADESCOM_XADES_DEFAULT","CADESCOM_XADES_BES","CADESCOM_XADES_T","CADESCOM_XADES_X_LONG_TYPE_1","CADESCOM_XMLDSIG_TYPE","XmlDsigGost3410UrlObsolete","XmlDsigGost3411UrlObsolete","XmlDsigGost3410Url","XmlDsigGost3411Url","XmlDsigGost3411Url2012256","XmlDsigGost3410Url2012256","XmlDsigGost3411Url2012512","XmlDsigGost3410Url2012512","CADESCOM_CADES_DEFAULT","CADESCOM_CADES_BES","CADESCOM_CADES_T","CADESCOM_CADES_X_LONG_TYPE_1","CADESCOM_PKCS7_TYPE","CADESCOM_ENCODE_BASE64","CADESCOM_ENCODE_BINARY","CADESCOM_ENCODE_ANY","CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT","CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN","CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY","CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME","CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME","CAPICOM_CERTIFICATE_FIND_SHA1_HASH","CAPICOM_CERTIFICATE_FIND_ISSUER_NAME","CAPICOM_CERTIFICATE_FIND_ROOT_NAME","CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME","CAPICOM_CERTIFICATE_FIND_EXTENSION","CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY","CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY","CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY","CAPICOM_CERTIFICATE_FIND_TIME_VALID","CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID","CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED","CAPICOM_CERTIFICATE_FIND_KEY_USAGE","CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE","CAPICOM_PROPID_ENHKEY_USAGE","CAPICOM_OID_OTHER","CAPICOM_OID_KEY_USAGE_EXTENSION","CAPICOM_EKU_CLIENT_AUTH","CAPICOM_EKU_SMARTCARD_LOGON","CAPICOM_EKU_OTHER","CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME","CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME","CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION","CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME","CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME","CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION","CADESCOM_ATTRIBUTE_OTHER","CADESCOM_STRING_TO_UCS2LE","CADESCOM_BASE64_TO_BINARY","CADESCOM_DISPLAY_DATA_NONE","CADESCOM_DISPLAY_DATA_CONTENT","CADESCOM_DISPLAY_DATA_ATTRIBUTE","CADESCOM_ENCRYPTION_ALGORITHM_RC2","CADESCOM_ENCRYPTION_ALGORITHM_RC4","CADESCOM_ENCRYPTION_ALGORITHM_DES","CADESCOM_ENCRYPTION_ALGORITHM_3DES","CADESCOM_ENCRYPTION_ALGORITHM_AES","CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89","CADESCOM_HASH_ALGORITHM_SHA1","CADESCOM_HASH_ALGORITHM_MD2","CADESCOM_HASH_ALGORITHM_MD4","CADESCOM_HASH_ALGORITHM_MD5","CADESCOM_HASH_ALGORITHM_SHA_256","CADESCOM_HASH_ALGORITHM_SHA_384","CADESCOM_HASH_ALGORITHM_SHA_512","CADESCOM_HASH_ALGORITHM_CP_GOST_3411","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC","CADESCOM_AllowNone","CADESCOM_AllowNoOutstandingRequest","CADESCOM_AllowUntrustedCertificate","CADESCOM_AllowUntrustedRoot","CADESCOM_SkipInstallToStore","ENABLE_CARRIER_TYPE_CSP","ENABLE_CARRIER_TYPE_FKC_NO_SM","ENABLE_CARRIER_TYPE_FKC_SM","ENABLE_ANY_CARRIER_TYPE","DISABLE_EVERY_CARRIER_OPERATION","ENABLE_CARRIER_OPEN_ENUM","ENABLE_CARRIER_CREATE","ENABLE_ANY_OPERATION","CADESCOM_PRODUCT_CSP","CADESCOM_PRODUCT_OCSP","CADESCOM_PRODUCT_TSP","MEDIA_TYPE_REGISTRY","MEDIA_TYPE_HDIMAGE","MEDIA_TYPE_CLOUD","MEDIA_TYPE_SCARD","generatorFunc","continuer","verb","generator","isIE","isIOS","call_ru_cryptopro_npcades_10_native_bridge","getElementById","decimalToHexString","toUpperCase","GetMessageFromException","exception","cpcsp_chrome_nmcades","array","tmpobj","ex","response","eval","show_firefox_missing_extension_dialog","cadesplugin_skip_extension_install","ovr","getElementsByTagName","plugin_loaded_error","visibility","firefox_or_safari_nmcades_onload","check_chrome_plugin","plugin_loaded","nmcades_api_onload","url","substring","fileref","onerror","onload","load_extension","load_npapi_plugin","elem","elem1","elem2","createPromise","check_npapi_plugin","mimetype","enabledPlugin","div","readyState","obj","EnableInternalCSP","DN","CKR_CANCEL","CKR_HOST_MEMORY","CKR_SLOT_ID_INVALID","CKR_GENERAL_ERROR","CKR_FUNCTION_FAILED","CKR_ARGUMENTS_BAD","CKR_ATTRIBUTE_READ_ONLY","CKR_ATTRIBUTE_TYPE_INVALID","CKR_ATTRIBUTE_VALUE_INVALID","CKR_DEVICE_ERROR","CKR_DEVICE_MEMORY","CKR_FUNCTION_CANCELED","CKR_KEY_HANDLE_INVALID","CKR_KEY_SIZE_RANGE","CKR_KEY_TYPE_INCONSISTENT","CKR_MECHANISM_INVALID","CKR_MECHANISM_PARAM_INVALID","CKR_OBJECT_HANDLE_INVALID","CKR_OPERATION_ACTIVE","CKR_OPERATION_NOT_INITIALIZED","CKR_PIN_INCORRECT","CKR_PIN_LEN_RANGE","CKR_PIN_LOCKED","CKR_SESSION_HANDLE_INVALID","CKR_SESSION_PARALLEL_NOT_SUPPORTED","CKR_SESSION_EXISTS","CKR_SESSION_READ_ONLY_EXISTS","CKR_SESSION_READ_WRITE_SO_EXISTS","CKR_SIGNATURE_INVALID","CKR_TEMPLATE_INCOMPLETE","CKR_TOKEN_NOT_PRESENT","CKR_TOKEN_WRITE_PROTECTED","CKR_USER_ALREADY_LOGGED_IN","CKR_USER_NOT_LOGGED_IN","CKR_USER_PIN_NOT_INITIALIZED","CKR_USER_TYPE_INVALID","CKR_USER_ANOTHER_ALREADY_LOGGED_IN","CKR_BUFFER_TOO_SMALL","CKR_INFORMATION_SENSITIVE","CKR_CRYPTOKI_NOT_INITIALIZED","CKR_CRYPTOKI_ALREADY_INITIALIZED","CKR_FUNCTION_REJECTED","NOT_STATE_TOKEN_BINDED","NOT_STATE_NOT_BINDED","IS_STATE_NOT_BINDED","NOT_STATE_UNILATERAL_AUTHENTICATION_IN_PROGRESS","NOT_STATE_SECURE_CHANNEL_CONNECTION_IN_PROGRESS","NOT_STATE_SECURE_CHANNEL_ESTABLISHED","CERTIFICATE_NOT_FOUND","PUBLIC_KEY_NOT_FOUND","SERVER_PUBLIC_KEY_NOT_FOUND","INVALID_SERVER_PUBLIC_KEY","DATA_TO_SIGN_ZERO_LENGTH","DATA_TO_VERIFY_ZERO_LENGTH","SIGNATURE_TO_VERIFY_ZERO_LENGTH","INVALID_EC_PARAMS","TOKEN_MEMORY_TOO_SMALL","KEY_SIZE_NOT_64","CERT_NOT_MATCH_PUBLIC_KEY","FAILED_CHECK_BROWSER_VERS","BROWSER_VERS_NOT_SUPPORTED","INVALID_USER_TYPE","PINS_NOT_MATCH","USER_CHANGE_ADMIN_PIN_NOT_STATE_NOT_BINDED","SSL_ERR_GEN_SESSION_KEY","SSL_ERR_GOST_ENGINE","SSL_ERR_SSL_NEW","SSL_ERR_CONNECT","SSL_ERR_SSL_WRITE","SSL_ERR_SSL_READ","SSL_ERR_LOAD_CERT_AND_KEY_FROM_TOKEN","SSL_ERR_GET_PEER_PUBLIC_KEY","CERT_PARS_ERR_GET_PUBLIC_KEY","CERT_PARS_ERR_GET_ISSUER_AND_SER_NUMBER","UNKNOWN_ERROR","oids","oid","short","full","convertDN","dn","field","item","stripDnQuotes","JaCarta","client","tokenId","getError","mnemo","code","getErrorMessage","errors","formatCertificateName","containerName","Data","Subject","rdn","cn","snils","inn","byte2hex","byte","pemSplit","JCWebClient","script","onreadystatechange","onFail","errorMsg","getScript","Error","checkWebBrowserVersion","aTokens","getAllTokens","getPluginVersion","tokenInfo","getTokenInfo","serial","label","userPin","getLoggedInState","bindTokenAsync","bindTokenUI","unbind","unbindToken","clean","aContainers","getCertificateList","containerId","deleteContainerOrCertificate","generateCSR","description","ekuOids","ecParams","createContainerAsync","aDn","exts","genCSRAsync","csr","btoa","fromCharCode","writeCertificate","certificate","aCertificate","der","atob","writeCertificateAsync","certificateInfo","parseX509CertificateEx","dnI","Issuer","dt","Date","Name","CN","IssuerName","SubjectName","Version","SerialNumber","Thumbprint","Signature","ValidFromDate","Validity","ValidToDate","HasPrivateKey","IsValid","listCertificates","getCertificateListAsync","certs","contName","contId","readCertificate","readCertificateEx","signData","dataBase64","signBase64EncodedDataAsync","sign","encryptData","decryptData","CKR_FUNCTION_NOT_SUPPORTED","CKR_KT2_PIN_ALREADY_SET","CKR_PUK_INCORRECT","CKR_CANNOT_UNLOCK","CKR_PUK_INVALID","CKR_SM_REQUIRED","CKR_PKCS7_PUBLIC_KEY_NOT_FOUND","CKR_ICL_LIBRARY_NOT_FOUND","CKR_ICL_JCVERIFY_NOT_FOUND","CKR_ICL_JCVERIFY_CHECKSUM_NOT_FOUND","CKR_ICL_CHECKSUM_NOT_FOUND","CKR_ICL_JCVERIFY_CHECKSUM","CKR_ICL_CHECKSUM","CKR_ICL_NOT_ICL","JaCarta2","errorHandler","makeDN","final","JCWebClient2","defaults","async","getJCWebClientVersion","onSuccess","onError","getAllSlots","slots","tokenExists","tokenID","state","Vars","AuthState","binded","pin","useUI","bindToken","notBinded","getContainerList","containers","deletePKIObject","algorithm","KeyAlgorithm","GOST_2012_256","createKeyPair","paramSet","keyPairId","genCSR","writeUserCertificate","keyPairID","cert","parseX509Certificate","Algorithm","getCertificateBody","options","attached","signBase64EncodedData","contID","attachedSignature","verifySign","signBase64","signature","useToken","verifyData","dataByte","receiverCertificate","certByte","senderCertificate","X509KeySpec","X509PrivateKeyExportFlags","X509CertificateEnrollmentContext","X509KeyUsageFlags","X500NameFlags","EncodingType","InstallResponseRestrictionFlags","ProviderTypes","cadesErrorMesages","CryptoPro","canAsync","pluginVersion","signerOptions","hasContainerStore","diff","regExStrip0","segmentsA","segmentsB","parseInt","versionCompare","fetchCertsFromStore","oStore","oCertificates","skipIds","Certificates","certificates","Count","Item","subjects","oDN","string2dn","oCertificate","findCertInStore","certThumbprint","Find","getCertificateObject","Open","Close","hasKey","PrivateKey","privateKey","propset_KeyPin","propset_CachePin","KeyPin","CachePin","subjectName","pair","trim","stringToUtf8ByteArray","allow_firefox_cadesplugin_async","require","oAbout","catch","providerType","oEnroll","oRequest","oPrivateKey","oExtensions","oKeyUsage","oEnhancedKeyUsage","oEnhancedKeyUsageOIDs","aOIDs","oSstOID","oDn","oCspInformations","sCSPName","oSubjectSignTool","objects","AddAvailableCsps","cnt","aPromises","ItemByIndex","aCspInformation","LegacyCsp","Type","aCspInfo","cspType","cspName","bLegacyCsp","nType","sName","propset_KeySpec","propset_Existing","propset_ExportPolicy","propset_ProviderType","propset_ProviderName","propset_Pin","InitializeFromPrivateKey","InitializeEncode","promises","InitializeFromValue","Add","utf8arr","unshift","base64String","Initialize","X509Extensions","ext","strName","Encode","propset_Subject","InitializeFromRequest","CreateRequest","oCspInfo","KeySpec","Existing","ExportPolicy","ProviderName","ProviderType","aEnhancedKeyUsageOIDs","ssOID","shortName","certBase64","existingSha","enroll","InstallResponse","sha","found","infoToString","oInfo","Result","PublicKey","FriendlyName","oParesedSubj","tryContainerStore","Export","oSigner","oSignedData","propset_Certificate","propset_Options","propset_ContentEncoding","propset_Content","SignCades","Certificate","Options","ContentEncoding","Content","signData2","certThumbprint2","oCertificate2","pin2","CoSignCades","addSign","VerifyCades","oEnvelop","oRecipients","envelop","Recipients","recipients","Clear","Encrypt","Decrypt","ALREADY_LOGGED_IN","ASN1_ERROR","BAD_PARAMS","BASE64_DECODE_FAILED","CA_CERTIFICATES_NOT_FOUND","CANNOT_SAVE_PIN_IN_CACHE","CANT_HARDWARE_VERIFY_CMS","CEK_NOT_AUTHENTIC","CERTIFICATE_CATEGORY_BAD","CERTIFICATE_EXISTS","CERTIFICATE_HASH_NOT_UNIQUE","CERTIFICATE_VERIFICATION_ERROR","DATA_INVALID","DEVICE_ERROR","DEVICE_NOT_FOUND","FUNCTION_FAILED","FUNCTION_REJECTED","KEY_FUNCTION_NOT_PERMITTED","KEY_ID_NOT_UNIQUE","KEY_LABEL_NOT_UNIQUE","KEY_NOT_FOUND","LICENCE_READ_ONLY","NOT_ENOUGH_MEMORY","PEM_ERROR","PIN_CHANGED","PIN_INCORRECT","PIN_INVALID","PIN_LENGTH_INVALID","PIN_LOCKED","PKCS11_LOAD_FAILED","SESSION_INVALID","TOKEN_INVALID","UNSUPPORTED_BY_TOKEN","USER_NOT_LOGGED_IN","USER_PIN_NOT_INITIALIZED","WRONG_KEY_TYPE","X509_AKID_ISSUER_SERIAL_MISMATCH","X509_AKID_SKID_MISMATCH","X509_APPLICATION_VERIFICATION","X509_CERT_CHAIN_TOO_LONG","X509_CERT_HAS_EXPIRED","X509_CERT_NOT_YET_VALID","X509_CERT_REJECTED","X509_CERT_REVOKED","X509_CERT_SIGNATURE_FAILURE","X509_CERT_UNTRUSTED","X509_CRL_HAS_EXPIRED","X509_CRL_NOT_YET_VALID","X509_CRL_PATH_VALIDATION_ERROR","X509_CRL_SIGNATURE_FAILURE","X509_DEPTH_ZERO_SELF_SIGNED_CERT","X509_DIFFERENT_CRL_SCOPE","X509_ERROR_IN_CERT_NOT_AFTER_FIELD","X509_ERROR_IN_CERT_NOT_BEFORE_FIELD","X509_ERROR_IN_CRL_LAST_UPDATE_FIELD","X509_ERROR_IN_CRL_NEXT_UPDATE_FIELD","X509_EXCLUDED_VIOLATION","X509_INVALID_CA","X509_INVALID_EXTENSION","X509_INVALID_NON_CA","X509_INVALID_POLICY_EXTENSION","X509_INVALID_PURPOSE","X509_KEYUSAGE_NO_CERTSIGN","X509_KEYUSAGE_NO_CRL_SIGN","X509_KEYUSAGE_NO_DIGITAL_SIGNATURE","X509_NO_EXPLICIT_POLICY","X509_OUT_OF_MEM","X509_PATH_LENGTH_EXCEEDED","X509_PERMITTED_VIOLATION","X509_PROXY_CERTIFICATES_NOT_ALLOWED","X509_PROXY_PATH_LENGTH_EXCEEDED","X509_SELF_SIGNED_CERT_IN_CHAIN","X509_SUBJECT_ISSUER_MISMATCH","X509_SUBTREE_MINMAX","X509_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","X509_UNABLE_TO_DECRYPT_CERT_SIGNATURE","X509_UNABLE_TO_DECRYPT_CRL_SIGNATURE","X509_UNABLE_TO_GET_CRL","X509_UNABLE_TO_GET_CRL_ISSUER","X509_UNABLE_TO_GET_ISSUER_CERT","X509_UNABLE_TO_GET_ISSUER_CERT_LOCALLY","X509_UNABLE_TO_VERIFY_LEAF_SIGNATURE","X509_UNHANDLED_CRITICAL_CRL_EXTENSION","X509_UNHANDLED_CRITICAL_EXTENSION","X509_UNNESTED_RESOURCE","X509_UNSUPPORTED_CONSTRAINT_SYNTAX","X509_UNSUPPORTED_CONSTRAINT_TYPE","X509_UNSUPPORTED_EXTENSION_FEATURE","X509_UNSUPPORTED_NAME_SYNTAX","requiredFunctions","RuToken","plugin","deviceId","ee","errorCodes","subject","cleanPemString","pem","_","chrome","absentFn","enumerateDevices","devices","getDeviceInfo","TOKEN_INFO_READER","TOKEN_INFO_LABEL","TOKEN_INFO_SERIAL","getDeviceModel","getDeviceType","infos","reader","model","TOKEN_INFO_IS_LOGGED_IN","prompt","needToLogIn","login","needToLogOut","logout","enumerateCertificates","CERT_CATEGORY_USER","certId","deleteCertificate","enumerateKeys","keyId","deleteKeyPair","marker","extKeyUsage","publicKeyAlgorithm","PUBLIC_KEY_ALGORITHM_GOST3410_2012_256","paramset","hashAlgorithm","HASH_TYPE_GOST3411_94","PUBLIC_KEY_ALGORITHM_GOST3410_2012_512","HASH_TYPE_GOST3411_12_512","HASH_TYPE_GOST3411_12_256","generateKeyPair","extensions","keyUsage","subjectSignTool","createPkcs10","category","importCertificate","hasPrivateKey","serialNumber","getKeyByCertificate","getCertificateInfo","CERT_INFO_SERIAL_NUMBER","parseCertificate","ver","text","algo","keyAlgorithm","issuer","commonName","validNotBefore","validNotAfter","certIds","getCertificate","DATA_FORMAT_BASE64","detached","CMS","base64","verifyCertificate","verify","cmsEncrypt","cmsDecrypt"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,IARxB,CASmB,oBAATK,KAAuBA,KAAOC,MAAM,WAC9C,O,YCTA,SAGA,cAGA,QACA,oBAGA,YACA,IACA,KACA,YAUA,OANA,mCAGA,OAGA,UA0DA,OArDA,MAGA,MAGA,oBACA,UACA,2BAA2CC,YAAY,EAAMC,IAAKC,KAKlE,gBACA,gDACA,4CAAyDC,MAAO,WAEhE,sCAAkDA,OAAO,KAQzD,kBAEA,GADA,cACA,aACA,qDACA,0BAGA,GAFA,OACA,mCAA0CH,YAAY,EAAMG,MAAOA,IACnE,2DAAiH,OAAOA,EAAMC,IAAQC,KAAK,KAAMD,IACjJ,UAIA,gBACA,sBACA,WAA4B,OAAOT,EAAgB,SACnD,WAAkC,OAAOA,GAEzC,OADA,aACA,GAIA,kBAAuD,OAAOW,OAAOC,UAAUC,eAAeC,KAAKC,EAAQC,IAG3G,OAIA,U,kBClFA,IAAIC,EAAQ,EAAQ,G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AU4B,GAC3CryC,MAAK,SAAAwyC,GAAK,OAAIhC,EAAO0E,WAAWzE,EAAU+B,EAAO1V,EAAY,CAC7DgY,QAAQ,OAER90C,KAAK,MAAM,SAAAxK,GACX,IAAM+M,EAAMi1B,EAAShiC,GACrB,MAAM,IAAIsjC,MAAMv2B,QCrfnB","file":"ruscrypto.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"RusCryptoJS\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"RusCryptoJS\"] = factory();\n\telse\n\t\troot[\"RusCryptoJS\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 84);\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","var core = module.exports = { version: '2.6.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = false;\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","module.exports = {};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","'use strict';\n\nvar anObject = require('./_an-object');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar toInteger = require('./_to-integer');\nvar advanceStringIndex = require('./_advance-string-index');\nvar regExpExec = require('./_regexp-exec-abstract');\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","'use strict';\n\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar advanceStringIndex = require('./_advance-string-index');\nvar regExpExec = require('./_regexp-exec-abstract');\n\n// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative($match, regexp, this);\n if (res.done) return res.value;\n var rx = anObject(regexp);\n var S = String(this);\n if (!rx.global) return regExpExec(rx, S);\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar userAgent = require('./_user-agent');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function')\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // may throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n if (domain && !exited) domain.exit();\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n","var rutoken=function(n){function t(n){return!!(n&&n.call&&n.apply)}function e(n,e){return t(n[e])?function(){return n[e].apply(n,arguments)}:n[e]}function r(n){return function(){return n}}function i(){n.ready=Promise.resolve(!0),n.isExtensionInstalled=r(Promise.resolve(!1)),n.isPluginInstalled=r(Promise.resolve(!0)),n.loadPlugin=l,window.rutokenLoaded=s}function o(){var t=y.initialize().then(function(){return y.isPluginInstalled()}).then(function(t){return n.isExtensionInstalled=r(Promise.resolve(!0)),n.isPluginInstalled=e(y,\"isPluginInstalled\"),t&&(m=\"application/x-rutoken-plugin\",n.loadPlugin=a),!0});n.ready=t}function u(){n.ready=Promise.resolve(!0),n.isExtensionInstalled=r(Promise.resolve(!1)),n.isPluginInstalled=r(Promise.resolve(!1))}function l(){var n=document.createElement(\"object\");n.style.setProperty(\"visibility\",\"hidden\",\"important\"),n.style.setProperty(\"width\",\"0px\",\"important\"),n.style.setProperty(\"height\",\"0px\",\"important\"),n.style.setProperty(\"margin\",\"0px\",\"important\"),n.style.setProperty(\"padding\",\"0px\",\"important\"),n.style.setProperty(\"border-style\",\"none\",\"important\"),n.style.setProperty(\"border-width\",\"0px\",\"important\"),n.style.setProperty(\"max-width\",\"0px\",\"important\"),n.style.setProperty(\"max-height\",\"0px\",\"important\"),n.innerHTML=\"\",n.setAttribute(\"type\",m),document.body.appendChild(n);var t=new Promise(function(n,t){h.push(n)});return t}function a(){return y.loadPlugin().then(function(n){return c(n)}).then(function(n){return n.wrapWithOldInterface=p,n})}function s(n,t){d(n).then(function(n){if(0==h.length)throw\"Internal error\";var t=h.shift();t(n)})}function c(n){var r={},i=[];for(var o in n)!function(o){t(n[o].then)?i.push(n[o].then(function(i){return c(i).then(function(i){t(i)?r[o]=e(n,o):r[o]=i})})):r[o]=n[o]}(o);return 0==i.length?new Promise(function(t){t(n)}):Promise.all(i).then(function(){return r})}function p(){var n={};for(var e in this)t(this[e])?n[e]=function(n,t){return function(){var e=arguments[arguments.length-2],r=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0,-2);return t.apply(n,i).then(function(n){e(n)},function(n){r(n.message)})}}(this,this[e]):n[e]=this[e];return new Promise(function(t){t(n)})}function f(){var n={originalObject:this.originalObject};for(var t in this.originalObject)n[t]=e(this.originalObject,t);return new Promise(function(t){t(n)})}function d(n){var e={originalObject:n,wrapWithOldInterface:f};for(var r in n)t(n[r])?e[r]=function(n,t){return function(){var e=Array.prototype.slice.call(arguments);return new Promise(function(r,i){e.push(r,i),t.apply(n,e)})}}(n,n[r]):e[r]=n[r];return new Promise(function(n){n(e)})}var h=[],m=\"application/x-rutoken-pki\",y=window[\"C3B7563B-BF85-45B7-88FC-7CFF1BD3C2DB\"];if(y)o();else if(navigator.mimeTypes&&navigator.mimeTypes[m])i();else try{new ActiveXObject(\"Aktiv.CryptoPlugin\");i()}catch(P){u()}return n}(rutoken||{});\"undefined\"!=typeof module&&(module.exports=rutoken);","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","exports.f = {}.propertyIsEnumerable;\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","'use strict';\nvar at = require('./_string-at')(true);\n\n // `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? at(S, index).length : 1);\n};\n","'use strict';\n\nvar classof = require('./_classof');\nvar builtinExec = RegExp.prototype.exec;\n\n // `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw new TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n if (classof(R) !== 'RegExp') {\n throw new TypeError('RegExp#exec called on incompatible receiver');\n }\n return builtinExec.call(R, S);\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n","'use strict';\nrequire('./es6.regexp.exec');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\nvar regexpExec = require('./_regexp-exec');\n\nvar SPECIES = wks('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {\n // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length === 2 && result[0] === 'a' && result[1] === 'b';\n})();\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n re.exec = function () { execCalled = true; return null; };\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n }\n re[SYMBOL]('');\n return !execCalled;\n }) : undefined;\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var fns = exec(\n defined,\n SYMBOL,\n ''[KEY],\n function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }\n );\n var strfn = fns[0];\n var rxfn = fns[1];\n\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n","'use strict';\n\nvar regexpFlags = require('./_flags');\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar LAST_INDEX = 'lastIndex';\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/,\n re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;\n})();\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', regexpFlags.call(re));\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];\n\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n // eslint-disable-next-line no-loop-func\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","require('./_typed-array')('Uint8', 1, function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","exports.f = Object.getOwnPropertySymbols;\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","var global = require('./_global');\nvar inheritIfRequired = require('./_inherit-if-required');\nvar dP = require('./_object-dp').f;\nvar gOPN = require('./_object-gopn').f;\nvar isRegExp = require('./_is-regexp');\nvar $flags = require('./_flags');\nvar $RegExp = global.RegExp;\nvar Base = $RegExp;\nvar proto = $RegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n// \"new\" creates a new object, old webkit buggy here\nvar CORRECT_NEW = new $RegExp(re1) !== re1;\n\nif (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () {\n re2[require('./_wks')('match')] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';\n}))) {\n $RegExp = function RegExp(p, f) {\n var tiRE = this instanceof $RegExp;\n var piRE = isRegExp(p);\n var fiU = f === undefined;\n return !tiRE && piRE && p.constructor === $RegExp && fiU ? p\n : inheritIfRequired(CORRECT_NEW\n ? new Base(piRE && !fiU ? p.source : p, f)\n : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)\n , tiRE ? this : proto, $RegExp);\n };\n var proxy = function (key) {\n key in $RegExp || dP($RegExp, key, {\n configurable: true,\n get: function () { return Base[key]; },\n set: function (it) { Base[key] = it; }\n });\n };\n for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);\n proto.constructor = $RegExp;\n $RegExp.prototype = proto;\n require('./_redefine')(global, 'RegExp', $RegExp);\n}\n\nrequire('./_set-species')('RegExp');\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar uid = require('./_uid');\nvar TYPED = uid('typed_array');\nvar VIEW = uid('view');\nvar ABV = !!(global.ArrayBuffer && global.DataView);\nvar CONSTR = ABV;\nvar i = 0;\nvar l = 9;\nvar Typed;\n\nvar TypedArrayConstructors = (\n 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'\n).split(',');\n\nwhile (i < l) {\n if (Typed = global[TypedArrayConstructors[i++]]) {\n hide(Typed.prototype, TYPED, true);\n hide(Typed.prototype, VIEW, true);\n } else CONSTR = false;\n}\n\nmodule.exports = {\n ABV: ABV,\n CONSTR: CONSTR,\n TYPED: TYPED,\n VIEW: VIEW\n};\n","// https://tc39.github.io/ecma262/#sec-toindex\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length!');\n return length;\n};\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n","'use strict';\nvar ctx = require('./_ctx');\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar toLength = require('./_to-length');\nvar createProperty = require('./_create-property');\nvar getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n","require('./_wks-define')('asyncIterator');\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","exports.f = require('./_wks');\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\nvar regexpExec = require('./_regexp-exec');\nrequire('./_export')({\n target: 'RegExp',\n proto: true,\n forced: regexpExec !== /./.exec\n}, {\n exec: regexpExec\n});\n","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","'use strict';\nif (require('./_descriptors')) {\n var LIBRARY = require('./_library');\n var global = require('./_global');\n var fails = require('./_fails');\n var $export = require('./_export');\n var $typed = require('./_typed');\n var $buffer = require('./_typed-buffer');\n var ctx = require('./_ctx');\n var anInstance = require('./_an-instance');\n var propertyDesc = require('./_property-desc');\n var hide = require('./_hide');\n var redefineAll = require('./_redefine-all');\n var toInteger = require('./_to-integer');\n var toLength = require('./_to-length');\n var toIndex = require('./_to-index');\n var toAbsoluteIndex = require('./_to-absolute-index');\n var toPrimitive = require('./_to-primitive');\n var has = require('./_has');\n var classof = require('./_classof');\n var isObject = require('./_is-object');\n var toObject = require('./_to-object');\n var isArrayIter = require('./_is-array-iter');\n var create = require('./_object-create');\n var getPrototypeOf = require('./_object-gpo');\n var gOPN = require('./_object-gopn').f;\n var getIterFn = require('./core.get-iterator-method');\n var uid = require('./_uid');\n var wks = require('./_wks');\n var createArrayMethod = require('./_array-methods');\n var createArrayIncludes = require('./_array-includes');\n var speciesConstructor = require('./_species-constructor');\n var ArrayIterators = require('./es6.array.iterator');\n var Iterators = require('./_iterators');\n var $iterDetect = require('./_iter-detect');\n var setSpecies = require('./_set-species');\n var arrayFill = require('./_array-fill');\n var arrayCopyWithin = require('./_array-copy-within');\n var $DP = require('./_object-dp');\n var $GOPD = require('./_object-gopd');\n var dP = $DP.f;\n var gOPD = $GOPD.f;\n var RangeError = global.RangeError;\n var TypeError = global.TypeError;\n var Uint8Array = global.Uint8Array;\n var ARRAY_BUFFER = 'ArrayBuffer';\n var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;\n var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\n var PROTOTYPE = 'prototype';\n var ArrayProto = Array[PROTOTYPE];\n var $ArrayBuffer = $buffer.ArrayBuffer;\n var $DataView = $buffer.DataView;\n var arrayForEach = createArrayMethod(0);\n var arrayFilter = createArrayMethod(2);\n var arraySome = createArrayMethod(3);\n var arrayEvery = createArrayMethod(4);\n var arrayFind = createArrayMethod(5);\n var arrayFindIndex = createArrayMethod(6);\n var arrayIncludes = createArrayIncludes(true);\n var arrayIndexOf = createArrayIncludes(false);\n var arrayValues = ArrayIterators.values;\n var arrayKeys = ArrayIterators.keys;\n var arrayEntries = ArrayIterators.entries;\n var arrayLastIndexOf = ArrayProto.lastIndexOf;\n var arrayReduce = ArrayProto.reduce;\n var arrayReduceRight = ArrayProto.reduceRight;\n var arrayJoin = ArrayProto.join;\n var arraySort = ArrayProto.sort;\n var arraySlice = ArrayProto.slice;\n var arrayToString = ArrayProto.toString;\n var arrayToLocaleString = ArrayProto.toLocaleString;\n var ITERATOR = wks('iterator');\n var TAG = wks('toStringTag');\n var TYPED_CONSTRUCTOR = uid('typed_constructor');\n var DEF_CONSTRUCTOR = uid('def_constructor');\n var ALL_CONSTRUCTORS = $typed.CONSTR;\n var TYPED_ARRAY = $typed.TYPED;\n var VIEW = $typed.VIEW;\n var WRONG_LENGTH = 'Wrong length!';\n\n var $map = createArrayMethod(1, function (O, length) {\n return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);\n });\n\n var LITTLE_ENDIAN = fails(function () {\n // eslint-disable-next-line no-undef\n return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;\n });\n\n var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {\n new Uint8Array(1).set({});\n });\n\n var toOffset = function (it, BYTES) {\n var offset = toInteger(it);\n if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');\n return offset;\n };\n\n var validate = function (it) {\n if (isObject(it) && TYPED_ARRAY in it) return it;\n throw TypeError(it + ' is not a typed array!');\n };\n\n var allocate = function (C, length) {\n if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {\n throw TypeError('It is not a typed array constructor!');\n } return new C(length);\n };\n\n var speciesFromList = function (O, list) {\n return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);\n };\n\n var fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = allocate(C, length);\n while (length > index) result[index] = list[index++];\n return result;\n };\n\n var addGetter = function (it, key, internal) {\n dP(it, key, { get: function () { return this._d[internal]; } });\n };\n\n var $from = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iterFn = getIterFn(O);\n var i, length, values, result, step, iterator;\n if (iterFn != undefined && !isArrayIter(iterFn)) {\n for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {\n values.push(step.value);\n } O = values;\n }\n if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);\n for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n };\n\n var $of = function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = allocate(this, length);\n while (length > index) result[index] = arguments[index++];\n return result;\n };\n\n // iOS Safari 6.x fails here\n var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });\n\n var $toLocaleString = function toLocaleString() {\n return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);\n };\n\n var proto = {\n copyWithin: function copyWithin(target, start /* , end */) {\n return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n },\n every: function every(callbackfn /* , thisArg */) {\n return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars\n return arrayFill.apply(validate(this), arguments);\n },\n filter: function filter(callbackfn /* , thisArg */) {\n return speciesFromList(this, arrayFilter(validate(this), callbackfn,\n arguments.length > 1 ? arguments[1] : undefined));\n },\n find: function find(predicate /* , thisArg */) {\n return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n findIndex: function findIndex(predicate /* , thisArg */) {\n return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n forEach: function forEach(callbackfn /* , thisArg */) {\n arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n indexOf: function indexOf(searchElement /* , fromIndex */) {\n return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n includes: function includes(searchElement /* , fromIndex */) {\n return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n join: function join(separator) { // eslint-disable-line no-unused-vars\n return arrayJoin.apply(validate(this), arguments);\n },\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars\n return arrayLastIndexOf.apply(validate(this), arguments);\n },\n map: function map(mapfn /* , thisArg */) {\n return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduce.apply(validate(this), arguments);\n },\n reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduceRight.apply(validate(this), arguments);\n },\n reverse: function reverse() {\n var that = this;\n var length = validate(that).length;\n var middle = Math.floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n },\n some: function some(callbackfn /* , thisArg */) {\n return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n sort: function sort(comparefn) {\n return arraySort.call(validate(this), comparefn);\n },\n subarray: function subarray(begin, end) {\n var O = validate(this);\n var length = O.length;\n var $begin = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(\n O.buffer,\n O.byteOffset + $begin * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)\n );\n }\n };\n\n var $slice = function slice(start, end) {\n return speciesFromList(this, arraySlice.call(validate(this), start, end));\n };\n\n var $set = function set(arrayLike /* , offset */) {\n validate(this);\n var offset = toOffset(arguments[1], 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError(WRONG_LENGTH);\n while (index < len) this[offset + index] = src[index++];\n };\n\n var $iterators = {\n entries: function entries() {\n return arrayEntries.call(validate(this));\n },\n keys: function keys() {\n return arrayKeys.call(validate(this));\n },\n values: function values() {\n return arrayValues.call(validate(this));\n }\n };\n\n var isTAIndex = function (target, key) {\n return isObject(target)\n && target[TYPED_ARRAY]\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n };\n var $getDesc = function getOwnPropertyDescriptor(target, key) {\n return isTAIndex(target, key = toPrimitive(key, true))\n ? propertyDesc(2, target[key])\n : gOPD(target, key);\n };\n var $setDesc = function defineProperty(target, key, desc) {\n if (isTAIndex(target, key = toPrimitive(key, true))\n && isObject(desc)\n && has(desc, 'value')\n && !has(desc, 'get')\n && !has(desc, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !desc.configurable\n && (!has(desc, 'writable') || desc.writable)\n && (!has(desc, 'enumerable') || desc.enumerable)\n ) {\n target[key] = desc.value;\n return target;\n } return dP(target, key, desc);\n };\n\n if (!ALL_CONSTRUCTORS) {\n $GOPD.f = $getDesc;\n $DP.f = $setDesc;\n }\n\n $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {\n getOwnPropertyDescriptor: $getDesc,\n defineProperty: $setDesc\n });\n\n if (fails(function () { arrayToString.call({}); })) {\n arrayToString = arrayToLocaleString = function toString() {\n return arrayJoin.call(this);\n };\n }\n\n var $TypedArrayPrototype$ = redefineAll({}, proto);\n redefineAll($TypedArrayPrototype$, $iterators);\n hide($TypedArrayPrototype$, ITERATOR, $iterators.values);\n redefineAll($TypedArrayPrototype$, {\n slice: $slice,\n set: $set,\n constructor: function () { /* noop */ },\n toString: arrayToString,\n toLocaleString: $toLocaleString\n });\n addGetter($TypedArrayPrototype$, 'buffer', 'b');\n addGetter($TypedArrayPrototype$, 'byteOffset', 'o');\n addGetter($TypedArrayPrototype$, 'byteLength', 'l');\n addGetter($TypedArrayPrototype$, 'length', 'e');\n dP($TypedArrayPrototype$, TAG, {\n get: function () { return this[TYPED_ARRAY]; }\n });\n\n // eslint-disable-next-line max-statements\n module.exports = function (KEY, BYTES, wrapper, CLAMPED) {\n CLAMPED = !!CLAMPED;\n var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + KEY;\n var SETTER = 'set' + KEY;\n var TypedArray = global[NAME];\n var Base = TypedArray || {};\n var TAC = TypedArray && getPrototypeOf(TypedArray);\n var FORCED = !TypedArray || !$typed.ABV;\n var O = {};\n var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];\n var getter = function (that, index) {\n var data = that._d;\n return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);\n };\n var setter = function (that, index, value) {\n var data = that._d;\n if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;\n data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);\n };\n var addElement = function (that, index) {\n dP(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n if (FORCED) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME, '_d');\n var index = 0;\n var offset = 0;\n var buffer, byteLength, length, klass;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new $ArrayBuffer(byteLength);\n } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n buffer = data;\n offset = toOffset($offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - offset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (TYPED_ARRAY in data) {\n return fromList(TypedArray, data);\n } else {\n return $from.call(TypedArray, data);\n }\n hide(that, '_d', {\n b: buffer,\n o: offset,\n l: byteLength,\n e: length,\n v: new $DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);\n hide(TypedArrayPrototype, 'constructor', TypedArray);\n } else if (!fails(function () {\n TypedArray(1);\n }) || !fails(function () {\n new TypedArray(-1); // eslint-disable-line no-new\n }) || !$iterDetect(function (iter) {\n new TypedArray(); // eslint-disable-line no-new\n new TypedArray(null); // eslint-disable-line no-new\n new TypedArray(1.5); // eslint-disable-line no-new\n new TypedArray(iter); // eslint-disable-line no-new\n }, true)) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME);\n var klass;\n // `ws` module bug, temporarily remove validation length for Uint8Array\n // https://github.com/websockets/ws/pull/645\n if (!isObject(data)) return new Base(toIndex(data));\n if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n return $length !== undefined\n ? new Base(data, toOffset($offset, BYTES), $length)\n : $offset !== undefined\n ? new Base(data, toOffset($offset, BYTES))\n : new Base(data);\n }\n if (TYPED_ARRAY in data) return fromList(TypedArray, data);\n return $from.call(TypedArray, data);\n });\n arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {\n if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);\n });\n TypedArray[PROTOTYPE] = TypedArrayPrototype;\n if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;\n }\n var $nativeIterator = TypedArrayPrototype[ITERATOR];\n var CORRECT_ITER_NAME = !!$nativeIterator\n && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);\n var $iterator = $iterators.values;\n hide(TypedArray, TYPED_CONSTRUCTOR, true);\n hide(TypedArrayPrototype, TYPED_ARRAY, NAME);\n hide(TypedArrayPrototype, VIEW, true);\n hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);\n\n if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {\n dP(TypedArrayPrototype, TAG, {\n get: function () { return NAME; }\n });\n }\n\n O[NAME] = TypedArray;\n\n $export($export.G + $export.W + $export.F * (TypedArray != Base), O);\n\n $export($export.S, NAME, {\n BYTES_PER_ELEMENT: BYTES\n });\n\n $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {\n from: $from,\n of: $of\n });\n\n if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);\n\n $export($export.P, NAME, proto);\n\n setSpecies(NAME);\n\n $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });\n\n $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);\n\n if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;\n\n $export($export.P + $export.F * fails(function () {\n new TypedArray(1).slice();\n }), NAME, { slice: $slice });\n\n $export($export.P + $export.F * (fails(function () {\n return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();\n }) || !fails(function () {\n TypedArrayPrototype.toLocaleString.call([1, 2]);\n })), NAME, { toLocaleString: $toLocaleString });\n\n Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;\n if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);\n };\n} else module.exports = function () { /* empty */ };\n","'use strict';\nvar global = require('./_global');\nvar DESCRIPTORS = require('./_descriptors');\nvar LIBRARY = require('./_library');\nvar $typed = require('./_typed');\nvar hide = require('./_hide');\nvar redefineAll = require('./_redefine-all');\nvar fails = require('./_fails');\nvar anInstance = require('./_an-instance');\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nvar toIndex = require('./_to-index');\nvar gOPN = require('./_object-gopn').f;\nvar dP = require('./_object-dp').f;\nvar arrayFill = require('./_array-fill');\nvar setToStringTag = require('./_set-to-string-tag');\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length!';\nvar WRONG_INDEX = 'Wrong index!';\nvar $ArrayBuffer = global[ARRAY_BUFFER];\nvar $DataView = global[DATA_VIEW];\nvar Math = global.Math;\nvar RangeError = global.RangeError;\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = global.Infinity;\nvar BaseBuffer = $ArrayBuffer;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\nvar BUFFER = 'buffer';\nvar BYTE_LENGTH = 'byteLength';\nvar BYTE_OFFSET = 'byteOffset';\nvar $BUFFER = DESCRIPTORS ? '_b' : BUFFER;\nvar $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;\nvar $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;\n\n// IEEE754 conversions based on https://github.com/feross/ieee754\nfunction packIEEE754(value, mLen, nBytes) {\n var buffer = new Array(nBytes);\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var i = 0;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n var e, m, c;\n value = abs(value);\n // eslint-disable-next-line no-self-compare\n if (value != value || value === Infinity) {\n // eslint-disable-next-line no-self-compare\n m = value != value ? 1 : 0;\n e = eMax;\n } else {\n e = floor(log(value) / LN2);\n if (value * (c = pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * pow(2, eBias - 1) * pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);\n buffer[--i] |= s * 128;\n return buffer;\n}\nfunction unpackIEEE754(buffer, mLen, nBytes) {\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = eLen - 7;\n var i = nBytes - 1;\n var s = buffer[i--];\n var e = s & 127;\n var m;\n s >>= 7;\n for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : s ? -Infinity : Infinity;\n } else {\n m = m + pow(2, mLen);\n e = e - eBias;\n } return (s ? -1 : 1) * m * pow(2, e - mLen);\n}\n\nfunction unpackI32(bytes) {\n return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];\n}\nfunction packI8(it) {\n return [it & 0xff];\n}\nfunction packI16(it) {\n return [it & 0xff, it >> 8 & 0xff];\n}\nfunction packI32(it) {\n return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];\n}\nfunction packF64(it) {\n return packIEEE754(it, 52, 8);\n}\nfunction packF32(it) {\n return packIEEE754(it, 23, 4);\n}\n\nfunction addGetter(C, key, internal) {\n dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });\n}\n\nfunction get(view, bytes, index, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = store.slice(start, start + bytes);\n return isLittleEndian ? pack : pack.reverse();\n}\nfunction set(view, bytes, index, conversion, value, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = conversion(+value);\n for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];\n}\n\nif (!$typed.ABV) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n this._b = arrayFill.call(new Array(byteLength), 0);\n this[$LENGTH] = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = buffer[$LENGTH];\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n this[$BUFFER] = buffer;\n this[$OFFSET] = offset;\n this[$LENGTH] = byteLength;\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, BYTE_LENGTH, '_l');\n addGetter($DataView, BUFFER, '_b');\n addGetter($DataView, BYTE_LENGTH, '_l');\n addGetter($DataView, BYTE_OFFSET, '_o');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1]));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packF32, value, arguments[2]);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packF64, value, arguments[2]);\n }\n });\n} else {\n if (!fails(function () {\n $ArrayBuffer(1);\n }) || !fails(function () {\n new $ArrayBuffer(-1); // eslint-disable-line no-new\n }) || fails(function () {\n new $ArrayBuffer(); // eslint-disable-line no-new\n new $ArrayBuffer(1.5); // eslint-disable-line no-new\n new $ArrayBuffer(NaN); // eslint-disable-line no-new\n return $ArrayBuffer.name != ARRAY_BUFFER;\n })) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new BaseBuffer(toIndex(length));\n };\n var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];\n for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);\n }\n if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;\n }\n // iOS Safari 7.x bug\n var view = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataView[PROTOTYPE].setInt8;\n view.setInt8(0, 2147483648);\n view.setInt8(1, 2147483649);\n if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, true);\n}\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\nhide($DataView[PROTOTYPE], $typed.VIEW, true);\nexports[ARRAY_BUFFER] = $ArrayBuffer;\nexports[DATA_VIEW] = $DataView;\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\n\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n var promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var global = require('./_global');\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","'use strict';\n\nvar isRegExp = require('./_is-regexp');\nvar anObject = require('./_an-object');\nvar speciesConstructor = require('./_species-constructor');\nvar advanceStringIndex = require('./_advance-string-index');\nvar toLength = require('./_to-length');\nvar callRegExpExec = require('./_regexp-exec-abstract');\nvar regexpExec = require('./_regexp-exec');\nvar fails = require('./_fails');\nvar $min = Math.min;\nvar $push = [].push;\nvar $SPLIT = 'split';\nvar LENGTH = 'length';\nvar LAST_INDEX = 'lastIndex';\nvar MAX_UINT32 = 0xffffffff;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return $split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy[LAST_INDEX];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);\n };\n } else {\n internalSplit = $split;\n }\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = defined(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n});\n","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","'use strict';\nvar $defineProperty = require('./_object-dp');\nvar createDesc = require('./_property-desc');\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n",";(function () {\n //already loaded\n if(window.cadesplugin)\n return;\n\n var pluginObject;\n var plugin_resolved = 0;\n var plugin_reject;\n var plugin_resolve;\n var isOpera = 0;\n var isFireFox = 0;\n var isSafari = 0;\n var isYandex = 0;\n var canPromise = !!window.Promise;\n var cadesplugin;\n\n if(canPromise)\n {\n cadesplugin = new Promise(function(resolve, reject)\n {\n plugin_resolve = resolve;\n plugin_reject = reject;\n });\n } else\n {\n cadesplugin = {};\n }\n\n function check_browser() {\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n if(/trident/i.test(M[1])){\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n return { name:'IE', version:(tem[1] || '')};\n }\n if(M[1] === 'Chrome'){\n tem = ua.match(/\\b(OPR|Edg|YaBrowser)\\/(\\d+)/);\n if (tem != null)\n return { name: tem[1].replace('OPR', 'Opera'), version: tem[2] };\n }\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null)\n M.splice(1, 1, tem[1]);\n return {name:M[0],version:M[1]};\n }\n var browserSpecs = check_browser();\n\n function cpcsp_console_log(level, msg){\n //IE9 не может писать в консоль если не открыта вкладка developer tools\n if(typeof(console) === 'undefined')\n return;\n if (level <= cadesplugin.current_log_level ){\n if (level === cadesplugin.LOG_LEVEL_DEBUG)\n console.log(\"DEBUG: %s\", msg);\n if (level === cadesplugin.LOG_LEVEL_INFO)\n console.info(\"INFO: %s\", msg);\n if (level === cadesplugin.LOG_LEVEL_ERROR)\n console.error(\"ERROR: %s\", msg);\n return;\n }\n }\n\n function set_log_level(level){\n if (!((level === cadesplugin.LOG_LEVEL_DEBUG) ||\n (level === cadesplugin.LOG_LEVEL_INFO) ||\n (level === cadesplugin.LOG_LEVEL_ERROR))){\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\n return;\n }\n cadesplugin.current_log_level = level;\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\n if(isNativeMessageSupported())\n {\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\n window.postMessage(\"set_log_level=debug\", \"*\");\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\n window.postMessage(\"set_log_level=info\", \"*\");\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\n window.postMessage(\"set_log_level=error\", \"*\");\n }\n }\n\n function set_constantValues()\n {\n cadesplugin.CAPICOM_MEMORY_STORE = 0;\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\n cadesplugin.CADESCOM_MEMORY_STORE = 0;\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\n\n cadesplugin.CAPICOM_MY_STORE = \"My\";\n\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\n\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\n\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\n \n cadesplugin.CADESCOM_XADES_DEFAULT = 0x00000010;\n cadesplugin.CADESCOM_XADES_BES = 0x00000020;\n cadesplugin.CADESCOM_XADES_T = 0x00000050;\n cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1 = 0x000005d0;\n cadesplugin.CADESCOM_XMLDSIG_TYPE = 0x00000000;\n\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\n \n cadesplugin.XmlDsigGost3411Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256\";\n cadesplugin.XmlDsigGost3410Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256\";\n cadesplugin.XmlDsigGost3411Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512\";\n cadesplugin.XmlDsigGost3410Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512\";\n\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\n cadesplugin.CADESCOM_CADES_BES = 1;\n cadesplugin.CADESCOM_CADES_T = 0x5;\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\n cadesplugin.CADESCOM_PKCS7_TYPE = 0xffff;\n\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\n\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\n\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\n\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\n\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\n\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\n\n cadesplugin.CAPICOM_OID_OTHER = 0;\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\n\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\n cadesplugin.CAPICOM_EKU_OTHER = 0;\n\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\n\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\n\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\n\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\n\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\n\n cadesplugin.LOG_LEVEL_DEBUG = 4;\n cadesplugin.LOG_LEVEL_INFO = 2;\n cadesplugin.LOG_LEVEL_ERROR = 1;\n\n cadesplugin.CADESCOM_AllowNone = 0;\n cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1;\n cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2;\n cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4;\n cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000;\n\n cadesplugin.ENABLE_CARRIER_TYPE_CSP = 0x01;\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM = 0x02;\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM = 0x04;\n cadesplugin.ENABLE_ANY_CARRIER_TYPE = 0x07;\n\n cadesplugin.DISABLE_EVERY_CARRIER_OPERATION = 0x00;\n cadesplugin.ENABLE_CARRIER_OPEN_ENUM = 0x01;\n cadesplugin.ENABLE_CARRIER_CREATE = 0x02;\n cadesplugin.ENABLE_ANY_OPERATION = 0x03;\n\n cadesplugin.CADESCOM_PRODUCT_CSP = 0;\n cadesplugin.CADESCOM_PRODUCT_OCSP = 1;\n cadesplugin.CADESCOM_PRODUCT_TSP = 2;\n\n cadesplugin.MEDIA_TYPE_REGISTRY = 0x00000001;\n cadesplugin.MEDIA_TYPE_HDIMAGE = 0x00000002;\n cadesplugin.MEDIA_TYPE_CLOUD = 0x00000004;\n cadesplugin.MEDIA_TYPE_SCARD = 0x00000008;\n }\n\n function async_spawn(generatorFunc) {\n function continuer(verb, arg) {\n var result;\n try {\n result = generator[verb](arg);\n } catch (err) {\n return Promise.reject(err);\n }\n if (result.done) {\n return result.value;\n } else {\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\n }\n }\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\n var onFulfilled = continuer.bind(continuer, \"next\");\n var onRejected = continuer.bind(continuer, \"throw\");\n return onFulfilled();\n }\n\n function isIE() {\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\n return (browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE');\n }\n\n function isIOS() {\n return (navigator.userAgent.match(/ipod/i) ||\n navigator.userAgent.match(/ipad/i) ||\n navigator.userAgent.match(/iphone/i));\n }\n\n function isNativeMessageSupported()\n {\n // В IE работаем через NPAPI\n if(isIE())\n return false;\n // В Edge работаем через NativeMessage\n if (browserSpecs.name === 'Edg') {\n return true;\n }\n if (browserSpecs.name === 'YaBrowser') {\n isYandex = true;\n return true;\n }\n // В Chrome, Firefox, Safari и Opera работаем через асинхронную версию в зависимости от версии\n if(browserSpecs.name === 'Opera') {\n isOpera = true;\n if(browserSpecs.version >= 33){\n return true;\n }\n else{\n return false;\n }\n }\n if(browserSpecs.name === 'Firefox') {\n isFireFox = true;\n if(browserSpecs.version >= 52){\n return true;\n }\n else{\n return false;\n }\n }\n if(browserSpecs.name === 'Chrome') {\n if(browserSpecs.version >= 42){\n return true;\n }\n else{\n return false;\n }\n }\n //В Сафари начиная с 12 версии нет NPAPI\n if(browserSpecs.name === 'Safari') {\n isSafari = true;\n if(browserSpecs.version >= 12) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\n function CreateObject(name) {\n if (isIOS()) {\n // На iOS для создания объектов используется функция\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\n }\n if (isIE()) {\n // В Internet Explorer создаются COM-объекты\n if (name.match(/X509Enrollment/i)) {\n try {\n // Объекты CertEnroll пробуем создавать через нашу фабрику,\n // если не получилось то через CX509EnrollmentWebClassFactory\n var objCertEnrollClassFactory = document.getElementById(\"webClassFactory\");\n return objCertEnrollClassFactory.CreateObject(name);\n }\n catch (e) {\n try {\n var objWebClassFactory = document.getElementById(\"certEnrollClassFactory\");\n return objWebClassFactory.CreateObject(name);\n }\n catch (err) {\n throw (\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\n }\n }\n }\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\n try {\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\n return objWebClassFactory.CreateObject(name);\n }\n catch (e) {\n // Для версий плагина ниже 2.0.12538\n return new ActiveXObject(name);\n }\n }\n // создаются объекты NPAPI\n return pluginObject.CreateObject(name);\n }\n\n function decimalToHexString(number) {\n if (number < 0) {\n number = 0xFFFFFFFF + number + 1;\n }\n\n return number.toString(16).toUpperCase();\n }\n\n function GetMessageFromException(e) {\n var err = e.message;\n if (!err) {\n err = e;\n } else if (e.number) {\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\n }\n return err;\n }\n\n function getLastError(exception) {\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\n return GetMessageFromException(exception);\n }\n\n try {\n return pluginObject.getLastError();\n } catch(e) {\n return GetMessageFromException(exception);\n }\n }\n\n // Функция для удаления созданных объектов\n function ReleasePluginObjects() {\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\n }\n\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\n function CreateObjectAsync(name) {\n return pluginObject.CreateObjectAsync(name);\n }\n\n //Функции для IOS\n var ru_cryptopro_npcades_10_native_bridge = {\n callbacksCount : 1,\n callbacks : {},\n\n // Automatically called by native layer when a result is available\n resultForCallback : function resultForCallback(callbackId, resultArray) {\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\n if (!callback) return;\n callback.apply(null,resultArray);\n },\n\n // Use this in javascript to request native objective-c code\n // functionName : string (I think the name is explicit :p)\n // args : array of arguments\n // callback : function with n-arguments that is going to be called when the native code returned\n call : function call(functionName, args, callback) {\n var hasCallback = callback && typeof callback === \"function\";\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\n\n if (hasCallback)\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\n\n var iframe = document.createElement(\"IFRAME\");\n var arrObjs = new Array(\"_CPNP_handle\");\n try{\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\n } catch(e){\n alert(e);\n }\n document.documentElement.appendChild(iframe);\n iframe.parentNode.removeChild(iframe);\n iframe = null;\n }\n };\n\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\n var tmpobj;\n var ex;\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\n ex = e;\n var str='tmpobj='+response;\n eval(str);\n if (typeof (tmpobj) === \"string\"){\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\n }\n });\n if(ex)\n throw ex;\n return tmpobj;\n }\n\n function show_firefox_missing_extension_dialog()\n {\n if (!window.cadesplugin_skip_extension_install)\n {\n var ovr = document.createElement('div');\n ovr.id = \"cadesplugin_ovr\";\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\n ovr.innerHTML = \"\";\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n\n ovr.addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n ovr.style.visibility=\"visible\";\n }\n }\n function firefox_or_safari_nmcades_onload() {\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\n }\n\n function nmcades_api_onload () {\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\n window.addEventListener(\"message\", function (event){\n if (typeof(event.data) !== \"string\" || !event.data.match(\"cadesplugin_loaded\"))\n return;\n if(isFireFox || isSafari)\n {\n // Для Firefox, Сафари вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", url);\n fileref.onerror = plugin_loaded_error;\n fileref.onload = firefox_or_safari_nmcades_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n }else {\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\n }\n }, false);\n }\n\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge, Safari\n function load_extension()\n {\n if(isFireFox || isSafari){\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\n nmcades_api_onload();\n } else {\n // в асинхронном варианте для Yandex и Opera подключаем расширение из Opera store.\n if (isOpera || isYandex) {\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\n fileref.onerror = plugin_loaded_error;\n fileref.onload = nmcades_api_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n } else {\n // для Chrome, Chromium, Chromium Edge расширение из Chrome store\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\n fileref.onerror = plugin_loaded_error;\n fileref.onload = nmcades_api_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n }\n }\n }\n\n //Загружаем плагин для NPAPI\n function load_npapi_plugin()\n {\n var elem = document.createElement('object');\n elem.setAttribute(\"id\", \"cadesplugin_object\");\n elem.setAttribute(\"type\", \"application/x-cades\");\n elem.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\n pluginObject = document.getElementById(\"cadesplugin_object\");\n if(isIE())\n {\n var elem1 = document.createElement('object');\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\n elem1.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\n var elem2 = document.createElement('object');\n elem2.setAttribute(\"id\", \"webClassFactory\");\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\n elem2.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\n }\n }\n\n //Отправляем событие что все ок.\n function plugin_loaded()\n {\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_resolve();\n }else {\n window.postMessage(\"cadesplugin_loaded\", \"*\");\n }\n }\n\n //Отправляем событие что сломались.\n function plugin_loaded_error(msg)\n {\n if(typeof(msg) === 'undefined' || typeof(msg) === 'object')\n msg = \"Плагин недоступен\";\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_reject(msg);\n } else {\n window.postMessage(\"cadesplugin_load_error\", \"*\");\n }\n }\n\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\n function check_load_timeout()\n {\n if(plugin_resolved === 1)\n return;\n if(isFireFox)\n {\n show_firefox_missing_extension_dialog();\n }\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\n } else {\n window.postMessage(\"cadesplugin_load_error\", \"*\");\n }\n\n }\n\n //Вспомогательная функция для NPAPI\n function createPromise(arg)\n {\n return new Promise(arg);\n }\n\n function check_npapi_plugin (){\n try {\n var oAbout = CreateObject(\"CAdESCOM.About\");\n plugin_loaded();\n }\n catch (err) {\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\n // Объект создать не удалось, проверим, установлен ли\n // вообще плагин. Такая возможность есть не во всех браузерах\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\n if (mimetype) {\n var plugin = mimetype.enabledPlugin;\n if (plugin) {\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\n }else\n {\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\n }\n }else\n {\n plugin_loaded_error(\"Плагин недоступен\");\n }\n }\n }\n\n //Проверяем работает ли плагин\n function check_plugin_working()\n {\n var div = document.createElement(\"div\");\n div.innerHTML = \"\";\n var isIeLessThan9 = (div.getElementsByTagName(\"i\").length === 1);\n if (isIeLessThan9) {\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\n return;\n }\n\n if(isNativeMessageSupported())\n {\n load_extension();\n }else if(!canPromise) {\n window.addEventListener(\"message\", function (event){\n if (event.data !== \"cadesplugin_echo_request\")\n return;\n load_npapi_plugin();\n check_npapi_plugin();\n },\n false);\n }else\n {\n if(document.readyState === \"complete\"){\n load_npapi_plugin();\n check_npapi_plugin();\n } else {\n window.addEventListener(\"load\", function (event) {\n load_npapi_plugin();\n check_npapi_plugin();\n }, false);\n }\n }\n }\n\n function set_pluginObject(obj)\n {\n pluginObject = obj;\n }\n\n function is_capilite_enabled()\n {\n if ((typeof (cadesplugin.EnableInternalCSP) !== 'undefined') && cadesplugin.EnableInternalCSP)\n return true;\n return false;\n };\n\n //Export\n cadesplugin.JSModuleVersion = \"2.3.0\";\n cadesplugin.async_spawn = async_spawn;\n cadesplugin.set = set_pluginObject;\n cadesplugin.set_log_level = set_log_level;\n cadesplugin.getLastError = getLastError;\n cadesplugin.is_capilite_enabled = is_capilite_enabled;\n\n if(isNativeMessageSupported())\n {\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\n }\n\n if(!isNativeMessageSupported())\n {\n cadesplugin.CreateObject = CreateObject;\n }\n\n if(window.cadesplugin_load_timeout)\n {\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\n }\n else\n {\n setTimeout(check_load_timeout, 20000);\n }\n\n set_constantValues();\n\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\n window.cadesplugin = cadesplugin;\n check_plugin_working();\n}());\n","function DN(){};\n\nDN.prototype.toString = function(){\n\tvar ret = '';\n\tfor(var i in this) {\n if(this.hasOwnProperty(i)) {\n ret += i + '=\"' + this[i].replace(/\"/g, '') + '\", ';\n }\n }\n\treturn ret;\n};\n\nexport default DN;","export default {\n CKR_CANCEL: 'пользователь отказался от выполнения операции.',\n CKR_HOST_MEMORY: 'недостаточно памяти для выполнения функции.',\n CKR_SLOT_ID_INVALID: 'неправильный идентификатор слота.',\n CKR_GENERAL_ERROR: 'Критическая ошибка, связанная с аппаратным обеспечением; Неудачная попытка проверки пути сертификации.',\n CKR_FUNCTION_FAILED: 'при выполнении функции возник сбой.',\n CKR_ARGUMENTS_BAD: 'недопустимый аргумент.',\n CKR_ATTRIBUTE_READ_ONLY: 'предпринята попытка присвоения значения атрибуту, который нельзя изменять.',\n CKR_ATTRIBUTE_TYPE_INVALID: 'некорректный тип атрибута.',\n CKR_ATTRIBUTE_VALUE_INVALID: 'атрибут нулевой длины.',\n CKR_DEVICE_ERROR: 'ошибка при обращении к устройству или слоту.',\n CKR_DEVICE_MEMORY: 'для выполнения функции недостаточно памяти в устройстве.',\n CKR_FUNCTION_CANCELED: 'время ожидания выполнения функции истекло.',\n CKR_KEY_HANDLE_INVALID: 'функции передан некорректный дескриптор ключа.',\n CKR_KEY_SIZE_RANGE: 'недопустимый размер ключа.',\n CKR_KEY_TYPE_INCONSISTENT: 'данный тип ключа не может использоваться с данным механизмом.',\n CKR_MECHANISM_INVALID: 'при выполнении криптографической функции был указан неправильный механизм.',\n CKR_MECHANISM_PARAM_INVALID: 'при выполнении криптографической функции были заданы некорректные параметры механизма.',\n CKR_OBJECT_HANDLE_INVALID: 'функции передан некорректный дескриптор объекта.',\n CKR_OPERATION_ACTIVE: 'одна или несколько выполняющихся операций препятствуют выполнению новой операции.',\n CKR_OPERATION_NOT_INITIALIZED: 'выполнение операции без предварительного указания параметров невозможно.',\n CKR_PIN_INCORRECT: 'функции передан неверный PIN-код.',\n CKR_PIN_LEN_RANGE: 'недопустимая длина PIN-кода.',\n CKR_PIN_LOCKED: 'PIN-код заблокирован.',\n CKR_SESSION_HANDLE_INVALID: 'функции передан некорректный дескриптор сессии.',\n CKR_SESSION_PARALLEL_NOT_SUPPORTED: 'невозможно открыть параллельную сессию.',\n CKR_SESSION_EXISTS: 'уже открыта сессия работы с тем же устройством.',\n CKR_SESSION_READ_ONLY_EXISTS: 'сессия открыта только для чтения. Смена режима невозможна.',\n CKR_SESSION_READ_WRITE_SO_EXISTS: 'открыта сессия чтения/записи. Открыть сеанс только для чтения невозможно.',\n CKR_SIGNATURE_INVALID: 'неправильное значение электронной подписи.',\n CKR_TEMPLATE_INCOMPLETE: 'для создания объекта недостаточно атрибутов.',\n CKR_TOKEN_NOT_PRESENT: 'в момент выполнения функции устройство было отключено.',\n CKR_TOKEN_WRITE_PROTECTED: 'устройство недоступно для записи.',\n CKR_USER_ALREADY_LOGGED_IN: 'пользователь уже предъявил PIN-код.',\n CKR_USER_NOT_LOGGED_IN: 'функция не может быть выполнена в гостевом режиме работы устройства.',\n CKR_USER_PIN_NOT_INITIALIZED: 'начальное значение PIN-кода не установлено.',\n CKR_USER_TYPE_INVALID: 'функция не может быть выполнена в текущем режиме работы устройства.',\n CKR_USER_ANOTHER_ALREADY_LOGGED_IN: 'невозможно переключение из режима администратора в режим пользователя или обратно.',\n CKR_BUFFER_TOO_SMALL: 'размер заданного буфера является недостаточным для сохранения результатов функции.',\n CKR_INFORMATION_SENSITIVE: 'запрашиваемый объект недоступен для чтения.',\n CKR_CRYPTOKI_NOT_INITIALIZED: 'выполнение функции без инициализации Единой библиотеки PKCS#11 (библиотеки Cryptoki) невозможно.',\n CKR_CRYPTOKI_ALREADY_INITIALIZED: 'попытка повторно инициализировать библиотеку Cryptoki.',\n CKR_FUNCTION_REJECTED: 'пользователь отменил операцию.',\n NOT_STATE_TOKEN_BINDED: 'значение параметра state отличается от STATE_TOKEN_BINDED (1).',\n NOT_STATE_NOT_BINDED: 'значение параметра state отличается от STATE_TOKEN_BINDED (0).',\n IS_STATE_NOT_BINDED: 'параметр state принимает значение STATE_TOKEN_BINDED (0).',\n NOT_STATE_UNILATERAL_AUTHENTICATION_IN_PROGRESS: 'значение параметра state отличается от STATE_TOKEN_BINDED (4).',\n NOT_STATE_SECURE_CHANNEL_CONNECTION_IN_PROGRESS: 'значение параметра state отличается от STATE_TOKEN_BINDED (2).',\n NOT_STATE_SECURE_CHANNEL_ESTABLISHED: 'значение параметра state отличается от STATE_TOKEN_BINDED (3).',\n CERTIFICATE_NOT_FOUND: 'сертификат не обнаружен.',\n PUBLIC_KEY_NOT_FOUND: 'открытый ключ не обнаружен в памяти поддерживаемого устройства.',\n SERVER_PUBLIC_KEY_NOT_FOUND: 'не найден открытый ключ сервера.',\n INVALID_SERVER_PUBLIC_KEY: 'неверный открытый ключ сервера.',\n DATA_TO_SIGN_ZERO_LENGTH: 'на подпись были представлены данные, имеющие нулевую длину.',\n DATA_TO_VERIFY_ZERO_LENGTH: 'на проверку подписи были представлены данные, имеющие нулевую длину.',\n SIGNATURE_TO_VERIFY_ZERO_LENGTH: 'на проверку была представлена подпись, имеющая нулевую длину.',\n INVALID_EC_PARAMS: 'неверно заданы параметры криптографических преобразований по ГОСТ Р 34.10-2001.',\n TOKEN_MEMORY_TOO_SMALL: 'для выполнения операции в поддерживаемом устройстве недостаточно свободной памяти.',\n KEY_SIZE_NOT_64: 'длина ключа не равна 64 битам.',\n CERT_NOT_MATCH_PUBLIC_KEY: 'сертификат не соответствует открытому ключу.',\n FAILED_CHECK_BROWSER_VERS: 'ошибка проверки версии используемого браузера.',\n BROWSER_VERS_NOT_SUPPORTED: 'используемая версия браузера не поддерживается.',\n INVALID_USER_TYPE: 'неверно указан тип PIN-кода.',\n PINS_NOT_MATCH: 'введённые значения нового PIN-кода неодинаковы.',\n USER_CHANGE_ADMIN_PIN_NOT_STATE_NOT_BINDED: 'cмена PIN-кода администратора невозможна, поскольку значение параметра state отличается от STATE_TOKEN_BINDED (0).',\n SSL_ERR_GEN_SESSION_KEY: 'ошибка при генерации ключа защиты данных, передаваемых между клиентом и сервером.',\n SSL_ERR_GOST_ENGINE: 'ошибка средства защиты, программно выполняющего криптографические преобразования на стороне клиента.',\n SSL_ERR_SSL_NEW: 'ошибка в начале выполнения протокола Handshake.',\n SSL_ERR_CONNECT: 'ошибка при выполнении протокола Handshake.',\n SSL_ERR_SSL_WRITE: 'ошибка при подготовке данных к защищённой передаче.',\n SSL_ERR_SSL_READ: 'ошибка при чтении защищённых для передачи данных.',\n SSL_ERR_LOAD_CERT_AND_KEY_FROM_TOKEN: 'ошибка при попытке считать сертификат и открытый ключ из памяти поддерживаемого устройства.',\n SSL_ERR_GET_PEER_PUBLIC_KEY: 'ошибка при получении открытого ключа сервера.',\n CERT_PARS_ERR_GET_PUBLIC_KEY: 'не удалось считать открытый ключ из сертификата.',\n CERT_PARS_ERR_GET_ISSUER_AND_SER_NUMBER: 'не удалось считать имя удостоверяющего центра и серийный номер из сертификата.',\n UNKNOWN_ERROR: 'неизвестная ошибка.'\n};","import DN from './DN';\n\nconst oids = [\n { oid: '1.2.643.3.131.1.1', short: 'INN', full: 'ИНН' },\n { oid: '1.2.643.100.1', short: 'OGRN', full: 'ОГРН' },\n { oid: '1.2.643.100.5', short: 'OGRNIP', full: 'ОГРНИП' },\n { oid: '1.2.643.100.3', short: 'SNILS', full: 'СНИЛС' },\n { oid: '1.2.840.113549.1.9.1', short: 'E', full: 'emailAddress' },\n { oid: '2.5.4.3', short: 'CN', full: 'commonName' },\n { oid: '2.5.4.4', short: 'SN', full: 'surname' },\n { oid: '2.5.4.42', short: 'G', full: 'givenName' },\n { oid: '2.5.4.6', short: 'C', full: 'countryName' },\n { oid: '2.5.4.7', short: 'L', full: 'localityName' },\n { oid: '2.5.4.8', short: 'S', full: 'stateOrProvinceName' },\n { oid: '2.5.4.9', short: 'STREET', full: 'streetAddress' },\n { oid: '2.5.4.10', short: 'O', full: 'organizationName' },\n { oid: '2.5.4.11', short: 'OU', full: 'organizationalUnitName' },\n { oid: '2.5.4.12', short: 'T', full: 'title' },\n// { oid: '2.5.4.16', short: '?', full: 'postalAddress' },\n];\n\n/**\n * Перевод кирилицы в латиницу в ключах объекта с информацией о сертификате\n * @param {DN} dn \n * @returns {DN}\n */\nexport function convertDN(dn) {\n const result = new DN; \n for (const field of Object.keys(dn)) {\n const oid = oids.find(item => item.oid == field || item.full == field);\n if (oid) {\n result[oid.short] = dn[field];\n }\n else {\n result[field] = dn[field];\n }\n }\n return result;\n}\n\n/**\n * Убирает кавычки из строки DN\n * @param {string} str \n */\nexport function stripDnQuotes(str) \n{\n return str.replace(/=\"/g, '=').replace(/\",/g, ',');\n}\n\n/**\n * compare function takes version numbers of any length and any number size per segment.\n * @see https://stackoverflow.com/a/16187766\n * @param {string} a\n * @param {string} b\n * @returns {number} < 0 if a < b; > 0 if a > b; 0 if a = b\n */\nexport function versionCompare(a, b) {\n let i, diff;\n const regExStrip0 = /(\\.0+)+$/;\n const segmentsA = a.replace(regExStrip0, '').split('.');\n const segmentsB = b.replace(regExStrip0, '').split('.');\n const l = Math.min(segmentsA.length, segmentsB.length);\n\n for (i = 0; i < l; i++) {\n diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10);\n if (diff) {\n return diff;\n }\n }\n return segmentsA.length - segmentsB.length;\n}\n","/**\n * JaCarta GOST simplified library\n * @author Aleksandr.ru\n * @link http://aleksandr.ru\n */\n\nimport DN from '../DN';\nimport errors from './errors';\nimport { convertDN } from '../helpers';\n\nfunction JaCarta() {\n\tvar client, tokenId;\n\n\t/**\n\t * Инициализация и проверка наличия требуемых возможностей\n\t * @returns {Promise} версия, информация о токене\n\t */\n\tthis.init = function(){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (typeof(JCWebClient) !== 'undefined') {\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetScript('https://localhost:24738/JCWebClient.js', resolve, reject);\n\t\t\t}\n\t\t}).then(() => {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tif(typeof JCWebClient != 'undefined') {\n\t\t\t\t\t\t// Установлен клиент одной из версий JC-WebClient (2.x или новой) либо оба клиента\n\t\t\t\t\t\tif(typeof JCWebClient.id == 'undefined') {\n\t\t\t\t\t\t\t// Установлен клиент новой версии, работающей через локальный веб-сервер\n\t\t\t\t\t\t\tclient = JCWebClient();\n\t\t\t\t\t\t\tclient.initialize();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Установлен клиент версии 2.x, работающей через NPAPI и ActiveX\n\t\t\t\t\t\t\tthrow new Error('JaCarta WebClient 2.x не поддерживается');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//Не установлен клиент ни старой, ни новой версии JC-WebClient\n\t\t\t\t\t\tthrow new Error('Не установлен клиент ни старой, ни новой версии JC-WebClient');\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!client.checkWebBrowserVersion()) {\n\t\t\t\t\t\tthrow new Error('Браузер не поддерживается');\n\t\t\t\t\t}\n\n\t\t\t\t\tvar aTokens = client.getAllTokens();\n\t\t\t\t\tif(aTokens && aTokens.length == 1) {\n\t\t\t\t\t\t// OK 1 токен\n\t\t\t\t\t\ttokenId = aTokens.shift();\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(aTokens && aTokens.length > 1) {\n\t\t\t\t\t\tthrow new Error('Подключено ' + aTokens.length + ' токена(ов)');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new Error('Нет подключенных токенов');\n\t\t\t\t\t}\n\t\t\t\t\tvar version = client.getPluginVersion();\n\t\t\t\t\tvar tokenInfo = client.getTokenInfo(tokenId);\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tversion,\n\t\t\t\t\t\tserial: tokenInfo[0], // серийный номер электронного ключа.\n\t\t\t\t\t\tflags: tokenInfo[1], // флаги электронного ключа.\n\t\t\t\t\t\tlabel: tokenInfo[2], // метка электронного ключа.\n\t\t\t\t\t\ttype: tokenInfo[3]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tcatch(e) {\n\t\t\t\t\tvar err = getError();\n\t\t\t\t\tthrow new Error(e.message || err);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Авторизация на токене с пин-кодом юзера\n\t * @param {string} userPin если нет, то предлгает ввести пин через UI плагина\n\t * @returns {Promise}\n\t */\n\tthis.bind = function(userPin) {\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar state = client.getLoggedInState().shift();\n\t\t\t\tif(state === 1) {\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t\telse if(!userPin) {\n\t\t\t\t\tif(client.bindTokenUI(tokenId)) {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new Error('Пользователь отменил ввод PIN-кода');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tclient.bindTokenAsync(tokenId, userPin, function(a){\n\t\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Отменить предъявление PIN-кода. Необходимо вызывать при завершении сеанса работы\n\t * @returns {Promise}\n\t */\n\tthis.unbind = function() {\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar state = client.getLoggedInState().shift();\n\t\t\t\tif(state === 1) {\n\t\t\t\t\tclient.unbindToken();\n\t\t\t\t}\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Очистка токена (удаление всех контейнеров)\n\t * @returns {Promise} количество удаленных контейнеров\n\t */\n\tthis.clean = function(){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar aContainers = client.getCertificateList(tokenId);\n\t\t\t\tfor(var i in aContainers) {\n\t\t\t\t\tvar containerId = aContainers[i].shift();\n\t\t\t\t\tclient.deleteContainerOrCertificate(containerId);\n\t\t\t\t}\n\t\t\t\tresolve(i);\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Создать запрос на сертификат\n\t * @param {DN} dn\n\t * @param {string} description описание контейнера\n\t * @param {array} ekuOids массив OID Extended Key Usage, по-умолчанию Аутентификация клиента '1.3.6.1.5.5.7.3.2' + Защищенная электронная почта '1.3.6.1.5.5.7.3.4'\n\t * @param {string} ecParams параметры эллиптической кривой ключевой пары. Может принимать значения A, B, C, XA, XB.\n\t * @returns {Promise} объект с полями { csr: 'base64 запрос на сертификат', containerId }\n\t * @see DN\n\t */\n\tthis.generateCSR = function(dn, description, ekuOids, ecParams){\n\t\tif(!ekuOids || !ekuOids.length) {\n\t\t\tekuOids = [\n\t\t\t\t'1.3.6.1.5.5.7.3.2', // Аутентификация клиента\n\t\t\t\t'1.3.6.1.5.5.7.3.4' // Защищенная электронная почта\n\t\t\t];\n\t\t}\n\t\tif(!ecParams) ecParams = 'XA';\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tclient.createContainerAsync(ecParams, description, function(a){\n\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar containerId = a;\n\t\t\t\t\t\tvar aDn = [];\n\t\t\t\t\t\tfor(var i in dn) if(dn.hasOwnProperty(i)) {\n\t\t\t\t\t\t\taDn.push(i, dn[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exts = [\n\t\t\t\t\t\t\t'certificatePolicies',\t'1.2.643.100.113.1',\n\t\t\t\t\t\t\t'keyUsage',\t\t\t\t'digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment',\n\t\t\t\t\t\t\t'extendedKeyUsage',\t\tekuOids.toString(),\n\t\t\t\t\t\t\t'1.2.643.100.111',\t\t'ASN1:FORMAT:UTF8,UTF8:\"Криптотокен\" (АЛАДДИН Р.Д.)'\n\t\t\t\t\t\t];\n\t\t\t\t\t\tclient.genCSRAsync(containerId, aDn, exts, function(a){\n\t\t\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// base64(запрос на сертификат в формате PKCS#10)\n\t\t\t\t\t\t\t\tvar csr = btoa(String.fromCharCode.apply(null, new Uint8Array(a)));\n\t\t\t\t\t\t\t\tresolve({\n\t\t\t\t\t\t\t\t\tcsr: pemSplit(csr), \n\t\t\t\t\t\t\t\t\tcontainerId\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\t\t\t\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Записать сертификат в контейнер\n\t * @param {string} certificate base64(массив байт со значением сертификата в формате DER)\n\t * @param {int} идентификатор контейнера куда записывать\n\t * @returns {Promise}\n\t */\n\tthis.writeCertificate = function(certificate, containerId){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar aCertificate = [];\n\t\t\t\tvar der = atob(certificate);\n\t\t\t\tfor(var i=0; i}\n\t */\n\tthis.certificateInfo = function(containerId){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar o = client.parseX509CertificateEx(tokenId, containerId);\n\t\t\t\tvar dn = new DN;\n\t\t\t\tfor(var i in o.Data.Subject) {\n\t\t\t\t\tvar rdn = o.Data.Subject[i].rdn;\n\t\t\t\t\tvar val = o.Data.Subject[i].value;\n\t\t\t\t\tdn[rdn] = val;\n\t\t\t\t}\n\t\t\t\tdn = convertDN(dn);\n\t\t\t\tvar dnI = new DN;\n\t\t\t\tfor(var i in o.Data.Issuer) {\n\t\t\t\t\tvar rdn = o.Data.Issuer[i].rdn;\n\t\t\t\t\tvar val = o.Data.Issuer[i].value;\n\t\t\t\t\tdnI[rdn] = val;\n\t\t\t\t}\n\t\t\t\tvar dt = new Date();\n\t\t\t\tvar info = {\n\t\t\t\t\tName: dn.CN,\n\t\t\t\t\tIssuer: dnI,\n\t\t\t\t\tIssuerName: dnI.CN,\n\t\t\t\t\tSubject: dn,\n\t\t\t\t\tSubjectName: dn.toString(),\n\t\t\t\t\tVersion: o.Data.Version,\n\t\t\t\t\tSerialNumber: o.Data['Serial Number'].map(byte2hex).join(''),\n\t\t\t\t\tThumbprint: o.Signature.map(byte2hex).join(''),\n\t\t\t\t\tValidFromDate: o.Data.Validity['Not Before'],\n\t\t\t\t\tValidToDate: o.Data.Validity['Not After'],\n\t\t\t\t\tHasPrivateKey: true,\n\t\t\t\t\tIsValid: dt >= o.Data.Validity['Not Before'] && dt <= o.Data.Validity['Not After'],\n\t\t\t\t\ttoString: function(){\n\t\t\t\t\t\treturn 'Название: ' + this.Name +\n\t\t\t\t\t\t\t'\\nИздатель: ' + this.IssuerName +\n\t\t\t\t\t\t\t'\\nСубъект: ' + this.SubjectName +\n\t\t\t\t\t\t\t'\\nВерсия: ' + this.Version +\n\t\t\t\t\t\t\t'\\nСерийный №: ' + this.SerialNumber +\n\t\t\t\t\t\t\t'\\nОтпечаток SHA1: ' + this.Thumbprint +\n\t\t\t\t\t\t\t'\\nНе действителен до: ' + this.ValidFromDate +\n\t\t\t\t\t\t\t'\\nНе действителен после: ' + this.ValidToDate +\n\t\t\t\t\t\t\t'\\nПриватный ключ: ' + (this.HasPrivateKey ? 'Есть' : 'Нет') +\n\t\t\t\t\t\t\t'\\nВалидный: ' + (this.IsValid ? 'Да' : 'Нет');\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tresolve(info);\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Получение массива доступных сертификатов\n\t * @returns {Promise} [{id, subject}, ...]\n\t */\n\tthis.listCertificates = function(){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tclient.getCertificateListAsync(tokenId, function(a){\n\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar certs = [];\n\t\t\t\t\t\tfor(var i=0; i} base64(массив байт со значением сертификата в формате DER)\n\t */\n\tthis.readCertificate = function(containerId){\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tvar state = client.getLoggedInState().shift();\n\t\t\t\tif(state === 0) {\n\t\t\t\t\tvar a = client.readCertificateEx(tokenId, containerId);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar a = client.readCertificate(containerId);\n\t\t\t\t}\n\t\t\t\tif(a && a.length) {\n\t\t\t\t\t// base64(массив байт со значением сертификата в формате DER)\n\t\t\t\t\tvar cert = btoa(String.fromCharCode.apply(null, new Uint8Array(a)));\n\t\t\t\t\tresolve(pemSplit(cert));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new Error('Нет сертификата в контейнере');\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Подписать данные. Выдает подпись в формате PKCS#7, опционально закодированную в Base64\n\t * @param {string} data данные (и подпись) закодированы в base64\n\t * @param {int} containerId идентификатор контейнера (сертификата)\n\t * @returns {Promise} строка-подпись в формате PKCS#7, закодированная в Base64.\n\t */\n\tthis.signData = function(dataBase64, containerId){\n\t\tvar attachedSignature = false;\n\t\treturn new Promise(resolve => {\n\t\t\ttry {\n\t\t\t\tclient.signBase64EncodedDataAsync(containerId, dataBase64, attachedSignature, false, function(a){\n\t\t\t\t\tif(a && a[0] == 'Error') {\n\t\t\t\t\t\tvar code = a[1];\n\t\t\t\t\t\tvar err = getError(code);\n\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar sign = pemSplit(a);\n\t\t\t\t\t\tresolve(sign);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tvar err = getError();\n\t\t\t\tthrow new Error(err || e.message);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Шифрование данных не поддерживается\n\t * @returns {Promise}\n\t */\n\tthis.encryptData = function() {\n\t\treturn new Promise(function () {\n\t\t\tthrow new Error('Encrypt feature is not supported, please upgrade to JaCarta-2 GOST');\n\t\t});\n\t}\n\n\t/**\n\t * Дешифрование данных не поддерживается\n\t * @returns {Promise<>}\n\t */\n\tthis.decryptData = function() {\n\t\treturn new Promise(function () {\n\t\t\tthrow new Error('Decrypt feature is not supported, please upgrade to JaCarta-2 GOST');\n\t\t});\n\t}\n\n\t/**\n\t * Получить ошибку по коду\n\t * @param {string} mnemo мнемонический код ошибки CKR_*\n\t * @returns {string|Boolean} false если нет ошибки (CKR_OK)\n\t */\n\tfunction getError(mnemo) {\n\t\ttry {\n\t\t\tif(!mnemo) {\n\t\t\t\tvar code = client.getLastError();\n\t\t\t\tmnemo = client.getErrorMessage(code);\n\t\t\t}\n\t\t\tif(mnemo == 'CKR_OK') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn errors[mnemo] || mnemo;\n\t\t}\n\t\tcatch(e) {\n\t\t\treturn e.message;\n\t\t}\n\t}\n\n\t/**\n\t * Получить название сертификата\n\t * @param {type} o объект, включающий в себя значения всех полей сертификата.\n\t * @param {type} containerName\n\t * @returns {string} \n\t */\n\tfunction formatCertificateName(o, containerName)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in o.Data.Subject) {\n\t\t\tvar rdn = o.Data.Subject[i].rdn;\n\t\t\tvar val = o.Data.Subject[i].value;\n\t\t\tdn[rdn] = val;\n\t\t}\n\t\tdn.toString = function(){\n\t\t\tvar cn = this['CN'] || this['2.5.4.3'];\n\t\t\tvar snils = this['СНИЛС'] || this['SNILS'] || this['1.2.643.100.3'];\n\t\t\tvar inn = this['ИНН'] || this['INN'] || this['1.2.643.3.131.1.1'];\n\t\t\treturn '' + cn + (inn ? '; ИНН ' + inn : '') + (snils ? '; СНИЛС ' + snils : '') + (containerName ? ' (' + containerName + ')' : '');\n\t\t};\n\t\treturn dn.toString();\n\t}\n\n\tfunction byte2hex(byte) {\n\t\t//console.log('byte %d -> %s', byte, byte.toString(16));\n\t\treturn ('0' + byte.toString(16)).slice(-2);\n\t}\n\n\t// https://gist.github.com/hendriklammers/5231994\n\tfunction pemSplit(str) {\n\t\tvar re = new RegExp('.{1,64}', 'g');\n\t\treturn str.match(re).join('\\n');\n\t}\n\n\t/** \n\t * Функция загрузки скрипта.\n\t * @param src - адрес расположения скрипта;\n\t * @param done - callback-функция, срабатывающая при успешной загрузки скрипта;\n\t * @param fail - callback-функция, срабатывающая при неудачной загрузки скрипта.\n\t*/\n\tfunction getScript(src, done, fail) {\n\t\tvar parent = document.getElementsByTagName('body')[0];\n\n\t\tvar script = document.createElement('script');\n\t\tscript.type = 'text/javascript';\n\t\tscript.src = src;\n\n\t\tif (script.readyState) { // IE\n\t\t\tscript.onreadystatechange = function () {\n\t\t\t\tif (script.readyState === \"loaded\" || script.readyState === \"complete\") {\n\t\t\t\t\tscript.onreadystatechange = null;\n\t\t\t\t\t// На некоторых браузерах мы попадаем сюда и в тех случаях когда скрипт не загружен,\n\t\t\t\t\t// поэтому дополнительно проверяем валидность JCWebClient\n\t\t\t\t\tif (typeof (JCWebClient) === 'undefined') {\n\t\t\t\t\t\tonFail(\"JCWebClient is invalid\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (script.readyState !== \"loading\") {\n\t\t\t\t\tonFail(\"JCWebClient hasn't been loaded\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse { // Others\n\t\t\tscript.onload = done;\n\t\t\tscript.onerror = function() {\n\t\t\t\tonFail(\"JCWebClient hasn't been loaded\");\n\t\t\t};\n\t\t}\n\n\t\tparent.appendChild(script);\n\n\t\tfunction onFail(errorMsg) {\n\t\t\tparent.removeChild(script);\n\t\t\tfail(errorMsg);\n\t\t}\n\t}\n}\n\nexport default JaCarta;\n","export default {\n UNKNOWN_ERROR: 'неизвестная ошибка',\n CKR_CANCEL: 'пользователь отказался от выполнения операции',\n CKR_HOST_MEMORY: 'недостаточно памяти для выполнения функции',\n CKR_SLOT_ID_INVALID: 'неправильный идентификатор слота',\n CKR_GENERAL_ERROR: 'такой код ошибки может означать: критическую ошибку, связанную с аппаратным обеспечением; неудачную попытку проверки пути сертификации.',\n CKR_FUNCTION_NOT_SUPPORTED: 'функция не поддерживается',\n CKR_FUNCTION_FAILED: 'при выполнении функции возник сбой',\n CKR_ARGUMENTS_BAD: 'недопустимый аргумент',\n CKR_ATTRIBUTE_READ_ONLY: 'предпринята попытка присвоения значения атрибуту, который нельзя изменять',\n CKR_ATTRIBUTE_TYPE_INVALID: 'некорректный тип атрибута',\n CKR_ATTRIBUTE_VALUE_INVALID: 'атрибут нулевой длины',\n CKR_DEVICE_ERROR: 'ошибка при обращении к устройству или слоту',\n CKR_DEVICE_MEMORY: 'для выполнения функции недостаточно памяти в устройстве',\n CKR_FUNCTION_CANCELED: 'время ожидания выполнения функции истекло',\n CKR_KEY_HANDLE_INVALID: 'функции передан некорректный дескриптор ключа',\n CKR_KEY_SIZE_RANGE: 'недопустимый размер ключа',\n CKR_KEY_TYPE_INCONSISTENT: 'данный тип ключа не может использоваться с данным механизмом',\n CKR_MECHANISM_INVALID: 'при выполнении криптографической функции был указан неправильный механизм',\n CKR_MECHANISM_PARAM_INVALID: 'при выполнении криптографической функции были заданы некорректные параметры механизма',\n CKR_OBJECT_HANDLE_INVALID: 'функции передан некорректный дескриптор объекта',\n CKR_OPERATION_ACTIVE: 'одна или несколько выполняющихся операций препятствуют выполнению новой операции',\n CKR_OPERATION_NOT_INITIALIZED: 'выполнение операции без предварительного указания параметров невозможно',\n CKR_PIN_INCORRECT: 'функции передан неверный PIN-код',\n CKR_PIN_LEN_RANGE: 'недопустимая длина PIN-кода',\n CKR_PIN_LOCKED: 'PIN-код заблокирован',\n CKR_SESSION_HANDLE_INVALID: 'функции передан некорректный дескриптор сессии',\n CKR_SESSION_PARALLEL_NOT_SUPPORTED: 'невозможно открыть параллельную сессию',\n CKR_SESSION_EXISTS: 'уже открыта сессия работы с тем же устройством',\n CKR_SESSION_READ_ONLY_EXISTS: 'сессия открыта только для чтения. Смена режима невозможна',\n CKR_SESSION_READ_WRITE_SO_EXISTS: 'открыта сессия чтения/записи. Открыть сеанс только для чтения невозможно',\n CKR_SIGNATURE_INVALID: 'неправильное значение электронной подписи',\n CKR_TEMPLATE_INCOMPLETE: 'для создания объекта недостаточно атрибутов',\n CKR_TOKEN_NOT_PRESENT: 'в момент выполнения функции устройство было отключено',\n CKR_TOKEN_WRITE_PROTECTED: 'устройство недоступно для записи',\n CKR_USER_ALREADY_LOGGED_IN: 'пользователь уже предъявил PIN-код',\n CKR_USER_NOT_LOGGED_IN: 'функция не может быть выполнена в гостевом режиме работы устройства',\n CKR_USER_PIN_NOT_INITIALIZED: 'начальное значение PIN-кода не установлено',\n CKR_USER_TYPE_INVALID: 'функция не может быть выполнена в текущем режиме работы устройства',\n CKR_USER_ANOTHER_ALREADY_LOGGED_IN: 'невозможно переключение из режима администратора в режим пользователя или обратно',\n CKR_BUFFER_TOO_SMALL: 'размер заданного буфера является недостаточным для сохранения результатов функции',\n CKR_INFORMATION_SENSITIVE: 'запрашиваемый объект недоступен для чтения',\n CKR_CRYPTOKI_NOT_INITIALIZED: 'выполнение функции без инициализации Единой библиотеки PKCS#11 (библиотеки Cryptoki) невозможно',\n CKR_CRYPTOKI_ALREADY_INITIALIZED: 'попытка повторно инициализировать библиотеку Cryptoki',\n CKR_FUNCTION_REJECTED: 'пользователь отменил операцию',\n NOT_STATE_TOKEN_BINDED: 'значение параметра state отличается от STATE_TOKEN_BINDED (1)',\n NOT_STATE_NOT_BINDED: 'значение параметра state отличается от STATE_TOKEN_BINDED (0)',\n IS_STATE_NOT_BINDED: 'параметр state принимает значение STATE_TOKEN_BINDED (0)',\n NOT_STATE_UNILATERAL_AUTHENTICATION_IN_PROGRESS: 'значение параметра state отличается от STATE_TOKEN_BINDED (4)',\n NOT_STATE_SECURE_CHANNEL_CONNECTION_IN_PROGRESS: 'значение параметра state отличается от STATE_TOKEN_BINDED (2)',\n NOT_STATE_SECURE_CHANNEL_ESTABLISHED: 'значение параметра state отличается от STATE_TOKEN_BINDED (3)',\n CERTIFICATE_NOT_FOUND: 'сертификат не обнаружен',\n PUBLIC_KEY_NOT_FOUND: 'открытый ключ не обнаружен в памяти поддерживаемого устройства',\n SERVER_PUBLIC_KEY_NOT_FOUND: 'не найден открытый ключ сервера',\n INVALID_SERVER_PUBLIC_KEY: 'неверный открытый ключ сервера',\n DATA_TO_SIGN_ZERO_LENGTH: 'на подпись были представлены данные, имеющие нулевую длину',\n DATA_TO_VERIFY_ZERO_LENGTH: 'на проверку подписи были представлены данные, имеющие нулевую длину',\n SIGNATURE_TO_VERIFY_ZERO_LENGTH: 'на проверку была представлена подпись, имеющая нулевую длину',\n INVALID_EC_PARAMS: 'неверно заданы параметры криптографических преобразований по ГОСТ Р 34.10-2001',\n TOKEN_MEMORY_TOO_SMALL: 'для выполнения операции в поддерживаемом устройстве недостаточно свободной памяти',\n KEY_SIZE_NOT_64: 'длина ключа не равна 64 битам',\n CERT_NOT_MATCH_PUBLIC_KEY: 'сертификат не соответствует открытому ключу',\n FAILED_CHECK_BROWSER_VERS: 'ошибка проверки версии используемого браузера',\n BROWSER_VERS_NOT_SUPPORTED: 'используемая версия браузера не поддерживается',\n INVALID_USER_TYPE: 'неверно указан тип PIN-кода',\n PINS_NOT_MATCH: 'введённые значения нового PIN-кода неодинаковы',\n USER_CHANGE_ADMIN_PIN_NOT_STATE_NOT_BINDED: 'cмена PIN-кода администратора невозможна, поскольку значение параметра state отличается от STATE_TOKEN_BINDED (0)',\n SSL_ERR_GEN_SESSION_KEY: 'ошибка при генерации ключа защиты данных, передаваемых между клиентом и сервером',\n SSL_ERR_GOST_ENGINE: 'ошибка средства защиты, программно выполняющего криптографические преобразования на стороне клиента',\n SSL_ERR_SSL_NEW: 'ошибка в начале выполнения протокола Handshake',\n SSL_ERR_CONNECT: 'ошибка при выполнении протокола Handshake',\n SSL_ERR_SSL_WRITE: 'ошибка при подготовке данных к защищённой передаче',\n SSL_ERR_SSL_READ: 'ошибка при чтении защищённых для передачи данных',\n SSL_ERR_LOAD_CERT_AND_KEY_FROM_TOKEN: 'ошибка при попытке считать сертификат и открытый ключ из памяти поддерживаемого устройства',\n SSL_ERR_GET_PEER_PUBLIC_KEY: 'ошибка при получении открытого ключа сервера',\n CERT_PARS_ERR_GET_PUBLIC_KEY: 'не удалось считать открытый ключ из сертификата',\n CERT_PARS_ERR_GET_ISSUER_AND_SER_NUMBER: 'не удалось считать имя удостоверяющего центра и серийный номер из сертификата',\n CKR_KT2_PIN_ALREADY_SET: 'PIN-код уже установлен',\n CKR_PUK_INCORRECT: 'неправильный PUK-код',\n CKR_CANNOT_UNLOCK: 'невозможно разблокировать PIN-код',\n CKR_PUK_INVALID: 'недопустимые символы в значении PUK-кода',\n CKR_SM_REQUIRED: 'для выполнения команды необходимо установить защищённое соединение',\n CKR_PKCS7_PUBLIC_KEY_NOT_FOUND: 'при проверке подписи под PKCS #7 на JaCarta-2 ГОСТ не был найден открытый ключ',\n CKR_ICL_LIBRARY_NOT_FOUND: 'ИКБ не найдена',\n CKR_ICL_JCVERIFY_NOT_FOUND: 'утилита jcverify не найдена',\n CKR_ICL_JCVERIFY_CHECKSUM_NOT_FOUND: 'файл контрольных сумм jcverify не найден',\n CKR_ICL_CHECKSUM_NOT_FOUND: 'файл контрольных сумм ИКБ не найден',\n CKR_ICL_JCVERIFY_CHECKSUM: 'неверные контрольная сумма утилиты jcverify',\n CKR_ICL_CHECKSUM: 'неверная контрольная сумма ИКБ',\n CKR_ICL_NOT_ICL: 'при загрузке ИКБ произошла ошибка. Требуемые функции найдены'\n};","/**\n * JaCarta-2 GOST simplified library\n * @author Aleksandr.ru\n * @link http://aleksandr.ru\n */\nimport DN from '../DN';\nimport errors from './errors';\nimport { convertDN, stripDnQuotes } from '../helpers';\n\nfunction JaCarta2() {\n\n\tvar client, tokenId;\n\t// const debug = process.env.NODE_ENV === 'development';\t\n\n\t/**\n\t * Инициализация и проверка наличия требуемых возможностей\n\t * @returns {Promise} версия, информация о токене\n\t */\n\tthis.init = function() {\n\t\tvar final = {};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (typeof(JCWebClient2) !== 'undefined') {\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetScript('https://localhost:24738/JCWebClient.js', resolve, reject);\n\t\t\t}\n\t\t}).then(() => {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tif(typeof JCWebClient2 != 'undefined') {\n\t\t\t\t\tclient = JCWebClient2;\n\t\t\t\t\tclient.initialize();\n\t\t\t\t\tclient.defaults({\n\t\t\t\t\t\tasync: true\n\t\t\t\t\t});\n\t\t\t\t\tclient.getJCWebClientVersion({\n\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//Не установлен клиент JCWebClient2\n\t\t\t\t\tthrow new Error('Не установлен клиент JCWebClient2');\n\t\t\t\t}\n\t\t\t});\n\t\t}).then(version => {\n\t\t\tconsole.log('JCWebClient2 v.%s', version);\n\t\t\tfinal['version'] = version;\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tclient.getAllSlots({\n\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t});\n\t\t\t});\n\t\t}).then(slots => {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t// console.log('Got %d slots', slots.length, slots);\n\t\t\t\tvar aTokens = slots.filter(a => {\n\t\t\t\t\treturn a.tokenExists;\n\t\t\t\t});\n\t\t\t\tif(aTokens && aTokens.length == 1) {\n\t\t\t\t\t// OK 1 токен\n\t\t\t\t\tvar token = aTokens.shift();\n\t\t\t\t\tresolve(token.id);\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(aTokens && aTokens.length > 1) {\n\t\t\t\t\tthrow new Error('Подключено ' + aTokens.length + ' токена(ов)');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new Error('Нет подключенных токенов');\n\t\t\t\t}\n\t\t\t});\n\t\t}).then(tokenID => {\n\t\t\ttokenId = tokenID;\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tclient.getTokenInfo({\n\t\t\t\t\targs: { tokenID: tokenId },\n\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t});\n\t\t\t});\n\t\t}).then(info => {\n\t\t\treturn Object.assign(final, info);\n\t\t});\n\t};\n\n\t/**\n\t * Авторизация на токене с пин-кодом юзера\n\t * @param {string} userPin если нет, то предлгает ввести пин через UI плагина\n\t * @returns {Promise}\n\t */\n\tthis.bind = function(userPin) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getLoggedInState({\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(result => {\n\t\t\tif(result.state === JCWebClient2.Vars.AuthState.binded && result.tokenID === tokenId) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tvar args = { tokenID: tokenId };\n\t\t\t\t\tif(!userPin) {\n\t\t\t\t\t\targs.useUI = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\targs.pin = userPin;\n\t\t\t\t\t}\n\t\t\t\t\tclient.bindToken({\n\t\t\t\t\t\targs: args,\n\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Отменить предъявление PIN-кода. Необходимо вызывать при завершении сеанса работы\n\t * @returns {Promise}\n\t */\n\tthis.unbind = function() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getLoggedInState({\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(result => {\n\t\t\tif(result.state !== JCWebClient2.Vars.AuthState.notBinded) {\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tclient.unbindToken({\n\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t});\n\t\t\t\t});\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Очистка токена (удаление всех контейнеров)\n\t * @returns {Promise}\n\t */\n\tthis.clean = function(){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getContainerList({\n\t\t\t\targs: {\n\t\t\t\t\ttokenID: tokenId\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(containers => {\n\t\t\tvar p = Promise.resolve();\n\t\t\tfor(var i in containers) {\n\t\t\t\tp = p.then(function(){\n\t\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\t\tclient.deletePKIObject({\n\t\t\t\t\t\t\targs: {\n\t\t\t\t\t\t\t\tid: containers[i].id\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn p;\n\t\t});\n\t};\n\n\t/**\n\t * Создать запрос на сертификат\n\t * @param {DN} dn\n\t * @param {string} description описание контейнера\n\t * @param {array} ekuOids массив OID Extended Key Usage, по-умолчанию Аутентификация клиента '1.3.6.1.5.5.7.3.2' + Защищенная электронная почта '1.3.6.1.5.5.7.3.4'\n\t * @param {string} algorithm Алгоритм \"GOST-2012-256\" (по-умолчанию) или \"GOST-2001\".\n\t * @returns {Promise} объект с полями { csr: 'base64 запрос на сертификат', keyPairId }\n\t * @see DN\n\t */\n\tthis.generateCSR = function(dn, description, ekuOids, algorithm){\n\t\tif(!ekuOids || !ekuOids.length) {\n\t\t\tekuOids = [\n\t\t\t\t'1.3.6.1.5.5.7.3.2', // Аутентификация клиента\n\t\t\t\t'1.3.6.1.5.5.7.3.4' // Защищенная электронная почта\n\t\t\t];\n\t\t}\n\t\tif(!algorithm) {\n\t\t\t// algorithm = JCWebClient2.Vars.KeyAlgorithm.GOST_2001; //default \"GOST-2001\"\n\t\t\talgorithm = JCWebClient2.Vars.KeyAlgorithm.GOST_2012_256; // \"GOST-2012-256\"\n\t\t} \n\t\tvar exts = {\n\t\t\t'certificatePolicies': '1.2.643.100.113.1',\n\t\t\t'keyUsage': 'digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment',\n\t\t\t'extendedKeyUsage': ekuOids.toString(),\n\t\t\t'1.2.643.100.111': 'ASN1:FORMAT:UTF8,UTF8:\"Криптотокен\" (АЛАДДИН Р.Д.)'\n\t\t};\n\t\tvar paramSet = 'XA';\n\t\tvar id;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.createKeyPair({\n\t\t\t\targs: {\n\t\t\t\t\tparamSet: paramSet,\n\t\t\t\t\tdescription: description,\n\t\t\t\t\talgorithm: algorithm\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(keyPairId => {\n\t\t\tid = keyPairId;\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tclient.genCSR({\n\t\t\t\t\targs: {\n\t\t\t\t\t\tid: id,\n \t\t\t\t\tdn: dn,\n \t\t\t\t\texts: exts\n\t\t\t\t\t},\n\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t});\n\t\t\t});\n\t\t}).then(a => {\n\t\t\t// base64(запрос на сертификат в формате PKCS#10)\n\t\t\tvar csr = btoa(String.fromCharCode.apply(null, new Uint8Array(a)));\n\t\t\treturn { \n\t\t\t\tcsr: pemSplit(csr),\n\t\t\t\tkeyPairId: id\n\t\t\t};\n\t\t});\n\t};\n\n\t/**\n\t * Записать сертификат в контейнер\n\t * @param {string} certificate base64(массив байт со значением сертификата в формате DER)\n\t * @param {int} keyPairId идентификатор контейнера куда записывать\n\t * @returns {Promise} идентификатор образованного контейнера.\n\t */\n\tthis.writeCertificate = function(certificate, keyPairId) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.writeUserCertificate({\n\t\t\t\targs: {\n\t\t\t\t\tkeyPairID: keyPairId,\n\t\t\t\t\tcert: certificate\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Получение информации о сертификате.\n\t * @param {int} containerId идентификатор контейнера (сертификата)\n\t * @returns {Promise}\n\t */\n\tthis.certificateInfo = function(containerId) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.parseX509Certificate({\n\t\t\t\targs: {\n\t\t\t\t\ttokenID: tokenId,\n\t\t\t\t\tid: containerId\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(o => {\n\t\t\tvar dn = makeDN(o.Data.Subject);\n\t\t\tvar dnI = makeDN(o.Data.Issuer);\n\t\t\tvar dt = new Date();\n\t\t\tvar info = {\n\t\t\t\tName: dn.CN,\n\t\t\t\tIssuer: dnI,\t\t\t\n\t\t\t\tIssuerName: stripDnQuotes(dnI.toString()),\n\t\t\t\tSubject: dn,\n\t\t\t\tSubjectName: stripDnQuotes(dn.toString()),\n\t\t\t\tVersion: o.Data.Version,\n\t\t\t\tSerialNumber: o.Data['Serial Number'].map(byte2hex).join(''),\n\t\t\t\tThumbprint: o.Signature.map(byte2hex).join(''),\n\t\t\t\tValidFromDate: o.Data.Validity['Not Before'],\n\t\t\t\tValidToDate: o.Data.Validity['Not After'],\n\t\t\t\tHasPrivateKey: true,\n\t\t\t\tIsValid: dt >= o.Data.Validity['Not Before'] && dt <= o.Data.Validity['Not After'],\n\t\t\t\tAlgorithm: o.Data['Subject Public Key Info']['Public Key Algorithm'],\n\t\t\t\t//ProviderName: '', //TODO\n\t\t\t\t//ProviderType: undefined, //TODO\n\t\t\t\ttoString: function() {\n\t\t\t\t\treturn 'Название: ' + this.Name +\n\t\t\t\t\t\t '\\nИздатель: ' + this.IssuerName +\n\t\t\t\t\t\t '\\nСубъект: ' + this.SubjectName +\n\t\t\t\t\t\t '\\nВерсия: ' + this.Version +\n\t\t\t\t\t\t '\\nАлгоритм: ' + this.Algorithm + // PublicKey Algorithm\n\t\t\t\t\t\t '\\nСерийный №: ' + this.SerialNumber +\n\t\t\t\t\t\t '\\nОтпечаток SHA1: ' + this.Thumbprint +\n\t\t\t\t\t\t '\\nНе действителен до: ' + this.ValidFromDate +\n\t\t\t\t\t\t '\\nНе действителен после: ' + this.ValidToDate +\n\t\t\t\t\t\t '\\nПриватный ключ: ' + (this.HasPrivateKey ? 'Есть' : 'Нет') +\n\t\t\t\t\t\t '\\nВалидный: ' + (this.IsValid ? 'Да' : 'Нет');\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn info;\n\t\t});\n\t};\n\n\t/**\n\t * Получение массива доступных сертификатов\n\t * @returns {Promise} [{ id, name }, ...]\n\t */\n\tthis.listCertificates = function() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getContainerList({\n\t\t\t\targs: {\n\t\t\t\t\ttokenID: tokenId\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(a => {\n\t\t\tvar certs = [];\n\t\t\tvar p = Promise.resolve();\n\t\t\tfor(var i=0; i {\n\t\t\t\t\t\t\tclient.parseX509Certificate({\n\t\t\t\t\t\t\t\targs: {\n\t\t\t\t\t\t\t\t\ttokenID: tokenId,\n\t\t\t\t\t\t\t\t\tid: contId\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tonSuccess: resolve,\n\t\t\t\t\t\t\t\tonError: errorHandler(reject)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}).then(o => {\n\t\t\t\t\t\t\tcerts.push({\n\t\t\t\t\t\t\t\tid: contId,\n\t\t\t\t\t\t\t\tname: formatCertificateName(o, contName)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn certs.length;\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})(contId, contName);\n\t\t\t}\n\t\t\treturn p.then(function(){\n\t\t\t\treturn certs;\n\t\t\t});\n\t\t});\n\t};\n\t\n\t/**\n\t * Получить сертификат из контейнера\n\t * @param {int} containerId\n\t * @returns {Promise} base64(массив байт со значением сертификата в формате DER)\n\t */\n\tthis.readCertificate = function(containerId) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.getCertificateBody({\n\t\t\t\targs: {\n\t\t\t\t\tid: containerId,\n\t\t\t\t\ttokenID: tokenId\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(a => {\n\t\t\tif(a && a.length) {\n\t\t\t\t// base64(массив байт со значением сертификата в формате DER)\n\t\t\t\tvar cert = btoa(String.fromCharCode.apply(null, new Uint8Array(a)));\n\t\t\t\treturn pemSplit(cert);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Error('Нет сертификата в контейнере');\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Подписать данные. Выдает подпись в формате PKCS#7, закодированную в Base64\n\t * @param {string} dataBase64 Данные для подписи в виде строки, закодированной в Base64\n\t * @param {int} containerId идентификатор контейнера (сертификата)\n\t * @param {object} [options]\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} строка-подпись в формате PKCS#7, закодированная в Base64.\n\t */\n\tthis.signData = function(dataBase64, containerId, options){\n\t\tif (!options) options = {};\n\t\tconst { attached } = options;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.signBase64EncodedData({\n\t\t\t\targs: {\n\t\t\t\t\tcontID: containerId,\n\t\t\t\t\tdata: dataBase64,\n\t\t\t\t\tattachedSignature: !!attached\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t}).then(sign => {\n\t\t\treturn pemSplit(sign);\n\t\t});\n\t};\n\n\t/**\n\t * Проверить подпись.\n\t * @param {string} dataBase64 игнорируется если прикрепленная подпись\n\t * @param {string} signBase64 существующая подпись\n\t * @param {object} [options]\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} true или reject\n\t */\n\tthis.verifySign = function(dataBase64, signBase64, options){\n\t\tif (!options) options = {};\n\t\tconst { attached } = options;\n\t\tconst args = {\n\t\t\tsignature: Array.from(atob(signBase64), c => c.charCodeAt(0)),\n\t\t\toptions: {\n\t\t\t\ttokenID: tokenId,\n\t\t\t\tuseToken: true\n\t\t\t}\n\t\t};\n\t\tif (!attached) {\n\t\t\targs.data = Array.from(atob(dataBase64), c => c.charCodeAt(0));\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tclient.verifyData({\n\t\t\t\targs,\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Шифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {int} containerId идентификатор контейнера (сертификата)\n\t * @returns {Promise} base64 enveloped data\n\t */\n\tthis.encryptData = function(dataBase64, containerId) {\n\t\t// https://stackoverflow.com/questions/21797299/convert-base64-string-to-arraybuffer/21797381\n\t\tconst dataByte = Array.from(atob(dataBase64), c => c.charCodeAt(0));\n\t\treturn this.readCertificate(containerId).then(cert => new Promise((resolve, reject) => {\n\t\t\tclient.encryptData({\n\t\t\t\targs: {\n\t\t\t\t\tcontID: containerId,\n\t\t\t\t\treceiverCertificate: cert,\n\t\t\t\t\tdata: dataByte // Данные для шифрования в виде массива байт.\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t})).then(data => {\n\t\t\tconst base64 = btoa(String.fromCharCode.apply(null, new Uint8Array(data)));\n\t\t\treturn pemSplit(base64);\n\t\t});\n\t};\n\n\t/**\n\t * Дешифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {int} containerId идентификатор контейнера (ключа)\n\t * @returns {Promise} base64\n\t */\n\tthis.decryptData = function(dataBase64, containerId) {\n\t\tconst dataByte = Array.from(atob(dataBase64), c => c.charCodeAt(0));\n\t\treturn this.readCertificate(containerId).then(cert => new Promise((resolve, reject) => {\n\t\t\tconst certByte = Array.from(atob(cert), c => c.charCodeAt(0));\n\t\t\tclient.decryptData({\n\t\t\t\targs: {\n\t\t\t\t\tcontID: containerId,\n\t\t\t\t\tsenderCertificate: certByte, // Сертификат отправителя в виде массива байт.\n\t\t\t\t\tdata: dataByte // Массив байт с зашифрованными данными в формате CMS.\n\t\t\t\t},\n\t\t\t\tonSuccess: resolve,\n\t\t\t\tonError: errorHandler(reject)\n\t\t\t});\n\t\t})).then(data => btoa(String.fromCharCode.apply(null, new Uint8Array(data))));\n\t};\n\n\tfunction errorHandler(reject)\n\t{\n\t\treturn function(e) {\n\t\t\tif(client && e.name === 'JCWebClientError' && errors[e.message]) {\n\t\t\t\t// подменяем сообщение на более понятное\n\t\t\t\te.message = errors[e.message];\n\t\t\t}\n\t\t\treject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Создать DN из массива [{rdn: ..., value: ...}, ...]\n\t * @param {[index: number]: { rdn: string, value: string }} obj \n\t * @returns {DN}\n\t */\n\tfunction makeDN(obj)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in obj) {\n\t\t\tvar rdn = obj[i].rdn;\n\t\t\tvar val = obj[i].value;\n\t\t\tif (rdn && val) {\n\t\t\t\tdn[rdn] = val;\n\t\t\t}\n\t\t}\n\t\treturn convertDN(dn);\n\t}\n\n\t/**\n\t * Получить название сертификата\n\t * @param {type} o объект, включающий в себя значения всех полей сертификата.\n\t * @param {type} containerName\n\t * @returns {string} \n\t */\n\tfunction formatCertificateName(o, containerName)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in o.Data.Subject) {\n\t\t\tvar rdn = o.Data.Subject[i].rdn;\n\t\t\tvar val = o.Data.Subject[i].value;\n\t\t\tdn[rdn] = val;\n\t\t}\n\t\tdn.toString = function(){\n\t\t\tvar cn = this['CN'] || this['2.5.4.3'];\n\t\t\tvar snils = this['СНИЛС'] || this['SNILS'] || this['1.2.643.100.3'];\n\t\t\tvar inn = this['ИНН'] || this['INN'] || this['1.2.643.3.131.1.1'];\n\t\t\treturn '' + cn + (inn ? '; ИНН ' + inn : '') + (snils ? '; СНИЛС ' + snils : '') + (containerName ? ' (' + containerName + ')' : '');\n\t\t};\n\t\treturn dn.toString();\n\t}\n\n\tfunction byte2hex(byte) {\n\t\t//console.log('byte %d -> %s', byte, byte.toString(16));\n\t\treturn ('0' + byte.toString(16)).slice(-2);\n\t}\n\n\t// https://gist.github.com/hendriklammers/5231994\n\tfunction pemSplit(str) {\n\t\tvar re = new RegExp('.{1,64}', 'g');\n\t\treturn str.match(re).join('\\n');\n\t}\n\n\t/** \n\t * Функция загрузки скрипта.\n\t * @param src - адрес расположения скрипта;\n\t * @param done - callback-функция, срабатывающая при успешной загрузки скрипта;\n\t * @param fail - callback-функция, срабатывающая при неудачной загрузки скрипта.\n\t*/\n\tfunction getScript(src, done, fail) {\n\t\tvar parent = document.getElementsByTagName('body')[0];\n\n\t\tvar script = document.createElement('script');\n\t\tscript.type = 'text/javascript';\n\t\tscript.src = src;\n\n\t\tif (script.readyState) { // IE\n\t\t\tscript.onreadystatechange = function () {\n\t\t\t\tif (script.readyState === \"loaded\" || script.readyState === \"complete\") {\n\t\t\t\t\tscript.onreadystatechange = null;\n\t\t\t\t\t// На некоторых браузерах мы попадаем сюда и в тех случаях когда скрипт не загружен,\n\t\t\t\t\t// поэтому дополнительно проверяем валидность JCWebClient2\n\t\t\t\t\tif (typeof (JCWebClient2) === 'undefined') {\n\t\t\t\t\t\tonFail(\"JCWebClient is invalid\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (script.readyState !== \"loading\") {\n\t\t\t\t\tonFail(\"JCWebClient hasn't been loaded\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse { // Others\n\t\t\tscript.onload = done;\n\t\t\tscript.onerror = function() {\n\t\t\t\tonFail(\"JCWebClient hasn't been loaded\");\n\t\t\t};\n\t\t}\n\n\t\tparent.appendChild(script);\n\n\t\tfunction onFail(errorMsg) {\n\t\t\tparent.removeChild(script);\n\t\t\tfail(errorMsg);\n\t\t}\n\t}\n}\n\nexport default JaCarta2;\n","export const X509KeySpec = {\n XCN_AT_NONE : 0x0,\n XCN_AT_KEYEXCHANGE : 0x1,\n XCN_AT_SIGNATURE : 0x2\n};\nexport const X509PrivateKeyExportFlags = {\n XCN_NCRYPT_ALLOW_EXPORT_NONE : 0,\n XCN_NCRYPT_ALLOW_EXPORT_FLAG : 0x1,\n XCN_NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG : 0x2,\n XCN_NCRYPT_ALLOW_ARCHIVING_FLAG : 0x4,\n XCN_NCRYPT_ALLOW_PLAINTEXT_ARCHIVING_FLAG : 0x8\n};\nexport const X509CertificateEnrollmentContext = {\n ContextUser : 0x1,\n ContextMachine : 0x2,\n ContextAdministratorForceMachine : 0x3\n};\nexport const X509KeyUsageFlags = {\n XCN_CERT_NO_KEY_USAGE : 0,\n XCN_CERT_DIGITAL_SIGNATURE_KEY_USAGE : 0x80,\n XCN_CERT_NON_REPUDIATION_KEY_USAGE : 0x40,\n XCN_CERT_KEY_ENCIPHERMENT_KEY_USAGE : 0x20,\n XCN_CERT_DATA_ENCIPHERMENT_KEY_USAGE : 0x10,\n XCN_CERT_KEY_AGREEMENT_KEY_USAGE : 0x8,\n XCN_CERT_KEY_CERT_SIGN_KEY_USAGE : 0x4,\n XCN_CERT_OFFLINE_CRL_SIGN_KEY_USAGE : 0x2,\n XCN_CERT_CRL_SIGN_KEY_USAGE : 0x2,\n XCN_CERT_ENCIPHER_ONLY_KEY_USAGE : 0x1,\n XCN_CERT_DECIPHER_ONLY_KEY_USAGE : ( 0x80 << 8 )\n};\nexport const X500NameFlags = {\n XCN_CERT_NAME_STR_NONE : 0,\n XCN_CERT_SIMPLE_NAME_STR : 1,\n XCN_CERT_OID_NAME_STR : 2,\n XCN_CERT_X500_NAME_STR : 3,\n XCN_CERT_XML_NAME_STR : 4,\n XCN_CERT_NAME_STR_SEMICOLON_FLAG : 0x40000000,\n XCN_CERT_NAME_STR_NO_PLUS_FLAG : 0x20000000,\n XCN_CERT_NAME_STR_NO_QUOTING_FLAG : 0x10000000,\n XCN_CERT_NAME_STR_CRLF_FLAG : 0x8000000,\n XCN_CERT_NAME_STR_COMMA_FLAG : 0x4000000,\n XCN_CERT_NAME_STR_REVERSE_FLAG : 0x2000000,\n XCN_CERT_NAME_STR_FORWARD_FLAG : 0x1000000,\n XCN_CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG : 0x10000,\n XCN_CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG : 0x20000,\n XCN_CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG : 0x40000,\n XCN_CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG : 0x80000,\n XCN_CERT_NAME_STR_DISABLE_UTF8_DIR_STR_FLAG : 0x100000\n};\nexport const EncodingType = {\n XCN_CRYPT_STRING_BASE64HEADER : 0,\n XCN_CRYPT_STRING_BASE64 : 0x1,\n XCN_CRYPT_STRING_BINARY : 0x2,\n XCN_CRYPT_STRING_BASE64REQUESTHEADER : 0x3,\n XCN_CRYPT_STRING_HEX : 0x4,\n XCN_CRYPT_STRING_HEXASCII : 0x5,\n XCN_CRYPT_STRING_BASE64_ANY : 0x6,\n XCN_CRYPT_STRING_ANY : 0x7,\n XCN_CRYPT_STRING_HEX_ANY : 0x8,\n XCN_CRYPT_STRING_BASE64X509CRLHEADER : 0x9,\n XCN_CRYPT_STRING_HEXADDR : 0xa,\n XCN_CRYPT_STRING_HEXASCIIADDR : 0xb,\n XCN_CRYPT_STRING_HEXRAW : 0xc,\n XCN_CRYPT_STRING_NOCRLF : 0x40000000,\n XCN_CRYPT_STRING_NOCR : 0x80000000\n};\nexport const InstallResponseRestrictionFlags = {\n AllowNone : 0x00000000,\n AllowNoOutstandingRequest : 0x00000001,\n AllowUntrustedCertificate : 0x00000002,\n AllowUntrustedRoot : 0x00000004\n};\n\nexport const ProviderTypes = {\n GOST_R_34_10_2001: 75, // Crypto-Pro GOST R 34.10-2001 KC1 CSP\n GOST_R_34_10_2012: 80 // Crypto-Pro GOST R 34.10-2012 KC1 CSP\n};\n\nexport const cadesErrorMesages = {\n '0x800B010A': 'Не удается построить цепочку сертификатов до доверенного корневого центра, убедитесь что установлены все корневые и промежуточные сертификаты [0x800B010A]',\n '0x80090020': 'Внутренняя ошибка [0x80090020]. Если используется внешний токен, убедитесь, что ввели корректный PIN-код', // 2148073504\n '0x8007065B': 'Истекла лицензия на КриптоПро CSP [0x8007065B]',\n '0x800B0109': 'Отсутствует сертификат УЦ в хранилище корневых сертификатов [0x800B0109]', // A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.\n '0x8009200C': 'Не удается найти сертификат и закрытый ключ для расшифровки [0x8009200C]',\n '0x80090008': 'Указан неверный алгоритм (используется устаревшая версия КриптоПро CSP или КриптоПро ЭЦП Browser plug-in) [0x80090008]', // 2148073480\n '0x000004C7': 'Операция отменена пользователем [0x000004C7]', // Не удается получить доступ к сертификатам\n '0x8009000D': 'Нет доступа к закрытому ключу. Ввод пароля отменен или произошел сбой в запомненных паролях [0x8009000D]',\n '0x800B0101': 'Истек/не наступил срок действия требуемого сертификата [0x800B0101]',\n // untested:\n '0x8009200B': 'Не удается найти закрытый ключ для подписи, убедитесь что сертификат установлен правильно [0x8009200B]',\n '0x8010006E': 'Действие отменено пользователем [0x8010006E]', // 2148532334\n 'NPObject' : 'Не удается подписать, убедитесь что выбранный сертификат подходит для подписи', // Error calling method on NPObject!\n 'Automation server': 'Библиотека CAPICOM не была автоматически зарегистрирована или заблокирована на Вашем компьютере (2146827859)',\n 'сервером программирования': 'Библиотека CAPICOM не была автоматически зарегистрирована или заблокирована на Вашем компьютере (2146827859)'\n};\n","/**\n * CryptoPRO simplified library\n * @author Aleksandr.ru\n * @link http://aleksandr.ru\n */\n\nimport DN from '../DN';\nimport { \n\tX509KeySpec, \n\tX509PrivateKeyExportFlags, \n\tX509CertificateEnrollmentContext, \n\tX509KeyUsageFlags, \n\tX500NameFlags, \n\tEncodingType, \n\tInstallResponseRestrictionFlags, \n\tProviderTypes, \n\tcadesErrorMesages \n} from './constants';\nimport { convertDN, versionCompare } from '../helpers';\n\nfunction CryptoPro() {\n\t//If the string contains fewer than 128 bytes, the Length field of the TLV triplet requires only one byte to specify the content length.\n\t//If the string is more than 127 bytes, bit 7 of the Length field is set to 1 and bits 6 through 0 specify the number of additional bytes used to identify the content length.\n\tconst maxLengthCSPName = 127;\n\t\n\t// https://www.cryptopro.ru/forum2/default.aspx?g=posts&m=38467#post38467\n\tconst asn1UTF8StringTag = 0x0c; // 12, UTF8String\n\n\tlet canAsync;\n\tlet pluginVersion = '';\n\tlet binded = false;\n\tlet signerOptions = 0;\n\n\t/**\n\t * Инициализация и проверка наличия требуемых возможностей\n\t * @returns {Promise} версия\n\t */\n\tthis.init = function(){\n\t\twindow.cadesplugin_skip_extension_install = true; // считаем что уже все установлено\n\t\twindow.allow_firefox_cadesplugin_async = true; // FF 52+\n\n\t\trequire('./cadesplugin_api');\n\t\tcanAsync = !!cadesplugin.CreateObjectAsync;\n\t\t// signerOptions = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN;\n\t\tsignerOptions = cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY;\n\n\t\treturn new Promise(resolve => {\n\t\t\tif(!window.cadesplugin) {\n\t\t\t\tthrow new Error('КриптоПро ЭЦП Browser plug-in не обнаружен');\n\t\t\t}\n\t\t\tresolve();\n\t\t}).then(() => {\n\t\t\tif(canAsync) {\n\t\t\t\treturn cadesplugin.then(function(){\n\t\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAdESCOM.About\");\n\t\t\t\t}).then(function(oAbout){\n\t\t\t\t\treturn oAbout.Version;\n\t\t\t\t}).then(function(version) {\n\t\t\t\t\tpluginVersion = version;\n\t\t\t\t\treturn { version };\n\t\t\t\t}).catch(function(e) {\n\t\t\t\t\t// 'Плагин не загружен'\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst oAbout = cadesplugin.CreateObject(\"CAdESCOM.About\");\n\t\t\t\t\t\tif(!oAbout || !oAbout.Version) {\n\t\t\t\t\t\t\tthrow new Error('КриптоПро ЭЦП Browser plug-in не загружен');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpluginVersion = oAbout.Version;\n\t\t\t\t\t\tresolve({\n\t\t\t\t\t\t\tversion: pluginVersion\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tcatch(e) {\n\t\t\t\t\t\t// 'Плагин не загружен'\n\t\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\t\tthrow new Error(err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Включает кеширование ПИНов от контейнеров чтоб не тробовать повторного ввода\n\t * возможно не поддерживается в ИЕ\n\t * @see https://www.cryptopro.ru/forum2/default.aspx?g=posts&t=10170\n\t * @param {string} userPin не используется\n\t * @returns {Promise} new binded state\n\t */\n\tthis.bind = function(userPin) {\n\t\tbinded = true;\n\t\treturn Promise.resolve(binded);\n\t};\n\n\t/**\n\t * Заглушка для совместимости\n\t * @returns {Promise} new binded state\n\t */\n\tthis.unbind = function() {\n\t\tbinded = false;\n\t\treturn Promise.resolve(binded);\n\t};\n\n\t/**\n\t * Создание CSR.\n\t * @param {DN} dn\n\t * @param {string} pin\n\t * @param {string[]} ekuOids массив OID Extended Key Usage, по-умолчанию Аутентификация клиента '1.3.6.1.5.5.7.3.2' + Защищенная электронная почта '1.3.6.1.5.5.7.3.4'\n\t * @param {int} providerType по умолчанию 80 (ГОСТ Р 34.10-2012) или 75 (ГОСТ Р 34.10-2001)\n\t * @returns {Promise} объект с полями { csr: 'base64 запрос на сертификат' }\n\t * @see DN\n\t */\n\tthis.generateCSR = function(dn, pin, ekuOids, providerType){\n\t\tif(!ekuOids || !ekuOids.length) {\n\t\t\tekuOids = [\n\t\t\t\t'1.3.6.1.5.5.7.3.2', // Аутентификация клиента\n\t\t\t\t'1.3.6.1.5.5.7.3.4' // Защищенная электронная почта\n\t\t\t];\n\t\t}\n\t\tif(!providerType) {\n\t\t\tproviderType = ProviderTypes.GOST_R_34_10_2012;\n\t\t}\n\t\tif(canAsync) {\n\t\t\tlet oEnroll, oRequest, oPrivateKey, oExtensions, oKeyUsage, oEnhancedKeyUsage, oEnhancedKeyUsageOIDs, aOIDs, oSstOID, oDn, oCspInformations, sCSPName, oSubjectSignTool;\n\t\t\treturn cadesplugin.then(function(){\n\t\t\t\treturn Promise.all([\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509Enrollment'), // 0\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509CertificateRequestPkcs10'), // 1\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509PrivateKey'), // 2\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509ExtensionKeyUsage'), // 3\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509ExtensionEnhancedKeyUsage'), // 4\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CObjectIds'), // 5\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX500DistinguishedName'), // 6\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509Extensions'), // 7\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CCspInformations'), // 8\n\t\t\t\t\tcadesplugin.CreateObjectAsync('X509Enrollment.CX509Extension') //9\n\t\t\t\t]);\n\t\t\t}).then(function(objects){\n\t\t\t\toEnroll = objects[0];\n\t\t\t\toRequest = objects[1];\n\t\t\t\toPrivateKey = objects[2];\n\t\t\t\toKeyUsage = objects[3];\n\t\t\t\toEnhancedKeyUsage = objects[4];\n\t\t\t\toEnhancedKeyUsageOIDs = objects[5];\n\t\t\t\toDn = objects[6];\n\t\t\t\toExtensions = objects[7];\n\t\t\t\toCspInformations = objects[8];\n\t\t\t\toSubjectSignTool = objects[9];\n\n\t\t\t\treturn oCspInformations.AddAvailableCsps();\n\t\t\t}).then(function(){\n\t\t\t\treturn oCspInformations.Count;\n\t\t\t}).then(function(cnt){\n\t\t\t\tif(!cnt) throw new Error('No CSP informations!');\n\t\t\t\tconst aPromises = [];\n\t\t\t\tfor(let i=0; i {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCspInformations = cadesplugin.CreateObject('X509Enrollment.CCspInformations');\n\t\t\t\t\tconst oEnroll = cadesplugin.CreateObject('X509Enrollment.CX509Enrollment');\n\t\t\t\t\tconst oRequest = cadesplugin.CreateObject('X509Enrollment.CX509CertificateRequestPkcs10');\n\t\t\t\t\tconst oPrivateKey = cadesplugin.CreateObject('X509Enrollment.CX509PrivateKey');\n\t\t\t\t\tconst oKeyUsage = cadesplugin.CreateObject('X509Enrollment.CX509ExtensionKeyUsage');\n\t\t\t\t\tconst oEnhancedKeyUsage = cadesplugin.CreateObject('X509Enrollment.CX509ExtensionEnhancedKeyUsage');\n\t\t\t\t\tconst oEnhancedKeyUsageOIDs = cadesplugin.CreateObject('X509Enrollment.CObjectIds');\n\t\t\t\t\tconst oDn = cadesplugin.CreateObject('X509Enrollment.CX500DistinguishedName');\n\n\t\t\t\t\tlet cspType, cspName;\n\t\t\t\t\toCspInformations.AddAvailableCsps();\n\t\t\t\t\tfor(let i=0; i} thumbprint\n\t */\n\tthis.writeCertificate = function(certBase64){\n\t\tif(canAsync) {\n\t\t\tlet oEnroll, existingSha = [];\n\t\t\treturn this.listCertificates().then(function(certs){\n\t\t\t\tfor(let i in certs) {\n\t\t\t\t\texistingSha.push(certs[i].id);\n\t\t\t\t}\n\t\t\t\treturn cadesplugin.CreateObjectAsync('X509Enrollment.CX509Enrollment');\n\t\t\t}).then(function(enroll){\n\t\t\t\toEnroll = enroll;\n\t\t\t\treturn oEnroll.Initialize(X509CertificateEnrollmentContext.ContextUser);\n\t\t\t}).then(function(){\n\t\t\t\treturn oEnroll.InstallResponse(InstallResponseRestrictionFlags.AllowNone, certBase64, EncodingType.XCN_CRYPT_STRING_BASE64, '');\n\t\t\t}).then(this.listCertificates).then(function(certs){\n\t\t\t\tfor(let i in certs) {\n\t\t\t\t\tconst sha = certs[i].id;\n\t\t\t\t\tif(existingSha.indexOf(sha) < 0) {\n\t\t\t\t\t\treturn sha;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new Error('Не удалось найти установленный сертификат по отпечатку');\n\t\t\t}).catch(function(e){\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst existingSha = [];\n\t\t\t\t\tlet oStore = cadesplugin.CreateObject(\"CAPICOM.Store\");\n\t\t\t\t\toStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE, cadesplugin.CAPICOM_MY_STORE, cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t\t\tlet oCertificates = oStore.Certificates;\n\t\t\t\t\tfor(let i=1; i<=oCertificates.Count; i++) {\n\t\t\t\t\t\texistingSha.push(oCertificates.Item(i).Thumbprint);\n\t\t\t\t\t}\n\t\t\t\t\toStore.Close();\n\n\t\t\t\t\tconst oEnroll = cadesplugin.CreateObject('X509Enrollment.CX509Enrollment');\n\t\t\t\t\toEnroll.Initialize(X509CertificateEnrollmentContext.ContextUser);\n\t\t\t\t\toEnroll.InstallResponse(InstallResponseRestrictionFlags.AllowNone, certBase64, EncodingType.XCN_CRYPT_STRING_BASE64, '');\n\n\t\t\t\t\toStore = cadesplugin.CreateObject(\"CAPICOM.Store\");\n\t\t\t\t\toStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE, cadesplugin.CAPICOM_MY_STORE, cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t\t\toCertificates = oStore.Certificates;\n\t\t\t\t\tlet found = false;\n\t\t\t\t\tlet sha = '';\n\t\t\t\t\tfor(let i=1; i<=oCertificates.Count; i++) {\n\t\t\t\t\t\tsha = oCertificates.Item(i).Thumbprint;\n\t\t\t\t\t\tif(existingSha.indexOf(sha) < 0) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\toStore.Close();\n\t\t\t\t\tif(found) {\n\t\t\t\t\t\tresolve(sha);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new Error('Не удалось найти установленный сертификат по отпечатку');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Получение информации о сертификате.\n\t * @param {string} certThumbprint\n\t * @returns {Promise}\n\t */\n\tthis.certificateInfo = function(certThumbprint){\n\t\tconst infoToString = function () {\n\t\t\treturn 'Название: ' + this.Name +\n\t\t\t\t\t'\\nИздатель: ' + this.IssuerName +\n\t\t\t\t\t'\\nСубъект: ' + this.SubjectName +\n\t\t\t\t\t'\\nВерсия: ' + this.Version +\n\t\t\t\t\t'\\nАлгоритм: ' + this.Algorithm + // PublicKey Algorithm\n\t\t\t\t\t'\\nСерийный №: ' + this.SerialNumber +\n\t\t\t\t\t'\\nОтпечаток SHA1: ' + this.Thumbprint +\n\t\t\t\t\t'\\nНе действителен до: ' + this.ValidFromDate +\n\t\t\t\t\t'\\nНе действителен после: ' + this.ValidToDate +\n\t\t\t\t\t'\\nПриватный ключ: ' + (this.HasPrivateKey ? 'Есть' : 'Нет') +\n\t\t\t\t\t'\\nКриптопровайдер: ' + this.ProviderName + // PrivateKey ProviderName\n\t\t\t\t\t'\\nВалидный: ' + (this.IsValid ? 'Да' : 'Нет');\n\t\t};\n\n\t\tif(canAsync) {\n\t\t\tlet oInfo = {};\n\t\t\treturn getCertificateObject(certThumbprint)\n\t\t\t.then(oCertificate => Promise.all([\n\t\t\t\toCertificate.HasPrivateKey(),\n\t\t\t\toCertificate.IsValid().then(v => v.Result),\n\t\t\t\toCertificate.IssuerName,\n\t\t\t\toCertificate.SerialNumber,\n\t\t\t\toCertificate.SubjectName,\n\t\t\t\toCertificate.Thumbprint,\n\t\t\t\toCertificate.ValidFromDate,\n\t\t\t\toCertificate.ValidToDate,\n\t\t\t\toCertificate.Version,\n\t\t\t\toCertificate.PublicKey().then(k => k.Algorithm).then(a => a.FriendlyName),\n\t\t\t\toCertificate.HasPrivateKey().then(key => !key && ['', undefined] || oCertificate.PrivateKey.then(k => Promise.all([\n\t\t\t\t\tk.ProviderName, k.ProviderType\n\t\t\t\t])))\n\t\t\t]))\n\t\t\t.then(a => {\n\t\t\t\toInfo = {\n\t\t\t\t\tHasPrivateKey: a[0],\n\t\t\t\t\tIsValid: a[1],\n\t\t\t\t\tIssuerName: a[2],\n\t\t\t\t\tIssuer: undefined,\n\t\t\t\t\tSerialNumber: a[3],\n\t\t\t\t\tSubjectName: a[4],\n\t\t\t\t\tSubject: undefined,\n\t\t\t\t\tName: undefined,\n\t\t\t\t\tThumbprint: a[5],\n\t\t\t\t\tValidFromDate: new Date(a[6]),\n\t\t\t\t\tValidToDate: new Date(a[7]),\n\t\t\t\t\tVersion: a[8],\n\t\t\t\t\tAlgorithm: a[9],\n\t\t\t\t\tProviderName: a[10][0],\n\t\t\t\t\tProviderType: a[10][1]\n\t\t\t\t};\n\t\t\n\t\t\t\toInfo.Subject = string2dn(oInfo.SubjectName);\n\t\t\t\toInfo.Issuer = string2dn(oInfo.IssuerName);\n\t\t\t\toInfo.Name = oInfo.Subject['CN'];\n\t\t\t\toInfo.toString = infoToString;\n\t\t\t\treturn oInfo;\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint);\n\t\t\t\t\tconst hasKey = oCertificate.HasPrivateKey();\n\t\t\t\t\tconst oParesedSubj = string2dn(oCertificate.SubjectName);\n\t\t\t\t\tconst oInfo = {\n\t\t\t\t\t\tHasPrivateKey: hasKey,\n\t\t\t\t\t\tIsValid: oCertificate.IsValid().Result,\t\t\t\t\t\t\n\t\t\t\t\t\tIssuerName: oCertificate.IssuerName,\n\t\t\t\t\t\tIssuer: string2dn(oCertificate.IssuerName),\n\t\t\t\t\t\tSerialNumber: oCertificate.SerialNumber,\n\t\t\t\t\t\tSubjectName: oCertificate.SubjectName,\n\t\t\t\t\t\tSubject: oParesedSubj,\n\t\t\t\t\t\tName: oParesedSubj['CN'],\n\t\t\t\t\t\tThumbprint: oCertificate.Thumbprint,\n\t\t\t\t\t\tValidFromDate: new Date(oCertificate.ValidFromDate),\n\t\t\t\t\t\tValidToDate: new Date(oCertificate.ValidToDate),\n\t\t\t\t\t\tVersion: oCertificate.Version,\n\t\t\t\t\t\tAlgorithm: oCertificate.PublicKey().Algorithm.FriendlyName,\n\t\t\t\t\t\tProviderName: hasKey && oCertificate.PrivateKey.ProviderName || '',\n\t\t\t\t\t\tProviderType: hasKey && oCertificate.PrivateKey.ProviderType || undefined,\n\n\t\t\t\t\t};\n\t\t\t\t\toInfo.toString = infoToString;\n\t\t\t\t\tresolve(oInfo);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Получение массива доступных сертификатов\n\t * @returns {Promise} [ {id: thumbprint, name: subject}, ...]\n\t */\n\tthis.listCertificates = function(){\n\t\tconst tryContainerStore = hasContainerStore();\n\n\t\tif(canAsync) {\n\t\t\tlet oStore, ret;\n\t\t\treturn cadesplugin.then(function(){\n\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAPICOM.Store\");\n\t\t\t}).then(store => {\n\t\t\t\toStore = store;\n\t\t\t\treturn oStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,\n\t\t\t\t\tcadesplugin.CAPICOM_MY_STORE,\n\t\t\t\t\tcadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t}).then(() => {\n\t\t\t\treturn fetchCertsFromStore(oStore);\n\t\t\t}).then(certs => {\n\t\t\t\tret = certs;\n\t\t\t\treturn oStore.Close();\n\t\t\t}).then(() => {\n\t\t\t\tif (tryContainerStore) {\n\t\t\t\t\tlet certificates;\n\t\t\t\t\treturn oStore.Open(cadesplugin.CADESCOM_CONTAINER_STORE).then(() => {\n\t\t\t\t\t\tconst skipIds = ret.map(a => a.id);\n\t\t\t\t\t\treturn fetchCertsFromStore(oStore, skipIds);\n\t\t\t\t\t}).then(certs => {\n\t\t\t\t\t\tcertificates = certs;\n\t\t\t\t\t\treturn oStore.Close();\n\t\t\t\t\t}).then(() => {\n\t\t\t\t\t\treturn certificates;\n\t\t\t\t\t}).catch(e => {\n\t\t\t\t\t\tconsole.log(e);\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t}).then(certs => {\n\t\t\t\tret.push(...certs);\n\t\t\t\treturn ret;\n\t\t\t}).catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oStore = cadesplugin.CreateObject(\"CAPICOM.Store\");\n\t\t\t\t\toStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,\n\t\t\t\t\t\tcadesplugin.CAPICOM_MY_STORE,\n\t\t\t\t\t\tcadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t\t\tconst ret = fetchCertsFromStore(oStore);\n\t\t\t\t\toStore.Close();\n\n\t\t\t\t\tif (tryContainerStore) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\toStore.Open(cadesplugin.CADESCOM_CONTAINER_STORE);\n\t\t\t\t\t\t\tconst skipIds = ret.map(a => a.id);\n\t\t\t\t\t\t\tconst certs = fetchCertsFromStore(oStore, skipIds);\n\t\t\t\t\t\t\toStore.Close();\n\t\t\t\t\t\t\tret.push(...certs);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\tconsole.log(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresolve(ret);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Чтение сертификата\n\t * @param {string} certThumbprint\n\t * @returns {Promise} base64\n\t */\n\tthis.readCertificate = function(certThumbprint){\n\t\tif(canAsync) {\n\t\t\treturn getCertificateObject(certThumbprint)\n\t\t\t.then(cert => cert.Export(cadesplugin.CADESCOM_ENCODE_BASE64))\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint);\n\t\t\t\t\tconst data = oCertificate.Export(cadesplugin.CADESCOM_ENCODE_BASE64);\n\t\t\t\t\tresolve(data);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Подпись данных отсоединенная или присоединенная\n\t * @param {string} dataBase64\n\t * @param {string} certThumbprint\n\t * @param {object} [options]\n\t * @param {string} [options.pin] будет запрошен, если отсутствует\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} base64\n\t */\n\tthis.signData = function(dataBase64, certThumbprint, options){\n\t\tif (typeof options === 'string') {\n\t\t\t// обратная совместимость с версией 2.3\n\t\t\toptions = { pin: options };\n\t\t}\n\t\tif (!options) options = {};\n\t\tconst { pin, attached } = options;\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oSigner, oSignedData;\n\t\t\treturn getCertificateObject(certThumbprint, pin)\n\t\t\t.then(certificate => {\n\t\t\t\toCertificate = certificate;\n\t\t\t\treturn Promise.all([\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CPSigner\"),\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CadesSignedData\")\n\t\t\t\t]);\n\t\t\t})\n\t\t\t.then(objects => {\n\t\t\t\toSigner = objects[0];\n\t\t\t\toSignedData = objects[1];\n\t\t\t\treturn Promise.all([\n\t\t\t\t\toSigner.propset_Certificate(oCertificate),\n\t\t\t\t\toSigner.propset_Options(signerOptions),\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\toSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY)\n\t\t\t\t]);\n\t\t\t})\n\t\t\t.then(() => oSignedData.propset_Content(dataBase64))\n\t\t\t.then(() => oSignedData.SignCades(oSigner, cadesplugin.CADESCOM_CADES_BES, !attached))\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint, pin);\n\t\t\t\t\tconst oSigner = cadesplugin.CreateObject(\"CAdESCOM.CPSigner\");\n\t\t\t\t\toSigner.Certificate = oCertificate;\n\t\t\t\t\toSigner.Options = signerOptions;\n\n\t\t\t\t\tconst oSignedData = cadesplugin.CreateObject(\"CAdESCOM.CadesSignedData\");\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\toSignedData.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\toSignedData.Content = dataBase64;\n\n\t\t\t\t\tconst sSignedMessage = oSignedData.SignCades(oSigner, cadesplugin.CADESCOM_CADES_BES, !attached);\n\t\t\t\t\tresolve(sSignedMessage);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Совместная подпись данных (двумя сертификатами).\n\t * @param {string} dataBase64\n\t * @param {string} certThumbprint SHA1 отпечаток первого сертификата\n\t * @param {string} certThumbprint2 SHA1 отпечаток второго сертификата\n\t * @param {object} [options]\n\t * @param {string} [options.pin] будет запрошен, если отсутствует\n\t * @param {string} [options.pin2] будет запрошен, если отсутствует\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} base64\n\t */\n\tthis.signData2 = function(dataBase64, certThumbprint, certThumbprint2, options){\n\t\tif (!options) options = {};\n\t\tconst { pin, pin2, attached } = options;\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oCertificate2, oSigner, oSignedData;\n\t\t\treturn Promise.all([\n\t\t\t\tgetCertificateObject(certThumbprint, pin),\n\t\t\t\tgetCertificateObject(certThumbprint2, pin2)\n\t\t\t])\n\t\t\t.then(certs => {\n\t\t\t\toCertificate = certs[0];\n\t\t\t\toCertificate2 = certs[1];\n\t\t\t\treturn Promise.all([\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CPSigner\"),\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CadesSignedData\")\n\t\t\t\t]);\n\t\t\t})\n\t\t\t.then(objects => {\n\t\t\t\toSigner = objects[0];\n\t\t\t\toSignedData = objects[1];\n\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\treturn oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n\t\t\t})\n\t\t\t.then(() => oSignedData.propset_Content(dataBase64))\n\t\t\t.then(() => Promise.all([\n\t\t\t\toSigner.propset_Certificate(oCertificate),\n\t\t\t\toSigner.propset_Options(signerOptions)\n\t\t\t]))\n\t\t\t.then(() => oSignedData.SignCades(oSigner, cadesplugin.CADESCOM_CADES_BES, !attached))\n\t\t\t.then(() => Promise.all([\n\t\t\t\toSigner.propset_Certificate(oCertificate2),\n\t\t\t\toSigner.propset_Options(signerOptions)\n\t\t\t]))\n\t\t\t.then(() => oSignedData.CoSignCades(oSigner, cadesplugin.CADESCOM_CADES_BES))\n\t\t\t.catch(e => {\n\t\t\t\tconsole.log(arguments);\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint, pin);\n\t\t\t\t\tconst oCertificate2 = getCertificateObject(certThumbprint2, pin2);\n\n\t\t\t\t\tconst oSignedData = cadesplugin.CreateObject(\"CAdESCOM.CadesSignedData\");\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\toSignedData.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\toSignedData.Content = dataBase64;\n\n\t\t\t\t\tconst oSigner = cadesplugin.CreateObject(\"CAdESCOM.CPSigner\");\n\t\t\t\t\toSigner.Certificate = oCertificate;\n\t\t\t\t\toSigner.Options = signerOptions;\n\t\t\t\t\tconst sSignedMessage = oSignedData.SignCades(oSigner, cadesplugin.CADESCOM_CADES_BES, !attached);\n\n\t\t\t\t\toSigner.Certificate = oCertificate2;\n\t\t\t\t\toSigner.Options = signerOptions;\n\t\t\t\t\tconst sSignedMessage2 = oSignedData.CoSignCades(oSigner, cadesplugin.CADESCOM_CADES_BES);\n\n\t\t\t\t\tresolve(sSignedMessage2);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Добавить подпись к существующей.\n\t * @param {string} dataBase64 игнорируется если прикрепленная подпись\n\t * @param {string} signBase64 существующая подпись\n\t * @param {string} certThumbprint SHA1 отпечаток первого сертификата\n\t * @param {object} [options]\n\t * @param {string} [options.pin] будет запрошен, если отсутствует\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} base64\n\t */\n\tthis.addSign = function(dataBase64, signBase64, certThumbprint, options){\n\t\tif (!options) options = {};\n\t\tconst { pin, attached } = options;\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oSigner, oSignedData;\n\t\t\treturn getCertificateObject(certThumbprint, pin)\n\t\t\t.then(certificate => {\n\t\t\t\toCertificate = certificate;\n\t\t\t\treturn Promise.all([\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CPSigner\"),\n\t\t\t\t\tcadesplugin.CreateObjectAsync(\"CAdESCOM.CadesSignedData\")\n\t\t\t\t]);\n\t\t\t})\n\t\t\t.then(objects => {\n\t\t\t\toSigner = objects[0];\n\t\t\t\toSignedData = objects[1];\n\t\t\t\tif (attached) {\n\t\t\t\t\treturn Promise.resolve();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\treturn oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY)\n\t\t\t\t\t\t.then(() => oSignedData.propset_Content(dataBase64));\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\treturn oSignedData.VerifyCades(signBase64, cadesplugin.CADESCOM_CADES_BES, !attached).catch(function(e){\n\t\t\t\t\tconsole.log('Existing sign not verified: %o', e);\n\t\t\t\t\t// Для создания второй подписи успешная проверка не требуется.\n\t\t\t\t\t// Вы можете перехватить исключение при проверке, и добавить подпись вторую.\n\t\t\t\t\t// Проверка нужна только для того что бы подпись попала внутрь SignedData.\n\t\t\t\t});\n\t\t\t})\n\t\t\t.then(() => Promise.all([\n\t\t\t\toSigner.propset_Certificate(oCertificate),\n\t\t\t\toSigner.propset_Options(signerOptions)\n\t\t\t]))\n\t\t\t.then(() => oSignedData.CoSignCades(oSigner, cadesplugin.CADESCOM_CADES_BES))\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint, pin);\n\t\t\t\t\tconst oSignedData = cadesplugin.CreateObject(\"CAdESCOM.CadesSignedData\");\n\t\t\t\t\tif (!attached) {\n\t\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\t\toSignedData.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\t\toSignedData.Content = dataBase64;\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\toSignedData.VerifyCades(signBase64, cadesplugin.CADESCOM_CADES_BES, !attached);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(e) {\n\t\t\t\t\t\tconsole.log('Existing sign not verified: %o', e);\n\t\t\t\t\t\t// Для создания второй подписи успешная проверка не требуется.\n\t\t\t\t\t\t// Вы можете перехватить исключение при проверке, и добавить подпись вторую.\n\t\t\t\t\t\t// Проверка нужна только для того что бы подпись попала внутрь SignedData.\n\t\t\t\t\t}\n\n\t\t\t\t\tconst oSigner = cadesplugin.CreateObject(\"CAdESCOM.CPSigner\");\n\t\t\t\t\toSigner.Certificate = oCertificate;\n\t\t\t\t\toSigner.Options = signerOptions;\n\t\t\t\t\tconst sSignedMessage = oSignedData.CoSignCades(oSigner, cadesplugin.CADESCOM_CADES_BES);\n\n\t\t\t\t\tresolve(sSignedMessage);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Проверить подпись.\n\t * @param {string} dataBase64 игнорируется если прикрепленная подпись\n\t * @param {string} signBase64 существующая подпись\n\t * @param {object} [options]\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} true или reject\n\t */\n\tthis.verifySign = function(dataBase64, signBase64, options){\n\t\tif (!options) options = {};\n\t\tconst { attached } = options;\n\t\tif(canAsync) {\n\t\t\tlet oSignedData;\n\t\t\treturn cadesplugin.then(function(){\n\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAdESCOM.CadesSignedData\");\n\t\t\t}).then(function(object){\n\t\t\t\toSignedData = object;\n\t\t\t\tif (attached) {\n\t\t\t\t\treturn Promise.resolve();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\treturn oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY)\n\t\t\t\t\t\t.then(() => oSignedData.propset_Content(dataBase64));\n\t\t\t\t}\n\t\t\t}).then(function(){\n\t\t\t\treturn oSignedData.VerifyCades(signBase64, cadesplugin.CADESCOM_CADES_BES, !attached);\n\t\t\t}).then(function(){\n\t\t\t\t//console.log('sign2: %s', sign2);\n\t\t\t\treturn true;\n\t\t\t}).catch(function(e){\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oSignedData = cadesplugin.CreateObject(\"CAdESCOM.CadesSignedData\");\n\t\t\t\t\tif (!attached) {\n\t\t\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\t\t\toSignedData.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\t\toSignedData.Content = dataBase64;\n\t\t\t\t\t}\n\t\t\t\t\toSignedData.VerifyCades(signBase64, cadesplugin.CADESCOM_CADES_BES, !attached);\n\t\t\t\t\tresolve(true);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Шифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {string} certThumbprint SHA1 отпечаток сертификата\n\t * @returns {Promise} base64 enveloped data\n\t */\n\tthis.encryptData = function(dataBase64, certThumbprint) {\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oEnvelop, oRecipients;\n\t\t\treturn getCertificateObject(certThumbprint)\n\t\t\t.then(certificate => {\n\t\t\t\toCertificate = certificate;\n\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAdESCOM.CPEnvelopedData\");\n\t\t\t})\n\t\t\t.then(envelop => {\n\t\t\t\toEnvelop = envelop;\n\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\treturn oEnvelop.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n\t\t\t})\n\t\t\t.then(() => oEnvelop.propset_Content(dataBase64))\n\t\t\t.then(() => oEnvelop.Recipients)\n\t\t\t.then(recipients => {\n\t\t\t\toRecipients = recipients;\n\t\t\t\treturn oRecipients.Clear();\n\t\t\t})\n\t\t\t.then(() => oRecipients.Add(oCertificate))\n\t\t\t.then(() => oEnvelop.Encrypt())\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint);\n\t\t\t\t\tconst oEnvelop = cadesplugin.CreateObject(\"CAdESCOM.CPEnvelopedData\");\n\t\t\t\t\toEnvelop.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\toEnvelop.Content = dataBase64;\n\t\t\t\t\toEnvelop.Recipients.Clear();\n\t\t\t\t\toEnvelop.Recipients.Add(oCertificate);\n\t\t\t\t\tconst encryptedData = oEnvelop.Encrypt();\n\t\t\t\t\tresolve(encryptedData);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Дешифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {string} certThumbprint SHA1 отпечаток сертификата\n\t * @param {string} pin будет запрошен, если отсутствует\n\t * @returns {Promise} base64\n\t */\n\tthis.decryptData = function(dataBase64, certThumbprint, pin) {\n\t\tif(canAsync) {\n\t\t\tlet oCertificate, oEnvelop, oRecipients;\n\t\t\treturn getCertificateObject(certThumbprint, pin)\n\t\t\t.then(certificate => {\n\t\t\t\toCertificate = certificate;\n\t\t\t\treturn cadesplugin.CreateObjectAsync(\"CAdESCOM.CPEnvelopedData\");\n\t\t\t})\n\t\t\t.then(envelop => {\n\t\t\t\toEnvelop = envelop;\n\t\t\t\t// Значение свойства ContentEncoding должно быть задано до заполнения свойства Content\n\t\t\t\treturn oEnvelop.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n\t\t\t})\n\t\t\t// .then(() => oEnvelop.propset_Content(dataBase64))\n\t\t\t.then(() => oEnvelop.Recipients)\n\t\t\t.then(recipients => {\n\t\t\t\toRecipients = recipients;\n\t\t\t\treturn oRecipients.Clear();\n\t\t\t})\n\t\t\t.then(() => oRecipients.Add(oCertificate))\n\t\t\t.then(() => oEnvelop.Decrypt(dataBase64))\n\t\t\t.then(() => oEnvelop.Content)\n\t\t\t.catch(e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tthrow new Error(err);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\ttry {\n\t\t\t\t\tconst oCertificate = getCertificateObject(certThumbprint, pin);\n\t\t\t\t\tconst oEnvelop = cadesplugin.CreateObject(\"CAdESCOM.CPEnvelopedData\");\n\t\t\t\t\toEnvelop.ContentEncoding = cadesplugin.CADESCOM_BASE64_TO_BINARY;\n\t\t\t\t\t// oEnvelop.Content = dataBase64;\n\t\t\t\t\toEnvelop.Recipients.Clear();\n\t\t\t\t\toEnvelop.Recipients.Add(oCertificate);\n\t\t\t\t\toEnvelop.Decrypt(dataBase64);\n\t\t\t\t\tresolve(oEnvelop.Content);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconst err = getError(e);\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tfunction hasContainerStore() {\n\t\t//В версии плагина 2.0.13292+ есть возможность получить сертификаты из\n\t\t//закрытых ключей и не установленных в хранилище\n\t\t// но не смотря на это, все равно приходится собирать список сертификатов\n\t\t// старым и новым способом тк в новом будет отсутствовать часть старого\n\t\t// предположительно ГОСТ-2001 с какими-то определенными Extended Key Usage OID\n\n\t\treturn versionCompare(pluginVersion, '2.0.13292') >= 0;\n\t}\n\n\tfunction fetchCertsFromStore(oStore, skipIds = []) {\n\t\tif (canAsync) {\n\t\t\tlet oCertificates;\n\t\t\treturn oStore.Certificates.then(certificates => {\n\t\t\t\toCertificates = certificates;\n\t\t\t\treturn certificates.Count;\n\t\t\t}).then(count => {\n\t\t\t\tconst certs = [];\n\t\t\t\tfor (let i = 1; i <= count; i++) certs.push(oCertificates.Item(i));\n\t\t\t\treturn Promise.all(certs);\n\t\t\t}).then(certificates => {\n\t\t\t\tconst certs = [];\n\t\t\t\tfor (let i in certificates) certs.push(certificates[i].SubjectName, certificates[i].Thumbprint);\n\t\t\t\treturn Promise.all(certs);\n\t\t\t}).then(subjects => {\n\t\t\t\tconst certs = [];\n\t\t\t\tfor (let i = 0; i < subjects.length; i += 2) {\n\t\t\t\t\tconst id = subjects[i + 1];\n\t\t\t\t\tif (skipIds.indexOf(id) + 1) break;\n\t\t\t\t\tconst oDN = string2dn(subjects[i]);\n\t\t\t\t\tcerts.push({\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tname: formatCertificateName(oDN)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn certs;\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tconst oCertificates = oStore.Certificates;\n\t\t\tconst certs = [];\n\t\t\tfor (let i = 1; i <= oCertificates.Count; i++) {\n\t\t\t\tconst oCertificate = oCertificates.Item(i);\n\t\t\t\tconst id = oCertificate.Thumbprint;\n\t\t\t\tif (skipIds.indexOf(id) + 1) break;\n\t\t\t\tconst oDN = string2dn(oCertificate.SubjectName);\n\t\t\t\tcerts.push({\n\t\t\t\t\tid,\n\t\t\t\t\tname: formatCertificateName(oDN)\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn certs;\n\t\t}\n\t}\n\n\tfunction findCertInStore(oStore, certThumbprint) {\n\t\tif(canAsync) {\n\t\t\treturn oStore.Certificates\n\t\t\t\t.then(certificates => certificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, certThumbprint))\n\t\t\t\t.then(certificates => certificates.Count.then(count => {\n\t\t\t\t\tif (count === 1) {\n\t\t\t\t\t\treturn certificates.Item(1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t}\n\t\telse {\n\t\t\tconst oCertificates = oStore.Certificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, certThumbprint);\n\t\t\tif (oCertificates.Count === 1) {\n\t\t\t\treturn oCertificates.Item(1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getCertificateObject(certThumbprint, pin) {\n\t\tif(canAsync) {\n\t\t\tlet oStore, oCertificate;\n\t\t\treturn cadesplugin\n\t\t\t.then(() => cadesplugin.CreateObjectAsync(\"CAPICOM.Store\")) //TODO: CADESCOM.Store ?\n\t\t\t.then(o => {\n\t\t\t\toStore = o;\n\t\t\t\treturn oStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,\n\t\t\t\t\t\t\t\t cadesplugin.CAPICOM_MY_STORE,\n\t\t\t\t\t\t\t\t cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\t})\n\t\t\t.then(() => findCertInStore(oStore, certThumbprint))\n\t\t\t.then(cert => oStore.Close().then(() => {\n\t\t\t\tif (!cert && hasContainerStore()) return oStore.Open(cadesplugin.CADESCOM_CONTAINER_STORE)\n\t\t\t\t\t.then(() => findCertInStore(oStore, certThumbprint))\n\t\t\t\t\t.then(c => oStore.Close().then(() => c));\n\t\t\t\telse return cert;\n\t\t\t}))\n\t\t\t.then(certificate => {\n\t\t\t\tif(!certificate) {\n\t\t\t\t\tthrow new Error(\"Не обнаружен сертификат c отпечатком \" + certThumbprint);\n\t\t\t\t}\n\t\t\t\treturn oCertificate = certificate;\n\t\t\t})\n\t\t\t.then(() => oCertificate.HasPrivateKey())\n\t\t\t.then(hasKey => {\n\t\t\t\tlet p = Promise.resolve();\n\t\t\t\tif (hasKey && pin) {\n\t\t\t\t\tp = p.then(() => oCertificate.PrivateKey).then(privateKey => Promise.all([\n\t\t\t\t\t\tprivateKey.propset_KeyPin(pin ? pin : ''),\n\t\t\t\t\t\tprivateKey.propset_CachePin(binded)\n\t\t\t\t\t]));\n\t\t\t\t}\n\t\t\t\treturn p;\n\t\t\t})\n\t\t\t.then(() => oCertificate);\n\t\t}\n\t\telse {\n\t\t\tlet oCertificate;\n\t\t\tconst oStore = cadesplugin.CreateObject(\"CAPICOM.Store\");\n\t\t\toStore.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,\n\t\t\t\t\t\tcadesplugin.CAPICOM_MY_STORE,\n\t\t\t\t\t\tcadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);\n\t\t\toCertificate = findCertInStore(oStore, certThumbprint);\n\t\t\toStore.Close();\n\n\t\t\tif (!oCertificate && hasContainerStore()) {\n\t\t\t\toStore.Open(cadesplugin.CADESCOM_CONTAINER_STORE);\n\t\t\t\toCertificate = findCertInStore(oStore, certThumbprint);\n\t\t\t\toStore.Close();\n\t\t\t}\n\n\t\t\tif(!oCertificate) {\n\t\t\t\tthrow new Error(\"Не обнаружен сертификат c отпечатком \" + certThumbprint);\n\t\t\t}\n\n\t\t\tif (oCertificate.HasPrivateKey && pin) {\n\t\t\t\toCertificate.PrivateKey.KeyPin = pin ? pin : '';\n\t\t\t\tif(oCertificate.PrivateKey.CachePin !== undefined) {\n\t\t\t\t\t// возможно не поддерживается в ИЕ\n\t\t\t\t\t// https://www.cryptopro.ru/forum2/default.aspx?g=posts&t=10170\n\t\t\t\t\toCertificate.PrivateKey.CachePin = binded;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn oCertificate;\n\t\t}\n\t}\n\n\t/**\n\t * Получить текст ошибки\n\t * @param {Error} e\n\t * @returns {string}\n\t */\n\tfunction getError(e) {\n\t\tconsole.log('Crypto-Pro error', e.message || e);\n\t\tif(e.message) {\n\t\t\tfor(var i in cadesErrorMesages) {\n\t\t\t\tif(cadesErrorMesages.hasOwnProperty(i)) {\n\t\t\t\t\tif(e.message.indexOf(i) + 1) {\n\t\t\t\t\t\te.message = cadesErrorMesages[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn e.message || e;\n\t}\n\n\t/**\n\t * Разобрать субъект в объект DN\n\t * @param {string} subjectName\n\t * @returns {DN}\n\t */\n\tfunction string2dn(subjectName){\n\t\tvar dn = new DN;\n\t\tvar pairs = subjectName.match(/([а-яёА-ЯЁa-zA-Z0-9\\.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g).map(el => el.replace(/,$/, ''));\n\t\tpairs.forEach(pair => {\n\t\t\tvar d = pair.match(/([^=]+)=(.*)/);\n\t\t\tif (d.length === 3) {\n\t\t\t\tvar rdn = d[1].trim().replace(/^OID\\./, '');\n\t\t\t\tvar val = d[2].trim().replace(/^\"(.*)\"$/, '$1');\n\t\t\t\tdn[rdn] = val;\n\t\t\t}\n\t\t});\n\t\treturn convertDN(dn);\n\t}\n\n\t/**\n\t * Получить название сертификата\n\t * @param {DN} o объект, включающий в себя значения всех полей сертификата с латинскими ключами\n\t * @see convertDN\n\t * @returns {String}\n\t */\n\tfunction formatCertificateName(o) {\n\t\tvar snils = o['SNILS'];\n\t\tvar inn = o['INN'];\n\t\treturn '' + o['CN'] + (inn ? '; ИНН ' + inn : '') + (snils ? '; СНИЛС ' + snils : '');\n\t}\n\n\t/**\n\t * https://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array/28227607#28227607\n\t * @param {string} str\n\t * @returns {Array}\n\t */\n\tfunction stringToUtf8ByteArray(str) {\n\t\t// TODO(user): Use native implementations if/when available\n\t\tvar out = [], p = 0;\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tvar c = str.charCodeAt(i);\n\t\t\tif (c < 128) {\n\t\t\t\tout[p++] = c;\n\t\t\t}\n\t\t\telse if (c < 2048) {\n\t\t\t\tout[p++] = (c >> 6) | 192;\n\t\t\t\tout[p++] = (c & 63) | 128;\n\t\t\t}\n\t\t\telse if (\n\t\t\t\t\t((c & 0xFC00) == 0xD800) && (i + 1) < str.length &&\n\t\t\t\t\t((str.charCodeAt(i + 1) & 0xFC00) == 0xDC00)) {\n\t\t\t\t// Surrogate Pair\n\t\t\t\tc = 0x10000 + ((c & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF);\n\t\t\t\tout[p++] = (c >> 18) | 240;\n\t\t\t\tout[p++] = ((c >> 12) & 63) | 128;\n\t\t\t\tout[p++] = ((c >> 6) & 63) | 128;\n\t\t\t\tout[p++] = (c & 63) | 128;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout[p++] = (c >> 12) | 224;\n\t\t\t\tout[p++] = ((c >> 6) & 63) | 128;\n\t\t\t\tout[p++] = (c & 63) | 128;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n}\n\nexport default CryptoPro;\n","export default {\n ALREADY_LOGGED_IN: 'Пользователь уже авторизован',\n ASN1_ERROR: 'Ошибка разбора структуры ASN1',\n BAD_PARAMS: 'Неправильные параметры',\n BASE64_DECODE_FAILED: 'Ошибка декодирования из base64',\n CA_CERTIFICATES_NOT_FOUND: 'Корневые сертификаты отсутствуют',\n CANNOT_SAVE_PIN_IN_CACHE: 'Невозможно сохранить PIN-код',\n CANT_HARDWARE_VERIFY_CMS: 'Проверка множественной подписи с вычислением хеша на устройстве не поддерживается',\n CEK_NOT_AUTHENTIC: 'Контейнер в формате CMS поврежден или переданный ключ не является ключом получателя',\n CERTIFICATE_CATEGORY_BAD: 'Некорректная категория сертификата',\n CERTIFICATE_EXISTS: 'Сертификат с таким телом уже существует на устройстве',\n CERTIFICATE_HASH_NOT_UNIQUE: 'Идентификатор сертификата не уникален',\n CERTIFICATE_NOT_FOUND: 'Сертификат не найден на устройстве',\n CERTIFICATE_VERIFICATION_ERROR: 'Ошибка проверки сертификата',\n DATA_INVALID: 'Неверные данные',\n DEVICE_ERROR: 'Ошибка устройства.',\n DEVICE_NOT_FOUND: 'Устройство не найдено',\n FUNCTION_FAILED: 'Невозможно выполнить операцию',\n FUNCTION_REJECTED: 'Операция отклонена пользователем',\n KEY_FUNCTION_NOT_PERMITTED: 'Операция запрещена для данного типа ключа',\n KEY_ID_NOT_UNIQUE: 'Идентификатор ключевой пары не уникален',\n KEY_LABEL_NOT_UNIQUE: 'Метка ключевой пары не уникальна',\n KEY_NOT_FOUND: 'Не найдена соответствующая ключевая пара.',\n LICENCE_READ_ONLY: 'Лицензия доступна только для чтения',\n NOT_ENOUGH_MEMORY: 'Недостаточно памяти',\n PEM_ERROR: 'Ошибка декодирования PEM',\n PIN_CHANGED: 'PIN-код был изменен извне',\n PIN_INCORRECT: 'Введен неправильный PIN-код',\n PIN_INVALID: 'PIN-код содержит недопустимые символы',\n PIN_LENGTH_INVALID: 'Введен слишком короткий PIN-код',\n PIN_LOCKED: 'PIN-код заблокирован',\n PKCS11_LOAD_FAILED: 'Не удалось загрузить модуль PKCS#11',\n SESSION_INVALID: 'Текущая сессия устарела',\n TOKEN_INVALID: 'Ошибка чтения/записи устройства.',\n UNSUPPORTED_BY_TOKEN: 'Операция не поддерживается токеном',\n USER_NOT_LOGGED_IN: 'Пользователь не авторизован',\n USER_PIN_NOT_INITIALIZED: 'PIN-код пользователя не инициализирован',\n WRONG_KEY_TYPE: 'Неправильный тип ключа',\n X509_AKID_ISSUER_SERIAL_MISMATCH: 'Несовпадение серийного номера субьекта и доверенного центра',\n X509_AKID_SKID_MISMATCH: 'Несовпадение идентификатора ключа у субьекта и доверенного центра',\n X509_APPLICATION_VERIFICATION: 'Ошибка проверки приложения',\n X509_CERT_CHAIN_TOO_LONG: 'Слишком длинная цепочка сертификатов',\n X509_CERT_HAS_EXPIRED: 'Срок действия сертификата истек',\n X509_CERT_NOT_YET_VALID: 'Срок действия сертификата еще не начался',\n X509_CERT_REJECTED: 'Сертифкат отклонен',\n X509_CERT_REVOKED: 'Сертификат отозван',\n X509_CERT_SIGNATURE_FAILURE: 'Неверная подпись сертификата',\n X509_CERT_UNTRUSTED: 'Недоверенный сертификат',\n X509_CRL_HAS_EXPIRED: 'Срок действия CRL истек',\n X509_CRL_NOT_YET_VALID: 'Срок действия CRL еще не начался',\n X509_CRL_PATH_VALIDATION_ERROR: 'Неправильный путь CRL',\n X509_CRL_SIGNATURE_FAILURE: 'Неверная подпись CRL',\n X509_DEPTH_ZERO_SELF_SIGNED_CERT: 'Недоверенный самоподписанный сертификат',\n X509_DIFFERENT_CRL_SCOPE: 'Другая область CRL',\n X509_ERROR_IN_CERT_NOT_AFTER_FIELD: 'Некорректные данные в поле \"notAfter\" у сертификата',\n X509_ERROR_IN_CERT_NOT_BEFORE_FIELD: 'Некорректные данные в поле \"notBefore\" у сертификата',\n X509_ERROR_IN_CRL_LAST_UPDATE_FIELD: 'Некорректные данные в поле \"lastUpdate\" у CRL',\n X509_ERROR_IN_CRL_NEXT_UPDATE_FIELD: 'Некорректные данные в поле \"nextUpdate\" у CRL',\n X509_EXCLUDED_VIOLATION: 'Неправильная структура сертфиката',\n X509_INVALID_CA: 'Неверный корневой сертификат',\n X509_INVALID_EXTENSION: 'Неверное или некорректное расширение сертификата',\n X509_INVALID_NON_CA: 'Неверный некорневой сертфикат, помеченный как корневой',\n X509_INVALID_POLICY_EXTENSION: 'Неверное или некорректное расширение политик сертификата',\n X509_INVALID_PURPOSE: 'Неподдерживаемое назначение сертификата',\n X509_KEYUSAGE_NO_CERTSIGN: 'Ключ не может быть использован для подписи сертификатов',\n X509_KEYUSAGE_NO_CRL_SIGN: 'Ключ не может быть использован для подписи CRL',\n X509_KEYUSAGE_NO_DIGITAL_SIGNATURE: 'Ключ не может быть использован для цифровой подписи',\n X509_NO_EXPLICIT_POLICY: 'Явные политики отсутствуют',\n X509_OUT_OF_MEM: 'Нехватает памяти',\n X509_PATH_LENGTH_EXCEEDED: 'Превышена длина пути',\n X509_PERMITTED_VIOLATION: 'Неправильная структура сертифката',\n X509_PROXY_CERTIFICATES_NOT_ALLOWED: 'Проксирующие сертификаты недопустимы',\n X509_PROXY_PATH_LENGTH_EXCEEDED: 'Превышина длина пути прокси',\n X509_SELF_SIGNED_CERT_IN_CHAIN: 'В цепочке обнаружен недоверенный самоподписанный сертификат',\n X509_SUBJECT_ISSUER_MISMATCH: 'Несовпадения субьекта и эмитента',\n X509_SUBTREE_MINMAX: 'Неправильная структура сертифката',\n X509_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: 'Невозможно раскодировать открытый ключ эмитента',\n X509_UNABLE_TO_DECRYPT_CERT_SIGNATURE: 'Невозможно расшифровать подпись сертификата',\n X509_UNABLE_TO_DECRYPT_CRL_SIGNATURE: 'Невозможно расшифровать подпись CRL',\n X509_UNABLE_TO_GET_CRL: 'Невозможно получить CRL',\n X509_UNABLE_TO_GET_CRL_ISSUER: 'Невозможно получить CRL подписанта',\n X509_UNABLE_TO_GET_ISSUER_CERT: 'Невозможно получить сертификат подписанта',\n X509_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: 'Невозможно получить локальный сертификат подписанта',\n X509_UNABLE_TO_VERIFY_LEAF_SIGNATURE: 'Невозможно проверить первый сертификат',\n X509_UNHANDLED_CRITICAL_CRL_EXTENSION: 'Неподдерживаемое расширение CRL',\n X509_UNHANDLED_CRITICAL_EXTENSION: 'Неподдерживаемое расширение',\n X509_UNNESTED_RESOURCE: 'RFC 3779 неправильное наследование ресурсов',\n X509_UNSUPPORTED_CONSTRAINT_SYNTAX: 'Неправильная структура сертифката',\n X509_UNSUPPORTED_CONSTRAINT_TYPE: 'Неправильная структура сертфиката',\n X509_UNSUPPORTED_EXTENSION_FEATURE: 'Неподдерживаемое расширение возможностей',\n X509_UNSUPPORTED_NAME_SYNTAX: 'Неправильная структура сертфиката'\n};","/**\n * RuToken simplified library\n * @author Aleksandr.ru\n * @link http://aleksandr.ru\n */\n\nimport rutoken from 'rutoken';\nimport DN from '../DN';\nimport errors from './errors';\nimport { convertDN, stripDnQuotes } from '../helpers';\n\nconst requiredFunctions = [\n\t'cmsDecrypt',\n\t'cmsEncrypt',\n\t'createPkcs10',\n\t'deleteCertificate',\n\t'deleteKeyPair',\n\t'enumerateCertificates',\n\t'enumerateDevices',\n\t'enumerateKeys',\n\t'generateKeyPair',\n\t'getCertificate',\n\t'getCertificateInfo',\n\t'getDeviceInfo',\n\t'getDeviceModel',\n\t'getDeviceType',\n\t'getKeyByCertificate',\n\t'importCertificate',\n\t'login',\n\t'logout',\n\t'parseCertificate',\n\t'sign',\n\t'verify'\n];\n\nfunction RuToken() {\n\tvar plugin, deviceId;\n\n\t/**\n\t * Инициализация и проверка наличия требуемых возможностей\n\t * @returns {Promise} версия, информация о токене\n\t */\n\tthis.init = function(){\n\t\treturn rutoken.ready.then( _ => {\n\t\t\tif (window.chrome) {\n\t\t\t\treturn rutoken.isExtensionInstalled();\n\t\t\t} else {\n\t\t\t\treturn Promise.resolve(true);\n\t\t\t}\n\t\t}).then(result => {\n\t\t\tif (result) {\n\t\t\t\treturn rutoken.isPluginInstalled();\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Rutoken Extension wasn't found\");\n\t\t\t}\n\t\t}).then(result => {\n\t\t\tif (result) {\n\t\t\t\treturn rutoken.loadPlugin();\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Rutoken Plugin wasn't found\");\n\t\t\t}\n\t\t}).then(result => {\n\t\t\tconst absentFn = requiredFunctions.filter(fn => !result[fn]);\n\t\t\tif (absentFn.length) {\n\t\t\t\tconsole.log('Missing plugin functions: ', absentFn);\n\t\t\t\tthrow new Error(\"Отсутствует функционал, убедитесь, что у вас установлен Рутокен Плагин и вы используете Рутокен ЭЦП 2.0\");\n\t\t\t}\n\t\t\t//Можно начинать работать с плагином\n\t\t\tplugin = result;\n\t\t\treturn plugin.enumerateDevices();\n\t\t}).then(devices => {\n\t\t\tconst len = devices.length;\n\t\t\tif (len === 1) {\n\t\t\t\tdeviceId = devices.shift();\n\t\t\t}\n\t\t\telse if(len === 0) {\n\t\t\t\tthrow new Error(\"Не обнаружено подключенных устройств\");\n\t\t\t}\n\t\t\telse if(len > 1) {\n\t\t\t\tthrow new Error('Подключено ' + len + ' устройств');\n\t\t\t}\n\t\t\treturn Promise.all([\n\t\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_READER), // имя считывателя \n\t\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_LABEL), // метка токена \t\t\t\t\t\n\t\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_SERIAL), // серийный номер токена\n\t\t\t\tplugin.getDeviceModel(deviceId),\n\t\t\t\tplugin.getDeviceType(deviceId)\n\t\t\t]);\n\t\t}).then(infos => {\n\t\t\treturn {\n\t\t\t\tversion: plugin.version,\n\t\t\t\tserial: infos[2],\n\t\t\t\treader: infos[0],\n\t\t\t\tlabel: infos[1].indexOf('Rutoken ECP ') + 1 ? '' : infos[1],\n\t\t\t\ttype: infos[4],\n\t\t\t\tmodel: infos[3]\n\t\t\t};\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Авторизация на токене с пин-кодом юзера\n\t * @param {string} userPin если нет, то предлгает ввести пин через prompt\n\t * @returns {Promise}\n\t */\n\tthis.bind = function(userPin) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_IS_LOGGED_IN).then(result => {\n\t\t\t\tif(result) {\n\t\t\t\t\tresolve('Пользователь уже авторизован');\n\t\t\t\t\treturn false; // no need to log in\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!userPin) {\n\t\t\t\t\t\tuserPin = prompt('PIN-код доступа к устройству');\n\t\t\t\t\t\tif (!userPin) throw new Error('Авторизация на устройстве отменена пользователем');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true; // need to log in \n\t\t\t}).then(needToLogIn => {\n\t\t\t\tif (needToLogIn) {\n\t\t\t\t\treturn plugin.login(deviceId, userPin).then( _ => {\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresolve(true);\n\t\t\t\t}\n\t\t\t}).then(null, e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\treject(err);\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Отменить предъявление PIN-кода. Необходимо вызывать при завершении сеанса работы\n\t * @returns {Promise}\n\t */\n\tthis.unbind = function() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tplugin.getDeviceInfo(deviceId, plugin.TOKEN_INFO_IS_LOGGED_IN).then(result => {\n\t\t\t\tif(!result) {\n\t\t\t\t\tresolve('Пользователь не авторизован');\n\t\t\t\t\treturn false; // no need to log out\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn true; // need to log out \n\t\t\t\t}\n\t\t\t}).then(needToLogOut => {\n\t\t\t\tif (needToLogOut) {\n\t\t\t\t\treturn plugin.logout(deviceId).then( _ => {\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}).then(null, e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\treject(err);\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Очистка токена (удаление всех сертификатов и ключей)\n\t * @returns {Promise} количество удаленных элементов\n\t */\n\tthis.clean = function(){\n\t\tlet count = 0;\n\t\treturn plugin.enumerateCertificates(deviceId, plugin.CERT_CATEGORY_USER).then(results => {\n\t\t\tlet promises = [];\n\t\t\tfor (let i in results) {\n\t\t\t\tconst certId = results[i];\n\t\t\t\tpromises.push(plugin.deleteCertificate(deviceId, certId));\n\t\t\t}\n\t\t\tcount += promises.length;\n\t\t\treturn Promise.all(promises);\n\t\t}).then(() => {\n\t\t\tconst marker = ''; // Идентификатор группы ключей, \"\" - все ключи\n\t\t\treturn plugin.enumerateKeys(deviceId, marker);\n\t\t}).then(results => {\n\t\t\tlet promises = [];\n\t\t\tfor (let i in results) {\n\t\t\t\tconst keyId = results[i];\n\t\t\t\tpromises.push(plugin.deleteKeyPair(deviceId, keyId));\n\t\t\t}\n\t\t\tcount += promises.length;\n\t\t\treturn Promise.all(promises);\n\t\t}).then(() => {\n\t\t\treturn count;\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Создать запрос на сертификат\n\t * @param {DN} dn\n\t * @param {string} marker Идентификатор группы ключей\n\t * @param {array} extKeyUsage массив OID Extended Key Usage, по-умолчанию Аутентификация клиента '1.3.6.1.5.5.7.3.2' + Защищенная электронная почта '1.3.6.1.5.5.7.3.4'\n\t * @param {string} algorithm Алгоритм \"PUBLIC_KEY_ALGORITHM_GOST3410_2012_256\" (по-умолчанию) или \"PUBLIC_KEY_ALGORITHM_GOST3410_2001\".\n\t * @returns {Promise} объект с полями { csr: 'base64 запрос на сертификат', containerId }\n\t * @see DN\n\t */\n\tthis.generateCSR = function(dn, marker, extKeyUsage, algorithm){\n\t\tlet keyId = '';\n\t\tif (!marker) {\n\t\t\tmarker = '';\n\t\t}\n\t\tif (!extKeyUsage || !extKeyUsage.length) {\n\t\t\textKeyUsage = [\n\t\t\t\t'clientAuth', // 1.3.6.1.5.5.7.3.2', // Аутентификация клиента\n\t\t\t\t'emailProtection', // '1.3.6.1.5.5.7.3.4' // Защищенная электронная почта\n\t\t\t];\n\t\t}\n\t\tconst publicKeyAlgorithm = algorithm && plugin[algorithm] || plugin.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256;\n\t\tlet paramset = 'XA';\n\t\tlet hashAlgorithm = plugin.HASH_TYPE_GOST3411_94;\n\t\tif (publicKeyAlgorithm === plugin.PUBLIC_KEY_ALGORITHM_GOST3410_2012_512) {\n\t\t\tparamset = 'A';\n\t\t\thashAlgorithm = plugin.HASH_TYPE_GOST3411_12_512;\n\t\t} \n\t\telse if (publicKeyAlgorithm === plugin.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256) {\n\t\t\thashAlgorithm = plugin.HASH_TYPE_GOST3411_12_256;\n\t\t}\n\t\tconst reserved = undefined;\n\t\tconst options = {\n\t\t\tpublicKeyAlgorithm,\n\t\t\tparamset\n\t\t};\n\t\treturn plugin.generateKeyPair(deviceId, reserved, marker, options).then(result => {\n\t\t\tkeyId = result;\n\t\t\tlet subject = [];\n\t\t\tfor (let i in dn) if(dn.hasOwnProperty(i)) {\n\t\t\t\tsubject.push({\n\t\t\t\t\trdn: i,\n\t\t\t\t\tvalue: dn[i]\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst keyUsage = [\n\t\t\t\t\"digitalSignature\"\n\t\t\t\t,\"nonRepudiation\"\n\t\t\t\t,\"keyEncipherment\"\n\t\t\t\t,\"dataEncipherment\"\n\t\t\t];\n\t\t\tconst extensions = {\n\t\t\t\tkeyUsage,\n\t\t\t\textKeyUsage\n\t\t\t};\n\t\t\tconst subjectSignTool = 'СКЗИ \"РУТОКЕН ЭЦП\"';\n\t\t\tconst options = {\n\t\t\t\tsubjectSignTool,\n\t\t\t\thashAlgorithm\n\t\t\t};\n\t\t\treturn plugin.createPkcs10(deviceId, keyId, subject, extensions, options);\n\t\t}).then(result => {\n\t\t\treturn {\n\t\t\t\tcsr: cleanPemString(result),\n\t\t\t\tkeyPairId: keyId\n\t\t\t};\n\t\t}).then(null, e => {\n\t\t\tif(keyId) {\n\t\t\t\tplugin.deleteKeyPair(deviceId, keyId);\n\t\t\t}\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Записать сертификат на токен\n\t * @param {string} certificate base64(массив байт со значением сертификата в формате DER)\n\t * @returns {Promise}\n\t */\n\tthis.writeCertificate = function(certificate){\n\t\tconst category = plugin.CERT_CATEGORY_USER;\n\t\treturn plugin.importCertificate(deviceId, certificate, category).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Получение информации о сертификате.\n\t * @param {int} certId идентификатор сертификата\n\t * @returns {Promise}\n\t */\n\tthis.certificateInfo = function(certId){\n\t\tlet hasPrivateKey = false;\n\t\tlet serialNumber = '';\n\t\treturn new Promise(resolve => {\n\t\t\tplugin.getKeyByCertificate(deviceId, certId).then(keyId => {\n\t\t\t\tresolve(!!keyId);\n\t\t\t}).then(null, e => {\n\t\t\t\tconst err = getError(e);\n\t\t\t\tconsole.log('getKeyByCertificate', certId, err);\n\t\t\t\tresolve(false);\n\t\t\t});\n\t\t}).then(result => {\n\t\t\thasPrivateKey = result;\n\t\t\treturn plugin.getCertificateInfo(deviceId, certId, plugin.CERT_INFO_SERIAL_NUMBER);\n\t\t}).then(result => {\n\t\t\tserialNumber = result;\n\t\t\treturn plugin.parseCertificate(deviceId, certId);\n\t\t}).then(o => {\n\t\t\tconst ver = o.text.match(/Version: (\\d+)/);\n\t\t\tconst version = ver.length > 1 ? ver[1] : undefined;\n\t\t\tconst algo = o.text.match(/Public Key Algorithm: (.+)$/m);\n\t\t\tconst keyAlgorithm = algo.length > 1 ? algo[1] : '';\n\t\t\tconst dn = makeDN(o.subject);\n\t\t\tconst dnI = makeDN(o.issuer);\n\t\t\tconst dt = new Date();\n\t\t\tconst info = {\n\t\t\t\tName: dn.commonName || dn.CN,\n\t\t\t\tIssuer: dnI,\n\t\t\t\tIssuerName: stripDnQuotes(dnI.toString()),\n\t\t\t\tSubject: dn,\n\t\t\t\tSubjectName: stripDnQuotes(dn.toString()),\n\t\t\t\tVersion: version,\n\t\t\t\tAlgorithm: keyAlgorithm,\n\t\t\t\tSerialNumber: serialNumber,\n\t\t\t\tThumbprint: certId.replace(/\\:/g, ''),\n\t\t\t\tValidFromDate: new Date(o.validNotBefore),\n\t\t\t\tValidToDate: new Date(o.validNotAfter),\n\t\t\t\tHasPrivateKey: hasPrivateKey,\n\t\t\t\tIsValid: dt >= new Date(o.validNotBefore) && dt <= new Date(o.validNotAfter),\n\t\t\t\t//ProviderName: '', //TODO\n\t\t\t\t//ProviderType: undefined, //TODO\n\t\t\t\ttoString: function(){\n\t\t\t\t\treturn 'Название: ' + this.Name +\n\t\t\t\t\t\t'\\nИздатель: ' + this.IssuerName +\n\t\t\t\t\t\t'\\nСубъект: ' + this.SubjectName +\n\t\t\t\t\t\t'\\nВерсия: ' + this.Version +\n\t\t\t\t\t\t'\\nАлгоритм: ' + this.Algorithm + // PublicKey Algorithm\n\t\t\t\t\t\t'\\nСерийный №: ' + this.SerialNumber +\n\t\t\t\t\t\t'\\nОтпечаток SHA1: ' + this.Thumbprint +\n\t\t\t\t\t\t'\\nНе действителен до: ' + this.ValidFromDate +\n\t\t\t\t\t\t'\\nНе действителен после: ' + this.ValidToDate +\n\t\t\t\t\t\t'\\nПриватный ключ: ' + (this.HasPrivateKey ? 'Есть' : 'Нет (или не выполнен вход)') +\n\t\t\t\t\t\t'\\nВалидный: ' + (this.IsValid ? 'Да' : 'Нет');\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn info;\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Получение массива доступных сертификатов\n\t * @returns {Promise} [{id, subject}, ...]\n\t */\n\tthis.listCertificates = function(){\n\t\tlet certIds = [];\n\t\tlet certs = [];\n\t\treturn plugin.enumerateCertificates(deviceId, plugin.CERT_CATEGORY_USER).then(results => {\n\t\t\tcertIds = results;\n\t\t\tlet promises = [];\n\t\t\tfor (let i in certIds) {\n\t\t\t\tpromises.push(plugin.parseCertificate(deviceId, certIds[i]));\n\t\t\t}\n\t\t\treturn Promise.all(promises);\n\t\t}).then(results => {\n\t\t\tfor (let i in certIds) {\n\t\t\t\tcerts.push({\n\t\t\t\t\tid: certIds[i],\n\t\t\t\t\tname: formatCertificateName(results[i])\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn certs;\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\t\n\t/**\n\t * Получить сертификат\n\t * @param {string} certId \n\t * @returns {Promise} base64(массив байт со значением сертификата в формате DER)\n\t */\n\tthis.readCertificate = function(certId){\n\t\treturn plugin.getCertificate(deviceId, certId).then(result => {\n\t\t\treturn cleanPemString(result);\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Подписать данные. Выдает подпись в формате PKCS#7, опционально закодированную в Base64\n\t * @param {string} dataBase64 данные для подписи закодированные в base64\n\t * @param {string} certId идентификатор сертификата\n\t * @param {object} [options]\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} строка-подпись в формате PKCS#7, закодированная в Base64.\n\t */\n\tthis.signData = function(dataBase64, certId, options){\n\t\tif (!options) options = {};\n\t\tconst { attached } = options;\n\t\treturn plugin.sign(deviceId, certId, dataBase64, plugin.DATA_FORMAT_BASE64, {\n\t\t\tdetached: !attached\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Добавить подпись к существующей.\n\t * @param {string} dataBase64 игнорируется если прикрепленная подпись\n\t * @param {string} signBase64 существующая подпись\n\t * @param {string} certId идентификатор сертификата\n\t * @param {object} [options]\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} base64\n\t */\n\tthis.addSign = function(dataBase64, signBase64, certId, options){\n\t\tif (!options) options = {};\n\t\tconst { attached } = options;\n\t\tif (attached) {\n\t\t\t// если в CMS подпись неотсоединённая, то параметр data должен быть пустым\n\t\t\tdataBase64 = '';\n\t\t}\n\t\treturn plugin.sign(deviceId, certId, dataBase64, plugin.DATA_FORMAT_BASE64, {\n\t\t\tdetached: !attached,\n\t\t\tCMS: signBase64\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Проверить подпись.\n\t * @param {string} dataBase64 игнорируется если прикрепленная подпись\n\t * @param {string} signBase64 существующая подпись\n\t * @param {object} [options]\n\t * @param {boolean} [options.attached] присоединенная подпись\n\t * @returns {Promise} true или reject\n\t */\n\tthis.verifySign = function(dataBase64, signBase64, options){\n\t\tif (!options) options = {};\n\t\tconst { attached } = options;\n\t\tconst args = {\n\t\t\tbase64: true,\n\t\t\tverifyCertificate: false\n\t\t};\n\t\tif (!attached) {\n\t\t\targs.data = dataBase64;\n\t\t}\n\t\treturn plugin.verify(deviceId, signBase64, args).then(result => {\n\t\t\tif (!result) {\n\t\t\t\t// потмоу что в крипто-про тоже так\n\t\t\t\tthrow new Error('подпись не верна');\n\t\t\t}\n\t\t\treturn true;\n\t\t}).then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Шифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {string} certId идентификатор сертификата\n\t * @returns {Promise} base64 enveloped data\n\t */\n\tthis.encryptData = function(dataBase64, certId) {\n\t\treturn plugin.getCertificate(deviceId, certId)\n\t\t.then(cert => plugin.cmsEncrypt(deviceId, \"\", [cert], dataBase64, {\n\t\t\tbase64: true\n\t\t}))\n\t\t.then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Дешифрование данных\n\t * @param {string} dataBase64 данные в base64\n\t * @param {string} certId идентификатор сертификата\n\t * @returns {Promise} base64\n\t */\n\tthis.decryptData = function(dataBase64, certId) {\n\t\treturn plugin.getKeyByCertificate(deviceId, certId)\n\t\t.then(keyId => plugin.cmsDecrypt(deviceId, keyId, dataBase64, {\n\t\t\tbase64: true\n\t\t}))\n\t\t.then(null, e => {\n\t\t\tconst err = getError(e);\n\t\t\tthrow new Error(err);\n\t\t});\n\t};\n\n\t/**\n\t * Получить ошибку по коду\n\t * @param {string|Error} e код ошибки или объект\n\t * @returns {string} текст ошибки\n\t */\n\tfunction getError(e) {\n\t\tconst ee = e.message && e.message.match(/^[0-9]+$/) && e.message || e;\n\t\tlet mnemo = '';\n\t\tif (plugin) for(let i in plugin.errorCodes) {\n\t\t\tif (plugin.errorCodes[i] == ee) {\n\t\t\t\tmnemo = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn mnemo && errors[mnemo] || mnemo || e.message || e;\n\t}\n\n\t/**\n\t * Создать DN из массива [{rdn: ..., value: ...}, ...]\n\t * @param {[index: number]: { rdn: string, value: string }} obj \n\t * @returns {DN}\n\t */\n\tfunction makeDN(obj)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in obj) {\n\t\t\tvar rdn = obj[i].rdn;\n\t\t\tvar val = obj[i].value;\n\t\t\tif (rdn && val) {\n\t\t\t\tdn[rdn] = val;\n\t\t\t}\n\t\t}\n\t\treturn convertDN(dn);\n\t}\n\n\t/**\n\t * Получить название сертификата\n\t * @param {type} o объект, включающий в себя значения всех полей сертификата.\n\t * @param {type} containerName не обязательно\n\t * @returns {string} \n\t */\n\tfunction formatCertificateName(o, containerName)\n\t{\n\t\tvar dn = new DN;\n\t\tfor(var i in o.subject) {\n\t\t\tvar rdn = o.subject[i].rdn;\n\t\t\tvar val = o.subject[i].value;\n\t\t\tdn[rdn] = val;\n\t\t}\n\t\tdn.toString = function(){\n\t\t\tvar cn = this['commonName'] || this['CN'] || this['2.5.4.3'];\n\t\t\tvar snils = this['СНИЛС'] || this['SNILS'] || this['1.2.643.100.3'];\n\t\t\tvar inn = this['ИНН'] || this['INN'] || this['1.2.643.3.131.1.1'];\n\t\t\treturn '' + cn + (inn ? '; ИНН ' + inn : '') + (snils ? '; СНИЛС ' + snils : '') + (containerName ? ' (' + containerName + ')' : '');\n\t\t};\n\t\treturn dn.toString();\n\t}\n\n\t/**\n\t * Убирает все лишнее из PEM, кроме непрерывного base64 \n\t * @param {String} pem \n\t * @returns {String}\n\t */\n\tfunction cleanPemString(pem) {\n\t\treturn pem.replace(/^-+(BEGIN|END)[^-]+-+$/gm, '').trim();\n\t}\n}\n\nexport default RuToken;\n","import 'console-polyfill';\n\nexport { default as DN } from './DN';\nexport { default as JaCarta } from './JaCarta';\nexport { default as JaCarta2 } from './JaCarta2';\nexport { default as CryptoPro } from './CryptoPro';\nexport { default as RuToken } from './RuToken';\n\nif(module.hot) {\n module.hot.accept();\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/js/ruscrypto.min.js b/docs/js/ruscrypto.min.js index c44f712..d088a2d 100644 --- a/docs/js/ruscrypto.min.js +++ b/docs/js/ruscrypto.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RusCryptoJS",[],t):"object"==typeof exports?exports.RusCryptoJS=t():e.RusCryptoJS=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t,n){var r=n(40)("wks"),i=n(17),o=n(1).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(2),i=n(61),o=n(34),a=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(14),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(3),i=n(19);e.exports=n(4)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(31);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(1),i=n(15),o=n(8),a=n(11),c=n(13),u=function(e,t,n){var s,_,l,f,E=e&u.F,p=e&u.G,d=e&u.S,C=e&u.P,h=e&u.B,g=p?r:d?r[t]||(r[t]={}):(r[t]||{}).prototype,I=p?i:i[t]||(i[t]={}),O=I.prototype||(I.prototype={});for(s in p&&(n=t),n)l=((_=!E&&g&&void 0!==g[s])?g:n)[s],f=h&&_?c(l,r):C&&"function"==typeof l?c(Function.call,l):l,g&&a(g,s,l,e&u.U),I[s]!=l&&o(I,s,f),C&&O[s]!=l&&(O[s]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(1),i=n(8),o=n(12),a=n(17)("src"),c=Function.toString,u=(""+c).split("toString");n(15).inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,c){var s="function"==typeof n;s&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(s&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:c?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||c.call(this)}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(35);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){var n=e.exports={version:"2.6.3"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(45),i=n(31);e.exports=function(e){return r(i(e))}},function(e,t){e.exports={}},function(e,t,n){var r=n(63),i=n(47);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(2),i=n(9),o=n(6),a=n(14),c=n(38),u=n(39),s=Math.max,_=Math.min,l=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,E=/\$([$&`']|\d\d?)/g;n(41)("replace",2,(function(e,t,n,p){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=p(n,e,this,t);if(i.done)return i.value;var l=r(e),f=String(this),E="function"==typeof t;E||(t=String(t));var C=l.global;if(C){var h=l.unicode;l.lastIndex=0}for(var g=[];;){var I=u(l,f);if(null===I)break;if(g.push(I),!C)break;""===String(I[0])&&(l.lastIndex=c(f,o(l.lastIndex),h))}for(var O,A="",S=0,v=0;v=S&&(A+=f.slice(S,N)+P,S=N+T.length)}return A+f.slice(S)}];function d(e,t,r,o,a,c){var u=r+e.length,s=o.length,_=E;return void 0!==a&&(a=i(a),_=f),n.call(c,_,(function(n,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var _=+i;if(0===_)return n;if(_>s){var f=l(_/10);return 0===f?n:f<=s?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):n}c=o[_-1]}return void 0===c?"":c}))}}))},function(e,t,n){"use strict";var r=n(2),i=n(6),o=n(38),a=n(39);n(41)("match",1,(function(e,t,n,c){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=c(n,e,this);if(t.done)return t.value;var u=r(e),s=String(this);if(!u.global)return a(u,s);var _=u.unicode;u.lastIndex=0;for(var l,f=[],E=0;null!==(l=a(u,s));){var p=String(l[0]);f[E]=p,""===p&&(u.lastIndex=o(s,i(u.lastIndex),_)),E++}return 0===E?null:f}]}))},function(e,t,n){var r=n(63),i=n(47).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(3).f,i=n(12),o=n(0)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(73),i=n(94),o=n(21),a=n(20);e.exports=n(74)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";n(97);var r=n(2),i=n(33),o=n(4),a=/./.toString,c=function(e){n(11)(RegExp.prototype,"toString",e,!0)};n(7)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?c((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=a.name&&c((function(){return a.call(this)}))},function(e,t,n){"use strict";var r,i,o,a,c=n(16),u=n(1),s=n(13),_=n(32),l=n(10),f=n(5),E=n(35),p=n(51),d=n(98),C=n(55),h=n(76).set,g=n(100)(),I=n(77),O=n(101),A=n(102),S=n(103),v=u.TypeError,T=u.process,N=T&&T.versions,R=N&&N.v8||"",m=u.Promise,y="process"==_(T),D=function(){},P=i=I.f,b=!!function(){try{var e=m.resolve(1),t=(e.constructor={})[n(0)("species")]=function(e){e(D,D)};return(y||"function"==typeof PromiseRejectionEvent)&&e.then(D)instanceof t&&0!==R.indexOf("6.6")&&-1===A.indexOf("Chrome/66")}catch(e){}}(),w=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;g((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,c=i?t.ok:t.fail,u=t.resolve,s=t.reject,_=t.domain;try{c?(i||(2==e._h&&U(e),e._h=1),!0===c?n=r:(_&&_.enter(),n=c(r),_&&(_.exit(),a=!0)),n===t.promise?s(v("Promise-chain cycle")):(o=w(n))?o.call(n,u,s):u(n)):s(r)}catch(e){_&&!a&&_.exit(),s(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&M(e)}))}},M=function(e){h.call(u,(function(){var t,n,r,i=e._v,o=x(e);if(o&&(t=O((function(){y?T.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=y||x(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},x=function(e){return 1!==e._h&&0===(e._a||e._c).length},U=function(e){h.call(u,(function(){var t;y?T.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},K=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw v("Promise can't be resolved itself");(t=w(e))?g((function(){var r={_w:n,_d:!1};try{t.call(e,s(j,r,1),s(K,r,1))}catch(e){K.call(r,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){K.call({_w:n,_d:!1},e)}}};b||(m=function(e){p(this,m,"Promise","_h"),E(e),r.call(this);try{e(s(j,this,1),s(K,this,1))}catch(e){K.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(50)(m.prototype,{then:function(e,t){var n=P(C(this,m));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=y?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=s(j,e,1),this.reject=s(K,e,1)},I.f=P=function(e){return e===m||e===a?new o(e):i(e)}),l(l.G+l.W+l.F*!b,{Promise:m}),n(26)(m,"Promise"),n(48)("Promise"),a=n(15).Promise,l(l.S+l.F*!b,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(c||!b),"Promise",{resolve:function(e){return S(c&&this===a?m:this,e)}}),l(l.S+l.F*!(b&&n(56)((function(e){m.all(e).catch(D)}))),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,o=O((function(){var n=[],o=0,a=1;d(e,!1,(function(e){var c=o++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[c]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=O((function(){d(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){var r=function(e){function t(e){return!!(e&&e.call&&e.apply)}function n(e,n){return t(e[n])?function(){return e[n].apply(e,arguments)}:e[n]}function r(e){return function(){return e}}function i(){e.ready=Promise.resolve(!0),e.isExtensionInstalled=r(Promise.resolve(!1)),e.isPluginInstalled=r(Promise.resolve(!0)),e.loadPlugin=o,window.rutokenLoaded=c}function o(){var e=document.createElement("object");return e.style.setProperty("visibility","hidden","important"),e.style.setProperty("width","0px","important"),e.style.setProperty("height","0px","important"),e.style.setProperty("margin","0px","important"),e.style.setProperty("padding","0px","important"),e.style.setProperty("border-style","none","important"),e.style.setProperty("border-width","0px","important"),e.style.setProperty("max-width","0px","important"),e.style.setProperty("max-height","0px","important"),e.innerHTML="",e.setAttribute("type",f),document.body.appendChild(e),new Promise((function(e,t){l.push(e)}))}function a(){return E.loadPlugin().then((function(e){return function e(r){var i={},o=[];for(var a in r)!function(a){t(r[a].then)?o.push(r[a].then((function(o){return e(o).then((function(e){t(e)?i[a]=n(r,a):i[a]=e}))}))):i[a]=r[a]}(a);return 0==o.length?new Promise((function(e){e(r)})):Promise.all(o).then((function(){return i}))}(e)})).then((function(e){return e.wrapWithOldInterface=u,e}))}function c(e,t){_(e).then((function(e){if(0==l.length)throw"Internal error";l.shift()(e)}))}function u(){var e={};for(var n in this)t(this[n])?e[n]=function(e,t){return function(){var n=arguments[arguments.length-2],r=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0,-2);return t.apply(e,i).then((function(e){n(e)}),(function(e){r(e.message)}))}}(this,this[n]):e[n]=this[n];return new Promise((function(t){t(e)}))}function s(){var e={originalObject:this.originalObject};for(var t in this.originalObject)e[t]=n(this.originalObject,t);return new Promise((function(t){t(e)}))}function _(e){var n={originalObject:e,wrapWithOldInterface:s};for(var r in e)t(e[r])?n[r]=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return new Promise((function(r,i){n.push(r,i),t.apply(e,n)}))}}(e,e[r]):n[r]=e[r];return new Promise((function(e){e(n)}))}var l=[],f="application/x-rutoken-pki",E=window["C3B7563B-BF85-45B7-88FC-7CFF1BD3C2DB"];if(E)!function(){var t=E.initialize().then((function(){return E.isPluginInstalled()})).then((function(t){return e.isExtensionInstalled=r(Promise.resolve(!0)),e.isPluginInstalled=n(E,"isPluginInstalled"),t&&(f="application/x-rutoken-plugin",e.loadPlugin=a),!0}));e.ready=t}();else if(navigator.mimeTypes&&navigator.mimeTypes[f])i();else try{new ActiveXObject("Aktiv.CryptoPlugin"),i()}catch(t){e.ready=Promise.resolve(!0),e.isExtensionInstalled=r(Promise.resolve(!1)),e.isPluginInstalled=r(Promise.resolve(!1))}return e}(r||{});e.exports=r},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(18),i=n(0)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var r=n(2);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(14),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){"use strict";var r=n(60)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(32),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(15),i=n(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(16)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";n(86);var r=n(11),i=n(8),o=n(7),a=n(31),c=n(0),u=n(42),s=c("species"),_=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=c(e),E=!o((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=E?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[s]=function(){return n}),n[f](""),!t})):void 0;if(!E||!p||"replace"===e&&!_||"split"===e&&!l){var d=/./[f],C=n(a,f,""[e],(function(e,t,n,r,i){return t.exec===u?E&&!i?{done:!0,value:d.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),h=C[0],g=C[1];r(String.prototype,e,h),i(RegExp.prototype,f,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},function(e,t,n){"use strict";var r,i,o=n(33),a=RegExp.prototype.exec,c=String.prototype.replace,u=a,s=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),_=void 0!==/()??/.exec("")[1];(s||_)&&(u=function(e){var t,n,r,i,u=this;return _&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),s&&(t=u.lastIndex),r=a.call(u,e),s&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),_&&r&&r.length>1&&c.call(r[0],n,(function(){for(i=1;idocument.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(32),i=n(0)("iterator"),o=n(21);e.exports=n(15).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(2),i=n(35),o=n(0)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r=n(0)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){for(var r=n(27),i=n(22),o=n(11),a=n(1),c=n(8),u=n(21),s=n(0),_=s("iterator"),l=s("toStringTag"),f=u.Array,E={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(E),d=0;d=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(14),i=n(31);e.exports=function(e){return function(t,n){var o,a,c=String(i(t)),u=r(n),s=c.length;return u<0||u>=s?e?"":void 0:(o=c.charCodeAt(u))<55296||o>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?e?c.charAt(u):o:e?c.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){e.exports=!n(4)&&!n(7)((function(){return 7!=Object.defineProperty(n(43)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(1),i=n(87),o=n(3).f,a=n(25).f,c=n(65),u=n(33),s=r.RegExp,_=s,l=s.prototype,f=/a/g,E=/a/g,p=new s(f)!==f;if(n(4)&&(!p||n(7)((function(){return E[n(0)("match")]=!1,s(f)!=f||s(E)==E||"/a/i"!=s(f,"i")})))){s=function(e,t){var n=this instanceof s,r=c(e),o=void 0===t;return!n&&r&&e.constructor===s&&o?e:i(p?new _(r&&!o?e.source:e,t):_((r=e instanceof s)?e.source:e,r&&o?u.call(e):t),n?this:l,s)};for(var d=function(e){e in s||o(s,e,{configurable:!0,get:function(){return _[e]},set:function(t){_[e]=t}})},C=a(_),h=0;C.length>h;)d(C[h++]);l.constructor=s,s.prototype=l,n(11)(r,"RegExp",s)}n(48)("RegExp")},function(e,t,n){var r=n(12),i=n(20),o=n(64)(!1),a=n(46)("IE_PROTO");e.exports=function(e,t){var n,c=i(e),u=0,s=[];for(n in c)n!=a&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~o(s,n)||s.push(n));return s}},function(e,t,n){var r=n(20),i=n(6),o=n(37);e.exports=function(e){return function(t,n,a){var c,u=r(t),s=i(u.length),_=o(a,s);if(e&&n!=n){for(;s>_;)if((c=u[_++])!=c)return!0}else for(;s>_;_++)if((e||_ in u)&&u[_]===n)return e||_||0;return!e&&-1}}},function(e,t,n){var r=n(5),i=n(18),o=n(0)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){for(var r,i=n(1),o=n(8),a=n(17),c=a("typed_array"),u=a("view"),s=!(!i.ArrayBuffer||!i.DataView),_=s,l=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[f[l++]])?(o(r.prototype,c,!0),o(r.prototype,u,!0)):_=!1;e.exports={ABV:s,CONSTR:_,TYPED:c,VIEW:u}},function(e,t,n){var r=n(14),i=n(6);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){"use strict";var r=n(9),i=n(37),o=n(6);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,c=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,s=void 0===u?n:i(u,n);s>c;)t[c++]=e;return t}},function(e,t,n){var r=n(1).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(12),i=n(9),o=n(46)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(13),i=n(45),o=n(9),a=n(6),c=n(92);e.exports=function(e,t){var n=1==e,u=2==e,s=3==e,_=4==e,l=6==e,f=5==e||l,E=t||c;return function(t,c,p){for(var d,C,h=o(t),g=i(h),I=r(c,p,3),O=a(g.length),A=0,S=n?E(t,O):u?E(t,0):void 0;O>A;A++)if((f||A in g)&&(C=I(d=g[A],A,h),e))if(n)S[A]=C;else if(C)switch(e){case 3:return!0;case 5:return d;case 6:return A;case 2:S.push(d)}else if(_)return!1;return l?-1:s||_?_:S}}},function(e,t,n){var r=n(18);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(0)("unscopables"),i=Array.prototype;null==i[r]&&n(8)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";var r=n(16),i=n(10),o=n(11),a=n(8),c=n(21),u=n(95),s=n(26),_=n(70),l=n(0)("iterator"),f=!([].keys&&"next"in[].keys()),E=function(){return this};e.exports=function(e,t,n,p,d,C,h){u(n,t,p);var g,I,O,A=function(e){if(!f&&e in N)return N[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",v="values"==d,T=!1,N=e.prototype,R=N[l]||N["@@iterator"]||d&&N[d],m=R||A(d),y=d?v?A("entries"):m:void 0,D="Array"==t&&N.entries||R;if(D&&(O=_(D.call(new e)))!==Object.prototype&&O.next&&(s(O,S,!0),r||"function"==typeof O[l]||a(O,l,E)),v&&R&&"values"!==R.name&&(T=!0,m=function(){return R.call(this)}),r&&!h||!f&&!T&&N[l]||a(N,l,m),c[t]=m,c[S]=E,d)if(g={values:v?m:A("values"),keys:C?m:A("keys"),entries:y},h)for(I in g)I in N||o(N,I,g[I]);else i(i.P+i.F*(f||T),t,g);return g}},function(e,t,n){var r=n(2);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r,i,o,a=n(13),c=n(99),u=n(69),s=n(43),_=n(1),l=_.process,f=_.setImmediate,E=_.clearImmediate,p=_.MessageChannel,d=_.Dispatch,C=0,h={},g=function(){var e=+this;if(h.hasOwnProperty(e)){var t=h[e];delete h[e],t()}},I=function(e){g.call(e.data)};f&&E||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return h[++C]=function(){c("function"==typeof e?e:Function(e),t)},r(C),C},E=function(e){delete h[e]},"process"==n(18)(l)?r=function(e){l.nextTick(a(g,e,1))}:d&&d.now?r=function(e){d.now(a(g,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=I,r=a(o.postMessage,o,1)):_.addEventListener&&"function"==typeof postMessage&&!_.importScripts?(r=function(e){_.postMessage(e+"","*")},_.addEventListener("message",I,!1)):r="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:f,clear:E}},function(e,t,n){"use strict";var r=n(35);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(3).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(4)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(13),i=n(10),o=n(9),a=n(75),c=n(52),u=n(6),s=n(108),_=n(54);i(i.S+i.F*!n(56)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,l,f=o(e),E="function"==typeof this?this:Array,p=arguments.length,d=p>1?arguments[1]:void 0,C=void 0!==d,h=0,g=_(f);if(C&&(d=r(d,p>2?arguments[2]:void 0,2)),null==g||E==Array&&c(g))for(n=new E(t=u(f.length));t>h;h++)s(n,h,C?d(f[h],h):f[h]);else for(l=g.call(f),n=new E;!(i=l.next()).done;h++)s(n,h,C?a(l,d,[i.value,h],!0):i.value);return n.length=h,n}})},function(e,t,n){n(81)("asyncIterator")},function(e,t,n){var r=n(1),i=n(15),o=n(16),a=n(82),c=n(3).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||c(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(0)},function(e,t,n){"use strict";var r=n(1),i=n(12),o=n(4),a=n(10),c=n(11),u=n(111).KEY,s=n(7),_=n(40),l=n(26),f=n(17),E=n(0),p=n(82),d=n(81),C=n(112),h=n(72),g=n(2),I=n(5),O=n(20),A=n(34),S=n(19),v=n(53),T=n(113),N=n(44),R=n(3),m=n(22),y=N.f,D=R.f,P=T.f,b=r.Symbol,w=r.JSON,L=w&&w.stringify,M=E("_hidden"),x=E("toPrimitive"),U={}.propertyIsEnumerable,K=_("symbol-registry"),j=_("symbols"),B=_("op-symbols"),F=Object.prototype,G="function"==typeof b,V=r.QObject,Y=!V||!V.prototype||!V.prototype.findChild,H=o&&s((function(){return 7!=v(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=y(F,t);r&&delete F[t],D(e,t,n),r&&e!==F&&D(F,t,r)}:D,X=function(e){var t=j[e]=v(b.prototype);return t._k=e,t},k=G&&"symbol"==typeof b.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof b},W=function(e,t,n){return e===F&&W(B,t,n),g(e),t=A(t,!0),g(n),i(j,t)?(n.enumerable?(i(e,M)&&e[M][t]&&(e[M][t]=!1),n=v(n,{enumerable:S(0,!1)})):(i(e,M)||D(e,M,S(1,{})),e[M][t]=!0),H(e,t,n)):D(e,t,n)},J=function(e,t){g(e);for(var n,r=C(t=O(t)),i=0,o=r.length;o>i;)W(e,n=r[i++],t[n]);return e},q=function(e){var t=U.call(this,e=A(e,!0));return!(this===F&&i(j,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(j,e)||i(this,M)&&this[M][e])||t)},z=function(e,t){if(e=O(e),t=A(t,!0),e!==F||!i(j,t)||i(B,t)){var n=y(e,t);return!n||!i(j,t)||i(e,M)&&e[M][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=P(O(e)),r=[],o=0;n.length>o;)i(j,t=n[o++])||t==M||t==u||r.push(t);return r},$=function(e){for(var t,n=e===F,r=P(n?B:O(e)),o=[],a=0;r.length>a;)!i(j,t=r[a++])||n&&!i(F,t)||o.push(j[t]);return o};G||(c((b=function(){if(this instanceof b)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(B,n),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),H(this,e,S(1,n))};return o&&Y&&H(F,e,{configurable:!0,set:t}),X(e)}).prototype,"toString",(function(){return this._k})),N.f=z,R.f=W,n(25).f=T.f=Z,n(36).f=q,n(59).f=$,o&&!n(16)&&c(F,"propertyIsEnumerable",q,!0),p.f=function(e){return X(E(e))}),a(a.G+a.W+a.F*!G,{Symbol:b});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)E(Q[ee++]);for(var te=m(E.store),ne=0;te.length>ne;)d(te[ne++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(K,e+="")?K[e]:K[e]=b(e)},keyFor:function(e){if(!k(e))throw TypeError(e+" is not a symbol!");for(var t in K)if(K[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!G,"Object",{create:function(e,t){return void 0===t?v(e):J(v(e),t)},defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:z,getOwnPropertyNames:Z,getOwnPropertySymbols:$}),w&&a(a.S+a.F*(!G||s((function(){var e=b();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(I(t)||void 0!==e)&&!k(e))return h(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!k(t))return t}),r[1]=t,L.apply(w,r)}}),b.prototype[x]||n(8)(b.prototype,x,b.prototype.valueOf),l(b,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(115)},function(e,t){!function(e){"use strict";e.console||(e.console={});for(var t,n,r=e.console,i=function(){},o=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=o.pop();)r[t]||(r[t]={});for(;n=a.pop();)r[n]||(r[n]=i)}("undefined"==typeof window?this:window)},function(e,t,n){"use strict";var r=n(42);n(10)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){var r=n(5),i=n(88).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){var r=n(5),i=n(2),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(13)(Function.call,n(44).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";if(n(4)){var r=n(16),i=n(1),o=n(7),a=n(10),c=n(66),u=n(90),s=n(13),_=n(51),l=n(19),f=n(8),E=n(50),p=n(14),d=n(6),C=n(67),h=n(37),g=n(34),I=n(12),O=n(32),A=n(5),S=n(9),v=n(52),T=n(53),N=n(70),R=n(25).f,m=n(54),y=n(17),D=n(0),P=n(71),b=n(64),w=n(55),L=n(27),M=n(21),x=n(56),U=n(48),K=n(68),j=n(96),B=n(3),F=n(44),G=B.f,V=F.f,Y=i.RangeError,H=i.TypeError,X=i.Uint8Array,k=Array.prototype,W=u.ArrayBuffer,J=u.DataView,q=P(0),z=P(2),Z=P(3),$=P(4),Q=P(5),ee=P(6),te=b(!0),ne=b(!1),re=L.values,ie=L.keys,oe=L.entries,ae=k.lastIndexOf,ce=k.reduce,ue=k.reduceRight,se=k.join,_e=k.sort,le=k.slice,fe=k.toString,Ee=k.toLocaleString,pe=D("iterator"),de=D("toStringTag"),Ce=y("typed_constructor"),he=y("def_constructor"),ge=c.CONSTR,Ie=c.TYPED,Oe=c.VIEW,Ae=P(1,(function(e,t){return Re(w(e,e[he]),t)})),Se=o((function(){return 1===new X(new Uint16Array([1]).buffer)[0]})),ve=!!X&&!!X.prototype.set&&o((function(){new X(1).set({})})),Te=function(e,t){var n=p(e);if(n<0||n%t)throw Y("Wrong offset!");return n},Ne=function(e){if(A(e)&&Ie in e)return e;throw H(e+" is not a typed array!")},Re=function(e,t){if(!(A(e)&&Ce in e))throw H("It is not a typed array constructor!");return new e(t)},me=function(e,t){return ye(w(e,e[he]),t)},ye=function(e,t){for(var n=0,r=t.length,i=Re(e,r);r>n;)i[n]=t[n++];return i},De=function(e,t,n){G(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,o,a,c=S(e),u=arguments.length,_=u>1?arguments[1]:void 0,l=void 0!==_,f=m(c);if(null!=f&&!v(f)){for(a=f.call(c),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);c=r}for(l&&u>2&&(_=s(_,arguments[2],2)),t=0,n=d(c.length),i=Re(this,n);n>t;t++)i[t]=l?_(c[t],t):c[t];return i},be=function(){for(var e=0,t=arguments.length,n=Re(this,t);t>e;)n[e]=arguments[e++];return n},we=!!X&&o((function(){Ee.call(new X(1))})),Le=function(){return Ee.apply(we?le.call(Ne(this)):Ne(this),arguments)},Me={copyWithin:function(e,t){return j.call(Ne(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Ne(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return K.apply(Ne(this),arguments)},filter:function(e){return me(this,z(Ne(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Ne(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Ne(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){q(Ne(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Ne(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Ne(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return se.apply(Ne(this),arguments)},lastIndexOf:function(e){return ae.apply(Ne(this),arguments)},map:function(e){return Ae(Ne(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ce.apply(Ne(this),arguments)},reduceRight:function(e){return ue.apply(Ne(this),arguments)},reverse:function(){for(var e,t=Ne(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return _e.call(Ne(this),e)},subarray:function(e,t){var n=Ne(this),r=n.length,i=h(e,r);return new(w(n,n[he]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,d((void 0===t?r:h(t,r))-i))}},xe=function(e,t){return me(this,le.call(Ne(this),e,t))},Ue=function(e){Ne(this);var t=Te(arguments[1],1),n=this.length,r=S(e),i=d(r.length),o=0;if(i+t>n)throw Y("Wrong length!");for(;o255?255:255&r),i.v[E](n*t+i.o,r,Se)}(this,n,e)},enumerable:!0})};I?(p=n((function(e,n,r,i){_(e,p,s,"_d");var o,a,c,u,l=0,E=0;if(A(n)){if(!(n instanceof W||"ArrayBuffer"==(u=O(n))||"SharedArrayBuffer"==u))return Ie in n?ye(p,n):Pe.call(p,n);o=n,E=Te(r,t);var h=n.byteLength;if(void 0===i){if(h%t)throw Y("Wrong length!");if((a=h-E)<0)throw Y("Wrong length!")}else if((a=d(i)*t)+E>h)throw Y("Wrong length!");c=a/t}else c=C(n),o=new W(a=c*t);for(f(e,"_d",{b:o,o:E,l:a,e:c,v:new J(o)});l>1,_=23===t?N(2,-24)-N(2,-77):0,l=0,f=e<0||0===e&&1/e<0?1:0;for((e=T(e))!=e||e===S?(i=e!=e?1:0,r=u):(r=R(m(e)/y),e*(o=N(2,-r))<1&&(r--,o*=2),(e+=r+s>=1?_/o:_*N(2,1-s))*o>=2&&(r++,o/=2),r+s>=u?(i=0,r=u):r+s>=1?(i=(e*o-1)*N(2,t),r+=s):(i=e*N(2,s-1)*N(2,t),r=0));t>=8;a[l++]=255&i,i/=256,t-=8);for(r=r<0;a[l++]=255&r,r/=256,c-=8);return a[--l]|=128*f,a}function L(e,t,n){var r,i=8*n-t-1,o=(1<>1,c=i-7,u=n-1,s=e[u--],_=127&s;for(s>>=7;c>0;_=256*_+e[u],u--,c-=8);for(r=_&(1<<-c)-1,_>>=-c,c+=t;c>0;r=256*r+e[u],u--,c-=8);if(0===_)_=1-a;else{if(_===o)return r?NaN:s?-S:S;r+=N(2,t),_-=a}return(s?-1:1)*r*N(2,_-t)}function M(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function x(e){return[255&e]}function U(e){return[255&e,e>>8&255]}function K(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function j(e){return w(e,52,8)}function B(e){return w(e,23,4)}function F(e,t,n){d(e.prototype,t,{get:function(){return this[n]}})}function G(e,t,n,r){var i=E(+n);if(i+t>e[P])throw A("Wrong index!");var o=e[D]._b,a=i+e[b],c=o.slice(a,a+t);return r?c:c.reverse()}function V(e,t,n,r,i,o){var a=E(+n);if(a+t>e[P])throw A("Wrong index!");for(var c=e[D]._b,u=a+e[b],s=r(+i),_=0;_k;)(Y=X[k++])in g||c(g,Y,v[Y]);o||(H.constructor=g)}var W=new I(new g(2)),J=I.prototype.setInt8;W.setInt8(0,2147483648),W.setInt8(1,2147483649),!W.getInt8(0)&&W.getInt8(1)||u(I.prototype,{setInt8:function(e,t){J.call(this,e,t<<24>>24)},setUint8:function(e,t){J.call(this,e,t<<24>>24)}},!0)}else g=function(e){_(this,g,"ArrayBuffer");var t=E(e);this._b=C.call(new Array(t),0),this[P]=t},I=function(e,t,n){_(this,I,"DataView"),_(e,g,"DataView");var r=e[P],i=l(t);if(i<0||i>r)throw A("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw A("Wrong length!");this[D]=e,this[b]=i,this[P]=n},i&&(F(g,"byteLength","_l"),F(I,"buffer","_b"),F(I,"byteLength","_l"),F(I,"byteOffset","_o")),u(I.prototype,{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return M(G(this,4,e,arguments[1]))},getUint32:function(e){return M(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){V(this,1,e,x,t)},setUint8:function(e,t){V(this,1,e,x,t)},setInt16:function(e,t){V(this,2,e,U,t,arguments[2])},setUint16:function(e,t){V(this,2,e,U,t,arguments[2])},setInt32:function(e,t){V(this,4,e,K,t,arguments[2])},setUint32:function(e,t){V(this,4,e,K,t,arguments[2])},setFloat32:function(e,t){V(this,4,e,B,t,arguments[2])},setFloat64:function(e,t){V(this,8,e,j,t,arguments[2])}});h(g,"ArrayBuffer"),h(I,"DataView"),c(I.prototype,a.VIEW,!0),t.ArrayBuffer=g,t.DataView=I},function(e,t,n){var r=n(3),i=n(2),o=n(22);e.exports=n(4)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),c=a.length,u=0;c>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(93);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(5),i=n(72),o=n(0)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(53),i=n(19),o=n(26),a={};n(8)(a,n(0)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(9),i=n(37),o=n(6);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),c=i(e,a),u=i(t,a),s=arguments.length>2?arguments[2]:void 0,_=Math.min((void 0===s?a:i(s,a))-u,a-c),l=1;for(u0;)u in n?n[c]=n[u]:delete n[c],c+=l,u+=l;return n}},function(e,t,n){n(4)&&"g"!=/./g.flags&&n(3).f(RegExp.prototype,"flags",{configurable:!0,get:n(33)})},function(e,t,n){var r=n(13),i=n(75),o=n(52),a=n(2),c=n(6),u=n(54),s={},_={};(t=e.exports=function(e,t,n,l,f){var E,p,d,C,h=f?function(){return e}:u(e),g=r(n,l,t?2:1),I=0;if("function"!=typeof h)throw TypeError(e+" is not iterable!");if(o(h)){for(E=c(e.length);E>I;I++)if((C=t?g(a(p=e[I])[0],p[1]):g(e[I]))===s||C===_)return C}else for(d=h.call(e);!(p=d.next()).done;)if((C=i(d,g,p.value,t))===s||C===_)return C}).BREAK=s,t.RETURN=_},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(1),i=n(76).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,c=r.Promise,u="process"==n(18)(a);e.exports=function(){var e,t,n,s=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(s)};else if(!o||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var _=c.resolve(void 0);n=function(){_.then(s)}}else n=function(){i.call(r,s)};else{var l=!0,f=document.createTextNode("");new o(s).observe(f,{characterData:!0}),n=function(){f.data=l=!l}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(1).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){var r=n(2),i=n(5),o=n(77);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(65),i=n(2),o=n(55),a=n(38),c=n(6),u=n(39),s=n(42),_=n(7),l=Math.min,f=[].push,E=!_((function(){RegExp(4294967295,"y")}));n(41)("split",2,(function(e,t,n,_){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,c,u=[],_=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,E=void 0===t?4294967295:t>>>0,p=new RegExp(e.source,_+"g");(o=s.call(p,i))&&!((a=p.lastIndex)>l&&(u.push(i.slice(l,o.index)),o.length>1&&o.index=E));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!c&&p.test("")||u.push(""):u.push(i.slice(l)),u.length>E?u.slice(0,E):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):p.call(String(i),n,r)},function(e,t){var r=_(p,e,this,t,p!==n);if(r.done)return r.value;var s=i(e),f=String(this),d=o(s,RegExp),C=s.unicode,h=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(E?"y":"g"),g=new d(E?s:"^(?:"+s.source+")",h),I=void 0===t?4294967295:t>>>0;if(0===I)return[];if(0===f.length)return null===u(g,f)?[f]:[];for(var O=0,A=0,S=[];A1?arguments[1]:void 0)}}),n(73)("find")},function(e,t,n){var r=n(9),i=n(22);n(107)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(10),i=n(15),o=n(7);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(e,t,n){"use strict";var r=n(3),i=n(19);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(10);r(r.S+r.F,"Object",{assign:n(110)})},function(e,t,n){"use strict";var r=n(22),i=n(59),o=n(36),a=n(9),c=n(45),u=Object.assign;e.exports=!u||n(7)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=a(e),u=arguments.length,s=1,_=i.f,l=o.f;u>s;)for(var f,E=c(arguments[s++]),p=_?r(E).concat(_(E)):r(E),d=p.length,C=0;d>C;)l.call(E,f=p[C++])&&(n[f]=E[f]);return n}:u},function(e,t,n){var r=n(17)("meta"),i=n(5),o=n(12),a=n(3).f,c=0,u=Object.isExtensible||function(){return!0},s=!n(7)((function(){return u(Object.preventExtensions({}))})),_=function(e){a(e,r,{value:{i:"O"+ ++c,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";_(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;_(e)}return e[r].w},onFreeze:function(e){return s&&l.NEED&&u(e)&&!o(e,r)&&_(e),e}}},function(e,t,n){var r=n(22),i=n(59),o=n(36);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,c=n(e),u=o.f,s=0;c.length>s;)u.call(e,a=c[s++])&&t.push(a);return t}},function(e,t,n){var r=n(20),i=n(25).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(80),core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(83),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(28),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(78),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(23),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(24),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(29),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6__);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){if(!window.cadesplugin){var pluginObject,plugin_resolved=0,plugin_reject,plugin_resolve,isOpera=0,isFireFox=0,isSafari=0,isYandex=0,canPromise=!!window.Promise,cadesplugin;cadesplugin=canPromise?new Promise((function(e,t){plugin_resolve=e,plugin_reject=t})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,t){var n=ru_cryptopro_npcades_10_native_bridge.callbacks[e];n&&n.apply(null,t)},call:function(e,t,n){var r=n&&"function"==typeof n,i=r?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;r&&(ru_cryptopro_npcades_10_native_bridge.callbacks[i]=n);var o=document.createElement("IFRAME"),a=new Array("_CPNP_handle");try{o.setAttribute("src","cpnp-js-call:"+e+":"+i+":"+encodeURIComponent(JSON.stringify(t,a)))}catch(e){alert(e)}document.documentElement.appendChild(o),o.parentNode.removeChild(o),o=null}};cadesplugin.JSModuleVersion="2.3.0",cadesplugin.async_spawn=async_spawn,cadesplugin.set=set_pluginObject,cadesplugin.set_log_level=set_log_level,cadesplugin.getLastError=getLastError,cadesplugin.is_capilite_enabled=is_capilite_enabled,isNativeMessageSupported()&&(cadesplugin.CreateObjectAsync=CreateObjectAsync,cadesplugin.ReleasePluginObjects=ReleasePluginObjects),isNativeMessageSupported()||(cadesplugin.CreateObject=CreateObject),window.cadesplugin_load_timeout?setTimeout(check_load_timeout,window.cadesplugin_load_timeout):setTimeout(check_load_timeout,2e4),set_constantValues(),cadesplugin.current_log_level=cadesplugin.LOG_LEVEL_ERROR,window.cadesplugin=cadesplugin,check_plugin_working()}function check_browser(){var e,t=navigator.userAgent,n=t.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===n[1]&&null!=(e=t.match(/\b(OPR|Edg|YaBrowser)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})}function cpcsp_console_log(e,t){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",t),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",t),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",t))):void 0}function set_log_level(e){e===cadesplugin.LOG_LEVEL_DEBUG||e===cadesplugin.LOG_LEVEL_INFO||e===cadesplugin.LOG_LEVEL_ERROR?(cadesplugin.current_log_level=e,cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = DEBUG"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = INFO"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = ERROR"),isNativeMessageSupported()&&(cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&window.postMessage("set_log_level=debug","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&window.postMessage("set_log_level=info","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&window.postMessage("set_log_level=error","*"))):cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,"cadesplugin_api.js: Incorrect log_level: "+e)}function set_constantValues(){cadesplugin.CAPICOM_MEMORY_STORE=0,cadesplugin.CAPICOM_LOCAL_MACHINE_STORE=1,cadesplugin.CAPICOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_MEMORY_STORE=0,cadesplugin.CADESCOM_LOCAL_MACHINE_STORE=1,cadesplugin.CADESCOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_CONTAINER_STORE=100,cadesplugin.CAPICOM_MY_STORE="My",cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED=0,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE=2,cadesplugin.CADESCOM_XADES_DEFAULT=16,cadesplugin.CADESCOM_XADES_BES=32,cadesplugin.CADESCOM_XADES_T=80,cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1=1488,cadesplugin.CADESCOM_XMLDSIG_TYPE=0,cadesplugin.XmlDsigGost3410UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr3411",cadesplugin.XmlDsigGost3410Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411",cadesplugin.XmlDsigGost3411Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256",cadesplugin.XmlDsigGost3410Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256",cadesplugin.XmlDsigGost3411Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512",cadesplugin.XmlDsigGost3410Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512",cadesplugin.CADESCOM_CADES_DEFAULT=0,cadesplugin.CADESCOM_CADES_BES=1,cadesplugin.CADESCOM_CADES_T=5,cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1=93,cadesplugin.CADESCOM_PKCS7_TYPE=65535,cadesplugin.CADESCOM_ENCODE_BASE64=0,cadesplugin.CADESCOM_ENCODE_BINARY=1,cadesplugin.CADESCOM_ENCODE_ANY=-1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT=0,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN=1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY=2,cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME=0,cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH=0,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME=3,cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME=4,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION=5,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY=6,cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY=7,cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY=8,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID=9,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID=10,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED=11,cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE=12,cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE=128,cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE=9,cadesplugin.CAPICOM_OID_OTHER=0,cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION=10,cadesplugin.CAPICOM_EKU_CLIENT_AUTH=2,cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON=5,cadesplugin.CAPICOM_EKU_OTHER=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_ATTRIBUTE_OTHER=-1,cadesplugin.CADESCOM_STRING_TO_UCS2LE=0,cadesplugin.CADESCOM_BASE64_TO_BINARY=1,cadesplugin.CADESCOM_DISPLAY_DATA_NONE=0,cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT=1,cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2=0,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4=1,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES=3,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES=4,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89=25,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1=0,cadesplugin.CADESCOM_HASH_ALGORITHM_MD2=1,cadesplugin.CADESCOM_HASH_ALGORITHM_MD4=2,cadesplugin.CADESCOM_HASH_ALGORITHM_MD5=3,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256=4,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384=5,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512=6,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411=100,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256=101,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512=102,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC=110,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC=111,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC=112,cadesplugin.LOG_LEVEL_DEBUG=4,cadesplugin.LOG_LEVEL_INFO=2,cadesplugin.LOG_LEVEL_ERROR=1,cadesplugin.CADESCOM_AllowNone=0,cadesplugin.CADESCOM_AllowNoOutstandingRequest=1,cadesplugin.CADESCOM_AllowUntrustedCertificate=2,cadesplugin.CADESCOM_AllowUntrustedRoot=4,cadesplugin.CADESCOM_SkipInstallToStore=268435456,cadesplugin.ENABLE_CARRIER_TYPE_CSP=1,cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM=2,cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM=4,cadesplugin.ENABLE_ANY_CARRIER_TYPE=7,cadesplugin.DISABLE_EVERY_CARRIER_OPERATION=0,cadesplugin.ENABLE_CARRIER_OPEN_ENUM=1,cadesplugin.ENABLE_CARRIER_CREATE=2,cadesplugin.ENABLE_ANY_OPERATION=3,cadesplugin.CADESCOM_PRODUCT_CSP=0,cadesplugin.CADESCOM_PRODUCT_OCSP=1,cadesplugin.CADESCOM_PRODUCT_TSP=2,cadesplugin.MEDIA_TYPE_REGISTRY=1,cadesplugin.MEDIA_TYPE_HDIMAGE=2,cadesplugin.MEDIA_TYPE_CLOUD=4,cadesplugin.MEDIA_TYPE_SCARD=8}function async_spawn(e){function t(e,t){var o;try{o=n[e](t)}catch(e){return Promise.reject(e)}return o.done?o.value:Promise.resolve(o.value).then(r,i)}var n=e(Array.prototype.slice.call(arguments,1)),r=t.bind(t,"next"),i=t.bind(t,"throw");return r()}function isIE(){return"IE"===browserSpecs.name||"MSIE"===browserSpecs.name}function isIOS(){return navigator.userAgent.match(/ipod/i)||navigator.userAgent.match(/ipad/i)||navigator.userAgent.match(/iphone/i)}function isNativeMessageSupported(){return!isIE()&&("Edg"===browserSpecs.name||("YaBrowser"===browserSpecs.name?(isYandex=!0,!0):"Opera"===browserSpecs.name?(isOpera=!0,browserSpecs.version>=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="",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 firefox_or_safari_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||isSafari){var t=e.data.substring(e.data.indexOf("url:")+4),n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",t),n.onerror=plugin_loaded_error,n.onload=firefox_or_safari_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(n)}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}),!1)}function load_extension(){var e;isFireFox||isSafari?nmcades_api_onload():isOpera||isYandex?((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)):((e=document.createElement("script")).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))}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 n=document.createElement("object");n.setAttribute("id","webClassFactory"),n.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),n.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(n)}}function plugin_loaded(){plugin_resolved=1,canPromise?plugin_resolve():window.postMessage("cadesplugin_loaded","*")}function plugin_loaded_error(e){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]>1?new Error("Подключено "+i.length+" токена(ов)"):new Error("Нет подключенных токенов");t=i.shift();var o=e.getPluginVersion(),a=e.getTokenInfo(t);r({version:o,serial:a[0],flags:a[1],label:a[2],type:a[3]})}catch(e){var c=n();throw new Error(e.message||c)}}))}))},this.bind=function(r){return new Promise((function(i){try{if(1===e.getLoggedInState().shift())i();else if(r)e.bindTokenAsync(t,r,(function(e){if(e&&"Error"==e[0]){var t=n(e[1]);throw new Error(t)}i()}));else{if(!e.bindTokenUI(t))throw new Error("Пользователь отменил ввод PIN-кода");i()}}catch(e){var o=n();throw new Error(o||e.message)}}))},this.unbind=function(){return new Promise((function(t){try{1===e.getLoggedInState().shift()&&e.unbindToken(),t()}catch(e){var r=n();throw new Error(r||e.message)}}))},this.clean=function(){return new Promise((function(r){try{var i=e.getCertificateList(t);for(var o in i){var a=i[o].shift();e.deleteContainerOrCertificate(a)}r(o)}catch(e){var c=n();throw new Error(c||e.message)}}))},this.generateCSR=function(t,r,i,o){return i&&i.length||(i=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),o||(o="XA"),new Promise((function(a){try{e.createContainerAsync(o,r,(function(r){if(r&&"Error"==r[0]){var o=n(r[1]);throw new Error(o)}var c=r,s=[];for(var _ in t)t.hasOwnProperty(_)&&s.push(_,t[_]);var l=["certificatePolicies","1.2.643.100.113.1","keyUsage","digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment","extendedKeyUsage",i.toString(),"1.2.643.100.111",'ASN1:FORMAT:UTF8,UTF8:"Криптотокен" (АЛАДДИН Р.Д.)'];e.genCSRAsync(c,s,l,(function(e){if(e&&"Error"==e[0]){var t=n(e[1]);throw new Error(t)}var r=btoa(String.fromCharCode.apply(null,new Uint8Array(e)));a({csr:u(r),containerId:c})}))}))}catch(e){var c=n();throw new Error(c||e.message)}}))},this.writeCertificate=function(t,r){return new Promise((function(i){try{for(var o=[],a=atob(t),c=0;c=u.Data.Validity["Not Before"]&&p<=u.Data.Validity["Not After"],toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}})}catch(e){var d=n();throw new Error(d||e.message)}}))},this.listCertificates=function(){return new Promise((function(i){try{e.getCertificateListAsync(t,(function(o){if(o&&"Error"==o[0]){var a=n(o[1]);throw new Error(a)}for(var c=[],u=0;u1?new Error("Подключено "+r.length+" токена(ов)"):new Error("Нет подключенных токенов");t(r.shift().id)}))})).then((function(r){return t=r,new Promise((function(r,i){e.getTokenInfo({args:{tokenID:t},onSuccess:r,onError:n(i)})}))})).then((function(e){return Object.assign(r,e)}))},this.bind=function(r){return new Promise((function(t,r){e.getLoggedInState({onSuccess:t,onError:n(r)})})).then((function(i){return i.state===JCWebClient2.Vars.AuthState.binded&&i.tokenID===t||new Promise((function(i,o){var a={tokenID:t};r?a.pin=r:a.useUI=!0,e.bindToken({args:a,onSuccess:i,onError:n(o)})}))}))},this.unbind=function(){return new Promise((function(t,r){e.getLoggedInState({onSuccess:t,onError:n(r)})})).then((function(t){return t.state===JCWebClient2.Vars.AuthState.notBinded||new Promise((function(t,r){e.unbindToken({onSuccess:t,onError:n(r)})}))}))},this.clean=function(){return new Promise((function(r,i){e.getContainerList({args:{tokenID:t},onSuccess:r,onError:n(i)})})).then((function(t){var r=Promise.resolve();for(var i in t)r=r.then((function(){return new Promise((function(r,o){e.deletePKIObject({args:{id:t[i].id},onSuccess:r,onError:n(o)})}))}));return r}))},this.generateCSR=function(t,r,i,o){i&&i.length||(i=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),o||(o=JCWebClient2.Vars.KeyAlgorithm.GOST_2012_256);var a,c={certificatePolicies:"1.2.643.100.113.1",keyUsage:"digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment",extendedKeyUsage:i.toString(),"1.2.643.100.111":'ASN1:FORMAT:UTF8,UTF8:"Криптотокен" (АЛАДДИН Р.Д.)'};return new Promise((function(t,i){e.createKeyPair({args:{paramSet:"XA",description:r,algorithm:o},onSuccess:t,onError:n(i)})})).then((function(r){return a=r,new Promise((function(r,i){e.genCSR({args:{id:a,dn:t,exts:c},onSuccess:r,onError:n(i)})}))})).then((function(e){return{csr:s(btoa(String.fromCharCode.apply(null,new Uint8Array(e)))),keyPairId:a}}))},this.writeCertificate=function(t,r){return new Promise((function(i,o){e.writeUserCertificate({args:{keyPairID:r,cert:t},onSuccess:i,onError:n(o)})}))},this.certificateInfo=function(i){return new Promise((function(r,o){e.parseX509Certificate({args:{tokenID:t,id:i},onSuccess:r,onError:n(o)})})).then((function(e){var t=r(e.Data.Subject),n=r(e.Data.Issuer),i=new Date;return{Name:t.CN,Issuer:n,IssuerName:u(n.toString()),Subject:t,SubjectName:u(t.toString()),Version:e.Data.Version,SerialNumber:e.Data["Serial Number"].map(a).join(""),Thumbprint:e.Signature.map(a).join(""),ValidFromDate:e.Data.Validity["Not Before"],ValidToDate:e.Data.Validity["Not After"],HasPrivateKey:!0,IsValid:i>=e.Data.Validity["Not Before"]&&i<=e.Data.Validity["Not After"],Algorithm:e.Data["Subject Public Key Info"]["Public Key Algorithm"],toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nАлгоритм: "+this.Algorithm+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}}}))},this.listCertificates=function(){return new Promise((function(r,i){e.getContainerList({args:{tokenID:t},onSuccess:r,onError:n(i)})})).then((function(r){for(var i=[],a=Promise.resolve(),c=0;c=0}function a(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e)return t.Certificates.then((function(e){return n=e,e.Count})).then((function(e){for(var t=[],r=1;r<=e;r++)t.push(n.Item(r));return Promise.all(t)})).then((function(e){var t=[];for(var n in e)t.push(e[n].SubjectName,e[n].Thumbprint);return Promise.all(t)})).then((function(e){for(var t=[],n=0;n>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}this.init=function(){return window.cadesplugin_skip_extension_install=!0,window.allow_firefox_cadesplugin_async=!0,n(114),e=!!cadesplugin.CreateObjectAsync,new Promise((function(e){if(!window.cadesplugin)throw new Error("КриптоПро ЭЦП Browser plug-in не обнаружен");e()})).then((function(){return e?cadesplugin.then((function(){return cadesplugin.CreateObjectAsync("CAdESCOM.About")})).then((function(e){return e.Version})).then((function(e){return t=e,{version:e}})).catch((function(e){var t=_(e);throw new Error(t)})):new Promise((function(e){try{var n=cadesplugin.CreateObject("CAdESCOM.About");if(!n||!n.Version)throw new Error("КриптоПро ЭЦП Browser plug-in не загружен");e({version:t=n.Version})}catch(e){var r=_(e);throw new Error(r)}}))}))},this.bind=function(e){return r=!0,Promise.resolve(r)},this.unbind=function(){return r=!1,Promise.resolve(r)},this.generateCSR=function(t,n,r,i){var o,a,c,u,s,l,A,v,T,N,m,y,D;return r&&r.length||(r=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),i||(i=S),e?cadesplugin.then((function(){return Promise.all([cadesplugin.CreateObjectAsync("X509Enrollment.CX509Enrollment"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509CertificateRequestPkcs10"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509PrivateKey"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509ExtensionKeyUsage"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509ExtensionEnhancedKeyUsage"),cadesplugin.CreateObjectAsync("X509Enrollment.CObjectIds"),cadesplugin.CreateObjectAsync("X509Enrollment.CX500DistinguishedName"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509Extensions"),cadesplugin.CreateObjectAsync("X509Enrollment.CCspInformations"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509Extension")])})).then((function(e){return o=e[0],a=e[1],c=e[2],s=e[3],l=e[4],A=e[5],N=e[6],u=e[7],m=e[8],D=e[9],m.AddAvailableCsps()})).then((function(){return m.Count})).then((function(e){if(!e)throw new Error("No CSP informations!");for(var t=[],n=0;n1)throw new Error("Подключено "+r+" устройств")}return Promise.all([e.getDeviceInfo(t,e.TOKEN_INFO_READER),e.getDeviceInfo(t,e.TOKEN_INFO_LABEL),e.getDeviceInfo(t,e.TOKEN_INFO_SERIAL),e.getDeviceModel(t),e.getDeviceType(t)])})).then((function(t){return{version:e.version,serial:t[2],reader:t[0],label:t[1].indexOf("Rutoken ECP ")+1?"":t[1],type:t[4],model:t[3]}})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.bind=function(r){return new Promise((function(i,o){e.getDeviceInfo(t,e.TOKEN_INFO_IS_LOGGED_IN).then((function(e){if(e)return i("Пользователь уже авторизован"),!1;if(!r&&!(r=prompt("PIN-код доступа к устройству")))throw new Error("Авторизация на устройстве отменена пользователем");return!0})).then((function(n){if(n)return e.login(t,r).then((function(e){i(!0)}));i(!0)})).then(null,(function(e){var t=n(e);o(t)}))}))},this.unbind=function(){return new Promise((function(r,i){e.getDeviceInfo(t,e.TOKEN_INFO_IS_LOGGED_IN).then((function(e){return!!e||(r("Пользователь не авторизован"),!1)})).then((function(n){return!n||e.logout(t).then((function(e){r(!0)}))})).then(null,(function(e){var t=n(e);i(t)}))}))},this.clean=function(){var r=0;return e.enumerateCertificates(t,e.CERT_CATEGORY_USER).then((function(n){var i=[];for(var o in n){var a=n[o];i.push(e.deleteCertificate(t,a))}return r+=i.length,Promise.all(i)})).then((function(){return e.enumerateKeys(t,"")})).then((function(n){var i=[];for(var o in n){var a=n[o];i.push(e.deleteKeyPair(t,a))}return r+=i.length,Promise.all(i)})).then((function(){return r})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.generateCSR=function(r,i,o,c){var u="";i||(i=""),o&&o.length||(o=["clientAuth","emailProtection"]);var s=c&&e[c]||e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256,_="XA",l=e.HASH_TYPE_GOST3411_94;s===e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_512?(_="A",l=e.HASH_TYPE_GOST3411_12_512):s===e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256&&(l=e.HASH_TYPE_GOST3411_12_256);var f={publicKeyAlgorithm:s,paramset:_};return e.generateKeyPair(t,void 0,i,f).then((function(n){u=n;var i=[];for(var a in r)r.hasOwnProperty(a)&&i.push({rdn:a,value:r[a]});var c={keyUsage:["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment"],extKeyUsage:o},s={subjectSignTool:'СКЗИ "РУТОКЕН ЭЦП"',hashAlgorithm:l};return e.createPkcs10(t,u,i,c,s)})).then((function(e){return{csr:a(e),keyPairId:u}})).then(null,(function(r){u&&e.deleteKeyPair(t,u);var i=n(r);throw new Error(i)}))},this.writeCertificate=function(r){var i=e.CERT_CATEGORY_USER;return e.importCertificate(t,r,i).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.certificateInfo=function(i){var o=!1,a="";return new Promise((function(r){e.getKeyByCertificate(t,i).then((function(e){r(!!e)})).then(null,(function(e){var t=n(e);console.log("getKeyByCertificate",i,t),r(!1)}))})).then((function(n){return o=n,e.getCertificateInfo(t,i,e.CERT_INFO_SERIAL_NUMBER)})).then((function(n){return a=n,e.parseCertificate(t,i)})).then((function(e){var t=e.text.match(/Version: (\d+)/),n=t.length>1?t[1]:void 0,c=e.text.match(/Public Key Algorithm: (.+)$/m),s=c.length>1?c[1]:"",_=r(e.subject),l=r(e.issuer),f=new Date;return{Name:_.commonName||_.CN,Issuer:l,IssuerName:u(l.toString()),Subject:_,SubjectName:u(_.toString()),Version:n,Algorithm:s,SerialNumber:a,Thumbprint:i.replace(/\:/g,""),ValidFromDate:new Date(e.validNotBefore),ValidToDate:new Date(e.validNotAfter),HasPrivateKey:o,IsValid:f>=new Date(e.validNotBefore)&&f<=new Date(e.validNotAfter),toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nАлгоритм: "+this.Algorithm+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет (или не выполнен вход)")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}}})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.listCertificates=function(){var r=[],i=[];return e.enumerateCertificates(t,e.CERT_CATEGORY_USER).then((function(n){r=n;var i=[];for(var o in r)i.push(e.parseCertificate(t,r[o]));return Promise.all(i)})).then((function(e){for(var t in r)i.push({id:r[t],name:o(e[t])});return i})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.readCertificate=function(r){return e.getCertificate(t,r).then((function(e){return a(e)})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.signData=function(r,i){return e.sign(t,i,r,e.DATA_FORMAT_BASE64,{detached:!0}).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.addSign=function(r,i,o){var a=i;return e.sign(t,o,r,e.DATA_FORMAT_BASE64,{detached:!0,CMS:a}).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.verifySign=function(r,i){var o=r;return e.verify(t,i,{data:o,base64:!0,verifyCertificate:!1}).then((function(e){if(!e)throw new Error("подпись не верна");return!0})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.encryptData=function(r,i){return e.getCertificate(t,i).then((function(n){return e.cmsEncrypt(t,"",[n],r,{base64:!0})})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.decryptData=function(r,i){return e.getKeyByCertificate(t,i).then((function(n){return e.cmsDecrypt(t,n,r,{base64:!0})})).then(null,(function(e){var t=n(e);throw new Error(t)}))}};n.d(t,"DN",(function(){return i})),n.d(t,"JaCarta",(function(){return s})),n.d(t,"JaCarta2",(function(){return l})),n.d(t,"CryptoPro",(function(){return N})),n.d(t,"RuToken",(function(){return P}))}])})); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RusCryptoJS",[],t):"object"==typeof exports?exports.RusCryptoJS=t():e.RusCryptoJS=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t,n){var r=n(40)("wks"),i=n(17),o=n(1).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(2),i=n(61),o=n(34),a=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(14),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(3),i=n(19);e.exports=n(4)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(31);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(1),i=n(15),o=n(8),a=n(11),c=n(13),u=function(e,t,n){var s,_,l,f,E=e&u.F,p=e&u.G,d=e&u.S,C=e&u.P,h=e&u.B,g=p?r:d?r[t]||(r[t]={}):(r[t]||{}).prototype,O=p?i:i[t]||(i[t]={}),A=O.prototype||(O.prototype={});for(s in p&&(n=t),n)l=((_=!E&&g&&void 0!==g[s])?g:n)[s],f=h&&_?c(l,r):C&&"function"==typeof l?c(Function.call,l):l,g&&a(g,s,l,e&u.U),O[s]!=l&&o(O,s,f),C&&A[s]!=l&&(A[s]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(1),i=n(8),o=n(12),a=n(17)("src"),c=Function.toString,u=(""+c).split("toString");n(15).inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,c){var s="function"==typeof n;s&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(s&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:c?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||c.call(this)}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(35);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){var n=e.exports={version:"2.6.3"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(45),i=n(31);e.exports=function(e){return r(i(e))}},function(e,t){e.exports={}},function(e,t,n){var r=n(63),i=n(47);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(2),i=n(9),o=n(6),a=n(14),c=n(38),u=n(39),s=Math.max,_=Math.min,l=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,E=/\$([$&`']|\d\d?)/g;n(41)("replace",2,(function(e,t,n,p){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=p(n,e,this,t);if(i.done)return i.value;var l=r(e),f=String(this),E="function"==typeof t;E||(t=String(t));var C=l.global;if(C){var h=l.unicode;l.lastIndex=0}for(var g=[];;){var O=u(l,f);if(null===O)break;if(g.push(O),!C)break;""===String(O[0])&&(l.lastIndex=c(f,o(l.lastIndex),h))}for(var A,I="",S=0,v=0;v=S&&(I+=f.slice(S,N)+D,S=N+T.length)}return I+f.slice(S)}];function d(e,t,r,o,a,c){var u=r+e.length,s=o.length,_=E;return void 0!==a&&(a=i(a),_=f),n.call(c,_,(function(n,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var _=+i;if(0===_)return n;if(_>s){var f=l(_/10);return 0===f?n:f<=s?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):n}c=o[_-1]}return void 0===c?"":c}))}}))},function(e,t,n){"use strict";var r=n(2),i=n(6),o=n(38),a=n(39);n(41)("match",1,(function(e,t,n,c){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=c(n,e,this);if(t.done)return t.value;var u=r(e),s=String(this);if(!u.global)return a(u,s);var _=u.unicode;u.lastIndex=0;for(var l,f=[],E=0;null!==(l=a(u,s));){var p=String(l[0]);f[E]=p,""===p&&(u.lastIndex=o(s,i(u.lastIndex),_)),E++}return 0===E?null:f}]}))},function(e,t,n){var r=n(63),i=n(47).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(3).f,i=n(12),o=n(0)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(73),i=n(94),o=n(21),a=n(20);e.exports=n(74)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";n(97);var r=n(2),i=n(33),o=n(4),a=/./.toString,c=function(e){n(11)(RegExp.prototype,"toString",e,!0)};n(7)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?c((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=a.name&&c((function(){return a.call(this)}))},function(e,t,n){"use strict";var r,i,o,a,c=n(16),u=n(1),s=n(13),_=n(32),l=n(10),f=n(5),E=n(35),p=n(51),d=n(98),C=n(55),h=n(76).set,g=n(100)(),O=n(77),A=n(101),I=n(102),S=n(103),v=u.TypeError,T=u.process,N=T&&T.versions,R=N&&N.v8||"",m=u.Promise,y="process"==_(T),P=function(){},D=i=O.f,b=!!function(){try{var e=m.resolve(1),t=(e.constructor={})[n(0)("species")]=function(e){e(P,P)};return(y||"function"==typeof PromiseRejectionEvent)&&e.then(P)instanceof t&&0!==R.indexOf("6.6")&&-1===I.indexOf("Chrome/66")}catch(e){}}(),w=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;g((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,c=i?t.ok:t.fail,u=t.resolve,s=t.reject,_=t.domain;try{c?(i||(2==e._h&&U(e),e._h=1),!0===c?n=r:(_&&_.enter(),n=c(r),_&&(_.exit(),a=!0)),n===t.promise?s(v("Promise-chain cycle")):(o=w(n))?o.call(n,u,s):u(n)):s(r)}catch(e){_&&!a&&_.exit(),s(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&M(e)}))}},M=function(e){h.call(u,(function(){var t,n,r,i=e._v,o=x(e);if(o&&(t=A((function(){y?T.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=y||x(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},x=function(e){return 1!==e._h&&0===(e._a||e._c).length},U=function(e){h.call(u,(function(){var t;y?T.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},K=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw v("Promise can't be resolved itself");(t=w(e))?g((function(){var r={_w:n,_d:!1};try{t.call(e,s(j,r,1),s(K,r,1))}catch(e){K.call(r,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){K.call({_w:n,_d:!1},e)}}};b||(m=function(e){p(this,m,"Promise","_h"),E(e),r.call(this);try{e(s(j,this,1),s(K,this,1))}catch(e){K.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(50)(m.prototype,{then:function(e,t){var n=D(C(this,m));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=y?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=s(j,e,1),this.reject=s(K,e,1)},O.f=D=function(e){return e===m||e===a?new o(e):i(e)}),l(l.G+l.W+l.F*!b,{Promise:m}),n(26)(m,"Promise"),n(48)("Promise"),a=n(15).Promise,l(l.S+l.F*!b,"Promise",{reject:function(e){var t=D(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(c||!b),"Promise",{resolve:function(e){return S(c&&this===a?m:this,e)}}),l(l.S+l.F*!(b&&n(56)((function(e){m.all(e).catch(P)}))),"Promise",{all:function(e){var t=this,n=D(t),r=n.resolve,i=n.reject,o=A((function(){var n=[],o=0,a=1;d(e,!1,(function(e){var c=o++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[c]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=D(t),r=n.reject,i=A((function(){d(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){var r=function(e){function t(e){return!!(e&&e.call&&e.apply)}function n(e,n){return t(e[n])?function(){return e[n].apply(e,arguments)}:e[n]}function r(e){return function(){return e}}function i(){e.ready=Promise.resolve(!0),e.isExtensionInstalled=r(Promise.resolve(!1)),e.isPluginInstalled=r(Promise.resolve(!0)),e.loadPlugin=o,window.rutokenLoaded=c}function o(){var e=document.createElement("object");return e.style.setProperty("visibility","hidden","important"),e.style.setProperty("width","0px","important"),e.style.setProperty("height","0px","important"),e.style.setProperty("margin","0px","important"),e.style.setProperty("padding","0px","important"),e.style.setProperty("border-style","none","important"),e.style.setProperty("border-width","0px","important"),e.style.setProperty("max-width","0px","important"),e.style.setProperty("max-height","0px","important"),e.innerHTML="",e.setAttribute("type",f),document.body.appendChild(e),new Promise((function(e,t){l.push(e)}))}function a(){return E.loadPlugin().then((function(e){return function e(r){var i={},o=[];for(var a in r)!function(a){t(r[a].then)?o.push(r[a].then((function(o){return e(o).then((function(e){t(e)?i[a]=n(r,a):i[a]=e}))}))):i[a]=r[a]}(a);return 0==o.length?new Promise((function(e){e(r)})):Promise.all(o).then((function(){return i}))}(e)})).then((function(e){return e.wrapWithOldInterface=u,e}))}function c(e,t){_(e).then((function(e){if(0==l.length)throw"Internal error";l.shift()(e)}))}function u(){var e={};for(var n in this)t(this[n])?e[n]=function(e,t){return function(){var n=arguments[arguments.length-2],r=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0,-2);return t.apply(e,i).then((function(e){n(e)}),(function(e){r(e.message)}))}}(this,this[n]):e[n]=this[n];return new Promise((function(t){t(e)}))}function s(){var e={originalObject:this.originalObject};for(var t in this.originalObject)e[t]=n(this.originalObject,t);return new Promise((function(t){t(e)}))}function _(e){var n={originalObject:e,wrapWithOldInterface:s};for(var r in e)t(e[r])?n[r]=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return new Promise((function(r,i){n.push(r,i),t.apply(e,n)}))}}(e,e[r]):n[r]=e[r];return new Promise((function(e){e(n)}))}var l=[],f="application/x-rutoken-pki",E=window["C3B7563B-BF85-45B7-88FC-7CFF1BD3C2DB"];if(E)!function(){var t=E.initialize().then((function(){return E.isPluginInstalled()})).then((function(t){return e.isExtensionInstalled=r(Promise.resolve(!0)),e.isPluginInstalled=n(E,"isPluginInstalled"),t&&(f="application/x-rutoken-plugin",e.loadPlugin=a),!0}));e.ready=t}();else if(navigator.mimeTypes&&navigator.mimeTypes[f])i();else try{new ActiveXObject("Aktiv.CryptoPlugin"),i()}catch(t){e.ready=Promise.resolve(!0),e.isExtensionInstalled=r(Promise.resolve(!1)),e.isPluginInstalled=r(Promise.resolve(!1))}return e}(r||{});e.exports=r},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(18),i=n(0)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var r=n(2);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(14),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){"use strict";var r=n(60)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(32),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(15),i=n(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(16)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";n(86);var r=n(11),i=n(8),o=n(7),a=n(31),c=n(0),u=n(42),s=c("species"),_=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=c(e),E=!o((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=E?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[s]=function(){return n}),n[f](""),!t})):void 0;if(!E||!p||"replace"===e&&!_||"split"===e&&!l){var d=/./[f],C=n(a,f,""[e],(function(e,t,n,r,i){return t.exec===u?E&&!i?{done:!0,value:d.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),h=C[0],g=C[1];r(String.prototype,e,h),i(RegExp.prototype,f,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},function(e,t,n){"use strict";var r,i,o=n(33),a=RegExp.prototype.exec,c=String.prototype.replace,u=a,s=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),_=void 0!==/()??/.exec("")[1];(s||_)&&(u=function(e){var t,n,r,i,u=this;return _&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),s&&(t=u.lastIndex),r=a.call(u,e),s&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),_&&r&&r.length>1&&c.call(r[0],n,(function(){for(i=1;idocument.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(32),i=n(0)("iterator"),o=n(21);e.exports=n(15).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(2),i=n(35),o=n(0)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r=n(0)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){for(var r=n(27),i=n(22),o=n(11),a=n(1),c=n(8),u=n(21),s=n(0),_=s("iterator"),l=s("toStringTag"),f=u.Array,E={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(E),d=0;d=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(14),i=n(31);e.exports=function(e){return function(t,n){var o,a,c=String(i(t)),u=r(n),s=c.length;return u<0||u>=s?e?"":void 0:(o=c.charCodeAt(u))<55296||o>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?e?c.charAt(u):o:e?c.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){e.exports=!n(4)&&!n(7)((function(){return 7!=Object.defineProperty(n(43)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(1),i=n(87),o=n(3).f,a=n(25).f,c=n(65),u=n(33),s=r.RegExp,_=s,l=s.prototype,f=/a/g,E=/a/g,p=new s(f)!==f;if(n(4)&&(!p||n(7)((function(){return E[n(0)("match")]=!1,s(f)!=f||s(E)==E||"/a/i"!=s(f,"i")})))){s=function(e,t){var n=this instanceof s,r=c(e),o=void 0===t;return!n&&r&&e.constructor===s&&o?e:i(p?new _(r&&!o?e.source:e,t):_((r=e instanceof s)?e.source:e,r&&o?u.call(e):t),n?this:l,s)};for(var d=function(e){e in s||o(s,e,{configurable:!0,get:function(){return _[e]},set:function(t){_[e]=t}})},C=a(_),h=0;C.length>h;)d(C[h++]);l.constructor=s,s.prototype=l,n(11)(r,"RegExp",s)}n(48)("RegExp")},function(e,t,n){var r=n(12),i=n(20),o=n(64)(!1),a=n(46)("IE_PROTO");e.exports=function(e,t){var n,c=i(e),u=0,s=[];for(n in c)n!=a&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~o(s,n)||s.push(n));return s}},function(e,t,n){var r=n(20),i=n(6),o=n(37);e.exports=function(e){return function(t,n,a){var c,u=r(t),s=i(u.length),_=o(a,s);if(e&&n!=n){for(;s>_;)if((c=u[_++])!=c)return!0}else for(;s>_;_++)if((e||_ in u)&&u[_]===n)return e||_||0;return!e&&-1}}},function(e,t,n){var r=n(5),i=n(18),o=n(0)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){for(var r,i=n(1),o=n(8),a=n(17),c=a("typed_array"),u=a("view"),s=!(!i.ArrayBuffer||!i.DataView),_=s,l=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[f[l++]])?(o(r.prototype,c,!0),o(r.prototype,u,!0)):_=!1;e.exports={ABV:s,CONSTR:_,TYPED:c,VIEW:u}},function(e,t,n){var r=n(14),i=n(6);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){"use strict";var r=n(9),i=n(37),o=n(6);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,c=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,s=void 0===u?n:i(u,n);s>c;)t[c++]=e;return t}},function(e,t,n){var r=n(1).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(12),i=n(9),o=n(46)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(13),i=n(45),o=n(9),a=n(6),c=n(92);e.exports=function(e,t){var n=1==e,u=2==e,s=3==e,_=4==e,l=6==e,f=5==e||l,E=t||c;return function(t,c,p){for(var d,C,h=o(t),g=i(h),O=r(c,p,3),A=a(g.length),I=0,S=n?E(t,A):u?E(t,0):void 0;A>I;I++)if((f||I in g)&&(C=O(d=g[I],I,h),e))if(n)S[I]=C;else if(C)switch(e){case 3:return!0;case 5:return d;case 6:return I;case 2:S.push(d)}else if(_)return!1;return l?-1:s||_?_:S}}},function(e,t,n){var r=n(18);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(0)("unscopables"),i=Array.prototype;null==i[r]&&n(8)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";var r=n(16),i=n(10),o=n(11),a=n(8),c=n(21),u=n(95),s=n(26),_=n(70),l=n(0)("iterator"),f=!([].keys&&"next"in[].keys()),E=function(){return this};e.exports=function(e,t,n,p,d,C,h){u(n,t,p);var g,O,A,I=function(e){if(!f&&e in N)return N[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",v="values"==d,T=!1,N=e.prototype,R=N[l]||N["@@iterator"]||d&&N[d],m=R||I(d),y=d?v?I("entries"):m:void 0,P="Array"==t&&N.entries||R;if(P&&(A=_(P.call(new e)))!==Object.prototype&&A.next&&(s(A,S,!0),r||"function"==typeof A[l]||a(A,l,E)),v&&R&&"values"!==R.name&&(T=!0,m=function(){return R.call(this)}),r&&!h||!f&&!T&&N[l]||a(N,l,m),c[t]=m,c[S]=E,d)if(g={values:v?m:I("values"),keys:C?m:I("keys"),entries:y},h)for(O in g)O in N||o(N,O,g[O]);else i(i.P+i.F*(f||T),t,g);return g}},function(e,t,n){var r=n(2);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r,i,o,a=n(13),c=n(99),u=n(69),s=n(43),_=n(1),l=_.process,f=_.setImmediate,E=_.clearImmediate,p=_.MessageChannel,d=_.Dispatch,C=0,h={},g=function(){var e=+this;if(h.hasOwnProperty(e)){var t=h[e];delete h[e],t()}},O=function(e){g.call(e.data)};f&&E||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return h[++C]=function(){c("function"==typeof e?e:Function(e),t)},r(C),C},E=function(e){delete h[e]},"process"==n(18)(l)?r=function(e){l.nextTick(a(g,e,1))}:d&&d.now?r=function(e){d.now(a(g,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=O,r=a(o.postMessage,o,1)):_.addEventListener&&"function"==typeof postMessage&&!_.importScripts?(r=function(e){_.postMessage(e+"","*")},_.addEventListener("message",O,!1)):r="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:f,clear:E}},function(e,t,n){"use strict";var r=n(35);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(3).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(4)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(13),i=n(10),o=n(9),a=n(75),c=n(52),u=n(6),s=n(108),_=n(54);i(i.S+i.F*!n(56)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,l,f=o(e),E="function"==typeof this?this:Array,p=arguments.length,d=p>1?arguments[1]:void 0,C=void 0!==d,h=0,g=_(f);if(C&&(d=r(d,p>2?arguments[2]:void 0,2)),null==g||E==Array&&c(g))for(n=new E(t=u(f.length));t>h;h++)s(n,h,C?d(f[h],h):f[h]);else for(l=g.call(f),n=new E;!(i=l.next()).done;h++)s(n,h,C?a(l,d,[i.value,h],!0):i.value);return n.length=h,n}})},function(e,t,n){n(81)("asyncIterator")},function(e,t,n){var r=n(1),i=n(15),o=n(16),a=n(82),c=n(3).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||c(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(0)},function(e,t,n){"use strict";var r=n(1),i=n(12),o=n(4),a=n(10),c=n(11),u=n(111).KEY,s=n(7),_=n(40),l=n(26),f=n(17),E=n(0),p=n(82),d=n(81),C=n(112),h=n(72),g=n(2),O=n(5),A=n(20),I=n(34),S=n(19),v=n(53),T=n(113),N=n(44),R=n(3),m=n(22),y=N.f,P=R.f,D=T.f,b=r.Symbol,w=r.JSON,L=w&&w.stringify,M=E("_hidden"),x=E("toPrimitive"),U={}.propertyIsEnumerable,K=_("symbol-registry"),j=_("symbols"),B=_("op-symbols"),F=Object.prototype,G="function"==typeof b,V=r.QObject,H=!V||!V.prototype||!V.prototype.findChild,Y=o&&s((function(){return 7!=v(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=y(F,t);r&&delete F[t],P(e,t,n),r&&e!==F&&P(F,t,r)}:P,X=function(e){var t=j[e]=v(b.prototype);return t._k=e,t},k=G&&"symbol"==typeof b.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof b},W=function(e,t,n){return e===F&&W(B,t,n),g(e),t=I(t,!0),g(n),i(j,t)?(n.enumerable?(i(e,M)&&e[M][t]&&(e[M][t]=!1),n=v(n,{enumerable:S(0,!1)})):(i(e,M)||P(e,M,S(1,{})),e[M][t]=!0),Y(e,t,n)):P(e,t,n)},J=function(e,t){g(e);for(var n,r=C(t=A(t)),i=0,o=r.length;o>i;)W(e,n=r[i++],t[n]);return e},q=function(e){var t=U.call(this,e=I(e,!0));return!(this===F&&i(j,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(j,e)||i(this,M)&&this[M][e])||t)},z=function(e,t){if(e=A(e),t=I(t,!0),e!==F||!i(j,t)||i(B,t)){var n=y(e,t);return!n||!i(j,t)||i(e,M)&&e[M][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=D(A(e)),r=[],o=0;n.length>o;)i(j,t=n[o++])||t==M||t==u||r.push(t);return r},$=function(e){for(var t,n=e===F,r=D(n?B:A(e)),o=[],a=0;r.length>a;)!i(j,t=r[a++])||n&&!i(F,t)||o.push(j[t]);return o};G||(c((b=function(){if(this instanceof b)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(B,n),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),Y(this,e,S(1,n))};return o&&H&&Y(F,e,{configurable:!0,set:t}),X(e)}).prototype,"toString",(function(){return this._k})),N.f=z,R.f=W,n(25).f=T.f=Z,n(36).f=q,n(59).f=$,o&&!n(16)&&c(F,"propertyIsEnumerable",q,!0),p.f=function(e){return X(E(e))}),a(a.G+a.W+a.F*!G,{Symbol:b});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)E(Q[ee++]);for(var te=m(E.store),ne=0;te.length>ne;)d(te[ne++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(K,e+="")?K[e]:K[e]=b(e)},keyFor:function(e){if(!k(e))throw TypeError(e+" is not a symbol!");for(var t in K)if(K[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!G,"Object",{create:function(e,t){return void 0===t?v(e):J(v(e),t)},defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:z,getOwnPropertyNames:Z,getOwnPropertySymbols:$}),w&&a(a.S+a.F*(!G||s((function(){var e=b();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(O(t)||void 0!==e)&&!k(e))return h(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!k(t))return t}),r[1]=t,L.apply(w,r)}}),b.prototype[x]||n(8)(b.prototype,x,b.prototype.valueOf),l(b,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(115)},function(e,t){!function(e){"use strict";e.console||(e.console={});for(var t,n,r=e.console,i=function(){},o=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=o.pop();)r[t]||(r[t]={});for(;n=a.pop();)r[n]||(r[n]=i)}("undefined"==typeof window?this:window)},function(e,t,n){"use strict";var r=n(42);n(10)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){var r=n(5),i=n(88).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){var r=n(5),i=n(2),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(13)(Function.call,n(44).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";if(n(4)){var r=n(16),i=n(1),o=n(7),a=n(10),c=n(66),u=n(90),s=n(13),_=n(51),l=n(19),f=n(8),E=n(50),p=n(14),d=n(6),C=n(67),h=n(37),g=n(34),O=n(12),A=n(32),I=n(5),S=n(9),v=n(52),T=n(53),N=n(70),R=n(25).f,m=n(54),y=n(17),P=n(0),D=n(71),b=n(64),w=n(55),L=n(27),M=n(21),x=n(56),U=n(48),K=n(68),j=n(96),B=n(3),F=n(44),G=B.f,V=F.f,H=i.RangeError,Y=i.TypeError,X=i.Uint8Array,k=Array.prototype,W=u.ArrayBuffer,J=u.DataView,q=D(0),z=D(2),Z=D(3),$=D(4),Q=D(5),ee=D(6),te=b(!0),ne=b(!1),re=L.values,ie=L.keys,oe=L.entries,ae=k.lastIndexOf,ce=k.reduce,ue=k.reduceRight,se=k.join,_e=k.sort,le=k.slice,fe=k.toString,Ee=k.toLocaleString,pe=P("iterator"),de=P("toStringTag"),Ce=y("typed_constructor"),he=y("def_constructor"),ge=c.CONSTR,Oe=c.TYPED,Ae=c.VIEW,Ie=D(1,(function(e,t){return Re(w(e,e[he]),t)})),Se=o((function(){return 1===new X(new Uint16Array([1]).buffer)[0]})),ve=!!X&&!!X.prototype.set&&o((function(){new X(1).set({})})),Te=function(e,t){var n=p(e);if(n<0||n%t)throw H("Wrong offset!");return n},Ne=function(e){if(I(e)&&Oe in e)return e;throw Y(e+" is not a typed array!")},Re=function(e,t){if(!(I(e)&&Ce in e))throw Y("It is not a typed array constructor!");return new e(t)},me=function(e,t){return ye(w(e,e[he]),t)},ye=function(e,t){for(var n=0,r=t.length,i=Re(e,r);r>n;)i[n]=t[n++];return i},Pe=function(e,t,n){G(e,t,{get:function(){return this._d[n]}})},De=function(e){var t,n,r,i,o,a,c=S(e),u=arguments.length,_=u>1?arguments[1]:void 0,l=void 0!==_,f=m(c);if(null!=f&&!v(f)){for(a=f.call(c),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);c=r}for(l&&u>2&&(_=s(_,arguments[2],2)),t=0,n=d(c.length),i=Re(this,n);n>t;t++)i[t]=l?_(c[t],t):c[t];return i},be=function(){for(var e=0,t=arguments.length,n=Re(this,t);t>e;)n[e]=arguments[e++];return n},we=!!X&&o((function(){Ee.call(new X(1))})),Le=function(){return Ee.apply(we?le.call(Ne(this)):Ne(this),arguments)},Me={copyWithin:function(e,t){return j.call(Ne(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Ne(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return K.apply(Ne(this),arguments)},filter:function(e){return me(this,z(Ne(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Ne(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Ne(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){q(Ne(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Ne(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Ne(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return se.apply(Ne(this),arguments)},lastIndexOf:function(e){return ae.apply(Ne(this),arguments)},map:function(e){return Ie(Ne(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ce.apply(Ne(this),arguments)},reduceRight:function(e){return ue.apply(Ne(this),arguments)},reverse:function(){for(var e,t=Ne(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return _e.call(Ne(this),e)},subarray:function(e,t){var n=Ne(this),r=n.length,i=h(e,r);return new(w(n,n[he]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,d((void 0===t?r:h(t,r))-i))}},xe=function(e,t){return me(this,le.call(Ne(this),e,t))},Ue=function(e){Ne(this);var t=Te(arguments[1],1),n=this.length,r=S(e),i=d(r.length),o=0;if(i+t>n)throw H("Wrong length!");for(;o255?255:255&r),i.v[E](n*t+i.o,r,Se)}(this,n,e)},enumerable:!0})};O?(p=n((function(e,n,r,i){_(e,p,s,"_d");var o,a,c,u,l=0,E=0;if(I(n)){if(!(n instanceof W||"ArrayBuffer"==(u=A(n))||"SharedArrayBuffer"==u))return Oe in n?ye(p,n):De.call(p,n);o=n,E=Te(r,t);var h=n.byteLength;if(void 0===i){if(h%t)throw H("Wrong length!");if((a=h-E)<0)throw H("Wrong length!")}else if((a=d(i)*t)+E>h)throw H("Wrong length!");c=a/t}else c=C(n),o=new W(a=c*t);for(f(e,"_d",{b:o,o:E,l:a,e:c,v:new J(o)});l>1,_=23===t?N(2,-24)-N(2,-77):0,l=0,f=e<0||0===e&&1/e<0?1:0;for((e=T(e))!=e||e===S?(i=e!=e?1:0,r=u):(r=R(m(e)/y),e*(o=N(2,-r))<1&&(r--,o*=2),(e+=r+s>=1?_/o:_*N(2,1-s))*o>=2&&(r++,o/=2),r+s>=u?(i=0,r=u):r+s>=1?(i=(e*o-1)*N(2,t),r+=s):(i=e*N(2,s-1)*N(2,t),r=0));t>=8;a[l++]=255&i,i/=256,t-=8);for(r=r<0;a[l++]=255&r,r/=256,c-=8);return a[--l]|=128*f,a}function L(e,t,n){var r,i=8*n-t-1,o=(1<>1,c=i-7,u=n-1,s=e[u--],_=127&s;for(s>>=7;c>0;_=256*_+e[u],u--,c-=8);for(r=_&(1<<-c)-1,_>>=-c,c+=t;c>0;r=256*r+e[u],u--,c-=8);if(0===_)_=1-a;else{if(_===o)return r?NaN:s?-S:S;r+=N(2,t),_-=a}return(s?-1:1)*r*N(2,_-t)}function M(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function x(e){return[255&e]}function U(e){return[255&e,e>>8&255]}function K(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function j(e){return w(e,52,8)}function B(e){return w(e,23,4)}function F(e,t,n){d(e.prototype,t,{get:function(){return this[n]}})}function G(e,t,n,r){var i=E(+n);if(i+t>e[D])throw I("Wrong index!");var o=e[P]._b,a=i+e[b],c=o.slice(a,a+t);return r?c:c.reverse()}function V(e,t,n,r,i,o){var a=E(+n);if(a+t>e[D])throw I("Wrong index!");for(var c=e[P]._b,u=a+e[b],s=r(+i),_=0;_k;)(H=X[k++])in g||c(g,H,v[H]);o||(Y.constructor=g)}var W=new O(new g(2)),J=O.prototype.setInt8;W.setInt8(0,2147483648),W.setInt8(1,2147483649),!W.getInt8(0)&&W.getInt8(1)||u(O.prototype,{setInt8:function(e,t){J.call(this,e,t<<24>>24)},setUint8:function(e,t){J.call(this,e,t<<24>>24)}},!0)}else g=function(e){_(this,g,"ArrayBuffer");var t=E(e);this._b=C.call(new Array(t),0),this[D]=t},O=function(e,t,n){_(this,O,"DataView"),_(e,g,"DataView");var r=e[D],i=l(t);if(i<0||i>r)throw I("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw I("Wrong length!");this[P]=e,this[b]=i,this[D]=n},i&&(F(g,"byteLength","_l"),F(O,"buffer","_b"),F(O,"byteLength","_l"),F(O,"byteOffset","_o")),u(O.prototype,{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return M(G(this,4,e,arguments[1]))},getUint32:function(e){return M(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){V(this,1,e,x,t)},setUint8:function(e,t){V(this,1,e,x,t)},setInt16:function(e,t){V(this,2,e,U,t,arguments[2])},setUint16:function(e,t){V(this,2,e,U,t,arguments[2])},setInt32:function(e,t){V(this,4,e,K,t,arguments[2])},setUint32:function(e,t){V(this,4,e,K,t,arguments[2])},setFloat32:function(e,t){V(this,4,e,B,t,arguments[2])},setFloat64:function(e,t){V(this,8,e,j,t,arguments[2])}});h(g,"ArrayBuffer"),h(O,"DataView"),c(O.prototype,a.VIEW,!0),t.ArrayBuffer=g,t.DataView=O},function(e,t,n){var r=n(3),i=n(2),o=n(22);e.exports=n(4)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),c=a.length,u=0;c>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(93);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(5),i=n(72),o=n(0)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(53),i=n(19),o=n(26),a={};n(8)(a,n(0)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(9),i=n(37),o=n(6);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),c=i(e,a),u=i(t,a),s=arguments.length>2?arguments[2]:void 0,_=Math.min((void 0===s?a:i(s,a))-u,a-c),l=1;for(u0;)u in n?n[c]=n[u]:delete n[c],c+=l,u+=l;return n}},function(e,t,n){n(4)&&"g"!=/./g.flags&&n(3).f(RegExp.prototype,"flags",{configurable:!0,get:n(33)})},function(e,t,n){var r=n(13),i=n(75),o=n(52),a=n(2),c=n(6),u=n(54),s={},_={};(t=e.exports=function(e,t,n,l,f){var E,p,d,C,h=f?function(){return e}:u(e),g=r(n,l,t?2:1),O=0;if("function"!=typeof h)throw TypeError(e+" is not iterable!");if(o(h)){for(E=c(e.length);E>O;O++)if((C=t?g(a(p=e[O])[0],p[1]):g(e[O]))===s||C===_)return C}else for(d=h.call(e);!(p=d.next()).done;)if((C=i(d,g,p.value,t))===s||C===_)return C}).BREAK=s,t.RETURN=_},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(1),i=n(76).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,c=r.Promise,u="process"==n(18)(a);e.exports=function(){var e,t,n,s=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(s)};else if(!o||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var _=c.resolve(void 0);n=function(){_.then(s)}}else n=function(){i.call(r,s)};else{var l=!0,f=document.createTextNode("");new o(s).observe(f,{characterData:!0}),n=function(){f.data=l=!l}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(1).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){var r=n(2),i=n(5),o=n(77);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(65),i=n(2),o=n(55),a=n(38),c=n(6),u=n(39),s=n(42),_=n(7),l=Math.min,f=[].push,E=!_((function(){RegExp(4294967295,"y")}));n(41)("split",2,(function(e,t,n,_){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,c,u=[],_=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,E=void 0===t?4294967295:t>>>0,p=new RegExp(e.source,_+"g");(o=s.call(p,i))&&!((a=p.lastIndex)>l&&(u.push(i.slice(l,o.index)),o.length>1&&o.index=E));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!c&&p.test("")||u.push(""):u.push(i.slice(l)),u.length>E?u.slice(0,E):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):p.call(String(i),n,r)},function(e,t){var r=_(p,e,this,t,p!==n);if(r.done)return r.value;var s=i(e),f=String(this),d=o(s,RegExp),C=s.unicode,h=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(E?"y":"g"),g=new d(E?s:"^(?:"+s.source+")",h),O=void 0===t?4294967295:t>>>0;if(0===O)return[];if(0===f.length)return null===u(g,f)?[f]:[];for(var A=0,I=0,S=[];I1?arguments[1]:void 0)}}),n(73)("find")},function(e,t,n){var r=n(9),i=n(22);n(107)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(10),i=n(15),o=n(7);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(e,t,n){"use strict";var r=n(3),i=n(19);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(10);r(r.S+r.F,"Object",{assign:n(110)})},function(e,t,n){"use strict";var r=n(22),i=n(59),o=n(36),a=n(9),c=n(45),u=Object.assign;e.exports=!u||n(7)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=a(e),u=arguments.length,s=1,_=i.f,l=o.f;u>s;)for(var f,E=c(arguments[s++]),p=_?r(E).concat(_(E)):r(E),d=p.length,C=0;d>C;)l.call(E,f=p[C++])&&(n[f]=E[f]);return n}:u},function(e,t,n){var r=n(17)("meta"),i=n(5),o=n(12),a=n(3).f,c=0,u=Object.isExtensible||function(){return!0},s=!n(7)((function(){return u(Object.preventExtensions({}))})),_=function(e){a(e,r,{value:{i:"O"+ ++c,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";_(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;_(e)}return e[r].w},onFreeze:function(e){return s&&l.NEED&&u(e)&&!o(e,r)&&_(e),e}}},function(e,t,n){var r=n(22),i=n(59),o=n(36);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,c=n(e),u=o.f,s=0;c.length>s;)u.call(e,a=c[s++])&&t.push(a);return t}},function(e,t,n){var r=n(20),i=n(25).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(80),core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(83),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(28),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(78),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(23),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(24),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(29),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_6__);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){if(!window.cadesplugin){var pluginObject,plugin_resolved=0,plugin_reject,plugin_resolve,isOpera=0,isFireFox=0,isSafari=0,isYandex=0,canPromise=!!window.Promise,cadesplugin;cadesplugin=canPromise?new Promise((function(e,t){plugin_resolve=e,plugin_reject=t})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,t){var n=ru_cryptopro_npcades_10_native_bridge.callbacks[e];n&&n.apply(null,t)},call:function(e,t,n){var r=n&&"function"==typeof n,i=r?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;r&&(ru_cryptopro_npcades_10_native_bridge.callbacks[i]=n);var o=document.createElement("IFRAME"),a=new Array("_CPNP_handle");try{o.setAttribute("src","cpnp-js-call:"+e+":"+i+":"+encodeURIComponent(JSON.stringify(t,a)))}catch(e){alert(e)}document.documentElement.appendChild(o),o.parentNode.removeChild(o),o=null}};cadesplugin.JSModuleVersion="2.3.0",cadesplugin.async_spawn=async_spawn,cadesplugin.set=set_pluginObject,cadesplugin.set_log_level=set_log_level,cadesplugin.getLastError=getLastError,cadesplugin.is_capilite_enabled=is_capilite_enabled,isNativeMessageSupported()&&(cadesplugin.CreateObjectAsync=CreateObjectAsync,cadesplugin.ReleasePluginObjects=ReleasePluginObjects),isNativeMessageSupported()||(cadesplugin.CreateObject=CreateObject),window.cadesplugin_load_timeout?setTimeout(check_load_timeout,window.cadesplugin_load_timeout):setTimeout(check_load_timeout,2e4),set_constantValues(),cadesplugin.current_log_level=cadesplugin.LOG_LEVEL_ERROR,window.cadesplugin=cadesplugin,check_plugin_working()}function check_browser(){var e,t=navigator.userAgent,n=t.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===n[1]&&null!=(e=t.match(/\b(OPR|Edg|YaBrowser)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})}function cpcsp_console_log(e,t){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",t),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",t),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",t))):void 0}function set_log_level(e){e===cadesplugin.LOG_LEVEL_DEBUG||e===cadesplugin.LOG_LEVEL_INFO||e===cadesplugin.LOG_LEVEL_ERROR?(cadesplugin.current_log_level=e,cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = DEBUG"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = INFO"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = ERROR"),isNativeMessageSupported()&&(cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&window.postMessage("set_log_level=debug","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&window.postMessage("set_log_level=info","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&window.postMessage("set_log_level=error","*"))):cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,"cadesplugin_api.js: Incorrect log_level: "+e)}function set_constantValues(){cadesplugin.CAPICOM_MEMORY_STORE=0,cadesplugin.CAPICOM_LOCAL_MACHINE_STORE=1,cadesplugin.CAPICOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_MEMORY_STORE=0,cadesplugin.CADESCOM_LOCAL_MACHINE_STORE=1,cadesplugin.CADESCOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_CONTAINER_STORE=100,cadesplugin.CAPICOM_MY_STORE="My",cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED=0,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE=2,cadesplugin.CADESCOM_XADES_DEFAULT=16,cadesplugin.CADESCOM_XADES_BES=32,cadesplugin.CADESCOM_XADES_T=80,cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1=1488,cadesplugin.CADESCOM_XMLDSIG_TYPE=0,cadesplugin.XmlDsigGost3410UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr3411",cadesplugin.XmlDsigGost3410Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411",cadesplugin.XmlDsigGost3411Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256",cadesplugin.XmlDsigGost3410Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256",cadesplugin.XmlDsigGost3411Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512",cadesplugin.XmlDsigGost3410Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512",cadesplugin.CADESCOM_CADES_DEFAULT=0,cadesplugin.CADESCOM_CADES_BES=1,cadesplugin.CADESCOM_CADES_T=5,cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1=93,cadesplugin.CADESCOM_PKCS7_TYPE=65535,cadesplugin.CADESCOM_ENCODE_BASE64=0,cadesplugin.CADESCOM_ENCODE_BINARY=1,cadesplugin.CADESCOM_ENCODE_ANY=-1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT=0,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN=1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY=2,cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME=0,cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH=0,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME=3,cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME=4,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION=5,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY=6,cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY=7,cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY=8,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID=9,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID=10,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED=11,cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE=12,cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE=128,cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE=9,cadesplugin.CAPICOM_OID_OTHER=0,cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION=10,cadesplugin.CAPICOM_EKU_CLIENT_AUTH=2,cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON=5,cadesplugin.CAPICOM_EKU_OTHER=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_ATTRIBUTE_OTHER=-1,cadesplugin.CADESCOM_STRING_TO_UCS2LE=0,cadesplugin.CADESCOM_BASE64_TO_BINARY=1,cadesplugin.CADESCOM_DISPLAY_DATA_NONE=0,cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT=1,cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2=0,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4=1,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES=3,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES=4,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89=25,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1=0,cadesplugin.CADESCOM_HASH_ALGORITHM_MD2=1,cadesplugin.CADESCOM_HASH_ALGORITHM_MD4=2,cadesplugin.CADESCOM_HASH_ALGORITHM_MD5=3,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256=4,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384=5,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512=6,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411=100,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256=101,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512=102,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC=110,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC=111,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC=112,cadesplugin.LOG_LEVEL_DEBUG=4,cadesplugin.LOG_LEVEL_INFO=2,cadesplugin.LOG_LEVEL_ERROR=1,cadesplugin.CADESCOM_AllowNone=0,cadesplugin.CADESCOM_AllowNoOutstandingRequest=1,cadesplugin.CADESCOM_AllowUntrustedCertificate=2,cadesplugin.CADESCOM_AllowUntrustedRoot=4,cadesplugin.CADESCOM_SkipInstallToStore=268435456,cadesplugin.ENABLE_CARRIER_TYPE_CSP=1,cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM=2,cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM=4,cadesplugin.ENABLE_ANY_CARRIER_TYPE=7,cadesplugin.DISABLE_EVERY_CARRIER_OPERATION=0,cadesplugin.ENABLE_CARRIER_OPEN_ENUM=1,cadesplugin.ENABLE_CARRIER_CREATE=2,cadesplugin.ENABLE_ANY_OPERATION=3,cadesplugin.CADESCOM_PRODUCT_CSP=0,cadesplugin.CADESCOM_PRODUCT_OCSP=1,cadesplugin.CADESCOM_PRODUCT_TSP=2,cadesplugin.MEDIA_TYPE_REGISTRY=1,cadesplugin.MEDIA_TYPE_HDIMAGE=2,cadesplugin.MEDIA_TYPE_CLOUD=4,cadesplugin.MEDIA_TYPE_SCARD=8}function async_spawn(e){function t(e,t){var o;try{o=n[e](t)}catch(e){return Promise.reject(e)}return o.done?o.value:Promise.resolve(o.value).then(r,i)}var n=e(Array.prototype.slice.call(arguments,1)),r=t.bind(t,"next"),i=t.bind(t,"throw");return r()}function isIE(){return"IE"===browserSpecs.name||"MSIE"===browserSpecs.name}function isIOS(){return navigator.userAgent.match(/ipod/i)||navigator.userAgent.match(/ipad/i)||navigator.userAgent.match(/iphone/i)}function isNativeMessageSupported(){return!isIE()&&("Edg"===browserSpecs.name||("YaBrowser"===browserSpecs.name?(isYandex=!0,!0):"Opera"===browserSpecs.name?(isOpera=!0,browserSpecs.version>=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="",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 firefox_or_safari_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||isSafari){var t=e.data.substring(e.data.indexOf("url:")+4),n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",t),n.onerror=plugin_loaded_error,n.onload=firefox_or_safari_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(n)}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}),!1)}function load_extension(){var e;isFireFox||isSafari?nmcades_api_onload():isOpera||isYandex?((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)):((e=document.createElement("script")).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))}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 n=document.createElement("object");n.setAttribute("id","webClassFactory"),n.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),n.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(n)}}function plugin_loaded(){plugin_resolved=1,canPromise?plugin_resolve():window.postMessage("cadesplugin_loaded","*")}function plugin_loaded_error(e){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]>1?new Error("Подключено "+i.length+" токена(ов)"):new Error("Нет подключенных токенов");t=i.shift();var o=e.getPluginVersion(),a=e.getTokenInfo(t);r({version:o,serial:a[0],flags:a[1],label:a[2],type:a[3]})}catch(e){var c=n();throw new Error(e.message||c)}}))}))},this.bind=function(r){return new Promise((function(i){try{if(1===e.getLoggedInState().shift())i();else if(r)e.bindTokenAsync(t,r,(function(e){if(e&&"Error"==e[0]){var t=n(e[1]);throw new Error(t)}i()}));else{if(!e.bindTokenUI(t))throw new Error("Пользователь отменил ввод PIN-кода");i()}}catch(e){var o=n();throw new Error(o||e.message)}}))},this.unbind=function(){return new Promise((function(t){try{1===e.getLoggedInState().shift()&&e.unbindToken(),t()}catch(e){var r=n();throw new Error(r||e.message)}}))},this.clean=function(){return new Promise((function(r){try{var i=e.getCertificateList(t);for(var o in i){var a=i[o].shift();e.deleteContainerOrCertificate(a)}r(o)}catch(e){var c=n();throw new Error(c||e.message)}}))},this.generateCSR=function(t,r,i,o){return i&&i.length||(i=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),o||(o="XA"),new Promise((function(a){try{e.createContainerAsync(o,r,(function(r){if(r&&"Error"==r[0]){var o=n(r[1]);throw new Error(o)}var c=r,s=[];for(var _ in t)t.hasOwnProperty(_)&&s.push(_,t[_]);var l=["certificatePolicies","1.2.643.100.113.1","keyUsage","digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment","extendedKeyUsage",i.toString(),"1.2.643.100.111",'ASN1:FORMAT:UTF8,UTF8:"Криптотокен" (АЛАДДИН Р.Д.)'];e.genCSRAsync(c,s,l,(function(e){if(e&&"Error"==e[0]){var t=n(e[1]);throw new Error(t)}var r=btoa(String.fromCharCode.apply(null,new Uint8Array(e)));a({csr:u(r),containerId:c})}))}))}catch(e){var c=n();throw new Error(c||e.message)}}))},this.writeCertificate=function(t,r){return new Promise((function(i){try{for(var o=[],a=atob(t),c=0;c=u.Data.Validity["Not Before"]&&p<=u.Data.Validity["Not After"],toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}})}catch(e){var d=n();throw new Error(d||e.message)}}))},this.listCertificates=function(){return new Promise((function(i){try{e.getCertificateListAsync(t,(function(o){if(o&&"Error"==o[0]){var a=n(o[1]);throw new Error(a)}for(var c=[],u=0;u1?new Error("Подключено "+r.length+" токена(ов)"):new Error("Нет подключенных токенов");t(r.shift().id)}))})).then((function(r){return t=r,new Promise((function(r,i){e.getTokenInfo({args:{tokenID:t},onSuccess:r,onError:n(i)})}))})).then((function(e){return Object.assign(r,e)}))},this.bind=function(r){return new Promise((function(t,r){e.getLoggedInState({onSuccess:t,onError:n(r)})})).then((function(i){return i.state===JCWebClient2.Vars.AuthState.binded&&i.tokenID===t||new Promise((function(i,o){var a={tokenID:t};r?a.pin=r:a.useUI=!0,e.bindToken({args:a,onSuccess:i,onError:n(o)})}))}))},this.unbind=function(){return new Promise((function(t,r){e.getLoggedInState({onSuccess:t,onError:n(r)})})).then((function(t){return t.state===JCWebClient2.Vars.AuthState.notBinded||new Promise((function(t,r){e.unbindToken({onSuccess:t,onError:n(r)})}))}))},this.clean=function(){return new Promise((function(r,i){e.getContainerList({args:{tokenID:t},onSuccess:r,onError:n(i)})})).then((function(t){var r=Promise.resolve();for(var i in t)r=r.then((function(){return new Promise((function(r,o){e.deletePKIObject({args:{id:t[i].id},onSuccess:r,onError:n(o)})}))}));return r}))},this.generateCSR=function(t,r,i,o){i&&i.length||(i=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),o||(o=JCWebClient2.Vars.KeyAlgorithm.GOST_2012_256);var a,c={certificatePolicies:"1.2.643.100.113.1",keyUsage:"digitalSignature,keyEncipherment,nonRepudiation,dataEncipherment",extendedKeyUsage:i.toString(),"1.2.643.100.111":'ASN1:FORMAT:UTF8,UTF8:"Криптотокен" (АЛАДДИН Р.Д.)'};return new Promise((function(t,i){e.createKeyPair({args:{paramSet:"XA",description:r,algorithm:o},onSuccess:t,onError:n(i)})})).then((function(r){return a=r,new Promise((function(r,i){e.genCSR({args:{id:a,dn:t,exts:c},onSuccess:r,onError:n(i)})}))})).then((function(e){return{csr:s(btoa(String.fromCharCode.apply(null,new Uint8Array(e)))),keyPairId:a}}))},this.writeCertificate=function(t,r){return new Promise((function(i,o){e.writeUserCertificate({args:{keyPairID:r,cert:t},onSuccess:i,onError:n(o)})}))},this.certificateInfo=function(i){return new Promise((function(r,o){e.parseX509Certificate({args:{tokenID:t,id:i},onSuccess:r,onError:n(o)})})).then((function(e){var t=r(e.Data.Subject),n=r(e.Data.Issuer),i=new Date;return{Name:t.CN,Issuer:n,IssuerName:u(n.toString()),Subject:t,SubjectName:u(t.toString()),Version:e.Data.Version,SerialNumber:e.Data["Serial Number"].map(a).join(""),Thumbprint:e.Signature.map(a).join(""),ValidFromDate:e.Data.Validity["Not Before"],ValidToDate:e.Data.Validity["Not After"],HasPrivateKey:!0,IsValid:i>=e.Data.Validity["Not Before"]&&i<=e.Data.Validity["Not After"],Algorithm:e.Data["Subject Public Key Info"]["Public Key Algorithm"],toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nАлгоритм: "+this.Algorithm+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}}}))},this.listCertificates=function(){return new Promise((function(r,i){e.getContainerList({args:{tokenID:t},onSuccess:r,onError:n(i)})})).then((function(r){for(var i=[],a=Promise.resolve(),c=0;c=0}function u(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e)return t.Certificates.then((function(e){return n=e,e.Count})).then((function(e){for(var t=[],r=1;r<=e;r++)t.push(n.Item(r));return Promise.all(t)})).then((function(e){var t=[];for(var n in e)t.push(e[n].SubjectName,e[n].Thumbprint);return Promise.all(t)})).then((function(e){for(var t=[],n=0;n>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}this.init=function(){return window.cadesplugin_skip_extension_install=!0,window.allow_firefox_cadesplugin_async=!0,n(114),e=!!cadesplugin.CreateObjectAsync,o=cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY,new Promise((function(e){if(!window.cadesplugin)throw new Error("КриптоПро ЭЦП Browser plug-in не обнаружен");e()})).then((function(){return e?cadesplugin.then((function(){return cadesplugin.CreateObjectAsync("CAdESCOM.About")})).then((function(e){return e.Version})).then((function(e){return t=e,{version:e}})).catch((function(e){var t=l(e);throw new Error(t)})):new Promise((function(e){try{var n=cadesplugin.CreateObject("CAdESCOM.About");if(!n||!n.Version)throw new Error("КриптоПро ЭЦП Browser plug-in не загружен");e({version:t=n.Version})}catch(e){var r=l(e);throw new Error(r)}}))}))},this.bind=function(e){return r=!0,Promise.resolve(r)},this.unbind=function(){return r=!1,Promise.resolve(r)},this.generateCSR=function(t,n,r,i){var o,a,c,u,s,_,I,v,T,N,R,y,P;return r&&r.length||(r=["1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.4"]),i||(i=S),e?cadesplugin.then((function(){return Promise.all([cadesplugin.CreateObjectAsync("X509Enrollment.CX509Enrollment"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509CertificateRequestPkcs10"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509PrivateKey"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509ExtensionKeyUsage"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509ExtensionEnhancedKeyUsage"),cadesplugin.CreateObjectAsync("X509Enrollment.CObjectIds"),cadesplugin.CreateObjectAsync("X509Enrollment.CX500DistinguishedName"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509Extensions"),cadesplugin.CreateObjectAsync("X509Enrollment.CCspInformations"),cadesplugin.CreateObjectAsync("X509Enrollment.CX509Extension")])})).then((function(e){return o=e[0],a=e[1],c=e[2],s=e[3],_=e[4],I=e[5],N=e[6],u=e[7],R=e[8],P=e[9],R.AddAvailableCsps()})).then((function(){return R.Count})).then((function(e){if(!e)throw new Error("No CSP informations!");for(var t=[],n=0;n1)throw new Error("Подключено "+r+" устройств")}return Promise.all([e.getDeviceInfo(t,e.TOKEN_INFO_READER),e.getDeviceInfo(t,e.TOKEN_INFO_LABEL),e.getDeviceInfo(t,e.TOKEN_INFO_SERIAL),e.getDeviceModel(t),e.getDeviceType(t)])})).then((function(t){return{version:e.version,serial:t[2],reader:t[0],label:t[1].indexOf("Rutoken ECP ")+1?"":t[1],type:t[4],model:t[3]}})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.bind=function(r){return new Promise((function(i,o){e.getDeviceInfo(t,e.TOKEN_INFO_IS_LOGGED_IN).then((function(e){if(e)return i("Пользователь уже авторизован"),!1;if(!r&&!(r=prompt("PIN-код доступа к устройству")))throw new Error("Авторизация на устройстве отменена пользователем");return!0})).then((function(n){if(n)return e.login(t,r).then((function(e){i(!0)}));i(!0)})).then(null,(function(e){var t=n(e);o(t)}))}))},this.unbind=function(){return new Promise((function(r,i){e.getDeviceInfo(t,e.TOKEN_INFO_IS_LOGGED_IN).then((function(e){return!!e||(r("Пользователь не авторизован"),!1)})).then((function(n){return!n||e.logout(t).then((function(e){r(!0)}))})).then(null,(function(e){var t=n(e);i(t)}))}))},this.clean=function(){var r=0;return e.enumerateCertificates(t,e.CERT_CATEGORY_USER).then((function(n){var i=[];for(var o in n){var a=n[o];i.push(e.deleteCertificate(t,a))}return r+=i.length,Promise.all(i)})).then((function(){return e.enumerateKeys(t,"")})).then((function(n){var i=[];for(var o in n){var a=n[o];i.push(e.deleteKeyPair(t,a))}return r+=i.length,Promise.all(i)})).then((function(){return r})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.generateCSR=function(r,i,o,c){var u="";i||(i=""),o&&o.length||(o=["clientAuth","emailProtection"]);var s=c&&e[c]||e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256,_="XA",l=e.HASH_TYPE_GOST3411_94;s===e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_512?(_="A",l=e.HASH_TYPE_GOST3411_12_512):s===e.PUBLIC_KEY_ALGORITHM_GOST3410_2012_256&&(l=e.HASH_TYPE_GOST3411_12_256);var f={publicKeyAlgorithm:s,paramset:_};return e.generateKeyPair(t,void 0,i,f).then((function(n){u=n;var i=[];for(var a in r)r.hasOwnProperty(a)&&i.push({rdn:a,value:r[a]});var c={keyUsage:["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment"],extKeyUsage:o},s={subjectSignTool:'СКЗИ "РУТОКЕН ЭЦП"',hashAlgorithm:l};return e.createPkcs10(t,u,i,c,s)})).then((function(e){return{csr:a(e),keyPairId:u}})).then(null,(function(r){u&&e.deleteKeyPair(t,u);var i=n(r);throw new Error(i)}))},this.writeCertificate=function(r){var i=e.CERT_CATEGORY_USER;return e.importCertificate(t,r,i).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.certificateInfo=function(i){var o=!1,a="";return new Promise((function(r){e.getKeyByCertificate(t,i).then((function(e){r(!!e)})).then(null,(function(e){var t=n(e);console.log("getKeyByCertificate",i,t),r(!1)}))})).then((function(n){return o=n,e.getCertificateInfo(t,i,e.CERT_INFO_SERIAL_NUMBER)})).then((function(n){return a=n,e.parseCertificate(t,i)})).then((function(e){var t=e.text.match(/Version: (\d+)/),n=t.length>1?t[1]:void 0,c=e.text.match(/Public Key Algorithm: (.+)$/m),s=c.length>1?c[1]:"",_=r(e.subject),l=r(e.issuer),f=new Date;return{Name:_.commonName||_.CN,Issuer:l,IssuerName:u(l.toString()),Subject:_,SubjectName:u(_.toString()),Version:n,Algorithm:s,SerialNumber:a,Thumbprint:i.replace(/\:/g,""),ValidFromDate:new Date(e.validNotBefore),ValidToDate:new Date(e.validNotAfter),HasPrivateKey:o,IsValid:f>=new Date(e.validNotBefore)&&f<=new Date(e.validNotAfter),toString:function(){return"Название: "+this.Name+"\nИздатель: "+this.IssuerName+"\nСубъект: "+this.SubjectName+"\nВерсия: "+this.Version+"\nАлгоритм: "+this.Algorithm+"\nСерийный №: "+this.SerialNumber+"\nОтпечаток SHA1: "+this.Thumbprint+"\nНе действителен до: "+this.ValidFromDate+"\nНе действителен после: "+this.ValidToDate+"\nПриватный ключ: "+(this.HasPrivateKey?"Есть":"Нет (или не выполнен вход)")+"\nВалидный: "+(this.IsValid?"Да":"Нет")}}})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.listCertificates=function(){var r=[],i=[];return e.enumerateCertificates(t,e.CERT_CATEGORY_USER).then((function(n){r=n;var i=[];for(var o in r)i.push(e.parseCertificate(t,r[o]));return Promise.all(i)})).then((function(e){for(var t in r)i.push({id:r[t],name:o(e[t])});return i})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.readCertificate=function(r){return e.getCertificate(t,r).then((function(e){return a(e)})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.signData=function(r,i,o){o||(o={});var a=o.attached;return e.sign(t,i,r,e.DATA_FORMAT_BASE64,{detached:!a}).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.addSign=function(r,i,o,a){a||(a={});var c=a.attached;return c&&(r=""),e.sign(t,o,r,e.DATA_FORMAT_BASE64,{detached:!c,CMS:i}).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.verifySign=function(r,i,o){o||(o={});var a={base64:!0,verifyCertificate:!1};return o.attached||(a.data=r),e.verify(t,i,a).then((function(e){if(!e)throw new Error("подпись не верна");return!0})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.encryptData=function(r,i){return e.getCertificate(t,i).then((function(n){return e.cmsEncrypt(t,"",[n],r,{base64:!0})})).then(null,(function(e){var t=n(e);throw new Error(t)}))},this.decryptData=function(r,i){return e.getKeyByCertificate(t,i).then((function(n){return e.cmsDecrypt(t,n,r,{base64:!0})})).then(null,(function(e){var t=n(e);throw new Error(t)}))}};n.d(t,"DN",(function(){return i})),n.d(t,"JaCarta",(function(){return s})),n.d(t,"JaCarta2",(function(){return l})),n.d(t,"CryptoPro",(function(){return N})),n.d(t,"RuToken",(function(){return D}))}])})); //# sourceMappingURL=ruscrypto.min.js.map \ No newline at end of file