text: (window.webpackJsonp=window.webpackJsonp||[]).push([["npm.asn1.js"],{"02b8":function(t,e,r){"use strict";const n=e;n.der=r("2b73"),n.pem=r("2579")},"072c":function(t,e,r){"use strict";const n=r("a092"),o=r("e70b").Reporter,i=r("57de").Buffer;function s(t,e){o.call(this,e),i.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function c(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return c.isEncoderBuffer(t)||(t=new c(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=i.byteLength(t);else{if(!i.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(s,o),e.DecoderBuffer=s,s.isDecoderBuffer=function(t){if(t instanceof s)return!0;return"object"==typeof t&&i.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},s.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},s.prototype.restore=function(t){const e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,o.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=c,c.isEncoderBuffer=function(t){if(t instanceof c)return!0;return"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},c.prototype.join=function(t,e){return t||(t=i.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):i.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},"23d9":function(t,e,r){"use strict";function n(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=n(e.tag)},2579:function(t,e,r){"use strict";const n=r("a092"),o=r("2b73");function i(t){o.call(this,t),this.enc="pem"}n(i,o),t.exports=i,i.prototype.encode=function(t,e){const r=o.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"];for(let t=0;t<r.length;t+=64)n.push(r.slice(t,t+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},2879:function(t,e,r){"use strict";const n=r("e70b").Reporter,o=r("072c").EncoderBuffer,i=r("072c").DecoderBuffer,s=r("b9d3"),c=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(c);function a(t,e,r){const n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=a;const l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];a.prototype.clone=function(){const t=this._baseState,e={};l.forEach((function(r){e[r]=t[r]}));const r=new this.constructor(e.parent);return r._baseState=e,r},a.prototype._wrap=function(){const t=this._baseState;u.forEach((function(e){this[e]=function(){const r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},a.prototype._init=function(t){const e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),s.equal(e.children.length,1,"Root node can have only one child")},a.prototype._useArgs=function(t){const e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);const n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){a.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),c.forEach((function(t){a.prototype[t]=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}})),a.prototype.use=function(t){s(t);const e=this._baseState;return s(null===e.use),e.use=t,this},a.prototype.optional=function(){return this._baseState.optional=!0,this},a.prototype.def=function(t){const e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},a.prototype.explicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},a.prototype.implicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},a.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},a.prototype.key=function(t){const e=this._baseState;return s(null===e.key),e.key=t,this},a.prototype.any=function(){return this._baseState.any=!0,this},a.prototype.choice=function(t){const e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},a.prototype.contains=function(t){const e=this._baseState;return s(null===e.use),e.contains=t,this},a.prototype._decode=function(t,e){const r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));let n,o=r.default,s=!0,c=null;if(null!==r.key&&(c=t.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(s=this._peekTag(t,n,r.any),t.isError(s))return s}else{const n=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(n)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){const e=this._decodeTag(t,r.explicit);if(t.isError(e))return e;t=e}const n=t.offset;if(null===r.use&&null===r.choice){let e;r.any&&(e=t.save());const n=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(n))return n;r.any?o=t.raw(e):t=n}if(e&&e.track&&null!==r.tag&&e.track(t.path(),n,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(o=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(o))return o;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new i(o);o=this._getUse(r.contains,t._reporterState.obj)._decode(n,e)}}return r.obj&&s&&(o=t.leaveObject(n)),null===r.key||null===o&&!0!==s?null!==c&&t.exitKey(c):t.leaveKey(c,r.key,o),o},a.prototype._decodeGeneric=function(t,e,r){const n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},a.prototype._getUse=function(t,e){const r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},a.prototype._decodeChoice=function(t,e){const r=this._baseState;let n=null,o=!1;return Object.keys(r.choice).some((function(i){const s=t.save(),c=r.choice[i];try{const r=c._decode(t,e);if(t.isError(r))return!1;n={type:i,value:r},o=!0}catch(e){return t.restore(s),!1}return!0}),this),o?n:t.error("Choice not matched")},a.prototype._createEncoderBuffer=function(t){return new o(t,this.reporter)},a.prototype._encode=function(t,e,r){const n=this._baseState;if(null!==n.default&&n.default===t)return;const o=this._encodeValue(t,e,r);return void 0===o||this._skipDefault(o,e,r)?void 0:o},a.prototype._encodeValue=function(t,e,r){const o=this._baseState;if(null===o.parent)return o.children[0]._encode(t,e||new n);let i=null;if(this.reporter=e,o.optional&&void 0===t){if(null===o.default)return;t=o.default}let s=null,c=!1;if(o.any)i=this._createEncoderBuffer(t);else if(o.choice)i=this._encodeChoice(t,e);else if(o.contains)s=this._getUse(o.contains,r)._encode(t,e),c=!0;else if(o.children)s=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");const n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const o=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),o}),this).filter((function(t){return t})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return e.error("Too many args for : "+o.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(r){const n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),r))}else null!==o.use?i=this._getUse(o.use,r)._encode(t,e):(s=this._encodePrimitive(o.tag,t),c=!0);if(!o.any&&null===o.choice){const t=null!==o.implicit?o.implicit:o.tag,r=null===o.implicit?"universal":"context";null===t?null===o.use&&e.error("Tag could be omitted only for .use()"):null===o.use&&(i=this._encodeComposite(t,c,r,s))}return null!==o.explicit&&(i=this._encodeComposite(o.explicit,!1,"context",i)),i},a.prototype._encodeChoice=function(t,e){const r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},a.prototype._encodePrimitive=function(t,e){const r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},a.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},a.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},"2b73":function(t,e,r){"use strict";const n=r("a092"),o=r("57de").Buffer,i=r("2879"),s=r("23d9");function c(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){i.call(this,"der",t)}function a(t){return t<10?"0"+t:t}t.exports=c,c.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,i),u.prototype._encodeComposite=function(t,e,r,n){const i=function(t,e,r,n){let o;"seqof"===t?t="seq":"setof"===t&&(t="set");if(s.tagByName.hasOwnProperty(t))o=s.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);o=t}if(o>=31)return n.error("Multi-octet tag encoding unsupported");e||(o|=32);return o|=s.tagClassByName[r||"universal"]<<6,o}(t,e,r,this.reporter);if(n.length<128){const t=o.alloc(2);return t[0]=i,t[1]=n.length,this._createEncoderBuffer([t,n])}let c=1;for(let t=n.length;t>=256;t>>=8)c++;const u=o.alloc(2+c);u[0]=i,u[1]=128|c;for(let t=1+c,e=n.length;e>0;t--,e>>=8)u[t]=255&e;return this._createEncoderBuffer([u,n])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=o.alloc(2*t.length);for(let r=0;r<t.length;r++)e.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(e)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let n=0;for(let e=0;e<t.length;e++){let r=t[e];for(n++;r>=128;r>>=7)n++}const i=o.alloc(n);let s=i.length-1;for(let e=t.length-1;e>=0;e--){let r=t[e];for(i[s--]=127&r;(r>>=7)>0;)i[s--]=128|127&r}return this._createEncoderBuffer(i)},u.prototype._encodeTime=function(t,e){let r;const n=new Date(t);return"gentime"===e?r=[a(n.getUTCFullYear()),a(n.getUTCMonth()+1),a(n.getUTCDate()),a(n.getUTCHours()),a(n.getUTCMinutes()),a(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[a(n.getUTCFullYear()%100),a(n.getUTCMonth()+1),a(n.getUTCDate()),a(n.getUTCHours()),a(n.getUTCMinutes()),a(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!o.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=o.from(e)}if(o.isBuffer(t)){let e=t.length;0===t.length&&e++;const r=o.alloc(e);return t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const n=new Array(r);for(let e=n.length-1;e>=0;e--)n[e]=255&t,t>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(o.from(n))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){const n=this._baseState;let o;if(null===n.default)return!1;const i=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),i.length!==n.defaultBuffer.length)return!1;for(o=0;o<i.length;o++)if(i[o]!==n.defaultBuffer[o])return!1;return!0}},"3b43":function(t,e,r){"use strict";const n=r("a092"),o=r("57de").Buffer,i=r("f019");function s(t){i.call(this,t),this.enc="pem"}n(s,i),t.exports=s,s.prototype.decode=function(t,e){const r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let c=-1,u=-1;for(let t=0;t<r.length;t++){const e=r[t].match(s);if(null!==e&&e[2]===n){if(-1!==c){if("END"!==e[1])break;u=t;break}if("BEGIN"!==e[1])break;c=t}}if(-1===c||-1===u)throw new Error("PEM section not found for: "+n);const a=r.slice(c+1,u).join("");a.replace(/[^a-z0-9+/=]+/gi,"");const l=o.from(a,"base64");return i.prototype.decode.call(this,l,e)}},"6b20":function(t,e,r){"use strict";const n=e;n.bignum=r("409f"),n.define=r("cbbf").define,n.base=r("ae0b"),n.constants=r("c3d0"),n.decoders=r("d9c2"),n.encoders=r("02b8")},ae0b:function(t,e,r){"use strict";const n=e;n.Reporter=r("e70b").Reporter,n.DecoderBuffer=r("072c").DecoderBuffer,n.EncoderBuffer=r("072c").EncoderBuffer,n.Node=r("2879")},c3d0:function(t,e,r){"use strict";const n=e;n._reverse=function(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e},n.der=r("23d9")},cbbf:function(t,e,r){"use strict";const n=r("02b8"),o=r("d9c2"),i=r("a092");function s(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new s(t,e)},s.prototype._createNamed=function(t){const e=this.name;function r(t){this._initNamed(t,e)}return i(r,t),r.prototype._initNamed=function(e,r){t.call(this,e,r)},new r(this)},s.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(o[t])),this.decoders[t]},s.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},s.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n[t])),this.encoders[t]},s.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},d9c2:function(t,e,r){"use strict";const n=e;n.der=r("f019"),n.pem=r("3b43")},e70b:function(t,e,r){"use strict";const n=r("a092");function o(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function i(t,e){this.path=t,this.rethrow(e)}e.Reporter=o,o.prototype.isError=function(t){return t instanceof i},o.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},o.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},o.prototype.enterKey=function(t){return this._reporterState.path.push(t)},o.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},o.prototype.leaveKey=function(t,e,r){const n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},o.prototype.leaveObject=function(t){const e=this._reporterState,r=e.obj;return e.obj=t,r},o.prototype.error=function(t){let e;const r=this._reporterState,n=t instanceof i;if(e=n?t:new i(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},o.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(i,Error),i.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},f019:function(t,e,r){"use strict";const n=r("a092"),o=r("409f"),i=r("072c").DecoderBuffer,s=r("2879"),c=r("23d9");function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new a,this.tree._init(t.body)}function a(t){s.call(this,"der",t)}function l(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;const n=c.tagClass[r>>6],o=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=t.readUInt8(e),t.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:o,tag:r,tagStr:c.tag[r]}}function f(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;const o=127&n;if(o>4)return t.error("length octect is too long");n=0;for(let e=0;e<o;e++){n<<=8;const e=t.readUInt8(r);if(t.isError(e))return e;n|=e}return n}t.exports=u,u.prototype.decode=function(t,e){return i.isDecoderBuffer(t)||(t=new i(t,e)),this.tree._decode(t,e)},n(a,s),a.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;const n=t.save(),o=l(t,'Failed to peek tag: "'+e+'"');return t.isError(o)?o:(t.restore(n),o.tag===e||o.tagStr===e||o.tagStr+"of"===e||r)},a.prototype._decodeTag=function(t,e,r){const n=l(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;let o=f(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(o))return o;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==o)return t.skip(o,'Failed to match body of: "'+e+'"');const i=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(o=t.offset-i.offset,t.restore(i),t.skip(o,'Failed to match body of: "'+e+'"'))},a.prototype._skipUntilEnd=function(t,e){for(;;){const r=l(t,e);if(t.isError(r))return r;const n=f(t,r.primitive,e);if(t.isError(n))return n;let o;if(o=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(o))return o;if("end"===r.tagStr)break}},a.prototype._decodeList=function(t,e,r,n){const o=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const i=r.decode(t,"der",n);if(t.isError(i)&&e)break;o.push(i)}return o},a.prototype._decodeStr=function(t,e){if("bitstr"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if("bmpstr"===e){const e=t.raw();if(e.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");let r="";for(let t=0;t<e.length/2;t++)r+=String.fromCharCode(e.readUInt16BE(2*t));return r}if("numstr"===e){const e=t.raw().toString("ascii");return this._isNumstr(e)?e:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){const e=t.raw().toString("ascii");return this._isPrintstr(e)?e:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},a.prototype._decodeObjid=function(t,e,r){let n;const o=[];let i=0,s=0;for(;!t.isEmpty();)s=t.readUInt8(),i<<=7,i|=127&s,0==(128&s)&&(o.push(i),i=0);128&s&&o.push(i);const c=o[0]/40|0,u=o[0]%40;if(n=r?o:[c,u].concat(o.slice(1)),e){let t=e[n.join(" ")];void 0===t&&(t=e[n.join(".")]),void 0!==t&&(n=t)}return n},a.prototype._decodeTime=function(t,e){const r=t.raw().toString();let n,o,i,s,c,u;if("gentime"===e)n=0|r.slice(0,4),o=0|r.slice(4,6),i=0|r.slice(6,8),s=0|r.slice(8,10),c=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),o=0|r.slice(2,4),i=0|r.slice(4,6),s=0|r.slice(6,8),c=0|r.slice(8,10),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,o-1,i,s,c,u,0)},a.prototype._decodeNull=function(){return null},a.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},a.prototype._decodeInt=function(t,e){const r=t.raw();let n=new o(r);return e&&(n=e[n.toString(10)]||n),n},a.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}}}]);