>>4^$))<<4,w^=a=65535&(($^=a)>>>-16^w),w^=(a=858993459&(w>>>2^($^=a<<-16)))<<2,w^=a=65535&(($^=a)>>>-16^w),w^=(a=1431655765&(w>>>1^($^=a<<-16)))<<1,w^=a=16711935&(($^=a)>>>8^w),a=(w^=(a=1431655765&(w>>>1^($^=a<<8)))<<1)<<8|($^=a)>>>20&240,w=$<<24|$<<8&16711680|$>>>8&65280|$>>>24&240,$=a;for(var j=0;j>>26,$=$<<2|$>>>26):(w=w<<1|w>>>27,$=$<<1|$>>>27),$&=-15;var x=t[(w&=-15)>>>28]|r[w>>>24&15]|i[w>>>20&15]|n[w>>>16&15]|s[w>>>12&15]|o[w>>>8&15]|l[w>>>4&15],z=c[$>>>28]|u[$>>>24&15]|d[$>>>20&15]|h[$>>>16&15]|m[$>>>12&15]|p[$>>>8&15]|g[$>>>4&15];a=65535&(z>>>16^x),b[k++]=x^a,b[k++]=z^a<<16}}return b}(a),this._init=!0}},i("DES-ECB",r.cipher.modes.ecb),i("DES-CBC",r.cipher.modes.cbc),i("DES-CFB",r.cipher.modes.cfb),i("DES-OFB",r.cipher.modes.ofb),i("DES-CTR",r.cipher.modes.ctr),i("3DES-ECB",r.cipher.modes.ecb),i("3DES-CBC",r.cipher.modes.cbc),i("3DES-CFB",r.cipher.modes.cfb),i("3DES-OFB",r.cipher.modes.ofb),i("3DES-CTR",r.cipher.modes.ctr);var n=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],o=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],l=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],d=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function m(e,a,t,r){var i,m,p=32===e.length?3:9;i=3===p?r?[30,-2,-2]:[0,32,2]:r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=a[0],f=a[1];g^=(m=252645135&(g>>>4^f))<<4,g^=(m=65535&(g>>>16^(f^=m)))<<16,g^=m=858993459&((f^=m)>>>2^g),g^=m=16711935&((f^=m<<2)>>>8^g),g=(g^=(m=1431655765&(g>>>1^(f^=m<<8)))<<1)<<1|g>>>31,f=(f^=m)<<1|f>>>31;for(var b=0;b>>4|f<<28)^e[v+1];m=g,g=f,f=m^(s[w>>>24&63]|l[w>>>16&63]|u[w>>>8&63]|h[63&w]|n[$>>>24&63]|o[$>>>16&63]|c[$>>>8&63]|d[63&$])}m=g,g=f,f=m}f=f>>>1|f<<31,f^=m=1431655765&((g=g>>>1|g<<31)>>>1^f),f^=(m=16711935&(f>>>8^(g^=m<<1)))<<8,f^=(m=858993459&(f>>>2^(g^=m)))<<2,f^=m=65535&((g^=m)>>>16^f),f^=m=252645135&((g^=m<<16)>>>4^f),g^=m<<4,t[0]=g,t[1]=f}function p(e){var a,t="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(a=e.decrypt?r.cipher.createDecipher(t,e.key):r.cipher.createCipher(t,e.key)).start;return a.start=function(e,t){var n=null;t instanceof r.util.ByteBuffer&&(n=t,t={}),(t=t||{}).output=n,t.iv=e,i.call(a,t)},a}},10492:(e,a,t)=>{var r=t(52154);t(11560),t(43727),t(1421),t(75911);var i=t(57475),n=i.publicKeyValidator,s=i.privateKeyValidator;if(void 0===o)var o=r.jsbn.BigInteger;var l=r.util.ByteBuffer,c="undefined"==typeof Buffer?Uint8Array:Buffer;r.pki=r.pki||{},e.exports=r.pki.ed25519=r.ed25519=r.ed25519||{};var u=r.ed25519;function d(e){var a=e.message;if(a instanceof Uint8Array||a instanceof c)return a;var t=e.encoding;if(void 0===a){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');a=e.md.digest().getBytes(),t="binary"}if("string"==typeof a&&!t)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof a){if("undefined"!=typeof Buffer)return Buffer.from(a,t);a=new l(a,t)}else if(!(a instanceof l))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var r=new c(a.length()),i=0;i=0;--t)D(r,r),1!==t&&P(r,r,a);for(t=0;t<16;++t)e[t]=r[t]}(t,t),P(t,t,i),P(t,t,n),P(t,t,n),P(e[0],t,n),D(r,e[0]),P(r,r,n),E(r,i)&&P(e[0],e[0],k);if(D(r,e[0]),P(r,r,n),E(r,i))return-1;_(e[0])===a[31]>>7&&L(e[0],h,e[0]);return P(e[3],e[0],e[1]),0}(o,r))return-1;for(i=0;i=0};var h=R(),m=R([1]),p=R([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=R([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=R([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),b=R([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),y=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),k=R([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function v(e,a){var t=r.md.sha512.create(),i=new l(e);t.update(i.getBytes(a),"binary");var n=t.digest().getBytes();if("undefined"!=typeof Buffer)return Buffer.from(n,"binary");for(var s=new c(u.constants.HASH_BYTE_LENGTH),o=0;o<64;++o)s[o]=n.charCodeAt(o);return s}function w(e,a){var t,r,i,n;for(r=63;r>=32;--r){for(t=0,i=r-32,n=r-12;i>8,a[i]-=256*t;a[i]+=t,a[r]=0}for(t=0,i=0;i<32;++i)a[i]+=t-(a[31]>>4)*y[i],t=a[i]>>8,a[i]&=255;for(i=0;i<32;++i)a[i]-=t*y[i];for(r=0;r<32;++r)a[r+1]+=a[r]>>8,e[r]=255&a[r]}function $(e){for(var a=new Float64Array(64),t=0;t<64;++t)a[t]=e[t],e[t]=0;w(e,a)}function j(e,a){var t=R(),r=R(),i=R(),n=R(),s=R(),o=R(),l=R(),c=R(),u=R();L(t,e[1],e[0]),L(u,a[1],a[0]),P(t,t,u),N(r,e[0],e[1]),N(u,a[0],a[1]),P(r,r,u),P(i,e[3],a[3]),P(i,i,g),P(n,e[2],a[2]),N(n,n,n),L(s,r,t),L(o,n,i),N(l,n,i),N(c,r,t),P(e[0],s,o),P(e[1],c,l),P(e[2],l,o),P(e[3],s,c)}function x(e,a,t){for(var r=0;r<4;++r)B(e[r],a[r],t)}function z(e,a){var t=R(),r=R(),i=R();!function(e,a){var t,r=R();for(t=0;t<16;++t)r[t]=a[t];for(t=253;t>=0;--t)D(r,r),2!==t&&4!==t&&P(r,r,a);for(t=0;t<16;++t)e[t]=r[t]}(i,a[2]),P(t,a[0],i),P(r,a[1],i),C(e,r),e[31]^=_(t)<<7}function C(e,a){var t,r,i,n=R(),s=R();for(t=0;t<16;++t)s[t]=a[t];for(A(s),A(s),A(s),r=0;r<2;++r){for(n[0]=s[0]-65517,t=1;t<15;++t)n[t]=s[t]-65535-(n[t-1]>>16&1),n[t-1]&=65535;n[15]=s[15]-32767-(n[14]>>16&1),i=n[15]>>16&1,n[14]&=65535,B(s,n,1-i)}for(t=0;t<16;t++)e[2*t]=255&s[t],e[2*t+1]=s[t]>>8}function E(e,a){var t=new c(32),r=new c(32);return C(t,e),C(r,a),S(t,0,r,0)}function S(e,a,t,r){return function(e,a,t,r,i){var n,s=0;for(n=0;n>>8)-1}(e,a,t,r,32)}function _(e){var a=new c(32);return C(a,e),1&a[0]}function q(e,a,t){var r,i;for(I(e[0],h),I(e[1],m),I(e[2],m),I(e[3],h),i=255;i>=0;--i)x(e,a,r=t[i/8|0]>>(7&i)&1),j(a,e),j(e,e),x(e,a,r)}function T(e,a){var t=[R(),R(),R(),R()];I(t[0],f),I(t[1],b),I(t[2],m),P(t[3],f,b),q(e,t,a)}function I(e,a){var t;for(t=0;t<16;t++)e[t]=0|a[t]}function A(e){var a,t,r=1;for(a=0;a<16;++a)t=e[a]+r+65535,r=Math.floor(t/65536),e[a]=t-65536*r;e[0]+=r-1+37*(r-1)}function B(e,a,t){for(var r,i=~(t-1),n=0;n<16;++n)r=i&(e[n]^a[n]),e[n]^=r,a[n]^=r}function R(e){var a,t=new Float64Array(16);if(e)for(a=0;a{e.exports={options:{usePureJavaScript:!1}}},47476:(e,a,t)=>{var r=t(52154);t(78765),t(75911),(e.exports=r.hmac=r.hmac||{}).create=function(){var e=null,a=null,t=null,i=null,n={start:function(n,s){if(null!==n)if("string"==typeof n){if(!((n=n.toLowerCase())in r.md.algorithms))throw new Error('Unknown hash algorithm "'+n+'"');a=r.md.algorithms[n].create()}else a=n;if(null===s)s=e;else{if("string"==typeof s)s=r.util.createBuffer(s);else if(r.util.isArray(s)){var o=s;s=r.util.createBuffer();for(var l=0;la.blockLength&&(a.start(),a.update(s.bytes()),s=a.digest()),t=r.util.createBuffer(),i=r.util.createBuffer(),c=s.length();for(l=0;l{e.exports=t(52154),t(41954),t(21268),t(68159),t(38074),t(32119),t(10492),t(47476),t(6126),t(77387),t(45821),t(49321),t(31269),t(24800),t(5206),t(86724),t(26364),t(99879),t(90949),t(21023),t(49713),t(43727),t(44385),t(31581),t(75257),t(75911)},11560:(e,a,t)=>{var r,i=t(52154);e.exports=i.jsbn=i.jsbn||{};function n(e,a,t){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,a,t):null==a&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,a))}function s(){return new n(null)}function o(e,a,t,r,i,n){for(var s=16383&a,o=a>>14;--n>=0;){var l=16383&this.data[e],c=this.data[e++]>>14,u=o*l+c*s;i=((l=s*l+((16383&u)<<14)+t.data[r]+i)>>28)+(u>>14)+o*c,t.data[r++]=268435455&l}return i}i.jsbn.BigInteger=n,"undefined"==typeof navigator?(n.prototype.am=o,r=28):"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(e,a,t,r,i,n){for(var s=32767&a,o=a>>15;--n>=0;){var l=32767&this.data[e],c=this.data[e++]>>15,u=o*l+c*s;i=((l=s*l+((32767&u)<<15)+t.data[r]+(1073741823&i))>>>30)+(u>>>15)+o*c+(i>>>30),t.data[r++]=1073741823&l}return i},r=30):"Netscape"!=navigator.appName?(n.prototype.am=function(e,a,t,r,i,n){for(;--n>=0;){var s=a*this.data[e++]+t.data[r]+i;i=Math.floor(s/67108864),t.data[r++]=67108863&s}return i},r=26):(n.prototype.am=o,r=28),n.prototype.DB=r,n.prototype.DM=(1<>>16)&&(e=a,t+=16),0!=(a=e>>8)&&(e=a,t+=8),0!=(a=e>>4)&&(e=a,t+=4),0!=(a=e>>2)&&(e=a,t+=2),0!=(a=e>>1)&&(e=a,t+=1),t}function g(e){this.m=e}function f(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,a+=16),0==(255&e)&&(e>>=8,a+=8),0==(15&e)&&(e>>=4,a+=4),0==(3&e)&&(e>>=2,a+=2),0==(1&e)&&++a,a}function $(e){for(var a=0;0!=e;)e&=e-1,++a;return a}function j(){}function x(e){return e}function z(e){this.r2=s(),this.q3=s(),n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,a,t){e.multiplyTo(a,t),this.reduce(t)},g.prototype.sqrTo=function(e,a){e.squareTo(a),this.reduce(a)},f.prototype.convert=function(e){var a=s();return e.abs().dlShiftTo(this.m.t,a),a.divRemTo(this.m,null,a),e.s<0&&a.compareTo(n.ZERO)>0&&this.m.subTo(a,a),a},f.prototype.revert=function(e){var a=s();return e.copyTo(a),this.reduce(a),a},f.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var a=0;a>15)*this.mpl&this.um)<<15)&e.DM;for(t=a+this.m.t,e.data[t]+=this.m.am(0,r,e,a,0,this.m.t);e.data[t]>=e.DV;)e.data[t]-=e.DV,e.data[++t]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},f.prototype.mulTo=function(e,a,t){e.multiplyTo(a,t),this.reduce(t)},f.prototype.sqrTo=function(e,a){e.squareTo(a),this.reduce(a)},n.prototype.copyTo=function(e){for(var a=this.t-1;a>=0;--a)e.data[a]=this.data[a];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,a){var t;if(16==a)t=4;else if(8==a)t=3;else if(256==a)t=8;else if(2==a)t=1;else if(32==a)t=5;else{if(4!=a)return void this.fromRadix(e,a);t=2}this.t=0,this.s=0;for(var r=e.length,i=!1,s=0;--r>=0;){var o=8==t?255&e[r]:h(e,r);o<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==s?this.data[this.t++]=o:s+t>this.DB?(this.data[this.t-1]|=(o&(1<>this.DB-s):this.data[this.t-1]|=o<=this.DB&&(s-=this.DB))}8==t&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,a){var t;for(t=this.t-1;t>=0;--t)a.data[t+e]=this.data[t];for(t=e-1;t>=0;--t)a.data[t]=0;a.t=this.t+e,a.s=this.s},n.prototype.drShiftTo=function(e,a){for(var t=e;t=0;--t)a.data[t+s+1]=this.data[t]>>i|o,o=(this.data[t]&n)<=0;--t)a.data[t]=0;a.data[s]=o,a.t=this.t+s+1,a.s=this.s,a.clamp()},n.prototype.rShiftTo=function(e,a){a.s=this.s;var t=Math.floor(e/this.DB);if(t>=this.t)a.t=0;else{var r=e%this.DB,i=this.DB-r,n=(1<>r;for(var s=t+1;s>r;r>0&&(a.data[this.t-t-1]|=(this.s&n)<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;t>=this.DB;r-=e.s}a.s=r<0?-1:0,r<-1?a.data[t++]=this.DV+r:r>0&&(a.data[t++]=r),a.t=t,a.clamp()},n.prototype.multiplyTo=function(e,a){var t=this.abs(),r=e.abs(),i=t.t;for(a.t=i+r.t;--i>=0;)a.data[i]=0;for(i=0;i=0;)e.data[t]=0;for(t=0;t=a.DV&&(e.data[t+a.t]-=a.DV,e.data[t+a.t+1]=1)}e.t>0&&(e.data[e.t-1]+=a.am(t,a.data[t],e,2*t,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,a,t){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t0?(r.lShiftTo(u,o),i.lShiftTo(u,t)):(r.copyTo(o),i.copyTo(t));var d=o.t,h=o.data[d-1];if(0!=h){var m=h*(1<1?o.data[d-2]>>this.F2:0),g=this.FV/m,f=(1<=0&&(t.data[t.t++]=1,t.subTo(v,t)),n.ONE.dlShiftTo(d,v),v.subTo(o,o);o.t=0;){var w=t.data[--y]==h?this.DM:Math.floor(t.data[y]*g+(t.data[y-1]+b)*f);if((t.data[y]+=o.am(0,w,t,k,0,d))0&&t.rShiftTo(u,t),l<0&&n.ZERO.subTo(t,t)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var a=3&e;return(a=(a=(a=(a=a*(2-(15&e)*a)&15)*(2-(255&e)*a)&255)*(2-((65535&e)*a&65535))&65535)*(2-e*a%this.DV)%this.DV)>0?this.DV-a:-a},n.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},n.prototype.exp=function(e,a){if(e>4294967295||e<1)return n.ONE;var t=s(),r=s(),i=a.convert(this),o=p(e)-1;for(i.copyTo(t);--o>=0;)if(a.sqrTo(t,r),(e&1<0)a.mulTo(r,i,t);else{var l=t;t=r,r=l}return a.revert(t)},n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var a;if(16==e)a=4;else if(8==e)a=3;else if(2==e)a=1;else if(32==e)a=5;else{if(4!=e)return this.toRadix(e);a=2}var t,r=(1<0)for(o>o)>0&&(i=!0,n=d(t));s>=0;)o>(o+=this.DB-a)):(t=this.data[s]>>(o-=a)&r,o<=0&&(o+=this.DB,--s)),t>0&&(i=!0),i&&(n+=d(t));return i?n:"0"},n.prototype.negate=function(){var e=s();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var a=this.s-e.s;if(0!=a)return a;var t=this.t;if(0!=(a=t-e.t))return this.s<0?-a:a;for(;--t>=0;)if(0!=(a=this.data[t]-e.data[t]))return a;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var a=s();return this.abs().divRemTo(e,null,a),this.s<0&&a.compareTo(n.ZERO)>0&&e.subTo(a,a),a},n.prototype.modPowInt=function(e,a){var t;return t=e<256||a.isEven()?new g(a):new f(a),this.exp(e,t)},n.ZERO=m(0),n.ONE=m(1),j.prototype.convert=x,j.prototype.revert=x,j.prototype.mulTo=function(e,a,t){e.multiplyTo(a,t)},j.prototype.sqrTo=function(e,a){e.squareTo(a)},z.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var a=s();return e.copyTo(a),this.reduce(a),a},z.prototype.revert=function(e){return e},z.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},z.prototype.mulTo=function(e,a,t){e.multiplyTo(a,t),this.reduce(t)},z.prototype.sqrTo=function(e,a){e.squareTo(a),this.reduce(a)};var C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],E=(1<<26)/C[C.length-1];n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var a=this.chunkSize(e),t=Math.pow(e,a),r=m(t),i=s(),n=s(),o="";for(this.divRemTo(r,i,n);i.signum()>0;)o=(t+n.intValue()).toString(e).substr(1)+o,i.divRemTo(r,i,n);return n.intValue().toString(e)+o},n.prototype.fromRadix=function(e,a){this.fromInt(0),null==a&&(a=10);for(var t=this.chunkSize(a),r=Math.pow(a,t),i=!1,s=0,o=0,l=0;l=t&&(this.dMultiply(r),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(a,s)),this.dAddOffset(o,0)),i&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,a,t){if("number"==typeof a)if(e<2)this.fromInt(1);else for(this.fromNumber(e,t),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(a);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var r=new Array,i=7&e;r.length=1+(e>>3),a.nextBytes(r),i>0?r[0]&=(1<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;t>=this.DB;r+=e.s}a.s=r<0?-1:0,r>0?a.data[t++]=r:r<-1&&(a.data[t++]=this.DV+r),a.t=t,a.clamp()},n.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,a){if(0!=e){for(;this.t<=a;)this.data[this.t++]=0;for(this.data[a]+=e;this.data[a]>=this.DV;)this.data[a]-=this.DV,++a>=this.t&&(this.data[this.t++]=0),++this.data[a]}},n.prototype.multiplyLowerTo=function(e,a,t){var r,i=Math.min(this.t+e.t,a);for(t.s=0,t.t=i;i>0;)t.data[--i]=0;for(r=t.t-this.t;i=0;)t.data[r]=0;for(r=Math.max(a-this.t,0);r0)if(0==a)t=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)t=(a*t+this.data[r])%e;return t},n.prototype.millerRabin=function(e){var a=this.subtract(n.ONE),t=a.getLowestSetBit();if(t<=0)return!1;for(var r,i=a.shiftRight(t),s={nextBytes:function(e){for(var a=0;a=0);var l=r.modPow(i,this);if(0!=l.compareTo(n.ONE)&&0!=l.compareTo(a)){for(var c=1;c++>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,a=new Array;a[0]=this.s;var t,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r>r)!=(this.s&this.DM)>>r&&(a[i++]=t|this.s<=0;)r<8?(t=(this.data[e]&(1<>(r+=this.DB-8)):(t=this.data[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&t)&&(t|=-256),0==i&&(128&this.s)!=(128&t)&&++i,(i>0||t!=this.s)&&(a[i++]=t);return a},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var a=s();return this.bitwiseTo(e,b,a),a},n.prototype.or=function(e){var a=s();return this.bitwiseTo(e,y,a),a},n.prototype.xor=function(e){var a=s();return this.bitwiseTo(e,k,a),a},n.prototype.andNot=function(e){var a=s();return this.bitwiseTo(e,v,a),a},n.prototype.not=function(){for(var e=s(),a=0;a=this.t?0!=this.s:0!=(this.data[a]&1<1){var d=s();for(r.sqrTo(o[1],d);l<=u;)o[l]=s(),r.mulTo(d,o[l-2],o[l]),l+=2}var h,b,y=e.t-1,k=!0,v=s();for(i=p(e.data[y])-1;y>=0;){for(i>=c?h=e.data[y]>>i-c&u:(h=(e.data[y]&(1<0&&(h|=e.data[y-1]>>this.DB+i-c)),l=t;0==(1&h);)h>>=1,--l;if((i-=l)<0&&(i+=this.DB,--y),k)o[h].copyTo(n),k=!1;else{for(;l>1;)r.sqrTo(n,v),r.sqrTo(v,n),l-=2;l>0?r.sqrTo(n,v):(b=n,n=v,v=b),r.mulTo(v,o[h],n)}for(;y>=0&&0==(e.data[y]&1<=0?(t.subTo(r,t),a&&i.subTo(o,i),s.subTo(l,s)):(r.subTo(t,r),a&&o.subTo(i,o),l.subTo(s,l))}return 0!=r.compareTo(n.ONE)?n.ZERO:l.compareTo(e)>=0?l.subtract(e):l.signum()<0?(l.addTo(e,l),l.signum()<0?l.add(e):l):l},n.prototype.pow=function(e){return this.exp(e,new j)},n.prototype.gcd=function(e){var a=this.s<0?this.negate():this.clone(),t=e.s<0?e.negate():e.clone();if(a.compareTo(t)<0){var r=a;a=t,t=r}var i=a.getLowestSetBit(),n=t.getLowestSetBit();if(n<0)return a;for(i0&&(a.rShiftTo(n,a),t.rShiftTo(n,t));a.signum()>0;)(i=a.getLowestSetBit())>0&&a.rShiftTo(i,a),(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),a.compareTo(t)>=0?(a.subTo(t,a),a.rShiftTo(1,a)):(t.subTo(a,t),t.rShiftTo(1,t));return n>0&&t.lShiftTo(n,t),t},n.prototype.isProbablePrime=function(e){var a,t=this.abs();if(1==t.t&&t.data[0]<=C[C.length-1]){for(a=0;a{var r=t(52154);t(75911),t(43727),t(11560),e.exports=r.kem=r.kem||{};var i=r.jsbn.BigInteger;function n(e,a,t,i){e.generate=function(e,n){for(var s=new r.util.ByteBuffer,o=Math.ceil(n/i)+t,l=new r.util.ByteBuffer,c=t;c0&&(s=r.util.fillString(String.fromCharCode(0),l)+s),{encapsulation:a.encrypt(s,"NONE"),key:e.generate(s,n)}},decrypt:function(a,t,r){var i=a.decrypt(t,"NONE");return e.generate(i,r)}};return n},r.kem.kdf1=function(e,a){n(this,e,0,a||e.digestLength)},r.kem.kdf2=function(e,a){n(this,e,1,a||e.digestLength)}},77387:(e,a,t)=>{var r=t(52154);t(75911),e.exports=r.log=r.log||{},r.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},n=[],s=null;r.log.LEVEL_LOCKED=2,r.log.NO_LEVEL_CHECK=4,r.log.INTERPOLATE=8;for(var o=0;o{e.exports=t(78765),t(45073),t(48823),t(8017),t(1421)},78765:(e,a,t)=>{var r=t(52154);e.exports=r.md=r.md||{},r.md.algorithms=r.md.algorithms||{}},45073:(e,a,t)=>{var r=t(52154);t(78765),t(75911);var i=e.exports=r.md5=r.md5||{};r.md.md5=r.md.algorithms.md5=i,i.create=function(){c||function(){n=String.fromCharCode(128),n+=r.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],o=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],l=new Array(64);for(var e=0;e<64;++e)l[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));c=!0}();var e=null,a=r.util.createBuffer(),t=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var t=i.messageLengthSize/4,n=0;n>>0,o>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=o[1],o[1]=o[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,o[0]=o[1]/4294967296>>>0;return a.putBytes(n),u(e,t,a),(a.read>2048||0===a.length())&&a.compact(),i},i.digest=function(){var s=r.util.createBuffer();s.putBytes(a.bytes());var o=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(n.substr(0,i.blockLength-o));for(var l,c=0,d=i.fullMessageLength.length-1;d>=0;--d)c=(l=8*i.fullMessageLength[d]+c)/4294967296>>>0,s.putInt32Le(l>>>0);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};u(h,t,s);var m=r.util.createBuffer();return m.putInt32Le(h.h0),m.putInt32Le(h.h1),m.putInt32Le(h.h2),m.putInt32Le(h.h3),m},i};var n=null,s=null,o=null,l=null,c=!1;function u(e,a,t){for(var r,i,n,c,u,d,h,m=t.length();m>=64;){for(i=e.h0,n=e.h1,c=e.h2,u=e.h3,h=0;h<16;++h)a[h]=t.getInt32Le(),r=i+(u^n&(c^u))+l[h]+a[h],i=u,u=c,c=n,n+=r<<(d=o[h])|r>>>32-d;for(;h<32;++h)r=i+(c^u&(n^c))+l[h]+a[s[h]],i=u,u=c,c=n,n+=r<<(d=o[h])|r>>>32-d;for(;h<48;++h)r=i+(n^c^u)+l[h]+a[s[h]],i=u,u=c,c=n,n+=r<<(d=o[h])|r>>>32-d;for(;h<64;++h)r=i+(c^(n|~u))+l[h]+a[s[h]],i=u,u=c,c=n,n+=r<<(d=o[h])|r>>>32-d;e.h0=e.h0+i|0,e.h1=e.h1+n|0,e.h2=e.h2+c|0,e.h3=e.h3+u|0,m-=64}}},60086:(e,a,t)=>{var r=t(52154);t(49321),e.exports=r.mgf=r.mgf||{},r.mgf.mgf1=r.mgf1},49321:(e,a,t)=>{var r=t(52154);t(75911),r.mgf=r.mgf||{},(e.exports=r.mgf.mgf1=r.mgf1=r.mgf1||{}).create=function(e){return{generate:function(a,t){for(var i=new r.util.ByteBuffer,n=Math.ceil(t/e.digestLength),s=0;s{var r=t(52154);r.pki=r.pki||{};var i=e.exports=r.pki.oids=r.oids=r.oids||{};function n(e,a){i[e]=a,i[a]=e}function s(e,a){i[e]=a}n("1.2.840.113549.1.1.1","rsaEncryption"),n("1.2.840.113549.1.1.4","md5WithRSAEncryption"),n("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),n("1.2.840.113549.1.1.7","RSAES-OAEP"),n("1.2.840.113549.1.1.8","mgf1"),n("1.2.840.113549.1.1.9","pSpecified"),n("1.2.840.113549.1.1.10","RSASSA-PSS"),n("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),n("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),n("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),n("1.3.101.112","EdDSA25519"),n("1.2.840.10040.4.3","dsa-with-sha1"),n("1.3.14.3.2.7","desCBC"),n("1.3.14.3.2.26","sha1"),n("1.3.14.3.2.29","sha1WithRSASignature"),n("2.16.840.1.101.3.4.2.1","sha256"),n("2.16.840.1.101.3.4.2.2","sha384"),n("2.16.840.1.101.3.4.2.3","sha512"),n("2.16.840.1.101.3.4.2.4","sha224"),n("2.16.840.1.101.3.4.2.5","sha512-224"),n("2.16.840.1.101.3.4.2.6","sha512-256"),n("1.2.840.113549.2.2","md2"),n("1.2.840.113549.2.5","md5"),n("1.2.840.113549.1.7.1","data"),n("1.2.840.113549.1.7.2","signedData"),n("1.2.840.113549.1.7.3","envelopedData"),n("1.2.840.113549.1.7.4","signedAndEnvelopedData"),n("1.2.840.113549.1.7.5","digestedData"),n("1.2.840.113549.1.7.6","encryptedData"),n("1.2.840.113549.1.9.1","emailAddress"),n("1.2.840.113549.1.9.2","unstructuredName"),n("1.2.840.113549.1.9.3","contentType"),n("1.2.840.113549.1.9.4","messageDigest"),n("1.2.840.113549.1.9.5","signingTime"),n("1.2.840.113549.1.9.6","counterSignature"),n("1.2.840.113549.1.9.7","challengePassword"),n("1.2.840.113549.1.9.8","unstructuredAddress"),n("1.2.840.113549.1.9.14","extensionRequest"),n("1.2.840.113549.1.9.20","friendlyName"),n("1.2.840.113549.1.9.21","localKeyId"),n("1.2.840.113549.1.9.22.1","x509Certificate"),n("1.2.840.113549.1.12.10.1.1","keyBag"),n("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),n("1.2.840.113549.1.12.10.1.3","certBag"),n("1.2.840.113549.1.12.10.1.4","crlBag"),n("1.2.840.113549.1.12.10.1.5","secretBag"),n("1.2.840.113549.1.12.10.1.6","safeContentsBag"),n("1.2.840.113549.1.5.13","pkcs5PBES2"),n("1.2.840.113549.1.5.12","pkcs5PBKDF2"),n("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),n("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),n("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),n("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),n("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),n("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),n("1.2.840.113549.2.7","hmacWithSHA1"),n("1.2.840.113549.2.8","hmacWithSHA224"),n("1.2.840.113549.2.9","hmacWithSHA256"),n("1.2.840.113549.2.10","hmacWithSHA384"),n("1.2.840.113549.2.11","hmacWithSHA512"),n("1.2.840.113549.3.7","des-EDE3-CBC"),n("2.16.840.1.101.3.4.1.2","aes128-CBC"),n("2.16.840.1.101.3.4.1.22","aes192-CBC"),n("2.16.840.1.101.3.4.1.42","aes256-CBC"),n("2.5.4.3","commonName"),n("2.5.4.4","surname"),n("2.5.4.5","serialNumber"),n("2.5.4.6","countryName"),n("2.5.4.7","localityName"),n("2.5.4.8","stateOrProvinceName"),n("2.5.4.9","streetAddress"),n("2.5.4.10","organizationName"),n("2.5.4.11","organizationalUnitName"),n("2.5.4.12","title"),n("2.5.4.13","description"),n("2.5.4.15","businessCategory"),n("2.5.4.17","postalCode"),n("2.5.4.42","givenName"),n("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),n("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),n("2.16.840.1.113730.1.1","nsCertType"),n("2.16.840.1.113730.1.13","nsComment"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),n("2.5.29.14","subjectKeyIdentifier"),n("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),n("2.5.29.17","subjectAltName"),n("2.5.29.18","issuerAltName"),n("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),n("2.5.29.31","cRLDistributionPoints"),n("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),n("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),n("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),n("1.3.6.1.4.1.11129.2.4.2","timestampList"),n("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),n("1.3.6.1.5.5.7.3.1","serverAuth"),n("1.3.6.1.5.5.7.3.2","clientAuth"),n("1.3.6.1.5.5.7.3.3","codeSigning"),n("1.3.6.1.5.5.7.3.4","emailProtection"),n("1.3.6.1.5.5.7.3.8","timeStamping")},26496:(e,a,t)=>{var r=t(52154);if(t(41954),t(68159),t(32119),t(78765),t(39842),t(31269),t(24800),t(43727),t(44385),t(75888),t(75911),void 0===i)var i=r.jsbn.BigInteger;var n=r.asn1,s=r.pki=r.pki||{};e.exports=s.pbe=r.pbe=r.pbe||{};var o=s.oids,l={name:"EncryptedPrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},u={name:"pkcs-12PbeParams",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"iterations"}]};function d(e,a){return e.start().update(a).digest().getBytes()}function h(e){var a;if(e){if(!(a=s.oids[n.derToOid(e)])){var t=new Error("Unsupported PRF OID.");throw t.oid=e,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}}else a="hmacWithSHA1";return m(a)}function m(e){var a=r.md;switch(e){case"hmacWithSHA224":a=r.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var t=new Error("Unsupported PRF algorithm.");throw t.algorithm=e,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}if(!a||!(e in a))throw new Error("Unknown hash algorithm: "+e);return a[e].create()}s.encryptPrivateKeyInfo=function(e,a,t){(t=t||{}).saltSize=t.saltSize||8,t.count=t.count||2048,t.algorithm=t.algorithm||"aes128",t.prfAlgorithm=t.prfAlgorithm||"sha1";var i,l,c,u=r.random.getBytesSync(t.saltSize),d=t.count,h=n.integerToDer(d);if(0===t.algorithm.indexOf("aes")||"des"===t.algorithm){var p,g,f;switch(t.algorithm){case"aes128":i=16,p=16,g=o["aes128-CBC"],f=r.aes.createEncryptionCipher;break;case"aes192":i=24,p=16,g=o["aes192-CBC"],f=r.aes.createEncryptionCipher;break;case"aes256":i=32,p=16,g=o["aes256-CBC"],f=r.aes.createEncryptionCipher;break;case"des":i=8,p=8,g=o.desCBC,f=r.des.createEncryptionCipher;break;default:throw($=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=t.algorithm,$}var b="hmacWith"+t.prfAlgorithm.toUpperCase(),y=m(b),k=r.pkcs5.pbkdf2(a,u,d,i,y),v=r.random.getBytesSync(p);(j=f(k)).start(v),j.update(n.toDer(e)),j.finish(),c=j.output.getBytes();var w=function(e,a,t,i){var o=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,e),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,a.getBytes())]);"hmacWithSHA1"!==i&&o.value.push(n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,r.util.hexToBytes(t.toString(16))),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(s.oids[i]).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]));return o}(u,h,i,b);l=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(o.pkcs5PBES2).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(o.pkcs5PBKDF2).getBytes()),w]),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(g).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,v)])])])}else{var $;if("3des"!==t.algorithm)throw($=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=t.algorithm,$;i=24;var j,x=new r.util.ByteBuffer(u);k=s.pbe.generatePkcs12Key(a,x,1,d,i),v=s.pbe.generatePkcs12Key(a,x,2,d,i);(j=r.des.createEncryptionCipher(k)).start(v),j.update(n.toDer(e)),j.finish(),c=j.output.getBytes(),l=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(o["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,u),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,h.getBytes())])])}return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[l,n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,c)])},s.decryptPrivateKeyInfo=function(e,a){var t=null,i={},o=[];if(!n.validate(e,l,i,o)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=o,c}var u=n.derToOid(i.encryptionOid),d=s.pbe.getCipher(u,i.encryptionParams,a),h=r.util.createBuffer(i.encryptedData);return d.update(h),d.finish()&&(t=n.fromDer(d.output)),t},s.encryptedPrivateKeyToPem=function(e,a){var t={type:"ENCRYPTED PRIVATE KEY",body:n.toDer(e).getBytes()};return r.pem.encode(t,{maxline:a})},s.encryptedPrivateKeyFromPem=function(e){var a=r.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==a.type){var t=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw t.headerType=a.type,t}if(a.procType&&"ENCRYPTED"===a.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return n.fromDer(a.body)},s.encryptRsaPrivateKey=function(e,a,t){if(!(t=t||{}).legacy){var i=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return i=s.encryptPrivateKeyInfo(i,a,t),s.encryptedPrivateKeyToPem(i)}var o,l,c,u;switch(t.algorithm){case"aes128":o="AES-128-CBC",c=16,l=r.random.getBytesSync(16),u=r.aes.createEncryptionCipher;break;case"aes192":o="AES-192-CBC",c=24,l=r.random.getBytesSync(16),u=r.aes.createEncryptionCipher;break;case"aes256":o="AES-256-CBC",c=32,l=r.random.getBytesSync(16),u=r.aes.createEncryptionCipher;break;case"3des":o="DES-EDE3-CBC",c=24,l=r.random.getBytesSync(8),u=r.des.createEncryptionCipher;break;case"des":o="DES-CBC",c=8,l=r.random.getBytesSync(8),u=r.des.createEncryptionCipher;break;default:var d=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+t.algorithm+'".');throw d.algorithm=t.algorithm,d}var h=u(r.pbe.opensslDeriveBytes(a,l.substr(0,8),c));h.start(l),h.update(n.toDer(s.privateKeyToAsn1(e))),h.finish();var m={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:o,parameters:r.util.bytesToHex(l).toUpperCase()},body:h.output.getBytes()};return r.pem.encode(m)},s.decryptRsaPrivateKey=function(e,a){var t=null,i=r.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c;if(i.procType&&"ENCRYPTED"===i.procType.type){var o,l;switch(i.dekInfo.algorithm){case"DES-CBC":o=8,l=r.des.createDecryptionCipher;break;case"DES-EDE3-CBC":o=24,l=r.des.createDecryptionCipher;break;case"AES-128-CBC":o=16,l=r.aes.createDecryptionCipher;break;case"AES-192-CBC":o=24,l=r.aes.createDecryptionCipher;break;case"AES-256-CBC":o=32,l=r.aes.createDecryptionCipher;break;case"RC2-40-CBC":o=5,l=function(e){return r.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":o=8,l=function(e){return r.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":o=16,l=function(e){return r.rc2.createDecryptionCipher(e,128)};break;default:var c;throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,c}var u=r.util.hexToBytes(i.dekInfo.parameters),d=l(r.pbe.opensslDeriveBytes(a,u.substr(0,8),o));if(d.start(u),d.update(r.util.createBuffer(i.body)),!d.finish())return t;t=d.output.getBytes()}else t=i.body;return null!==(t="ENCRYPTED PRIVATE KEY"===i.type?s.decryptPrivateKeyInfo(n.fromDer(t),a):n.fromDer(t))&&(t=s.privateKeyFromAsn1(t)),t},s.pbe.generatePkcs12Key=function(e,a,t,i,n,s){var o,l;if(null==s){if(!("sha1"in r.md))throw new Error('"sha1" hash algorithm unavailable.');s=r.md.sha1.create()}var c=s.digestLength,u=s.blockLength,d=new r.util.ByteBuffer,h=new r.util.ByteBuffer;if(null!=e){for(l=0;l=0;l--)_>>=8,_+=z.at(l)+S.at(l),S.setAt(l,255&_);E.putBuffer(S)}v=E,d.putBuffer(j)}return d.truncate(d.length()-n),d},s.pbe.getCipher=function(e,a,t){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,a,t);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(e,a,t);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}},s.pbe.getCipherForPBES2=function(e,a,t){var i,o={},l=[];if(!n.validate(a,c,o,l))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=l,i;if((e=n.derToOid(o.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=n.derToOid(o.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var u,d,m=o.kdfSalt,p=r.util.createBuffer(o.kdfIterationCount);switch(p=p.getInt(p.length()<<3),s.oids[e]){case"aes128-CBC":u=16,d=r.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,d=r.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,d=r.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,d=r.des.createDecryptionCipher;break;case"desCBC":u=8,d=r.des.createDecryptionCipher}var g=h(o.prfOid),f=r.pkcs5.pbkdf2(t,m,p,u,g),b=o.encIv,y=d(f);return y.start(b),y},s.pbe.getCipherForPKCS12PBE=function(e,a,t){var i={},o=[];if(!n.validate(a,u,i,o))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=o,g;var l,c,d,m=r.util.createBuffer(i.salt),p=r.util.createBuffer(i.iterations);switch(p=p.getInt(p.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:l=24,c=8,d=r.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:l=5,c=8,d=function(e,a){var t=r.rc2.createDecryptionCipher(e,40);return t.start(a,null),t};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,g}var f=h(i.prfOid),b=s.pbe.generatePkcs12Key(t,m,1,p,l,f);return f.start(),d(b,s.pbe.generatePkcs12Key(t,m,2,p,c,f))},s.pbe.opensslDeriveBytes=function(e,a,t,i){if(null==i){if(!("md5"in r.md))throw new Error('"md5" hash algorithm unavailable.');i=r.md.md5.create()}null===a&&(a="");for(var n=[d(i,e+a)],s=16,o=1;s{var r=t(52154);t(47476),t(78765),t(75911);var i,n=r.pkcs5=r.pkcs5||{};r.util.isNodejs&&!r.options.usePureJavaScript&&(i=t(95942)),e.exports=r.pbkdf2=n.pbkdf2=function(e,a,t,n,s,o){if("function"==typeof s&&(o=s,s=null),r.util.isNodejs&&!r.options.usePureJavaScript&&i.pbkdf2&&(null===s||"object"!=typeof s)&&(i.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!=typeof s&&(s="sha1"),e=Buffer.from(e,"binary"),a=Buffer.from(a,"binary"),o?4===i.pbkdf2Sync.length?i.pbkdf2(e,a,t,n,(function(e,a){if(e)return o(e);o(null,a.toString("binary"))})):i.pbkdf2(e,a,t,n,s,(function(e,a){if(e)return o(e);o(null,a.toString("binary"))})):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,a,t,n).toString("binary"):i.pbkdf2Sync(e,a,t,n,s).toString("binary");if(null==s&&(s="sha1"),"string"==typeof s){if(!(s in r.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=r.md[s].create()}var l=s.digestLength;if(n>4294967295*l){var c=new Error("Derived key is too long.");if(o)return o(c);throw c}var u=Math.ceil(n/l),d=n-(u-1)*l,h=r.hmac.create();h.start(s,e);var m,p,g,f="";if(!o){for(var b=1;b<=u;++b){h.start(null,null),h.update(a),h.update(r.util.int32ToBytes(b)),m=g=h.digest().getBytes();for(var y=2;y<=t;++y)h.start(null,null),h.update(g),p=h.digest().getBytes(),m=r.util.xorBytes(m,p,l),g=p;f+=bu)return o(null,f);h.start(null,null),h.update(a),h.update(r.util.int32ToBytes(b)),m=g=h.digest().getBytes(),y=2,v()}function v(){if(y<=t)return h.start(null,null),h.update(g),p=h.digest().getBytes(),m=r.util.xorBytes(m,p,l),g=p,++y,r.util.setImmediate(v);f+=b{var r=t(52154);t(75911);var i=e.exports=r.pem=r.pem||{};function n(e){for(var a=e.name+": ",t=[],r=function(e,a){return" "+a},i=0;i65&&-1!==s){var o=a[s];","===o?(++s,a=a.substr(0,s)+"\r\n "+a.substr(s)):a=a.substr(0,s)+"\r\n"+o+a.substr(s+1),n=i-s-1,s=-1,++i}else" "!==a[i]&&"\t"!==a[i]&&","!==a[i]||(s=i);return a}function s(e){return e.replace(/^\s+/,"")}i.encode=function(e,a){a=a||{};var t,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=n(t={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=n(t={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(t={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&t.values.push(e.dekInfo.parameters),i+=n(t)),e.headers)for(var s=0;s{var r=t(52154);t(75911),t(43727),t(48823);var i=e.exports=r.pkcs1=r.pkcs1||{};function n(e,a,t){t||(t=r.md.sha1.create());for(var i="",n=Math.ceil(a/t.digestLength),s=0;s>24&255,s>>16&255,s>>8&255,255&s);t.start(),t.update(e+o),i+=t.digest().getBytes()}return i.substring(0,a)}i.encode_rsa_oaep=function(e,a,t){var i,s,o,l;"string"==typeof t?(i=t,s=arguments[3]||void 0,o=arguments[4]||void 0):t&&(i=t.label||void 0,s=t.seed||void 0,o=t.md||void 0,t.mgf1&&t.mgf1.md&&(l=t.mgf1.md)),o?o.start():o=r.md.sha1.create(),l||(l=o);var c=Math.ceil(e.n.bitLength()/8),u=c-2*o.digestLength-2;if(a.length>u)throw(f=new Error("RSAES-OAEP input message length is too long.")).length=a.length,f.maxLength=u,f;i||(i=""),o.update(i,"raw");for(var d=o.digest(),h="",m=u-a.length,p=0;p{var r=t(52154);t(68159),t(47476),t(39842),t(3236),t(26496),t(43727),t(75888),t(48823),t(75911),t(62727);var i=r.asn1,n=r.pki,s=e.exports=r.pkcs12=r.pkcs12||{},o={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},l={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},o,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},c={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},u={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},d={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function h(e,a,t,r){for(var i=[],n=0;n=0&&i.push(o):i.push(o))}return i}function m(e){if(e.composed||e.constructed){for(var a=r.util.createBuffer(),t=0;t0&&(l=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,d));var h=[],m=[];null!==a&&(m=r.util.isArray(a)?a:[a]);for(var p=[],g=0;g0){var k=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,p),v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(k).getBytes())])]);h.push(v)}var w=null;if(null!==e){var $=n.wrapRsaPrivateKey(n.privateKeyToAsn1(e));w=null===t?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[$]),l]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[n.encryptPrivateKeyInfo($,t,o)]),l]);var j=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[w]),x=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(j).getBytes())])]);h.push(x)}var z,C=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h);if(o.useMac){var E=r.md.sha1.create(),S=new r.util.ByteBuffer(r.random.getBytes(o.saltSize)),_=o.count,q=(e=s.generateKey(t,S,3,_,20),r.hmac.create());q.start(E,e),q.update(i.toDer(C).getBytes());var T=q.getMac();z=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,T.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,S.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(_).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(C).getBytes())])]),z])},s.generateKey=r.pbe.generatePkcs12Key},26364:(e,a,t)=>{var r=t(52154);t(41954),t(68159),t(32119),t(39842),t(24800),t(3236),t(43727),t(75911),t(62727);var i=r.asn1,n=e.exports=r.pkcs7=r.pkcs7||{};function s(e){var a={},t=[];if(!i.validate(e,n.asn1.recipientInfoValidator,a,t)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=t,s}return{version:a.version.charCodeAt(0),issuer:r.pki.RDNAttributesAsArray(a.issuer),serialNumber:r.util.createBuffer(a.serial).toHex(),encryptedContent:{algorithm:i.derToOid(a.encAlgorithm),parameter:a.encParameter?a.encParameter.value:void 0,content:a.encKey}}}function o(e){for(var a,t=[],n=0;n0){for(var t=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n=t&&s0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,a)),n.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,n)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),s])},addSigner:function(a){var t=a.issuer,i=a.serialNumber;if(a.certificate){var n=a.certificate;"string"==typeof n&&(n=r.pki.certificateFromPem(n)),t=n.issuer.attributes,i=n.serialNumber}var s=a.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=r.pki.privateKeyFromPem(s));var o=a.digestAlgorithm||r.pki.oids.sha1;switch(o){case r.pki.oids.sha1:case r.pki.oids.sha256:case r.pki.oids.sha384:case r.pki.oids.sha512:case r.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+o)}var l=a.authenticatedAttributes||[];if(l.length>0){for(var c=!1,u=!1,d=0;d{var r=t(52154);t(68159),t(75911);var i=r.asn1,n=e.exports=r.pkcs7asn1=r.pkcs7asn1||{};r.pkcs7=r.pkcs7||{},r.pkcs7.asn1=n;var s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};n.contentInfoValidator=s;var o={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};n.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(o)},n.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(o)};var l={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};n.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[l]}]},n.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},99879:(e,a,t)=>{var r=t(52154);t(68159),t(39842),t(26496),t(24800),t(31269),t(86724),t(49713),t(75888),t(75911),t(62727);var i=r.asn1,n=e.exports=r.pki=r.pki||{};n.pemToDer=function(e){var a=r.pem.decode(e)[0];if(a.procType&&"ENCRYPTED"===a.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return r.util.createBuffer(a.body)},n.privateKeyFromPem=function(e){var a=r.pem.decode(e)[0];if("PRIVATE KEY"!==a.type&&"RSA PRIVATE KEY"!==a.type){var t=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw t.headerType=a.type,t}if(a.procType&&"ENCRYPTED"===a.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var s=i.fromDer(a.body);return n.privateKeyFromAsn1(s)},n.privateKeyToPem=function(e,a){var t={type:"RSA PRIVATE KEY",body:i.toDer(n.privateKeyToAsn1(e)).getBytes()};return r.pem.encode(t,{maxline:a})},n.privateKeyInfoToPem=function(e,a){var t={type:"PRIVATE KEY",body:i.toDer(e).getBytes()};return r.pem.encode(t,{maxline:a})}},90949:(e,a,t)=>{var r=t(52154);t(75911),t(11560),t(43727),function(){if(r.prime)e.exports=r.prime;else{var a=e.exports=r.prime=r.prime||{},t=r.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],n=new t(null);n.fromInt(30);var s=function(e,a){return e|a};a.generateProbablePrime=function(e,a,i){"function"==typeof a&&(i=a,a={});var n=(a=a||{}).algorithm||"PRIMEINC";"string"==typeof n&&(n={name:n}),n.options=n.options||{};var s=a.prng||r.random,l={nextBytes:function(e){for(var a=s.getBytesSync(e.length),t=0;te&&(s=c(e,a));var m=s.toString(16);i.target.postMessage({hex:m,workLoad:u}),s.dAddOffset(d,0)}}}m()}(e,a,i,n);return o(e,a,i,n)}(e,l,n.options,i);throw new Error("Invalid prime generation algorithm: "+n.name)}}function o(e,a,t,r){var i=c(e,a),n=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(i.bitLength());"millerRabinTests"in t&&(n=t.millerRabinTests);var s=10;"maxBlockTime"in t&&(s=t.maxBlockTime),l(i,e,a,0,n,s,r)}function l(e,a,t,n,s,o,u){var d=+new Date;do{if(e.bitLength()>a&&(e=c(a,t)),e.isProbablePrime(s))return u(null,e);e.dAddOffset(i[n++%8],0)}while(o<0||+new Date-d{var r=t(71469),i=t(52154);t(75911);var n=null;!i.util.isNodejs||i.options.usePureJavaScript||r.versions["node-webkit"]||(n=t(95942)),(e.exports=i.prng=i.prng||{}).create=function(e){for(var a={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},t=e.md,r=new Array(32),s=0;s<32;++s)r[s]=t.create();function o(){if(a.pools[0].messageLength>=32)return l();var e=32-a.pools[0].messageLength<<5;a.collect(a.seedFileSync(e)),l()}function l(){a.reseeds=4294967295===a.reseeds?0:a.reseeds+1;var e=a.plugin.md.create();e.update(a.keyBytes);for(var t=1,r=0;r<32;++r)a.reseeds%t==0&&(e.update(a.pools[r].digest().getBytes()),a.pools[r].start()),t<<=1;a.keyBytes=e.digest().getBytes(),e.start(),e.update(a.keyBytes);var i=e.digest().getBytes();a.key=a.plugin.formatKey(a.keyBytes),a.seed=a.plugin.formatSeed(i),a.generated=0}function c(e){var a=null,t=i.util.globalScope,r=t.crypto||t.msCrypto;r&&r.getRandomValues&&(a=function(e){return r.getRandomValues(e)});var n=i.util.createBuffer();if(a)for(;n.length()>16)))<<16,h=4294967295&(u=(2147483647&(u+=c>>15))+(u>>31));for(l=0;l<3;++l)d=h>>>(l<<3),d^=Math.floor(256*Math.random()),n.putByte(255&d)}return n.getBytes(e)}return a.pools=r,a.pool=0,a.generate=function(e,t){if(!t)return a.generateSync(e);var r=a.plugin.cipher,n=a.plugin.increment,s=a.plugin.formatKey,o=a.plugin.formatSeed,c=i.util.createBuffer();a.key=null,function u(d){if(d)return t(d);if(c.length()>=e)return t(null,c.getBytes(e));a.generated>1048575&&(a.key=null);if(null===a.key)return i.util.nextTick((function(){!function(e){if(a.pools[0].messageLength>=32)return l(),e();var t=32-a.pools[0].messageLength<<5;a.seedFile(t,(function(t,r){if(t)return e(t);a.collect(r),l(),e()}))}(u)}));var h=r(a.key,a.seed);a.generated+=h.length,c.putBytes(h),a.key=s(r(a.key,n(a.seed))),a.seed=o(r(a.key,a.seed)),i.util.setImmediate(u)}()},a.generateSync=function(e){var t=a.plugin.cipher,r=a.plugin.increment,n=a.plugin.formatKey,s=a.plugin.formatSeed;a.key=null;for(var l=i.util.createBuffer();l.length()1048575&&(a.key=null),null===a.key&&o();var c=t(a.key,a.seed);a.generated+=c.length,l.putBytes(c),a.key=n(t(a.key,r(a.seed))),a.seed=s(t(a.key,a.seed))}return l.getBytes(e)},n?(a.seedFile=function(e,a){n.randomBytes(e,(function(e,t){if(e)return a(e);a(null,t.toString())}))},a.seedFileSync=function(e){return n.randomBytes(e).toString()}):(a.seedFile=function(e,a){try{a(null,c(e))}catch(e){a(e)}},a.seedFileSync=c),a.collect=function(e){for(var t=e.length,r=0;r>i&255);a.collect(r)},a.registerWorker=function(e){if(e===self)a.seedFile=function(e,a){self.addEventListener("message",(function e(t){var r=t.data;r.forge&&r.forge.prng&&(self.removeEventListener("message",e),a(r.forge.prng.err,r.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",(function(t){var r=t.data;r.forge&&r.forge.prng&&a.seedFile(r.forge.prng.needed,(function(a,t){e.postMessage({forge:{prng:{err:a,bytes:t}}})}))}))}},a}},49713:(e,a,t)=>{var r=t(52154);t(43727),t(75911),(e.exports=r.pss=r.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var a,t=e.md,i=e.mgf,n=t.digestLength,s=e.salt||null;if("string"==typeof s&&(s=r.util.createBuffer(s)),"saltLength"in e)a=e.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");a=s.length()}if(null!==s&&s.length()!==a)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||r.random,l={encode:function(e,l){var c,u,d=l-1,h=Math.ceil(d/8),m=e.digest().getBytes();if(h>8*h-d&255;return(v=String.fromCharCode(v.charCodeAt(0)&~w)+v.substr(1))+g+String.fromCharCode(188)},verify:function(e,s,o){var l,c=o-1,u=Math.ceil(c/8);if(s=s.substr(-u),u>8*u-c&255;if(0!=(h.charCodeAt(0)&p))throw new Error("Bits beyond keysize not zero as expected.");var g=i.generate(m,d),f="";for(l=0;l{var r=t(52154);t(41954),t(8017),t(21023),t(75911),r.random&&r.random.getBytes?e.exports=r.random:function(a){var t={},i=new Array(4),n=r.util.createBuffer();function s(){var e=r.prng.create(t);return e.getBytes=function(a,t){return e.generate(a,t)},e.getBytesSync=function(a){return e.generate(a)},e}t.formatKey=function(e){var a=r.util.createBuffer(e);return(e=new Array(4))[0]=a.getInt32(),e[1]=a.getInt32(),e[2]=a.getInt32(),e[3]=a.getInt32(),r.aes._expandKey(e,!1)},t.formatSeed=function(e){var a=r.util.createBuffer(e);return(e=new Array(4))[0]=a.getInt32(),e[1]=a.getInt32(),e[2]=a.getInt32(),e[3]=a.getInt32(),e},t.cipher=function(e,a){return r.aes._updateBlock(e,a,i,!1),n.putInt32(i[0]),n.putInt32(i[1]),n.putInt32(i[2]),n.putInt32(i[3]),n.getBytes()},t.increment=function(e){return++e[3],e},t.md=r.md.sha256;var o=s(),l=null,c=r.util.globalScope,u=c.crypto||c.msCrypto;if(u&&u.getRandomValues&&(l=function(e){return u.getRandomValues(e)}),r.options.usePureJavaScript||!r.util.isNodejs&&!l){if("undefined"==typeof window||window.document,o.collectInt(+new Date,32),"undefined"!=typeof navigator){var d="";for(var h in navigator)try{"string"==typeof navigator[h]&&(d+=navigator[h])}catch(e){}o.collect(d),d=null}a&&(a().mousemove((function(e){o.collectInt(e.clientX,16),o.collectInt(e.clientY,16)})),a().keypress((function(e){o.collectInt(e.charCode,8)})))}if(r.random)for(var h in o)r.random[h]=o[h];else r.random=o;r.random.createInstance=s,e.exports=r.random}("undefined"!=typeof jQuery?jQuery:null)},44385:(e,a,t)=>{var r=t(52154);t(75911);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],n=[1,2,3,5],s=function(e,a){return e<>16-a},o=function(e,a){return(65535&e)>>a|e<<16-a&65535};e.exports=r.rc2=r.rc2||{},r.rc2.expandKey=function(e,a){"string"==typeof e&&(e=r.util.createBuffer(e)),a=a||128;var t,n=e,s=e.length(),o=a,l=Math.ceil(o/8),c=255>>(7&o);for(t=s;t<128;t++)n.putByte(i[n.at(t-1)+n.at(t-s)&255]);for(n.setAt(128-l,i[n.at(128-l)&c]),t=127-l;t>=0;t--)n.setAt(t,i[n.at(t+1)^n.at(t+l)]);return n};var l=function(e,a,t){var i,l,c,u,d=!1,h=null,m=null,p=null,g=[];for(e=r.rc2.expandKey(e,a),c=0;c<64;c++)g.push(e.getInt16Le());t?(i=function(e){for(c=0;c<4;c++)e[c]+=g[u]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),e[c]=s(e[c],n[c]),u++},l=function(e){for(c=0;c<4;c++)e[c]+=g[63&e[(c+3)%4]]}):(i=function(e){for(c=3;c>=0;c--)e[c]=o(e[c],n[c]),e[c]-=g[u]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),u--},l=function(e){for(c=3;c>=0;c--)e[c]-=g[63&e[(c+3)%4]]});var f=function(e){var a=[];for(c=0;c<4;c++){var r=h.getInt16Le();null!==p&&(t?r^=p.getInt16Le():p.putInt16Le(r)),a.push(65535&r)}u=t?0:63;for(var i=0;i=8;)f([[5,i],[1,l],[6,i],[1,l],[5,i]])},finish:function(e){var a=!0;if(t)if(e)a=e(8,h,!t);else{var r=8===h.length()?8:8-h.length();h.fillWithByte(r,r)}if(a&&(d=!0,b.update()),!t&&(a=0===h.length()))if(e)a=e(8,m,!t);else{var i=m.length(),n=m.at(i-1);n>i?a=!1:m.truncate(n)}return a}}};r.rc2.startEncrypting=function(e,a,t){var i=r.rc2.createEncryptionCipher(e,128);return i.start(a,t),i},r.rc2.createEncryptionCipher=function(e,a){return l(e,a,!0)},r.rc2.startDecrypting=function(e,a,t){var i=r.rc2.createDecryptionCipher(e,128);return i.start(a,t),i},r.rc2.createDecryptionCipher=function(e,a){return l(e,a,!1)}},75888:(e,a,t)=>{var r=t(52154);if(t(68159),t(11560),t(39842),t(5206),t(90949),t(43727),t(75911),void 0===i)var i=r.jsbn.BigInteger;var n=r.util.isNodejs?t(95942):null,s=r.asn1,o=r.util;r.pki=r.pki||{},e.exports=r.pki.rsa=r.rsa=r.rsa||{};var l=r.pki,c=[6,4,2,4,2,4,6,2],u={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},d={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},h={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},m=r.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(e){var a;if(!(e.algorithm in l.oids)){var t=new Error("Unknown message digest algorithm.");throw t.algorithm=e.algorithm,t}a=l.oids[e.algorithm];var r=s.oidToDer(a).getBytes(),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),n=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);n.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,r)),n.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var o=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(n),i.value.push(o),s.toDer(i).getBytes()},f=function(e,a,t){if(t)return e.modPow(a.e,a.n);if(!a.p||!a.q)return e.modPow(a.d,a.n);var n;a.dP||(a.dP=a.d.mod(a.p.subtract(i.ONE))),a.dQ||(a.dQ=a.d.mod(a.q.subtract(i.ONE))),a.qInv||(a.qInv=a.q.modInverse(a.p));do{n=new i(r.util.bytesToHex(r.random.getBytes(a.n.bitLength()/8)),16)}while(n.compareTo(a.n)>=0||!n.gcd(a.n).equals(i.ONE));for(var s=(e=e.multiply(n.modPow(a.e,a.n)).mod(a.n)).mod(a.p).modPow(a.dP,a.p),o=e.mod(a.q).modPow(a.dQ,a.q);s.compareTo(o)<0;)s=s.add(a.p);var l=s.subtract(o).multiply(a.qInv).mod(a.p).multiply(a.q).add(o);return l=l.multiply(n.modInverse(a.n)).mod(a.n)};function b(e,a,t){var i=r.util.createBuffer(),n=Math.ceil(a.n.bitLength()/8);if(e.length>n-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=n-11,s}i.putByte(0),i.putByte(t);var o,l=n-3-e.length;if(0===t||1===t){o=0===t?0:255;for(var c=0;c0;){var u=0,d=r.random.getBytes(l);for(c=0;c1;){if(255!==s.getByte()){--s.read;break}++c}else if(2===l)for(c=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++c}if(0!==s.getByte()||c!==n-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function k(e,a,t){"function"==typeof a&&(t=a,a={});var n={algorithm:{name:(a=a||{}).algorithm||"PRIMEINC",options:{workers:a.workers||2,workLoad:a.workLoad||100,workerScript:a.workerScript}}};function s(){o(e.pBits,(function(a,r){return a?t(a):(e.p=r,null!==e.q?c(a,e.q):void o(e.qBits,c))}))}function o(e,a){r.prime.generateProbablePrime(e,n,a)}function c(a,r){if(a)return t(a);if(e.q=r,e.p.compareTo(e.q)<0){var n=e.p;e.p=e.q,e.q=n}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void s();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void o(e.qBits,c);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void s();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void o(e.qBits,c);var u=e.e.modInverse(e.phi);e.keys={privateKey:l.rsa.setPrivateKey(e.n,e.e,u,e.p,e.q,u.mod(e.p1),u.mod(e.q1),e.q.modInverse(e.p)),publicKey:l.rsa.setPublicKey(e.n,e.e)},t(null,e.keys)}"prng"in a&&(n.prng=a.prng),s()}function v(e){var a=e.toString(16);a[0]>="8"&&(a="00"+a);var t=r.util.hexToBytes(a);return t.length>1&&(0===t.charCodeAt(0)&&0==(128&t.charCodeAt(1))||255===t.charCodeAt(0)&&128==(128&t.charCodeAt(1)))?t.substr(1):t}function w(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function $(e){return r.util.isNodejs&&"function"==typeof n[e]}function j(e){return void 0!==o.globalScope&&"object"==typeof o.globalScope.crypto&&"object"==typeof o.globalScope.crypto.subtle&&"function"==typeof o.globalScope.crypto.subtle[e]}function x(e){return void 0!==o.globalScope&&"object"==typeof o.globalScope.msCrypto&&"object"==typeof o.globalScope.msCrypto.subtle&&"function"==typeof o.globalScope.msCrypto.subtle[e]}function z(e){for(var a=r.util.hexToBytes(e.toString(16)),t=new Uint8Array(a.length),i=0;i0;)u.putByte(0),--d;return u.putBytes(r.util.hexToBytes(c)),u.getBytes()},l.rsa.decrypt=function(e,a,t,n){var s=Math.ceil(a.n.bitLength()/8);if(e.length!==s){var o=new Error("Encrypted message length is invalid.");throw o.length=e.length,o.expected=s,o}var l=new i(r.util.createBuffer(e).toHex(),16);if(l.compareTo(a.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=f(l,a,t).toString(16),u=r.util.createBuffer(),d=s-Math.ceil(c.length/2);d>0;)u.putByte(0),--d;return u.putBytes(r.util.hexToBytes(c)),!1!==n?y(u.getBytes(),a,t):u.getBytes()},l.rsa.createKeyPairGenerationState=function(e,a,t){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var n,s=(t=t||{}).prng||r.random,o={nextBytes:function(e){for(var a=s.getBytesSync(e.length),t=0;t>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(n.eInt),n},l.rsa.stepKeyPairGenerationState=function(e,a){"algorithm"in e||(e.algorithm="PRIMEINC");var t=new i(null);t.fromInt(30);for(var r,n=0,s=function(e,a){return e|a},o=+new Date,u=0;null===e.keys&&(a<=0||ud?e.pqState=0:e.num.isProbablePrime(w(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(c[n++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var m=e.e.modInverse(e.phi);e.keys={privateKey:l.rsa.setPrivateKey(e.n,e.e,m,e.p,e.q,m.mod(e.p1),m.mod(e.q1),e.q.modInverse(e.p)),publicKey:l.rsa.setPublicKey(e.n,e.e)}}u+=(r=+new Date)-o,o=r}return null!==e.keys},l.rsa.generateKeyPair=function(e,a,t,i){if(1===arguments.length?"object"==typeof e?(t=e,e=void 0):"function"==typeof e&&(i=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof a?(i=a,a=void 0):"number"!=typeof a&&(t=a,a=void 0):(t=e,i=a,e=void 0,a=void 0):3===arguments.length&&("number"==typeof a?"function"==typeof t&&(i=t,t=void 0):(i=t,t=a,a=void 0)),t=t||{},void 0===e&&(e=t.bits||2048),void 0===a&&(a=t.e||65537),!r.options.usePureJavaScript&&!t.prng&&e>=256&&e<=16384&&(65537===a||3===a))if(i){if($("generateKeyPair"))return n.generateKeyPair("rsa",{modulusLength:e,publicExponent:a,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,a,t){if(e)return i(e);i(null,{privateKey:l.privateKeyFromPem(t),publicKey:l.publicKeyFromPem(a)})}));if(j("generateKey")&&j("exportKey"))return o.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:z(a),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return o.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){i(e)})).then((function(e){if(e){var a=l.privateKeyFromAsn1(s.fromDer(r.util.createBuffer(e)));i(null,{privateKey:a,publicKey:l.setRsaPublicKey(a.n,a.e)})}}));if(x("generateKey")&&x("exportKey")){var c=o.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:z(a),hash:{name:"SHA-256"}},!0,["sign","verify"]);return c.oncomplete=function(e){var a=e.target.result,t=o.globalScope.msCrypto.subtle.exportKey("pkcs8",a.privateKey);t.oncomplete=function(e){var a=e.target.result,t=l.privateKeyFromAsn1(s.fromDer(r.util.createBuffer(a)));i(null,{privateKey:t,publicKey:l.setRsaPublicKey(t.n,t.e)})},t.onerror=function(e){i(e)}},void(c.onerror=function(e){i(e)})}}else if($("generateKeyPairSync")){var u=n.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:a,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:l.privateKeyFromPem(u.privateKey),publicKey:l.publicKeyFromPem(u.publicKey)}}var d=l.rsa.createKeyPairGenerationState(e,a,t);if(!i)return l.rsa.stepKeyPairGenerationState(d,0),d.keys;k(d,t,i)},l.setRsaPublicKey=l.rsa.setPublicKey=function(e,a){var t={n:e,e:a,encrypt:function(e,a,i){if("string"==typeof a?a=a.toUpperCase():void 0===a&&(a="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===a)a={encode:function(e,a,t){return b(e,a,2).getBytes()}};else if("RSA-OAEP"===a||"RSAES-OAEP"===a)a={encode:function(e,a){return r.pkcs1.encode_rsa_oaep(a,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(a))a={encode:function(e){return e}};else if("string"==typeof a)throw new Error('Unsupported encryption scheme: "'+a+'".');var n=a.encode(e,t,!0);return l.rsa.encrypt(n,t,!0)},verify:function(e,a,i,n){"string"==typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===n&&(n={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in n||(n._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(e,a){a=y(a,t,!0);var i=s.fromDer(a,{parseAllBytes:n._parseAllDigestBytes}),o={},l=[];if(!s.validate(i,p,o,l))throw(c=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=l,c;var c,u=s.derToOid(o.algorithmIdentifier);if(u!==r.oids.md2&&u!==r.oids.md5&&u!==r.oids.sha1&&u!==r.oids.sha224&&u!==r.oids.sha256&&u!==r.oids.sha384&&u!==r.oids.sha512&&u!==r.oids["sha512-224"]&&u!==r.oids["sha512-256"])throw(c=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=u,c;if((u===r.oids.md2||u===r.oids.md5)&&!("parameters"in o))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return e===o.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(e,a){return e===(a=y(a,t,!0))}});var o=l.rsa.decrypt(a,t,!0,!1);return i.verify(e,o,t.n.bitLength())}};return t},l.setRsaPrivateKey=l.rsa.setPrivateKey=function(e,a,t,i,n,s,o,c){var u={n:e,e:a,d:t,p:i,q:n,dP:s,dQ:o,qInv:c,decrypt:function(e,a,t){"string"==typeof a?a=a.toUpperCase():void 0===a&&(a="RSAES-PKCS1-V1_5");var i=l.rsa.decrypt(e,u,!1,!1);if("RSAES-PKCS1-V1_5"===a)a={decode:y};else if("RSA-OAEP"===a||"RSAES-OAEP"===a)a={decode:function(e,a){return r.pkcs1.decode_rsa_oaep(a,e,t)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(a))throw new Error('Unsupported encryption scheme: "'+a+'".');a={decode:function(e){return e}}}return a.decode(i,u,!1)},sign:function(e,a){var t=!1;"string"==typeof a&&(a=a.toUpperCase()),void 0===a||"RSASSA-PKCS1-V1_5"===a?(a={encode:g},t=1):"NONE"!==a&&"NULL"!==a&&null!==a||(a={encode:function(){return e}},t=1);var r=a.encode(e,u.n.bitLength());return l.rsa.encrypt(r,u,t)}};return u},l.wrapRsaPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(l.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(e).getBytes())])},l.privateKeyFromAsn1=function(e){var a,t,n,o,c,h,m,p,g={},f=[];if(s.validate(e,u,g,f)&&(e=s.fromDer(r.util.createBuffer(g.privateKey))),g={},f=[],!s.validate(e,d,g,f)){var b=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw b.errors=f,b}return a=r.util.createBuffer(g.privateKeyModulus).toHex(),t=r.util.createBuffer(g.privateKeyPublicExponent).toHex(),n=r.util.createBuffer(g.privateKeyPrivateExponent).toHex(),o=r.util.createBuffer(g.privateKeyPrime1).toHex(),c=r.util.createBuffer(g.privateKeyPrime2).toHex(),h=r.util.createBuffer(g.privateKeyExponent1).toHex(),m=r.util.createBuffer(g.privateKeyExponent2).toHex(),p=r.util.createBuffer(g.privateKeyCoefficient).toHex(),l.setRsaPrivateKey(new i(a,16),new i(t,16),new i(n,16),new i(o,16),new i(c,16),new i(h,16),new i(m,16),new i(p,16))},l.privateKeyToAsn1=l.privateKeyToRSAPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.qInv))])},l.publicKeyFromAsn1=function(e){var a={},t=[];if(s.validate(e,m,a,t)){var n,o=s.derToOid(a.publicKeyOid);if(o!==l.oids.rsaEncryption)throw(n=new Error("Cannot read public key. Unknown OID.")).oid=o,n;e=a.rsaPublicKey}if(t=[],!s.validate(e,h,a,t))throw(n=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=t,n;var c=r.util.createBuffer(a.publicKeyModulus).toHex(),u=r.util.createBuffer(a.publicKeyExponent).toHex();return l.setRsaPublicKey(new i(c,16),new i(u,16))},l.publicKeyToAsn1=l.publicKeyToSubjectPublicKeyInfo=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(l.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[l.publicKeyToRSAPublicKey(e)])])},l.publicKeyToRSAPublicKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.e))])}},48823:(e,a,t)=>{var r=t(52154);t(78765),t(75911);var i=e.exports=r.sha1=r.sha1||{};r.md.sha1=r.md.algorithms.sha1=i,i.create=function(){s||(n=String.fromCharCode(128),n+=r.util.fillString(String.fromCharCode(0),64),s=!0);var e=null,a=r.util.createBuffer(),t=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var t=i.messageLengthSize/4,n=0;n>>0,l>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=l[1],l[1]=l[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,l[0]=l[1]/4294967296>>>0;return a.putBytes(n),o(e,t,a),(a.read>2048||0===a.length())&&a.compact(),i},i.digest=function(){var s=r.util.createBuffer();s.putBytes(a.bytes());var l,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(n.substr(0,i.blockLength-c));for(var u=8*i.fullMessageLength[0],d=0;d>>0,s.putInt32(u>>>0),u=l>>>0;s.putInt32(u);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};o(h,t,s);var m=r.util.createBuffer();return m.putInt32(h.h0),m.putInt32(h.h1),m.putInt32(h.h2),m.putInt32(h.h3),m.putInt32(h.h4),m},i};var n=null,s=!1;function o(e,a,t){for(var r,i,n,s,o,l,c,u=t.length();u>=64;){for(i=e.h0,n=e.h1,s=e.h2,o=e.h3,l=e.h4,c=0;c<16;++c)r=t.getInt32(),a[c]=r,r=(i<<5|i>>>27)+(o^n&(s^o))+l+1518500249+r,l=o,o=s,s=(n<<30|n>>>2)>>>0,n=i,i=r;for(;c<20;++c)r=(r=a[c-3]^a[c-8]^a[c-14]^a[c-16])<<1|r>>>31,a[c]=r,r=(i<<5|i>>>27)+(o^n&(s^o))+l+1518500249+r,l=o,o=s,s=(n<<30|n>>>2)>>>0,n=i,i=r;for(;c<32;++c)r=(r=a[c-3]^a[c-8]^a[c-14]^a[c-16])<<1|r>>>31,a[c]=r,r=(i<<5|i>>>27)+(n^s^o)+l+1859775393+r,l=o,o=s,s=(n<<30|n>>>2)>>>0,n=i,i=r;for(;c<40;++c)r=(r=a[c-6]^a[c-16]^a[c-28]^a[c-32])<<2|r>>>30,a[c]=r,r=(i<<5|i>>>27)+(n^s^o)+l+1859775393+r,l=o,o=s,s=(n<<30|n>>>2)>>>0,n=i,i=r;for(;c<60;++c)r=(r=a[c-6]^a[c-16]^a[c-28]^a[c-32])<<2|r>>>30,a[c]=r,r=(i<<5|i>>>27)+(n&s|o&(n^s))+l+2400959708+r,l=o,o=s,s=(n<<30|n>>>2)>>>0,n=i,i=r;for(;c<80;++c)r=(r=a[c-6]^a[c-16]^a[c-28]^a[c-32])<<2|r>>>30,a[c]=r,r=(i<<5|i>>>27)+(n^s^o)+l+3395469782+r,l=o,o=s,s=(n<<30|n>>>2)>>>0,n=i,i=r;e.h0=e.h0+i|0,e.h1=e.h1+n|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,e.h4=e.h4+l|0,u-=64}}},8017:(e,a,t)=>{var r=t(52154);t(78765),t(75911);var i=e.exports=r.sha256=r.sha256||{};r.md.sha256=r.md.algorithms.sha256=i,i.create=function(){s||(n=String.fromCharCode(128),n+=r.util.fillString(String.fromCharCode(0),64),o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=!0);var e=null,a=r.util.createBuffer(),t=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var t=i.messageLengthSize/4,n=0;n>>0,o>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=o[1],o[1]=o[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,o[0]=o[1]/4294967296>>>0;return a.putBytes(n),l(e,t,a),(a.read>2048||0===a.length())&&a.compact(),i},i.digest=function(){var s=r.util.createBuffer();s.putBytes(a.bytes());var o,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(n.substr(0,i.blockLength-c));for(var u=8*i.fullMessageLength[0],d=0;d>>0,s.putInt32(u>>>0),u=o>>>0;s.putInt32(u);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};l(h,t,s);var m=r.util.createBuffer();return m.putInt32(h.h0),m.putInt32(h.h1),m.putInt32(h.h2),m.putInt32(h.h3),m.putInt32(h.h4),m.putInt32(h.h5),m.putInt32(h.h6),m.putInt32(h.h7),m},i};var n=null,s=!1,o=null;function l(e,a,t){for(var r,i,n,s,l,c,u,d,h,m,p,g,f,b=t.length();b>=64;){for(l=0;l<16;++l)a[l]=t.getInt32();for(;l<64;++l)r=((r=a[l-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,i=((i=a[l-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,a[l]=r+a[l-7]+i+a[l-16]|0;for(c=e.h0,u=e.h1,d=e.h2,h=e.h3,m=e.h4,p=e.h5,g=e.h6,f=e.h7,l=0;l<64;++l)n=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),s=c&u|d&(c^u),r=f+((m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(g^m&(p^g))+o[l]+a[l],f=g,g=p,p=m,m=h+r>>>0,h=d,d=u,u=c,c=r+(i=n+s)>>>0;e.h0=e.h0+c|0,e.h1=e.h1+u|0,e.h2=e.h2+d|0,e.h3=e.h3+h|0,e.h4=e.h4+m|0,e.h5=e.h5+p|0,e.h6=e.h6+g|0,e.h7=e.h7+f|0,b-=64}}},1421:(e,a,t)=>{var r=t(52154);t(78765),t(75911);var i=e.exports=r.sha512=r.sha512||{};r.md.sha512=r.md.algorithms.sha512=i;var n=r.sha384=r.sha512.sha384=r.sha512.sha384||{};n.create=function(){return i.create("SHA-384")},r.md.sha384=r.md.algorithms.sha384=n,r.sha512.sha256=r.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},r.md["sha512/256"]=r.md.algorithms["sha512/256"]=r.sha512.sha256,r.sha512.sha224=r.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},r.md["sha512/224"]=r.md.algorithms["sha512/224"]=r.sha512.sha224,i.create=function(e){if(o||(s=String.fromCharCode(128),s+=r.util.fillString(String.fromCharCode(0),128),l=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],(c={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],c["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],c["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],c["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],o=!0),void 0===e&&(e="SHA-512"),!(e in c))throw new Error("Invalid SHA-512 algorithm: "+e);for(var a=c[e],t=null,i=r.util.createBuffer(),n=new Array(80),d=0;d<80;++d)n[d]=new Array(2);var h=64;switch(e){case"SHA-384":h=48;break;case"SHA-512/256":h=32;break;case"SHA-512/224":h=28}var m={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){m.messageLength=0,m.fullMessageLength=m.messageLength128=[];for(var e=m.messageLengthSize/4,n=0;n>>0,s>>>0];for(var o=m.fullMessageLength.length-1;o>=0;--o)m.fullMessageLength[o]+=s[1],s[1]=s[0]+(m.fullMessageLength[o]/4294967296>>>0),m.fullMessageLength[o]=m.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(e),u(t,n,i),(i.read>2048||0===i.length())&&i.compact(),m},m.digest=function(){var a=r.util.createBuffer();a.putBytes(i.bytes());var o,l=m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1;a.putBytes(s.substr(0,m.blockLength-l));for(var c=8*m.fullMessageLength[0],d=0;d>>0,a.putInt32(c>>>0),c=o>>>0;a.putInt32(c);var h=new Array(t.length);for(d=0;d=128;){for(q=0;q<16;++q)a[q][0]=t.getInt32()>>>0,a[q][1]=t.getInt32()>>>0;for(;q<80;++q)r=(((T=(A=a[q-2])[0])>>>19|(I=A[1])<<13)^(I>>>29|T<<3)^T>>>6)>>>0,i=((T<<13|I>>>19)^(I<<3|T>>>29)^(T<<26|I>>>6))>>>0,n=(((T=(R=a[q-15])[0])>>>1|(I=R[1])<<31)^(T>>>8|I<<24)^T>>>7)>>>0,s=((T<<31|I>>>1)^(T<<24|I>>>8)^(T<<25|I>>>7))>>>0,B=a[q-7],N=a[q-16],I=i+B[1]+s+N[1],a[q][0]=r+B[0]+n+N[0]+(I/4294967296>>>0)>>>0,a[q][1]=I>>>0;for(p=e[0][0],g=e[0][1],f=e[1][0],b=e[1][1],y=e[2][0],k=e[2][1],v=e[3][0],w=e[3][1],$=e[4][0],j=e[4][1],x=e[5][0],z=e[5][1],C=e[6][0],E=e[6][1],S=e[7][0],_=e[7][1],q=0;q<80;++q)u=(($>>>14|j<<18)^($>>>18|j<<14)^(j>>>9|$<<23))>>>0,d=(C^$&(x^C))>>>0,o=((p>>>28|g<<4)^(g>>>2|p<<30)^(g>>>7|p<<25))>>>0,c=((p<<4|g>>>28)^(g<<30|p>>>2)^(g<<25|p>>>7))>>>0,h=(p&f|y&(p^f))>>>0,m=(g&b|k&(g^b))>>>0,I=_+((($<<18|j>>>14)^($<<14|j>>>18)^(j<<23|$>>>9))>>>0)+((E^j&(z^E))>>>0)+l[q][1]+a[q][1],r=S+u+d+l[q][0]+a[q][0]+(I/4294967296>>>0)>>>0,i=I>>>0,n=o+h+((I=c+m)/4294967296>>>0)>>>0,s=I>>>0,S=C,_=E,C=x,E=z,x=$,z=j,$=v+r+((I=w+i)/4294967296>>>0)>>>0,j=I>>>0,v=y,w=k,y=f,k=b,f=p,b=g,p=r+n+((I=i+s)/4294967296>>>0)>>>0,g=I>>>0;I=e[0][1]+g,e[0][0]=e[0][0]+p+(I/4294967296>>>0)>>>0,e[0][1]=I>>>0,I=e[1][1]+b,e[1][0]=e[1][0]+f+(I/4294967296>>>0)>>>0,e[1][1]=I>>>0,I=e[2][1]+k,e[2][0]=e[2][0]+y+(I/4294967296>>>0)>>>0,e[2][1]=I>>>0,I=e[3][1]+w,e[3][0]=e[3][0]+v+(I/4294967296>>>0)>>>0,e[3][1]=I>>>0,I=e[4][1]+j,e[4][0]=e[4][0]+$+(I/4294967296>>>0)>>>0,e[4][1]=I>>>0,I=e[5][1]+z,e[5][0]=e[5][0]+x+(I/4294967296>>>0)>>>0,e[5][1]=I>>>0,I=e[6][1]+E,e[6][0]=e[6][0]+C+(I/4294967296>>>0)>>>0,e[6][1]=I>>>0,I=e[7][1]+_,e[7][0]=e[7][0]+S+(I/4294967296>>>0)>>>0,e[7][1]=I>>>0,L-=128}}},31581:(e,a,t)=>{var r=t(52154);t(41954),t(47476),t(45073),t(48823),t(75911);var i=e.exports=r.ssh=r.ssh||{};function n(e,a){var t=a.toString(16);t[0]>="8"&&(t="00"+t);var i=r.util.hexToBytes(t);e.putInt32(i.length),e.putBytes(i)}function s(e,a){e.putInt32(a.length),e.putString(a)}function o(){for(var e=r.md.sha1.create(),a=arguments.length,t=0;t{var r=t(52154);t(68159),t(47476),t(45073),t(24800),t(99879),t(43727),t(48823),t(75911);var i=function(e,a,t,i){var n=r.util.createBuffer(),s=e.length>>1,o=s+(1&e.length),l=e.substr(0,o),c=e.substr(s,o),u=r.util.createBuffer(),d=r.hmac.create();t=a+t;var h=Math.ceil(i/16),m=Math.ceil(i/20);d.start("MD5",l);var p=r.util.createBuffer();u.putBytes(t);for(var g=0;g0&&(c.queue(e,c.createAlert(e,{level:c.Alert.Level.warning,description:c.Alert.Description.no_renegotiation})),c.flush(e)),e.process()},c.parseHelloMessage=function(e,a,t){var i=null,n=e.entity===c.ConnectionEnd.client;if(t<38)e.error(e,{message:n?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});else{var s=a.fragment,l=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:r.util.createBuffer(s.getBytes(32)),session_id:o(s,1),extensions:[]},n?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=o(s,2),i.compression_methods=o(s,1)),(l=t-(l-s.length()))>0){for(var u=o(s,2);u.length()>0;)i.extensions.push({type:[u.getByte(),u.getByte()],data:o(u,2)});if(!n)for(var d=0;d0;){if(0!==m.getByte())break;e.session.extensions.server_name.serverNameList.push(o(m,2).getBytes())}}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}});if(n)e.session.cipherSuite=c.getCipherSuite(i.cipher_suite);else for(var p=r.util.createBuffer(i.cipher_suites.bytes());p.length()>0&&(e.session.cipherSuite=c.getCipherSuite(p.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.handshake_failure},cipherSuite:r.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=n?i.compression_method:c.CompressionMethod.none}return i},c.createSecurityParameters=function(e,a){var t=e.entity===c.ConnectionEnd.client,r=a.random.bytes(),i=t?e.session.sp.client_random:r,n=t?r:c.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:c.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:n}},c.handleServerHello=function(e,a,t){var r=c.parseHelloMessage(e,a,t);if(!e.fail){if(!(r.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}});e.version.minor=r.version.minor,e.session.version=e.version;var i=r.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=p,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=u,e.session.resuming=!1,c.createSecurityParameters(e,r)),e.session.id=i,e.process()}},c.handleClientHello=function(e,a,t){var i=c.parseHelloMessage(e,a,t);if(!e.fail){var n=i.session_id.bytes(),s=null;if(e.sessionCache&&(null===(s=e.sessionCache.getSession(n))?n="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,n="")),0===n.length&&(n=r.random.getBytes(32)),e.session.id=n,e.session.clientHelloVersion=i.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var o,l=1;l0;)i=o(l.certificate_list,3),n=r.asn1.fromDer(i),i=r.pki.certificateFromAsn1(n,!0),u.push(i)}catch(a){return e.error(e,{message:"Could not parse certificate list.",cause:a,send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.bad_certificate}})}var h=e.entity===c.ConnectionEnd.client;!h&&!0!==e.verifyClient||0!==u.length?0===u.length?e.expect=h?d:k:(h?e.session.serverCertificate=u[0]:e.session.clientCertificate=u[0],c.verifyCertificateChain(e,u)&&(e.expect=h?d:k)):e.error(e,{message:h?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}}),e.process()},c.handleServerKeyExchange=function(e,a,t){if(t>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.unsupported_certificate}});e.expect=h,e.process()},c.handleClientKeyExchange=function(e,a,t){if(t<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.unsupported_certificate}});var i=a.fragment,n={enc_pre_master_secret:o(i,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=r.pki.privateKeyFromPem(s)}catch(a){e.error(e,{message:"Could not get private key.",cause:a,send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}})}if(null===s)return e.error(e,{message:"No private key set.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}});try{var l=e.session.sp;l.pre_master_secret=s.decrypt(n.enc_pre_master_secret);var u=e.session.clientHelloVersion;if(u.major!==l.pre_master_secret.charCodeAt(0)||u.minor!==l.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){l.pre_master_secret=r.random.getBytes(48)}e.expect=w,null!==e.session.clientCertificate&&(e.expect=v),e.process()},c.handleCertificateRequest=function(e,a,t){if(t<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var r=a.fragment,i={certificate_types:o(r,1),certificate_authorities:o(r,2)};e.session.certificateRequest=i,e.expect=m,e.process()},c.handleCertificateVerify=function(e,a,t){if(t<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var i=a.fragment;i.read-=4;var n=i.bytes();i.read+=4;var s={signature:o(i,2).getBytes()},l=r.util.createBuffer();l.putBuffer(e.session.md5.digest()),l.putBuffer(e.session.sha1.digest()),l=l.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(l,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(n),e.session.sha1.update(n)}catch(a){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.handshake_failure}})}e.expect=w,e.process()},c.handleServerHelloDone=function(e,a,t){if(t>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.insufficient_security}},n=e.verify(e,i.alert.description,0,[]);if(!0!==n)return(n||0===n)&&("object"!=typeof n||r.util.isArray(n)?"number"==typeof n&&(i.alert.description=n):(n.message&&(i.message=n.message),n.alert&&(i.alert.description=n.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(a=c.createRecord(e,{type:c.ContentType.handshake,data:c.createCertificate(e)}),c.queue(e,a)),a=c.createRecord(e,{type:c.ContentType.handshake,data:c.createClientKeyExchange(e)}),c.queue(e,a),e.expect=b;var s=function(e,a){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createCertificateVerify(e,a)})),c.queue(e,c.createRecord(e,{type:c.ContentType.change_cipher_spec,data:c.createChangeCipherSpec()})),e.state.pending=c.createConnectionState(e),e.state.current.write=e.state.pending.write,c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createFinished(e)})),e.expect=p,c.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return s(e,null);c.getClientSignature(e,s)},c.handleChangeCipherSpec=function(e,a){if(1!==a.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var t=e.entity===c.ConnectionEnd.client;(e.session.resuming&&t||!e.session.resuming&&!t)&&(e.state.pending=c.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&t||e.session.resuming&&!t)&&(e.state.pending=null),e.expect=t?g:$,e.process()},c.handleFinished=function(e,a,t){var n=a.fragment;n.read-=4;var s=n.bytes();n.read+=4;var o=a.fragment.getBytes();(n=r.util.createBuffer()).putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest());var l=e.entity===c.ConnectionEnd.client,u=l?"server finished":"client finished",d=e.session.sp;if((n=i(d.master_secret,u,n.getBytes(),12)).getBytes()!==o)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.decrypt_error}});e.session.md5.update(s),e.session.sha1.update(s),(e.session.resuming&&l||!e.session.resuming&&!l)&&(c.queue(e,c.createRecord(e,{type:c.ContentType.change_cipher_spec,data:c.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createFinished(e)}))),e.expect=l?f:j,e.handshaking=!1,++e.handshakes,e.peerCertificate=l?e.session.serverCertificate:e.session.clientCertificate,c.flush(e),e.isConnected=!0,e.connected(e),e.process()},c.handleAlert=function(e,a){var t,r=a.fragment,i={level:r.getByte(),description:r.getByte()};switch(i.description){case c.Alert.Description.close_notify:t="Connection closed.";break;case c.Alert.Description.unexpected_message:t="Unexpected message.";break;case c.Alert.Description.bad_record_mac:t="Bad record MAC.";break;case c.Alert.Description.decryption_failed:t="Decryption failed.";break;case c.Alert.Description.record_overflow:t="Record overflow.";break;case c.Alert.Description.decompression_failure:t="Decompression failed.";break;case c.Alert.Description.handshake_failure:t="Handshake failure.";break;case c.Alert.Description.bad_certificate:t="Bad certificate.";break;case c.Alert.Description.unsupported_certificate:t="Unsupported certificate.";break;case c.Alert.Description.certificate_revoked:t="Certificate revoked.";break;case c.Alert.Description.certificate_expired:t="Certificate expired.";break;case c.Alert.Description.certificate_unknown:t="Certificate unknown.";break;case c.Alert.Description.illegal_parameter:t="Illegal parameter.";break;case c.Alert.Description.unknown_ca:t="Unknown certificate authority.";break;case c.Alert.Description.access_denied:t="Access denied.";break;case c.Alert.Description.decode_error:t="Decode error.";break;case c.Alert.Description.decrypt_error:t="Decrypt error.";break;case c.Alert.Description.export_restriction:t="Export restriction.";break;case c.Alert.Description.protocol_version:t="Unsupported protocol version.";break;case c.Alert.Description.insufficient_security:t="Insufficient security.";break;case c.Alert.Description.internal_error:t="Internal error.";break;case c.Alert.Description.user_canceled:t="User canceled.";break;case c.Alert.Description.no_renegotiation:t="Renegotiation not supported.";break;default:t="Unknown error."}if(i.description===c.Alert.Description.close_notify)return e.close();e.error(e,{message:t,send:!1,origin:e.entity===c.ConnectionEnd.client?"server":"client",alert:i}),e.process()},c.handleHandshake=function(e,a){var t=a.fragment,i=t.getByte(),n=t.getInt24();if(n>t.length())return e.fragmented=a,a.fragment=r.util.createBuffer(),t.read-=4,e.process();e.fragmented=null,t.read-=4;var s=t.bytes(n+4);t.read+=4,i in D[e.entity][e.expect]?(e.entity!==c.ConnectionEnd.server||e.open||e.fail||(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:r.md.md5.create(),sha1:r.md.sha1.create()}),i!==c.HandshakeType.hello_request&&i!==c.HandshakeType.certificate_verify&&i!==c.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),D[e.entity][e.expect][i](e,a,n)):c.handleUnexpected(e,a)},c.handleApplicationData=function(e,a){e.data.putBuffer(a.fragment),e.dataReady(e),e.process()},c.handleHeartbeat=function(e,a){var t=a.fragment,i=t.getByte(),n=t.getInt16(),s=t.getBytes(n);if(i===c.HeartbeatMessageType.heartbeat_request){if(e.handshaking||n>s.length)return e.process();c.queue(e,c.createRecord(e,{type:c.ContentType.heartbeat,data:c.createHeartbeat(c.HeartbeatMessageType.heartbeat_response,s)})),c.flush(e)}else if(i===c.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,r.util.createBuffer(s))}e.process()};var u=1,d=2,h=3,m=4,p=5,g=6,f=7,b=8,y=1,k=2,v=3,w=4,$=5,j=6,x=c.handleUnexpected,z=c.handleChangeCipherSpec,C=c.handleAlert,E=c.handleHandshake,S=c.handleApplicationData,_=c.handleHeartbeat,q=[];q[c.ConnectionEnd.client]=[[x,C,E,x,_],[x,C,E,x,_],[x,C,E,x,_],[x,C,E,x,_],[x,C,E,x,_],[z,C,x,x,_],[x,C,E,x,_],[x,C,E,S,_],[x,C,E,x,_]],q[c.ConnectionEnd.server]=[[x,C,E,x,_],[x,C,E,x,_],[x,C,E,x,_],[x,C,E,x,_],[z,C,x,x,_],[x,C,E,x,_],[x,C,E,S,_],[x,C,E,x,_]];var T=c.handleHelloRequest,I=c.handleServerHello,A=c.handleCertificate,B=c.handleServerKeyExchange,R=c.handleCertificateRequest,N=c.handleServerHelloDone,L=c.handleFinished,D=[];D[c.ConnectionEnd.client]=[[x,x,I,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[T,x,x,x,x,x,x,x,x,x,x,A,B,R,N,x,x,x,x,x,x],[T,x,x,x,x,x,x,x,x,x,x,x,B,R,N,x,x,x,x,x,x],[T,x,x,x,x,x,x,x,x,x,x,x,x,R,N,x,x,x,x,x,x],[T,x,x,x,x,x,x,x,x,x,x,x,x,x,N,x,x,x,x,x,x],[T,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[T,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L],[T,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[T,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x]];var P=c.handleClientHello,U=c.handleClientKeyExchange,O=c.handleCertificateVerify;D[c.ConnectionEnd.server]=[[x,P,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,A,x,x,x,x,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,U,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,O,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x]],c.generateKeys=function(e,a){var t=i,r=a.client_random+a.server_random;e.session.resuming||(a.master_secret=t(a.pre_master_secret,"master secret",r,48).bytes(),a.pre_master_secret=null),r=a.server_random+a.client_random;var n=2*a.mac_key_length+2*a.enc_key_length,s=e.version.major===c.Versions.TLS_1_0.major&&e.version.minor===c.Versions.TLS_1_0.minor;s&&(n+=2*a.fixed_iv_length);var o=t(a.master_secret,"key expansion",r,n),l={client_write_MAC_key:o.getBytes(a.mac_key_length),server_write_MAC_key:o.getBytes(a.mac_key_length),client_write_key:o.getBytes(a.enc_key_length),server_write_key:o.getBytes(a.enc_key_length)};return s&&(l.client_write_IV=o.getBytes(a.fixed_iv_length),l.server_write_IV=o.getBytes(a.fixed_iv_length)),l},c.createConnectionState=function(e){var a=e.entity===c.ConnectionEnd.client,t=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},r={read:t(),write:t()};if(r.read.update=function(e,a){return r.read.cipherFunction(a,r.read)?r.read.compressFunction(e,a,r.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.bad_record_mac}}),!e.fail},r.write.update=function(e,a){return r.write.compressFunction(e,a,r.write)?r.write.cipherFunction(a,r.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=c.generateKeys(e,i),r.read.macKey=a?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,r.write.macKey=a?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,i),i.compression_algorithm){case c.CompressionMethod.none:break;case c.CompressionMethod.deflate:r.read.compressFunction=s,r.write.compressFunction=n;break;default:throw new Error("Unsupported compression algorithm.")}}return r},c.createRandom=function(){var e=new Date,a=+e+6e4*e.getTimezoneOffset(),t=r.util.createBuffer();return t.putInt32(a),t.putBytes(r.random.getBytes(28)),t},c.createRecord=function(e,a){return a.data?{type:a.type,version:{major:e.version.major,minor:e.version.minor},length:a.data.length(),fragment:a.data}:null},c.createAlert=function(e,a){var t=r.util.createBuffer();return t.putByte(a.level),t.putByte(a.description),c.createRecord(e,{type:c.ContentType.alert,data:t})},c.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var a=r.util.createBuffer(),t=0;t0&&(p+=2);var g=e.session.id,f=g.length+1+2+4+28+2+n+1+o+p,b=r.util.createBuffer();return b.putByte(c.HandshakeType.client_hello),b.putInt24(f),b.putByte(e.version.major),b.putByte(e.version.minor),b.putBytes(e.session.sp.client_random),l(b,1,r.util.createBuffer(g)),l(b,2,a),l(b,1,s),p>0&&l(b,2,u),b},c.createServerHello=function(e){var a=e.session.id,t=a.length+1+2+4+28+2+1,i=r.util.createBuffer();return i.putByte(c.HandshakeType.server_hello),i.putInt24(t),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),l(i,1,r.util.createBuffer(a)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},c.createCertificate=function(e){var a,t=e.entity===c.ConnectionEnd.client,i=null;e.getCertificate&&(a=t?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,a));var n=r.util.createBuffer();if(null!==i)try{r.util.isArray(i)||(i=[i]);for(var s=null,o=0;oc.MaxFragment;)i.push(c.createRecord(e,{type:a.type,data:r.util.createBuffer(n.slice(0,c.MaxFragment))})),n=n.slice(c.MaxFragment);n.length>0&&i.push(c.createRecord(e,{type:a.type,data:r.util.createBuffer(n)}))}for(var s=0;s0&&(i=t.order[0]),null!==i&&i in t.cache)for(var n in a=t.cache[i],delete t.cache[i],t.order)if(t.order[n]===i){t.order.splice(n,1);break}return a},t.setSession=function(e,a){if(t.order.length===t.capacity){var i=t.order.shift();delete t.cache[i]}i=r.util.bytesToHex(e);t.order.push(i),t.cache[i]=a}}return t},c.createConnection=function(e){var a=null;a=e.caStore?r.util.isArray(e.caStore)?r.pki.createCaStore(e.caStore):e.caStore:r.pki.createCaStore();var t=e.cipherSuites||null;if(null===t)for(var i in t=[],c.CipherSuites)t.push(c.CipherSuites[i]);var n=e.server?c.ConnectionEnd.server:c.ConnectionEnd.client,s=e.sessionCache?c.createSessionCache(e.sessionCache):null,o={version:{major:c.Version.major,minor:c.Version.minor},entity:n,sessionId:e.sessionId,caStore:a,sessionCache:s,cipherSuites:t,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,a,t,r){return a},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:r.util.createBuffer(),tlsData:r.util.createBuffer(),data:r.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(a,t){t.origin=t.origin||(a.entity===c.ConnectionEnd.client?"client":"server"),t.send&&(c.queue(a,c.createAlert(a,t.alert)),c.flush(a));var r=!1!==t.fatal;r&&(a.fail=!0),e.error(a,t),r&&a.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){o.version={major:c.Version.major,minor:c.Version.minor},o.record=null,o.session=null,o.peerCertificate=null,o.state={pending:null,current:null},o.expect=(o.entity,c.ConnectionEnd.client,0),o.fragmented=null,o.records=[],o.open=!1,o.handshakes=0,o.handshaking=!1,o.isConnected=!1,o.fail=!(e||void 0===e),o.input.clear(),o.tlsData.clear(),o.data.clear(),o.state.current=c.createConnectionState(o)}};o.reset();return o.handshake=function(e){if(o.entity!==c.ConnectionEnd.client)o.error(o,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(o.handshaking)o.error(o,{message:"Handshake already in progress.",fatal:!1});else{o.fail&&!o.open&&0===o.handshakes&&(o.fail=!1),o.handshaking=!0;var a=null;(e=e||"").length>0&&(o.sessionCache&&(a=o.sessionCache.getSession(e)),null===a&&(e="")),0===e.length&&o.sessionCache&&null!==(a=o.sessionCache.getSession())&&(e=a.id),o.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:r.md.md5.create(),sha1:r.md.sha1.create()},a&&(o.version=a.version,o.session.sp=a.sp),o.session.sp.client_random=c.createRandom().getBytes(),o.open=!0,c.queue(o,c.createRecord(o,{type:c.ContentType.handshake,data:c.createClientHello(o)})),c.flush(o)}},o.process=function(e){var a=0;return e&&o.input.putBytes(e),o.fail||(null!==o.record&&o.record.ready&&o.record.fragment.isEmpty()&&(o.record=null),null===o.record&&(a=function(e){var a=0,t=e.input,i=t.length();if(i<5)a=5-i;else{e.record={type:t.getByte(),version:{major:t.getByte(),minor:t.getByte()},length:t.getInt16(),fragment:r.util.createBuffer(),ready:!1};var n=e.record.version.major===e.version.major;n&&e.session&&e.session.version&&(n=e.record.version.minor===e.version.minor),n||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}})}return a}(o)),o.fail||null===o.record||o.record.ready||(a=function(e){var a=0,t=e.input,r=t.length();return r{var r=t(71469),i=t(52154),n=t(46772),s=e.exports=i.util=i.util||{};function o(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function l(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(s.isArrayBuffer(e)||s.isArrayBufferView(e))if("undefined"!=typeof Buffer&&e instanceof Buffer)this.data=e.toString("binary");else{var a=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,a)}catch(e){for(var t=0;t15?(t=Date.now(),o(e)):(a.push(e),1===a.length&&n.setAttribute("a",i=!i))}}s.nextTick=s.setImmediate}(),s.isNodejs=void 0!==r&&r.versions&&r.versions.node,s.globalScope=s.isNodejs?t.g:"undefined"==typeof self?window:self,s.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},s.isArrayBufferView=function(e){return e&&s.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},s.ByteBuffer=l,s.ByteStringBuffer=l;s.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},s.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},s.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},s.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},s.ByteStringBuffer.prototype.fillWithByte=function(e,a){e=String.fromCharCode(e);for(var t=this.data;a>0;)1&a&&(t+=e),(a>>>=1)>0&&(e+=e);return this.data=t,this._optimizeConstructedString(a),this},s.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},s.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(s.encodeUtf8(e))},s.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},s.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},s.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},s.ByteStringBuffer.prototype.putInt=function(e,a){o(a);var t="";do{a-=8,t+=String.fromCharCode(e>>a&255)}while(a>0);return this.putBytes(t)},s.ByteStringBuffer.prototype.putSignedInt=function(e,a){return e<0&&(e+=2<0);return a},s.ByteStringBuffer.prototype.getSignedInt=function(e){var a=this.getInt(e),t=2<=t&&(a-=t<<1),a},s.ByteStringBuffer.prototype.getBytes=function(e){var a;return e?(e=Math.min(this.length(),e),a=this.data.slice(this.read,this.read+e),this.read+=e):0===e?a="":(a=0===this.read?this.data:this.data.slice(this.read),this.clear()),a},s.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},s.ByteStringBuffer.prototype.setAt=function(e,a){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(a)+this.data.substr(this.read+e+1),this},s.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},s.ByteStringBuffer.prototype.copy=function(){var e=s.createBuffer(this.data);return e.read=this.read,e},s.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},s.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},s.ByteStringBuffer.prototype.truncate=function(e){var a=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,a),this.read=0,this},s.ByteStringBuffer.prototype.toHex=function(){for(var e="",a=this.read;a=e)return this;a=Math.max(a||this.growSize,e);var t=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+a);return r.set(t),this.data=new DataView(r.buffer),this},s.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},s.DataBuffer.prototype.fillWithByte=function(e,a){this.accommodate(a);for(var t=0;t>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},s.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},s.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},s.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},s.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},s.DataBuffer.prototype.putInt=function(e,a){o(a),this.accommodate(a/8);do{a-=8,this.data.setInt8(this.write++,e>>a&255)}while(a>0);return this},s.DataBuffer.prototype.putSignedInt=function(e,a){return o(a),this.accommodate(a/8),e<0&&(e+=2<0);return a},s.DataBuffer.prototype.getSignedInt=function(e){var a=this.getInt(e),t=2<=t&&(a-=t<<1),a},s.DataBuffer.prototype.getBytes=function(e){var a;return e?(e=Math.min(this.length(),e),a=this.data.slice(this.read,this.read+e),this.read+=e):0===e?a="":(a=0===this.read?this.data:this.data.slice(this.read),this.clear()),a},s.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},s.DataBuffer.prototype.setAt=function(e,a){return this.data.setUint8(e,a),this},s.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},s.DataBuffer.prototype.copy=function(){return new s.DataBuffer(this)},s.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),a=new Uint8Array(e.byteLength);a.set(e),this.data=new DataView(a),this.write-=this.read,this.read=0}return this},s.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},s.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},s.DataBuffer.prototype.toHex=function(){for(var e="",a=this.read;a0;)1&a&&(t+=e),(a>>>=1)>0&&(e+=e);return t},s.xorBytes=function(e,a,t){for(var r="",i="",n="",s=0,o=0;t>0;--t,++s)i=e.charCodeAt(s)^a.charCodeAt(s),o>=10&&(r+=n,n="",o=0),n+=String.fromCharCode(i),++o;return r+=n},s.hexToBytes=function(e){var a="",t=0;for(!0&e.length&&(t=1,a+=String.fromCharCode(parseInt(e[0],16)));t>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],d="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";s.encode64=function(e,a){for(var t,r,i,n="",s="",o=0;o>2),n+=c.charAt((3&t)<<4|r>>4),isNaN(r)?n+="==":(n+=c.charAt((15&r)<<2|i>>6),n+=isNaN(i)?"=":c.charAt(63&i)),a&&n.length>a&&(s+=n.substr(0,a)+"\r\n",n=n.substr(a));return s+=n},s.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var a,t,r,i,n="",s=0;s>4),64!==r&&(n+=String.fromCharCode((15&t)<<4|r>>2),64!==i&&(n+=String.fromCharCode((3&r)<<6|i)));return n},s.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},s.decodeUtf8=function(e){return decodeURIComponent(escape(e))},s.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:n.encode,decode:n.decode}},s.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},s.binary.raw.decode=function(e,a,t){var r=a;r||(r=new Uint8Array(e.length));for(var i=t=t||0,n=0;n>2),n+=c.charAt((3&t)<<4|r>>4),isNaN(r)?n+="==":(n+=c.charAt((15&r)<<2|i>>6),n+=isNaN(i)?"=":c.charAt(63&i)),a&&n.length>a&&(s+=n.substr(0,a)+"\r\n",n=n.substr(a));return s+=n},s.binary.base64.decode=function(e,a,t){var r,i,n,s,o=a;o||(o=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var l=0,c=t=t||0;l>4,64!==n&&(o[c++]=(15&i)<<4|n>>2,64!==s&&(o[c++]=(3&n)<<6|s));return a?c-t:o.subarray(0,c)},s.binary.base58.encode=function(e,a){return s.binary.baseN.encode(e,d,a)},s.binary.base58.decode=function(e,a){return s.binary.baseN.decode(e,d,a)},s.text={utf8:{},utf16:{}},s.text.utf8.encode=function(e,a,t){e=s.encodeUtf8(e);var r=a;r||(r=new Uint8Array(e.length));for(var i=t=t||0,n=0;n0&&n.push(t),s=r.lastIndex;var o=a[0][1];switch(o){case"s":case"o":i");break;case"%":n.push("%");break;default:n.push("<%"+o+"?>")}}return n.push(e.substring(s)),n.join("")},s.formatNumber=function(e,a,t,r){var i=e,n=isNaN(a=Math.abs(a))?2:a,s=void 0===t?",":t,o=void 0===r?".":r,l=i<0?"-":"",c=parseInt(i=Math.abs(+i||0).toFixed(n),10)+"",u=c.length>3?c.length%3:0;return l+(u?c.substr(0,u)+o:"")+c.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+o)+(n?s+Math.abs(i-c).toFixed(n).slice(2):"")},s.formatSize=function(e){return e=e>=1073741824?s.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?s.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?s.formatNumber(e/1024,0)+" KiB":s.formatNumber(e,0)+" bytes"},s.bytesFromIP=function(e){return-1!==e.indexOf(".")?s.bytesFromIPv4(e):-1!==e.indexOf(":")?s.bytesFromIPv6(e):null},s.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var a=s.createBuffer(),t=0;tt[r].end-t[r].start&&(r=t.length-1)):t.push({start:l,end:l})}a.push(n)}if(t.length>0){var c=t[r];c.end-c.start>0&&(a.splice(c.start,c.end-c.start+1,""),0===c.start&&a.unshift(""),7===c.end&&a.push(""))}return a.join(":")},s.estimateCores=function(e,a){if("function"==typeof e&&(a=e,e={}),e=e||{},"cores"in s&&!e.update)return a(null,s.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return s.cores=navigator.hardwareConcurrency,a(null,s.cores);if("undefined"==typeof Worker)return s.cores=1,a(null,s.cores);if("undefined"==typeof Blob)return s.cores=2,a(null,s.cores);var t=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var a=Date.now(),t=a+4;Date.now()o.st&&i.sti.st&&o.st{var r=t(52154);t(41954),t(68159),t(32119),t(78765),t(60086),t(39842),t(24800),t(49713),t(75888),t(75911);var i=r.asn1,n=e.exports=r.pki=r.pki||{},s=n.oids,o={};o.CN=s.commonName,o.commonName="CN",o.C=s.countryName,o.countryName="C",o.L=s.localityName,o.localityName="L",o.ST=s.stateOrProvinceName,o.stateOrProvinceName="ST",o.O=s.organizationName,o.organizationName="O",o.OU=s.organizationalUnitName,o.organizationalUnitName="OU",o.E=s.emailAddress,o.emailAddress="E";var l=r.pki.rsa.publicKeyValidator,c={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},l,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},u={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},d={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},l,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[d,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function m(e,a){"string"==typeof a&&(a={shortName:a});for(var t,r=null,i=0;null===r&&i128)throw new Error('Invalid "nsComment" content.');e.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&a.cert){var m=a.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=m.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,m.getBytes())}else if("authorityKeyIdentifier"===e.name&&a.cert){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);u=e.value.value;if(e.keyIdentifier){var p=!0===e.keyIdentifier?a.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;u.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,p))}if(e.authorityCertIssuer){var g=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[b(!0===e.authorityCertIssuer?a.cert.issuer:e.authorityCertIssuer)])];u.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,g))}if(e.serialNumber){var f=r.util.hexToBytes(!0===e.serialNumber?a.cert.serialNumber:e.serialNumber);u.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,f))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);u=e.value.value;var y,k=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),v=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(h=0;h2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(d.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(l.validity.notBefore=d[0],l.validity.notAfter=d[1],l.tbsCertificate=t.tbsCertificate,a){l.md=g({signatureOid:l.signatureOid,type:"certificate"});var h=i.toDer(l.tbsCertificate);l.md.update(h.getBytes())}var f=r.md.sha1.create(),b=i.toDer(t.certIssuer);f.update(b.getBytes()),l.issuer.getField=function(e){return m(l.issuer,e)},l.issuer.addField=function(e){y([e]),l.issuer.attributes.push(e)},l.issuer.attributes=n.RDNAttributesAsArray(t.certIssuer),t.certIssuerUniqueId&&(l.issuer.uniqueId=t.certIssuerUniqueId),l.issuer.hash=f.digest().toHex();var k=r.md.sha1.create(),v=i.toDer(t.certSubject);return k.update(v.getBytes()),l.subject.getField=function(e){return m(l.subject,e)},l.subject.addField=function(e){y([e]),l.subject.attributes.push(e)},l.subject.attributes=n.RDNAttributesAsArray(t.certSubject),t.certSubjectUniqueId&&(l.subject.uniqueId=t.certSubjectUniqueId),l.subject.hash=k.digest().toHex(),t.certExtensions?l.extensions=n.certificateExtensionsFromAsn1(t.certExtensions):l.extensions=[],l.publicKey=n.publicKeyFromAsn1(t.subjectPublicKeyInfo),l},n.certificateExtensionsFromAsn1=function(e){for(var a=[],t=0;t1&&(t=l.value.charCodeAt(1),n=l.value.length>2?l.value.charCodeAt(2):0),a.digitalSignature=128==(128&t),a.nonRepudiation=64==(64&t),a.keyEncipherment=32==(32&t),a.dataEncipherment=16==(16&t),a.keyAgreement=8==(8&t),a.keyCertSign=4==(4&t),a.cRLSign=2==(2&t),a.encipherOnly=1==(1&t),a.decipherOnly=128==(128&n)}else if("basicConstraints"===a.name){(l=i.fromDer(a.value)).value.length>0&&l.value[0].type===i.Type.BOOLEAN?a.cA=0!==l.value[0].value.charCodeAt(0):a.cA=!1;var o=null;l.value.length>0&&l.value[0].type===i.Type.INTEGER?o=l.value[0].value:l.value.length>1&&(o=l.value[1].value),null!==o&&(a.pathLenConstraint=i.derToInteger(o))}else if("extKeyUsage"===a.name)for(var l=i.fromDer(a.value),c=0;c1&&(t=l.value.charCodeAt(1)),a.client=128==(128&t),a.server=64==(64&t),a.email=32==(32&t),a.objsign=16==(16&t),a.reserved=8==(8&t),a.sslCA=4==(4&t),a.emailCA=2==(2&t),a.objCA=1==(1&t)}else if("subjectAltName"===a.name||"issuerAltName"===a.name){var d;a.altNames=[];l=i.fromDer(a.value);for(var h=0;h=$&&e0&&s.value.push(n.certificateExtensionsToAsn1(e.extensions)),s},n.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),b(e.subject),n.publicKeyToAsn1(e.publicKey),w(e)])},n.distinguishedNameToAsn1=function(e){return b(e)},n.certificateToAsn1=function(e){var a=e.tbsCertificate||n.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[a,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},n.certificateExtensionsToAsn1=function(e){var a=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);a.value.push(t);for(var r=0;ru.validity.notAfter)&&(l={message:"Certificate is not valid yet or has expired.",error:n.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:s}),null===l){if(null===(d=a[0]||e.getIssuer(u))&&u.isIssuer(u)&&(h=!0,d=u),d){var m=d;r.util.isArray(m)||(m=[m]);for(var p=!1;!p&&m.length>0;){d=m.shift();try{p=d.verify(u)}catch(e){}}p||(l={message:"Certificate signature is invalid.",error:n.certificateError.bad_certificate})}null!==l||d&&!h||e.hasCertificate(u)||(l={message:"Certificate is not trusted.",error:n.certificateError.unknown_ca})}if(null===l&&d&&!u.isIssuer(d)&&(l={message:"Certificate issuer is invalid.",error:n.certificateError.bad_certificate}),null===l)for(var g={keyUsage:!0,basicConstraints:!0},f=0;null===l&&fy.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:n.certificateError.bad_certificate})}var v=null===l||l.error,w=t.verify?t.verify(v,c,i):v;if(!0!==w)throw!0===v&&(l={message:"The application rejected the certificate.",error:n.certificateError.bad_certificate}),(w||0===w)&&("object"!=typeof w||r.util.isArray(w)?"string"==typeof w&&(l.error=w):(w.message&&(l.message=w.message),w.error&&(l.error=w.error))),l;l=null,o=!1,++c}while(a.length>0);return!0}},890:function(e,a){var t,r,i;r=[],t=function e(){"use strict";var a="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==a?a:{},t=!a.document&&!!a.postMessage,r=t&&/blob:/i.test((a.location||{}).protocol),i={},n=0,s={parse:function(t,r){var o=(r=r||{}).dynamicTyping||!1;if(w(o)&&(r.dynamicTypingFunction=o,o={}),r.dynamicTyping=o,r.transform=!!w(r.transform)&&r.transform,r.worker&&s.WORKERS_SUPPORTED){var l=function(){if(!s.WORKERS_SUPPORTED)return!1;var t,r,o=(t=a.URL||a.webkitURL||null,r=e.toString(),s.BLOB_URL||(s.BLOB_URL=t.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),l=new a.Worker(o);return l.onmessage=f,l.id=n++,i[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,void l.postMessage({input:t,config:r,workerId:l.id})}var m=null;return s.NODE_STREAM_INPUT,"string"==typeof t?m=r.download?new c(r):new d(r):!0===t.readable&&w(t.read)&&w(t.on)?m=new h(r):(a.File&&t instanceof File||t instanceof Object)&&(m=new u(r)),m.stream(t)},unparse:function(e,a){var t=!1,r=!0,i=",",n="\r\n",o='"',l=o+o,c=!1,u=null,d=!1;!function(){if("object"==typeof a){if("string"!=typeof a.delimiter||s.BAD_DELIMITERS.filter((function(e){return-1!==a.delimiter.indexOf(e)})).length||(i=a.delimiter),("boolean"==typeof a.quotes||"function"==typeof a.quotes||Array.isArray(a.quotes))&&(t=a.quotes),"boolean"!=typeof a.skipEmptyLines&&"string"!=typeof a.skipEmptyLines||(c=a.skipEmptyLines),"string"==typeof a.newline&&(n=a.newline),"string"==typeof a.quoteChar&&(o=a.quoteChar),"boolean"==typeof a.header&&(r=a.header),Array.isArray(a.columns)){if(0===a.columns.length)throw new Error("Option columns is empty");u=a.columns}void 0!==a.escapeChar&&(l=a.escapeChar+o),("boolean"==typeof a.escapeFormulae||a.escapeFormulae instanceof RegExp)&&(d=a.escapeFormulae instanceof RegExp?a.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var h=new RegExp(p(o),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return m(null,e,c);if("object"==typeof e[0])return m(u||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),m(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function m(e,a,t){var s="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof a&&(a=JSON.parse(a));var o=Array.isArray(e)&&0=this._config.preview;if(r)a.postMessage({results:o,workerId:s.WORKER_ID,finished:c});else if(w(this._config.chunk)&&!t){if(this._config.chunk(o,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),this._completed||!c||!w(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):r&&this._config.error&&a.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function c(e){var a;(e=e||{}).chunkSize||(e.chunkSize=s.RemoteChunkSize),l.call(this,e),this._nextChunk=t?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(a=new XMLHttpRequest,this._config.withCredentials&&(a.withCredentials=this._config.withCredentials),t||(a.onload=v(this._chunkLoaded,this),a.onerror=v(this._chunkError,this)),a.open(this._config.downloadRequestBody?"POST":"GET",this._input,!t),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)a.setRequestHeader(r,e[r])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;a.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{a.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}t&&0===a.status&&this._chunkError()}},this._chunkLoaded=function(){4===a.readyState&&(a.status<200||400<=a.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:a.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var a=e.getResponseHeader("Content-Range");return null===a?-1:parseInt(a.substring(a.lastIndexOf("/")+1))}(a),this.parseChunk(a.responseText)))},this._chunkError=function(e){var t=a.statusText||e;this._sendError(new Error(t))}}function u(e){var a,t;(e=e||{}).chunkSize||(e.chunkSize=s.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,t=e.slice||e.webkitSlice||e.mozSlice,r?((a=new FileReader).onload=v(this._chunkLoaded,this),a.onerror=v(this._chunkError,this)):a=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(a.error)}}function d(e){var a;l.call(this,e=e||{}),this.stream=function(e){return a=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=a.substring(0,t),a=a.substring(t)):(e=a,a=""),this._finished=!a,this.parseChunk(e)}}}function h(e){l.call(this,e=e||{});var a=[],t=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===a.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),a.length?this.parseChunk(a.shift()):t=!0},this._streamData=v((function(e){try{a.push("string"==typeof e?e:e.toString(this._config.encoding)),t&&(t=!1,this._checkIsFinished(),this.parseChunk(a.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=v((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=v((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=v((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function m(e){var a,t,r,i=Math.pow(2,53),n=-i,o=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,c=this,u=0,d=0,h=!1,m=!1,f=[],b={data:[],errors:[],meta:{}};if(w(e.step)){var y=e.step;e.step=function(a){if(b=a,j())$();else{if($(),0===b.data.length)return;u+=a.data.length,e.preview&&u>e.preview?t.abort():(b.data=b.data[0],y(b,c))}}}function v(a){return"greedy"===e.skipEmptyLines?""===a.join("").trim():1===a.length&&0===a[0].length}function $(){return b&&r&&(z("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(b.data=b.data.filter((function(e){return!v(e)}))),j()&&function(){if(b)if(Array.isArray(b.data[0])){for(var a=0;j()&&a=f.length?"__parsed_extra":f[r]),e.transform&&(s=e.transform(s,n)),s=x(n,s),"__parsed_extra"===n?(i[n]=i[n]||[],i[n].push(s)):i[n]=s}return e.header&&(r>f.length?z("FieldMismatch","TooManyFields","Too many fields: expected "+f.length+" fields but parsed "+r,d+t):r=r.length/2?"\r\n":"\r"}(i,l)),r=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(i),b.meta.delimiter=e.delimiter);else{var c=function(a,t,r,i,n){var o,l,c,u;n=n||[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var d=0;d=o)return N(!0)}else for(_=u,u++;;){if(-1===(_=e.indexOf(a,_+1)))return h||v.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:k.length,index:u}),B();if(_===m-1)return B(e.substring(u,_).replace(S,a));if(a!==c||e[_+1]!==c){if(a===c||0===_||e[_-1]!==c){-1!==C&&C<_+1&&(C=e.indexOf(t,_+1)),-1!==E&&E<_+1&&(E=e.indexOf(r,_+1));var q=A(-1===E?C:Math.min(C,E));if(e.substr(_+1+q,g)===t){$.push(e.substring(u,_).replace(S,a)),e[u=_+1+q+g]!==a&&(_=e.indexOf(a,u)),C=e.indexOf(t,u),E=e.indexOf(r,u);break}var T=A(E);if(e.substring(_+1+T,_+1+T+f)===r){if($.push(e.substring(u,_).replace(S,a)),R(_+1+T+f),C=e.indexOf(t,u),_=e.indexOf(a,u),y&&(L(),d))return N();if(o&&k.length>=o)return N(!0);break}v.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:k.length,index:u}),_++}}else _++}return B();function I(e){k.push(e),j=u}function A(a){var t=0;if(-1!==a){var r=e.substring(_+1,a);r&&""===r.trim()&&(t=r.length)}return t}function B(a){return h||(void 0===a&&(a=e.substring(u)),$.push(a),u=m,I($),y&&L()),N()}function R(a){u=a,I($),$=[],E=e.indexOf(r,u)}function N(e){return{data:k,errors:v,meta:{delimiter:t,linebreak:r,aborted:d,truncated:!!e,cursor:j+(s||0)}}}function L(){n(N()),k=[],v=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return u}}function f(e){var a=e.data,t=i[a.workerId],r=!1;if(a.error)t.userError(a.error,a.file);else if(a.results&&a.results.data){var n={abort:function(){r=!0,b(a.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(w(t.userStep)){for(var s=0;s{var a,t,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function s(e){if(a===setTimeout)return setTimeout(e,0);if((a===i||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(t){try{return a.call(null,e,0)}catch(t){return a.call(this,e,0)}}}!function(){try{a="function"==typeof setTimeout?setTimeout:i}catch(e){a=i}try{t="function"==typeof clearTimeout?clearTimeout:n}catch(e){t=n}}();var o,l=[],c=!1,u=-1;function d(){c&&o&&(c=!1,o.length?l=o.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=s(d);c=!0;for(var a=l.length;a;){for(o=l,l=[];++u1)for(var t=1;t= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,p=String.fromCharCode;function g(e){throw new RangeError(h[e])}function f(e,a){for(var t=e.length,r=[];t--;)r[t]=a(e[t]);return r}function b(e,a){var t=e.split("@"),r="";return t.length>1&&(r=t[0]+"@",e=t[1]),r+f((e=e.replace(d,".")).split("."),a).join(".")}function y(e){for(var a,t,r=[],i=0,n=e.length;i=55296&&a<=56319&&i65535&&(a+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),a+=p(e)})).join("")}function v(e,a){return e+22+75*(e<26)-((0!=a)<<5)}function w(e,a,t){var r=0;for(e=t?m(e/700):e>>1,e+=m(e/a);e>455;r+=l)e=m(e/35);return m(r+36*e/(e+38))}function $(e){var a,t,r,i,n,s,c,u,d,h,p,f=[],b=e.length,y=0,v=128,$=72;for((t=e.lastIndexOf("-"))<0&&(t=0),r=0;r=128&&g("not-basic"),f.push(e.charCodeAt(r));for(i=t>0?t+1:0;i=b&&g("invalid-input"),((u=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:l)>=l||u>m((o-y)/s))&&g("overflow"),y+=u*s,!(u<(d=c<=$?1:c>=$+26?26:c-$));c+=l)s>m(o/(h=l-d))&&g("overflow"),s*=h;$=w(y-n,a=f.length+1,0==n),m(y/a)>o-v&&g("overflow"),v+=m(y/a),y%=a,f.splice(y++,0,v)}return k(f)}function j(e){var a,t,r,i,n,s,c,u,d,h,f,b,k,$,j,x=[];for(b=(e=y(e)).length,a=128,t=0,n=72,s=0;s=a&&fm((o-t)/(k=r+1))&&g("overflow"),t+=(c-a)*k,a=c,s=0;so&&g("overflow"),f==a){for(u=t,d=l;!(u<(h=d<=n?1:d>=n+26?26:d-n));d+=l)j=u-h,$=l-h,x.push(p(v(h+j%$,0))),u=m(j/$);x.push(p(v(u,0))),n=w(t,k,r==i),t=0,++r}++t,++a}return x.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:k},decode:$,encode:j,toASCII:function(e){return b(e,(function(e){return u.test(e)?"xn--"+j(e):e}))},toUnicode:function(e){return b(e,(function(e){return c.test(e)?$(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return s}.call(a,t,a,e))||(e.exports=r)}()},86129:e=>{"use strict";function a(e,a){return Object.prototype.hasOwnProperty.call(e,a)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var n={};if("string"!=typeof e||0===e.length)return n;var s=/\+/g;e=e.split(t);var o=1e3;i&&"number"==typeof i.maxKeys&&(o=i.maxKeys);var l=e.length;o>0&&l>o&&(l=o);for(var c=0;c=0?(u=p.substr(0,g),d=p.substr(g+1)):(u=p,d=""),h=decodeURIComponent(u),m=decodeURIComponent(d),a(n,h)?Array.isArray(n[h])?n[h].push(m):n[h]=[n[h],m]:n[h]=m}return n}},32348:e=>{"use strict";var a=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var n=encodeURIComponent(a(i))+r;return Array.isArray(e[i])?e[i].map((function(e){return n+encodeURIComponent(a(e))})).join(t):n+encodeURIComponent(a(e[i]))})).join(t):i?encodeURIComponent(a(i))+r+encodeURIComponent(a(e)):""}},30068:(e,a,t)=>{"use strict";a.decode=a.parse=t(86129),a.encode=a.stringify=t(32348)},97123:(e,a,t)=>{"use strict";t.d(a,{X:()=>i});var r=t(62367),i=function(e){function a(a){var t=e.call(this)||this;return t._value=a,t}return(0,r.ZT)(a,e),Object.defineProperty(a.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),a.prototype._subscribe=function(a){var t=e.prototype._subscribe.call(this,a);return!t.closed&&a.next(this._value),t},a.prototype.getValue=function(){var e=this,a=e.hasError,t=e.thrownError,r=e._value;if(a)throw t;return this._throwIfClosed(),r},a.prototype.next=function(a){e.prototype.next.call(this,this._value=a)},a}(t(99918).x)},68621:(e,a,t)=>{"use strict";t.d(a,{y:()=>u});var r=t(85438),i=t(33101),n=t(89323),s=t(31705),o=t(85370),l=t(1378),c=t(17366),u=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(a){var t=new e;return t.source=this,t.operator=a,t},e.prototype.subscribe=function(e,a,t){var n,s=this,o=(n=e)&&n instanceof r.Lv||function(e){return e&&(0,l.m)(e.next)&&(0,l.m)(e.error)&&(0,l.m)(e.complete)}(n)&&(0,i.Nn)(n)?e:new r.Hp(e,a,t);return(0,c.x)((function(){var e=s,a=e.operator,t=e.source;o.add(a?a.call(o,t):t?s._subscribe(o):s._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(a){e.error(a)}},e.prototype.forEach=function(e,a){var t=this;return new(a=d(a))((function(a,i){var n=new r.Hp({next:function(a){try{e(a)}catch(e){i(e),n.unsubscribe()}},error:i,complete:a});t.subscribe(n)}))},e.prototype._subscribe=function(e){var a;return null===(a=this.source)||void 0===a?void 0:a.subscribe(e)},e.prototype[n.L]=function(){return this},e.prototype.pipe=function(){for(var e=[],a=0;a{"use strict";t.d(a,{t:()=>s});var r=t(62367),i=t(99918),n=t(3513),s=function(e){function a(a,t,r){void 0===a&&(a=1/0),void 0===t&&(t=1/0),void 0===r&&(r=n.l);var i=e.call(this)||this;return i._bufferSize=a,i._windowTime=t,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=t===1/0,i._bufferSize=Math.max(1,a),i._windowTime=Math.max(1,t),i}return(0,r.ZT)(a,e),a.prototype.next=function(a){var t=this,r=t.isStopped,i=t._buffer,n=t._infiniteTimeWindow,s=t._timestampProvider,o=t._windowTime;r||(i.push(a),!n&&i.push(s.now()+o)),this._trimBuffer(),e.prototype.next.call(this,a)},a.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var a=this._innerSubscribe(e),t=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i{"use strict";t.d(a,{x:()=>c});var r=t(62367),i=t(68621),n=t(33101),s=(0,t(6514).d)((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),o=t(98553),l=t(17366),c=function(e){function a(){var a=e.call(this)||this;return a.closed=!1,a.currentObservers=null,a.observers=[],a.isStopped=!1,a.hasError=!1,a.thrownError=null,a}return(0,r.ZT)(a,e),a.prototype.lift=function(e){var a=new u(this,this);return a.operator=e,a},a.prototype._throwIfClosed=function(){if(this.closed)throw new s},a.prototype.next=function(e){var a=this;(0,l.x)((function(){var t,i;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var n=(0,r.XA)(a.currentObservers),s=n.next();!s.done;s=n.next()){s.value.next(e)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}}}))},a.prototype.error=function(e){var a=this;(0,l.x)((function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=e;for(var t=a.observers;t.length;)t.shift().error(e)}}))},a.prototype.complete=function(){var e=this;(0,l.x)((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var a=e.observers;a.length;)a.shift().complete()}}))},a.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(a.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),a.prototype._trySubscribe=function(a){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,a)},a.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},a.prototype._innerSubscribe=function(e){var a=this,t=this,r=t.hasError,i=t.isStopped,s=t.observers;return r||i?n.Lc:(this.currentObservers=null,s.push(e),new n.w0((function(){a.currentObservers=null,(0,o.P)(s,e)})))},a.prototype._checkFinalizedStatuses=function(e){var a=this,t=a.hasError,r=a.thrownError,i=a.isStopped;t?e.error(r):i&&e.complete()},a.prototype.asObservable=function(){var e=new i.y;return e.source=this,e},a.create=function(e,a){return new u(e,a)},a}(i.y),u=function(e){function a(a,t){var r=e.call(this)||this;return r.destination=a,r.source=t,r}return(0,r.ZT)(a,e),a.prototype.next=function(e){var a,t;null===(t=null===(a=this.destination)||void 0===a?void 0:a.next)||void 0===t||t.call(a,e)},a.prototype.error=function(e){var a,t;null===(t=null===(a=this.destination)||void 0===a?void 0:a.error)||void 0===t||t.call(a,e)},a.prototype.complete=function(){var e,a;null===(a=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===a||a.call(e)},a.prototype._subscribe=function(e){var a,t;return null!==(t=null===(a=this.source)||void 0===a?void 0:a.subscribe(e))&&void 0!==t?t:n.Lc},a}(c)},85438:(e,a,t)=>{"use strict";t.d(a,{Hp:()=>b,Lv:()=>m});var r=t(62367),i=t(1378),n=t(33101),s=t(85370),o=t(54124),l=t(97475),c=u("C",void 0,void 0);function u(e,a,t){return{kind:e,value:a,error:t}}var d=t(33683),h=t(17366),m=function(e){function a(a){var t=e.call(this)||this;return t.isStopped=!1,a?(t.destination=a,(0,n.Nn)(a)&&a.add(t)):t.destination=v,t}return(0,r.ZT)(a,e),a.create=function(e,a,t){return new b(e,a,t)},a.prototype.next=function(e){this.isStopped?k(function(e){return u("N",e,void 0)}(e),this):this._next(e)},a.prototype.error=function(e){this.isStopped?k(u("E",void 0,e),this):(this.isStopped=!0,this._error(e))},a.prototype.complete=function(){this.isStopped?k(c,this):(this.isStopped=!0,this._complete())},a.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},a.prototype._next=function(e){this.destination.next(e)},a.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},a.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},a}(n.w0),p=Function.prototype.bind;function g(e,a){return p.call(e,a)}var f=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var a=this.partialObserver;if(a.next)try{a.next(e)}catch(e){y(e)}},e.prototype.error=function(e){var a=this.partialObserver;if(a.error)try{a.error(e)}catch(e){y(e)}else y(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){y(e)}},e}(),b=function(e){function a(a,t,r){var n,o,l=e.call(this)||this;(0,i.m)(a)||!a?n={next:null!=a?a:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:l&&s.v.useDeprecatedNextContext?((o=Object.create(a)).unsubscribe=function(){return l.unsubscribe()},n={next:a.next&&g(a.next,o),error:a.error&&g(a.error,o),complete:a.complete&&g(a.complete,o)}):n=a;return l.destination=new f(n),l}return(0,r.ZT)(a,e),a}(m);function y(e){s.v.useDeprecatedSynchronousErrorHandling?(0,h.O)(e):(0,o.h)(e)}function k(e,a){var t=s.v.onStoppedNotification;t&&d.z.setTimeout((function(){return t(e,a)}))}var v={closed:!0,next:l.Z,error:function(e){throw e},complete:l.Z}},33101:(e,a,t)=>{"use strict";t.d(a,{Lc:()=>l,w0:()=>o,Nn:()=>c});var r=t(62367),i=t(1378),n=(0,t(6514).d)((function(e){return function(a){e(this),this.message=a?a.length+" errors occurred during unsubscription:\n"+a.map((function(e,a){return a+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=a}})),s=t(98553),o=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var a;return e.prototype.unsubscribe=function(){var e,a,t,s,o;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var c=(0,r.XA)(l),d=c.next();!d.done;d=c.next()){d.value.remove(this)}}catch(a){e={error:a}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(e)throw e.error}}else l.remove(this);var h=this.initialTeardown;if((0,i.m)(h))try{h()}catch(e){o=e instanceof n?e.errors:[e]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var p=(0,r.XA)(m),g=p.next();!g.done;g=p.next()){var f=g.value;try{u(f)}catch(e){o=null!=o?o:[],e instanceof n?o=(0,r.ev)((0,r.ev)([],(0,r.CR)(o)),(0,r.CR)(e.errors)):o.push(e)}}}catch(e){t={error:e}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(t)throw t.error}}}if(o)throw new n(o)}},e.prototype.add=function(a){var t;if(a&&a!==this)if(this.closed)u(a);else{if(a instanceof e){if(a.closed||a._hasParent(this))return;a._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(a)}},e.prototype._hasParent=function(e){var a=this._parentage;return a===e||Array.isArray(a)&&a.includes(e)},e.prototype._addParent=function(e){var a=this._parentage;this._parentage=Array.isArray(a)?(a.push(e),a):a?[a,e]:e},e.prototype._removeParent=function(e){var a=this._parentage;a===e?this._parentage=null:Array.isArray(a)&&(0,s.P)(a,e)},e.prototype.remove=function(a){var t=this._finalizers;t&&(0,s.P)(t,a),a instanceof e&&a._removeParent(this)},e.EMPTY=((a=new e).closed=!0,a),e}(),l=o.EMPTY;function c(e){return e instanceof o||e&&"closed"in e&&(0,i.m)(e.remove)&&(0,i.m)(e.add)&&(0,i.m)(e.unsubscribe)}function u(e){(0,i.m)(e)?e():e.unsubscribe()}},85370:(e,a,t)=>{"use strict";t.d(a,{v:()=>r});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},62858:(e,a,t)=>{"use strict";t.d(a,{z:()=>n});var r=t(20354),i=t(85438);function n(e,a){var t="object"==typeof a;return new Promise((function(n,s){var o=new i.Hp({next:function(e){n(e),o.unsubscribe()},error:s,complete:function(){t?n(a.defaultValue):s(new r.K)}});e.subscribe(o)}))}},37172:(e,a,t)=>{"use strict";t.d(a,{c:()=>c});var r=t(62367),i=t(68621),n=t(33101),s=t(90574),o=t(52201),l=t(44964),c=function(e){function a(a,t){var r=e.call(this)||this;return r.source=a,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,(0,l.A)(a)&&(r.lift=a.lift),r}return(0,r.ZT)(a,e),a.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},a.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},a.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},a.prototype.connect=function(){var e=this,a=this._connection;if(!a){a=this._connection=new n.w0;var t=this.getSubject();a.add(this.source.subscribe((0,o.x)(t,void 0,(function(){e._teardown(),t.complete()}),(function(a){e._teardown(),t.error(a)}),(function(){return e._teardown()})))),a.closed&&(this._connection=null,a=n.w0.EMPTY)}return a},a.prototype.refCount=function(){return(0,s.x)()(this)},a}(i.y)},71451:(e,a,t)=>{"use strict";t.d(a,{a:()=>h});var r=t(68621),i=t(52734),n=t(80986),s=t(89281),o=t(81225),l=t(15104),c=t(72106),u=t(52201),d=t(98217);function h(){for(var e=[],a=0;a{"use strict";t.d(a,{z:()=>o});var r=t(66835);function i(){return(0,r.J)(1)}var n=t(15104),s=t(80986);function o(){for(var e=[],a=0;a{"use strict";t.d(a,{P:()=>n});var r=t(68621),i=t(6588);function n(e){return new r.y((function(a){(0,i.Xf)(e()).subscribe(a)}))}},33140:(e,a,t)=>{"use strict";t.d(a,{E:()=>r});var r=new(t(68621).y)((function(e){return e.complete()}))},48451:(e,a,t)=>{"use strict";t.d(a,{D:()=>u});var r=t(68621),i=t(52734),n=t(6588),s=t(15104),o=t(52201),l=t(81225),c=t(72106);function u(){for(var e=[],a=0;a{"use strict";t.d(a,{D:()=>w});var r=t(6588),i=t(98217),n=t(44964),s=t(52201);function o(e,a){return void 0===a&&(a=0),(0,n.e)((function(t,r){t.subscribe((0,s.x)(r,(function(t){return(0,i.f)(r,e,(function(){return r.next(t)}),a)}),(function(){return(0,i.f)(r,e,(function(){return r.complete()}),a)}),(function(t){return(0,i.f)(r,e,(function(){return r.error(t)}),a)})))}))}function l(e,a){return void 0===a&&(a=0),(0,n.e)((function(t,r){r.add(e.schedule((function(){return t.subscribe(r)}),a))}))}var c=t(68621);var u=t(64352),d=t(1378);function h(e,a){if(!e)throw new Error("Iterable cannot be null");return new c.y((function(t){(0,i.f)(t,a,(function(){var r=e[Symbol.asyncIterator]();(0,i.f)(t,a,(function(){r.next().then((function(e){e.done?t.complete():t.next(e.value)}))}),0,!0)}))}))}var m=t(25177),p=t(99546),g=t(89866),f=t(93890),b=t(47372),y=t(15006),k=t(44896);function v(e,a){if(null!=e){if((0,m.c)(e))return function(e,a){return(0,r.Xf)(e).pipe(l(a),o(a))}(e,a);if((0,g.z)(e))return function(e,a){return new c.y((function(t){var r=0;return a.schedule((function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())}))}))}(e,a);if((0,p.t)(e))return function(e,a){return(0,r.Xf)(e).pipe(l(a),o(a))}(e,a);if((0,b.D)(e))return h(e,a);if((0,f.T)(e))return function(e,a){return new c.y((function(t){var r;return(0,i.f)(t,a,(function(){r=e[u.h](),(0,i.f)(t,a,(function(){var e,a,i;try{a=(e=r.next()).value,i=e.done}catch(e){return void t.error(e)}i?t.complete():t.next(a)}),0,!0)})),function(){return(0,d.m)(null==r?void 0:r.return)&&r.return()}}))}(e,a);if((0,k.L)(e))return function(e,a){return h((0,k.Q)(e),a)}(e,a)}throw(0,y.z)(e)}function w(e,a){return a?v(e,a):(0,r.Xf)(e)}},85940:(e,a,t)=>{"use strict";t.d(a,{R:()=>m});var r=t(62367),i=t(6588),n=t(68621),s=t(47575),o=t(89866),l=t(1378),c=t(81225),u=["addListener","removeListener"],d=["addEventListener","removeEventListener"],h=["on","off"];function m(e,a,t,g){if((0,l.m)(t)&&(g=t,t=void 0),g)return m(e,a,t).pipe((0,c.Z)(g));var f=(0,r.CR)(function(e){return(0,l.m)(e.addEventListener)&&(0,l.m)(e.removeEventListener)}(e)?d.map((function(r){return function(i){return e[r](a,i,t)}})):function(e){return(0,l.m)(e.addListener)&&(0,l.m)(e.removeListener)}(e)?u.map(p(e,a)):function(e){return(0,l.m)(e.on)&&(0,l.m)(e.off)}(e)?h.map(p(e,a)):[],2),b=f[0],y=f[1];if(!b&&(0,o.z)(e))return(0,s.z)((function(e){return m(e,a,t)}))((0,i.Xf)(e));if(!b)throw new TypeError("Invalid event target");return new n.y((function(e){var a=function(){for(var a=[],t=0;t{"use strict";t.d(a,{Xf:()=>g});var r=t(62367),i=t(89866),n=t(99546),s=t(68621),o=t(25177),l=t(47372),c=t(15006),u=t(93890),d=t(44896),h=t(1378),m=t(54124),p=t(89323);function g(e){if(e instanceof s.y)return e;if(null!=e){if((0,o.c)(e))return y=e,new s.y((function(e){var a=y[p.L]();if((0,h.m)(a.subscribe))return a.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if((0,i.z)(e))return b=e,new s.y((function(e){for(var a=0;a{"use strict";t.d(a,{F:()=>n});var r=t(56755),i=t(20814);function n(e,a){return void 0===e&&(e=0),void 0===a&&(a=r.z),e<0&&(e=0),(0,i.H)(e,e,a)}},56083:(e,a,t)=>{"use strict";t.d(a,{T:()=>l});var r=t(66835),i=t(6588),n=t(33140),s=t(15104),o=t(80986);function l(){for(var e=[],a=0;a{"use strict";t.d(a,{of:()=>n});var r=t(15104),i=t(80986);function n(){for(var e=[],a=0;a{"use strict";t.d(a,{_:()=>n});var r=t(68621),i=t(1378);function n(e,a){var t=(0,i.m)(e)?e:function(){return e},n=function(e){return e.error(t())};return new r.y(a?function(e){return a.schedule(n,0,e)}:n)}},20814:(e,a,t)=>{"use strict";t.d(a,{H:()=>s});var r=t(68621),i=t(56755),n=t(75904);function s(e,a,t){void 0===e&&(e=0),void 0===t&&(t=i.P);var s=-1;return null!=a&&((0,n.K)(a)?t=a:s=a),new r.y((function(a){var r,i=(r=e)instanceof Date&&!isNaN(r)?+e-t.now():e;i<0&&(i=0);var n=0;return t.schedule((function(){a.closed||(a.next(n++),0<=s?this.schedule(void 0,s):a.complete())}),i)}))}},52201:(e,a,t)=>{"use strict";t.d(a,{x:()=>i});var r=t(62367);function i(e,a,t,r,i){return new n(e,a,t,r,i)}var n=function(e){function a(a,t,r,i,n,s){var o=e.call(this,a)||this;return o.onFinalize=n,o.shouldUnsubscribe=s,o._next=t?function(e){try{t(e)}catch(e){a.error(e)}}:e.prototype._next,o._error=i?function(e){try{i(e)}catch(e){a.error(e)}finally{this.unsubscribe()}}:e.prototype._error,o._complete=r?function(){try{r()}catch(e){a.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,o}return(0,r.ZT)(a,e),a.prototype.unsubscribe=function(){var a;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var t=this.closed;e.prototype.unsubscribe.call(this),!t&&(null===(a=this.onFinalize)||void 0===a||a.call(this))}},a}(t(85438).Lv)},67180:(e,a,t)=>{"use strict";t.d(a,{e:()=>l});var r=t(56755),i=t(44964),n=t(6588),s=t(52201);var o=t(20814);function l(e,a){return void 0===a&&(a=r.z),t=function(){return(0,o.H)(e,a)},(0,i.e)((function(e,a){var r=!1,i=null,o=null,l=!1,c=function(){if(null==o||o.unsubscribe(),o=null,r){r=!1;var e=i;i=null,a.next(e)}l&&a.complete()},u=function(){o=null,l&&a.complete()};e.subscribe((0,s.x)(a,(function(e){r=!0,i=e,o||(0,n.Xf)(t(e)).subscribe(o=(0,s.x)(a,c,u))}),(function(){l=!0,(!r||!o||o.closed)&&a.complete()})))}));var t}},72171:(e,a,t)=>{"use strict";t.d(a,{K:()=>s});var r=t(6588),i=t(52201),n=t(44964);function s(e){return(0,n.e)((function(a,t){var n,o=null,l=!1;o=a.subscribe((0,i.x)(t,void 0,void 0,(function(i){n=(0,r.Xf)(e(i,s(e)(a))),o?(o.unsubscribe(),o=null,n.subscribe(t)):l=!0}))),l&&(o.unsubscribe(),o=null,n.subscribe(t))}))}},47456:(e,a,t)=>{"use strict";t.d(a,{b:()=>n});var r=t(47575),i=t(1378);function n(e,a){return(0,i.m)(a)?(0,r.z)(e,a,1):(0,r.z)(e,1)}},72118:(e,a,t)=>{"use strict";t.d(a,{b:()=>s});var r=t(56755),i=t(44964),n=t(52201);function s(e,a){return void 0===a&&(a=r.z),(0,i.e)((function(t,r){var i=null,s=null,o=null,l=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,r.next(e)}};function c(){var t=o+e,n=a.now();if(n{"use strict";t.d(a,{d:()=>n});var r=t(44964),i=t(52201);function n(e){return(0,r.e)((function(a,t){var r=!1;a.subscribe((0,i.x)(t,(function(e){r=!0,t.next(e)}),(function(){r||t.next(e),t.complete()})))}))}},95351:(e,a,t)=>{"use strict";t.d(a,{x:()=>s});var r=t(89281),i=t(44964),n=t(52201);function s(e,a){return void 0===a&&(a=r.y),e=null!=e?e:o,(0,i.e)((function(t,r){var i,s=!0;t.subscribe((0,n.x)(r,(function(t){var n=a(t);!s&&e(i,n)||(s=!1,i=n,r.next(t))})))}))}function o(e,a){return e===a}},19133:(e,a,t)=>{"use strict";t.d(a,{h:()=>n});var r=t(44964),i=t(52201);function n(e,a){return(0,r.e)((function(t,r){var n=0;t.subscribe((0,i.x)(r,(function(t){return e.call(a,t,n++)&&r.next(t)})))}))}},26930:(e,a,t)=>{"use strict";t.d(a,{x:()=>i});var r=t(44964);function i(e){return(0,r.e)((function(a,t){try{a.subscribe(t)}finally{t.add(e)}}))}},94824:(e,a,t)=>{"use strict";t.d(a,{P:()=>c});var r=t(20354),i=t(19133),n=t(17108),s=t(94159),o=t(35999),l=t(89281);function c(e,a){var t=arguments.length>=2;return function(c){return c.pipe(e?(0,i.h)((function(a,t){return e(a,t,c)})):l.y,(0,n.q)(1),t?(0,s.d)(a):(0,o.T)((function(){return new r.K})))}}},29841:(e,a,t)=>{"use strict";t.d(a,{Z:()=>c});var r=t(20354),i=t(19133),n=t(28072),s=t(35999),o=t(94159),l=t(89281);function c(e,a){var t=arguments.length>=2;return function(c){return c.pipe(e?(0,i.h)((function(a,t){return e(a,t,c)})):l.y,(0,n.h)(1),t?(0,o.d)(a):(0,s.T)((function(){return new r.K})))}}},24075:(e,a,t)=>{"use strict";t.d(a,{U:()=>n});var r=t(44964),i=t(52201);function n(e,a){return(0,r.e)((function(t,r){var n=0;t.subscribe((0,i.x)(r,(function(t){r.next(e.call(a,t,n++))})))}))}},58050:(e,a,t)=>{"use strict";t.d(a,{h:()=>i});var r=t(24075);function i(e){return(0,r.U)((function(){return e}))}},66835:(e,a,t)=>{"use strict";t.d(a,{J:()=>n});var r=t(47575),i=t(89281);function n(e){return void 0===e&&(e=1/0),(0,r.z)(i.y,e)}},47575:(e,a,t)=>{"use strict";t.d(a,{z:()=>c});var r=t(24075),i=t(6588),n=t(44964),s=t(98217),o=t(52201);var l=t(1378);function c(e,a,t){return void 0===t&&(t=1/0),(0,l.m)(a)?c((function(t,n){return(0,r.U)((function(e,r){return a(t,e,n,r)}))((0,i.Xf)(e(t,n)))}),t):("number"==typeof a&&(t=a),(0,n.e)((function(a,r){return function(e,a,t,r,n,l,c,u){var d=[],h=0,m=0,p=!1,g=function(){!p||d.length||h||a.complete()},f=function(e){return h{"use strict";t.d(a,{G:()=>n});var r=t(44964),i=t(52201);function n(){return(0,r.e)((function(e,a){var t,r=!1;e.subscribe((0,i.x)(a,(function(e){var i=t;t=e,r&&a.next([i,e]),r=!0})))}))}},90574:(e,a,t)=>{"use strict";t.d(a,{x:()=>n});var r=t(44964),i=t(52201);function n(){return(0,r.e)((function(e,a){var t=null;e._refCount++;var r=(0,i.x)(a,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)t=null;else{var r=e._connection,i=t;t=null,!r||i&&r!==i||r.unsubscribe(),a.unsubscribe()}}));e.subscribe(r),r.closed||(t=e.connect())}))}},63153:(e,a,t)=>{"use strict";t.d(a,{R:()=>s});var r=t(44964),i=t(52201);function n(e,a,t,r,n){return function(s,o){var l=t,c=a,u=0;s.subscribe((0,i.x)(o,(function(a){var t=u++;c=l?e(c,a,t):(l=!0,a),r&&o.next(c)}),n&&function(){l&&o.next(c),o.complete()}))}}function s(e,a){return(0,r.e)(n(e,a,arguments.length>=2,!0))}},95392:(e,a,t)=>{"use strict";t.d(a,{B:()=>l});var r=t(62367),i=t(6588),n=t(99918),s=t(85438),o=t(44964);function l(e){void 0===e&&(e={});var a=e.connector,t=void 0===a?function(){return new n.x}:a,r=e.resetOnError,l=void 0===r||r,u=e.resetOnComplete,d=void 0===u||u,h=e.resetOnRefCountZero,m=void 0===h||h;return function(e){var a,r,n,u=0,h=!1,p=!1,g=function(){null==r||r.unsubscribe(),r=void 0},f=function(){g(),a=n=void 0,h=p=!1},b=function(){var e=a;f(),null==e||e.unsubscribe()};return(0,o.e)((function(e,o){u++,p||h||g();var y=n=null!=n?n:t();o.add((function(){0!==--u||p||h||(r=c(b,m))})),y.subscribe(o),!a&&u>0&&(a=new s.Hp({next:function(e){return y.next(e)},error:function(e){p=!0,g(),r=c(f,l,e),y.error(e)},complete:function(){h=!0,g(),r=c(f,d),y.complete()}}),(0,i.Xf)(e).subscribe(a))}))(e)}}function c(e,a){for(var t=[],i=2;i{"use strict";t.d(a,{d:()=>n});var r=t(1607),i=t(95392);function n(e,a,t){var n,s,o,l,c=!1;return e&&"object"==typeof e?(n=e.bufferSize,l=void 0===n?1/0:n,s=e.windowTime,a=void 0===s?1/0:s,c=void 0!==(o=e.refCount)&&o,t=e.scheduler):l=null!=e?e:1/0,(0,i.B)({connector:function(){return new r.t(l,a,t)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},64413:(e,a,t)=>{"use strict";t.d(a,{T:()=>i});var r=t(19133);function i(e){return(0,r.h)((function(a,t){return e<=t}))}},84224:(e,a,t)=>{"use strict";t.d(a,{O:()=>s});var r=t(11123),i=t(15104),n=t(44964);function s(){for(var e=[],a=0;a{"use strict";t.d(a,{w:()=>s});var r=t(6588),i=t(44964),n=t(52201);function s(e,a){return(0,i.e)((function(t,i){var s=null,o=0,l=!1,c=function(){return l&&!s&&i.complete()};t.subscribe((0,n.x)(i,(function(t){null==s||s.unsubscribe();var l=0,u=o++;(0,r.Xf)(e(t,u)).subscribe(s=(0,n.x)(i,(function(e){return i.next(a?a(t,e,u,l++):e)}),(function(){s=null,c()})))}),(function(){l=!0,c()})))}))}},17108:(e,a,t)=>{"use strict";t.d(a,{q:()=>s});var r=t(33140),i=t(44964),n=t(52201);function s(e){return e<=0?function(){return r.E}:(0,i.e)((function(a,t){var r=0;a.subscribe((0,n.x)(t,(function(a){++r<=e&&(t.next(a),e<=r&&t.complete())})))}))}},28072:(e,a,t)=>{"use strict";t.d(a,{h:()=>o});var r=t(62367),i=t(33140),n=t(44964),s=t(52201);function o(e){return e<=0?function(){return i.E}:(0,n.e)((function(a,t){var i=[];a.subscribe((0,s.x)(t,(function(a){i.push(a),e{"use strict";t.d(a,{R:()=>o});var r=t(44964),i=t(52201),n=t(6588),s=t(97475);function o(e){return(0,r.e)((function(a,t){(0,n.Xf)(e).subscribe((0,i.x)(t,(function(){return t.complete()}),s.Z)),!t.closed&&a.subscribe(t)}))}},18706:(e,a,t)=>{"use strict";t.d(a,{o:()=>n});var r=t(44964),i=t(52201);function n(e,a){return void 0===a&&(a=!1),(0,r.e)((function(t,r){var n=0;t.subscribe((0,i.x)(r,(function(t){var i=e(t,n++);(i||a)&&r.next(t),!i&&r.complete()})))}))}},37187:(e,a,t)=>{"use strict";t.d(a,{b:()=>o});var r=t(1378),i=t(44964),n=t(52201),s=t(89281);function o(e,a,t){var o=(0,r.m)(e)||a||t?{next:e,error:a,complete:t}:e;return o?(0,i.e)((function(e,a){var t;null===(t=o.subscribe)||void 0===t||t.call(o);var r=!0;e.subscribe((0,n.x)(a,(function(e){var t;null===(t=o.next)||void 0===t||t.call(o,e),a.next(e)}),(function(){var e;r=!1,null===(e=o.complete)||void 0===e||e.call(o),a.complete()}),(function(e){var t;r=!1,null===(t=o.error)||void 0===t||t.call(o,e),a.error(e)}),(function(){var e,a;r&&(null===(e=o.unsubscribe)||void 0===e||e.call(o)),null===(a=o.finalize)||void 0===a||a.call(o)})))})):s.y}},35999:(e,a,t)=>{"use strict";t.d(a,{T:()=>s});var r=t(20354),i=t(44964),n=t(52201);function s(e){return void 0===e&&(e=o),(0,i.e)((function(a,t){var r=!1;a.subscribe((0,n.x)(t,(function(e){r=!0,t.next(e)}),(function(){return r?t.complete():t.error(e())})))}))}function o(){return new r.K}},35498:(e,a,t)=>{"use strict";t.d(a,{o:()=>o});var r=t(62367),i=function(e){function a(a,t){return e.call(this)||this}return(0,r.ZT)(a,e),a.prototype.schedule=function(e,a){return void 0===a&&(a=0),this},a}(t(33101).w0),n={setInterval:function(e,a){for(var t=[],i=2;i{"use strict";t.d(a,{v:()=>s});var r=t(62367),i=t(3513),n=function(){function e(a,t){void 0===t&&(t=e.now),this.schedulerActionCtor=a,this.now=t}return e.prototype.schedule=function(e,a,t){return void 0===a&&(a=0),new this.schedulerActionCtor(this,e).schedule(t,a)},e.now=i.l.now,e}(),s=function(e){function a(a,t){void 0===t&&(t=n.now);var r=e.call(this,a,t)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return(0,r.ZT)(a,e),a.prototype.flush=function(e){var a=this.actions;if(this._active)a.push(e);else{var t;this._active=!0;do{if(t=e.execute(e.state,e.delay))break}while(e=a.shift());if(this._active=!1,t){for(;e=a.shift();)e.unsubscribe();throw t}}},a}(n)},58604:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});var r=t(62367),i=t(35498),n=t(33101),s={schedule:function(e){var a=requestAnimationFrame,t=cancelAnimationFrame,r=s.delegate;r&&(a=r.requestAnimationFrame,t=r.cancelAnimationFrame);var i=a((function(a){t=void 0,e(a)}));return new n.w0((function(){return null==t?void 0:t(i)}))},requestAnimationFrame:function(){for(var e=[],a=0;a0?e.prototype.requestAsyncId.call(this,a,t,r):(a.actions.push(this),a._scheduled||(a._scheduled=s.requestAnimationFrame((function(){return a.flush(void 0)}))))},a.prototype.recycleAsyncId=function(a,t,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,a,t,r);a.actions.some((function(e){return e.id===t}))||(s.cancelAnimationFrame(t),a._scheduled=void 0)},a}(i.o),l=new(function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return(0,r.ZT)(a,e),a.prototype.flush=function(e){this._active=!0;var a=this._scheduled;this._scheduled=void 0;var t,r=this.actions;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===a&&r.shift());if(this._active=!1,t){for(;(e=r[0])&&e.id===a&&r.shift();)e.unsubscribe();throw t}},a}(t(5609).v))(o)},37062:(e,a,t)=>{"use strict";t.d(a,{E:()=>m});var r,i=t(62367),n=t(35498),s=1,o={};function l(e){return e in o&&(delete o[e],!0)}var c=function(e){var a=s++;return o[a]=!0,r||(r=Promise.resolve()),r.then((function(){return l(a)&&e()})),a},u=function(e){l(e)},d={setImmediate:function(){for(var e=[],a=0;a0?e.prototype.requestAsyncId.call(this,a,t,r):(a.actions.push(this),a._scheduled||(a._scheduled=d.setImmediate(a.flush.bind(a,void 0))))},a.prototype.recycleAsyncId=function(a,t,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,a,t,r);a.actions.some((function(e){return e.id===t}))||(d.clearImmediate(t),a._scheduled=void 0)},a}(n.o),m=new(function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ZT)(a,e),a.prototype.flush=function(e){this._active=!0;var a=this._scheduled;this._scheduled=void 0;var t,r=this.actions;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===a&&r.shift());if(this._active=!1,t){for(;(e=r[0])&&e.id===a&&r.shift();)e.unsubscribe();throw t}},a}(t(5609).v))(h)},56755:(e,a,t)=>{"use strict";t.d(a,{P:()=>n,z:()=>i});var r=t(35498),i=new(t(5609).v)(r.o),n=i},3513:(e,a,t)=>{"use strict";t.d(a,{l:()=>r});var r={now:function(){return(r.delegate||Date).now()},delegate:void 0}},33683:(e,a,t)=>{"use strict";t.d(a,{z:()=>i});var r=t(62367),i={setTimeout:function(e,a){for(var t=[],n=2;n{"use strict";t.d(a,{h:()=>r});var r="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},89323:(e,a,t)=>{"use strict";t.d(a,{L:()=>r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},20354:(e,a,t)=>{"use strict";t.d(a,{K:()=>r});var r=(0,t(6514).d)((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},15104:(e,a,t)=>{"use strict";t.d(a,{_6:()=>l,jO:()=>s,yG:()=>o});var r=t(1378),i=t(75904);function n(e){return e[e.length-1]}function s(e){return(0,r.m)(n(e))?e.pop():void 0}function o(e){return(0,i.K)(n(e))?e.pop():void 0}function l(e,a){return"number"==typeof n(e)?e.pop():a}},52734:(e,a,t)=>{"use strict";t.d(a,{D:()=>o});var r=Array.isArray,i=Object.getPrototypeOf,n=Object.prototype,s=Object.keys;function o(e){if(1===e.length){var a=e[0];if(r(a))return{args:a,keys:null};if((o=a)&&"object"==typeof o&&i(o)===n){var t=s(a);return{args:t.map((function(e){return a[e]})),keys:t}}}var o;return{args:e,keys:null}}},98553:(e,a,t)=>{"use strict";function r(e,a){if(e){var t=e.indexOf(a);0<=t&&e.splice(t,1)}}t.d(a,{P:()=>r})},6514:(e,a,t)=>{"use strict";function r(e){var a=e((function(e){Error.call(e),e.stack=(new Error).stack}));return a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a}t.d(a,{d:()=>r})},72106:(e,a,t)=>{"use strict";function r(e,a){return e.reduce((function(e,t,r){return e[t]=a[r],e}),{})}t.d(a,{n:()=>r})},17366:(e,a,t)=>{"use strict";t.d(a,{O:()=>s,x:()=>n});var r=t(85370),i=null;function n(e){if(r.v.useDeprecatedSynchronousErrorHandling){var a=!i;if(a&&(i={errorThrown:!1,error:null}),e(),a){var t=i,n=t.errorThrown,s=t.error;if(i=null,n)throw s}}else e()}function s(e){r.v.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},98217:(e,a,t)=>{"use strict";function r(e,a,t,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var n=a.schedule((function(){t(),i?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(n),!i)return n}t.d(a,{f:()=>r})},89281:(e,a,t)=>{"use strict";function r(e){return e}t.d(a,{y:()=>r})},89866:(e,a,t)=>{"use strict";t.d(a,{z:()=>r});var r=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},47372:(e,a,t)=>{"use strict";t.d(a,{D:()=>i});var r=t(1378);function i(e){return Symbol.asyncIterator&&(0,r.m)(null==e?void 0:e[Symbol.asyncIterator])}},1378:(e,a,t)=>{"use strict";function r(e){return"function"==typeof e}t.d(a,{m:()=>r})},25177:(e,a,t)=>{"use strict";t.d(a,{c:()=>n});var r=t(89323),i=t(1378);function n(e){return(0,i.m)(e[r.L])}},93890:(e,a,t)=>{"use strict";t.d(a,{T:()=>n});var r=t(64352),i=t(1378);function n(e){return(0,i.m)(null==e?void 0:e[r.h])}},65874:(e,a,t)=>{"use strict";t.d(a,{b:()=>n});var r=t(68621),i=t(1378);function n(e){return!!e&&(e instanceof r.y||(0,i.m)(e.lift)&&(0,i.m)(e.subscribe))}},99546:(e,a,t)=>{"use strict";t.d(a,{t:()=>i});var r=t(1378);function i(e){return(0,r.m)(null==e?void 0:e.then)}},44896:(e,a,t)=>{"use strict";t.d(a,{L:()=>s,Q:()=>n});var r=t(62367),i=t(1378);function n(e){return(0,r.FC)(this,arguments,(function(){var a,t,i;return(0,r.Jh)(this,(function(n){switch(n.label){case 0:a=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,(0,r.qq)(a.read())];case 3:return t=n.sent(),i=t.value,t.done?[4,(0,r.qq)(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,(0,r.qq)(i)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return a.releaseLock(),[7];case 10:return[2]}}))}))}function s(e){return(0,i.m)(null==e?void 0:e.getReader)}},75904:(e,a,t)=>{"use strict";t.d(a,{K:()=>i});var r=t(1378);function i(e){return e&&(0,r.m)(e.schedule)}},44964:(e,a,t)=>{"use strict";t.d(a,{A:()=>i,e:()=>n});var r=t(1378);function i(e){return(0,r.m)(null==e?void 0:e.lift)}function n(e){return function(a){if(i(a))return a.lift((function(a){try{return e(a,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},81225:(e,a,t)=>{"use strict";t.d(a,{Z:()=>s});var r=t(62367),i=t(24075),n=Array.isArray;function s(e){return(0,i.U)((function(a){return function(e,a){return n(a)?e.apply(void 0,(0,r.ev)([],(0,r.CR)(a))):e(a)}(e,a)}))}},97475:(e,a,t)=>{"use strict";function r(){}t.d(a,{Z:()=>r})},31705:(e,a,t)=>{"use strict";t.d(a,{U:()=>n,z:()=>i});var r=t(89281);function i(){for(var e=[],a=0;a{"use strict";t.d(a,{h:()=>n});var r=t(85370),i=t(33683);function n(e){i.z.setTimeout((function(){var a=r.v.onUnhandledError;if(!a)throw e;a(e)}))}},15006:(e,a,t)=>{"use strict";function r(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}t.d(a,{z:()=>r})},46417:function(e){e.exports=function(){"use strict";function e(a){return e="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(a)}function a(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function t(e,a){for(var t=0;t(a=parseInt(a.getAttribute("tabindex")))?1:e1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=a},je=function(e){e.style.display="none"},xe=function(e,a,t,r){var i=e.querySelector(a);i&&(i.style[t]=r)},ze=function(e,a,t){a?$e(e,t):je(e)},Ce=function(e){return!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))},Ee=function(){return!Ce(G())&&!Ce(W())&&!Ce(X())},Se=function(e){return!!(e.scrollHeight>e.clientHeight)},_e=function(e){var a=window.getComputedStyle(e),t=parseFloat(a.getPropertyValue("animation-duration")||"0"),r=parseFloat(a.getPropertyValue("transition-duration")||"0");return t>0||r>0},qe=function(e,a){if("function"==typeof e.contains)return e.contains(a)},Te=function(e){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=te();Ce(t)&&(a&&(t.style.transition="none",t.style.width="100%"),setTimeout((function(){t.style.transition="width ".concat(e/1e3,"s linear"),t.style.width="0%"}),10))},Ie=function(){var e=te(),a=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var t=parseInt(window.getComputedStyle(e).width),r=parseInt(a/t*100);e.style.removeProperty("transition"),e.style.width="".concat(r,"%")},Ae=function(){return"undefined"==typeof window||"undefined"==typeof document},Be='\n \n').replace(/(^|\n)\s*/g,""),Re=function(){var e=L();return!!e&&(e.parentNode.removeChild(e),ke([document.documentElement,document.body],[R["no-backdrop"],R["toast-shown"],R["has-column"]]),!0)},Ne=function(e){hi.isVisible()&&ge!==e.target.value&&hi.resetValidationMessage(),ge=e.target.value},Le=function(){var e=M(),a=ve(e,R.input),t=ve(e,R.file),r=e.querySelector(".".concat(R.range," input")),i=e.querySelector(".".concat(R.range," output")),n=ve(e,R.select),s=e.querySelector(".".concat(R.checkbox," input")),o=ve(e,R.textarea);a.oninput=Ne,t.onchange=Ne,n.onchange=Ne,s.onchange=Ne,o.oninput=Ne,r.oninput=function(e){Ne(e),i.value=r.value},r.onchange=function(e){Ne(e),r.nextSibling.value=r.value}},De=function(e){return"string"==typeof e?document.querySelector(e):e},Pe=function(e){var a=U();a.setAttribute("role",e.toast?"alert":"dialog"),a.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||a.setAttribute("aria-modal","true")},Ue=function(e){"rtl"===window.getComputedStyle(e).direction&&ye(L(),R.rtl)},Oe=function(e){var a=Re();if(Ae())w("SweetAlert2 requires document to initialize");else{var t=document.createElement("div");t.className=R.container,a&&ye(t,R["no-transition"]),ue(t,Be);var r=De(e.target);r.appendChild(t),Pe(e),Ue(r),Le()}},Ve=function(a,t){a instanceof HTMLElement?t.appendChild(a):"object"===e(a)?Me(a,t):a&&ue(t,a)},Me=function(e,a){e.jquery?Fe(a,e):ue(a,e.toString())},Fe=function(e,a){if(e.textContent="",0 in a)for(var t=0;t in a;t++)e.appendChild(a[t].cloneNode(!0));else e.appendChild(a.cloneNode(!0))},Ke=function(){if(Ae())return!1;var e=document.createElement("div"),a={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var t in a)if(Object.prototype.hasOwnProperty.call(a,t)&&void 0!==e.style[t])return a[t];return!1}(),He=function(){var e=document.createElement("div");e.className=R["scrollbar-measure"],document.body.appendChild(e);var a=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),a},Qe=function(e,a){var t=J(),r=Z(),i=G(),n=W(),s=X();a.showConfirmButton||a.showDenyButton||a.showCancelButton||je(t),me(t,a,"actions"),We(i,"confirm",a),We(n,"deny",a),We(s,"cancel",a),Ge(i,n,s,a),a.reverseButtons&&(t.insertBefore(s,r),t.insertBefore(n,r),t.insertBefore(i,r)),ue(r,a.loaderHtml),me(r,a,"loader")};function Ge(e,a,t,r){if(!r.buttonsStyling)return ke([e,a,t],R.styled);ye([e,a,t],R.styled),r.confirmButtonColor&&(e.style.backgroundColor=r.confirmButtonColor),r.denyButtonColor&&(a.style.backgroundColor=r.denyButtonColor),r.cancelButtonColor&&(t.style.backgroundColor=r.cancelButtonColor)}function We(e,a,t){ze(e,t["show".concat(b(a),"Button")],"inline-block"),ue(e,t["".concat(a,"ButtonText")]),e.setAttribute("aria-label",t["".concat(a,"ButtonAriaLabel")]),e.className=R[a],me(e,t,"".concat(a,"Button")),ye(e,t["".concat(a,"ButtonClass")])}function Ye(e,a){"string"==typeof a?e.style.background=a:a||ye([document.documentElement,document.body],R["no-backdrop"])}function Ze(e,a){a in R?ye(e,R[a]):(v('The "position" parameter is not valid, defaulting to "center"'),ye(e,R.center))}function Xe(e,a){if(a&&"string"==typeof a){var t="grow-".concat(a);t in R&&ye(e,R[t])}}var Je=function(e,a){var t=L();if(t){Ye(t,a.backdrop),!a.backdrop&&a.allowOutsideClick&&v('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),Ze(t,a.position),Xe(t,a.grow),me(t,a,"container");var r=document.body.getAttribute("data-swal2-queue-step");r&&(t.setAttribute("data-queue-step",r),document.body.removeAttribute("data-swal2-queue-step"))}},ea={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},aa=["input","file","range","select","radio","checkbox","textarea"],ta=function(e,a){var t=M(),r=ea.innerParams.get(e),i=!r||a.input!==r.input;aa.forEach((function(e){var r=R[e],n=ve(t,r);na(e,a.inputAttributes),n.className=r,i&&je(n)})),a.input&&(i&&ra(a),sa(a))},ra=function(e){if(!ua[e.input])return w('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var a=ca(e.input),t=ua[e.input](a,e);$e(t),setTimeout((function(){fe(t)}))},ia=function(e){for(var a=0;ar?"".concat(a,"px"):null})).observe(e,{attributes:!0,attributeFilter:["style"]})}return e};var da=function(e,a){var t=F();me(t,a,"htmlContainer"),a.html?(Ve(a.html,t),$e(t,"block")):a.text?(t.textContent=a.text,$e(t,"block")):je(t),ta(e,a),me(M(),a,"content")},ha=function(e,a){var t=ae();ze(t,a.footer),a.footer&&Ve(a.footer,t),me(t,a,"footer")},ma=function(e,a){var t=re();ue(t,a.closeButtonHtml),me(t,a,"closeButton"),ze(t,a.showCloseButton),t.setAttribute("aria-label",a.closeButtonAriaLabel)},pa=function(e,a){var t=ea.innerParams.get(e),r=O();return t&&a.icon===t.icon?(ba(r,a),void ga(r,a)):a.icon||a.iconHtml?a.icon&&-1===Object.keys(N).indexOf(a.icon)?(w('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(a.icon,'"')),je(r)):($e(r),ba(r,a),ga(r,a),void ye(r,a.showClass.icon)):je(r)},ga=function(e,a){for(var t in N)a.icon!==t&&ke(e,N[t]);ye(e,N[a.icon]),ya(e,a),fa(),me(e,a,"icon")},fa=function(){for(var e=U(),a=window.getComputedStyle(e).getPropertyValue("background-color"),t=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),r=0;r\n \n \n \n '):"error"===a.icon?ue(e,'\n \n \n \n \n '):ue(e,ka({question:"?",warning:"!",info:"i"}[a.icon]))},ya=function(e,a){if(a.iconColor){e.style.color=a.iconColor,e.style.borderColor=a.iconColor;for(var t=0,r=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];t').concat(e,"")},va=function(e,a){var t=K();if(!a.imageUrl)return je(t);$e(t,""),t.setAttribute("src",a.imageUrl),t.setAttribute("alt",a.imageAlt),we(t,"width",a.imageWidth),we(t,"height",a.imageHeight),t.className=R.image,me(t,a,"image")},wa=[],$a=function(e){x("Swal.queue()","async/await");var a=this;wa=e;var t=function(e,a){wa=[],e(a)},r=[];return new Promise((function(e){!function i(n,s){n=a.progressSteps.length&&v("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),a.progressSteps.forEach((function(e,i){var n=Ca(e);if(t.appendChild(n),i===r&&ye(n,R["active-progress-step"]),i!==a.progressSteps.length-1){var s=Ea(a);t.appendChild(s)}}))},_a=function(e,a){var t=V();ze(t,a.title||a.titleText,"block"),a.title&&Ve(a.title,t),a.titleText&&(t.innerText=a.titleText),me(t,a,"title")},qa=function(e,a){var t=ee();me(t,a,"header"),Sa(e,a),pa(e,a),va(e,a),_a(e,a),ma(e,a)},Ta=function(e,a){var t=L(),r=U();a.toast?(we(t,"width",a.width),r.style.width="100%"):we(r,"width",a.width),we(r,"padding",a.padding),a.background&&(r.style.background=a.background),je(Q()),Ia(r,a)},Ia=function(e,a){e.className="".concat(R.popup," ").concat(Ce(e)?a.showClass.popup:""),a.toast?(ye([document.documentElement,document.body],R["toast-shown"]),ye(e,R.toast)):ye(e,R.modal),me(e,a,"popup"),"string"==typeof a.customClass&&ye(e,a.customClass),a.icon&&ye(e,R["icon-".concat(a.icon)])},Aa=function(e,a){Ta(e,a),Je(e,a),qa(e,a),da(e,a),Qe(e,a),ha(e,a),"function"==typeof a.didRender?a.didRender(U()):"function"==typeof a.onRender&&a.onRender(U())},Ba=function(){return Ce(U())},Ra=function(){return G()&&G().click()},Na=function(){return W()&&W().click()},La=function(){return X()&&X().click()};function Da(){for(var e=this,a=arguments.length,t=new Array(a),r=0;r0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,Za||(document.body.addEventListener("click",et),Za=!0)}var et=function(e){for(var a=e.target;a&&a!==document;a=a.parentNode)for(var t in Xa){var r=a.getAttribute(t);if(r)return void Xa[t].fire({template:r})}},at={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,willOpen:void 0,didOpen:void 0,onRender:void 0,didRender:void 0,onClose:void 0,onAfterClose:void 0,willClose:void 0,didClose:void 0,onDestroy:void 0,didDestroy:void 0,scrollbarPadding:!0},tt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],rt={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},it=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],nt=function(e){return Object.prototype.hasOwnProperty.call(at,e)},st=function(e){return-1!==tt.indexOf(e)},ot=function(e){return rt[e]},lt=function(e){nt(e)||v('Unknown parameter "'.concat(e,'"'))},ct=function(e){-1!==it.indexOf(e)&&v('The parameter "'.concat(e,'" is incompatible with toasts'))},ut=function(e){ot(e)&&x(e,ot(e))},dt=function(e){for(var a in e)lt(a),e.toast&&ct(a),ut(a)},ht=Object.freeze({isValidParameter:nt,isUpdatableParameter:st,isDeprecatedParameter:ot,argsToParams:I,isVisible:Ba,clickConfirm:Ra,clickDeny:Na,clickCancel:La,getContainer:L,getPopup:U,getTitle:V,getContent:M,getHtmlContainer:F,getImage:K,getIcon:O,getInputLabel:Y,getCloseButton:re,getActions:J,getConfirmButton:G,getDenyButton:W,getCancelButton:X,getLoader:Z,getHeader:ee,getFooter:ae,getTimerProgressBar:te,getFocusableElements:ne,getValidationMessage:Q,isLoading:le,fire:Da,mixin:Pa,queue:$a,getQueueStep:ja,insertQueueStep:xa,deleteQueueStep:za,showLoading:Ua,enableLoading:Ua,getTimerLeft:Ka,stopTimer:Ha,resumeTimer:Qa,toggleTimer:Ga,increaseTimer:Wa,isTimerRunning:Ya,bindClickHandler:Ja});function mt(){if(ea.innerParams.get(this)){var e=ea.domCache.get(this);je(e.loader);var a=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));a.length?$e(a[0],"inline-block"):Ee()&&je(e.actions),ke([e.popup,e.actions],R.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}}function pt(e){var a=ea.innerParams.get(e||this),t=ea.domCache.get(e||this);return t?pe(t.content,a.input):null}var gt=function(){null===ce.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(ce.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(ce.previousBodyPadding+He(),"px"))},ft=function(){null!==ce.previousBodyPadding&&(document.body.style.paddingRight="".concat(ce.previousBodyPadding,"px"),ce.previousBodyPadding=null)},bt=function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!de(document.body,R.iosfix)){var e=document.body.scrollTop;document.body.style.top="".concat(-1*e,"px"),ye(document.body,R.iosfix),kt(),yt()}},yt=function(){if(!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)){var e=44;U().scrollHeight>window.innerHeight-e&&(L().style.paddingBottom="".concat(e,"px"))}},kt=function(){var e,a=L();a.ontouchstart=function(a){e=vt(a)},a.ontouchmove=function(a){e&&(a.preventDefault(),a.stopPropagation())}},vt=function(e){var a=e.target,t=L();return!(wt(e)||$t(e)||a!==t&&(Se(t)||"INPUT"===a.tagName||Se(M())&&M().contains(a)))},wt=function(e){return e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType},$t=function(e){return e.touches&&e.touches.length>1},jt=function(){if(de(document.body,R.iosfix)){var e=parseInt(document.body.style.top,10);ke(document.body,R.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},xt=function(){return!!window.MSInputMethodContext&&!!document.documentMode},zt=function(){var e=L(),a=U();e.style.removeProperty("align-items"),a.offsetTop<0&&(e.style.alignItems="flex-start")},Ct=function(){"undefined"!=typeof window&&xt()&&(zt(),window.addEventListener("resize",zt))},Et=function(){"undefined"!=typeof window&&xt()&&window.removeEventListener("resize",zt)},St=function(){k(document.body.children).forEach((function(e){e===L()||qe(e,L())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))},_t=function(){k(document.body.children).forEach((function(e){e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},qt={swalPromiseResolve:new WeakMap};function Tt(e,a,t,r){oe()?Dt(e,r):(Fa(t).then((function(){return Dt(e,r)})),Va.keydownTarget.removeEventListener("keydown",Va.keydownHandler,{capture:Va.keydownListenerCapture}),Va.keydownHandlerAdded=!1),a.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&a.parentNode.removeChild(a),se()&&(ft(),jt(),Et(),_t()),It()}function It(){ke([document.documentElement,document.body],[R.shown,R["height-auto"],R["no-backdrop"],R["toast-shown"]])}function At(e){var a=U();if(a){e=Bt(e);var t=ea.innerParams.get(this);if(t&&!de(a,t.hideClass.popup)){var r=qt.swalPromiseResolve.get(this);ke(a,t.showClass.popup),ye(a,t.hideClass.popup);var i=L();ke(i,t.showClass.backdrop),ye(i,t.hideClass.backdrop),Rt(this,a,t),r(e)}}}var Bt=function(e){return void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:i({isConfirmed:!1,isDenied:!1,isDismissed:!1},e)},Rt=function(e,a,t){var r=L(),i=Ke&&_e(a),n=t.onClose,s=t.onAfterClose,o=t.willClose,l=t.didClose;Nt(a,o,n),i?Lt(e,a,r,t.returnFocus,l||s):Tt(e,r,t.returnFocus,l||s)},Nt=function(e,a,t){null!==a&&"function"==typeof a?a(e):null!==t&&"function"==typeof t&&t(e)},Lt=function(e,a,t,r,i){Va.swalCloseEventFinishedCallback=Tt.bind(null,e,t,r,i),a.addEventListener(Ke,(function(e){e.target===a&&(Va.swalCloseEventFinishedCallback(),delete Va.swalCloseEventFinishedCallback)}))},Dt=function(e,a){setTimeout((function(){"function"==typeof a&&a(),e._destroy()}))};function Pt(e,a,t){var r=ea.domCache.get(e);a.forEach((function(e){r[e].disabled=t}))}function Ut(e,a){if(!e)return!1;if("radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),r=0;r")),Oe(e)}var Jt=["swal-title","swal-html","swal-footer"],er=function(e){var a="string"==typeof e.template?document.querySelector(e.template):e.template;if(!a)return{};var t=a.content||a;return or(t),i(ar(t),tr(t),rr(t),ir(t),nr(t),sr(t,Jt))},ar=function(a){var t={};return k(a.querySelectorAll("swal-param")).forEach((function(a){lr(a,["name","value"]);var r=a.getAttribute("name"),i=a.getAttribute("value");"boolean"==typeof at[r]&&"false"===i&&(i=!1),"object"===e(at[r])&&(i=JSON.parse(i)),t[r]=i})),t},tr=function(e){var a={};return k(e.querySelectorAll("swal-button")).forEach((function(e){lr(e,["type","color","aria-label"]);var t=e.getAttribute("type");a["".concat(t,"ButtonText")]=e.innerHTML,a["show".concat(b(t),"Button")]=!0,e.hasAttribute("color")&&(a["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(a["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))})),a},rr=function(e){var a={},t=e.querySelector("swal-image");return t&&(lr(t,["src","width","height","alt"]),t.hasAttribute("src")&&(a.imageUrl=t.getAttribute("src")),t.hasAttribute("width")&&(a.imageWidth=t.getAttribute("width")),t.hasAttribute("height")&&(a.imageHeight=t.getAttribute("height")),t.hasAttribute("alt")&&(a.imageAlt=t.getAttribute("alt"))),a},ir=function(e){var a={},t=e.querySelector("swal-icon");return t&&(lr(t,["type","color"]),t.hasAttribute("type")&&(a.icon=t.getAttribute("type")),t.hasAttribute("color")&&(a.iconColor=t.getAttribute("color")),a.iconHtml=t.innerHTML),a},nr=function(e){var a={},t=e.querySelector("swal-input");t&&(lr(t,["type","label","placeholder","value"]),a.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(a.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(a.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(a.inputValue=t.getAttribute("value")));var r=e.querySelectorAll("swal-input-option");return r.length&&(a.inputOptions={},k(r).forEach((function(e){lr(e,["value"]);var t=e.getAttribute("value"),r=e.innerHTML;a.inputOptions[t]=r}))),a},sr=function(e,a){var t={};for(var r in a){var i=a[r],n=e.querySelector(i);n&&(lr(n,[]),t[i.replace(/^swal-/,"")]=n.innerHTML.trim())}return t},or=function(e){var a=Jt.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);k(e.querySelectorAll("*")).forEach((function(t){if(t.parentNode===e){var r=t.tagName.toLowerCase();-1===a.indexOf(r)&&v("Unrecognized element <".concat(r,">"))}}))},lr=function(e,a){k(e.attributes).forEach((function(t){-1===a.indexOf(t.name)&&v(['Unrecognized attribute "'.concat(t.name,'" on <').concat(e.tagName.toLowerCase(),">."),"".concat(a.length?"Allowed attributes are: ".concat(a.join(", ")):"To set the value, use HTML within the element.")])}))},cr=10,ur=function(e){var a=L(),t=U();"function"==typeof e.willOpen?e.willOpen(t):"function"==typeof e.onBeforeOpen&&e.onBeforeOpen(t);var r=window.getComputedStyle(document.body).overflowY;gr(a,t,e),setTimeout((function(){mr(a,t)}),cr),se()&&(pr(a,e.scrollbarPadding,r),St()),oe()||Va.previousActiveElement||(Va.previousActiveElement=document.activeElement),dr(t,e),ke(a,R["no-transition"])},dr=function(e,a){"function"==typeof a.didOpen?setTimeout((function(){return a.didOpen(e)})):"function"==typeof a.onOpen&&setTimeout((function(){return a.onOpen(e)}))},hr=function e(a){var t=U();if(a.target===t){var r=L();t.removeEventListener(Ke,e),r.style.overflowY="auto"}},mr=function(e,a){Ke&&_e(a)?(e.style.overflowY="hidden",a.addEventListener(Ke,hr)):e.style.overflowY="auto"},pr=function(e,a,t){bt(),Ct(),a&&"hidden"!==t&>(),setTimeout((function(){e.scrollTop=0}))},gr=function(e,a,t){ye(e,t.showClass.backdrop),a.style.setProperty("opacity","0","important"),$e(a),setTimeout((function(){ye(a,t.showClass.popup),a.style.removeProperty("opacity")}),cr),ye([document.documentElement,document.body],R.shown),t.heightAuto&&t.backdrop&&!t.toast&&ye([document.documentElement,document.body],R["height-auto"])},fr=function(e,a){"select"===a.input||"radio"===a.input?wr(e,a):-1!==["text","email","number","tel","textarea"].indexOf(a.input)&&(C(a.inputValue)||S(a.inputValue))&&$r(e,a)},br=function(e,a){var t=e.getInput();if(!t)return null;switch(a.input){case"checkbox":return yr(t);case"radio":return kr(t);case"file":return vr(t);default:return a.inputAutoTrim?t.value.trim():t.value}},yr=function(e){return e.checked?1:0},kr=function(e){return e.checked?e.value:null},vr=function(e){return e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null},wr=function(a,t){var r=M(),i=function(e){return jr[t.input](r,xr(e),t)};C(t.inputOptions)||S(t.inputOptions)?(Ua(G()),E(t.inputOptions).then((function(e){a.hideLoading(),i(e)}))):"object"===e(t.inputOptions)?i(t.inputOptions):w("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(e(t.inputOptions)))},$r=function(e,a){var t=e.getInput();je(t),E(a.inputValue).then((function(r){t.value="number"===a.input?parseFloat(r)||0:"".concat(r),$e(t),t.focus(),e.hideLoading()})).catch((function(a){w("Error in inputValue promise: ".concat(a)),t.value="",$e(t),t.focus(),e.hideLoading()}))},jr={select:function(e,a,t){var r=ve(e,R.select),i=function(e,a,r){var i=document.createElement("option");i.value=r,ue(i,a),i.selected=zr(r,t.inputValue),e.appendChild(i)};a.forEach((function(e){var a=e[0],t=e[1];if(Array.isArray(t)){var n=document.createElement("optgroup");n.label=a,n.disabled=!1,r.appendChild(n),t.forEach((function(e){return i(n,e[1],e[0])}))}else i(r,t,a)})),r.focus()},radio:function(e,a,t){var r=ve(e,R.radio);a.forEach((function(e){var a=e[0],i=e[1],n=document.createElement("input"),s=document.createElement("label");n.type="radio",n.name=R.radio,n.value=a,zr(a,t.inputValue)&&(n.checked=!0);var o=document.createElement("span");ue(o,i),o.className=R.label,s.appendChild(n),s.appendChild(o),r.appendChild(s)}));var i=r.querySelectorAll("input");i.length&&i[0].focus()}},xr=function a(t){var r=[];return"undefined"!=typeof Map&&t instanceof Map?t.forEach((function(t,i){var n=t;"object"===e(n)&&(n=a(n)),r.push([i,n])})):Object.keys(t).forEach((function(i){var n=t[i];"object"===e(n)&&(n=a(n)),r.push([i,n])})),r},zr=function(e,a){return a&&a.toString()===e.toString()},Cr=function(e,a){e.disableButtons(),a.input?_r(e,a,"confirm"):Ar(e,a,!0)},Er=function(e,a){e.disableButtons(),a.returnInputValueOnDeny?_r(e,a,"deny"):Tr(e,a,!1)},Sr=function(e,a){e.disableButtons(),a(_.cancel)},_r=function(e,a,t){var r=br(e,a);a.inputValidator?qr(e,a,r):e.getInput().checkValidity()?"deny"===t?Tr(e,a,r):Ar(e,a,r):(e.enableButtons(),e.showValidationMessage(a.validationMessage))},qr=function(e,a,t){e.disableInput(),Promise.resolve().then((function(){return E(a.inputValidator(t,a.validationMessage))})).then((function(r){e.enableButtons(),e.enableInput(),r?e.showValidationMessage(r):Ar(e,a,t)}))},Tr=function(e,a,t){a.showLoaderOnDeny&&Ua(W()),a.preDeny?Promise.resolve().then((function(){return E(a.preDeny(t,a.validationMessage))})).then((function(a){!1===a?e.hideLoading():e.closePopup({isDenied:!0,value:void 0===a?t:a})})):e.closePopup({isDenied:!0,value:t})},Ir=function(e,a){e.closePopup({isConfirmed:!0,value:a})},Ar=function(e,a,t){a.showLoaderOnConfirm&&Ua(),a.preConfirm?(e.resetValidationMessage(),Promise.resolve().then((function(){return E(a.preConfirm(t,a.validationMessage))})).then((function(a){Ce(Q())||!1===a?e.hideLoading():Ir(e,void 0===a?t:a)}))):Ir(e,t)},Br=function(e,a,t,r){a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),t.toast||(a.keydownHandler=function(a){return Pr(e,a,r)},a.keydownTarget=t.keydownListenerCapture?window:U(),a.keydownListenerCapture=t.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0)},Rr=function(e,a,t){var r=ne();if(r.length)return(a+=t)===r.length?a=0:-1===a&&(a=r.length-1),r[a].focus();U().focus()},Nr=["ArrowRight","ArrowDown","Right","Down"],Lr=["ArrowLeft","ArrowUp","Left","Up"],Dr=["Escape","Esc"],Pr=function(e,a,t){var r=ea.innerParams.get(e);r&&(r.stopKeydownPropagation&&a.stopPropagation(),"Enter"===a.key?Ur(e,a,r):"Tab"===a.key?Or(a,r):-1!==[].concat(Nr,Lr).indexOf(a.key)?Vr(a.key):-1!==Dr.indexOf(a.key)&&Mr(a,r,t))},Ur=function(e,a,t){if(!a.isComposing&&a.target&&e.getInput()&&a.target.outerHTML===e.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(t.input))return;Ra(),a.preventDefault()}},Or=function(e,a){for(var t=e.target,r=ne(),i=-1,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};dt(i({},a,e)),Va.currentInstance&&Va.currentInstance._destroy(),Va.currentInstance=this;var t=Zr(e,a);Xt(t),Object.freeze(t),Va.timeout&&(Va.timeout.stop(),delete Va.timeout),clearTimeout(Va.restoreFocusTimeout);var r=Jr(this);return Aa(this,t),ea.innerParams.set(this,t),Xr(this,r,t)}var Zr=function(e,a){var t=er(e),r=i({},at,a,t,e);return r.showClass=i({},at.showClass,r.showClass),r.hideClass=i({},at.hideClass,r.hideClass),!1===e.animation&&(r.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},r.hideClass={}),r},Xr=function(e,a,t){return new Promise((function(r){var i=function(a){e.closePopup({isDismissed:!0,dismiss:a})};qt.swalPromiseResolve.set(e,r),a.confirmButton.onclick=function(){return Cr(e,t)},a.denyButton.onclick=function(){return Er(e,t)},a.cancelButton.onclick=function(){return Sr(e,i)},a.closeButton.onclick=function(){return i(_.close)},Fr(e,a,i),Br(e,Va,t,i),fr(e,t),ur(t),ei(Va,t,i),ai(a,t),setTimeout((function(){a.container.scrollTop=0}))}))},Jr=function(e){var a={popup:U(),container:L(),content:M(),actions:J(),confirmButton:G(),denyButton:W(),cancelButton:X(),loader:Z(),closeButton:re(),validationMessage:Q(),progressSteps:H()};return ea.domCache.set(e,a),a},ei=function(e,a,t){var r=te();je(r),a.timer&&(e.timeout=new Gt((function(){t("timer"),delete e.timeout}),a.timer),a.timerProgressBar&&($e(r),setTimeout((function(){e.timeout&&e.timeout.running&&Te(a.timer)}))))},ai=function(e,a){if(!a.toast)return z(a.allowEnterKey)?void(ti(e,a)||Rr(a,-1,1)):ri()},ti=function(e,a){return a.focusDeny&&Ce(e.denyButton)?(e.denyButton.focus(),!0):a.focusCancel&&Ce(e.cancelButton)?(e.cancelButton.focus(),!0):!(!a.focusConfirm||!Ce(e.confirmButton)||(e.confirmButton.focus(),0))},ri=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};function ii(e){var a=U(),t=ea.innerParams.get(this);if(!a||de(a,t.hideClass.popup))return v("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var r={};Object.keys(e).forEach((function(a){hi.isUpdatableParameter(a)?r[a]=e[a]:v('Invalid parameter to update: "'.concat(a,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}));var n=i({},t,r);Aa(this,n),ea.innerParams.set(this,n),Object.defineProperties(this,{params:{value:i({},this.params,e),writable:!1,enumerable:!0}})}function ni(){var e=ea.domCache.get(this),a=ea.innerParams.get(this);a&&(e.popup&&Va.swalCloseEventFinishedCallback&&(Va.swalCloseEventFinishedCallback(),delete Va.swalCloseEventFinishedCallback),Va.deferDisposalTimer&&(clearTimeout(Va.deferDisposalTimer),delete Va.deferDisposalTimer),oi(a),li(this))}var si,oi=function(e){"function"==typeof e.didDestroy?e.didDestroy():"function"==typeof e.onDestroy&&e.onDestroy()},li=function(e){delete e.params,delete Va.keydownHandler,delete Va.keydownTarget,ci(ea),ci(qt)},ci=function(e){for(var a in e)e[a]=new WeakMap},ui=Object.freeze({hideLoading:mt,disableLoading:mt,getInput:pt,close:At,closePopup:At,closeModal:At,closeToast:At,enableButtons:Ot,disableButtons:Vt,enableInput:Mt,disableInput:Ft,showValidationMessage:Kt,resetValidationMessage:Ht,getProgressSteps:Qt,_main:Yr,update:ii,_destroy:ni}),di=function(){function e(){if(a(this,e),"undefined"!=typeof window){"undefined"==typeof Promise&&w("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),si=this;for(var t=arguments.length,r=new Array(t),i=0;i{"use strict";var r=t(82390).fromJson(t(27726)),i=t(44302),n=t(2915),s=t(58323),o=t(62964),l=t(7045),c=t(5738),u=t(68062);e.exports=function e(a){var t=a.rules||r||{},d=a.validHosts||[],h=a.extractHostname||i;function m(e,a){var r=a||5,i={hostname:h(e),isValid:null,isIp:null,tldExists:!1,publicSuffix:null,domain:null,subdomain:null};return null===i.hostname?(i.isIp=!1,i.isValid=!1,i):(i.isIp=c(i.hostname),i.isIp?(i.isValid=!0,i):(i.isValid=l(i.hostname),!1===i.isValid?i:(5!==r&&1!==r||(i.tldExists=u(t,i.hostname)),1===r?i:(i.publicSuffix=s(t,i.hostname),2===r?i:(i.domain=n(d,i.publicSuffix,i.hostname),3===r||(i.subdomain=o(i.hostname,i.domain)),i)))))}return{extractHostname:h,isValid:l,parse:m,tldExists:function(e){return m(e,1).tldExists},getPublicSuffix:function(e){return m(e,2).publicSuffix},getDomain:function(e){return m(e,3).domain},getSubdomain:function(e){return m(e,4).subdomain},fromUserSettings:e}}({})},44302:(e,a,t)=>{var r=t(50209),i=t(7045),n=/^(([a-z][a-z0-9+.-]*)?:)?\/\//;function s(e){return"."===e[e.length-1]?e.substr(0,e.length-1):e}e.exports=function(e){if(i(e))return s(e);var a=e;"string"!=typeof a&&(a=""+a);var t=function(e){return e.length>0&&(e.charCodeAt(0)<=32||e.charCodeAt(e.length-1)<=32)}(a);t&&(a=a.trim());var o=function(e){for(var a=0;a=65&&t<=90)return!0}return!1}(a);if(o&&(a=a.toLowerCase()),(o||t)&&i(a))return s(a);n.test(a)||(a="//"+a);var l=r.parse(a,null,!0);return l.hostname?s(l.hostname):null}},2915:e=>{"use strict";function a(e,a){return r=a,(t=e).lastIndexOf(r)===t.length-r.length&&(e.length===a.length||"."===e[e.length-a.length-1]);var t,r}e.exports=function(e,t,r){for(var i=0;i{"use strict";e.exports=function(e){var a=e.lastIndexOf(".");return-1===a?null:e.substr(a+1)}},5738:e=>{"use strict";e.exports=function(e){return"string"==typeof e&&(0!==e.length&&(function(e){for(var a=!1,t=0;t=48&&r<=57||r>=97&&r<=102))return!1}return a}(e)||function(e){for(var a=0,t=0;t57)return!1}return 3===a&&"."!==e[0]&&"."!==e[e.length-1]}(e)))}},7045:e=>{"use strict";function a(e){return e>=48&&e<=57}function t(e){return e>=97&&e<=122}e.exports=function(e){if("string"!=typeof e)return!1;if(e.length>255)return!1;if(0===e.length)return!1;var r=e.charCodeAt(0);if(!t(r)&&!a(r))return!1;for(var i,n,s=-1,o=e.length,l=0;l64||46===i||45===i)return!1;s=l}else if(!t(n)&&!a(n)&&45!==n)return!1;i=n}return o-s-1<=63&&45!==i}},58323:(e,a,t)=>{"use strict";var r=t(77324);e.exports=function(e,a){if(e.hasTld(a))return a;var t=e.suffixLookup(a);return null===t?r(a):t}},62964:e=>{"use strict";e.exports=function(e,a){return null===a?null:e.substr(0,e.length-a.length-1)}},82390:e=>{"use strict";function a(e,a){return null===e?a:null===a||e{"use strict";var r=t(77324);e.exports=function(e,a){if(e.hasTld(a))return!0;var t=r(a);return null!==t&&e.hasTld(t)}},62367:(e,a,t)=>{"use strict";t.d(a,{CR:()=>l,FC:()=>d,Jh:()=>s,KL:()=>h,XA:()=>o,ZT:()=>i,ev:()=>c,mG:()=>n,qq:()=>u});var r=function(e,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t])},r(e,a)};function i(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}function n(e,a,t,r){return new(t||(t=Promise))((function(i,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function o(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var a;e.done?i(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(s,o)}l((r=r.apply(e,a||[])).next())}))}function s(e,a){var t,r,i,n,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,r=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,a){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,i,n=t.call(e),s=[];try{for(;(void 0===a||a-- >0)&&!(r=n.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return s}function c(e,a,t){if(t||2===arguments.length)for(var r,i=0,n=a.length;i1||o(e,a)}))})}function o(e,a){try{(t=i[e](a)).value instanceof u?Promise.resolve(t.value.v).then(l,c):d(n[0][2],t)}catch(e){d(n[0][3],e)}var t}function l(e){o("next",e)}function c(e){o("throw",e)}function d(e,a){e(a),n.shift(),n.length&&o(n[0][0],n[0][1])}}function h(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,t=e[Symbol.asyncIterator];return t?t.call(e):(e=o(e),a={},r("next"),r("throw"),r("return"),a[Symbol.asyncIterator]=function(){return this},a);function r(t){a[t]=e[t]&&function(a){return new Promise((function(r,i){(function(e,a,t,r){Promise.resolve(r).then((function(a){e({value:a,done:t})}),a)})(r,i,(a=e[t](a)).done,a.value)}))}}}Object.create},50209:(e,a,t)=>{"use strict";var r=t(4071),i=t(38113);function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}a.parse=k,a.resolve=function(e,a){return k(e,!1,!0).resolve(a)},a.resolveObject=function(e,a){return e?k(e,!1,!0).resolveObject(a):a},a.format=function(e){i.isString(e)&&(e=k(e));return e instanceof n?e.format():n.prototype.format.call(e)},a.Url=n;var s=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],m=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=t(30068);function k(e,a,t){if(e&&i.isObject(e)&&e instanceof n)return e;var r=new n;return r.parse(e,a,t),r}n.prototype.parse=function(e,a,t){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),o=-1!==n&&n