{div:g,mod:i.mod}):0!==(this.negative&b.negative)?(i=this.neg().divmod(b.neg(),c),"div"!==c&&(h=i.mod.neg(),e&&0!==h.negative&&h.isub(b)),{div:i.div,mod:h}):b.length>this.length||this.cmp(b)<0?{div:newf(0),mod:this}:1===b.length?"div"===c?{div:this.divn(b.words[0]),mod:null}:"mod"===c?{div:null,mod:newf(this.modn(b.words[0]))}:{div:this.divn(b.words[0]),mod:newf(this.modn(b.words[0]))}:this._wordDiv(b,c)},f.prototype.div=function(b){returnthis.divmod(b,"div",!1).div},f.prototype.mod=function(b){returnthis.divmod(b,"mod",!1).mod},f.prototype.umod=function(b){returnthis.divmod(b,"mod",!0).mod},f.prototype.divRound=function(b){varc=this.divmod(b);if(c.mod.isZero())returnc.div;vard=0!==c.div.negative?c.mod.isub(b):c.mod,e=b.ushrn(1),f=b.andln(1),g=d.cmp(e);returng<0||1===f&&0===g?c.div:0!==c.div.negative?c.div.isubn(1):c.div.iaddn(1)},f.prototype.modn=function(b){d(b<=67108863);for(varc=(1<<26)%b,e=0,f=this.length-1;f>=0;f--)e=(c*e+(0|this.words[f]))%b;returne},f.prototype.idivn=function(b){d(b<=67108863);for(varc=0,e=this.length-1;e>=0;e--){varf=(0|this.words[e])+67108864*c;this.words[e]=f/b|0,c=f%b}returnthis.strip()},f.prototype.divn=function(b){returnthis.clone().idivn(b)},f.prototype.egcd=function(b){d(0===b.negative),d(!b.isZero());varc=this,e=b.clone();c=0!==c.negative?c.umod(b):c.clone();for(varg=newf(1),h=newf(0),i=newf(0),j=newf(1),k=0;c.isEven()&&e.isEven();)c.iushrn(1),e.iushrn(1),++k;for(varl=e.clone(),m=c.clone();!c.isZero();){for(varn=0,o=1;0===(c.words[0]&o)&&n<26;++n,o<<=1);if(n>0)for(c.iushrn(n);n-->0;)(g.isOdd()||h.isOdd())&&(g.iadd(l),h.isub(m)),g.iushrn(1),h.iushrn(1);for(varp=0,q=1;0===(e.words[0]&q)&&p<26;++p,q<<=1);if(p>0)for(e.iushrn(p);p-->0;)(i.isOdd()||j.isOdd())&&(i.iadd(l),j.isub(m)),i.iushrn(1),j.iushrn(1);c.cmp(e)>=0?(c.isub(e),g.isub(i),h.isub(j)):(e.isub(c),i.isub(g),j.isub(h))}return{a:i,b:j,gcd:e.iushln(k)}},f.prototype._invmp=function(b){d(0===b.negative),d(!b.isZero());varc=this,e=b.clone();c=0!==c.negative?c.umod(b):c.clone();for(varg=newf(1),h=newf(0),i=e.clone();c.cmpn(1)>0&&e.cmpn(1)>0;){for(varj=0,k=1;0===(c.words[0]&k)&&j<26;++j,k<<=1);if(j>0)for(c.iushrn(j);j-->0;)g.isOdd()&&g.iadd(i),g.iushrn(1);for(varl=0,m=1;0===(e.words[0]&m)&&l<26;++l,m<<=1);if(l>0)for(e.iushrn(l);l-->0;)h.isOdd()&&h.iadd(i),h.iushrn(1);c.cmp(e)>=0?(c.isub(e),g.isub(h)):(e.isub(c),h.isub(g))}varn;returnn=0===c.cmpn(1)?g:h,n.cmpn(0)<0&&n.iadd(b),n},f.prototype.gcd=function(b){if(this.isZero())returnb.abs();if(b.isZero())returnthis.abs();varc=this.clone(),d=b.clone();c.negative=0,d.negative=0;for(vare=0;c.isEven()&&d.isEven();e++)c.iushrn(1),d.iushrn(1);for(;;){for(;c.isEven();)c.iushrn(1);for(;d.isEven();)d.iushrn(1);varf=c.cmp(d);if(f<0){varg=c;c=d,d=g}elseif(0===f||0===d.cmpn(1))break;c.isub(d)}returnd.iushln(e)},f.prototype.invm=function(b){returnthis.egcd(b).a.umod(b)},f.prototype.isEven=function(){return0===(1&this.words[0])},f.prototype.isOdd=function(){return1===(1&this.words[0])},f.prototype.andln=function(b){returnthis.words[0]&b},f.prototype.bincn=function(b){d("number"==typeofb);varc=b%26,e=(b-c)/26,f=1<<c;if(this.length<=e)returnthis._expand(e+1),this.words[e]|=f,this;for(varg=f,h=e;0!==g&&h<this.length;h++){vari=0|this.words[h];i+=g,g=i>>>26,i&=67108863,this.words[h]=i}return0!==g&&(this.words[h]=g,this.length++),this},f.prototype.isZero=function(){return1===this.length&&0===this.words[0]},f.prototype.cmpn=function(b){varc=b<0;if(0!==this.negative&&!c)return-1;if(0===this.negative&&c)return1;this.strip();vare;if(this.length>1)e=1;else{c&&(b=-b),d(b<=67108863,"Number is too big");varf=0|this.words[0];e=f===b?0:f<b?-1:1}return0!==this.negative?0|-e:e},f.prototype.cmp=function(b){if(0!==this.negative&&0===b.negative)return-1;if(0===this.negative&&0!==b.negative)return1;varc=this.ucmp(b);return0!==this.negative?0|-c:c},f.prototype.ucmp=function(b){if(this.length>b.length)return1;if(this.length<b.length)return-1;for(varc=0,d=this.length-1;d>=0;d--){vare=0|this.words[d],f=0|b.words[d];if(e!==f){e<f?c=-1:e>f&&(c=1);break}}returnc},f.pro
for(vard=this.W,e=0;e<16;e++)d[e]=b[c+e];for(;e<d.length;e++)d[e]=h(d[e-3]^d[e-8]^d[e-14]^d[e-16],1);for(varf=this.h[0],g=this.h[1],j=this.h[2],l=this.h[3],m=this.h[4],e=0;e<d.length;e++){varn=~~(e/20),o=k(h(f,5),M(n,g,j,l),m,d[e],z[n]);m=l,l=j,j=h(g,30),g=f,f=o}this.h[0]=i(this.h[0],f),this.h[1]=i(this.h[1],g),this.h[2]=i(this.h[2],j),this.h[3]=i(this.h[3],l),this.h[4]=i(this.h[4],m)},E.prototype._digest=function(b){return"hex"===b?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},{"../hash":19}],24:[function(a,b,c){functionf(a,b){if(Array.isArray(a))returna.slice();if(!a)return[];varc=[];if("string"==typeofa)if(b){if("hex"===b){a=a.replace(/[^a-z0-9]+/gi,""),a.length%2!==0&&(a="0"+a);for(vard=0;d<a.length;d+=2)c.push(parseInt(a[d]+a[d+1],16))}}elsefor(vard=0;d<a.length;d++){vare=a.charCodeAt(d),f=e>>8,g=255&e;f?c.push(f,g):c.push(g)}elsefor(vard=0;d<a.length;d++)c[d]=0|a[d];returnc}functiong(a){for(varb="",c=0;c<a.length;c++)b+=j(a[c].toString(16));returnb}functionh(a){varb=a>>>24|a>>>8&65280|a<<8&16711680|(255&a)<<24;returnb>>>0}functioni(a,b){for(varc="",d=0;d<a.length;d++){vare=a[d];"little"===b&&(e=h(e)),c+=k(e.toString(16))}returnc}functionj(a){return1===a.length?"0"+a:a}functionk(a){return7===a.length?"0"+a:6===a.length?"00"+a:5===a.length?"000"+a:4===a.length?"0000"+a:3===a.length?"00000"+a:2===a.length?"000000"+a:1===a.length?"0000000"+a:a}functionl(a,b,c,d){vare=c-b;t(e%4===0);for(varf=newArray(e/4),g=0,h=b;g<f.length;g++,h+=4){vari;i="big"===d?a[h]<<24|a[h+1]<<16|a[h+2]<<8|a[h+3]:a[h+3]<<24|a[h+2]<<16|a[h+1]<<8|a[h],f[g]=i>>>0}returnf}functionm(a,b){for(varc=newArray(4*a.length),d=0,e=0;d<a.length;d++,e+=4){varf=a[d];"big"===b?(c[e]=f>>>24,c[e+1]=f>>>16&255,c[e+2]=f>>>8&255,c[e+3]=255&f):(c[e+3]=f>>>24,c[e+2]=f>>>16&255,c[e+1]=f>>>8&255,c[e]=255&f)}returnc}functionn(a,b){returna>>>b|a<<32-b}functiono(a,b){returna<<b|a>>>32-b}functionp(a,b){returna+b>>>0}functionq(a,b,c){returna+b+c>>>0}functionr(a,b,c,d){returna+b+c+d>>>0}functions(a,b,c,d,e){returna+b+c+d+e>>>0}functiont(a,b){if(!a)thrownewError(b||"Assertion failed")}functionu(a,b,c,d){vare=a[b],f=a[b+1],g=d+f>>>0,h=(g<d?1:0)+c+e;a[b]=h>>>0,a[b+1]=g}functionv(a,b,c,d){vare=b+d>>>0,f=(e<b?1:0)+a+c;returnf>>>0}functionw(a,b,c,d){vare=b+d;returne>>>0}functionx(a,b,c,d,e,f,g,h){vari=0,j=b;j=j+d>>>0,i+=j<b?1:0,j=j+f>>>0,i+=j<f?1:0,j=j+h>>>0,i+=j<h?1:0;vark=a+c+e+g+i;returnk>>>0}functiony(a,b,c,d,e,f,g,h){vari=b+d+f+h;returni>>>0}functionz(a,b,c,d,e,f,g,h,i,j){vark=0,l=b;l=l+d>>>0,k+=l<b?1:0,l=l+f>>>0,k+=l<f?1:0,l=l+h>>>0,k+=l<h?1:0,l=l+j>>>0,k+=l<j?1:0;varm=a+c+e+g+i+k;returnm>>>0}functionA(a,b,c,d,e,f,g,h,i,j){vark=b+d+f+h+j;returnk>>>0}functionB(a,b,c){vard=b<<32-c|a>>>c;returnd>>>0}functionC(a,b,c){vard=a<<32-c|b>>>c;returnd>>>0}functionD(a,b,c){returna>>>c}functionE(a,b,c){vard=a<<32-c|b>>>c;returnd>>>0}vard=c,e=a("inherits");d.toArray=f,d.toHex=g,d.htonl=h,d.toHex32=i,d.zero2=j,d.zero8=k,d.join32=l,d.split32=m,d.rotr32=n,d.rotl32=o,d.sum32=p,d.sum32_3=q,d.sum32_4=r,d.sum32_5=s,d.assert=t,d.inherits=e,c.sum64=u,c.sum64_hi=v,c.sum64_lo=w,c.sum64_4_hi=x,c.sum64_4_lo=y,c.sum64_5_hi=z,c.sum64_5_lo=A,c.rotr64_hi=B,c.rotr64_lo=C,c.shr64_hi=D,c.shr64_lo=E},{inherits:25}],25:[function(a,b,c){"function"==typeofObject.create?b.exports=function(b,c){b.super_=c,b.prototype=Object.create(c.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}})}:b.exports=function(b,c){b.super_=c;vard=function(){};d.prototype=c.prototype,b.prototype=newd,b.prototype.constructor=b}},{}],26:[function(a,b,c){b.exports={name:"elliptic",version:"6.3.2",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@
varliner=function(e){functionr(n){if(t[n])returnt[n].exports;vara=t[n]={i:n,l:!1,exports:{}};returne[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}vart={};returnr.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnr.d(t,"a",t),t},r.o=function(e,r){returnObject.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=17)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),function(e){functionn(e){for(varr,t=e,n=/[^%](%\d+)/g,a=[];r=n.exec(t);)a.push({arg:r[1],index:r.index});for(varo=a.length-1;o>=0;o--){vari=a[o],s=i.arg.substring(1),c=i.index+1;t=t.substring(0,c)+arguments[+s]+t.substring(c+1+s.length)}returnt=t.replace("%%","%")}functiona(e){varr;r="string"==typeofe?{name:e}:e,p.checkAlgorithm(r);vart=e;returnt.hash&&(t.hash=a(t.hash)),r}functiono(e,r){if(!e)thrownews("Parameter '"+r+"' is required and cant be empty");if("undefined"!=typeofBuffer&&Buffer.isBuffer(e))returnnewUint8Array(e);if(ArrayBuffer.isView(e)){vart=e.map(function(e){returne});returnnewUint8Array(t.buffer)}if(einstanceofArrayBuffer)returnnewUint8Array(e);thrownews("Incoming parameter '"+r+"' has wrong data type. Must be ArrayBufferView or ArrayBuffer")}t.d(r,"WebCryptoError",function(){returns}),t.d(r,"AlgorithmError",function(){returnc}),t.d(r,"CryptoKeyError",function(){returnu}),t.d(r,"PrepareAlgorithm",function(){returna}),t.d(r,"PrepareData",function(){returno}),t.d(r,"BaseCrypto",function(){returnp}),t.d(r,"AlgorithmNames",function(){returnh}),t.d(r,"Base64Url",function(){returny}),t.d(r,"SubtleCrypto",function(){returnW}),t.d(r,"Aes",function(){returnm}),t.d(r,"AesAlgorithmError",function(){returnA}),t.d(r,"AesWrapKey",function(){returnw}),t.d(r,"AesEncrypt",function(){returnv}),t.d(r,"AesECB",function(){returng}),t.d(r,"AesCBC",function(){returnC}),t.d(r,"AesCTR",function(){returnd}),t.d(r,"AesGCM",function(){returnk}),t.d(r,"AesKW",function(){returnb}),t.d(r,"RsaKeyGenParamsError",function(){returnG}),t.d(r,"RsaHashedImportParamsError",function(){returnM}),t.d(r,"Rsa",function(){returnB}),t.d(r,"RsaSSA",function(){returnT}),t.d(r,"RsaPSSParamsError",function(){returnD}),t.d(r,"RsaPSS",function(){returnx}),t.d(r,"RsaOAEPParamsError",function(){returnj}),t.d(r,"RsaOAEP",function(){returnH}),t.d(r,"EcKeyGenParamsError",function(){returnU}),t.d(r,"Ec",function(){return_}),t.d(r,"EcAlgorithmError",function(){returnK}),t.d(r,"EcDSA",function(){returnO}),t.d(r,"EcDH",function(){returnS}),t.d(r,"ShaAlgorithms",function(){returnE}),t.d(r,"Sha",function(){returnP});vari=t(8),s=function(e){functionr(r){for(vart=[],a=1;a<arguments.length;a++)t[a-1]=arguments[a];varo=e.call(this)||this;o.code=0,o.message=n.apply(void0,[r].concat(t));vari=newError(o.message);returni.name=o.constructor.name,o.stack=i.stack,o}returnObject(i.a)(r,e),r.NOT_SUPPORTED="Method is not supported",r}(Error),c=function(e){functionr(){varr=null!==e&&e.apply(this,arguments)||this;returnr.code=1,r}returnObject(i.a)(r,e),r.PARAM_REQUIRED="Algorithm hasn't got required paramter '%1'",r.PARAM_WRONG_TYPE="Algorithm has got wrong type for paramter '%1'. Must be %2",r.PARAM_WRONG_VALUE="Algorithm has got wrong value for paramter '%1'. Must be %2",r.WRONG_ALG_NAME="Algorithm has got wrong name '%1'. Must be '%2'",r.UNSUPPORTED_ALGORITHM="Algorithm '%1' is not supported",r.WRONG_USAGE="Algorithm doesn't support key usage '%1'",r}(s),u=function(e){functionr(){varr=null!==e&&e.apply(this,arguments)||this;returnr.code=3,r}returnObject(i.a)(r,e),r.EMPTY_KEY="CryptoKey is empty",r.WRONG_KEY_ALG="CryptoKey has wrong algorithm '%1'. Must be '%2'",r.WRONG_KEY_TYPE="CryptoKey has wrong type '%1'. Must be '%2'",r.WRONG_KEY_USAGE="CryptoKey has wrong key usage. Must be '%1'",r.NOT_EXTRACTABLE="CryptoKey is not extractable",r.WRONG_FORMAT="CryptoKey has '%1' type. It can be used with '%2' format",r.UNKNOWN_FORMAT="Unknownformatinuse'%1'.Mustbe
vara=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(e,r){e.__proto__=r}||function(e,r){for(vartinr)r.hasOwnProperty(t)&&(e[t]=r[t])};Object.assign},function(e,r){e.exports=require("crypto")},function(e,r,t){"use strict";functionn(e,r){returnPromise.resolve().then(function(){if(e.key)returne;if(e.extractable){return(newm.Crypto).subtle.exportKey("jwk",e).then(function(t){varn=o(e);returnn&&(n=w.assign(n,e.algorithm)),r.importKey("jwk",t,n,!0,e.usages)})}thrownewA.LinerError("'key' is Native CryptoKey. It can't be converted to JS CryptoKey")})}functiona(e,r){w.BrowserInfo().name!==w.Browser.IE&&w.BrowserInfo().name!==w.Browser.Edge&&w.BrowserInfo().name!==w.Browser.Safari||!/^rsa/i.test(e.name)||(r.privateKey?(E.push({hash:e.hash,key:r.privateKey}),E.push({hash:e.hash,key:r.publicKey})):E.push({hash:e.hash,key:r}))}functiono(e){varr=null;returnE.some(function(t){returnt.key===e&&(r=w.assign({},e.algorithm,{hash:t.hash}),!0)}),r}functioni(e,r){vart=[];e.privateKey?(t.push(e.privateKey),t.push(e.publicKey)):t.push(e),t.forEach(function(e){"keyUsage"ine&&(e.usages=e.keyUsage||[],e.usages.length||(["verify","encrypt","wrapKey"].forEach(function(t){r.indexOf(t)>-1&&("public"===e.type||"secret"===e.type)&&e.usages.push(t)}),["sign","decrypt","unwrapKey","deriveKey","deriveBits"].forEach(function(t){r.indexOf(t)>-1&&("private"===e.type||"secret"===e.type)&&e.usages.push(t)})))})}functions(e,r,t){if(r&&w.BrowserInfo().name===w.Browser.IE){"extractable"ine&&(e.ext=e.extractable,deletee.extractable);varn=null;switch(r.name.toUpperCase()){caseh.AlgorithmNames.AesECB.toUpperCase():caseh.AlgorithmNames.AesCBC.toUpperCase():caseh.AlgorithmNames.AesGCM.toUpperCase():n=v.AesCrypto;break;default:thrownewA.LinerError(A.LinerError.UNSUPPORTED_ALGORITHM,r.name.toUpperCase())}n&&!e.alg&&(e.alg=n.alg2jwk(r)),"key_ops"ine||(e.key_ops=t)}}functionc(e){w.BrowserInfo().name===w.Browser.IE&&("ext"ine&&(e.extractable=e.ext,deletee.ext),deletee.key_ops,deletee.alg)}functionu(e){varr=/AppleWebKit\/(\d+)/.exec(self.navigator.userAgent);returne.toUpperCase()===h.AlgorithmNames.RsaOAEP&&r&&parseInt(r[1],10)<604}varp=this&&this.__extends||function(){vare=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(e,r){e.__proto__=r}||function(e,r){for(vartinr)r.hasOwnProperty(t)&&(e[t]=r[t])};returnfunction(r,t){functionn(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,newn)}}();Object.defineProperty(r,"__esModule",{value:!0});varh=t(0),f=t(0),y=t(0),l=t(4),m=t(2),A=t(1),w=t(5),v=t(11),g=t(12),C=t(13),d=t(14),k=t(15),b=t(16),E=[],P=function(e){functionr(){returnnull!==e&&e.apply(this,arguments)||this}returnp(r,e),r.prototype.generateKey=function(r,t,n){varo,s=this,c=arguments;returne.prototype.generateKey.apply(this,c).then(function(e){if(o=y.PrepareAlgorithm(r),!(w.BrowserInfo().name===w.Browser.Edge&&o.name.toUpperCase()===h.AlgorithmNames.AesGCM||u(o.name))&&l.nativeSubtle)try{returnl.nativeSubtle.generateKey.apply(l.nativeSubtle,c).catch(function(e){w.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e&&e.message||"Unknown message")})}catch(e){w.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e&&e.message||"Unknown message")}}).then(function(e){if(e){varc=Promise.resolve(e);if(w.BrowserInfo().name===w.Browser.Safari&&(o.name.toUpperCase()===h.AlgorithmNames.EcDH.toUpperCase()||o.name.toUpperCase()===h.AlgorithmNames.EcDSA.toUpperCase())){varu=e.publicKey;c=c.then(function(){returns.exportKey("jwk",u).then(function(a){returns.exportKey("spki",u).then(function(o){for(vari=h.Base64Url.decode(a.x),c=h.Base64Url.decode(a.y),u=i.length+c.length,p=newUint8Array(o),f=0;f<u;f++){vary=p[p.length-f-1],l=void0;if(l=f<c.length?c[c.length-f-1]:i[i.length+c.length-f-1],y!==l)returnw.warn("WebCrypto: EC key has wrong public key JWK. Key pair will be recreated"),s.generateKey(r,t,n)}returne})})})}returnc.then(function(e){returni(e,n),a(o,e),e})}varp;switch(o.name.toLowerCase()){caseh.AlgorithmNames.AesECB.