text: !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=6)}([function(t,e,n){"use strict";t.exports=n(13)},function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,u=r(t),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)s.call(n,c)&&(u[c]=n[c]);if(i){a=i(n);for(var h=0;h<a.length;h++)o.call(n,a[h])&&(u[a[h]]=n[a[h]])}}return u}},function(t,e,n){(function(t){function n(t){var e,n,r="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),r+=Zn.charAt(n>>6)+Zn.charAt(63&n);if(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=Zn.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=Zn.charAt(n>>2)+Zn.charAt((3&n)<<4)),Qn)for(;(3&r.length)>0;)r+=Qn;return r}function r(t){var e,n,r,i="",s=0;for(e=0;e<t.length&&t.charAt(e)!=Qn;++e)(r=Zn.indexOf(t.charAt(e)))<0||(0==s?(i+=c(r>>2),n=3&r,s=1):1==s?(i+=c(n<<2|r>>4),n=15&r,s=2):2==s?(i+=c(n),i+=c(r>>2),n=3&r,s=3):(i+=c(n<<2|r>>4),i+=c(15&r),s=0));return 1==s&&(i+=c(n<<2)),i}function i(t){var e,n=r(t),i=new Array;for(e=0;2*e<n.length;++e)i[e]=parseInt(n.substring(2*e,2*e+2),16);return i}function s(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function o(){return new s(null)}function a(t,e,n,r,i,s){for(;--s>=0;){var o=e*this[t++]+n[r]+i;i=Math.floor(o/67108864),n[r++]=67108863&o}return i}function u(t,e,n,r,i,s){for(var o=32767&e,a=e>>15;--s>=0;){var u=32767&this[t],l=this[t++]>>15,c=a*u+l*o;u=o*u+((32767&c)<<15)+n[r]+(1073741823&i),i=(u>>>30)+(c>>>15)+a*l+(i>>>30),n[r++]=1073741823&u}return i}function l(t,e,n,r,i,s){for(var o=16383&e,a=e>>14;--s>=0;){var u=16383&this[t],l=this[t++]>>14,c=a*u+l*o;u=o*u+((16383&c)<<14)+n[r]+i,i=(u>>28)+(c>>14)+a*l,n[r++]=268435455&u}return i}function c(t){return nr.charAt(t)}function h(t,e){var n=rr[t.charCodeAt(e)];return null==n?-1:n}function f(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function d(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0}function p(t){var e=o();return e.fromInt(t),e}function g(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var r=t.length,i=!1,o=0;--r>=0;){var a=8==n?255&t[r]:h(t,r);a<0?"-"==t.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&s.ZERO.subTo(this,this)}function y(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function v(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,s="",o=this.t,a=this.DB-o*this.DB%e;if(o-- >0)for(a<this.DB&&(n=this[o]>>a)>0&&(i=!0,s=c(n));o>=0;)a<e?(n=(this[o]&(1<<a)-1)<<e-a,n|=this[--o]>>(a+=this.DB-e)):(n=this[o]>>(a-=e)&r,a<=0&&(a+=this.DB,--o)),n>0&&(i=!0),i&&(s+=c(n));return i?s:"0"}function m(){var t=o();return s.ZERO.subTo(this,t),t}function b(){return this.s<0?this.negate():this}function S(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0}function w(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function x(){return this.t<=0?0:this.DB*(this.t-1)+w(this[this.t-1]^this.s&this.DM)}function E(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function F(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s}function A(t,e){var n,r=t%this.DB,i=this.DB-r,s=(1<<i)-1,o=Math.floor(t/this.DB),a=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)e[n+o+1]=this[n]>>i|a,a=(this[n]&s)<<r;for(n=o-1;n>=0;--n)e[n]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()}function C(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)return void(e.t=0);var r=t%this.DB,i=this.DB-r,s=(1<<r)-1;e[0]=this[n]>>r;for(var o=n+1;o<this.t;++o)e[o-n-1]|=(this[o]&s)<<i,e[o-n]=this[o]>>r;r>0&&(e[this.t-n-1]|=(this.s&s)<<i),e.t=this.t-n,e.clamp()}function T(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()}function P(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;--i>=0;)e[i]=0;for(i=0;i<r.t;++i)e[i+n.t]=n.am(0,r[i],e,i,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&s.ZERO.subTo(e,e)}function D(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()}function I(t,e,n){var r=t.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=e&&e.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=o());var a=o(),u=this.s,l=t.s,c=this.DB-w(r[r.t-1]);c>0?(r.lShiftTo(c,a),i.lShiftTo(c,n)):(r.copyTo(a),i.copyTo(n));var h=a.t,f=a[h-1];if(0!=f){var d=f*(1<<this.F1)+(h>1?a[h-2]>>this.F2:0),p=this.FV/d,g=(1<<this.F1)/d,y=1<<this.F2,v=n.t,m=v-h,b=null==e?o():e;for(a.dlShiftTo(m,b),n.compareTo(b)>=0&&(n[n.t++]=1,n.subTo(b,n)),s.ONE.dlShiftTo(h,b),b.subTo(a,a);a.t<h;)a[a.t++]=0;for(;--m>=0;){var S=n[--v]==f?this.DM:Math.floor(n[v]*p+(n[v-1]+y)*g);if((n[v]+=a.am(0,S,n,m,0,h))<S)for(a.dlShiftTo(m,b),n.subTo(b,n);n[v]<--S;)n.subTo(b,n)}null!=e&&(n.drShiftTo(h,e),u!=l&&s.ZERO.subTo(e,e)),n.t=h,n.clamp(),c>0&&n.rShiftTo(c,n),u<0&&s.ZERO.subTo(n,n)}}}function k(t){var e=o();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(s.ZERO)>0&&t.subTo(e,e),e}function N(t){this.m=t}function R(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function B(t){return t}function _(t){t.divRemTo(this.m,null,t)}function H(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function O(t,e){t.squareTo(e),this.reduce(e)}function j(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function L(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function V(t){var e=o();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(s.ZERO)>0&&this.m.subTo(e,e),e}function M(t){var e=o();return t.copyTo(e),this.reduce(e),e}function U(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function K(t,e){t.squareTo(e),this.reduce(e)}function q(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function z(){return 0==(this.t>0?1&this[0]:this.s)}function W(t,e){if(t>4294967295||t<1)return s.ONE;var n=o(),r=o(),i=e.convert(this),a=w(t)-1;for(i.copyTo(n);--a>=0;)if(e.sqrTo(n,r),(t&1<<a)>0)e.mulTo(r,i,n);else{var u=n;n=r,r=u}return e.revert(n)}function Y(t,e){var n;return n=t<256||e.isEven()?new N(e):new L(e),this.exp(t,n)}function J(){var t=o();return this.copyTo(t),t}function G(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function $(){return 0==this.t?this.s:this[0]<<24>>24}function X(){return 0==this.t?this.s:this[0]<<16>>16}function Z(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function Q(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function tt(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=p(n),i=o(),s=o(),a="";for(this.divRemTo(r,i,s);i.signum()>0;)a=(n+s.intValue()).toString(t).substr(1)+a,i.divRemTo(r,i,s);return s.intValue().toString(t)+a}function et(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),r=Math.pow(e,n),i=!1,o=0,a=0,u=0;u<t.length;++u){var l=h(t,u);l<0?"-"==t.charAt(u)&&0==this.signum()&&(i=!0):(a=e*a+l,++o>=n&&(this.dMultiply(r),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(a,0)),i&&s.ZERO.subTo(this,this)}function nt(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(s.ONE.shiftLeft(t-1),ct,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(s.ONE.shiftLeft(t-1),this);else{var r=new Array,i=7&t;r.length=1+(t>>3),e.nextBytes(r),i>0?r[0]&=(1<<i)-1:r[0]=0,this.fromString(r,256)}}function rt(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e}function it(t){return 0==this.compareTo(t)}function st(t){return this.compareTo(t)<0?this:t}function ot(t){return this.compareTo(t)>0?this:t}function at(t,e,n){var r,i,s=Math.min(t.t,this.t);for(r=0;r<s;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=s;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=s;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()}function ut(t,e){return t&e}function lt(t){var e=o();return this.bitwiseTo(t,ut,e),e}function ct(t,e){return t|e}function ht(t){var e=o();return this.bitwiseTo(t,ct,e),e}function ft(t,e){return t^e}function dt(t){var e=o();return this.bitwiseTo(t,ft,e),e}function pt(t,e){return t&~e}function gt(t){var e=o();return this.bitwiseTo(t,pt,e),e}function yt(){for(var t=o(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t}function vt(t){var e=o();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function mt(t){var e=o();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function bt(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function St(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+bt(this[t]);return this.s<0?this.t*this.DB:-1}function wt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function xt(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=wt(this[n]^e);return t}function Et(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)}function Ft(t,e){var n=s.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n}function At(t){return this.changeBit(t,ct)}function Ct(t){return this.changeBit(t,pt)}function Tt(t){return this.changeBit(t,ft)}function Pt(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()}function Dt(t){var e=o();return this.addTo(t,e),e}function It(t){var e=o();return this.subTo(t,e),e}function kt(t){var e=o();return this.multiplyTo(t,e),e}function Nt(){var t=o();return this.squareTo(t),t}function Rt(t){var e=o();return this.divRemTo(t,e,null),e}function Bt(t){var e=o();return this.divRemTo(t,null,e),e}function _t(t){var e=o(),n=o();return this.divRemTo(t,e,n),new Array(e,n)}function Ht(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Ot(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function jt(){}function Lt(t){return t}function Vt(t,e,n){t.multiplyTo(e,n)}function Mt(t,e){t.squareTo(e)}function Ut(t){return this.exp(t,new jt)}function Kt(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;var i;for(i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()}function qt(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)}function zt(t){this.r2=o(),this.q3=o(),s.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function Wt(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=o();return t.copyTo(e),this.reduce(e),e}function Yt(t){return t}function Jt(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}function Gt(t,e){t.squareTo(e),this.reduce(e)}function $t(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function Xt(t,e){var n,r,i=t.bitLength(),s=p(1);if(i<=0)return s;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new N(e):e.isEven()?new zt(e):new L(e);var a=new Array,u=3,l=n-1,c=(1<<n)-1;if(a[1]=r.convert(this),n>1){var h=o();for(r.sqrTo(a[1],h);u<=c;)a[u]=o(),r.mulTo(h,a[u-2],a[u]),u+=2}var f,d,g=t.t-1,y=!0,v=o();for(i=w(t[g])-1;g>=0;){for(i>=l?f=t[g]>>i-l&c:(f=(t[g]&(1<<i+1)-1)<<l-i,g>0&&(f|=t[g-1]>>this.DB+i-l)),u=n;0==(1&f);)f>>=1,--u;if((i-=u)<0&&(i+=this.DB,--g),y)a[f].copyTo(s),y=!1;else{for(;u>1;)r.sqrTo(s,v),r.sqrTo(v,s),u-=2;u>0?r.sqrTo(s,v):(d=s,s=v,v=d),r.mulTo(v,a[f],s)}for(;g>=0&&0==(t[g]&1<<i);)r.sqrTo(s,v),d=s,s=v,v=d,--i<0&&(i=this.DB-1,--g)}return r.revert(s)}function Zt(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),s=n.getLowestSetBit();if(s<0)return e;for(i<s&&(s=i),s>0&&(e.rShiftTo(s,e),n.rShiftTo(s,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return s>0&&n.lShiftTo(s,n),n}function Qt(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n}function te(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return s.ZERO;for(var n=t.clone(),r=this.clone(),i=p(1),o=p(0),a=p(0),u=p(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(t,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);n.compareTo(r)>=0?(n.subTo(r,n),e&&i.subTo(a,i),o.subTo(u,o)):(r.subTo(n,r),e&&a.subTo(i,a),u.subTo(o,u))}return 0!=r.compareTo(s.ONE)?s.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u}function ee(t){var e,n=this.abs();if(1==n.t&&n[0]<=ir[ir.length-1]){for(e=0;e<ir.length;++e)if(n[0]==ir[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<ir.length;){for(var r=ir[e],i=e+1;i<ir.length&&r<sr;)r*=ir[i++];for(r=n.modInt(r);e<i;)if(r%ir[e++]==0)return!1}return n.millerRabin(t)}function ne(t){var e=this.subtract(s.ONE),n=e.getLowestSetBit();if(n<=0)return!1;var r=e.shiftRight(n);(t=t+1>>1)>ir.length&&(t=ir.length);for(var i=o(),a=0;a<t;++a){i.fromInt(ir[Math.floor(Math.random()*ir.length)]);var u=i.modPow(r,this);if(0!=u.compareTo(s.ONE)&&0!=u.compareTo(e)){for(var l=1;l++<n&&0!=u.compareTo(e);)if(u=u.modPowInt(2,this),0==u.compareTo(s.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0}function re(){this.i=0,this.j=0,this.S=new Array}function ie(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0}function se(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]}function oe(){return new re}function ae(t){ar[ur++]^=255&t,ar[ur++]^=t>>8&255,ar[ur++]^=t>>16&255,ar[ur++]^=t>>24&255,ur>=lr&&(ur-=lr)}function ue(){ae((new Date).getTime())}function le(){if(null==or){for(ue(),or=oe(),or.init(ar),ur=0;ur<ar.length;++ur)ar[ur]=0;ur=0}return or.next()}function ce(t){var e;for(e=0;e<t.length;++e)t[e]=le()}function he(){}function fe(t,e){return new s(t,e)}function de(t,e){if(e<t.length+11)throw"Message too long for RSA";for(var n=new Array,r=t.length-1;r>=0&&e>0;){var i=t.charCodeAt(r--);i<128?n[--e]=i:i>127&&i<2048?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new he,a=new Array;e>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new s(n)}function pe(t,e,n){for(var r="",i=0;r.length<e;)r+=n(String.fromCharCode.apply(String,t.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function ge(t,e,n,r){var i=yr.crypto.MessageDigest,o=yr.crypto.Util,a=null;if(n||(n="sha1"),"string"===typeof n&&(a=i.getCanonicalAlgName(n),r=i.getHashLength(a),n=function(t){return bn(o.hashHex(Sn(t),a))}),t.length+2*r+2>e)throw"Message too long for RSA";var u,l="";for(u=0;u<e-t.length-2*r-2;u+=1)l+="\0";var c=n("")+l+"\x01"+t,h=new Array(r);(new he).nextBytes(h);var f=pe(h,c.length,n),d=[];for(u=0;u<c.length;u+=1)d[u]=c.charCodeAt(u)^f.charCodeAt(u);var p=pe(d,h.length,n),g=[0];for(u=0;u<h.length;u+=1)g[u+1]=h[u]^p.charCodeAt(u);return new s(g.concat(d))}function ye(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function ve(t,e){if(this.isPublic=!0,this.isPrivate=!1,"string"!==typeof t)this.n=t,this.e=e;else{if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA public key";this.n=fe(t,16),this.e=parseInt(e,16)}}function me(t){return t.modPowInt(this.e,this.n)}function be(t){var e=de(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r}function Se(t,e,n){var r=ge(t,this.n.bitLength()+7>>3,e,n);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;var s=i.toString(16);return 0==(1&s.length)?s:"0"+s}function we(t,e){for(var n=t.toByteArray(),r=0;r<n.length&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var i="";++r<n.length;){var s=255&n[r];s<128?i+=String.fromCharCode(s):s>191&&s<224?(i+=String.fromCharCode((31&s)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&s)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}function xe(t,e,n){for(var r="",i=0;r.length<e;)r+=n(t+String.fromCharCode.apply(String,[(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i])),i+=1;return r}function Ee(t,e,n,r){var i=yr.crypto.MessageDigest,s=yr.crypto.Util,o=null;n||(n="sha1"),"string"===typeof n&&(o=i.getCanonicalAlgName(n),r=i.getHashLength(o),n=function(t){return bn(s.hashHex(Sn(t),o))}),t=t.toByteArray();var a;for(a=0;a<t.length;a+=1)t[a]&=255;for(;t.length<e;)t.unshift(0);if(t=String.fromCharCode.apply(String,t),t.length<2*r+2)throw"Cipher too short";var a,u=t.substr(1,r),l=t.substr(r+1),c=xe(l,r,n),h=[];for(a=0;a<u.length;a+=1)h[a]=u.charCodeAt(a)^c.charCodeAt(a);var f=xe(String.fromCharCode.apply(String,h),t.length-r,n),d=[];for(a=0;a<l.length;a+=1)d[a]=l.charCodeAt(a)^f.charCodeAt(a);if(d=String.fromCharCode.apply(String,d),d.substr(0,r)!==n(""))throw"Hash mismatch";d=d.substr(r);var p=d.indexOf("\x01");if((-1!=p?d.substr(0,p).lastIndexOf("\0"):-1)+1!=p)throw"Malformed data";return d.substr(p+1)}function Fe(t,e,n){if(this.isPrivate=!0,"string"!==typeof t)this.n=t,this.e=e,this.d=n;else{if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA private key";this.n=fe(t,16),this.e=parseInt(e,16),this.d=fe(n,16)}}function Ae(t,e,n,r,i,s,o,a){if(this.isPrivate=!0,this.isPublic=!1,null==t)throw"RSASetPrivateEx N == null";if(null==e)throw"RSASetPrivateEx E == null";if(0==t.length)throw"RSASetPrivateEx N.length == 0";if(0==e.length)throw"RSASetPrivateEx E.length == 0";if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA private key in RSASetPrivateEx";this.n=fe(t,16),this.e=parseInt(e,16),this.d=fe(n,16),this.p=fe(r,16),this.q=fe(i,16),this.dmp1=fe(s,16),this.dmq1=fe(o,16),this.coeff=fe(a,16)}function Ce(t,e){var n=new he,r=t>>1;this.e=parseInt(e,16);for(var i=new s(e,16);;){for(;this.p=new s(t-r,1,n),0!=this.p.subtract(s.ONE).gcd(i).compareTo(s.ONE)||!this.p.isProbablePrime(10););for(;this.q=new s(r,1,n),0!=this.q.subtract(s.ONE).gcd(i).compareTo(s.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(s.ONE),u=this.q.subtract(s.ONE),l=a.multiply(u);if(0==l.gcd(i).compareTo(s.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(l),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}this.isPrivate=!0}function Te(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)}function Pe(t){var e=fe(t,16),n=this.doPrivate(e);return null==n?null:we(n,this.n.bitLength()+7>>3)}function De(t,e,n){var r=fe(t,16),i=this.doPrivate(r);return null==i?null:Ee(i,this.n.bitLength()+7>>3,e,n)}function Ie(t,e){this.x=e,this.q=t}function ke(t){return t==this||this.q.equals(t.q)&&this.x.equals(t.x)}function Ne(){return this.x}function Re(){return new Ie(this.q,this.x.negate().mod(this.q))}function Be(t){return new Ie(this.q,this.x.add(t.toBigInteger()).mod(this.q))}function _e(t){return new Ie(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))}function He(t){return new Ie(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))}function Oe(){return new Ie(this.q,this.x.square().mod(this.q))}function je(t){return new Ie(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))}function Le(t,e,n,r){this.curve=t,this.x=e,this.y=n,this.z=null==r?s.ONE:r,this.zinv=null}function Ve(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function Me(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function Ue(t){if(t==this)return!0;if(this.isInfinity())return t.isInfinity();if(t.isInfinity())return this.isInfinity();var e,n;return e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),!!e.equals(s.ZERO)&&(n=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q),n.equals(s.ZERO))}function Ke(){return null==this.x&&null==this.y||this.z.equals(s.ZERO)&&!this.y.toBigInteger().equals(s.ZERO)}function qe(){return new Le(this.curve,this.x,this.y.negate(),this.z)}function ze(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),n=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q);if(s.ZERO.equals(n))return s.ZERO.equals(e)?this.twice():this.curve.getInfinity();var r=new s("3"),i=this.x.toBigInteger(),o=this.y.toBigInteger(),a=(t.x.toBigInteger(),t.y.toBigInteger(),n.square()),u=a.multiply(n),l=i.multiply(a),c=e.square().multiply(this.z),h=c.subtract(l.shiftLeft(1)).multiply(t.z).subtract(u).multiply(n).mod(this.curve.q),f=l.multiply(r).multiply(e).subtract(o.multiply(u)).subtract(c.multiply(e)).multiply(t.z).add(e.multiply(u)).mod(this.curve.q),d=u.multiply(this.z).multiply(t.z).mod(this.curve.q);return new Le(this.curve,this.curve.fromBigInteger(h),this.curve.fromBigInteger(f),d)}function We(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=new s("3"),e=this.x.toBigInteger(),n=this.y.toBigInteger(),r=n.multiply(this.z),i=r.multiply(n).mod(this.curve.q),o=this.curve.a.toBigInteger(),a=e.square().multiply(t);s.ZERO.equals(o)||(a=a.add(this.z.square().multiply(o))),a=a.mod(this.curve.q);var u=a.square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.q),l=a.multiply(t).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.square().multiply(a)).mod(this.curve.q),c=r.square().multiply(r).shiftLeft(3).mod(this.curve.q);return new Le(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(l),c)}function Ye(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,n=t,r=n.multiply(new s("3")),i=this.negate(),o=this;for(e=r.bitLength()-2;e>0;--e){o=o.twice();var a=r.testBit(e);a!=n.testBit(e)&&(o=o.add(a?this:i))}return o}function Je(t,e,n){var r;r=t.bitLength()>n.bitLength()?t.bitLength()-1:n.bitLength()-1;for(var i=this.curve.getInfinity(),s=this.add(e);r>=0;)i=i.twice(),t.testBit(r)?i=n.testBit(r)?i.add(s):i.add(this):n.testBit(r)&&(i=i.add(e)),--r;return i}function Ge(t,e,n){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(n),this.infinity=new Le(this,null,null)}function $e(){return this.q}function Xe(){return this.a}function Ze(){return this.b}function Qe(t){return t==this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)}function tn(){return this.infinity}function en(t){return new Ie(this.q,t)}function nn(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var e=(t.length-2)/2,n=t.substr(2,e),r=t.substr(e+2,e);return new Le(this,this.fromBigInteger(new s(n,16)),this.fromBigInteger(new s(r,16)));default:return null}}function rn(t){for(var e=new Array,n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function sn(t){for(var e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}function on(t){for(var e="",n=0;n<t.length;n++){var r=t[n].toString(16);1==r.length&&(r="0"+r),e+=r}return e}function an(t){return on(rn(t))}function un(t){return n(an(t))}function ln(t){return hn(n(an(t)))}function cn(t){return sn(i(fn(t)))}function hn(t){return t=t.replace(/\=/g,""),t=t.replace(/\+/g,"-"),t=t.replace(/\//g,"_")}function fn(t){return t.length%4==2?t+="==":t.length%4==3&&(t+="="),t=t.replace(/-/g,"+"),t=t.replace(/_/g,"/")}function dn(t){return t.length%2==1&&(t="0"+t),hn(n(t))}function pn(t){return r(fn(t))}function gn(t){return n(Nn(jn(t)))}function yn(t){return decodeURIComponent(Rn(r(t)))}function vn(t){return Nn(jn(t))}function mn(t){return decodeURIComponent(Rn(t))}function bn(t){for(var e="",n=0;n<t.length-1;n+=2)e+=String.fromCharCode(parseInt(t.substr(n,2),16));return e}function Sn(t){for(var e="",n=0;n<t.length;n++)e+=("0"+t.charCodeAt(n).toString(16)).slice(-2);return e}function wn(t){return n(t)}function xn(t){var e=wn(t),n=e.replace(/(.{64})/g,"$1\r\n");return n=n.replace(/\r\n$/,"")}function En(t){return r(t.replace(/[^0-9A-Za-z\/+=]*/g,""))}function Fn(t,e){return"-----BEGIN "+e+"-----\r\n"+xn(t)+"\r\n-----END "+e+"-----\r\n"}function An(t,e){if(-1==t.indexOf("-----BEGIN "))throw"can't find PEM header: "+e;return void 0!==e?(t=t.replace("-----BEGIN "+e+"-----",""),t=t.replace("-----END "+e+"-----","")):(t=t.replace(/-----BEGIN [^-]+-----/,""),t=t.replace(/-----END [^-]+-----/,"")),En(t)}function Cn(t){if(t.length%2!=0)throw"input is not even length";if(null==t.match(/^[0-9A-Fa-f]+$/))throw"input is not hexadecimal";for(var e=new ArrayBuffer(t.length/2),n=new DataView(e),r=0;r<t.length/2;r++)n.setUint8(r,parseInt(t.substr(2*r,2),16));return e}function Tn(t){for(var e="",n=new DataView(t),r=0;r<t.byteLength;r++)e+=("00"+n.getUint8(r).toString(16)).slice(-2);return e}function Pn(t){var e,n,r,i,s,o,a,u,l,c,h;if(h=t.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/))return u=h[1],e=parseInt(u),2===u.length&&(50<=e&&e<100?e=1900+e:0<=e&&e<50&&(e=2e3+e)),n=parseInt(h[2])-1,r=parseInt(h[3]),i=parseInt(h[4]),s=parseInt(h[5]),o=parseInt(h[6]),a=0,l=h[7],""!==l&&(c=(l.substr(1)+"00").substr(0,3),a=parseInt(c)),Date.UTC(e,n,r,i,s,o,a);throw"unsupported zulu format: "+t}function Dn(t){return~~(Pn(t)/1e3)}function In(t){return new Date(Pn(t))}function kn(t,e,n){var r,i=t.getUTCFullYear();if(e){if(i<1950||2049<i)throw"not proper year for UTCTime: "+i;r=(""+i).slice(-2)}else r=("000"+i).slice(-4);if(r+=("0"+(t.getUTCMonth()+1)).slice(-2),r+=("0"+t.getUTCDate()).slice(-2),r+=("0"+t.getUTCHours()).slice(-2),r+=("0"+t.getUTCMinutes()).slice(-2),r+=("0"+t.getUTCSeconds()).slice(-2),n){var s=t.getUTCMilliseconds();0!==s&&(s=("00"+s).slice(-3),s=s.replace(/0+$/g,""),r+="."+s)}return r+="Z"}function Nn(t){return t.replace(/%/g,"")}function Rn(t){return t.replace(/(..)/g,"%$1")}function Bn(t){var e="malformed IPv6 address";if(!t.match(/^[0-9A-Fa-f:]+$/))throw e;t=t.toLowerCase();var n=t.split(":").length-1;if(n<2)throw e;var r=":".repeat(7-n+2);t=t.replace("::",r);var i=t.split(":");if(8!=i.length)throw e;for(var s=0;s<8;s++)i[s]=("0000"+i[s]).slice(-4);return i.join("")}function _n(t){if(!t.match(/^[0-9A-Fa-f]{32}$/))throw"malformed IPv6 address octet";t=t.toLowerCase();for(var e=t.match(/.{1,4}/g),n=0;n<8;n++)e[n]=e[n].replace(/^0+/,""),""==e[n]&&(e[n]="0");t=":"+e.join(":")+":";var r=t.match(/:(0:){2,}/g);if(null===r)return t.slice(1,-1);for(var i="",n=0;n<r.length;n++)r[n].length>i.length&&(i=r[n]);return t=t.replace(i,"::"),t.slice(1,-1)}function Hn(t){var e="malformed hex value";if(!t.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw e;if(8!=t.length)return 32==t.length?_n(t):t;try{return parseInt(t.substr(0,2),16)+"."+parseInt(t.substr(2,2),16)+"."+parseInt(t.substr(4,2),16)+"."+parseInt(t.substr(6,2),16)}catch(t){throw e}}function On(t){var e="malformed IP address";if(t=t.toLowerCase(t),!t.match(/^[0-9.]+$/)){if(t.match(/^[0-9a-f:]+$/)&&-1!==t.indexOf(":"))return Bn(t);throw e}var n=t.split(".");if(4!==n.length)throw e;var r="";try{for(var i=0;i<4;i++){r+=("0"+parseInt(n[i]).toString(16)).slice(-2)}return r}catch(t){throw e}}function jn(t){for(var e=encodeURIComponent(t),n="",r=0;r<e.length;r++)"%"==e[r]?(n+=e.substr(r,3),r+=2):n=n+"%"+an(e[r]);return n}function Ln(t){return t=t.replace(/\r\n/gm,"\n")}function Vn(t){return t=t.replace(/\r\n/gm,"\n"),t=t.replace(/\n/gm,"\r\n")}function Mn(t){return t.length%2==1?"0"+t:t.substr(0,1)>"7"?"00"+t:t}function Un(t){t=t.replace(/^\s*\[\s*/,""),t=t.replace(/\s*\]\s*$/,""),t=t.replace(/\s*/g,"");try{return t.split(/,/).map(function(t,e,n){var r=parseInt(t);if(r<0||255<r)throw"integer not in range 0-255";return("00"+r.toString(16)).slice(-2)}).join("")}catch(t){throw"malformed integer array string: "+t}}function Kn(t,e){for(var n="",r=e/4-t.length,i=0;i<r;i++)n+="0";return n+t}function qn(t,e,n){for(var r="",i=0;r.length<e;)r+=bn(n(Sn(t+String.fromCharCode.apply(String,[(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return r}function zn(t){for(var e in yr.crypto.Util.DIGESTINFOHEAD){var n=yr.crypto.Util.DIGESTINFOHEAD[e],r=n.length;if(t.substring(0,r)==n){return[e,t.substring(r)]}}return[]}function Wn(){var t=gr,e=t.getChildIdx,n=t.getV,r=t.getTLV,i=t.getVbyList,s=t.getTLVbyList,o=t.getIdxbyList,a=t.getVidx,u=t.oidname,l=Wn,c=An;this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){return null===this.hex||0!==this.version?this.version:"a003020102"!==s(this.hex,0,[0,0])?(this.version=1,this.foffset=-1,1):(this.version=3,3)},this.getSerialNumberHex=function(){return i(this.hex,0,[0,1+this.foffset],"02")},this.getSignatureAlgorithmField=function(){return u(i(this.hex,0,[0,2+this.foffset,0],"06"))},this.getIssuerHex=function(){return s(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return l.hex2dn(this.getIssuerHex())},this.getSubjectHex=function(){return s(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){return l.hex2dn(this.getSubjectHex())},this.getNotBefore=function(){var t=i(this.hex,0,[0,4+this.foffset,0]);return t=t.replace(/(..)/g,"%$1"),t=decodeURIComponent(t)},this.getNotAfter=function(){var t=i(this.hex,0,[0,4+this.foffset,1]);return t=t.replace(/(..)/g,"%$1"),t=decodeURIComponent(t)},this.getPublicKeyHex=function(){return t.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return o(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var t=this.getPublicKeyIdx();return o(this.hex,t,[1,0],"30")},this.getPublicKey=function(){return Sr.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){return u(i(this.hex,0,[1,0],"06"))},this.getSignatureValueHex=function(){return i(this.hex,0,[2],"03",!0)},this.verifySignature=function(t){var e=this.getSignatureAlgorithmName(),n=this.getSignatureValueHex(),r=s(this.hex,0,[0],"30"),i=new yr.crypto.Signature({alg:e});return i.init(t),i.updateHex(r),i.verify(n)},this.parseExt=function(){if(3!==this.version)return-1;var n=o(this.hex,0,[0,7,0],"30"),r=e(this.hex,n);this.aExtInfo=new Array;for(var s=0;s<r.length;s++){var u={};u.critical=!1;var l=e(this.hex,r[s]),c=0;3===l.length&&(u.critical=!0,c=1),u.oid=t.hextooidstr(i(this.hex,r[s],[0],"06"));var h=o(this.hex,r[s],[1+c]);u.vidx=a(this.hex,h),this.aExtInfo.push(u)}},this.getExtInfo=function(t){var e=this.aExtInfo,n=t;if(t.match(/^[0-9.]+$/)||(n=yr.asn1.x509.OID.name2oid(t)),""!==n)for(var r=0;r<e.length;r++)if(e[r].oid===n)return e[r]},this.getExtBasicConstraints=function(){var t=this.getExtInfo("basicConstraints");if(void 0===t)return t;var e=n(this.hex,t.vidx);if(""===e)return{};if("0101ff"===e)return{cA:!0};if("0101ff02"===e.substr(0,8)){var r=n(e,6);return{cA:!0,pathLen:parseInt(r,16)}}throw"basicConstraints parse error"},this.getExtKeyUsageBin=function(){var t=this.getExtInfo("keyUsage");if(void 0===t)return"";var e=n(this.hex,t.vidx);if(e.length%2!=0||e.length<=2)throw"malformed key usage value";var r=parseInt(e.substr(0,2)),i=parseInt(e.substr(2),16).toString(2);return i.substr(0,i.length-r)},this.getExtKeyUsageString=function(){for(var t=this.getExtKeyUsageBin(),e=new Array,n=0;n<t.length;n++)"1"==t.substr(n,1)&&e.push(Wn.KEYUSAGE_NAME[n]);return e.join(",")},this.getExtSubjectKeyIdentifier=function(){var t=this.getExtInfo("subjectKeyIdentifier");return void 0===t?t:n(this.hex,t.vidx)},this.getExtAuthorityKeyIdentifier=function(){var t=this.getExtInfo("authorityKeyIdentifier");if(void 0===t)return t;for(var i={},s=r(this.hex,t.vidx),o=e(s,0),a=0;a<o.length;a++)"80"===s.substr(o[a],2)&&(i.kid=n(s,o[a]));return i},this.getExtExtKeyUsageName=function(){var t=this.getExtInfo("extKeyUsage");if(void 0===t)return t;var i=new Array,s=r(this.hex,t.vidx);if(""===s)return i;for(var o=e(s,0),a=0;a<o.length;a++)i.push(u(n(s,o[a])));return i},this.getExtSubjectAltName=function(){for(var t=this.getExtSubjectAltName2(),e=new Array,n=0;n<t.length;n++)"DNS"===t[n][0]&&e.push(t[n][1]);return e},this.getExtSubjectAltName2=function(){var t,i,s,o=this.getExtInfo("subjectAltName");if(void 0===o)return o;for(var a=new Array,u=r(this.hex,o.vidx),l=e(u,0),c=0;c<l.length;c++)s=u.substr(l[c],2),t=n(u,l[c]),"81"===s&&(i=mn(t),a.push(["MAIL",i])),"82"===s&&(i=mn(t),a.push(["DNS",i])),"84"===s&&(i=Wn.hex2dn(t,0),a.push(["DN",i])),"86"===s&&(i=mn(t),a.push(["URI",i])),"87"===s&&(i=Hn(t),a.push(["IP",i]));return a},this.getExtCRLDistributionPointsURI=function(){var t=this.getExtInfo("cRLDistributionPoints");if(void 0===t)return t;for(var n=new Array,r=e(this.hex,t.vidx),s=0;s<r.length;s++)try{var o=i(this.hex,r[s],[0,0,0],"86"),a=mn(o);n.push(a)}catch(t){}return n},this.getExtAIAInfo=function(){var t=this.getExtInfo("authorityInfoAccess");if(void 0===t)return t;for(var n={ocsp:[],caissuer:[]},r=e(this.hex,t.vidx),s=0;s<r.length;s++){var o=i(this.hex,r[s],[0],"06"),a=i(this.hex,r[s],[1],"86");"2b06010505073001"===o&&n.ocsp.push(mn(a)),"2b06010505073002"===o&&n.caissuer.push(mn(a))}return n},this.getExtCertificatePolicies=function(){var t=this.getExtInfo("certificatePolicies");if(void 0===t)return t;for(var s=r(this.hex,t.vidx),o=[],a=e(s,0),l=0;l<a.length;l++){var c={},h=e(s,a[l]);if(c.id=u(n(s,h[0])),2===h.length)for(var f=e(s,h[1]),d=0;d<f.length;d++){var p=i(s,f[d],[0],"06");"2b06010505070201"===p?c.cps=mn(i(s,f[d],[1])):"2b06010505070202"===p&&(c.unotice=mn(i(s,f[d],[1,0])))}o.push(c)}return o},this.readCertPEM=function(t){this.readCertHex(c(t))},this.readCertHex=function(t){this.hex=t,this.getVersion();try{o(this.hex,0,[0,7],"a3"),this.parseExt()}catch(t){}},this.getInfo=function(){var t,e,n;if(t="Basic Fields\n",t+="  serial number: "+this.getSerialNumberHex()+"\n",t+="  signature algorithm: "+this.getSignatureAlgorithmField()+"\n",t+="  issuer: "+this.getIssuerString()+"\n",t+="  notBefore: "+this.getNotBefore()+"\n",t+="  notAfter: "+this.getNotAfter()+"\n",t+="  subject: "+this.getSubjectString()+"\n",t+="  subject public key info: \n",e=this.getPublicKey(),t+="    key algorithm: "+e.type+"\n","RSA"===e.type&&(t+="    n="+Mn(e.n.toString(16)).substr(0,16)+"...\n",t+="    e="+Mn(e.e.toString(16))+"\n"),void 0!==(n=this.aExtInfo)&&null!==n){t+="X509v3 Extensions:\n";for(var r=0;r<n.length;r++){var i=n[r],s=yr.asn1.x509.OID.oid2name(i.oid);""===s&&(s=i.oid);var o="";if(!0===i.critical&&(o="CRITICAL"),t+="  "+s+" "+o+":\n","basicConstraints"===s){var a=this.getExtBasicConstraints();void 0===a.cA?t+="    {}\n":(t+="    cA=true",void 0!==a.pathLen&&(t+=", pathLen="+a.pathLen),t+="\n")}else if("keyUsage"===s)t+="    "+this.getExtKeyUsageString()+"\n";else if("subjectKeyIdentifier"===s)t+="    "+this.getExtSubjectKeyIdentifier()+"\n";else if("authorityKeyIdentifier"===s){var u=this.getExtAuthorityKeyIdentifier();void 0!==u.kid&&(t+="    kid="+u.kid+"\n")}else if("extKeyUsage"===s){var l=this.getExtExtKeyUsageName();t+="    "+l.join(", ")+"\n"}else if("subjectAltName"===s){var c=this.getExtSubjectAltName2();t+="    "+c+"\n"}else if("cRLDistributionPoints"===s){var h=this.getExtCRLDistributionPointsURI();t+="    "+h+"\n"}else if("authorityInfoAccess"===s){var f=this.getExtAIAInfo();void 0!==f.ocsp&&(t+="    ocsp: "+f.ocsp.join(",")+"\n"),void 0!==f.caissuer&&(t+="    caissuer: "+f.caissuer.join(",")+"\n")}else if("certificatePolicies"===s)for(var d=this.getExtCertificatePolicies(),p=0;p<d.length;p++)void 0!==d[p].id&&(t+="    policy oid: "+d[p].id+"\n"),void 0!==d[p].cps&&(t+="    cps: "+d[p].cps+"\n")}}return t+="signature algorithm: "+this.getSignatureAlgorithmName()+"\n",t+="signature: "+this.getSignatureValueHex().substr(0,16)+"...\n"}}var Yn={};Yn.userAgent=!1;var Jn={};if(void 0===Gn)var Gn={};Gn.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var i;for(i in n)t.prototype[i]=n[i];var s=function(){},o=["toString","valueOf"];try{/MSIE/.test(Yn.userAgent)&&(s=function(t,e){for(i=0;i<o.length;i+=1){var n=o[i],r=e[n];"function"===typeof r&&r!=Object.prototype[n]&&(t[n]=r)}})}catch(t){}s(t.prototype,n)}}};var $n=$n||function(t,e){var n={},r=n.lib={},i=r.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var n=new t;return e&&n.mixIn(e),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=r.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var s=0;s<i;s++){var o=n[s>>>2]>>>24-s%4*8&255;e[r+s>>>2]|=o<<24-(r+s)%4*8}else for(var s=0;s<i;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n=[],r=0;r<e;r+=4)n.push(4294967296*t.random()|0);return new s.init(n,e)}}),o=n.enc={},a=o.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var s=e[i>>>2]>>>24-i%4*8&255;r.push((s>>>4).toString(16)),r.push((15&s).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new s.init(n,e/2)}},u=o.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var s=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new s.init(n,e)}},l=o.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},c=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=4*o,u=i/a;u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0);var l=u*o,c=t.min(4*l,i);if(l){for(var h=0;h<l;h+=o)this._doProcessBlock(r,h);var f=r.splice(0,l);n.sigBytes-=c}return new s.init(f,c)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(r.Hasher=c.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new h.HMAC.init(t,n).finalize(e)}}}),n.algo={});return n}(Math);!function(t){var e=$n,n=e.lib,r=n.Base,i=n.WordArray,e=e.x64={};e.Word=r.extend({init:function(t,e){this.high=t,this.low=e}}),e.WordArray=r.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r<e;r++){var s=t[r];n.push(s.high),n.push(s.low)}return i.create(n,this.sigBytes)},clone:function(){for(var t=r.clone.call(this),e=t.words=this.words.slice(0),n=e.length,i=0;i<n;i++)e[i]=e[i].clone();return t}})}(),$n.lib.Cipher||function(t){var e=$n,n=e.lib,r=n.Base,i=n.WordArray,s=n.BufferedBlockAlgorithm,o=e.enc.Base64,a=e.algo.EvpKDF,u=n.Cipher=s.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,n,r){return("string"==typeof n?p:d).encrypt(t,e,n,r)},decrypt:function(e,n,r){return("string"==typeof n?p:d).decrypt(t,e,n,r)}}}});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=e.mode={},c=function(t,e,n){var r=this._iv;r?this._iv=void 0:r=this._prevBlock;for(var i=0;i<n;i++)t[e+i]^=r[i]},h=(n.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}})).extend();h.Encryptor=h.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize;c.call(this,t,e,r),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+r)}}),h.Decryptor=h.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=t.slice(e,e+r);n.decryptBlock(t,e),c.call(this,t,e,r),this._prevBlock=i}}),l=l.CBC=h,h=(e.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,n=n-t.sigBytes%n,r=n<<24|n<<16|n<<8|n,s=[],o=0;o<n;o+=4)s.push(r);n=i.create(s,n),t.concat(n)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:l,padding:h}),reset:function(){u.reset.call(this);var t=this.cfg,e=t.iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4});var f=n.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),l=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return t=t.salt,(t?i.create([1398893684,1701076831]).concat(t).concat(e):e).toString(o)},parse:function(t){t=o.parse(t);var e=t.words;if(1398893684==e[0]&&1701076831==e[1]){var n=i.create(e.slice(2,4));e.splice(0,4),t.sigBytes-=16}return f.create({ciphertext:t,salt:n})}},d=n.SerializableCipher=r.extend({cfg:r.extend({format:l}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r);return e=i.finalize(e),i=i.cfg,f.create({ciphertext:e,key:n,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),e=(e.kdf={}).OpenSSL={execute:function(t,e,n,r){return r||(r=i.random(8)),t=a.create({keySize:e+n}).compute(t,r),n=i.create(t.words.slice(e),4*n),t.sigBytes=4*e,f.create({key:t,iv:n,salt:r})}},p=n.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:e}),encrypt:function(t,e,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,t.keySize,t.ivSize),r.iv=n.iv,t=d.encrypt.call(this,t,e,n.key,r),t.mixIn(n),t},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),n=r.kdf.execute(n,t.keySize,t.ivSize,e.salt),r.iv=n.iv,d.decrypt.call(this,t,e,n.key,r)}})}(),function(){for(var t=$n,e=t.lib.BlockCipher,n=t.algo,r=[],i=[],s=[],o=[],a=[],u=[],l=[],c=[],h=[],f=[],d=[],p=0;256>p;p++)d[p]=128>p?p<<1:p<<1^283;for(var g=0,y=0,p=0;256>p;p++){var v=y^y<<1^y<<2^y<<3^y<<4,v=v>>>8^255&v^99;r[g]=v,i[v]=g;var m=d[g],b=d[m],S=d[b],w=257*d[v]^16843008*v;s[g]=w<<24|w>>>8,o[g]=w<<16|w>>>16,a[g]=w<<8|w>>>24,u[g]=w,w=16843009*S^65537*b^257*m^16843008*g,l[v]=w<<24|w>>>8,c[v]=w<<16|w>>>16,h[v]=w<<8|w>>>24,f[v]=w,g?(g=m^d[d[d[S^m]]],y^=d[d[y]]):g=y=1}var x=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes/4,t=4*((this._nRounds=n+6)+1),i=this._keySchedule=[],s=0;s<t;s++)if(s<n)i[s]=e[s];else{var o=i[s-1];s%n?6<n&&4==s%n&&(o=r[o>>>24]<<24|r[o>>>16&255]<<16|r[o>>>8&255]<<8|r[255&o]):(o=o<<8|o>>>24,o=r[o>>>24]<<24|r[o>>>16&255]<<16|r[o>>>8&255]<<8|r[255&o],o^=x[s/n|0]<<24),i[s]=i[s-n]^o}for(e=this._invKeySchedule=[],n=0;n<t;n++)s=t-n,o=n%4?i[s]:i[s-4],e[n]=4>n||4>=s?o:l[r[o>>>24]]^c[r[o>>>16&255]]^h[r[o>>>8&255]]^f[r[255&o]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,o,a,u,r)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,l,c,h,f,i),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,s,o,a){for(var u=this._nRounds,l=t[e]^n[0],c=t[e+1]^n[1],h=t[e+2]^n[2],f=t[e+3]^n[3],d=4,p=1;p<u;p++)var g=r[l>>>24]^i[c>>>16&255]^s[h>>>8&255]^o[255&f]^n[d++],y=r[c>>>24]^i[h>>>16&255]^s[f>>>8&255]^o[255&l]^n[d++],v=r[h>>>24]^i[f>>>16&255]^s[l>>>8&255]^o[255&c]^n[d++],f=r[f>>>24]^i[l>>>16&255]^s[c>>>8&255]^o[255&h]^n[d++],l=g,c=y,h=v;g=(a[l>>>24]<<24|a[c>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[d++],y=(a[c>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&l])^n[d++],v=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[l>>>8&255]<<8|a[255&c])^n[d++],f=(a[f>>>24]<<24|a[l>>>16&255]<<16|a[c>>>8&255]<<8|a[255&h])^n[d++],t[e]=g,t[e+1]=y,t[e+2]=v,t[e+3]=f},keySize:8});t.AES=e._createHelper(n)}(),function(){function t(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<<t}function e(t,e){var n=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<<t}var n=$n,r=n.lib,i=r.WordArray,r=r.BlockCipher,s=n.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],c=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=s.DES=r.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;56>n;n++){var r=o[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(t=this._subKeys=[],r=0;16>r;r++){for(var i=t[r]=[],s=u[r],n=0;24>n;n++)i[n/6|0]|=e[(a[n]-1+s)%28]<<31-n%6,i[4+(n/6|0)]|=e[28+(a[n+24]-1+s)%28]<<31-n%6;for(i[0]=i[0]<<1|i[0]>>>31,n=1;7>n;n++)i[n]>>>=4*(n-1)+3;i[7]=i[7]<<5|i[7]>>>27}for(e=this._invSubKeys=[],n=0;16>n;n++)e[n]=t[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(n,r,i){this._lBlock=n[r],this._rBlock=n[r+1],t.call(this,4,252645135),t.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),t.call(this,1,1431655765);for(var s=0;16>s;s++){for(var o=i[s],a=this._lBlock,u=this._rBlock,h=0,f=0;8>f;f++)h|=l[f][((u^o[f])&c[f])>>>0];this._lBlock=u,this._rBlock=a^h}i=this._lBlock,this._lBlock=this._rBlock,this._rBlock=i,t.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),t.call(this,16,65535),t.call(this,4,252645135),n[r]=this._lBlock,n[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});n.DES=r._createHelper(h),s=s.TripleDES=r.extend({_doReset:function(){var t=this._key.words;this._des1=h.createEncryptor(i.create(t.slice(0,2))),this._des2=h.createEncryptor(i.create(t.slice(2,4))),this._des3=h.createEncryptor(i.create(t.slice(4,6)))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2}),n.TripleDES=r._createHelper(s)}(),function(){var t=$n,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp(),t=[];for(var i=0;i<n;i+=3)for(var s=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,o=0;4>o&&i+.75*o<n;o++)t.push(r.charAt(s>>>6*(3-o)&63));if(e=r.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var n=t.length,r=this._map,i=r.charAt(64);i&&-1!=(i=t.indexOf(i))&&(n=i);for(var i=[],s=0,o=0;o<n;o++)if(o%4){var a=r.indexOf(t.charAt(o-1))<<o%4*2,u=r.indexOf(t.charAt(o))>>>6-o%4*2;i[s>>>2]|=(a|u)<<24-s%4*8,s++}return e.create(i,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){function e(t,e,n,r,i,s,o){return((t=t+(e&n|~e&r)+i+o)<<s|t>>>32-s)+e}function n(t,e,n,r,i,s,o){return((t=t+(e&r|n&~r)+i+o)<<s|t>>>32-s)+e}function r(t,e,n,r,i,s,o){return((t=t+(e^n^r)+i+o)<<s|t>>>32-s)+e}function i(t,e,n,r,i,s,o){return((t=t+(n^(e|~r))+i+o)<<s|t>>>32-s)+e}for(var s=$n,o=s.lib,a=o.WordArray,u=o.Hasher,o=s.algo,l=[],c=0;64>c;c++)l[c]=4294967296*t.abs(t.sin(c+1))|0;o=o.MD5=u.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,s){for(var o=0;16>o;o++){var a=s+o,u=t[a];t[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var o=this._hash.words,a=t[s+0],u=t[s+1],c=t[s+2],h=t[s+3],f=t[s+4],d=t[s+5],p=t[s+6],g=t[s+7],y=t[s+8],v=t[s+9],m=t[s+10],b=t[s+11],S=t[s+12],w=t[s+13],x=t[s+14],E=t[s+15],F=o[0],A=o[1],C=o[2],T=o[3],F=e(F,A,C,T,a,7,l[0]),T=e(T,F,A,C,u,12,l[1]),C=e(C,T,F,A,c,17,l[2]),A=e(A,C,T,F,h,22,l[3]),F=e(F,A,C,T,f,7,l[4]),T=e(T,F,A,C,d,12,l[5]),C=e(C,T,F,A,p,17,l[6]),A=e(A,C,T,F,g,22,l[7]),F=e(F,A,C,T,y,7,l[8]),T=e(T,F,A,C,v,12,l[9]),C=e(C,T,F,A,m,17,l[10]),A=e(A,C,T,F,b,22,l[11]),F=e(F,A,C,T,S,7,l[12]),T=e(T,F,A,C,w,12,l[13]),C=e(C,T,F,A,x,17,l[14]),A=e(A,C,T,F,E,22,l[15]),F=n(F,A,C,T,u,5,l[16]),T=n(T,F,A,C,p,9,l[17]),C=n(C,T,F,A,b,14,l[18]),A=n(A,C,T,F,a,20,l[19]),F=n(F,A,C,T,d,5,l[20]),T=n(T,F,A,C,m,9,l[21]),C=n(C,T,F,A,E,14,l[22]),A=n(A,C,T,F,f,20,l[23]),F=n(F,A,C,T,v,5,l[24]),T=n(T,F,A,C,x,9,l[25]),C=n(C,T,F,A,h,14,l[26]),A=n(A,C,T,F,y,20,l[27]),F=n(F,A,C,T,w,5,l[28]),T=n(T,F,A,C,c,9,l[29]),C=n(C,T,F,A,g,14,l[30]),A=n(A,C,T,F,S,20,l[31]),F=r(F,A,C,T,d,4,l[32]),T=r(T,F,A,C,y,11,l[33]),C=r(C,T,F,A,b,16,l[34]),A=r(A,C,T,F,x,23,l[35]),F=r(F,A,C,T,u,4,l[36]),T=r(T,F,A,C,f,11,l[37]),C=r(C,T,F,A,g,16,l[38]),A=r(A,C,T,F,m,23,l[39]),F=r(F,A,C,T,w,4,l[40]),T=r(T,F,A,C,a,11,l[41]),C=r(C,T,F,A,h,16,l[42]),A=r(A,C,T,F,p,23,l[43]),F=r(F,A,C,T,v,4,l[44]),T=r(T,F,A,C,S,11,l[45]),C=r(C,T,F,A,E,16,l[46]),A=r(A,C,T,F,c,23,l[47]),F=i(F,A,C,T,a,6,l[48]),T=i(T,F,A,C,g,10,l[49]),C=i(C,T,F,A,x,15,l[50]),A=i(A,C,T,F,d,21,l[51]),F=i(F,A,C,T,S,6,l[52]),T=i(T,F,A,C,h,10,l[53]),C=i(C,T,F,A,m,15,l[54]),A=i(A,C,T,F,u,21,l[55]),F=i(F,A,C,T,y,6,l[56]),T=i(T,F,A,C,E,10,l[57]),C=i(C,T,F,A,p,15,l[58]),A=i(A,C,T,F,w,21,l[59]),F=i(F,A,C,T,f,6,l[60]),T=i(T,F,A,C,b,10,l[61]),C=i(C,T,F,A,c,15,l[62]),A=i(A,C,T,F,v,21,l[63]);o[0]=o[0]+F|0,o[1]=o[1]+A|0,o[2]=o[2]+C|0,o[3]=o[3]+T|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var s=t.floor(r/4294967296);for(n[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(n.length+1),this._process(),e=this._hash,n=e.words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return e},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}}),s.MD5=u._createHelper(o),s.HmacMD5=u._createHmacHelper(o)}(Math),function(){var t=$n,e=t.lib,n=e.WordArray,r=e.Hasher,i=[],e=t.algo.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],s=n[1],o=n[2],a=n[3],u=n[4],l=0;80>l;l++){if(16>l)i[l]=0|t[e+l];else{var c=i[l-3]^i[l-8]^i[l-14]^i[l-16];i[l]=c<<1|c>>>31}c=(r<<5|r>>>27)+u+i[l],c=20>l?c+(1518500249+(s&o|~s&a)):40>l?c+(1859775393+(s^o^a)):60>l?c+((s&o|s&a|o&a)-1894007588):c+((s^o^a)-899497514),u=a,a=o,o=s<<30|s>>>2,s=r,r=c}n[0]=n[0]+r|0,n[1]=n[1]+s|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(e),t.HmacSHA1=r._createHmacHelper(e)}(),function(t){for(var e=$n,n=e.lib,r=n.WordArray,i=n.Hasher,n=e.algo,s=[],o=[],a=function(t){return 4294967296*(t-(0|t))|0},u=2,l=0;64>l;){var c;t:{c=u;for(var h=t.sqrt(c),f=2;f<=h;f++)if(!(c%f)){c=!1;break t}c=!0}c&&(8>l&&(s[l]=a(t.pow(u,.5))),o[l]=a(t.pow(u,1/3)),l++),u++}var d=[],n=n.SHA256=i.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],l=n[5],c=n[6],h=n[7],f=0;64>f;f++){if(16>f)d[f]=0|t[e+f];else{var p=d[f-15],g=d[f-2];d[f]=((p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3)+d[f-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+d[f-16]}p=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&l^~u&c)+o[f]+d[f],g=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&s^i&s),h=c,c=l,l=u,u=a+p|0,a=s,s=i,i=r,r=p+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+l|0,n[6]=n[6]+c|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(n),e.HmacSHA256=i._createHmacHelper(n)}(Math),function(){var t=$n,e=t.lib.WordArray,n=t.algo,r=n.SHA256,n=n.SHA224=r.extend({_doReset:function(){this._hash=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=r._doFinalize.call(this);return t.sigBytes-=4,t}});t.SHA224=r._createHelper(n),t.HmacSHA224=r._createHmacHelper(n)}(),function(){function t(){return i.create.apply(i,arguments)}for(var e=$n,n=e.lib.Hasher,r=e.x64,i=r.Word,s=r.WordArray,r=e.algo,o=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],a=[],u=0;80>u;u++)a[u]=t();r=r.SHA512=n.extend({_doReset:function(){this._hash=new s.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],u=n[3],l=n[4],c=n[5],h=n[6],n=n[7],f=r.high,d=r.low,p=i.high,g=i.low,y=s.high,v=s.low,m=u.high,b=u.low,S=l.high,w=l.low,x=c.high,E=c.low,F=h.high,A=h.low,C=n.high,T=n.low,P=f,D=d,I=p,k=g,N=y,R=v,B=m,_=b,H=S,O=w,j=x,L=E,V=F,M=A,U=C,K=T,q=0;80>q;q++){var z=a[q];if(16>q)var W=z.high=0|t[e+2*q],Y=z.low=0|t[e+2*q+1];else{var W=a[q-15],Y=W.high,J=W.low,W=(Y>>>1|J<<31)^(Y>>>8|J<<24)^Y>>>7,J=(J>>>1|Y<<31)^(J>>>8|Y<<24)^(J>>>7|Y<<25),G=a[q-2],Y=G.high,$=G.low,G=(Y>>>19|$<<13)^(Y<<3|$>>>29)^Y>>>6,$=($>>>19|Y<<13)^($<<3|Y>>>29)^($>>>6|Y<<26),Y=a[q-7],X=Y.high,Z=a[q-16],Q=Z.high,Z=Z.low,Y=J+Y.low,W=W+X+(Y>>>0<J>>>0?1:0),Y=Y+$,W=W+G+(Y>>>0<$>>>0?1:0),Y=Y+Z,W=W+Q+(Y>>>0<Z>>>0?1:0);z.high=W,z.low=Y}var X=H&j^~H&V,Z=O&L^~O&M,z=P&I^P&N^I&N,tt=D&k^D&R^k&R,J=(P>>>28|D<<4)^(P<<30|D>>>2)^(P<<25|D>>>7),G=(D>>>28|P<<4)^(D<<30|P>>>2)^(D<<25|P>>>7),$=o[q],et=$.high,nt=$.low,$=K+((O>>>14|H<<18)^(O>>>18|H<<14)^(O<<23|H>>>9)),Q=U+((H>>>14|O<<18)^(H>>>18|O<<14)^(H<<23|O>>>9))+($>>>0<K>>>0?1:0),$=$+Z,Q=Q+X+($>>>0<Z>>>0?1:0),$=$+nt,Q=Q+et+($>>>0<nt>>>0?1:0),$=$+Y,Q=Q+W+($>>>0<Y>>>0?1:0),Y=G+tt,z=J+z+(Y>>>0<G>>>0?1:0),U=V,K=M,V=j,M=L,j=H,L=O,O=_+$|0,H=B+Q+(O>>>0<_>>>0?1:0)|0,B=N,_=R,N=I,R=k,I=P,k=D,D=$+Y|0,P=Q+z+(D>>>0<$>>>0?1:0)|0}d=r.low=d+D,r.high=f+P+(d>>>0<D>>>0?1:0),g=i.low=g+k,i.high=p+I+(g>>>0<k>>>0?1:0),v=s.low=v+R,s.high=y+N+(v>>>0<R>>>0?1:0),b=u.low=b+_,u.high=m+B+(b>>>0<_>>>0?1:0),w=l.low=w+O,l.high=S+H+(w>>>0<O>>>0?1:0),E=c.low=E+L,c.high=x+j+(E>>>0<L>>>0?1:0),A=h.low=A+M,h.high=F+V+(A>>>0<M>>>0?1:0),T=n.low=T+K,n.high=C+U+(T>>>0<K>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=n._createHelper(r),e.HmacSHA512=n._createHmacHelper(r)}(),function(){var t=$n,e=t.x64,n=e.Word,r=e.WordArray,e=t.algo,i=e.SHA512,e=e.SHA384=i.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=i._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=i._createHelper(e),t.HmacSHA384=i._createHmacHelper(e)}(),function(){var t=$n,e=t.lib,n=e.WordArray,r=e.Hasher,e=t.algo,i=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),o=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),a=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),l=n.create([1352829926,1548603684,1836072691,2053994217,0]),e=e.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;16>n;n++){var r=e+n,c=t[r];t[r]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var h,f,d,p,g,y,v,m,b,S,r=this._hash.words,c=u.words,w=l.words,x=i.words,E=s.words,F=o.words,A=a.words;y=h=r[0],v=f=r[1],m=d=r[2],b=p=r[3],S=g=r[4];for(var C,n=0;80>n;n+=1)C=h+t[e+x[n]]|0,C=16>n?C+((f^d^p)+c[0]):32>n?C+((f&d|~f&p)+c[1]):48>n?C+(((f|~d)^p)+c[2]):64>n?C+((f&p|d&~p)+c[3]):C+((f^(d|~p))+c[4]),C|=0,C=C<<F[n]|C>>>32-F[n],C=C+g|0,h=g,g=p,p=d<<10|d>>>22,d=f,f=C,C=y+t[e+E[n]]|0,C=16>n?C+((v^(m|~b))+w[0]):32>n?C+((v&b|m&~b)+w[1]):48>n?C+(((v|~m)^b)+w[2]):64>n?C+((v&m|~v&b)+w[3]):C+((v^m^b)+w[4]),C|=0,C=C<<A[n]|C>>>32-A[n],C=C+S|0,y=S,S=b,b=m<<10|m>>>22,m=v,v=C;C=r[1]+d+b|0,r[1]=r[2]+p+S|0,r[2]=r[3]+g+y|0,r[3]=r[4]+h+v|0,r[4]=r[0]+f+m|0,r[0]=C},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;for(e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process(),t=this._hash,e=t.words,n=0;5>n;n++)r=e[n],e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return t},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.RIPEMD160=r._createHelper(e),t.HmacRIPEMD160=r._createHmacHelper(e)}(Math),function(){var t=$n,e=t.enc.Utf8;t.algo.HMAC=t.lib.Base.extend({init:function(t,n){t=this._hasher=new t.init,"string"==typeof n&&(n=e.parse(n));var r=t.blockSize,i=4*r;n.sigBytes>i&&(n=t.finalize(n)),n.clamp();for(var s=this._oKey=n.clone(),o=this._iKey=n.clone(),a=s.words,u=o.words,l=0;l<r;l++)a[l]^=1549556828,u[l]^=909522486;s.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher;return t=e.finalize(t),e.reset(),e.finalize(this._oKey.clone().concat(t))}})}(),function(){var t=$n,e=t.lib,n=e.Base,r=e.WordArray,e=t.algo,i=e.HMAC,s=e.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:e.SHA1,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,s=i.create(n.hasher,t),o=r.create(),a=r.create([1]),u=o.words,l=a.words,c=n.keySize,n=n.iterations;u.length<c;){var h=s.update(e).finalize(a);s.reset();for(var f=h.words,d=f.length,p=h,g=1;g<n;g++){p=s.finalize(p),s.reset();for(var y=p.words,v=0;v<d;v++)f[v]^=y[v]}o.concat(h),l[0]++}return o.sigBytes=4*c,o}});t.PBKDF2=function(t,e,n){return s.create(n).compute(t,e)}}();var Xn,Zn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn="=";"Microsoft Internet Explorer"==Yn.appName?(s.prototype.am=u,Xn=30):"Netscape"!=Yn.appName?(s.prototype.am=a,Xn=26):(s.prototype.am=l,Xn=28),s.prototype.DB=Xn,s.prototype.DM=(1<<Xn)-1,s.prototype.DV=1<<Xn;s.prototype.FV=Math.pow(2,52),s.prototype.F1=52-Xn,s.prototype.F2=2*Xn-52;var tr,er,nr="0123456789abcdefghijklmnopqrstuvwxyz",rr=new Array;for(tr="0".charCodeAt(0),er=0;er<=9;++er)rr[tr++]=er;for(tr="a".charCodeAt(0),er=10;er<36;++er)rr[tr++]=er;for(tr="A".charCodeAt(0),er=10;er<36;++er)rr[tr++]=er;N.prototype.convert=R,N.prototype.revert=B,N.prototype.reduce=_,N.prototype.mulTo=H,N.prototype.sqrTo=O,L.prototype.convert=V,L.prototype.revert=M,L.prototype.reduce=U,L.prototype.mulTo=q,L.prototype.sqrTo=K,s.prototype.copyTo=f,s.prototype.fromInt=d,s.prototype.fromString=g,s.prototype.clamp=y,s.prototype.dlShiftTo=E,s.prototype.drShiftTo=F,s.prototype.lShiftTo=A,s.prototype.rShiftTo=C,s.prototype.subTo=T,s.prototype.multiplyTo=P,s.prototype.squareTo=D,s.prototype.divRemTo=I,s.prototype.invDigit=j,s.prototype.isEven=z,s.prototype.exp=W,s.prototype.toString=v,s.prototype.negate=m,s.prototype.abs=b,s.prototype.compareTo=S,s.prototype.bitLength=x,s.prototype.mod=k,s.prototype.modPowInt=Y,s.ZERO=p(0),s.ONE=p(1),jt.prototype.convert=Lt,jt.prototype.revert=Lt,jt.prototype.mulTo=Vt,jt.prototype.sqrTo=Mt,zt.prototype.convert=Wt,zt.prototype.revert=Yt,zt.prototype.reduce=Jt,zt.prototype.mulTo=$t,zt.prototype.sqrTo=Gt;var ir=[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,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],sr=(1<<26)/ir[ir.length-1];s.prototype.chunkSize=Z,s.prototype.toRadix=tt,s.prototype.fromRadix=et,s.prototype.fromNumber=nt,s.prototype.bitwiseTo=at,s.prototype.changeBit=Ft,s.prototype.addTo=Pt,s.prototype.dMultiply=Ht,s.prototype.dAddOffset=Ot,s.prototype.multiplyLowerTo=Kt,s.prototype.multiplyUpperTo=qt,s.prototype.modInt=Qt,s.prototype.millerRabin=ne,s.prototype.clone=J,s.prototype.intValue=G,s.prototype.byteValue=$,s.prototype.shortValue=X,s.prototype.signum=Q,s.prototype.toByteArray=rt,s.prototype.equals=it,s.prototype.min=st,s.prototype.max=ot,s.prototype.and=lt,s.prototype.or=ht,s.prototype.xor=dt,s.prototype.andNot=gt,s.prototype.not=yt,s.prototype.shiftLeft=vt,s.prototype.shiftRight=mt,s.prototype.getLowestSetBit=St,s.prototype.bitCount=xt,s.prototype.testBit=Et,s.prototype.setBit=At,s.prototype.clearBit=Ct,s.prototype.flipBit=Tt,s.prototype.add=Dt,s.prototype.subtract=It,s.prototype.multiply=kt,s.prototype.divide=Rt,s.prototype.remainder=Bt,s.prototype.divideAndRemainder=_t,s.prototype.modPow=Xt,s.prototype.modInverse=te,s.prototype.pow=Ut,s.prototype.gcd=Zt,s.prototype.isProbablePrime=ee,s.prototype.square=Nt,re.prototype.init=ie,re.prototype.next=se;var or,ar,ur,lr=256;if(null==ar){ar=new Array,ur=0;var cr;if(void 0!==Jn&&(void 0!==Jn.crypto||void 0!==Jn.msCrypto)){var hr=Jn.crypto||Jn.msCrypto;if(hr.getRandomValues){var fr=new Uint8Array(32);for(hr.getRandomValues(fr),cr=0;cr<32;++cr)ar[ur++]=fr[cr]}else if("Netscape"==Yn.appName&&Yn.appVersion<"5"){var dr=Jn.crypto.random(32);for(cr=0;cr<dr.length;++cr)ar[ur++]=255&dr.charCodeAt(cr)}}for(;ur<lr;)cr=Math.floor(65536*Math.random()),ar[ur++]=cr>>>8,ar[ur++]=255&cr;ur=0,ue()}he.prototype.nextBytes=ce,ye.prototype.doPublic=me,ye.prototype.setPublic=ve,ye.prototype.encrypt=be,ye.prototype.encryptOAEP=Se,ye.prototype.type="RSA",ye.prototype.doPrivate=Te,ye.prototype.setPrivate=Fe,ye.prototype.setPrivateEx=Ae,ye.prototype.generate=Ce,ye.prototype.decrypt=Pe,ye.prototype.decryptOAEP=De,Ie.prototype.equals=ke,Ie.prototype.toBigInteger=Ne,Ie.prototype.negate=Re,Ie.prototype.add=Be,Ie.prototype.subtract=_e,Ie.prototype.multiply=He,Ie.prototype.square=Oe,Ie.prototype.divide=je,Le.prototype.getX=Ve,Le.prototype.getY=Me,Le.prototype.equals=Ue,Le.prototype.isInfinity=Ke,Le.prototype.negate=qe,Le.prototype.add=ze,Le.prototype.twice=We,Le.prototype.multiply=Ye,Le.prototype.multiplyTwo=Je,Ge.prototype.getQ=$e,Ge.prototype.getA=Xe,Ge.prototype.getB=Ze,Ge.prototype.equals=Qe,Ge.prototype.getInfinity=tn,Ge.prototype.fromBigInteger=en,Ge.prototype.decodePointHex=nn,Ie.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},Le.prototype.getEncoded=function(t){var e=function(t,e){var n=t.toByteArrayUnsigned();if(e<n.length)n=n.slice(n.length-e);else for(;e>n.length;)n.unshift(0);return n},n=this.getX().toBigInteger(),r=this.getY().toBigInteger(),i=e(n,32);return t?r.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(e(r,32))),i},Le.decodeFrom=function(t,e){var n=(e[0],e.length-1),r=e.slice(1,1+n/2),i=e.slice(1+n/2,1+n);r.unshift(0),i.unshift(0);var o=new s(r),a=new s(i);return new Le(t,t.fromBigInteger(o),t.fromBigInteger(a))},Le.decodeFromHex=function(t,e){var n=(e.substr(0,2),e.length-2),r=e.substr(2,n/2),i=e.substr(2+n/2,n/2),o=new s(r,16),a=new s(i,16);return new Le(t,t.fromBigInteger(o),t.fromBigInteger(a))},Le.prototype.add2D=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;if(this.x.equals(t.x))return this.y.equals(t.y)?this.twice():this.curve.getInfinity();var e=t.x.subtract(this.x),n=t.y.subtract(this.y),r=n.divide(e),i=r.square().subtract(this.x).subtract(t.x),s=r.multiply(this.x.subtract(i)).subtract(this.y);return new Le(this.curve,i,s)},Le.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=this.curve.fromBigInteger(s.valueOf(2)),e=this.curve.fromBigInteger(s.valueOf(3)),n=this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(t)),r=n.square().subtract(this.x.multiply(t)),i=n.multiply(this.x.subtract(r)).subtract(this.y);return new Le(this.curve,r,i)},Le.prototype.multiply2D=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,n=t,r=n.multiply(new s("3")),i=this.negate(),o=this;for(e=r.bitLength()-2;e>0;--e){o=o.twice();var a=r.testBit(e);a!=n.testBit(e)&&(o=o.add2D(a?this:i))}return o},Le.prototype.isOnCurve=function(){var t=this.getX().toBigInteger(),e=this.getY().toBigInteger(),n=this.curve.getA().toBigInteger(),r=this.curve.getB().toBigInteger(),i=this.curve.getQ(),s=e.multiply(e).mod(i),o=t.multiply(t).multiply(t).add(n.multiply(t)).add(r).mod(i);return s.equals(o)},Le.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},Le.prototype.validate=function(){var t=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var e=this.getX().toBigInteger(),n=this.getY().toBigInteger();if(e.compareTo(s.ONE)<0||e.compareTo(t.subtract(s.ONE))>0)throw new Error("x coordinate out of bounds");if(n.compareTo(s.ONE)<0||n.compareTo(t.subtract(s.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(t).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var pr=function(){function t(t,e,n){return e?r[e]:String.fromCharCode(parseInt(n,16))}var e=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),n=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},i=new String(""),s=(Object,Array,Object.hasOwnProperty);return function(r,o){var a,u=r.match(e),l=u[0],c=!1;"{"===l?a={}:"["===l?a=[]:(a=[],c=!0);for(var h,f=[a],d=1-c,p=u.length;d<p;++d){l=u[d];var g;switch(l.charCodeAt(0)){default:g=f[0],g[h||g.length]=+l,h=void 0;break;case 34:if(l=l.substring(1,l.length-1),-1!==l.indexOf("\\")&&(l=l.replace(n,t)),g=f[0],!h){if(!(g instanceof Array)){h=l||i;break}h=g.length}g[h]=l,h=void 0;break;case 91:g=f[0],f.unshift(g[h||g.length]=[]),h=void 0;break;case 93:f.shift();break;case 102:g=f[0],g[h||g.length]=!1,h=void 0;break;case 110:g=f[0],g[h||g.length]=null,h=void 0;break;case 116:g=f[0],g[h||g.length]=!0,h=void 0;break;case 123:g=f[0],f.unshift(g[h||g.length]={}),h=void 0;break;case 125:f.shift()}}if(c){if(1!==f.length)throw new Error;a=a[0]}else if(f.length)throw new Error;if(o){var y=function(t,e){var n=t[e];if(n&&"object"===typeof n){var r=null;for(var i in n)if(s.call(n,i)&&n!==t){var a=y(n,i);void 0!==a?n[i]=a:(r||(r=[]),r.push(i))}if(r)for(var u=r.length;--u>=0;)delete n[r[u]]}return o.call(t,e,n)};a=y({"":a},"")}return a}}();"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.asn1&&yr.asn1||(yr.asn1={}),yr.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1),r=n.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",o=0;o<r;o++)i+="f";e=new s(i,16).xor(t).add(s.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return Fn(t,e)},this.newObject=function(t){var e=yr,n=e.asn1,r=n.DERBoolean,i=n.DERInteger,s=n.DERBitString,o=n.DEROctetString,a=n.DERNull,u=n.DERObjectIdentifier,l=n.DEREnumerated,c=n.DERUTF8String,h=n.DERNumericString,f=n.DERPrintableString,d=n.DERTeletexString,p=n.DERIA5String,g=n.DERUTCTime,y=n.DERGeneralizedTime,v=n.DERSequence,m=n.DERSet,b=n.DERTaggedObject,S=n.ASN1Util.newObject,w=Object.keys(t);if(1!=w.length)throw"key of param shall be only one.";var x=w[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+x+":"))throw"undefined key: "+x;if("bool"==x)return new r(t[x]);if("int"==x)return new i(t[x]);if("bitstr"==x)return new s(t[x]);if("octstr"==x)return new o(t[x]);if("null"==x)return new a(t[x]);if("oid"==x)return new u(t[x]);if("enum"==x)return new l(t[x]);if("utf8str"==x)return new c(t[x]);if("numstr"==x)return new h(t[x]);if("prnstr"==x)return new f(t[x]);if("telstr"==x)return new d(t[x]);if("ia5str"==x)return new p(t[x]);if("utctime"==x)return new g(t[x]);if("gentime"==x)return new y(t[x]);if("seq"==x){for(var E=t[x],F=[],A=0;A<E.length;A++){var C=S(E[A]);F.push(C)}return new v({array:F})}if("set"==x){for(var E=t[x],F=[],A=0;A<E.length;A++){var C=S(E[A]);F.push(C)}return new m({array:F})}if("tag"==x){var T=t[x];if("[object Array]"===Object.prototype.toString.call(T)&&3==T.length){var P=S(T[2]);return new b({tag:T[0],explicit:T[1],obj:P})}var D={};if(void 0!==T.explicit&&(D.explicit=T.explicit),void 0!==T.tag&&(D.tag=T.tag),void 0===T.obj)throw"obj shall be specified for 'tag'.";return D.obj=S(T.obj),new b(D)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},yr.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=Math.floor(n/40),i=n%40,e=r+"."+i,o="",a=2;a<t.length;a+=2){var u=parseInt(t.substr(a,2),16),l=("00000000"+u.toString(2)).slice(-8);if(o+=l.substr(1,7),"0"==l.substr(0,1)){e=e+"."+new s(o,2).toString(10),o=""}}return e},yr.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var n="",r=t.split("."),i=40*parseInt(r[0])+parseInt(r[1]);n+=e(i),r.splice(0,2);for(var o=0;o<r.length;o++)n+=function(t){var n="",r=new s(t,10),i=r.toString(2),o=7-i.length%7;7==o&&(o=0);for(var a="",u=0;u<o;u++)a+="0";i=a+i;for(var u=0;u<i.length-1;u+=7){var l=i.substr(u,7);u!=i.length-7&&(l="1"+l),n+=e(parseInt(l,2))}return n}(r[o]);return n},yr.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if("undefined"==typeof this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},yr.asn1.DERAbstractString=function(t){yr.asn1.DERAbstractString.superclass.constructor.call(this);this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=vn(this.s).toLowerCase()},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("string"==typeof t?this.setString(t):"undefined"!=typeof t.str?this.setString(t.str):"undefined"!=typeof t.hex&&this.setStringHex(t.hex))},Gn.lang.extend(yr.asn1.DERAbstractString,yr.asn1.ASN1Object),yr.asn1.DERAbstractTime=function(t){yr.asn1.DERAbstractTime.superclass.constructor.call(this);this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),s=String(i.getFullYear());"utc"==e&&(s=s.substr(2,2));var o=r(String(i.getMonth()+1),2),a=r(String(i.getDate()),2),u=r(String(i.getHours()),2),l=r(String(i.getMinutes()),2),c=r(String(i.getSeconds()),2),h=s+o+a+u+l+c;if(!0===n){var f=i.getMilliseconds();if(0!=f){var d=r(String(f),3);d=d.replace(/[0]+$/,""),h=h+"."+d}}return h+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=an(t)},this.setByDateValue=function(t,e,n,r,i,s){var o=new Date(Date.UTC(t,e-1,n,r,i,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},Gn.lang.extend(yr.asn1.DERAbstractTime,yr.asn1.ASN1Object),yr.asn1.DERAbstractStructured=function(t){yr.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,"undefined"!=typeof t&&"undefined"!=typeof t.array&&(this.asn1Array=t.array)},Gn.lang.extend(yr.asn1.DERAbstractStructured,yr.asn1.ASN1Object),yr.asn1.DERBoolean=function(){yr.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},Gn.lang.extend(yr.asn1.DERBoolean,yr.asn1.ASN1Object),yr.asn1.DERInteger=function(t){yr.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=yr.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new s(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.bigint?this.setByBigInteger(t.bigint):"undefined"!=typeof t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):"undefined"!=typeof t.hex&&this.setValueHex(t.hex))},Gn.lang.extend(yr.asn1.DERInteger,yr.asn1.ASN1Object),yr.asn1.DERBitString=function(t){if(void 0!==t&&"undefined"!==typeof t.obj){var e=yr.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}yr.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var e=8-t.length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";for(var r="",n=0;n<t.length-1;n+=8){var i=t.substr(n,8),s=parseInt(i,2).toString(16);1==s.length&&(s="0"+s),r+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):"undefined"!=typeof t.hex?this.setHexValueIncludingUnusedBits(t.hex):"undefined"!=typeof t.bin?this.setByBinaryString(t.bin):"undefined"!=typeof t.array&&this.setByBooleanArray(t.array))},Gn.lang.extend(yr.asn1.DERBitString,yr.asn1.ASN1Object),yr.asn1.DEROctetString=function(t){if(void 0!==t&&"undefined"!==typeof t.obj){var e=yr.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}yr.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},Gn.lang.extend(yr.asn1.DEROctetString,yr.asn1.DERAbstractString),yr.asn1.DERNull=function(){yr.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},Gn.lang.extend(yr.asn1.DERNull,yr.asn1.ASN1Object),yr.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new s(t,10),i=r.toString(2),o=7-i.length%7;7==o&&(o=0);for(var a="",u=0;u<o;u++)a+="0";i=a+i;for(var u=0;u<i.length-1;u+=7){var l=i.substr(u,7);u!=i.length-7&&(l="1"+l),n+=e(parseInt(l,2))}return n};yr.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),s=40*parseInt(i[0])+parseInt(i[1]);r+=e(s),i.splice(0,2);for(var o=0;o<i.length;o++)r+=n(i[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=yr.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"===typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},Gn.lang.extend(yr.asn1.DERObjectIdentifier,yr.asn1.ASN1Object),yr.asn1.DEREnumerated=function(t){yr.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=yr.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new s(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):"undefined"!=typeof t.hex&&this.setValueHex(t.hex))},Gn.lang.extend(yr.asn1.DEREnumerated,yr.asn1.ASN1Object),yr.asn1.DERUTF8String=function(t){yr.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},Gn.lang.extend(yr.asn1.DERUTF8String,yr.asn1.DERAbstractString),yr.asn1.DERNumericString=function(t){yr.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},Gn.lang.extend(yr.asn1.DERNumericString,yr.asn1.DERAbstractString),yr.asn1.DERPrintableString=function(t){yr.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},Gn.lang.extend(yr.asn1.DERPrintableString,yr.asn1.DERAbstractString),yr.asn1.DERTeletexString=function(t){yr.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},Gn.lang.extend(yr.asn1.DERTeletexString,yr.asn1.DERAbstractString),yr.asn1.DERIA5String=function(t){yr.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},Gn.lang.extend(yr.asn1.DERIA5String,yr.asn1.DERAbstractString),yr.asn1.DERUTCTime=function(t){yr.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=an(this.s)},this.getFreshValueHex=function(){return"undefined"==typeof this.date&&"undefined"==typeof this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=an(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},Gn.lang.extend(yr.asn1.DERUTCTime,yr.asn1.DERAbstractTime),yr.asn1.DERGeneralizedTime=function(t){yr.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=an(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=an(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},Gn.lang.extend(yr.asn1.DERGeneralizedTime,yr.asn1.DERAbstractTime),yr.asn1.DERSequence=function(t){yr.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},Gn.lang.extend(yr.asn1.DERSequence,yr.asn1.DERAbstractStructured),yr.asn1.DERSet=function(t){yr.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},"undefined"!=typeof t&&"undefined"!=typeof t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},Gn.lang.extend(yr.asn1.DERSet,yr.asn1.DERAbstractStructured),yr.asn1.DERTaggedObject=function(t){yr.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.tag&&(this.hT=t.tag),"undefined"!=typeof t.explicit&&(this.isExplicit=t.explicit),"undefined"!=typeof t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},Gn.lang.extend(yr.asn1.DERTaggedObject,yr.asn1.ASN1Object);var gr=new function(){};gr.getLblen=function(t,e){if("8"!=t.substr(e+2,1))return 1;var n=parseInt(t.substr(e+3,1));return 0==n?-1:0<n&&n<10?n+1:-2},gr.getL=function(t,e){var n=gr.getLblen(t,e);return n<1?"":t.substr(e+2,2*n)},gr.getVblen=function(t,e){var n,r;return""==(n=gr.getL(t,e))?-1:(r="8"===n.substr(0,1)?new s(n.substr(2),16):new s(n,16),r.intValue())},gr.getVidx=function(t,e){var n=gr.getLblen(t,e);return n<0?n:e+2*(n+1)},gr.getV=function(t,e){var n=gr.getVidx(t,e),r=gr.getVblen(t,e);return t.substr(n,2*r)},gr.getTLV=function(t,e){return t.substr(e,2)+gr.getL(t,e)+gr.getV(t,e)},gr.getNextSiblingIdx=function(t,e){return gr.getVidx(t,e)+2*gr.getVblen(t,e)},gr.getChildIdx=function(t,e){var n=gr,r=new Array,i=n.getVidx(t,e);"03"==t.substr(e,2)?r.push(i+2):r.push(i);for(var s=n.getVblen(t,e),o=i,a=0;;){var u=n.getNextSiblingIdx(t,o);if(null==u||u-i>=2*s)break;if(a>=200)break;r.push(u),o=u,a++}return r},gr.getNthChildIdx=function(t,e,n){return gr.getChildIdx(t,e)[n]},gr.getIdxbyList=function(t,e,n,r){var i,s,o=gr;if(0==n.length){if(void 0!==r&&t.substr(e,2)!==r)throw"checking tag doesn't match: "+t.substr(e,2)+"!="+r;return e}return i=n.shift(),s=o.getChildIdx(t,e),o.getIdxbyList(t,s[i],n,r)},gr.getTLVbyList=function(t,e,n,r){var i=gr,s=i.getIdxbyList(t,e,n);if(void 0===s)throw"can't find nthList object";if(void 0!==r&&t.substr(s,2)!=r)throw"checking tag doesn't match: "+t.substr(s,2)+"!="+r;return i.getTLV(t,s)},gr.getVbyList=function(t,e,n,r,i){var s,o,a=gr;if(void 0===(s=a.getIdxbyList(t,e,n,r)))throw"can't find nthList object";return o=a.getV(t,s),!0===i&&(o=o.substr(2)),o},gr.hextooidstr=function(t){var e=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},n=[],r=t.substr(0,2),i=parseInt(r,16);n[0]=new String(Math.floor(i/40)),n[1]=new String(i%40);for(var s=t.substr(2),o=[],a=0;a<s.length/2;a++)o.push(parseInt(s.substr(2*a,2),16));for(var u=[],l="",a=0;a<o.length;a++)128&o[a]?l+=e((127&o[a]).toString(2),7):(l+=e((127&o[a]).toString(2),7),u.push(new String(parseInt(l,2))),l="");var c=n.join(".");return u.length>0&&(c=c+"."+u.join(".")),c},gr.dump=function(t,e,n,r){var i=gr,s=i.getV,o=i.dump,a=i.getChildIdx,u=t;t instanceof yr.asn1.ASN1Object&&(u=t.getEncodedHex());var l=function(t,e){return t.length<=2*e?t:t.substr(0,e)+"..(total "+t.length/2+"bytes).."+t.substr(t.length-e,e)};void 0===e&&(e={ommit_long_octet:32}),void 0===n&&(n=0),void 0===r&&(r="");var c=e.ommit_long_octet;if("01"==u.substr(n,2)){var h=s(u,n);return"00"==h?r+"BOOLEAN FALSE\n":r+"BOOLEAN TRUE\n"}if("02"==u.substr(n,2)){var h=s(u,n);return r+"INTEGER "+l(h,c)+"\n"}if("03"==u.substr(n,2)){var h=s(u,n);return r+"BITSTRING "+l(h,c)+"\n"}if("04"==u.substr(n,2)){var h=s(u,n);if(i.isASN1HEX(h)){var f=r+"OCTETSTRING, encapsulates\n";return f+=o(h,e,0,r+"  ")}return r+"OCTETSTRING "+l(h,c)+"\n"}if("05"==u.substr(n,2))return r+"NULL\n";if("06"==u.substr(n,2)){var d=s(u,n),p=yr.asn1.ASN1Util.oidHexToInt(d),g=yr.asn1.x509.OID.oid2name(p),y=p.replace(/\./g," ");return""!=g?r+"ObjectIdentifier "+g+" ("+y+")\n":r+"ObjectIdentifier ("+y+")\n"}if("0c"==u.substr(n,2))return r+"UTF8String '"+mn(s(u,n))+"'\n";if("13"==u.substr(n,2))return r+"PrintableString '"+mn(s(u,n))+"'\n";if("14"==u.substr(n,2))return r+"TeletexString '"+mn(s(u,n))+"'\n";if("16"==u.substr(n,2))return r+"IA5String '"+mn(s(u,n))+"'\n";if("17"==u.substr(n,2))return r+"UTCTime "+mn(s(u,n))+"\n";if("18"==u.substr(n,2))return r+"GeneralizedTime "+mn(s(u,n))+"\n";if("30"==u.substr(n,2)){if("3000"==u.substr(n,4))return r+"SEQUENCE {}\n";var f=r+"SEQUENCE\n",v=a(u,n),m=e;if((2==v.length||3==v.length)&&"06"==u.substr(v[0],2)&&"04"==u.substr(v[v.length-1],2)){var g=i.oidname(s(u,v[0])),b=JSON.parse(JSON.stringify(e));b.x509ExtName=g,m=b}for(var S=0;S<v.length;S++)f+=o(u,m,v[S],r+"  ");return f}if("31"==u.substr(n,2)){for(var f=r+"SET\n",v=a(u,n),S=0;S<v.length;S++)f+=o(u,e,v[S],r+"  ");return f}var w=parseInt(u.substr(n,2),16);if(0!=(128&w)){var x=31&w;if(0!=(32&w)){for(var f=r+"["+x+"]\n",v=a(u,n),S=0;S<v.length;S++)f+=o(u,e,v[S],r+"  ");return f}var h=s(u,n);"68747470"==h.substr(0,8)&&(h=mn(h)),"subjectAltName"===e.x509ExtName&&2==x&&(h=mn(h));var f=r+"["+x+"] "+h+"\n";return f}return r+"UNKNOWN("+u.substr(n,2)+") "+s(u,n)+"\n"},gr.isASN1HEX=function(t){var e=gr;if(t.length%2==1)return!1;var n=e.getVblen(t,0),r=t.substr(0,2),i=e.getL(t,0);return t.length-r.length-i.length==2*n},gr.oidname=function(t){var e=yr.asn1;yr.lang.String.isHex(t)&&(t=e.ASN1Util.oidHexToInt(t));var n=e.x509.OID.oid2name(t);return""===n&&(n=t),n},"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.asn1&&yr.asn1||(yr.asn1={}),"undefined"!=typeof yr.asn1.x509&&yr.asn1.x509||(yr.asn1.x509={}),yr.asn1.x509.Certificate=function(t){yr.asn1.x509.Certificate.superclass.constructor.call(this);var e=yr,n=(e.crypto,e.asn1),r=n.DERSequence,i=n.DERBitString;this.sign=function(){this.asn1SignatureAlg=this.asn1TBSCert.asn1SignatureAlg;var t=new yr.crypto.Signature({alg:this.asn1SignatureAlg.nameAlg});t.init(this.prvKey),t.updateHex(this.asn1TBSCert.getEncodedHex()),this.hexSig=t.sign(),this.asn1Sig=new i({hex:"00"+this.hexSig});var e=new r({array:[this.asn1TBSCert,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=e.getEncodedHex(),this.isModified=!1},this.setSignatureHex=function(t){this.asn1SignatureAlg=this.asn1TBSCert.asn1SignatureAlg,this.hexSig=t,this.asn1Sig=new i({hex:"00"+this.hexSig});var e=new r({array:[this.asn1TBSCert,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=e.getEncodedHex(),this.isModified=!1},this.getEncodedHex=function(){if(0==this.isModified&&null!=this.hTLV)return this.hTLV;throw"not signed yet"},this.getPEMString=function(){return"-----BEGIN CERTIFICATE-----\r\n"+xn(this.getEncodedHex())+"\r\n-----END CERTIFICATE-----\r\n"},void 0!==t&&(void 0!==t.tbscertobj&&(this.asn1TBSCert=t.tbscertobj),void 0!==t.prvkeyobj&&(this.prvKey=t.prvkeyobj))},Gn.lang.extend(yr.asn1.x509.Certificate,yr.asn1.ASN1Object),yr.asn1.x509.TBSCertificate=function(t){yr.asn1.x509.TBSCertificate.superclass.constructor.call(this);var e=yr,n=e.asn1,r=n.DERSequence,i=n.DERInteger,s=n.DERTaggedObject,o=n.x509,a=o.Time,u=o.X500Name,l=o.SubjectPublicKeyInfo;this._initialize=function(){this.asn1Array=new Array,this.asn1Version=new s({obj:new i({int:2})}),this.asn1SerialNumber=null,this.asn1SignatureAlg=null,this.asn1Issuer=null,this.asn1NotBefore=null,this.asn1NotAfter=null,this.asn1Subject=null,this.asn1SubjPKey=null,this.extensionsArray=new Array},this.setSerialNumberByParam=function(t){this.asn1SerialNumber=new i(t)},this.setSignatureAlgByParam=function(t){this.asn1SignatureAlg=new o.AlgorithmIdentifier(t)},this.setIssuerByParam=function(t){this.asn1Issuer=new u(t)},this.setNotBeforeByParam=function(t){this.asn1NotBefore=new a(t)},this.setNotAfterByParam=function(t){this.asn1NotAfter=new a(t)},this.setSubjectByParam=function(t){this.asn1Subject=new u(t)},this.setSubjectPublicKey=function(t){this.asn1SubjPKey=new l(t)},this.setSubjectPublicKeyByGetKey=function(t){var e=Sr.getKey(t);this.asn1SubjPKey=new l(e)},this.appendExtension=function(t){this.extensionsArray.push(t)},this.appendExtensionByName=function(t,e){yr.asn1.x509.Extension.appendByNameToArray(t,e,this.extensionsArray)},this.getEncodedHex=function(){if(null==this.asn1NotBefore||null==this.asn1NotAfter)throw"notBefore and/or notAfter not set";var t=new r({array:[this.asn1NotBefore,this.asn1NotAfter]});if(this.asn1Array=new Array,this.asn1Array.push(this.asn1Version),this.asn1Array.push(this.asn1SerialNumber),this.asn1Array.push(this.asn1SignatureAlg),this.asn1Array.push(this.asn1Issuer),this.asn1Array.push(t),this.asn1Array.push(this.asn1Subject),this.asn1Array.push(this.asn1SubjPKey),this.extensionsArray.length>0){var e=new r({array:this.extensionsArray}),n=new s({explicit:!0,tag:"a3",obj:e});this.asn1Array.push(n)}var i=new r({array:this.asn1Array});return this.hTLV=i.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize()},Gn.lang.extend(yr.asn1.x509.TBSCertificate,yr.asn1.ASN1Object),yr.asn1.x509.Extension=function(t){yr.asn1.x509.Extension.superclass.constructor.call(this);var e=yr,n=e.asn1,r=n.DERObjectIdentifier,i=n.DEROctetString,s=(n.DERBitString,n.DERBoolean),o=n.DERSequence;this.getEncodedHex=function(){var t=new r({oid:this.oid}),e=new i({hex:this.getExtnValueHex()}),n=new Array;return n.push(t),this.critical&&n.push(new s),n.push(e),new o({array:n}).getEncodedHex()},this.critical=!1,void 0!==t&&void 0!==t.critical&&(this.critical=t.critical)},Gn.lang.extend(yr.asn1.x509.Extension,yr.asn1.ASN1Object),yr.asn1.x509.Extension.appendByNameToArray=function(t,e,n){var r=t.toLowerCase(),i=yr.asn1.x509;if("basicconstraints"==r){var s=new i.BasicConstraints(e);n.push(s)}else if("keyusage"==r){var s=new i.KeyUsage(e);n.push(s)}else if("crldistributionpoints"==r){var s=new i.CRLDistributionPoints(e);n.push(s)}else if("extkeyusage"==r){var s=new i.ExtKeyUsage(e);n.push(s)}else if("authoritykeyidentifier"==r){var s=new i.AuthorityKeyIdentifier(e);n.push(s)}else if("authorityinfoaccess"==r){var s=new i.AuthorityInfoAccess(e);n.push(s)}else if("subjectaltname"==r){var s=new i.SubjectAltName(e);n.push(s)}else{if("issueraltname"!=r)throw"unsupported extension name: "+t;var s=new i.IssuerAltName(e);n.push(s)}},yr.asn1.x509.KeyUsage=function(t){yr.asn1.x509.KeyUsage.superclass.constructor.call(this,t);var e=Wn.KEYUSAGE_NAME;if(this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.15",void 0!==t&&(void 0!==t.bin&&(this.asn1ExtnValue=new yr.asn1.DERBitString(t)),void 0!==t.names&&void 0!==t.names.length)){for(var n=t.names,r="000000000",i=0;i<n.length;i++)for(var s=0;s<e.length;s++)n[i]===e[s]&&(r=r.substring(0,s)+"1"+r.substring(s+1,r.length));this.asn1ExtnValue=new yr.asn1.DERBitString({bin:r})}},Gn.lang.extend(yr.asn1.x509.KeyUsage,yr.asn1.x509.Extension),yr.asn1.x509.BasicConstraints=function(t){yr.asn1.x509.BasicConstraints.superclass.constructor.call(this,t);this.getExtnValueHex=function(){var t=new Array;this.cA&&t.push(new yr.asn1.DERBoolean),this.pathLen>-1&&t.push(new yr.asn1.DERInteger({int:this.pathLen}));var e=new yr.asn1.DERSequence({array:t});return this.asn1ExtnValue=e,this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,void 0!==t&&(void 0!==t.cA&&(this.cA=t.cA),void 0!==t.pathLen&&(this.pathLen=t.pathLen))},Gn.lang.extend(yr.asn1.x509.BasicConstraints,yr.asn1.x509.Extension),yr.asn1.x509.CRLDistributionPoints=function(t){yr.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,t);var e=yr,n=e.asn1,r=n.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.setByDPArray=function(t){this.asn1ExtnValue=new n.DERSequence({array:t})},this.setByOneURI=function(t){var e=new r.GeneralNames([{uri:t}]),n=new r.DistributionPointName(e),i=new r.DistributionPoint({dpobj:n});this.setByDPArray([i])},this.oid="2.5.29.31",void 0!==t&&(void 0!==t.array?this.setByDPArray(t.array):void 0!==t.uri&&this.setByOneURI(t.uri))},Gn.lang.extend(yr.asn1.x509.CRLDistributionPoints,yr.asn1.x509.Extension),yr.asn1.x509.ExtKeyUsage=function(t){yr.asn1.x509.ExtKeyUsage.superclass.constructor.call(this,t);var e=yr,n=e.asn1;this.setPurposeArray=function(t){this.asn1ExtnValue=new n.DERSequence;for(var e=0;e<t.length;e++){var r=new n.DERObjectIdentifier(t[e]);this.asn1ExtnValue.appendASN1Object(r)}},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.37",void 0!==t&&void 0!==t.array&&this.setPurposeArray(t.array)},Gn.lang.extend(yr.asn1.x509.ExtKeyUsage,yr.asn1.x509.Extension),yr.asn1.x509.AuthorityKeyIdentifier=function(t){yr.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call(this,t);var e=yr,n=e.asn1,r=n.DERTaggedObject;this.asn1KID=null,this.asn1CertIssuer=null,this.asn1CertSN=null,this.getExtnValueHex=function(){var t=new Array;this.asn1KID&&t.push(new r({explicit:!1,tag:"80",obj:this.asn1KID})),this.asn1CertIssuer&&t.push(new r({explicit:!1,tag:"a1",obj:this.asn1CertIssuer})),this.asn1CertSN&&t.push(new r({explicit:!1,tag:"82",obj:this.asn1CertSN}));var e=new n.DERSequence({array:t});return this.asn1ExtnValue=e,this.asn1ExtnValue.getEncodedHex()},this.setKIDByParam=function(t){this.asn1KID=new yr.asn1.DEROctetString(t)},this.setCertIssuerByParam=function(t){this.asn1CertIssuer=new yr.asn1.x509.X500Name(t)},this.setCertSNByParam=function(t){this.asn1CertSN=new yr.asn1.DERInteger(t)},this.oid="2.5.29.35",void 0!==t&&(void 0!==t.kid&&this.setKIDByParam(t.kid),void 0!==t.issuer&&this.setCertIssuerByParam(t.issuer),void 0!==t.sn&&this.setCertSNByParam(t.sn))},Gn.lang.extend(yr.asn1.x509.AuthorityKeyIdentifier,yr.asn1.x509.Extension),yr.asn1.x509.AuthorityInfoAccess=function(t){yr.asn1.x509.AuthorityInfoAccess.superclass.constructor.call(this,t),this.setAccessDescriptionArray=function(t){for(var e=new Array,n=yr,r=n.asn1,i=r.DERSequence,s=0;s<t.length;s++){var o=new r.DERObjectIdentifier(t[s].accessMethod),a=new r.x509.GeneralName(t[s].accessLocation),u=new i({array:[o,a]});e.push(u)}this.asn1ExtnValue=new i({array:e})},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="1.3.6.1.5.5.7.1.1",void 0!==t&&void 0!==t.array&&this.setAccessDescriptionArray(t.array)},Gn.lang.extend(yr.asn1.x509.AuthorityInfoAccess,yr.asn1.x509.Extension),yr.asn1.x509.SubjectAltName=function(t){yr.asn1.x509.SubjectAltName.superclass.constructor.call(this,t),this.setNameArray=function(t){this.asn1ExtnValue=new yr.asn1.x509.GeneralNames(t)},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.17",void 0!==t&&void 0!==t.array&&this.setNameArray(t.array)},Gn.lang.extend(yr.asn1.x509.SubjectAltName,yr.asn1.x509.Extension),yr.asn1.x509.IssuerAltName=function(t){yr.asn1.x509.IssuerAltName.superclass.constructor.call(this,t),this.setNameArray=function(t){this.asn1ExtnValue=new yr.asn1.x509.GeneralNames(t)},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.18",void 0!==t&&void 0!==t.array&&this.setNameArray(t.array)},Gn.lang.extend(yr.asn1.x509.IssuerAltName,yr.asn1.x509.Extension),yr.asn1.x509.CRL=function(t){yr.asn1.x509.CRL.superclass.constructor.call(this);this.sign=function(){this.asn1SignatureAlg=this.asn1TBSCertList.asn1SignatureAlg,sig=new yr.crypto.Signature({alg:"SHA1withRSA",prov:"cryptojs/jsrsa"}),sig.init(this.prvKey),sig.updateHex(this.asn1TBSCertList.getEncodedHex()),this.hexSig=sig.sign(),this.asn1Sig=new yr.asn1.DERBitString({hex:"00"+this.hexSig});var t=new yr.asn1.DERSequence({array:[this.asn1TBSCertList,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=t.getEncodedHex(),this.isModified=!1},this.getEncodedHex=function(){if(0==this.isModified&&null!=this.hTLV)return this.hTLV;throw"not signed yet"},this.getPEMString=function(){return"-----BEGIN X509 CRL-----\r\n"+xn(this.getEncodedHex())+"\r\n-----END X509 CRL-----\r\n"},void 0!==t&&(void 0!==t.tbsobj&&(this.asn1TBSCertList=t.tbsobj),void 0!==t.prvkeyobj&&(this.prvKey=t.prvkeyobj))},Gn.lang.extend(yr.asn1.x509.CRL,yr.asn1.ASN1Object),yr.asn1.x509.TBSCertList=function(t){yr.asn1.x509.TBSCertList.superclass.constructor.call(this);var e=yr,n=e.asn1,r=n.DERSequence,i=n.x509,s=i.Time;this.setSignatureAlgByParam=function(t){this.asn1SignatureAlg=new i.AlgorithmIdentifier(t)},this.setIssuerByParam=function(t){this.asn1Issuer=new i.X500Name(t)},this.setThisUpdateByParam=function(t){this.asn1ThisUpdate=new s(t)},this.setNextUpdateByParam=function(t){this.asn1NextUpdate=new s(t)},this.addRevokedCert=function(t,e){var n={};void 0!=t&&null!=t&&(n.sn=t),void 0!=e&&null!=e&&(n.time=e);var r=new i.CRLEntry(n);this.aRevokedCert.push(r)},this.getEncodedHex=function(){if(this.asn1Array=new Array,null!=this.asn1Version&&this.asn1Array.push(this.asn1Version),this.asn1Array.push(this.asn1SignatureAlg),this.asn1Array.push(this.asn1Issuer),this.asn1Array.push(this.asn1ThisUpdate),null!=this.asn1NextUpdate&&this.asn1Array.push(this.asn1NextUpdate),this.aRevokedCert.length>0){var t=new r({array:this.aRevokedCert});this.asn1Array.push(t)}var e=new r({array:this.asn1Array});return this.hTLV=e.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize=function(){this.asn1Version=null,this.asn1SignatureAlg=null,this.asn1Issuer=null,this.asn1ThisUpdate=null,this.asn1NextUpdate=null,this.aRevokedCert=new Array},this._initialize()},Gn.lang.extend(yr.asn1.x509.TBSCertList,yr.asn1.ASN1Object),yr.asn1.x509.CRLEntry=function(t){yr.asn1.x509.CRLEntry.superclass.constructor.call(this);var e=yr,n=e.asn1;this.setCertSerial=function(t){this.sn=new n.DERInteger(t)},this.setRevocationDate=function(t){this.time=new n.x509.Time(t)},this.getEncodedHex=function(){var t=new n.DERSequence({array:[this.sn,this.time]});return this.TLV=t.getEncodedHex(),this.TLV},void 0!==t&&(void 0!==t.time&&this.setRevocationDate(t.time),void 0!==t.sn&&this.setCertSerial(t.sn))},Gn.lang.extend(yr.asn1.x509.CRLEntry,yr.asn1.ASN1Object),yr.asn1.x509.X500Name=function(t){yr.asn1.x509.X500Name.superclass.constructor.call(this),this.asn1Array=new Array;var e=yr,n=e.asn1,r=n.x509,i=An;if(this.setByString=function(t){var e=t.split("/");e.shift();for(var n=[],i=0;i<e.length;i++)if(e[i].match(/^[^=]+=.+$/))n.push(e[i]);else{var s=n.length-1;n[s]=n[s]+"/"+e[i]}for(var i=0;i<n.length;i++)this.asn1Array.push(new r.RDN({str:n[i]}))},this.setByLdapString=function(t){var e=r.X500Name.ldapToOneline(t);this.setByString(e)},this.setByObject=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=new yr.asn1.x509.RDN({str:e+"="+t[e]});this.asn1Array?this.asn1Array.push(n):this.asn1Array=[n]}},this.getEncodedHex=function(){if("string"==typeof this.hTLV)return this.hTLV;var t=new n.DERSequence({array:this.asn1Array});return this.hTLV=t.getEncodedHex(),this.hTLV},void 0!==t){if(void 0!==t.str?this.setByString(t.str):void 0!==t.ldapstr?this.setByLdapString(t.ldapstr):"object"===typeof t&&this.setByObject(t),void 0!==t.certissuer){var s=new Wn;s.hex=i(t.certissuer),this.hTLV=s.getIssuerHex()}if(void 0!==t.certsubject){var s=new Wn;s.hex=i(t.certsubject),this.hTLV=s.getSubjectHex()}}},Gn.lang.extend(yr.asn1.x509.X500Name,yr.asn1.ASN1Object),yr.asn1.x509.X500Name.onelineToLDAP=function(t){if("/"!==t.substr(0,1))throw"malformed input";t=t.substr(1);var e=t.split("/");return e.reverse(),e=e.map(function(t){return t.replace(/,/,"\\,")}),e.join(",")},yr.asn1.x509.X500Name.ldapToOneline=function(t){for(var e=t.split(","),n=!1,r=[],i=0;e.length>0;i++){var s=e.shift();if(!0===n){var o=r.pop(),a=(o+","+s).replace(/\\,/g,",");r.push(a),n=!1}else r.push(s);"\\"===s.substr(-1,1)&&(n=!0)}return r=r.map(function(t){return t.replace("/","\\/")}),r.reverse(),"/"+r.join("/")},yr.asn1.x509.RDN=function(t){yr.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=new Array,this.addByString=function(t){this.asn1Array.push(new yr.asn1.x509.AttributeTypeAndValue({str:t}))},this.addByMultiValuedString=function(t){for(var e=yr.asn1.x509.RDN.parseString(t),n=0;n<e.length;n++)this.addByString(e[n])},this.getEncodedHex=function(){var t=new yr.asn1.DERSet({array:this.asn1Array});return this.TLV=t.getEncodedHex(),this.TLV},void 0!==t&&void 0!==t.str&&this.addByMultiValuedString(t.str)},Gn.lang.extend(yr.asn1.x509.RDN,yr.asn1.ASN1Object),yr.asn1.x509.RDN.parseString=function(t){for(var e=t.split(/\+/),n=!1,r=[],i=0;e.length>0;i++){var s=e.shift();if(!0===n){var o=r.pop(),a=(o+"+"+s).replace(/\\\+/g,"+");r.push(a),n=!1}else r.push(s);"\\"===s.substr(-1,1)&&(n=!0)}for(var u=!1,l=[],i=0;r.length>0;i++){var s=r.shift();if(!0===u){var c=l.pop();if(s.match(/"$/)){var a=(c+"+"+s).replace(/^([^=]+)="(.*)"$/,"$1=$2");l.push(a),u=!1}else l.push(c+"+"+s)}else l.push(s);s.match(/^[^=]+="/)&&(u=!0)}return l},yr.asn1.x509.AttributeTypeAndValue=function(t){yr.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this);var e=yr,n=e.asn1;this.setByString=function(t){var e=t.match(/^([^=]+)=(.+)$/);if(!e)throw"malformed attrTypeAndValueStr: "+t;this.setByAttrTypeAndValueStr(e[1],e[2])},this.setByAttrTypeAndValueStr=function(t,e){this.typeObj=yr.asn1.x509.OID.atype2obj(t);var n="utf8";"C"==t&&(n="prn"),this.valueObj=this.getValueObj(n,e)},this.getValueObj=function(t,e){if("utf8"==t)return new n.DERUTF8String({str:e});if("prn"==t)return new n.DERPrintableString({str:e});if("tel"==t)return new n.DERTeletexString({str:e});if("ia5"==t)return new n.DERIA5String({str:e});throw"unsupported directory string type: type="+t+" value="+e},this.getEncodedHex=function(){var t=new n.DERSequence({array:[this.typeObj,this.valueObj]});return this.TLV=t.getEncodedHex(),this.TLV},void 0!==t&&void 0!==t.str&&this.setByString(t.str)},Gn.lang.extend(yr.asn1.x509.AttributeTypeAndValue,yr.asn1.ASN1Object),yr.asn1.x509.SubjectPublicKeyInfo=function(t){yr.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var e=yr,n=e.asn1,r=n.DERInteger,i=n.DERBitString,s=n.DERObjectIdentifier,o=n.DERSequence,a=n.ASN1Util.newObject,u=n.x509,l=u.AlgorithmIdentifier,c=e.crypto;c.ECDSA,c.DSA;this.getASN1Object=function(){if(null==this.asn1AlgId||null==this.asn1SubjPKey)throw"algId and/or subjPubKey not set";return new o({array:[this.asn1AlgId,this.asn1SubjPKey]})},this.getEncodedHex=function(){var t=this.getASN1Object();return this.hTLV=t.getEncodedHex(),this.hTLV},this.setPubKey=function(t){try{if(t instanceof ye){var e=a({seq:[{int:{bigint:t.n}},{int:{int:t.e}}]}),n=e.getEncodedHex();this.asn1AlgId=new l({name:"rsaEncryption"}),this.asn1SubjPKey=new i({hex:"00"+n})}}catch(t){}try{if(t instanceof yr.crypto.ECDSA){var o=new s({name:t.curveName});this.asn1AlgId=new l({name:"ecPublicKey",asn1params:o}),this.asn1SubjPKey=new i({hex:"00"+t.pubKeyHex})}}catch(t){}try{if(t instanceof yr.crypto.DSA){var o=new a({seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]});this.asn1AlgId=new l({name:"dsa",asn1params:o});var u=new r({bigint:t.y});this.asn1SubjPKey=new i({hex:"00"+u.getEncodedHex()})}}catch(t){}},void 0!==t&&this.setPubKey(t)},Gn.lang.extend(yr.asn1.x509.SubjectPublicKeyInfo,yr.asn1.ASN1Object),yr.asn1.x509.Time=function(t){yr.asn1.x509.Time.superclass.constructor.call(this);var e=yr,n=e.asn1,r=n.DERUTCTime,i=n.DERGeneralizedTime;this.setTimeParams=function(t){this.timeParams=t},this.getEncodedHex=function(){var t=null;return t=null!=this.timeParams?"utc"==this.type?new r(this.timeParams):new i(this.timeParams):"utc"==this.type?new r:new i,this.TLV=t.getEncodedHex(),this.TLV},this.type="utc",void 0!==t&&(void 0!==t.type?this.type=t.type:void 0!==t.str&&(t.str.match(/^[0-9]{12}Z$/)&&(this.type="utc"),t.str.match(/^[0-9]{14}Z$/)&&(this.type="gen")),this.timeParams=t)},Gn.lang.extend(yr.asn1.x509.Time,yr.asn1.ASN1Object),yr.asn1.x509.AlgorithmIdentifier=function(t){yr.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var e=yr,n=e.asn1;if(this.getEncodedHex=function(){if(null===this.nameAlg&&null===this.asn1Alg)throw"algorithm not specified";null!==this.nameAlg&&null===this.asn1Alg&&(this.asn1Alg=n.x509.OID.name2obj(this.nameAlg));var t=[this.asn1Alg];null!==this.asn1Params&&t.push(this.asn1Params);var e=new n.DERSequence({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t&&(void 0!==t.name&&(this.nameAlg=t.name),void 0!==t.asn1params&&(this.asn1Params=t.asn1params),void 0!==t.paramempty&&(this.paramEmpty=t.paramempty)),null===this.asn1Params&&!1===this.paramEmpty&&null!==this.nameAlg){var r=this.nameAlg.toLowerCase();"withdsa"!==r.substr(-7,7)&&"withecdsa"!==r.substr(-9,9)&&(this.asn1Params=new n.DERNull)}},Gn.lang.extend(yr.asn1.x509.AlgorithmIdentifier,yr.asn1.ASN1Object),yr.asn1.x509.GeneralName=function(t){yr.asn1.x509.GeneralName.superclass.constructor.call(this);var e={rfc822:"81",dns:"82",dn:"a4",uri:"86",ip:"87"},n=yr,r=n.asn1,i=(r.DERSequence,r.DEROctetString),s=r.DERIA5String,o=r.DERTaggedObject,a=r.ASN1Object,u=r.x509.X500Name,l=An;this.explicit=!1,this.setByParam=function(t){var n=null;if(void 0!==t){if(void 0!==t.rfc822&&(this.type="rfc822",n=new s({str:t[this.type]})),void 0!==t.dns&&(this.type="dns",n=new s({str:t[this.type]})),void 0!==t.uri&&(this.type="uri",n=new s({str:t[this.type]})),void 0!==t.dn&&(this.type="dn",this.explicit=!0,n=new u({str:t.dn})),void 0!==t.ldapdn&&(this.type="dn",this.explicit=!0,n=new u({ldapstr:t.ldapdn})),void 0!==t.certissuer){this.type="dn",this.explicit=!0;var r=t.certissuer,c=null;if(r.match(/^[0-9A-Fa-f]+$/),-1!=r.indexOf("-----BEGIN ")&&(c=l(r)),null==c)throw"certissuer param not cert";var h=new Wn;h.hex=c;var f=h.getIssuerHex();n=new a,n.hTLV=f}if(void 0!==t.certsubj){this.type="dn",this.explicit=!0;var r=t.certsubj,c=null;if(r.match(/^[0-9A-Fa-f]+$/),-1!=r.indexOf("-----BEGIN ")&&(c=l(r)),null==c)throw"certsubj param not cert";var h=new Wn;h.hex=c;var f=h.getSubjectHex();n=new a,n.hTLV=f}if(void 0!==t.ip){this.type="ip",this.explicit=!1;var d,p=t.ip,g="malformed IP address";if(p.match(/^[0-9.]+[.][0-9.]+$/)){if(d=Un("["+p.split(".").join(",")+"]"),8!==d.length)throw g}else if(p.match(/^[0-9A-Fa-f:]+:[0-9A-Fa-f:]+$/))d=Bn(p);else{if(!p.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw g;d=p}n=new i({hex:d})}if(null==this.type)throw"unsupported type in params="+t;this.asn1Obj=new o({explicit:this.explicit,tag:e[this.type],obj:n})}},this.getEncodedHex=function(){return this.asn1Obj.getEncodedHex()},void 0!==t&&this.setByParam(t)},Gn.lang.extend(yr.asn1.x509.GeneralName,yr.asn1.ASN1Object),yr.asn1.x509.GeneralNames=function(t){yr.asn1.x509.GeneralNames.superclass.constructor.call(this);var e=yr,n=e.asn1;this.setByParamArray=function(t){for(var e=0;e<t.length;e++){var r=new n.x509.GeneralName(t[e]);this.asn1Array.push(r)}},this.getEncodedHex=function(){return new n.DERSequence({array:this.asn1Array}).getEncodedHex()},this.asn1Array=new Array,"undefined"!=typeof t&&this.setByParamArray(t)},Gn.lang.extend(yr.asn1.x509.GeneralNames,yr.asn1.ASN1Object),yr.asn1.x509.DistributionPointName=function(t){yr.asn1.x509.DistributionPointName.superclass.constructor.call(this);var e=yr,n=e.asn1,r=n.DERTaggedObject;if(this.getEncodedHex=function(){if("full"!=this.type)throw"currently type shall be 'full': "+this.type;return this.asn1Obj=new r({explicit:!1,tag:this.tag,obj:this.asn1V}),this.hTLV=this.asn1Obj.getEncodedHex(),this.hTLV},void 0!==t){if(!n.x509.GeneralNames.prototype.isPrototypeOf(t))throw"This class supports GeneralNames only as argument";this.type="full",this.tag="a0",this.asn1V=t}},Gn.lang.extend(yr.asn1.x509.DistributionPointName,yr.asn1.ASN1Object),yr.asn1.x509.DistributionPoint=function(t){yr.asn1.x509.DistributionPoint.superclass.constructor.call(this);var e=yr,n=e.asn1;this.getEncodedHex=function(){var t=new n.DERSequence;if(null!=this.asn1DP){var e=new n.DERTaggedObject({explicit:!0,tag:"a0",obj:this.asn1DP});t.appendASN1Object(e)}return this.hTLV=t.getEncodedHex(),this.hTLV},void 0!==t&&void 0!==t.dpobj&&(this.asn1DP=t.dpobj)},Gn.lang.extend(yr.asn1.x509.DistributionPoint,yr.asn1.ASN1Object),yr.asn1.x509.OID=new function(t){this.atype2oidList={CN:"2.5.4.3",L:"2.5.4.7",ST:"2.5.4.8",O:"2.5.4.10",OU:"2.5.4.11",C:"2.5.4.6",STREET:"2.5.4.9",DC:"0.9.2342.19200300.100.1.25",UID:"0.9.2342.19200300.100.1.1",SN:"2.5.4.4",T:"2.5.4.12",DN:"2.5.4.49",E:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",serialNumber:"2.5.4.5",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3"},this.name2oidList={sha1:"1.3.14.3.2.26",sha256:"2.16.840.1.101.3.4.2.1",sha384:"2.16.840.1.101.3.4.2.2",sha512:"2.16.840.1.101.3.4.2.3",sha224:"2.16.840.1.101.3.4.2.4",md5:"1.2.840.113549.2.5",md2:"1.3.14.7.2.2.1",ripemd160:"1.3.36.3.2.1",MD2withRSA:"1.2.840.113549.1.1.2",MD4withRSA:"1.2.840.113549.1.1.3",MD5withRSA:"1.2.840.113549.1.1.4",SHA1withRSA:"1.2.840.113549.1.1.5",SHA224withRSA:"1.2.840.113549.1.1.14",SHA256withRSA:"1.2.840.113549.1.1.11",SHA384withRSA:"1.2.840.113549.1.1.12",SHA512withRSA:"1.2.840.113549.1.1.13",SHA1withECDSA:"1.2.840.10045.4.1",SHA224withECDSA:"1.2.840.10045.4.3.1",SHA256withECDSA:"1.2.840.10045.4.3.2",SHA384withECDSA:"1.2.840.10045.4.3.3",SHA512withECDSA:"1.2.840.10045.4.3.4",dsa:"1.2.840.10040.4.1",SHA1withDSA:"1.2.840.10040.4.3",SHA224withDSA:"2.16.840.1.101.3.4.3.1",SHA256withDSA:"2.16.840.1.101.3.4.3.2",rsaEncryption:"1.2.840.113549.1.1.1",commonName:"2.5.4.3",countryName:"2.5.4.6",localityName:"2.5.4.7",stateOrProvinceName:"2.5.4.8",streetAddress:"2.5.4.9",organizationName:"2.5.4.10",organizationalUnitName:"2.5.4.11",domainComponent:"0.9.2342.19200300.100.1.25",userId:"0.9.2342.19200300.100.1.1",surname:"2.5.4.4",title:"2.5.4.12",distinguishedName:"2.5.4.49",emailAddress:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3",subjectKeyIdentifier:"2.5.29.14",keyUsage:"2.5.29.15",subjectAltName:"2.5.29.17",issuerAltName:"2.5.29.18",basicConstraints:"2.5.29.19",nameConstraints:"2.5.29.30",cRLDistributionPoints:"2.5.29.31",certificatePolicies:"2.5.29.32",authorityKeyIdentifier:"2.5.29.35",policyConstraints:"2.5.29.36",extKeyUsage:"2.5.29.37",authorityInfoAccess:"1.3.6.1.5.5.7.1.1",ocsp:"1.3.6.1.5.5.7.48.1",caIssuers:"1.3.6.1.5.5.7.48.2",anyExtendedKeyUsage:"2.5.29.37.0",serverAuth:"1.3.6.1.5.5.7.3.1",clientAuth:"1.3.6.1.5.5.7.3.2",codeSigning:"1.3.6.1.5.5.7.3.3",emailProtection:"1.3.6.1.5.5.7.3.4",timeStamping:"1.3.6.1.5.5.7.3.8",ocspSigning:"1.3.6.1.5.5.7.3.9",ecPublicKey:"1.2.840.10045.2.1",secp256r1:"1.2.840.10045.3.1.7",secp256k1:"1.3.132.0.10",secp384r1:"1.3.132.0.34",pkcs5PBES2:"1.2.840.113549.1.5.13",pkcs5PBKDF2:"1.2.840.113549.1.5.12","des-EDE3-CBC":"1.2.840.113549.3.7",data:"1.2.840.113549.1.7.1","signed-data":"1.2.840.113549.1.7.2","enveloped-data":"1.2.840.113549.1.7.3","digested-data":"1.2.840.113549.1.7.5","encrypted-data":"1.2.840.113549.1.7.6","authenticated-data":"1.2.840.113549.1.9.16.1.2",tstinfo:"1.2.840.113549.1.9.16.1.4",extensionRequest:"1.2.840.113549.1.9.14"},this.objCache={},this.name2obj=function(t){if("undefined"!=typeof this.objCache[t])return this.objCache[t];if("undefined"==typeof this.name2oidList[t])throw"Name of ObjectIdentifier not defined: "+t;var e=this.name2oidList[t],n=new yr.asn1.DERObjectIdentifier({oid:e});return this.objCache[t]=n,n},this.atype2obj=function(t){if("undefined"!=typeof this.objCache[t])return this.objCache[t];if("undefined"==typeof this.atype2oidList[t])throw"AttributeType name undefined: "+t;var e=this.atype2oidList[t],n=new yr.asn1.DERObjectIdentifier({oid:e});return this.objCache[t]=n,n}},yr.asn1.x509.OID.oid2name=function(t){var e=yr.asn1.x509.OID.name2oidList;for(var n in e)if(e[n]==t)return n;return""},yr.asn1.x509.OID.oid2atype=function(t){var e=yr.asn1.x509.OID.atype2oidList;for(var n in e)if(e[n]==t)return n;return t},yr.asn1.x509.OID.name2oid=function(t){var e=yr.asn1.x509.OID.name2oidList;return void 0===e[t]?"":e[t]},yr.asn1.x509.X509Util={},yr.asn1.x509.X509Util.newCertPEM=function(t){var e=yr.asn1.x509,n=e.TBSCertificate,r=e.Certificate,i=new n;if(void 0===t.serial)throw"serial number undefined.";if(i.setSerialNumberByParam(t.serial),"string"!==typeof t.sigalg.name)throw"unproper signature algorithm name";if(i.setSignatureAlgByParam(t.sigalg),void 0===t.issuer)throw"issuer name undefined.";if(i.setIssuerByParam(t.issuer),void 0===t.notbefore)throw"notbefore undefined.";if(i.setNotBeforeByParam(t.notbefore),void 0===t.notafter)throw"notafter undefined.";if(i.setNotAfterByParam(t.notafter),void 0===t.subject)throw"subject name undefined.";if(i.setSubjectByParam(t.subject),void 0===t.sbjpubkey)throw"subject public key undefined.";if(i.setSubjectPublicKeyByGetKey(t.sbjpubkey),void 0!==t.ext&&void 0!==t.ext.length)for(var s=0;s<t.ext.length;s++)for(key in t.ext[s])i.appendExtensionByName(key,t.ext[s][key]);if(void 0===t.cakey&&void 0===t.sighex)throw"param cakey and sighex undefined.";var o=null,a=null;return t.cakey&&(o=!0===t.cakey.isPrivate?t.cakey:Sr.getKey.apply(null,t.cakey),a=new r({tbscertobj:i,prvkeyobj:o}),a.sign()),t.sighex&&(a=new r({tbscertobj:i}),a.setSignatureHex(t.sighex)),a.getPEMString()},"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.asn1&&yr.asn1||(yr.asn1={}),"undefined"!=typeof yr.asn1.cms&&yr.asn1.cms||(yr.asn1.cms={}),yr.asn1.cms.Attribute=function(t){var e=yr,n=e.asn1;n.cms.Attribute.superclass.constructor.call(this),this.getEncodedHex=function(){var t,e,r;t=new n.DERObjectIdentifier({oid:this.attrTypeOid}),e=new n.DERSet({array:this.valueList});try{e.getEncodedHex()}catch(t){throw"fail valueSet.getEncodedHex in Attribute(1)/"+t}r=new n.DERSequence({array:[t,e]});try{this.hTLV=r.getEncodedHex()}catch(t){throw"failed seq.getEncodedHex in Attribute(2)/"+t}return this.hTLV}},Gn.lang.extend(yr.asn1.cms.Attribute,yr.asn1.ASN1Object),yr.asn1.cms.ContentType=function(t){var e=yr,n=e.asn1;(n.cms.ContentType.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.3","undefined"!=typeof t)&&(new n.DERObjectIdentifier(t),this.valueList=[null])},Gn.lang.extend(yr.asn1.cms.ContentType,yr.asn1.cms.Attribute),yr.asn1.cms.MessageDigest=function(t){var e=yr,n=e.asn1,r=n.DEROctetString,i=n.cms;if(i.MessageDigest.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.4",void 0!==t)if(t.eciObj instanceof i.EncapsulatedContentInfo&&"string"===typeof t.hashAlg){var s=t.eciObj.eContentValueHex,o=t.hashAlg,a=e.crypto.Util.hashHex(s,o),u=new r({hex:a});u.getEncodedHex(),this.valueList=[u]}else{var u=new r(t);u.getEncodedHex(),this.valueList=[u]}},Gn.lang.extend(yr.asn1.cms.MessageDigest,yr.asn1.cms.Attribute),yr.asn1.cms.SigningTime=function(t){var e=yr,n=e.asn1;if(n.cms.SigningTime.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.5",void 0!==t){var r=new n.x509.Time(t);try{r.getEncodedHex()}catch(t){throw"SigningTime.getEncodedHex() failed/"+t}this.valueList=[r]}},Gn.lang.extend(yr.asn1.cms.SigningTime,yr.asn1.cms.Attribute),yr.asn1.cms.SigningCertificate=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.cms;e.crypto;i.SigningCertificate.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.12",this.setCerts=function(t){for(var s=[],o=0;o<t.length;o++){var a=An(t[o]),u=e.crypto.Util.hashHex(a,"sha1"),l=new n.DEROctetString({hex:u});l.getEncodedHex();var c=new i.IssuerAndSerialNumber({cert:t[o]});c.getEncodedHex();var h=new r({array:[l,c]});h.getEncodedHex(),s.push(h)}var f=new r({array:s});f.getEncodedHex(),this.valueList=[f]},void 0!==t&&"object"==typeof t.array&&this.setCerts(t.array)},Gn.lang.extend(yr.asn1.cms.SigningCertificate,yr.asn1.cms.Attribute),yr.asn1.cms.SigningCertificateV2=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.x509,s=n.cms,o=e.crypto;if(s.SigningCertificateV2.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.47",this.setCerts=function(t,e){for(var a=[],u=0;u<t.length;u++){var l=An(t[u]),c=[];"sha256"!==e&&c.push(new i.AlgorithmIdentifier({name:e}));var h=o.Util.hashHex(l,e),f=new n.DEROctetString({hex:h});f.getEncodedHex(),c.push(f);var d=new s.IssuerAndSerialNumber({cert:t[u]});d.getEncodedHex(),c.push(d);var p=new r({array:c});p.getEncodedHex(),a.push(p)}var g=new r({array:a});g.getEncodedHex(),this.valueList=[g]},void 0!==t&&"object"==typeof t.array){var a="sha256";"string"==typeof t.hashAlg&&(a=t.hashAlg),this.setCerts(t.array,a)}},Gn.lang.extend(yr.asn1.cms.SigningCertificateV2,yr.asn1.cms.Attribute),yr.asn1.cms.IssuerAndSerialNumber=function(t){var e=yr,n=e.asn1,r=n.DERInteger,i=n.cms,s=n.x509,o=s.X500Name,a=Wn;i.IssuerAndSerialNumber.superclass.constructor.call(this);this.setByCertPEM=function(t){var e=An(t),n=new a;n.hex=e;var i=n.getIssuerHex();this.dIssuer=new o,this.dIssuer.hTLV=i;var s=n.getSerialNumberHex();this.dSerial=new r({hex:s})},this.getEncodedHex=function(){var t=new n.DERSequence({array:[this.dIssuer,this.dSerial]});return this.hTLV=t.getEncodedHex(),this.hTLV},void 0!==t&&("string"==typeof t&&-1!=t.indexOf("-----BEGIN ")&&this.setByCertPEM(t),t.issuer&&t.serial&&(t.issuer instanceof o?this.dIssuer=t.issuer:this.dIssuer=new o(t.issuer),t.serial instanceof r?this.dSerial=t.serial:this.dSerial=new r(t.serial)),"string"==typeof t.cert&&this.setByCertPEM(t.cert))},Gn.lang.extend(yr.asn1.cms.IssuerAndSerialNumber,yr.asn1.ASN1Object),yr.asn1.cms.AttributeList=function(t){var e=yr,n=e.asn1,r=n.cms;r.AttributeList.superclass.constructor.call(this),this.list=new Array,this.sortFlag=!0,this.add=function(t){t instanceof r.Attribute&&this.list.push(t)},this.length=function(){return this.list.length},this.clear=function(){this.list=new Array,this.hTLV=null,this.hV=null},this.getEncodedHex=function(){if("string"==typeof this.hTLV)return this.hTLV;var t=new n.DERSet({array:this.list,sortflag:this.sortFlag});return this.hTLV=t.getEncodedHex(),this.hTLV},void 0!==t&&"undefined"!=typeof t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},Gn.lang.extend(yr.asn1.cms.AttributeList,yr.asn1.ASN1Object),yr.asn1.cms.SignerInfo=function(t){var e=yr,n=e.asn1,r=n.DERTaggedObject,i=n.cms,s=i.AttributeList,o=i.ContentType,a=i.EncapsulatedContentInfo,u=i.MessageDigest,l=i.SignedData,c=n.x509,h=c.AlgorithmIdentifier,f=e.crypto,d=Sr;i.SignerInfo.superclass.constructor.call(this),this.dCMSVersion=new n.DERInteger({int:1}),this.dSignerIdentifier=null,this.dDigestAlgorithm=null,this.dSignedAttrs=new s,this.dSigAlg=null,this.dSig=null,this.dUnsignedAttrs=new s,this.setSignerIdentifier=function(t){if("string"==typeof t&&-1!=t.indexOf("CERTIFICATE")&&-1!=t.indexOf("BEGIN")&&-1!=t.indexOf("END")){this.dSignerIdentifier=new i.IssuerAndSerialNumber({cert:t})}},this.setForContentAndHash=function(t){void 0!==t&&(t.eciObj instanceof a&&(this.dSignedAttrs.add(new o({oid:"1.2.840.113549.1.7.1"})),this.dSignedAttrs.add(new u({eciObj:t.eciObj,hashAlg:t.hashAlg}))),void 0!==t.sdObj&&t.sdObj instanceof l&&-1==t.sdObj.digestAlgNameList.join(":").indexOf(t.hashAlg)&&t.sdObj.digestAlgNameList.push(t.hashAlg),"string"==typeof t.hashAlg&&(this.dDigestAlgorithm=new h({name:t.hashAlg})))},this.sign=function(t,e){this.dSigAlg=new h({name:e});var r=this.dSignedAttrs.getEncodedHex(),i=d.getKey(t),s=new f.Signature({alg:e});s.init(i),s.updateHex(r);var o=s.sign();this.dSig=new n.DEROctetString({hex:o})},this.addUnsigned=function(t){this.hTLV=null,this.dUnsignedAttrs.hTLV=null,this.dUnsignedAttrs.add(t)},this.getEncodedHex=function(){if(this.dSignedAttrs instanceof s&&0==this.dSignedAttrs.length())throw"SignedAttrs length = 0 (empty)";var t=new r({obj:this.dSignedAttrs,tag:"a0",explicit:!1}),e=null;this.dUnsignedAttrs.length()>0&&(e=new r({obj:this.dUnsignedAttrs,tag:"a1",explicit:!1}));var i=[this.dCMSVersion,this.dSignerIdentifier,this.dDigestAlgorithm,t,this.dSigAlg,this.dSig];null!=e&&i.push(e);var o=new n.DERSequence({array:i});return this.hTLV=o.getEncodedHex(),this.hTLV}},Gn.lang.extend(yr.asn1.cms.SignerInfo,yr.asn1.ASN1Object),yr.asn1.cms.EncapsulatedContentInfo=function(t){var e=yr,n=e.asn1,r=n.DERTaggedObject,i=n.DERSequence,s=n.DERObjectIdentifier,o=n.DEROctetString;n.cms.EncapsulatedContentInfo.superclass.constructor.call(this),this.dEContentType=new s({name:"data"}),this.dEContent=null,this.isDetached=!1,this.eContentValueHex=null,this.setContentType=function(t){t.match(/^[0-2][.][0-9.]+$/)?this.dEContentType=new s({oid:t}):this.dEContentType=new s({name:t})},this.setContentValue=function(t){void 0!==t&&("string"==typeof t.hex?this.eContentValueHex=t.hex:"string"==typeof t.str&&(this.eContentValueHex=vn(t.str)))},this.setContentValueHex=function(t){this.eContentValueHex=t},this.setContentValueStr=function(t){this.eContentValueHex=vn(t)},this.getEncodedHex=function(){if("string"!=typeof this.eContentValueHex)throw"eContentValue not yet set";var t=new o({hex:this.eContentValueHex});this.dEContent=new r({obj:t,tag:"a0",explicit:!0});var e=[this.dEContentType];this.isDetached||e.push(this.dEContent);var n=new i({array:e});return this.hTLV=n.getEncodedHex(),this.hTLV}},Gn.lang.extend(yr.asn1.cms.EncapsulatedContentInfo,yr.asn1.ASN1Object),yr.asn1.cms.ContentInfo=function(t){var e=yr,n=e.asn1,r=n.DERTaggedObject,i=n.DERSequence,s=n.x509;yr.asn1.cms.ContentInfo.superclass.constructor.call(this),this.dContentType=null,this.dContent=null,this.setContentType=function(t){"string"==typeof t&&(this.dContentType=s.OID.name2obj(t))},this.getEncodedHex=function(){var t=new r({obj:this.dContent,tag:"a0",explicit:!0}),e=new i({array:[this.dContentType,t]});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t&&(t.type&&this.setContentType(t.type),t.obj&&t.obj instanceof n.ASN1Object&&(this.dContent=t.obj))},Gn.lang.extend(yr.asn1.cms.ContentInfo,yr.asn1.ASN1Object),yr.asn1.cms.SignedData=function(t){var e=yr,n=e.asn1,r=n.ASN1Object,i=n.DERInteger,s=n.DERSet,o=n.DERSequence,a=n.DERTaggedObject,u=n.cms,l=u.EncapsulatedContentInfo,c=u.SignerInfo,h=u.ContentInfo,f=n.x509,d=f.AlgorithmIdentifier;yr.asn1.cms.SignedData.superclass.constructor.call(this),this.dCMSVersion=new i({int:1}),this.dDigestAlgs=null,this.digestAlgNameList=[],this.dEncapContentInfo=new l,this.dCerts=null,this.certificateList=[],this.crlList=[],this.signerInfoList=[new c],this.addCertificatesByPEM=function(t){var e=An(t),n=new r;n.hTLV=e,this.certificateList.push(n)},this.getEncodedHex=function(){if("string"==typeof this.hTLV)return this.hTLV;if(null==this.dDigestAlgs){for(var t=[],e=0;e<this.digestAlgNameList.length;e++){var n=this.digestAlgNameList[e],r=new d({name:n});t.push(r)}this.dDigestAlgs=new s({array:t})}var i=[this.dCMSVersion,this.dDigestAlgs,this.dEncapContentInfo];if(null==this.dCerts&&this.certificateList.length>0){var u=new s({array:this.certificateList});this.dCerts=new a({obj:u,tag:"a0",explicit:!1})}null!=this.dCerts&&i.push(this.dCerts);var l=new s({array:this.signerInfoList});i.push(l);var c=new o({array:i});return this.hTLV=c.getEncodedHex(),this.hTLV},this.getContentInfo=function(){return this.getEncodedHex(),new h({type:"signed-data",obj:this})},this.getContentInfoEncodedHex=function(){return this.getContentInfo().getEncodedHex()},this.getPEM=function(){return Fn(this.getContentInfoEncodedHex(),"CMS")}},Gn.lang.extend(yr.asn1.cms.SignedData,yr.asn1.ASN1Object),yr.asn1.cms.CMSUtil=new function(){},yr.asn1.cms.CMSUtil.newSignedData=function(t){var e=yr,n=e.asn1,r=n.cms,i=r.SignerInfo,s=r.SignedData,o=r.SigningTime,a=r.SigningCertificate,u=r.SigningCertificateV2,l=n.cades,c=l.SignaturePolicyIdentifier,h=new s;if(h.dEncapContentInfo.setContentValue(t.content),"object"==typeof t.certs)for(var f=0;f<t.certs.length;f++)h.addCertificatesByPEM(t.certs[f]);h.signerInfoList=[];for(var f=0;f<t.signerInfos.length;f++){var d=t.signerInfos[f],p=new i;p.setSignerIdentifier(d.signerCert),p.setForContentAndHash({sdObj:h,eciObj:h.dEncapContentInfo,hashAlg:d.hashAlg});for(attrName in d.sAttr){var g=d.sAttr[attrName];if("SigningTime"==attrName){var y=new o(g);p.dSignedAttrs.add(y)}if("SigningCertificate"==attrName){var y=new a(g);p.dSignedAttrs.add(y)}if("SigningCertificateV2"==attrName){var y=new u(g);p.dSignedAttrs.add(y)}if("SignaturePolicyIdentifier"==attrName){var y=new c(g);p.dSignedAttrs.add(y)}}p.sign(d.signerPrvKey,d.sigAlg),h.signerInfoList.push(p)}return h},yr.asn1.cms.CMSUtil.verifySignedData=function(t){var e=yr,n=e.asn1,r=n.cms,i=(r.SignerInfo,r.SignedData,r.SigningTime,r.SigningCertificate,r.SigningCertificateV2,n.cades),s=(i.SignaturePolicyIdentifier,e.lang.String.isHex),o=gr,a=o.getVbyList,u=o.getTLVbyList,l=o.getIdxbyList,c=o.getChildIdx,h=o.getTLV,f=o.oidname,d=e.crypto.Util.hashHex;void 0===t.cms&&s(t.cms);var p=t.cms,g=function(t,e){for(var n,r=3;r<6;r++)if(void 0!==(n=l(t,0,[1,0,r]))){var i=t.substr(n,2);"a0"===i&&(e.certsIdx=n),"a1"===i&&(e.revinfosIdx=n),"31"===i&&(e.signerinfosIdx=n)}},y=function(t,e){var n=e.signerinfosIdx;if(void 0!==n){var r=c(t,n);e.signerInfoIdxList=r;for(var i=0;i<r.length;i++){var s=r[i],o={idx:s};v(t,o),e.signerInfos.push(o)}}},v=function(t,e){var n=e.idx;e.signerid_issuer1=u(t,n,[1,0],"30"),e.signerid_serial1=a(t,n,[1,1],"02"),e.hashalg=f(a(t,n,[2,0],"06"));var r=l(t,n,[3],"a0");e.idxSignedAttrs=r,m(t,e,r);var i=c(t,n),s=i.length;if(s<6)throw"malformed SignerInfo";e.sigalg=f(a(t,n,[s-2,0],"06")),e.sigval=a(t,n,[s-1],"04")},m=function(t,e,n){var r=c(t,n);e.signedAttrIdxList=r;for(var i=0;i<r.length;i++){var s,o=r[i],u=a(t,o,[0],"06");"2a864886f70d010905"===u?(s=mn(a(t,o,[1,0])),e.saSigningTime=s):"2a864886f70d010904"===u&&(s=a(t,o,[1,0],"04"),e.saMessageDigest=s)}},b=function(t,e,n,r){var i,s=e.parse.certsIdx;if(void 0===e.certs){i=[],e.certkeys=[];for(var o=c(t,s),a=0;a<o.length;a++){var u=h(t,o[a]),l=new Wn;l.readCertHex(u),i[a]=l,e.certkeys[a]=l.getPublicKey()}e.certs=i}else i=e.certs;e.cccc=i.length,e.cccci=o.length;for(var a=0;a<i.length;a++){var f=l.getIssuerHex(),d=l.getSerialNumberHex();n.signerid_issuer1===f&&n.signerid_serial1===d&&(n.certkey_idx=a)}},S=function(t,e,n,r){n.verifyDetail={};var i=n.verifyDetail,s=e.parse.econtent,o=n.hashalg,a=n.saMessageDigest;i.validMessageDigest=!1,d(s,o)===a&&(i.validMessageDigest=!0),b(t,e,n),i.validSignatureValue=!1;var u=n.sigalg,l="31"+h(t,n.idxSignedAttrs).substr(2);n.signedattrshex=l;var c=e.certs[n.certkey_idx].getPublicKey(),f=new yr.crypto.Signature({alg:u});f.init(c),f.updateHex(l);var p=f.verify(n.sigval);i.validSignatureValue_isValid=p,!0===p&&(i.validSignatureValue=!0),n.isValid=!1,i.validMessageDigest&&i.validSignatureValue&&(n.isValid=!0)},w={isValid:!1,parse:{}};return function(t,e){if("2a864886f70d010702"!==a(t,0,[0],"06"))return e;e.cmsType="signedData",e.econtent=a(t,0,[1,0,2,1,0]),g(t,e),e.signerInfos=[],y(t,e)}(p,w.parse),function(t,e){for(var n=e.parse.signerInfos,r=n.length,i=!0,s=0;s<r;s++){var o=n[s];S(t,e,o,s),o.isValid||(i=!1)}e.isValid=i}(p,w),w},"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.asn1&&yr.asn1||(yr.asn1={}),"undefined"!=typeof yr.asn1.tsp&&yr.asn1.tsp||(yr.asn1.tsp={}),yr.asn1.tsp.Accuracy=function(t){var e=yr,n=e.asn1,r=n.DERInteger,i=n.DERSequence,s=n.DERTaggedObject;n.tsp.Accuracy.superclass.constructor.call(this),this.seconds=null,this.millis=null,this.micros=null,this.getEncodedHex=function(){var t=null,e=null,n=null,o=[];if(null!=this.seconds&&(t=new r({int:this.seconds}),o.push(t)),null!=this.millis){var a=new r({int:this.millis});e=new s({obj:a,tag:"80",explicit:!1}),o.push(e)}if(null!=this.micros){var u=new r({int:this.micros});n=new s({obj:u,tag:"81",explicit:!1}),o.push(n)}var l=new i({array:o});return this.hTLV=l.getEncodedHex(),this.hTLV},void 0!==t&&("number"==typeof t.seconds&&(this.seconds=t.seconds),"number"==typeof t.millis&&(this.millis=t.millis),"number"==typeof t.micros&&(this.micros=t.micros))},Gn.lang.extend(yr.asn1.tsp.Accuracy,yr.asn1.ASN1Object),yr.asn1.tsp.MessageImprint=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.DEROctetString,s=n.x509,o=s.AlgorithmIdentifier;n.tsp.MessageImprint.superclass.constructor.call(this),this.dHashAlg=null,this.dHashValue=null,this.getEncodedHex=function(){return"string"==typeof this.hTLV?this.hTLV:new r({array:[this.dHashAlg,this.dHashValue]}).getEncodedHex()},void 0!==t&&("string"==typeof t.hashAlg&&(this.dHashAlg=new o({name:t.hashAlg})),"string"==typeof t.hashValue&&(this.dHashValue=new i({hex:t.hashValue})))},Gn.lang.extend(yr.asn1.tsp.MessageImprint,yr.asn1.ASN1Object),yr.asn1.tsp.TimeStampReq=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.DERInteger,s=n.DERBoolean,o=n.DERObjectIdentifier,a=n.tsp,u=a.MessageImprint;a.TimeStampReq.superclass.constructor.call(this),this.dVersion=new i({int:1}),this.dMessageImprint=null,this.dPolicy=null,this.dNonce=null,this.certReq=!0,this.setMessageImprint=function(t){if(t instanceof u)return void(this.dMessageImprint=t);"object"==typeof t&&(this.dMessageImprint=new u(t))},this.getEncodedHex=function(){if(null==this.dMessageImprint)throw"messageImprint shall be specified";var t=[this.dVersion,this.dMessageImprint];null!=this.dPolicy&&t.push(this.dPolicy),null!=this.dNonce&&t.push(this.dNonce),this.certReq&&t.push(new s);var e=new r({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t&&("object"==typeof t.mi&&this.setMessageImprint(t.mi),"object"==typeof t.policy&&(this.dPolicy=new o(t.policy)),"object"==typeof t.nonce&&(this.dNonce=new i(t.nonce)),"boolean"==typeof t.certreq&&(this.certReq=t.certreq))},Gn.lang.extend(yr.asn1.tsp.TimeStampReq,yr.asn1.ASN1Object),yr.asn1.tsp.TSTInfo=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.DERInteger,s=n.DERBoolean,o=n.DERGeneralizedTime,a=n.DERObjectIdentifier,u=n.tsp,l=u.MessageImprint,c=u.Accuracy,h=n.x509.X500Name;if(u.TSTInfo.superclass.constructor.call(this),this.dVersion=new i({int:1}),this.dPolicy=null,this.dMessageImprint=null,this.dSerialNumber=null,this.dGenTime=null,this.dAccuracy=null,this.dOrdering=null,this.dNonce=null,this.dTsa=null,this.getEncodedHex=function(){var t=[this.dVersion];if(null==this.dPolicy)throw"policy shall be specified.";if(t.push(this.dPolicy),null==this.dMessageImprint)throw"messageImprint shall be specified.";if(t.push(this.dMessageImprint),null==this.dSerialNumber)throw"serialNumber shall be specified.";if(t.push(this.dSerialNumber),null==this.dGenTime)throw"genTime shall be specified.";t.push(this.dGenTime),null!=this.dAccuracy&&t.push(this.dAccuracy),null!=this.dOrdering&&t.push(this.dOrdering),null!=this.dNonce&&t.push(this.dNonce),null!=this.dTsa&&t.push(this.dTsa);var e=new r({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t){if("string"==typeof t.policy){if(!t.policy.match(/^[0-9.]+$/))throw"policy shall be oid like 0.1.4.134";this.dPolicy=new a({oid:t.policy})}void 0!==t.messageImprint&&(this.dMessageImprint=new l(t.messageImprint)),void 0!==t.serialNumber&&(this.dSerialNumber=new i(t.serialNumber)),void 0!==t.genTime&&(this.dGenTime=new o(t.genTime)),void 0!==t.accuracy&&(this.dAccuracy=new c(t.accuracy)),void 0!==t.ordering&&1==t.ordering&&(this.dOrdering=new s),void 0!==t.nonce&&(this.dNonce=new i(t.nonce)),void 0!==t.tsa&&(this.dTsa=new h(t.tsa))}},Gn.lang.extend(yr.asn1.tsp.TSTInfo,yr.asn1.ASN1Object),yr.asn1.tsp.TimeStampResp=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.ASN1Object,s=n.tsp,o=s.PKIStatusInfo;s.TimeStampResp.superclass.constructor.call(this),this.dStatus=null,this.dTST=null,this.getEncodedHex=function(){if(null==this.dStatus)throw"status shall be specified";var t=[this.dStatus];null!=this.dTST&&t.push(this.dTST);var e=new r({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t&&("object"==typeof t.status&&(this.dStatus=new o(t.status)),void 0!==t.tst&&t.tst instanceof i&&(this.dTST=t.tst.getContentInfo()))},Gn.lang.extend(yr.asn1.tsp.TimeStampResp,yr.asn1.ASN1Object),yr.asn1.tsp.PKIStatusInfo=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.tsp,s=i.PKIStatus,o=i.PKIFreeText,a=i.PKIFailureInfo;i.PKIStatusInfo.superclass.constructor.call(this),this.dStatus=null,this.dStatusString=null,this.dFailureInfo=null,this.getEncodedHex=function(){if(null==this.dStatus)throw"status shall be specified";var t=[this.dStatus];null!=this.dStatusString&&t.push(this.dStatusString),null!=this.dFailureInfo&&t.push(this.dFailureInfo);var e=new r({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t&&("object"==typeof t.status&&(this.dStatus=new s(t.status)),"object"==typeof t.statstr&&(this.dStatusString=new o({array:t.statstr})),"object"==typeof t.failinfo&&(this.dFailureInfo=new a(t.failinfo)))},Gn.lang.extend(yr.asn1.tsp.PKIStatusInfo,yr.asn1.ASN1Object),yr.asn1.tsp.PKIStatus=function(t){var e=yr,n=e.asn1,r=n.DERInteger,i=n.tsp,s=i.PKIStatus;i.PKIStatus.superclass.constructor.call(this);if(this.getEncodedHex=function(){return this.hTLV=this.dStatus.getEncodedHex(),this.hTLV},void 0!==t)if(void 0!==t.name){var o=s.valueList;if(void 0===o[t.name])throw"name undefined: "+t.name;this.dStatus=new r({int:o[t.name]})}else this.dStatus=new r(t)},Gn.lang.extend(yr.asn1.tsp.PKIStatus,yr.asn1.ASN1Object),yr.asn1.tsp.PKIStatus.valueList={granted:0,grantedWithMods:1,rejection:2,waiting:3,revocationWarning:4,revocationNotification:5},yr.asn1.tsp.PKIFreeText=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.DERUTF8String;n.tsp.PKIFreeText.superclass.constructor.call(this),this.textList=[],this.getEncodedHex=function(){for(var t=[],e=0;e<this.textList.length;e++)t.push(new i({str:this.textList[e]}));var n=new r({array:t});return this.hTLV=n.getEncodedHex(),this.hTLV},void 0!==t&&"object"==typeof t.array&&(this.textList=t.array)},Gn.lang.extend(yr.asn1.tsp.PKIFreeText,yr.asn1.ASN1Object),yr.asn1.tsp.PKIFailureInfo=function(t){var e=yr,n=e.asn1,r=n.DERBitString,i=n.tsp,s=i.PKIFailureInfo;if(s.superclass.constructor.call(this),this.value=null,this.getEncodedHex=function(){if(null==this.value)throw"value shall be specified";var t=new Number(this.value).toString(2),e=new r;return e.setByBinaryString(t),this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t)if("string"==typeof t.name){var o=s.valueList;if(void 0===o[t.name])throw"name undefined: "+t.name;this.value=o[t.name]}else"number"==typeof t.int&&(this.value=t.int)},Gn.lang.extend(yr.asn1.tsp.PKIFailureInfo,yr.asn1.ASN1Object),yr.asn1.tsp.PKIFailureInfo.valueList={badAlg:0,badRequest:2,badDataFormat:5,timeNotAvailable:14,unacceptedPolicy:15,unacceptedExtension:16,addInfoNotAvailable:17,systemFailure:25},yr.asn1.tsp.AbstractTSAAdapter=function(t){this.getTSTHex=function(t,e){throw"not implemented yet"}},yr.asn1.tsp.SimpleTSAAdapter=function(t){var e=yr,n=e.asn1,r=n.tsp,i=e.crypto.Util.hashHex;r.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(t,e){var n=i(t,e);this.params.tstInfo.messageImprint={hashAlg:e,hashValue:n},this.params.tstInfo.serialNumber={int:this.serial++};var s=Math.floor(1e9*Math.random());return this.params.tstInfo.nonce={int:s},r.TSPUtil.newTimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==t&&(this.params=t)},Gn.lang.extend(yr.asn1.tsp.SimpleTSAAdapter,yr.asn1.tsp.AbstractTSAAdapter),yr.asn1.tsp.FixedTSAAdapter=function(t){var e=yr,n=e.asn1,r=n.tsp,i=e.crypto.Util.hashHex;r.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(t,e){var n=i(t,e);return this.params.tstInfo.messageImprint={hashAlg:e,hashValue:n},r.TSPUtil.newTimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==t&&(this.params=t)},Gn.lang.extend(yr.asn1.tsp.FixedTSAAdapter,yr.asn1.tsp.AbstractTSAAdapter),yr.asn1.tsp.TSPUtil=new function(){},yr.asn1.tsp.TSPUtil.newTimeStampToken=function(t){var e=yr,n=e.asn1,r=n.cms,i=(n.tsp,n.tsp.TSTInfo),s=new r.SignedData,o=new i(t.tstInfo),a=o.getEncodedHex();if(s.dEncapContentInfo.setContentValue({hex:a}),s.dEncapContentInfo.setContentType("tstinfo"),"object"==typeof t.certs)for(var u=0;u<t.certs.length;u++)s.addCertificatesByPEM(t.certs[u]);var l=s.signerInfoList[0];l.setSignerIdentifier(t.signerCert),l.setForContentAndHash({sdObj:s,eciObj:s.dEncapContentInfo,hashAlg:t.hashAlg});var c=new r.SigningCertificate({array:[t.signerCert]});return l.dSignedAttrs.add(c),l.sign(t.signerPrvKey,t.sigAlg),s},yr.asn1.tsp.TSPUtil.parseTimeStampReq=function(t){var e=gr,n=e.getChildIdx,r=e.getV,i=e.getTLV,s={};s.certreq=!1;var o=n(t,0);if(o.length<2)throw"TimeStampReq must have at least 2 items";var a=i(t,o[1]);s.mi=yr.asn1.tsp.TSPUtil.parseMessageImprint(a);for(var u=2;u<o.length;u++){var l=o[u],c=t.substr(l,2);if("06"==c){var h=r(t,l);s.policy=e.hextooidstr(h)}"02"==c&&(s.nonce=r(t,l)),"01"==c&&(s.certreq=!0)}return s},yr.asn1.tsp.TSPUtil.parseMessageImprint=function(t){var e=gr,n=e.getChildIdx,r=e.getV,i=e.getIdxbyList,s={};if("30"!=t.substr(0,2))throw"head of messageImprint hex shall be '30'";var o=(n(t,0),i(t,0,[0,0])),a=r(t,o),u=e.hextooidstr(a),l=yr.asn1.x509.OID.oid2name(u);if(""==l)throw"hashAlg name undefined: "+u;var c=l,h=i(t,0,[1]);return s.hashAlg=c,s.hashValue=r(t,h),s},"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.asn1&&yr.asn1||(yr.asn1={}),"undefined"!=typeof yr.asn1.cades&&yr.asn1.cades||(yr.asn1.cades={}),yr.asn1.cades.SignaturePolicyIdentifier=function(t){var e=yr,n=e.asn1,r=n.DERObjectIdentifier,i=n.DERSequence,s=n.cades,o=s.OtherHashAlgAndValue;if(s.SignaturePolicyIdentifier.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.15",void 0!==t&&"string"==typeof t.oid&&"object"==typeof t.hash){var a=new r({oid:t.oid}),u=new o(t.hash),l=new i({array:[a,u]});this.valueList=[l]}},Gn.lang.extend(yr.asn1.cades.SignaturePolicyIdentifier,yr.asn1.cms.Attribute),yr.asn1.cades.OtherHashAlgAndValue=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.DEROctetString,s=n.x509,o=s.AlgorithmIdentifier;n.cades.OtherHashAlgAndValue.superclass.constructor.call(this),this.dAlg=null,this.dHash=null,this.getEncodedHex=function(){var t=new r({array:[this.dAlg,this.dHash]});return this.hTLV=t.getEncodedHex(),this.hTLV},void 0!==t&&"string"==typeof t.alg&&"string"==typeof t.hash&&(this.dAlg=new o({name:t.alg}),this.dHash=new i({hex:t.hash}))},Gn.lang.extend(yr.asn1.cades.OtherHashAlgAndValue,yr.asn1.ASN1Object),yr.asn1.cades.SignatureTimeStamp=function(t){var e=yr,n=e.asn1,r=n.ASN1Object;n.x509;if(n.cades.SignatureTimeStamp.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.14",this.tstHex=null,void 0!==t){if(void 0!==t.res)if("string"==typeof t.res&&t.res.match(/^[0-9A-Fa-f]+$/));else if(!(t.res instanceof r))throw"res param shall be ASN1Object or hex string";if(void 0!==t.tst)if("string"==typeof t.tst&&t.tst.match(/^[0-9A-Fa-f]+$/)){var i=new r;this.tstHex=t.tst,i.hTLV=this.tstHex,i.getEncodedHex(),this.valueList=[i]}else if(!(t.tst instanceof r))throw"tst param shall be ASN1Object or hex string"}},Gn.lang.extend(yr.asn1.cades.SignatureTimeStamp,yr.asn1.cms.Attribute),yr.asn1.cades.CompleteCertificateRefs=function(t){var e=yr,n=e.asn1,r=n.cades;r.CompleteCertificateRefs.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.21",this.setByArray=function(t){this.valueList=[];for(var e=0;e<t.length;e++){var n=new r.OtherCertID(t[e]);this.valueList.push(n)}},void 0!==t&&"object"==typeof t&&"number"==typeof t.length&&this.setByArray(t)},Gn.lang.extend(yr.asn1.cades.CompleteCertificateRefs,yr.asn1.cms.Attribute),yr.asn1.cades.OtherCertID=function(t){var e=yr,n=e.asn1,r=n.cms,i=n.cades;i.OtherCertID.superclass.constructor.call(this),this.hasIssuerSerial=!0,this.dOtherCertHash=null,this.dIssuerSerial=null,this.setByCertPEM=function(t){this.dOtherCertHash=new i.OtherHash(t),this.hasIssuerSerial&&(this.dIssuerSerial=new r.IssuerAndSerialNumber(t))},this.getEncodedHex=function(){if(null!=this.hTLV)return this.hTLV;if(null==this.dOtherCertHash)throw"otherCertHash not set";var t=[this.dOtherCertHash];null!=this.dIssuerSerial&&t.push(this.dIssuerSerial);var e=new n.DERSequence({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t&&("string"==typeof t&&-1!=t.indexOf("-----BEGIN ")&&this.setByCertPEM(t),"object"==typeof t&&(!1===t.hasis&&(this.hasIssuerSerial=!1),"string"==typeof t.cert&&this.setByCertPEM(t.cert)))},Gn.lang.extend(yr.asn1.cades.OtherCertID,yr.asn1.ASN1Object),yr.asn1.cades.OtherHash=function(t){var e=yr,n=e.asn1,r=(n.cms,n.cades),i=r.OtherHashAlgAndValue,s=e.crypto.Util.hashHex;if(r.OtherHash.superclass.constructor.call(this),this.alg="sha256",this.dOtherHash=null,this.setByCertPEM=function(t){if(-1==t.indexOf("-----BEGIN "))throw"certPEM not to seem PEM format";var e=An(t),n=s(e,this.alg);this.dOtherHash=new i({alg:this.alg,hash:n})},this.getEncodedHex=function(){if(null==this.dOtherHash)throw"OtherHash not set";return this.dOtherHash.getEncodedHex()},void 0!==t)if("string"==typeof t)if(-1!=t.indexOf("-----BEGIN "))this.setByCertPEM(t);else{if(!t.match(/^[0-9A-Fa-f]+$/))throw"unsupported string value for params";this.dOtherHash=new n.DEROctetString({hex:t})}else"object"==typeof t&&("string"==typeof t.cert?("string"==typeof t.alg&&(this.alg=t.alg),this.setByCertPEM(t.cert)):this.dOtherHash=new i(t))},Gn.lang.extend(yr.asn1.cades.OtherHash,yr.asn1.ASN1Object),yr.asn1.cades.CAdESUtil=new function(){},yr.asn1.cades.CAdESUtil.addSigTS=function(t,e,n){},yr.asn1.cades.CAdESUtil.parseSignedDataForAddingUnsigned=function(t){var e=gr,n=e.getChildIdx,r=e.getTLV,i=e.getTLVbyList,s=e.getIdxbyList,o=yr,a=o.asn1,u=a.ASN1Object,l=a.cms,c=l.SignedData,h=a.cades,f=h.CAdESUtil,d={};if("06092a864886f70d010702"!=i(t,0,[0]))throw"hex is not CMS SignedData";var p=s(t,0,[1,0]),g=n(t,p);if(g.length<4)throw"num of SignedData elem shall be 4 at least";var y=g.shift();d.version=r(t,y);var v=g.shift();d.algs=r(t,v);var m=g.shift();d.encapcontent=r(t,m),d.certs=null,d.revs=null,d.si=[];var b=g.shift();"a0"==t.substr(b,2)&&(d.certs=r(t,b),b=g.shift()),"a1"==t.substr(b,2)&&(d.revs=r(t,b),b=g.shift());var S=b;if("31"!=t.substr(S,2))throw"Can't find signerInfos";for(var w=n(t,S),x=0;x<w.length;x++){var E=w[x],F=f.parseSignerInfoForAddingUnsigned(t,E,x);d.si[x]=F}var A=null;d.obj=new c,A=new u,A.hTLV=d.version,d.obj.dCMSVersion=A,A=new u,A.hTLV=d.algs,d.obj.dDigestAlgs=A,A=new u,A.hTLV=d.encapcontent,d.obj.dEncapContentInfo=A,A=new u,A.hTLV=d.certs,d.obj.dCerts=A,d.obj.signerInfoList=[];for(var x=0;x<d.si.length;x++)d.obj.signerInfoList.push(d.si[x].obj);return d},yr.asn1.cades.CAdESUtil.parseSignerInfoForAddingUnsigned=function(t,e,n){var r=gr,i=r.getChildIdx,s=r.getTLV,o=r.getV,a=yr,u=a.asn1,l=u.ASN1Object,c=u.cms,h=c.AttributeList,f=c.SignerInfo,d={},p=i(t,e);if(6!=p.length)throw"not supported items for SignerInfo (!=6)";var g=p.shift();d.version=s(t,g);var y=p.shift();d.si=s(t,y);var v=p.shift();d.digalg=s(t,v);var m=p.shift();d.sattrs=s(t,m);var b=p.shift();d.sigalg=s(t,b);var S=p.shift();d.sig=s(t,S),d.sigval=o(t,S);var w=null;return d.obj=new f,w=new l,w.hTLV=d.version,d.obj.dCMSVersion=w,w=new l,w.hTLV=d.si,d.obj.dSignerIdentifier=w,w=new l,w.hTLV=d.digalg,d.obj.dDigestAlgorithm=w,w=new l,w.hTLV=d.sattrs,d.obj.dSignedAttrs=w,w=new l,w.hTLV=d.sigalg,d.obj.dSigAlg=w,w=new l,w.hTLV=d.sig,d.obj.dSig=w,d.obj.dUnsignedAttrs=new h,d},"undefined"!=typeof yr.asn1.csr&&yr.asn1.csr||(yr.asn1.csr={}),yr.asn1.csr.CertificationRequest=function(t){var e=yr,n=e.asn1,r=n.DERBitString,i=n.DERSequence,s=n.csr,o=n.x509;s.CertificationRequest.superclass.constructor.call(this);this.sign=function(t,n){null==this.prvKey&&(this.prvKey=n),this.asn1SignatureAlg=new o.AlgorithmIdentifier({name:t}),sig=new e.crypto.Signature({alg:t}),sig.init(this.prvKey),sig.updateHex(this.asn1CSRInfo.getEncodedHex()),this.hexSig=sig.sign(),this.asn1Sig=new r({hex:"00"+this.hexSig});var s=new i({array:[this.asn1CSRInfo,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=s.getEncodedHex(),this.isModified=!1},this.getPEMString=function(){return Fn(this.getEncodedHex(),"CERTIFICATE REQUEST")},this.getEncodedHex=function(){if(0==this.isModified&&null!=this.hTLV)return this.hTLV;throw"not signed yet"},void 0!==t&&void 0!==t.csrinfo&&(this.asn1CSRInfo=t.csrinfo)},Gn.lang.extend(yr.asn1.csr.CertificationRequest,yr.asn1.ASN1Object),yr.asn1.csr.CertificationRequestInfo=function(t){var e=yr,n=e.asn1,r=n.DERInteger,i=n.DERSequence,s=n.DERSet,o=n.DERNull,a=n.DERTaggedObject,u=n.DERObjectIdentifier,l=n.csr,c=n.x509,h=c.X500Name,f=c.Extension,d=Sr;l.CertificationRequestInfo.superclass.constructor.call(this),this._initialize=function(){this.asn1Array=new Array,this.asn1Version=new r({int:0}),this.asn1Subject=null,this.asn1SubjPKey=null,this.extensionsArray=new Array},this.setSubjectByParam=function(t){this.asn1Subject=new h(t)},this.setSubjectPublicKeyByGetKey=function(t){var e=d.getKey(t);this.asn1SubjPKey=new c.SubjectPublicKeyInfo(e)},this.appendExtensionByName=function(t,e){f.appendByNameToArray(t,e,this.extensionsArray)},this.getEncodedHex=function(){if(this.asn1Array=new Array,this.asn1Array.push(this.asn1Version),this.asn1Array.push(this.asn1Subject),this.asn1Array.push(this.asn1SubjPKey),this.extensionsArray.length>0){var t=new i({array:this.extensionsArray}),e=new s({array:[t]}),n=new i({array:[new u({oid:"1.2.840.113549.1.9.14"}),e]}),r=new a({explicit:!0,tag:"a0",obj:n});this.asn1Array.push(r)}else{var r=new a({explicit:!1,tag:"a0",obj:new o});this.asn1Array.push(r)}var l=new i({array:this.asn1Array});return this.hTLV=l.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize()},Gn.lang.extend(yr.asn1.csr.CertificationRequestInfo,yr.asn1.ASN1Object),yr.asn1.csr.CSRUtil=new function(){},yr.asn1.csr.CSRUtil.newCSRPEM=function(t){var e=Sr,n=yr.asn1.csr;if(void 0===t.subject)throw"parameter subject undefined";if(void 0===t.sbjpubkey)throw"parameter sbjpubkey undefined";if(void 0===t.sigalg)throw"parameter sigalg undefined";if(void 0===t.sbjprvkey)throw"parameter sbjpubkey undefined";var r=new n.CertificationRequestInfo;if(r.setSubjectByParam(t.subject),r.setSubjectPublicKeyByGetKey(t.sbjpubkey),void 0!==t.ext&&void 0!==t.ext.length)for(var i=0;i<t.ext.length;i++)for(key in t.ext[i])r.appendExtensionByName(key,t.ext[i][key]);var s=new n.CertificationRequest({csrinfo:r}),o=e.getKey(t.sbjprvkey);return s.sign(t.sigalg,o),s.getPEMString()},yr.asn1.csr.CSRUtil.getInfo=function(t){var e=gr,n=e.getTLVbyList,r={};if(r.subject={},r.pubkey={},-1==t.indexOf("-----BEGIN CERTIFICATE REQUEST"))throw"argument is not PEM file";var i=An(t,"CERTIFICATE REQUEST");return r.subject.hex=n(i,0,[0,1]),r.subject.name=Wn.hex2dn(r.subject.hex),r.pubkey.hex=n(i,0,[0,2]),r.pubkey.obj=Sr.getKey(r.pubkey.hex,null,"pkcs8pub"),r},"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.asn1&&yr.asn1||(yr.asn1={}),"undefined"!=typeof yr.asn1.ocsp&&yr.asn1.ocsp||(yr.asn1.ocsp={}),yr.asn1.ocsp.DEFAULT_HASH="sha1",yr.asn1.ocsp.CertID=function(t){var e=yr,n=e.asn1,r=n.DEROctetString,i=n.DERInteger,s=n.DERSequence,o=n.x509,a=o.AlgorithmIdentifier,u=n.ocsp,l=u.DEFAULT_HASH,c=e.crypto,h=c.Util.hashHex,f=Wn,d=gr;if(u.CertID.superclass.constructor.call(this),this.dHashAlg=null,this.dIssuerNameHash=null,this.dIssuerKeyHash=null,this.dSerialNumber=null,this.setByValue=function(t,e,n,s){void 0===s&&(s=l),this.dHashAlg=new a({name:s}),this.dIssuerNameHash=new r({hex:t}),this.dIssuerKeyHash=new r({hex:e}),this.dSerialNumber=new i({hex:n})},this.setByCert=function(t,e,n){void 0===n&&(n=l);var r=new f;r.readCertPEM(e);var i=new f;i.readCertPEM(t);var s=i.getPublicKeyHex(),o=d.getTLVbyList(s,0,[1,0],"30"),a=r.getSerialNumberHex(),u=h(i.getSubjectHex(),n),c=h(o,n);this.setByValue(u,c,a,n),this.hoge=r.getSerialNumberHex()},this.getEncodedHex=function(){if(null===this.dHashAlg&&null===this.dIssuerNameHash&&null===this.dIssuerKeyHash&&null===this.dSerialNumber)throw"not yet set values";var t=[this.dHashAlg,this.dIssuerNameHash,this.dIssuerKeyHash,this.dSerialNumber],e=new s({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t){var p=t;if(void 0!==p.issuerCert&&void 0!==p.subjectCert){var g=l;void 0===p.alg&&(g=void 0),this.setByCert(p.issuerCert,p.subjectCert,g)}else{if(void 0===p.namehash||void 0===p.keyhash||void 0===p.serial)throw"invalid constructor arguments";var g=l;void 0===p.alg&&(g=void 0),this.setByValue(p.namehash,p.keyhash,p.serial,g)}}},Gn.lang.extend(yr.asn1.ocsp.CertID,yr.asn1.ASN1Object),yr.asn1.ocsp.Request=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.ocsp;if(i.Request.superclass.constructor.call(this),this.dReqCert=null,this.dExt=null,this.getEncodedHex=function(){var t=[];if(null===this.dReqCert)throw"reqCert not set";t.push(this.dReqCert);var e=new r({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},"undefined"!==typeof t){var s=new i.CertID(t);this.dReqCert=s}},Gn.lang.extend(yr.asn1.ocsp.Request,yr.asn1.ASN1Object),yr.asn1.ocsp.TBSRequest=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.ocsp;i.TBSRequest.superclass.constructor.call(this),this.version=0,this.dRequestorName=null,this.dRequestList=[],this.dRequestExt=null,this.setRequestListByParam=function(t){for(var e=[],n=0;n<t.length;n++){var r=new i.Request(t[0]);e.push(r)}this.dRequestList=e},this.getEncodedHex=function(){var t=[];if(0!==this.version)throw"not supported version: "+this.version;if(null!==this.dRequestorName)throw"requestorName not supported";var e=new r({array:this.dRequestList});if(t.push(e),null!==this.dRequestExt)throw"requestExtensions not supported";var n=new r({array:t});return this.hTLV=n.getEncodedHex(),this.hTLV},void 0!==t&&void 0!==t.reqList&&this.setRequestListByParam(t.reqList)},Gn.lang.extend(yr.asn1.ocsp.TBSRequest,yr.asn1.ASN1Object),yr.asn1.ocsp.OCSPRequest=function(t){var e=yr,n=e.asn1,r=n.DERSequence,i=n.ocsp;if(i.OCSPRequest.superclass.constructor.call(this),this.dTbsRequest=null,this.dOptionalSignature=null,this.getEncodedHex=function(){var t=[];if(null===this.dTbsRequest)throw"tbsRequest not set";if(t.push(this.dTbsRequest),null!==this.dOptionalSignature)throw"optionalSignature not supported";var e=new r({array:t});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==t&&void 0!==t.reqList){var s=new i.TBSRequest(t);this.dTbsRequest=s}},Gn.lang.extend(yr.asn1.ocsp.OCSPRequest,yr.asn1.ASN1Object),yr.asn1.ocsp.OCSPUtil={},yr.asn1.ocsp.OCSPUtil.getRequestHex=function(t,e,n){var r=yr,i=r.asn1,s=i.ocsp;void 0===n&&(n=s.DEFAULT_HASH);var o={alg:n,issuerCert:t,subjectCert:e};return new s.OCSPRequest({reqList:[o]}).getEncodedHex()},yr.asn1.ocsp.OCSPUtil.getOCSPResponseInfo=function(t){var e=gr,n=e.getVbyList,r=e.getIdxbyList,n=e.getVbyList,i=e.getV,s={};try{var o=n(t,0,[0],"0a");s.responseStatus=parseInt(o,16)}catch(t){}if(0!==s.responseStatus)return s;try{var a=r(t,0,[1,0,1,0,0,2,0,1]);"80"===t.substr(a,2)?s.certStatus="good":"a1"===t.substr(a,2)?(s.certStatus="revoked",s.revocationTime=mn(n(t,a,[0]))):"82"===t.substr(a,2)&&(s.certStatus="unknown")}catch(t){}try{var u=r(t,0,[1,0,1,0,0,2,0,2]);s.thisUpdate=mn(i(t,u))}catch(t){}try{var l=r(t,0,[1,0,1,0,0,2,0,3]);"a0"===t.substr(l,2)&&(s.nextUpdate=mn(n(t,l,[0])))}catch(t){}return s};var yr;"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.lang&&yr.lang||(yr.lang={}),yr.lang.String=function(){};var vr,mr;"function"===typeof t?(vr=function(e){return hn(new t(e,"utf8").toString("base64"))},mr=function(e){return new t(fn(e),"base64").toString("utf8")}):(vr=function(t){return dn(Nn(jn(t)))},mr=function(t){return decodeURIComponent(Rn(pn(t)))}),yr.lang.String.isInteger=function(t){return!!t.match(/^[0-9]+$/)||!!t.match(/^-[0-9]+$/)},yr.lang.String.isHex=function(t){return!(t.length%2!=0||!t.match(/^[0-9a-f]+$/)&&!t.match(/^[0-9A-F]+$/))},yr.lang.String.isBase64=function(t){return t=t.replace(/\s+/g,""),!(!t.match(/^[0-9A-Za-z+\/]+={0,3}$/)||t.length%4!=0)},yr.lang.String.isBase64URL=function(t){return!t.match(/[+\/=]/)&&(t=fn(t),yr.lang.String.isBase64(t))},yr.lang.String.isIntegerArray=function(t){return t=t.replace(/\s+/g,""),!!t.match(/^\[[0-9,]+\]$/)};var br=function(t,e){var n=t.length;t.length>e.length&&(n=e.length);for(var r=0;r<n;r++)if(t.charCodeAt(r)!=e.charCodeAt(r))return r;return t.length!=e.length?n:-1};"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.crypto&&yr.crypto||(yr.crypto={}),yr.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:$n.algo.MD5,sha1:$n.algo.SHA1,sha224:$n.algo.SHA224,sha256:$n.algo.SHA256,sha384:$n.algo.SHA384,sha512:$n.algo.SHA512,ripemd160:$n.algo.RIPEMD160},this.getDigestInfoHex=function(t,e){if("undefined"==typeof this.DIGESTINFOHEAD[e])throw"alg not supported in Util.DIGESTINFOHEAD: "+e;return this.DIGESTINFOHEAD[e]+t},this.getPaddedDigestInfoHex=function(t,e,n){var r=this.getDigestInfoHex(t,e),i=n/4;if(r.length+22>i)throw"key is too short for SigAlg: keylen="+n+","+e;for(var s="0001",o="00"+r,a="",u=i-s.length-o.length,l=0;l<u;l+=2)a+="ff";return s+a+o},this.hashString=function(t,e){return new yr.crypto.MessageDigest({alg:e}).digestString(t)},this.hashHex=function(t,e){return new yr.crypto.MessageDigest({alg:e}).digestHex(t)},this.sha1=function(t){return new yr.crypto.MessageDigest({alg:"sha1",prov:"cryptojs"}).digestString(t)},this.sha256=function(t){return new yr.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"}).digestString(t)},this.sha256Hex=function(t){return new yr.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"}).digestHex(t)},this.sha512=function(t){return new yr.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"}).digestString(t)},this.sha512Hex=function(t){return new yr.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"}).digestHex(t)}},yr.crypto.Util.md5=function(t){return new yr.crypto.MessageDigest({alg:"md5",prov:"cryptojs"}).digestString(t)},yr.crypto.Util.ripemd160=function(t){return new yr.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"}).digestString(t)},yr.crypto.Util.SECURERANDOMGEN=new he,yr.crypto.Util.getRandomHexOfNbytes=function(t){var e=new Array(t);return yr.crypto.Util.SECURERANDOMGEN.nextBytes(e),on(e)},yr.crypto.Util.getRandomBigIntegerOfNbytes=function(t){return new s(yr.crypto.Util.getRandomHexOfNbytes(t),16)},yr.crypto.Util.getRandomHexOfNbits=function(t){var e=t%8,n=(t-e)/8,r=new Array(n+1);return yr.crypto.Util.SECURERANDOMGEN.nextBytes(r),r[0]=(255<<e&255^255)&r[0],on(r)},yr.crypto.Util.getRandomBigIntegerOfNbits=function(t){return new s(yr.crypto.Util.getRandomHexOfNbits(t),16)},yr.crypto.Util.getRandomBigIntegerZeroToMax=function(t){for(var e=t.bitLength();;){var n=yr.crypto.Util.getRandomBigIntegerOfNbits(e);if(-1!=t.compareTo(n))return n}},yr.crypto.Util.getRandomBigIntegerMinToMax=function(t,e){var n=t.compareTo(e);if(1==n)throw"biMin is greater than biMax";if(0==n)return t;var r=e.subtract(t);return yr.crypto.Util.getRandomBigIntegerZeroToMax(r).add(t)},yr.crypto.MessageDigest=function(t){this.setAlgAndProvider=function(t,e){if(t=yr.crypto.MessageDigest.getCanonicalAlgName(t),null!==t&&void 0===e&&(e=yr.crypto.Util.DEFAULTPROVIDER[t]),-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(t)&&"cryptojs"==e){try{this.md=yr.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[t].create()}catch(e){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+e}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=$n.enc.Hex.parse(t);this.md.update(e)},this.digest=function(){return this.md.finalize().toString($n.enc.Hex)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}if(-1!=":sha256:".indexOf(t)&&"sjcl"==e){try{this.md=new sjcl.hash.sha256}catch(e){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+e}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=sjcl.codec.hex.toBits(t);this.md.update(e)},this.digest=function(){var t=this.md.finalize();return sjcl.codec.hex.fromBits(t)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},void 0!==t&&void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=yr.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},yr.crypto.MessageDigest.getCanonicalAlgName=function(t){return"string"===typeof t&&(t=t.toLowerCase(),t=t.replace(/-/,"")),t},yr.crypto.MessageDigest.getHashLength=function(t){var e=yr.crypto.MessageDigest,n=e.getCanonicalAlgName(t);if(void 0===e.HASHLENGTH[n])throw"not supported algorithm: "+t;return e.HASHLENGTH[n]},yr.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20},yr.crypto.Mac=function(t){this.setAlgAndProvider=function(t,e){if(t=t.toLowerCase(),null==t&&(t="hmacsha1"),t=t.toLowerCase(),"hmac"!=t.substr(0,4))throw"setAlgAndProvider unsupported HMAC alg: "+t;void 0===e&&(e=yr.crypto.Util.DEFAULTPROVIDER[t]),this.algProv=t+"/"+e;var n=t.substr(4);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(n)&&"cryptojs"==e){try{var r=yr.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[n];this.mac=$n.algo.HMAC.create(r,this.pass)}catch(t){throw"setAlgAndProvider hash alg set fail hashAlg="+n+"/"+t}this.updateString=function(t){this.mac.update(t)},this.updateHex=function(t){var e=$n.enc.Hex.parse(t);this.mac.update(e)},this.doFinal=function(){return this.mac.finalize().toString($n.enc.Hex)},this.doFinalString=function(t){return this.updateString(t),this.doFinal()},this.doFinalHex=function(t){return this.updateHex(t),this.doFinal()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(t){if("string"==typeof t){var e=t;return t.length%2!=1&&t.match(/^[0-9A-Fa-f]+$/)||(e=Sn(t)),void(this.pass=$n.enc.Hex.parse(e))}if("object"!=typeof t)throw"KJUR.crypto.Mac unsupported password type: "+t;var e=null;if(void 0!==t.hex){if(t.hex.length%2!=0||!t.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+t.hex;e=t.hex}if(void 0!==t.utf8&&(e=vn(t.utf8)),void 0!==t.rstr&&(e=Sn(t.rstr)),void 0!==t.b64&&(e=r(t.b64)),void 0!==t.b64u&&(e=pn(t.b64u)),null==e)throw"KJUR.crypto.Mac unsupported password type: "+t;this.pass=$n.enc.Hex.parse(e)},void 0!==t&&(void 0!==t.pass&&this.setPassword(t.pass),void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=yr.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},yr.crypto.Signature=function(t){if(this._setAlgNames=function(){var t=this.algName.match(/^(.+)with(.+)$/);t&&(this.mdAlgName=t[1].toLowerCase(),this.pubkeyAlgName=t[2].toLowerCase())},this._zeroPaddingOfSignature=function(t,e){for(var n="",r=e/4-t.length,i=0;i<r;i++)n+="0";return n+t},this.setAlgAndProvider=function(t,e){if(this._setAlgNames(),"cryptojs/jsrsa"!=e)throw"provider not supported: "+e;if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)){try{this.md=new yr.crypto.MessageDigest({alg:this.mdAlgName})}catch(t){throw"setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+t}this.init=function(t,e){var n=null;try{n=void 0===e?Sr.getKey(t):Sr.getKey(t,e)}catch(t){throw"init failed:"+t}if(!0===n.isPrivate)this.prvKey=n,this.state="SIGN";else{if(!0!==n.isPublic)throw"init failed.:"+n;this.pubKey=n,this.state="VERIFY"}},this.updateString=function(t){this.md.updateString(t)},this.updateHex=function(t){this.md.updateHex(t)},this.sign=function(){if(this.sHashHex=this.md.digest(),"undefined"!=typeof this.ecprvhex&&"undefined"!=typeof this.eccurvename){var t=new yr.crypto.ECDSA({curve:this.eccurvename});this.hSign=t.signHex(this.sHashHex,this.ecprvhex)}else if(this.prvKey instanceof ye&&"rsaandmgf1"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof ye&&"rsa"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof yr.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else{if(!(this.prvKey instanceof yr.crypto.DSA))throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;this.hSign=this.prvKey.signWithMessageHash(this.sHashHex)}return this.hSign},this.signString=function(t){return this.updateString(t),this.sign()},this.signHex=function(t){return this.updateHex(t),this.sign()},this.verify=function(t){if(this.sHashHex=this.md.digest(),"undefined"!=typeof this.ecpubhex&&"undefined"!=typeof this.eccurvename)return new yr.crypto.ECDSA({curve:this.eccurvename}).verifyHex(this.sHashHex,t,this.ecpubhex);if(this.pubKey instanceof ye&&"rsaandmgf1"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,t,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof ye&&"rsa"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(void 0!==yr.crypto.ECDSA&&this.pubKey instanceof yr.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(void 0!==yr.crypto.DSA&&this.pubKey instanceof yr.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(t,e){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(t){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(t){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(t){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(t){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=t,void 0!==t&&(void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov?this.provName=yr.crypto.Util.DEFAULTPROVIDER[this.algName]:this.provName=t.prov,this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()),void 0!==t.psssaltlen&&(this.pssSaltLen=t.psssaltlen),void 0!==t.prvkeypem)){if(void 0!==t.prvkeypas)throw"both prvkeypem and prvkeypas parameters not supported";try{Sr.getKey(t.prvkeypem),this.init(null)}catch(t){throw"fatal error to load pem private key: "+t}}},yr.crypto.Cipher=function(t){},yr.crypto.Cipher.encrypt=function(t,e,n){if(e instanceof ye&&e.isPublic){var r=yr.crypto.Cipher.getAlgByKeyAndName(e,n);if("RSA"===r)return e.encrypt(t);if("RSAOAEP"===r)return e.encryptOAEP(t,"sha1");var i=r.match(/^RSAOAEP(\d+)$/);if(null!==i)return e.encryptOAEP(t,"sha"+i[1]);throw"Cipher.encrypt: unsupported algorithm for RSAKey: "+n}throw"Cipher.encrypt: unsupported key or algorithm"},yr.crypto.Cipher.decrypt=function(t,e,n){if(e instanceof ye&&e.isPrivate){var r=yr.crypto.Cipher.getAlgByKeyAndName(e,n);if("RSA"===r)return e.decrypt(t);if("RSAOAEP"===r)return e.decryptOAEP(t,"sha1");var i=r.match(/^RSAOAEP(\d+)$/);if(null!==i)return e.decryptOAEP(t,"sha"+i[1]);throw"Cipher.decrypt: unsupported algorithm for RSAKey: "+n}throw"Cipher.decrypt: unsupported key or algorithm"},yr.crypto.Cipher.getAlgByKeyAndName=function(t,e){if(t instanceof ye){if(-1!=":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(e))return e;if(null===e||void 0===e)return"RSA";throw"getAlgByKeyAndName: not supported algorithm name for RSAKey: "+e}throw"getAlgByKeyAndName: not supported algorithm name: "+e},yr.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040023":"secp521r1","2b81040022":"secp384r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}},"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.crypto&&yr.crypto||(yr.crypto={}),yr.crypto.ECDSA=function(t){var e=new he;this.type="EC",this.isPrivate=!1,this.isPublic=!1,this.getBigRandom=function(t){return new s(t.bitLength(),e).mod(t.subtract(s.ONE)).add(s.ONE)},this.setNamedCurve=function(t){this.ecparams=yr.crypto.ECParameterDB.getByName(t),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=t},this.setPrivateKeyHex=function(t){this.isPrivate=!0,this.prvKeyHex=t},this.setPublicKeyHex=function(t){this.isPublic=!0,this.pubKeyHex=t},this.getPublicKeyXYHex=function(){var t=this.pubKeyHex;if("04"!==t.substr(0,2))throw"this method supports uncompressed format(04) only";var e=this.ecparams.keylen/4;if(t.length!==2+2*e)throw"malformed public key hex length";var n={};return n.x=t.substr(2,e),n.y=t.substr(2+e),n},this.getShortNISTPCurveName=function(){var t=this.curveName;return"secp256r1"===t||"NIST P-256"===t||"P-256"===t||"prime256v1"===t?"P-256":"secp384r1"===t||"NIST P-384"===t||"P-384"===t?"P-384":null},this.generateKeyPairHex=function(){var t=this.ecparams.n,e=this.getBigRandom(t),n=this.ecparams.G.multiply(e),r=n.getX().toBigInteger(),i=n.getY().toBigInteger(),s=this.ecparams.keylen/4,o=("0000000000"+e.toString(16)).slice(-s),a=("0000000000"+r.toString(16)).slice(-s),u=("0000000000"+i.toString(16)).slice(-s),l="04"+a+u;return this.setPrivateKeyHex(o),this.setPublicKeyHex(l),{ecprvhex:o,ecpubhex:l}},this.signWithMessageHash=function(t){return this.signHex(t,this.prvKeyHex)},this.signHex=function(t,e){var n=new s(e,16),r=this.ecparams.n,i=new s(t,16);do{var o=this.getBigRandom(r),a=this.ecparams.G,u=a.multiply(o),l=u.getX().toBigInteger().mod(r)}while(l.compareTo(s.ZERO)<=0);var c=o.modInverse(r).multiply(i.add(n.multiply(l))).mod(r);return yr.crypto.ECDSA.biRSSigToASN1Sig(l,c)},this.sign=function(t,e){var n=e,r=this.ecparams.n,i=s.fromByteArrayUnsigned(t);do{var o=this.getBigRandom(r),a=this.ecparams.G,u=a.multiply(o),l=u.getX().toBigInteger().mod(r)}while(l.compareTo(s.ZERO)<=0);var c=o.modInverse(r).multiply(i.add(n.multiply(l))).mod(r);return this.serializeSig(l,c)},this.verifyWithMessageHash=function(t,e){return this.verifyHex(t,e,this.pubKeyHex)},this.verifyHex=function(t,e,n){var r,i,o=yr.crypto.ECDSA.parseSigHex(e);r=o.r,i=o.s;var a;a=Le.decodeFromHex(this.ecparams.curve,n);var u=new s(t,16);return this.verifyRaw(u,r,i,a)},this.verify=function(t,e,n){var r,i;if(Bitcoin.Util.isArray(e)){var o=this.parseSig(e);r=o.r,i=o.s}else{if("object"!==typeof e||!e.r||!e.s)throw"Invalid value for signature";r=e.r,i=e.s}var a;if(n instanceof Le)a=n;else{if(!Bitcoin.Util.isArray(n))throw"Invalid format for pubkey value, must be byte array or ECPointFp";a=Le.decodeFrom(this.ecparams.curve,n)}var u=s.fromByteArrayUnsigned(t);return this.verifyRaw(u,r,i,a)},this.verifyRaw=function(t,e,n,r){var i=this.ecparams.n,o=this.ecparams.G;if(e.compareTo(s.ONE)<0||e.compareTo(i)>=0)return!1;if(n.compareTo(s.ONE)<0||n.compareTo(i)>=0)return!1;var a=n.modInverse(i),u=t.multiply(a).mod(i),l=e.multiply(a).mod(i);return o.multiply(u).add(r.multiply(l)).getX().toBigInteger().mod(i).equals(e)},this.serializeSig=function(t,e){var n=t.toByteArraySigned(),r=e.toByteArraySigned(),i=[];return i.push(2),i.push(n.length),i=i.concat(n),i.push(2),i.push(r.length),i=i.concat(r),i.unshift(i.length),i.unshift(48),i},this.parseSig=function(t){var e;if(48!=t[0])throw new Error("Signature not a valid DERSequence");if(e=2,2!=t[e])throw new Error("First element in signature must be a DERInteger");var n=t.slice(e+2,e+2+t[e+1]);if(e+=2+t[e+1],2!=t[e])throw new Error("Second element in signature must be a DERInteger");var r=t.slice(e+2,e+2+t[e+1]);return e+=2+t[e+1],{r:s.fromByteArrayUnsigned(n),s:s.fromByteArrayUnsigned(r)}},this.parseSigCompact=function(t){if(65!==t.length)throw"Signature has the wrong length";var e=t[0]-27;if(e<0||e>7)throw"Invalid signature type";var n=this.ecparams.n;return{r:s.fromByteArrayUnsigned(t.slice(1,33)).mod(n),s:s.fromByteArrayUnsigned(t.slice(33,65)).mod(n),i:e}},this.readPKCS5PrvKeyHex=function(t){var e=gr,n=yr.crypto.ECDSA.getName,r=e.getVbyList;if(!1===e.isASN1HEX(t))throw"not ASN.1 hex string";var i,s,o;try{i=r(t,0,[2,0],"06"),s=r(t,0,[1],"04");try{o=r(t,0,[3,0],"03").substr(2)}catch(t){}}catch(t){throw"malformed PKCS#1/5 plain ECC private key"}if(this.curveName=n(i),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(o),this.setPrivateKeyHex(s),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(t){var e=gr,n=yr.crypto.ECDSA.getName,r=e.getVbyList;if(!1===e.isASN1HEX(t))throw"not ASN.1 hex string";var i,s,o;try{r(t,0,[1,0],"06"),i=r(t,0,[1,1],"06"),s=r(t,0,[2,0,1],"04");try{o=r(t,0,[2,0,2,0],"03").substr(2)}catch(t){}}catch(t){throw"malformed PKCS#8 plain ECC private key"}if(this.curveName=n(i),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(o),this.setPrivateKeyHex(s),this.isPublic=!1},this.readPKCS8PubKeyHex=function(t){var e=gr,n=yr.crypto.ECDSA.getName,r=e.getVbyList;if(!1===e.isASN1HEX(t))throw"not ASN.1 hex string";var i,s;try{r(t,0,[0,0],"06"),i=r(t,0,[0,1],"06"),s=r(t,0,[1],"03").substr(2)}catch(t){throw"malformed PKCS#8 ECC public key"}if(this.curveName=n(i),null===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(s)},this.readCertPubKeyHex=function(t,e){5!==e&&(e=6);var n=gr,r=yr.crypto.ECDSA.getName,i=n.getVbyList;if(!1===n.isASN1HEX(t))throw"not ASN.1 hex string";var s,o;try{s=i(t,0,[0,e,0,1],"06"),o=i(t,0,[0,e,1],"03").substr(2)}catch(t){throw"malformed X.509 certificate ECC public key"}if(this.curveName=r(s),null===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(o)},void 0!==t&&void 0!==t.curve&&(this.curveName=t.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==t&&(void 0!==t.prv&&this.setPrivateKeyHex(t.prv),void 0!==t.pub&&this.setPublicKeyHex(t.pub))},yr.crypto.ECDSA.parseSigHex=function(t){var e=yr.crypto.ECDSA.parseSigHexInHexRS(t);return{r:new s(e.r,16),s:new s(e.s,16)}},yr.crypto.ECDSA.parseSigHexInHexRS=function(t){var e=gr,n=e.getChildIdx,r=e.getV;if("30"!=t.substr(0,2))throw"signature is not a ASN.1 sequence";var i=n(t,0);if(2!=i.length)throw"number of signature ASN.1 sequence elements seem wrong";var s=i[0],o=i[1];if("02"!=t.substr(s,2))throw"1st item of sequene of signature is not ASN.1 integer";if("02"!=t.substr(o,2))throw"2nd item of sequene of signature is not ASN.1 integer";return{r:r(t,s),s:r(t,o)}},yr.crypto.ECDSA.asn1SigToConcatSig=function(t){var e=yr.crypto.ECDSA.parseSigHexInHexRS(t),n=e.r,r=e.s;if("00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),"00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),n.length%32==30&&(n="00"+n),r.length%32==30&&(r="00"+r),n.length%32!=0)throw"unknown ECDSA sig r length error";if(r.length%32!=0)throw"unknown ECDSA sig s length error";return n+r},yr.crypto.ECDSA.concatSigToASN1Sig=function(t){if(t.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig  length error";var e=t.substr(0,t.length/2),n=t.substr(t.length/2);return yr.crypto.ECDSA.hexRSSigToASN1Sig(e,n)},yr.crypto.ECDSA.hexRSSigToASN1Sig=function(t,e){var n=new s(t,16),r=new s(e,16);return yr.crypto.ECDSA.biRSSigToASN1Sig(n,r)},yr.crypto.ECDSA.biRSSigToASN1Sig=function(t,e){var n=yr.asn1,r=new n.DERInteger({bigint:t}),i=new n.DERInteger({bigint:e});return new n.DERSequence({array:[r,i]}).getEncodedHex()},yr.crypto.ECDSA.getName=function(t){return"2a8648ce3d030107"===t?"secp256r1":"2b8104000a"===t?"secp256k1":"2b81040022"===t?"secp384r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(t)?"secp256r1":-1!=="|secp256k1|".indexOf(t)?"secp256k1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(t)?"secp384r1":null},"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.crypto&&yr.crypto||(yr.crypto={}),yr.crypto.ECParameterDB=new function(){function t(t){return new s(t,16)}var e={},n={};this.getByName=function(t){var r=t;if("undefined"!=typeof n[r]&&(r=n[t]),"undefined"!=typeof e[r])return e[r];throw"unregistered EC curve name: "+r},this.regist=function(r,i,s,o,a,u,l,c,h,f,d,p){e[r]={};var g=t(s),y=t(o),v=t(a),m=t(u),b=t(l),S=new Ge(g,y,v),w=S.decodePointHex("04"+c+h);e[r].name=r,e[r].keylen=i,e[r].curve=S,e[r].G=w,e[r].n=m,e[r].h=b,e[r].oid=d,e[r].info=p;for(var x=0;x<f.length;x++)n[f[x]]=r}},yr.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field"),yr.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field"),yr.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field"),yr.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]),yr.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]),yr.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]),yr.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]),yr.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]),yr.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]),yr.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]),"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.crypto&&yr.crypto||(yr.crypto={}),yr.crypto.DSA=function(){this.p=null,this.q=null,this.g=null,this.y=null,this.x=null,this.type="DSA",this.isPrivate=!1,this.isPublic=!1,this.setPrivate=function(t,e,n,r,i){this.isPrivate=!0,this.p=t,this.q=e,this.g=n,this.y=r,this.x=i},this.setPrivateHex=function(t,e,n,r,i){var o,a,u,l,c;o=new s(t,16),a=new s(e,16),u=new s(n,16),l="string"===typeof r&&r.length>1?new s(r,16):null,c=new s(i,16),this.setPrivate(o,a,u,l,c)},this.setPublic=function(t,e,n,r){this.isPublic=!0,this.p=t,this.q=e,this.g=n,this.y=r,this.x=null},this.setPublicHex=function(t,e,n,r){var i,o,a,u;i=new s(t,16),o=new s(e,16),a=new s(n,16),u=new s(r,16),this.setPublic(i,o,a,u)},this.signWithMessageHash=function(t){var e=this.p,n=this.q,r=this.g,i=(this.y,this.x),o=yr.crypto.Util.getRandomBigIntegerMinToMax(s.ONE.add(s.ONE),n.subtract(s.ONE)),a=t.substr(0,n.bitLength()/4),u=new s(a,16),l=r.modPow(o,e).mod(n),c=o.modInverse(n).multiply(u.add(i.multiply(l))).mod(n);return yr.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:l}},{int:{bigint:c}}]})},this.verifyWithMessageHash=function(t,e){var n=this.p,r=this.q,i=this.g,o=this.y,a=this.parseASN1Signature(e),u=a[0],l=a[1],c=t.substr(0,r.bitLength()/4),h=new s(c,16);if(s.ZERO.compareTo(u)>0||u.compareTo(r)>0)throw"invalid DSA signature";if(s.ZERO.compareTo(l)>=0||l.compareTo(r)>0)throw"invalid DSA signature";var f=l.modInverse(r),d=h.multiply(f).mod(r),p=u.multiply(f).mod(r);return 0==i.modPow(d,n).multiply(o.modPow(p,n)).mod(n).mod(r).compareTo(u)},this.parseASN1Signature=function(t){try{return[new s(gr.getVbyList(t,0,[0],"02"),16),new s(gr.getVbyList(t,0,[1],"02"),16)]}catch(t){throw"malformed ASN.1 DSA signature"}},this.readPKCS5PrvKeyHex=function(t){var e,n,r,i,s,o=gr,a=o.getVbyList;if(!1===o.isASN1HEX(t))throw"not ASN.1 hex string";try{e=a(t,0,[1],"02"),n=a(t,0,[2],"02"),r=a(t,0,[3],"02"),i=a(t,0,[4],"02"),s=a(t,0,[5],"02")}catch(t){throw console.log("EXCEPTION:"+t),"malformed PKCS#1/5 plain DSA private key"}this.setPrivateHex(e,n,r,i,s)},this.readPKCS8PrvKeyHex=function(t){var e,n,r,i,s=gr,o=s.getVbyList;if(!1===s.isASN1HEX(t))throw"not ASN.1 hex string";try{e=o(t,0,[1,1,0],"02"),n=o(t,0,[1,1,1],"02"),r=o(t,0,[1,1,2],"02"),i=o(t,0,[2,0],"02")}catch(t){throw console.log("EXCEPTION:"+t),"malformed PKCS#8 plain DSA private key"}this.setPrivateHex(e,n,r,null,i)},this.readPKCS8PubKeyHex=function(t){var e,n,r,i,s=gr,o=s.getVbyList;if(!1===s.isASN1HEX(t))throw"not ASN.1 hex string";try{e=o(t,0,[0,1,0],"02"),n=o(t,0,[0,1,1],"02"),r=o(t,0,[0,1,2],"02"),i=o(t,0,[1,0],"02")}catch(t){throw console.log("EXCEPTION:"+t),"malformed PKCS#8 DSA public key"}this.setPublicHex(e,n,r,i)},this.readCertPubKeyHex=function(t,e){5!==e&&(e=6);var n,r,i,s,o=gr,a=o.getVbyList;if(!1===o.isASN1HEX(t))throw"not ASN.1 hex string";try{n=a(t,0,[0,e,0,1,0],"02"),r=a(t,0,[0,e,0,1,1],"02"),i=a(t,0,[0,e,0,1,2],"02"),s=a(t,0,[0,e,1,0],"02")}catch(t){throw console.log("EXCEPTION:"+t),"malformed X.509 certificate DSA public key"}this.setPublicHex(n,r,i,s)}};var Sr=function(){var t=function(t,e,n){return r($n.AES,t,e,n)},e=function(t,e,n){return r($n.TripleDES,t,e,n)},n=function(t,e,n){return r($n.DES,t,e,n)},r=function(t,e,n,r){var i=$n.enc.Hex.parse(e),s=$n.enc.Hex.parse(n),o=$n.enc.Hex.parse(r),a={};a.key=s,a.iv=o,a.ciphertext=i;var u=t.decrypt(a,s,{iv:o});return $n.enc.Hex.stringify(u)},i=function(t,e,n){return a($n.AES,t,e,n)},s=function(t,e,n){return a($n.TripleDES,t,e,n)},o=function(t,e,n){return a($n.DES,t,e,n)},a=function(t,e,n,r){var i=$n.enc.Hex.parse(e),s=$n.enc.Hex.parse(n),o=$n.enc.Hex.parse(r),a=t.encrypt(i,s,{iv:o}),u=$n.enc.Hex.parse(a.toString());return $n.enc.Base64.stringify(u)},u={"AES-256-CBC":{proc:t,eproc:i,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:i,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:i,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:e,eproc:s,keylen:24,ivlen:8},"DES-CBC":{proc:n,eproc:o,keylen:8,ivlen:8}},l=function(t){var e=$n.lib.WordArray.random(t);return $n.enc.Hex.stringify(e)},c=function(t){var e={},n=t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));n&&(e.cipher=n[1],e.ivsalt=n[2]);var r=t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));r&&(e.type=r[1]);var i=-1,s=0;-1!=t.indexOf("\r\n\r\n")&&(i=t.indexOf("\r\n\r\n"),s=2),-1!=t.indexOf("\n\n")&&(i=t.indexOf("\n\n"),s=1);var o=t.indexOf("-----END");if(-1!=i&&-1!=o){var a=t.substring(i+2*s,o-s);a=a.replace(/\s+/g,""),e.data=a}return e},h=function(t,e,n){for(var r=n.substring(0,16),i=$n.enc.Hex.parse(r),s=$n.enc.Utf8.parse(e),o=u[t].keylen+u[t].ivlen,a="",l=null;;){var c=$n.algo.MD5.create();if(null!=l&&c.update(l),c.update(s),c.update(i),l=c.finalize(),a+=$n.enc.Hex.stringify(l),a.length>=2*o)break}var h={};return h.keyhex=a.substr(0,2*u[t].keylen),h.ivhex=a.substr(2*u[t].keylen,2*u[t].ivlen),h},f=function(t,e,n,r){var i=$n.enc.Base64.parse(t),s=$n.enc.Hex.stringify(i);return(0,u[e].proc)(s,n,r)},d=function(t,e,n,r){return(0,u[e].eproc)(t,n,r)};return{version:"1.0.0",parsePKCS5PEM:function(t){return c(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,n){return h(t,e,n)},decryptKeyB64:function(t,e,n,r){return f(t,e,n,r)},getDecryptedKeyHex:function(t,e){var n=c(t),r=(n.type,n.cipher),i=n.ivsalt,s=n.data,o=h(r,e,i),a=o.keyhex;return f(s,r,a,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(t,e,n,r,i){var s="";if("undefined"!=typeof r&&null!=r||(r="AES-256-CBC"),"undefined"==typeof u[r])throw"KEYUTIL unsupported algorithm: "+r;if("undefined"==typeof i||null==i){var o=u[r].ivlen;i=l(o).toUpperCase()}var a=h(r,n,i),c=a.keyhex,f=d(e,r,c,i),p=f.replace(/(.{64})/g,"$1\r\n"),s="-----BEGIN "+t+" PRIVATE KEY-----\r\n";return s+="Proc-Type: 4,ENCRYPTED\r\n",s+="DEK-Info: "+r+","+i+"\r\n",s+="\r\n",s+=p,s+="\r\n-----END "+t+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(t){var e=gr,n=e.getChildIdx,r=e.getV,i={},s=n(t,0);if(2!=s.length)throw"malformed format: SEQUENCE(0).items != 2: "+s.length;i.ciphertext=r(t,s[1]);var o=n(t,s[0]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+o.length;if("2a864886f70d01050d"!=r(t,o[0]))throw"this only supports pkcs5PBES2";var a=n(t,o[1]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+a.length;var u=n(t,a[1]);if(2!=u.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+u.length;if("2a864886f70d0307"!=r(t,u[0]))throw"this only supports TripleDES";i.encryptionSchemeAlg="TripleDES",i.encryptionSchemeIV=r(t,u[1]);var l=n(t,a[0]);if(2!=l.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+l.length;if("2a864886f70d01050c"!=r(t,l[0]))throw"this only supports pkcs5PBKDF2";var c=n(t,l[1]);if(c.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+c.length;i.pbkdf2Salt=r(t,c[0]);var h=r(t,c[1]);try{i.pbkdf2Iter=parseInt(h,16)}catch(t){throw"malformed format pbkdf2Iter: "+h}return i},getPBKDF2KeyHexFromParam:function(t,e){var n=$n.enc.Hex.parse(t.pbkdf2Salt),r=t.pbkdf2Iter,i=$n.PBKDF2(e,n,{keySize:6,iterations:r});return $n.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(t,e){var n=An(t,"ENCRYPTED PRIVATE KEY"),r=this.parseHexOfEncryptedPKCS8(n),i=Sr.getPBKDF2KeyHexFromParam(r,e),s={};s.ciphertext=$n.enc.Hex.parse(r.ciphertext);var o=$n.enc.Hex.parse(i),a=$n.enc.Hex.parse(r.encryptionSchemeIV),u=$n.TripleDES.decrypt(s,o,{iv:a});return $n.enc.Hex.stringify(u)},getKeyFromEncryptedPKCS8PEM:function(t,e){var n=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e);return this.getKeyFromPlainPrivatePKCS8Hex(n)},parsePlainPrivatePKCS8Hex:function(t){var e=gr,n=e.getChildIdx,r=e.getV,i={};if(i.algparam=null,"30"!=t.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var s=n(t,0);if(3!=s.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=t.substr(s[1],2))throw"malformed PKCS8 private key(code:003)";var o=n(t,s[1]);if(2!=o.length)throw"malformed PKCS8 private key(code:004)";if("06"!=t.substr(o[0],2))throw"malformed PKCS8 private key(code:005)";if(i.algoid=r(t,o[0]),"06"==t.substr(o[1],2)&&(i.algparam=r(t,o[1])),"04"!=t.substr(s[2],2))throw"malformed PKCS8 private key(code:006)";return i.keyidx=e.getVidx(t,s[2]),i},getKeyFromPlainPrivatePKCS8PEM:function(t){var e=An(t,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(e)},getKeyFromPlainPrivatePKCS8Hex:function(t){var e,n=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==n.algoid)e=new ye;else if("2a8648ce380401"==n.algoid)e=new yr.crypto.DSA;else{if("2a8648ce3d0201"!=n.algoid)throw"unsupported private key algorithm";e=new yr.crypto.ECDSA}return e.readPKCS8PrvKeyHex(t),e},_getKeyFromPublicPKCS8Hex:function(t){var e,n=gr.getVbyList(t,0,[0,0],"06");if("2a864886f70d010101"===n)e=new ye;else if("2a8648ce380401"===n)e=new yr.crypto.DSA;else{if("2a8648ce3d0201"!==n)throw"unsupported PKCS#8 public key hex";e=new yr.crypto.ECDSA}return e.readPKCS8PubKeyHex(t),e},parsePublicRawRSAKeyHex:function(t){var e=gr,n=e.getChildIdx,r=e.getV,i={};if("30"!=t.substr(0,2))throw"malformed RSA key(code:001)";var s=n(t,0);if(2!=s.length)throw"malformed RSA key(code:002)";if("02"!=t.substr(s[0],2))throw"malformed RSA key(code:003)";if(i.n=r(t,s[0]),"02"!=t.substr(s[1],2))throw"malformed RSA key(code:004)";return i.e=r(t,s[1]),i},parsePublicPKCS8Hex:function(t){var e=gr,n=e.getChildIdx,r=e.getV,i={};i.algparam=null;var s=n(t,0);if(2!=s.length)throw"outer DERSequence shall have 2 elements: "+s.length;var o=s[0];if("30"!=t.substr(o,2))throw"malformed PKCS8 public key(code:001)";var a=n(t,o);if(2!=a.length)throw"malformed PKCS8 public key(code:002)";if("06"!=t.substr(a[0],2))throw"malformed PKCS8 public key(code:003)";if(i.algoid=r(t,a[0]),"06"==t.substr(a[1],2)?i.algparam=r(t,a[1]):"30"==t.substr(a[1],2)&&(i.algparam={},i.algparam.p=e.getVbyList(t,a[1],[0],"02"),i.algparam.q=e.getVbyList(t,a[1],[1],"02"),i.algparam.g=e.getVbyList(t,a[1],[2],"02")),"03"!=t.substr(s[1],2))throw"malformed PKCS8 public key(code:004)";return i.key=r(t,s[1]).substr(2),i}}}();Sr.getKey=function(t,e,n){var r=gr,i=r.getChildIdx,o=(r.getV,r.getVbyList),a=yr.crypto,u=a.ECDSA,l=a.DSA,c=ye,h=An,f=Sr;if("undefined"!=typeof c&&t instanceof c)return t;if("undefined"!=typeof u&&t instanceof u)return t;if("undefined"!=typeof l&&t instanceof l)return t;if(void 0!==t.curve&&void 0!==t.xy&&void 0===t.d)return new u({pub:t.xy,curve:t.curve});if(void 0!==t.curve&&void 0!==t.d)return new u({prv:t.d,curve:t.curve});if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d){var d=new c;return d.setPublic(t.n,t.e),d}if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0!==t.p&&void 0!==t.q&&void 0!==t.dp&&void 0!==t.dq&&void 0!==t.co&&void 0===t.qi){var d=new c;return d.setPrivateEx(t.n,t.e,t.d,t.p,t.q,t.dp,t.dq,t.co),d}if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0===t.p){var d=new c;return d.setPrivate(t.n,t.e,t.d),d}if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0===t.x){var d=new l;return d.setPublic(t.p,t.q,t.g,t.y),d}if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0!==t.x){var d=new l;return d.setPrivate(t.p,t.q,t.g,t.y,t.x),d}if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d){var d=new c;return d.setPublic(pn(t.n),pn(t.e)),d}if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0!==t.p&&void 0!==t.q&&void 0!==t.dp&&void 0!==t.dq&&void 0!==t.qi){var d=new c;return d.setPrivateEx(pn(t.n),pn(t.e),pn(t.d),pn(t.p),pn(t.q),pn(t.dp),pn(t.dq),pn(t.qi)),d}if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d){var d=new c;return d.setPrivate(pn(t.n),pn(t.e),pn(t.d)),d}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0===t.d){var p=new u({curve:t.crv}),g=p.ecparams.keylen/4,y=("0000000000"+pn(t.x)).slice(-g),v=("0000000000"+pn(t.y)).slice(-g),m="04"+y+v;return p.setPublicKeyHex(m),p}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0!==t.d){var p=new u({curve:t.crv}),g=p.ecparams.keylen/4,y=("0000000000"+pn(t.x)).slice(-g),v=("0000000000"+pn(t.y)).slice(-g),m="04"+y+v,b=("0000000000"+pn(t.d)).slice(-g);return p.setPublicKeyHex(m),p.setPrivateKeyHex(b),p}if("pkcs5prv"===n){var S,d,w=t,r=gr;if(S=i(w,0),9===S.length)d=new c,d.readPKCS5PrvKeyHex(w);else if(6===S.length)d=new l,d.readPKCS5PrvKeyHex(w);else{if(!(S.length>2&&"04"===w.substr(S[1],2)))throw"unsupported PKCS#1/5 hexadecimal key";d=new u,d.readPKCS5PrvKeyHex(w)}return d}if("pkcs8prv"===n){var d=f.getKeyFromPlainPrivatePKCS8Hex(t);return d}if("pkcs8pub"===n)return f._getKeyFromPublicPKCS8Hex(t);if("x509pub"===n)return Wn.getPublicKeyFromCertHex(t);if(-1!=t.indexOf("-END CERTIFICATE-",0)||-1!=t.indexOf("-END X509 CERTIFICATE-",0)||-1!=t.indexOf("-END TRUSTED CERTIFICATE-",0))return Wn.getPublicKeyFromCertPEM(t);if(-1!=t.indexOf("-END PUBLIC KEY-")){var x=An(t,"PUBLIC KEY");return f._getKeyFromPublicPKCS8Hex(x)}if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var E=h(t,"RSA PRIVATE KEY");return f.getKey(E,null,"pkcs5prv")}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var F=h(t,"DSA PRIVATE KEY"),A=o(F,0,[1],"02"),C=o(F,0,[2],"02"),T=o(F,0,[3],"02"),P=o(F,0,[4],"02"),D=o(F,0,[5],"02"),d=new l;return d.setPrivate(new s(A,16),new s(C,16),new s(T,16),new s(P,16),new s(D,16)),d}if(-1!=t.indexOf("-END PRIVATE KEY-"))return f.getKeyFromPlainPrivatePKCS8PEM(t);if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var I=f.getDecryptedKeyHex(t,e),k=new ye;return k.readPKCS5PrvKeyHex(I),k}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var F=f.getDecryptedKeyHex(t,e),d=o(F,0,[1],"04"),N=o(F,0,[2,0],"06"),R=o(F,0,[3,0],"03").substr(2),B="";if(void 0===yr.crypto.OID.oidhex2name[N])throw"undefined OID(hex) in KJUR.crypto.OID: "+N;B=yr.crypto.OID.oidhex2name[N];var p=new u({curve:B});return p.setPublicKeyHex(R),p.setPrivateKeyHex(d),p.isPublic=!1,p}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var F=f.getDecryptedKeyHex(t,e),A=o(F,0,[1],"02"),C=o(F,0,[2],"02"),T=o(F,0,[3],"02"),P=o(F,0,[4],"02"),D=o(F,0,[5],"02"),d=new l;return d.setPrivate(new s(A,16),new s(C,16),new s(T,16),new s(P,16),new s(D,16)),d}if(-1!=t.indexOf("-END ENCRYPTED PRIVATE KEY-"))return f.getKeyFromEncryptedPKCS8PEM(t,e);throw"not supported argument"},Sr.generateKeypair=function(t,e){if("RSA"==t){var n=e,r=new ye;r.generate(n,"10001"),r.isPrivate=!0,r.isPublic=!0;var i=new ye,s=r.n.toString(16),o=r.e.toString(16);i.setPublic(s,o),i.isPrivate=!1,i.isPublic=!0;var a={};return a.prvKeyObj=r,a.pubKeyObj=i,a}if("EC"==t){var u=e,l=new yr.crypto.ECDSA({curve:u}),c=l.generateKeyPairHex(),r=new yr.crypto.ECDSA({curve:u});r.setPublicKeyHex(c.ecpubhex),r.setPrivateKeyHex(c.ecprvhex),r.isPrivate=!0,r.isPublic=!1;var i=new yr.crypto.ECDSA({curve:u});i.setPublicKeyHex(c.ecpubhex),i.isPrivate=!1,i.isPublic=!0;var a={};return a.prvKeyObj=r,a.pubKeyObj=i,a}throw"unknown algorithm: "+t},Sr.getPEM=function(t,e,n,r,i,s){function o(t){return d({seq:[{int:0},{int:{bigint:t.n}},{int:t.e},{int:{bigint:t.d}},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.dmp1}},{int:{bigint:t.dmq1}},{int:{bigint:t.coeff}}]})}function a(t){return d({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a0",!0,{oid:{name:t.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]})}function u(t){return d({seq:[{int:0},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}},{int:{bigint:t.y}},{int:{bigint:t.x}}]})}var l=yr,c=l.asn1,h=c.DERObjectIdentifier,f=c.DERInteger,d=c.ASN1Util.newObject,p=c.x509,g=p.SubjectPublicKeyInfo,y=l.crypto,v=y.DSA,m=y.ECDSA,b=ye;if((void 0!==b&&t instanceof b||void 0!==v&&t instanceof v||void 0!==m&&t instanceof m)&&1==t.isPublic&&(void 0===e||"PKCS8PUB"==e)){var S=new g(t),w=S.getEncodedHex();return Fn(w,"PUBLIC KEY")}if("PKCS1PRV"==e&&void 0!==b&&t instanceof b&&(void 0===n||null==n)&&1==t.isPrivate){var S=o(t),w=S.getEncodedHex();return Fn(w,"RSA PRIVATE KEY")}if("PKCS1PRV"==e&&void 0!==m&&t instanceof m&&(void 0===n||null==n)&&1==t.isPrivate){var x=new h({name:t.curveName}),E=x.getEncodedHex(),F=a(t),A=F.getEncodedHex(),C="";return C+=Fn(E,"EC PARAMETERS"),C+=Fn(A,"EC PRIVATE KEY")}if("PKCS1PRV"==e&&void 0!==v&&t instanceof v&&(void 0===n||null==n)&&1==t.isPrivate){var S=u(t),w=S.getEncodedHex();return Fn(w,"DSA PRIVATE KEY")}if("PKCS5PRV"==e&&void 0!==b&&t instanceof b&&void 0!==n&&null!=n&&1==t.isPrivate){var S=o(t),w=S.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",w,n,r,s)}if("PKCS5PRV"==e&&void 0!==m&&t instanceof m&&void 0!==n&&null!=n&&1==t.isPrivate){var S=a(t),w=S.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",w,n,r,s)}if("PKCS5PRV"==e&&void 0!==v&&t instanceof v&&void 0!==n&&null!=n&&1==t.isPrivate){var S=u(t),w=S.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",w,n,r,s)}var T=function(t,e){var n=P(t,e);return new d({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:n.pbkdf2Salt}},{int:n.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:n.encryptionSchemeIV}}]}]}]},{octstr:{hex:n.ciphertext}}]}).getEncodedHex()},P=function(t,e){var n=$n.lib.WordArray.random(8),r=$n.lib.WordArray.random(8),i=$n.PBKDF2(e,n,{keySize:6,iterations:100}),s=$n.enc.Hex.parse(t),o=$n.TripleDES.encrypt(s,i,{iv:r})+"",a={};return a.ciphertext=o,a.pbkdf2Salt=$n.enc.Hex.stringify(n),a.pbkdf2Iter=100,a.encryptionSchemeAlg="DES-EDE3-CBC",a.encryptionSchemeIV=$n.enc.Hex.stringify(r),a};if("PKCS8PRV"==e&&void 0!=b&&t instanceof b&&1==t.isPrivate){var D=o(t),I=D.getEncodedHex(),S=d({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:I}}]}),w=S.getEncodedHex();if(void 0===n||null==n)return Fn(w,"PRIVATE KEY");var A=T(w,n);return Fn(A,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&void 0!==m&&t instanceof m&&1==t.isPrivate){var D=new d({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]}),I=D.getEncodedHex(),S=d({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:t.curveName}}]},{octstr:{hex:I}}]}),w=S.getEncodedHex();if(void 0===n||null==n)return Fn(w,"PRIVATE KEY");var A=T(w,n);return Fn(A,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&void 0!==v&&t instanceof v&&1==t.isPrivate){var D=new f({bigint:t.x}),I=D.getEncodedHex(),S=d({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]}]},{octstr:{hex:I}}]}),w=S.getEncodedHex();if(void 0===n||null==n)return Fn(w,"PRIVATE KEY");var A=T(w,n);return Fn(A,"ENCRYPTED PRIVATE KEY")}throw"unsupported object nor format"},Sr.getKeyFromCSRPEM=function(t){var e=An(t,"CERTIFICATE REQUEST");return Sr.getKeyFromCSRHex(e)},Sr.getKeyFromCSRHex=function(t){var e=Sr.parseCSRHex(t);return Sr.getKey(e.p8pubkeyhex,null,"pkcs8pub")},Sr.parseCSRHex=function(t){var e=gr,n=e.getChildIdx,r=e.getTLV,i={},s=t;if("30"!=s.substr(0,2))throw"malformed CSR(code:001)";var o=n(s,0);if(o.length<1)throw"malformed CSR(code:002)";if("30"!=s.substr(o[0],2))throw"malformed CSR(code:003)";var a=n(s,o[0]);if(a.length<3)throw"malformed CSR(code:004)";return i.p8pubkeyhex=r(s,a[2]),i},Sr.getJWKFromKey=function(t){var e={};if(t instanceof ye&&t.isPrivate)return e.kty="RSA",e.n=dn(t.n.toString(16)),e.e=dn(t.e.toString(16)),e.d=dn(t.d.toString(16)),e.p=dn(t.p.toString(16)),e.q=dn(t.q.toString(16)),e.dp=dn(t.dmp1.toString(16)),e.dq=dn(t.dmq1.toString(16)),e.qi=dn(t.coeff.toString(16)),e;if(t instanceof ye&&t.isPublic)return e.kty="RSA",e.n=dn(t.n.toString(16)),e.e=dn(t.e.toString(16)),e;if(t instanceof yr.crypto.ECDSA&&t.isPrivate){var n=t.getShortNISTPCurveName();if("P-256"!==n&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;var r=t.getPublicKeyXYHex();return e.kty="EC",e.crv=n,e.x=dn(r.x),e.y=dn(r.y),e.d=dn(t.prvKeyHex),e}if(t instanceof yr.crypto.ECDSA&&t.isPublic){var n=t.getShortNISTPCurveName();if("P-256"!==n&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;var r=t.getPublicKeyXYHex();return e.kty="EC",e.crv=n,e.x=dn(r.x),e.y=dn(r.y),e}throw"not supported key object"},ye.getPosArrayOfChildrenFromHex=function(t){return gr.getChildIdx(t,0)},ye.getHexValueArrayOfChildrenFromHex=function(t){var e=gr,n=e.getV,r=ye.getPosArrayOfChildrenFromHex(t),i=n(t,r[0]),s=n(t,r[1]),o=n(t,r[2]),a=n(t,r[3]),u=n(t,r[4]),l=n(t,r[5]),c=n(t,r[6]),h=n(t,r[7]),f=n(t,r[8]),r=new Array;return r.push(i,s,o,a,u,l,c,h,f),r},ye.prototype.readPrivateKeyFromPEMString=function(t){var e=An(t),n=ye.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])},ye.prototype.readPKCS5PrvKeyHex=function(t){var e=ye.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},ye.prototype.readPKCS8PrvKeyHex=function(t){var e,n,r,i,s,o,a,u,l=gr,c=l.getVbyList;if(!1===l.isASN1HEX(t))throw"not ASN.1 hex string";try{e=c(t,0,[2,0,1],"02"),n=c(t,0,[2,0,2],"02"),r=c(t,0,[2,0,3],"02"),i=c(t,0,[2,0,4],"02"),s=c(t,0,[2,0,5],"02"),o=c(t,0,[2,0,6],"02"),a=c(t,0,[2,0,7],"02"),u=c(t,0,[2,0,8],"02")}catch(t){throw"malformed PKCS#8 plain RSA private key"}this.setPrivateEx(e,n,r,i,s,o,a,u)},ye.prototype.readPKCS5PubKeyHex=function(t){var e=gr,n=e.getV;if(!1===e.isASN1HEX(t))throw"keyHex is not ASN.1 hex string";var r=e.getChildIdx(t,0);if(2!==r.length||"02"!==t.substr(r[0],2)||"02"!==t.substr(r[1],2))throw"wrong hex for PKCS#5 public key";var i=n(t,r[0]),s=n(t,r[1]);this.setPublic(i,s)},ye.prototype.readPKCS8PubKeyHex=function(t){var e=gr;if(!1===e.isASN1HEX(t))throw"not ASN.1 hex string";if("06092a864886f70d010101"!==e.getTLVbyList(t,0,[0,0]))throw"not PKCS8 RSA public key";var n=e.getTLVbyList(t,0,[1,0]);this.readPKCS5PubKeyHex(n)},ye.prototype.readCertPubKeyHex=function(t,e){var n,r;n=new Wn,n.readCertHex(t),r=n.getPublicKeyHex(),this.readPKCS8PubKeyHex(r)};var wr=new RegExp("");wr.compile("[^0-9a-f]","gi"),ye.prototype.sign=function(t,e){var n=function(t){return yr.crypto.Util.hashString(t,e)}(t);return this.signWithMessageHash(n,e)},ye.prototype.signWithMessageHash=function(t,e){var n=yr.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),r=fe(n,16);return Kn(this.doPrivate(r).toString(16),this.n.bitLength())},ye.prototype.signPSS=function(t,e,n){var r=function(t){return yr.crypto.Util.hashHex(t,e)}(Sn(t));return void 0===n&&(n=-1),this.signWithMessageHashPSS(r,e,n)},ye.prototype.signWithMessageHashPSS=function(t,e,n){var r,i=bn(t),o=i.length,a=this.n.bitLength()-1,u=Math.ceil(a/8),l=function(t){return yr.crypto.Util.hashHex(t,e)};if(-1===n||void 0===n)n=o;else if(-2===n)n=u-o-2;else if(n<-2)throw"invalid salt length";if(u<o+n+2)throw"data too long";var c="";n>0&&(c=new Array(n),(new he).nextBytes(c),c=String.fromCharCode.apply(String,c));var h=bn(l(Sn("\0\0\0\0\0\0\0\0"+i+c))),f=[];for(r=0;r<u-n-o-2;r+=1)f[r]=0;var d=String.fromCharCode.apply(String,f)+"\x01"+c,p=qn(h,d.length,l),g=[];for(r=0;r<d.length;r+=1)g[r]=d.charCodeAt(r)^p.charCodeAt(r);var y=65280>>8*u-a&255;for(g[0]&=~y,r=0;r<o;r++)g.push(h.charCodeAt(r));return g.push(188),Kn(this.doPrivate(new s(g)).toString(16),this.n.bitLength())},ye.prototype.verify=function(t,e){e=e.replace(wr,""),e=e.replace(/[ \n]+/g,"");var n=fe(e,16);if(n.bitLength()>this.n.bitLength())return 0;var r=this.doPublic(n),i=r.toString(16).replace(/^1f+00/,""),s=zn(i);if(0==s.length)return!1;var o=s[0],a=s[1];return a==function(t){return yr.crypto.Util.hashString(t,o)}(t)},ye.prototype.verifyWithMessageHash=function(t,e){e=e.replace(wr,""),e=e.replace(/[ \n]+/g,"");var n=fe(e,16);if(n.bitLength()>this.n.bitLength())return 0;var r=this.doPublic(n),i=r.toString(16).replace(/^1f+00/,""),s=zn(i);if(0==s.length)return!1;s[0];return s[1]==t},ye.prototype.verifyPSS=function(t,e,n,r){var i=function(t){return yr.crypto.Util.hashHex(t,n)}(Sn(t));return void 0===r&&(r=-1),this.verifyWithMessageHashPSS(i,e,n,r)},ye.prototype.verifyWithMessageHashPSS=function(t,e,n,r){var i=new s(e,16);if(i.bitLength()>this.n.bitLength())return!1;var o,a=function(t){return yr.crypto.Util.hashHex(t,n)},u=bn(t),l=u.length,c=this.n.bitLength()-1,h=Math.ceil(c/8);if(-1===r||void 0===r)r=l;else if(-2===r)r=h-l-2;else if(r<-2)throw"invalid salt length";if(h<l+r+2)throw"data too long";var f=this.doPublic(i).toByteArray();for(o=0;o<f.length;o+=1)f[o]&=255;for(;f.length<h;)f.unshift(0);if(188!==f[h-1])throw"encoded message does not end in 0xbc";f=String.fromCharCode.apply(String,f);var d=f.substr(0,h-l-1),p=f.substr(d.length,l),g=65280>>8*h-c&255;if(0!==(d.charCodeAt(0)&g))throw"bits beyond keysize not zero";var y=qn(p,d.length,a),v=[];for(o=0;o<d.length;o+=1)v[o]=d.charCodeAt(o)^y.charCodeAt(o);v[0]&=~g;var m=h-l-r-2;for(o=0;o<m;o+=1)if(0!==v[o])throw"leftmost octets not zero";if(1!==v[m])throw"0x01 marker not found";return p===bn(a(Sn("\0\0\0\0\0\0\0\0"+u+String.fromCharCode.apply(String,v.slice(-r)))))},ye.SALT_LEN_HLEN=-1,ye.SALT_LEN_MAX=-2,ye.SALT_LEN_RECOVER=-2,Wn.hex2dn=function(t,e){if(void 0===e&&(e=0),"30"!==t.substr(e,2))throw"malformed DN";for(var n=new Array,r=gr.getChildIdx(t,e),i=0;i<r.length;i++)n.push(Wn.hex2rdn(t,r[i]));return n=n.map(function(t){return t.replace("/","\\/")}),"/"+n.join("/")},Wn.hex2rdn=function(t,e){if(void 0===e&&(e=0),"31"!==t.substr(e,2))throw"malformed RDN";for(var n=new Array,r=gr.getChildIdx(t,e),i=0;i<r.length;i++)n.push(Wn.hex2attrTypeValue(t,r[i]));return n=n.map(function(t){return t.replace("+","\\+")}),n.join("+")},Wn.hex2attrTypeValue=function(t,e){var n=gr,r=n.getV;if(void 0===e&&(e=0),"30"!==t.substr(e,2))throw"malformed attribute type and value";var i=n.getChildIdx(t,e);2!==i.length||t.substr(i[0],2);var s=r(t,i[0]),o=yr.asn1.ASN1Util.oidHexToInt(s);return yr.asn1.x509.OID.oid2atype(o)+"="+bn(r(t,i[1]))},Wn.getPublicKeyFromCertHex=function(t){var e=new Wn;return e.readCertHex(t),e.getPublicKey()},Wn.getPublicKeyFromCertPEM=function(t){var e=new Wn;return e.readCertPEM(t),e.getPublicKey()},Wn.getPublicKeyInfoPropOfCertPEM=function(t){var e,n,r=gr,i=r.getVbyList,s={};return s.algparam=null,e=new Wn,e.readCertPEM(t),n=e.getPublicKeyHex(),s.keyhex=i(n,0,[1],"03").substr(2),s.algoid=i(n,0,[0,0],"06"),"2a8648ce3d0201"===s.algoid&&(s.algparam=i(n,0,[0,1],"06")),s},Wn.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"],"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.jws&&yr.jws||(yr.jws={}),yr.jws.JWS=function(){var t=yr,e=t.jws.JWS,n=e.isSafeJSONString;this.parseJWS=function(t,e){if(void 0===this.parsedJWS||!e&&void 0===this.parsedJWS.sigvalH){var r=t.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(null==r)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var i=r[1],s=r[2],o=r[3],a=i+"."+s;if(this.parsedJWS={},this.parsedJWS.headB64U=i,this.parsedJWS.payloadB64U=s,this.parsedJWS.sigvalB64U=o,this.parsedJWS.si=a,!e){var u=pn(o),l=fe(u,16);this.parsedJWS.sigvalH=u,this.parsedJWS.sigvalBI=l}var c=mr(i),h=mr(s);if(this.parsedJWS.headS=c,this.parsedJWS.payloadS=h,!n(c,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+c}}},yr.jws.JWS.sign=function(t,e,n,r,i){var s,o,a,u=yr,l=u.jws,c=l.JWS,h=c.readSafeJSONString,f=c.isSafeJSONString,d=u.crypto,p=(d.ECDSA,d.Mac),g=d.Signature,y=JSON;if("string"!=typeof e&&"object"!=typeof e)throw"spHeader must be JSON string or object: "+e;if("object"==typeof e&&(o=e,s=y.stringify(o)),"string"==typeof e){if(s=e,!f(s))throw"JWS Head is not safe JSON string: "+s;o=h(s)}if(a=n,"object"==typeof n&&(a=y.stringify(n)),""!=t&&null!=t||void 0===o.alg||(t=o.alg),""!=t&&null!=t&&void 0===o.alg&&(o.alg=t,s=y.stringify(o)),t!==o.alg)throw"alg and sHeader.alg doesn't match: "+t+"!="+o.alg;var v=null;if(void 0===c.jwsalg2sigalg[t])throw"unsupported alg name: "+t;v=c.jwsalg2sigalg[t];var m=vr(s),b=vr(a),S=m+"."+b,w="";if("Hmac"==v.substr(0,4)){if(void 0===r)throw"mac key shall be specified for HS* alg";var x=new p({alg:v,prov:"cryptojs",pass:r});x.updateString(S),w=x.doFinal()}else if(-1!=v.indexOf("withECDSA")){var E=new g({alg:v});E.init(r,i),E.updateString(S),hASN1Sig=E.sign(),w=yr.crypto.ECDSA.asn1SigToConcatSig(hASN1Sig)}else if("none"!=v){var E=new g({alg:v});E.init(r,i),E.updateString(S),w=E.sign()}return S+"."+dn(w)},yr.jws.JWS.verify=function(t,e,n){var r,i=yr,s=i.jws,o=s.JWS,a=o.readSafeJSONString,u=i.crypto,l=u.ECDSA,c=u.Mac,h=u.Signature;void 0!==typeof ye&&(r=ye);var f=t.split(".");if(3!==f.length)return!1;var d=f[0],p=f[1],g=d+"."+p,y=pn(f[2]),v=a(mr(f[0])),m=null,b=null;if(void 0===v.alg)throw"algorithm not specified in header";if(m=v.alg,b=m.substr(0,2),null!=n&&"[object Array]"===Object.prototype.toString.call(n)&&n.length>0){if(-1==(":"+n.join(":")+":").indexOf(":"+m+":"))throw"algorithm '"+m+"' not accepted in the list"}if("none"!=m&&null===e)throw"key shall be specified to verify.";if("string"==typeof e&&-1!=e.indexOf("-----BEGIN ")&&(e=Sr.getKey(e)),("RS"==b||"PS"==b)&&!(e instanceof r))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==b&&!(e instanceof l))throw"key shall be a ECDSA obj for ES* algs";var S=null;if(void 0===o.jwsalg2sigalg[v.alg])throw"unsupported alg name: "+m;if("none"==(S=o.jwsalg2sigalg[m]))throw"not supported";if("Hmac"==S.substr(0,4)){var w=null;if(void 0===e)throw"hexadecimal key shall be specified for HMAC";var x=new c({alg:S,pass:e});return x.updateString(g),w=x.doFinal(),y==w}if(-1!=S.indexOf("withECDSA")){var E=null;try{E=l.concatSigToASN1Sig(y)}catch(t){return!1}var F=new h({alg:S});return F.init(e),F.updateString(g),F.verify(E)}var F=new h({alg:S});return F.init(e),F.updateString(g),F.verify(y)},yr.jws.JWS.parse=function(t){var e,n,r,i=t.split("."),s={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return e=i[0],n=i[1],3==i.length&&(r=i[2]),s.headerObj=yr.jws.JWS.readSafeJSONString(mr(e)),s.payloadObj=yr.jws.JWS.readSafeJSONString(mr(n)),s.headerPP=JSON.stringify(s.headerObj,null,"  "),null==s.payloadObj?s.payloadPP=mr(n):s.payloadPP=JSON.stringify(s.payloadObj,null,"  "),void 0!==r&&(s.sigHex=pn(r)),s},yr.jws.JWS.verifyJWT=function(t,e,n){var r=yr,i=r.jws,s=i.JWS,o=s.readSafeJSONString,a=s.inArray,u=s.includedArray,l=t.split("."),c=l[0],h=l[1],f=(pn(l[2]),o(mr(c))),d=o(mr(h));if(void 0===f.alg)return!1;if(void 0===n.alg)throw"acceptField.alg shall be specified";if(!a(f.alg,n.alg))return!1;if(void 0!==d.iss&&"object"===typeof n.iss&&!a(d.iss,n.iss))return!1;if(void 0!==d.sub&&"object"===typeof n.sub&&!a(d.sub,n.sub))return!1;if(void 0!==d.aud&&"object"===typeof n.aud)if("string"==typeof d.aud){if(!a(d.aud,n.aud))return!1}else if("object"==typeof d.aud&&!u(d.aud,n.aud))return!1;var p=i.IntDate.getNow();return void 0!==n.verifyAt&&"number"===typeof n.verifyAt&&(p=n.verifyAt),void 0!==n.gracePeriod&&"number"===typeof n.gracePeriod||(n.gracePeriod=0),!(void 0!==d.exp&&"number"==typeof d.exp&&d.exp+n.gracePeriod<p)&&(!(void 0!==d.nbf&&"number"==typeof d.nbf&&p<d.nbf-n.gracePeriod)&&(!(void 0!==d.iat&&"number"==typeof d.iat&&p<d.iat-n.gracePeriod)&&((void 0===d.jti||void 0===n.jti||d.jti===n.jti)&&!!s.verify(t,e,n.alg))))},yr.jws.JWS.includedArray=function(t,e){var n=yr.jws.JWS.inArray;if(null===t)return!1;if("object"!==typeof t)return!1;if("number"!==typeof t.length)return!1;for(var r=0;r<t.length;r++)if(!n(t[r],e))return!1;return!0},yr.jws.JWS.inArray=function(t,e){if(null===e)return!1;if("object"!==typeof e)return!1;if("number"!==typeof e.length)return!1;for(var n=0;n<e.length;n++)if(e[n]==t)return!0;return!1},yr.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"},yr.jws.JWS.isSafeJSONString=function(t,e,n){var r=null;try{return"object"!=typeof(r=pr(t))?0:r.constructor===Array?0:(e&&(e[n]=r),1)}catch(t){return 0}},yr.jws.JWS.readSafeJSONString=function(t){var e=null;try{return e=pr(t),"object"!=typeof e?null:e.constructor===Array?null:e}catch(t){return null}},yr.jws.JWS.getEncodedSignatureValueFromJWS=function(t){var e=t.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(null==e)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return e[1]},yr.jws.JWS.getJWKthumbprint=function(t){if("RSA"!==t.kty&&"EC"!==t.kty&&"oct"!==t.kty)throw"unsupported algorithm for JWK Thumprint";var e="{";if("RSA"===t.kty){if("string"!=typeof t.n||"string"!=typeof t.e)throw"wrong n and e value for RSA key";e+='"e":"'+t.e+'",',e+='"kty":"'+t.kty+'",',e+='"n":"'+t.n+'"}'}else if("EC"===t.kty){if("string"!=typeof t.crv||"string"!=typeof t.x||"string"!=typeof t.y)throw"wrong crv, x and y value for EC key";e+='"crv":"'+t.crv+'",',e+='"kty":"'+t.kty+'",',e+='"x":"'+t.x+'",',e+='"y":"'+t.y+'"}'}else if("oct"===t.kty){if("string"!=typeof t.k)throw"wrong k value for oct(symmetric) key";e+='"kty":"'+t.kty+'",',e+='"k":"'+t.k+'"}'}var n=Sn(e);return dn(yr.crypto.Util.hashHex(n,"sha256"))},yr.jws.IntDate={},yr.jws.IntDate.get=function(t){var e=yr.jws.IntDate,n=e.getNow,r=e.getZulu;if("now"==t)return n();if("now + 1hour"==t)return n()+3600;if("now + 1day"==t)return n()+86400;if("now + 1month"==t)return n()+2592e3;if("now + 1year"==t)return n()+31536e3;if(t.match(/Z$/))return r(t);if(t.match(/^[0-9]+$/))return parseInt(t);throw"unsupported format: "+t},yr.jws.IntDate.getZulu=function(t){return Dn(t)},yr.jws.IntDate.getNow=function(){return~~(new Date/1e3)},yr.jws.IntDate.intDate2UTCString=function(t){return new Date(1e3*t).toUTCString()},yr.jws.IntDate.intDate2Zulu=function(t){var e=new Date(1e3*t);return("0000"+e.getUTCFullYear()).slice(-4)+("00"+(e.getUTCMonth()+1)).slice(-2)+("00"+e.getUTCDate()).slice(-2)+("00"+e.getUTCHours()).slice(-2)+("00"+e.getUTCMinutes()).slice(-2)+("00"+e.getUTCSeconds()).slice(-2)+"Z"},"undefined"!=typeof yr&&yr||(yr={}),"undefined"!=typeof yr.jws&&yr.jws||(yr.jws={}),yr.jws.JWSJS=function(){var t=yr,e=t.jws,n=e.JWS,r=n.readSafeJSONString;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload=void 0,this.aSignature=[]},this.initWithJWS=function(t){this.init();var e=t.split(".");if(3!=e.length)throw"malformed input JWS";this.aHeader.push(e[0]),this.sPayload=e[1],this.aSignature.push(e[2])},this.addSignature=function(t,e,n,r){if(void 0===this.sPayload||null===this.sPayload)throw"there's no JSON-JS signature to add.";var i=this.aHeader.length;if(this.aHeader.length!=this.aSignature.length)throw"aHeader.length != aSignature.length";try{var s=yr.jws.JWS.sign(t,e,this.sPayload,n,r),o=s.split(".");o[0],o[2];this.aHeader.push(o[0]),this.aSignature.push(o[2])}catch(t){throw this.aHeader.length>i&&this.aHeader.pop(),this.aSignature.length>i&&this.aSignature.pop(),"addSignature failed: "+t}},this.verifyAll=function(t){if(this.aHeader.length!==t.length||this.aSignature.length!==t.length)return!1;for(var e=0;e<t.length;e++){var n=t[e];if(2!==n.length)return!1;if(!1===this.verifyNth(e,n[0],n[1]))return!1}return!0},this.verifyNth=function(t,e,r){if(this.aHeader.length<=t||this.aSignature.length<=t)return!1;var i=this.aHeader[t],s=this.aSignature[t],o=i+"."+this.sPayload+"."+s,a=!1;try{a=n.verify(o,e,r)}catch(t){return!1}return a},this.readJWSJS=function(t){if("string"===typeof t){var e=r(t);if(null==e)throw"argument is not safe JSON object string";this.aHeader=e.headers,this.sPayload=e.payload,this.aSignature=e.signatures}else try{if(!(t.headers.length>0))throw"malformed header";if(this.aHeader=t.headers,"string"!==typeof t.payload)throw"malformed signatures";if(this.sPayload=t.payload,!(t.signatures.length>0))throw"malformed signatures";this.aSignatures=t.signatures}catch(t){throw"malformed JWS-JS JSON object: "+t}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return 0==this.aHeader.length?1:0}},e.SecureRandom=he,e.rng_seed_time=ue,e.BigInteger=s,e.RSAKey=ye,e.ECDSA=yr.crypto.ECDSA,e.DSA=yr.crypto.DSA,e.Signature=yr.crypto.Signature,e.MessageDigest=yr.crypto.MessageDigest,e.Mac=yr.crypto.Mac,e.Cipher=yr.crypto.Cipher,e.KEYUTIL=Sr,e.ASN1HEX=gr,e.X509=Wn,e.CryptoJS=$n,e.b64tohex=r,e.b64toBA=i,e.stoBA=rn,e.BAtos=sn,e.BAtohex=on,e.stohex=an,e.stob64=un,e.stob64u=ln,e.b64utos=cn,e.b64tob64u=hn,e.b64utob64=fn,e.hex2b64=n,e.hextob64u=dn,e.b64utohex=pn,e.utf8tob64u=vr,e.b64utoutf8=mr,e.utf8tob64=gn,e.b64toutf8=yn,e.utf8tohex=vn,e.hextoutf8=mn,e.hextorstr=bn,e.rstrtohex=Sn,e.hextob64=wn,e.hextob64nl=xn,e.b64nltohex=En,e.hextopem=Fn,e.pemtohex=An,e.hextoArrayBuffer=Cn,e.ArrayBuffertohex=Tn,e.zulutomsec=Pn,e.zulutosec=Dn,e.zulutodate=In,e.datetozulu=kn,e.uricmptohex=Nn,e.hextouricmp=Rn,e.ipv6tohex=Bn,e.hextoipv6=_n,e.hextoip=Hn,e.iptohex=On,e.encodeURIComponentAll=jn,e.newline_toUnix=Ln,e.newline_toDos=Vn,e.hextoposhex=Mn,e.intarystrtohex=Un,e.strdiffidx=br,e.KJUR=yr,e.crypto=yr.crypto,e.asn1=yr.asn1,e.jws=yr.jws,e.lang=yr.lang}).call(e,n(23).Buffer)},function(t,e,n){"use strict";function r(){}function i(t){try{return t.then}catch(t){return v=t,m}}function s(t,e){try{return t(e)}catch(t){return v=t,m}}function o(t,e,n){try{t(e,n)}catch(t){return v=t,m}}function a(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,t!==r&&g(t,this)}function u(t,e,n){return new t.constructor(function(i,s){var o=new a(r);o.then(i,s),l(t,new p(e,n,o))})}function l(t,e){for(;3===t._83;)t=t._18;if(a._47&&a._47(t),0===t._83)return 0===t._75?(t._75=1,void(t._38=e)):1===t._75?(t._75=2,void(t._38=[t._38,e])):void t._38.push(e);c(t,e)}function c(t,e){y(function(){var n=1===t._83?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._83?h(e.promise,t._18):f(e.promise,t._18));var r=s(n,t._18);r===m?f(e.promise,v):h(e.promise,r)})}function h(t,e){if(e===t)return f(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"===typeof e||"function"===typeof e)){var n=i(e);if(n===m)return f(t,v);if(n===t.then&&e instanceof a)return t._83=3,t._18=e,void d(t);if("function"===typeof n)return void g(n.bind(e),t)}t._83=1,t._18=e,d(t)}function f(t,e){t._83=2,t._18=e,a._71&&a._71(t,e),d(t)}function d(t){if(1===t._75&&(l(t,t._38),t._38=null),2===t._75){for(var e=0;e<t._38.length;e++)l(t,t._38[e]);t._38=null}}function p(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function g(t,e){var n=!1,r=o(t,function(t){n||(n=!0,h(e,t))},function(t){n||(n=!0,f(e,t))});n||r!==m||(n=!0,f(e,v))}var y=n(9),v=null,m={};t.exports=a,a._47=null,a._71=null,a._44=r,a.prototype.then=function(t,e){if(this.constructor!==a)return u(this,t,e);var n=new a(r);return l(this,new p(t,e,n)),n}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n},function(t,e){},function(t,e,n){n(7),t.exports=n(12)},function(t,e,n){"use strict";"undefined"===typeof Promise&&(n(8).enable(),window.Promise=n(10)),n(11),Object.assign=n(1)},function(t,e,n){"use strict";function r(){l=!1,a._47=null,a._71=null}function i(t){function e(e){(t.allRejections||o(h[e].error,t.whitelist||u))&&(h[e].displayId=c++,t.onUnhandled?(h[e].logged=!0,t.onUnhandled(h[e].displayId,h[e].error)):(h[e].logged=!0,s(h[e].displayId,h[e].error)))}function n(e){h[e].logged&&(t.onHandled?t.onHandled(h[e].displayId,h[e].error):h[e].onUnhandled||(console.warn("Promise Rejection Handled (id: "+h[e].displayId+"):"),console.warn('  This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+h[e].displayId+".")))}t=t||{},l&&r(),l=!0;var i=0,c=0,h={};a._47=function(t){2===t._83&&h[t._56]&&(h[t._56].logged?n(t._56):clearTimeout(h[t._56].timeout),delete h[t._56])},a._71=function(t,n){0===t._75&&(t._56=i++,h[t._56]={displayId:null,error:n,timeout:setTimeout(e.bind(null,t._56),o(n,u)?100:2e3),logged:!1})}}function s(t,e){console.warn("Possible Unhandled Promise Rejection (id: "+t+"):"),((e&&(e.stack||e))+"").split("\n").forEach(function(t){console.warn("  "+t)})}function o(t,e){return e.some(function(e){return t instanceof e})}var a=n(3),u=[ReferenceError,TypeError,RangeError],l=!1;e.disable=r,e.enable=i},function(t,e,n){"use strict";(function(e){function n(t){o.length||(s(),a=!0),o[o.length]=t}function r(){for(;u<o.length;){var t=u;if(u+=1,o[t].call(),u>l){for(var e=0,n=o.length-u;e<n;e++)o[e]=o[e+u];o.length-=u,u=0}}o.length=0,u=0,a=!1}function i(t){return function(){function e(){clearTimeout(n),clearInterval(r),t()}var n=setTimeout(e,0),r=setInterval(e,50)}}t.exports=n;var s,o=[],a=!1,u=0,l=1024,c="undefined"!==typeof e?e:self,h=c.MutationObserver||c.WebKitMutationObserver;s="function"===typeof h?function(t){var e=1,n=new h(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}(r):i(r),n.requestFlush=s,n.makeRequestCallFromTimer=i}).call(e,n(4))},function(t,e,n){"use strict";function r(t){var e=new i(i._44);return e._83=1,e._18=t,e}var i=n(3);t.exports=i;var s=r(!0),o=r(!1),a=r(null),u=r(void 0),l=r(0),c=r("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return u;if(!0===t)return s;if(!1===t)return o;if(0===t)return l;if(""===t)return c;if("object"===typeof t||"function"===typeof t)try{var e=t.then;if("function"===typeof e)return new i(e.bind(t))}catch(t){return new i(function(e,n){n(t)})}return r(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,n){function r(o,a){if(a&&("object"===typeof a||"function"===typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._83;)a=a._18;return 1===a._83?r(o,a._18):(2===a._83&&n(a._18),void a.then(function(t){r(o,t)},n))}var u=a.then;if("function"===typeof u){return void new i(u.bind(a)).then(function(t){r(o,t)},n)}}e[o]=a,0===--s&&t(e)}if(0===e.length)return t([]);for(var s=e.length,o=0;o<e.length;o++)r(o,e[o])})},i.reject=function(t){return new i(function(e,n){n(t)})},i.race=function(t){return new i(function(e,n){t.forEach(function(t){i.resolve(t).then(e,n)})})},i.prototype.catch=function(t){return this.then(null,t)}},function(t,e){!function(t){"use strict";function e(t){if("string"!==typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!==typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return v.iterable&&(e[Symbol.iterator]=function(){return e}),e}function i(t){this.map={},t instanceof i?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function s(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function o(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function a(t){var e=new FileReader,n=o(e);return e.readAsArrayBuffer(t),n}function u(t){var e=new FileReader,n=o(e);return e.readAsText(t),n}function l(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}function c(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"===typeof t)this._bodyText=t;else if(v.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(v.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(v.arrayBuffer&&v.blob&&b(t))this._bodyArrayBuffer=c(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!v.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!S(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=c(t)}else this._bodyText="";this.headers.get("content-type")||("string"===typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},v.blob&&(this.blob=function(){var t=s(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?s(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(a)}),this.text=function(){var t=s(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(l(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},v.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(t){var e=t.toUpperCase();return w.indexOf(e)>-1?e:t}function d(t,e){e=e||{};var n=e.body;if(t instanceof d){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new i(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new i(e.headers)),this.method=f(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function p(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function g(t){var e=new i;return t.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}function y(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new i(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var v={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(v.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(t){return t&&DataView.prototype.isPrototypeOf(t)},S=ArrayBuffer.isView||function(t){return t&&m.indexOf(Object.prototype.toString.call(t))>-1};i.prototype.append=function(t,r){t=e(t),r=n(r);var i=this.map[t];this.map[t]=i?i+","+r:r},i.prototype.delete=function(t){delete this.map[e(t)]},i.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},i.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},i.prototype.set=function(t,r){this.map[e(t)]=n(r)},i.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},i.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},i.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},i.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},v.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},h.call(d.prototype),h.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];y.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=i,t.Request=d,t.Response=y,t.fetch=function(t,e){return new Promise(function(n,r){var i=new d(t,e),s=new XMLHttpRequest;s.onload=function(){var t={status:s.status,statusText:s.statusText,headers:g(s.getAllResponseHeaders()||"")};t.url="responseURL"in s?s.responseURL:t.headers.get("X-Request-URL");var e="response"in s?s.response:s.responseText;n(new y(e,t))},s.onerror=function(){r(new TypeError("Network request failed"))},s.ontimeout=function(){r(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&v.blob&&(s.responseType="blob"),i.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n.n(r),s=n(14),o=n.n(s),a=n(5),u=(n.n(a),n(18));o.a.render(i.a.createElement(u.a,null),document.getElementById("root"))},function(t,e,n){"use strict";function r(t,e,n,r,i,s,o,a){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,s,o,a],l=0;t=Error(e.replace(/%s/g,function(){return u[l++]})),t.name="Invariant Violation"}throw t.framesToPop=1,t}}function i(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=0;i<e;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);r(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function s(t,e,n){this.props=t,this.context=e,this.refs=B,this.updater=n||R}function o(){}function a(t,e,n){this.props=t,this.context=e,this.refs=B,this.updater=n||R}function u(t,e,n){var r=void 0,i={},s=null,o=null;if(null!=e)for(r in void 0!==e.ref&&(o=e.ref),void 0!==e.key&&(s=""+e.key),e)O.call(e,r)&&!j.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(1===a)i.children=n;else if(1<a){for(var u=Array(a),l=0;l<a;l++)u[l]=arguments[l+2];i.children=u}if(t&&t.defaultProps)for(r in a=t.defaultProps)void 0===i[r]&&(i[r]=a[r]);return{$$typeof:E,type:t,key:s,ref:o,props:i,_owner:H.current}}function l(t,e){return{$$typeof:E,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function c(t){return"object"===typeof t&&null!==t&&t.$$typeof===E}function h(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function f(t,e,n,r){if(V.length){var i=V.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function d(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>V.length&&V.push(t)}function p(t,e,n,r){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var o=!1;if(null===t)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case E:case F:o=!0}}if(o)return n(r,t,""===e?"."+y(t,0):e),1;if(o=0,e=""===e?".":e+":",Array.isArray(t))for(var a=0;a<t.length;a++){s=t[a];var u=e+y(s,a);o+=p(s,u,n,r)}else if(null===t||"object"!==typeof t?u=null:(u=N&&t[N]||t["@@iterator"],u="function"===typeof u?u:null),"function"===typeof u)for(t=u.call(t),a=0;!(s=t.next()).done;)s=s.value,u=e+y(s,a++),o+=p(s,u,n,r);else"object"===s&&(n=""+t,i("31","[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}function g(t,e,n){return null==t?0:p(t,"",e,n)}function y(t,e){return"object"===typeof t&&null!==t&&null!=t.key?h(t.key):e.toString(36)}function v(t,e){t.func.call(t.context,e,t.count++)}function m(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?b(t,r,n,function(t){return t}):null!=t&&(c(t)&&(t=l(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(L,"$&/")+"/")+n)),r.push(t))}function b(t,e,n,r,i){var s="";null!=n&&(s=(""+n).replace(L,"$&/")+"/"),e=f(e,s,r,i),g(t,m,e),d(e)}function S(t,e){var n=H.currentDispatcher;return null===n&&i("277"),n.readContext(t,e)}var w=n(1),x="function"===typeof Symbol&&Symbol.for,E=x?Symbol.for("react.element"):60103,F=x?Symbol.for("react.portal"):60106,A=x?Symbol.for("react.fragment"):60107,C=x?Symbol.for("react.strict_mode"):60108,T=x?Symbol.for("react.profiler"):60114,P=x?Symbol.for("react.provider"):60109,D=x?Symbol.for("react.context"):60110,I=x?Symbol.for("react.async_mode"):60111,k=x?Symbol.for("react.forward_ref"):60112;x&&Symbol.for("react.placeholder");var N="function"===typeof Symbol&&Symbol.iterator,R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};s.prototype.isReactComponent={},s.prototype.setState=function(t,e){"object"!==typeof t&&"function"!==typeof t&&null!=t&&i("85"),this.updater.enqueueSetState(this,t,e,"setState")},s.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},o.prototype=s.prototype;var _=a.prototype=new o;_.constructor=a,w(_,s.prototype),_.isPureReactComponent=!0;var H={current:null,currentDispatcher:null},O=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0},L=/\/+/g,V=[],M={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return b(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;e=f(null,null,e,n),g(t,v,e),d(e)},count:function(t){return g(t,function(){return null},null)},toArray:function(t){var e=[];return b(t,e,null,function(t){return t}),e},only:function(t){return c(t)||i("143"),t}},createRef:function(){return{current:null}},Component:s,PureComponent:a,createContext:function(t,e){return void 0===e&&(e=null),t={$$typeof:D,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,Provider:null,Consumer:null,unstable_read:null},t.Provider={$$typeof:P,_context:t},t.Consumer=t,t.unstable_read=S.bind(null,t),t},forwardRef:function(t){return{$$typeof:k,render:t}},Fragment:A,StrictMode:C,unstable_AsyncMode:I,unstable_Profiler:T,createElement:u,cloneElement:function(t,e,n){(null===t||void 0===t)&&i("267",t);var r=void 0,s=w({},t.props),o=t.key,a=t.ref,u=t._owner;if(null!=e){void 0!==e.ref&&(a=e.ref,u=H.current),void 0!==e.key&&(o=""+e.key);var l=void 0;t.type&&t.type.defaultProps&&(l=t.type.defaultProps);for(r in e)O.call(e,r)&&!j.hasOwnProperty(r)&&(s[r]=void 0===e[r]&&void 0!==l?l[r]:e[r])}if(1===(r=arguments.length-2))s.children=n;else if(1<r){l=Array(r);for(var c=0;c<r;c++)l[c]=arguments[c+2];s.children=l}return{$$typeof:E,type:t.type,key:o,ref:a,props:s,_owner:u}},createFactory:function(t){var e=u.bind(null,t);return e.type=t,e},isValidElement:c,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:H,assign:w}},U={default:M},K=U&&M||U;t.exports=K.default||K},function(t,e,n){"use strict";function r(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}r(),t.exports=n(15)},function(t,e,n){"use strict";function r(t,e,n,r,i,s,o,a){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,s,o,a],l=0;t=Error(e.replace(/%s/g,function(){return u[l++]})),t.name="Invariant Violation"}throw t.framesToPop=1,t}}function i(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=0;i<e;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);r(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function s(t,e,n,r,i,s,o,a,u){var l=Array.prototype.slice.call(arguments,3);try{e.apply(n,l)}catch(t){this.onError(t)}}function o(t,e,n,r,i,o,a,u,l){xr=!1,Er=null,s.apply(Cr,arguments)}function a(t,e,n,r,s,a,u,l,c){if(o.apply(this,arguments),xr){if(xr){var h=Er;xr=!1,Er=null}else i("198"),h=void 0;Fr||(Fr=!0,Ar=h)}}function u(){if(Tr)for(var t in Pr){var e=Pr[t],n=Tr.indexOf(t);if(-1<n||i("96",t),!Dr[n]){e.extractEvents||i("97",t),Dr[n]=e,n=e.eventTypes;for(var r in n){var s=void 0,o=n[r],a=e,u=r;Ir.hasOwnProperty(u)&&i("99",u),Ir[u]=o;var c=o.phasedRegistrationNames;if(c){for(s in c)c.hasOwnProperty(s)&&l(c[s],a,u);s=!0}else o.registrationName?(l(o.registrationName,a,u),s=!0):s=!1;s||i("98",r,t)}}}}function l(t,e,n){kr[t]&&i("100",t),kr[t]=e,Nr[t]=e.eventTypes[n].dependencies}function c(t,e,n,r){e=t.type||"unknown-event",t.currentTarget=_r(r),a(e,n,void 0,t),t.currentTarget=null}function h(t,e){return null==e&&i("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function f(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}function d(t,e){if(t){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!t.isPropagationStopped();i++)c(t,e,n[i],r[i]);else n&&c(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function p(t){return d(t,!0)}function g(t){return d(t,!1)}function y(t,e){var n=t.stateNode;if(!n)return null;var r=Rr(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(t=t.type,r=!("button"===t||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}return t?null:(n&&"function"!==typeof n&&i("231",e,typeof n),n)}function v(t,e){if(null!==t&&(Hr=h(Hr,t)),t=Hr,Hr=null,t&&(e?f(t,p):f(t,g),Hr&&i("95"),Fr))throw e=Ar,Fr=!1,Ar=null,e}function m(t){if(t[Lr])return t[Lr];for(;!t[Lr];){if(!t.parentNode)return null;t=t.parentNode}return t=t[Lr],7===t.tag||8===t.tag?t:null}function b(t){return t=t[Lr],!t||7!==t.tag&&8!==t.tag?null:t}function S(t){if(7===t.tag||8===t.tag)return t.stateNode;i("33")}function w(t){return t[Vr]||null}function x(t){do{t=t.return}while(t&&7!==t.tag);return t||null}function E(t,e,n){(e=y(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=h(n._dispatchListeners,e),n._dispatchInstances=h(n._dispatchInstances,t))}function F(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,n=[];e;)n.push(e),e=x(e);for(e=n.length;0<e--;)E(n[e],"captured",t);for(e=0;e<n.length;e++)E(n[e],"bubbled",t)}}function A(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=y(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=h(n._dispatchListeners,e),n._dispatchInstances=h(n._dispatchInstances,t))}function C(t){t&&t.dispatchConfig.registrationName&&A(t._targetInst,null,t)}function T(t){f(t,F)}function P(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}function D(t){if(Kr[t])return Kr[t];if(!Ur[t])return t;var e,n=Ur[t];for(e in n)if(n.hasOwnProperty(e)&&e in qr)return Kr[t]=n[e];return t}function I(){if(Zr)return Zr;var t,e,n=Xr,r=n.length,i="value"in $r?$r.value:$r.textContent,s=i.length;for(t=0;t<r&&n[t]===i[t];t++);var o=r-t;for(e=1;e<=o&&n[r-e]===i[s-e];e++);return Zr=i.slice(t,1<e?1-e:void 0)}function k(){return!0}function N(){return!1}function R(t,e,n,r){this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface;for(var i in t)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?k:N,this.isPropagationStopped=N,this}function B(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function _(t){t instanceof this||i("279"),t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function H(t){t.eventPool=[],t.getPooled=B,t.release=_}function O(t,e){switch(t){case"keyup":return-1!==ei.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function j(t){return t=t.detail,"object"===typeof t&&"data"in t?t.data:null}function L(t,e){switch(t){case"compositionend":return j(e);case"keypress":return 32!==e.which?null:(ui=!0,oi);case"textInput":return t=e.data,t===oi&&ui?null:t;default:return null}}function V(t,e){if(li)return"compositionend"===t||!ni&&O(t,e)?(t=I(),Zr=Xr=$r=null,li=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return si&&"ko"!==e.locale?null:e.data;default:return null}}function M(t){if(t=Br(t)){"function"!==typeof hi&&i("280");var e=Rr(t.stateNode);hi(t.stateNode,t.type,e)}}function U(t){fi?di?di.push(t):di=[t]:fi=t}function K(){if(fi){var t=fi,e=di;if(di=fi=null,M(t),e)for(t=0;t<e.length;t++)M(e[t])}}function q(t,e){return t(e)}function z(t,e,n){return t(e,n)}function W(){}function Y(t,e){if(pi)return t(e);pi=!0;try{return q(t,e)}finally{pi=!1,(null!==fi||null!==di)&&(W(),K())}}function J(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!gi[t.type]:"textarea"===e}function G(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function $(t){if(!Mr)return!1;t="on"+t;var e=t in document;return e||(e=document.createElement("div"),e.setAttribute(t,"return;"),e="function"===typeof e[t]),e}function X(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function Z(t){var e=X(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,s.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Q(t){t._valueTracker||(t._valueTracker=Z(t))}function tt(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=X(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function et(t){return null===t||"object"!==typeof t?null:(t=Di&&t[Di]||t["@@iterator"],"function"===typeof t?t:null)}function nt(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case Ci:return"AsyncMode";case wi:return"Fragment";case Si:return"Portal";case Ei:return"Profiler";case xi:return"StrictMode";case Pi:return"Placeholder"}if("object"===typeof t){switch(t.$$typeof){case Ai:return"Context.Consumer";case Fi:return"Context.Provider";case Ti:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef")}if("function"===typeof t.then&&(t=1===t._reactStatus?t._reactResult:null))return nt(t)}return null}function rt(t){var e="";do{t:switch(t.tag){case 4:case 0:case 1:case 2:case 3:case 7:case 10:var n=t._debugOwner,r=t._debugSource,i=nt(t.type),s=null;n&&(s=nt(n.type)),n=i,i="",r?i=" (at "+r.fileName.replace(vi,"")+":"+r.lineNumber+")":s&&(i=" (created by "+s+")"),s="\n    in "+(n||"Unknown")+i;break t;default:s=""}e+=s,t=t.return}while(t);return e}function it(t){return!!ki.call(Ri,t)||!ki.call(Ni,t)&&(Ii.test(t)?Ri[t]=!0:(Ni[t]=!0,!1))}function st(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}function ot(t,e,n,r){if(null===e||"undefined"===typeof e||st(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function at(t,e,n,r,i){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e}function ut(t){return t[1].toUpperCase()}function lt(t,e,n,r){var i=Bi.hasOwnProperty(e)?Bi[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(ot(e,n,i,r)&&(n=null),r||null===i?it(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(i=i.type,n=3===i||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}function ct(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function ht(t,e){var n=e.checked;return Sr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function ft(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=ct(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function dt(t,e){null!=(e=e.checked)&&lt(t,"checked",e,!1)}function pt(t,e){dt(t,e);var n=ct(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?yt(t,e.type,n):e.hasOwnProperty("defaultValue")&&yt(t,e.type,ct(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function gt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,""!==n&&(t.name=""),t.defaultChecked=!t.defaultChecked,t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function yt(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function vt(t,e,n){return t=R.getPooled(Hi.change,t,e,n),t.type="change",U(n),T(t),t}function mt(t){v(t,!1)}function bt(t){if(tt(S(t)))return t}function St(t,e){if("change"===t)return e}function wt(){Oi&&(Oi.detachEvent("onpropertychange",xt),ji=Oi=null)}function xt(t){"value"===t.propertyName&&bt(ji)&&(t=vt(ji,t,G(t)),Y(mt,t))}function Et(t,e,n){"focus"===t?(wt(),Oi=e,ji=n,Oi.attachEvent("onpropertychange",xt)):"blur"===t&&wt()}function Ft(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return bt(ji)}function At(t,e){if("click"===t)return bt(e)}function Ct(t,e){if("input"===t||"change"===t)return bt(e)}function Tt(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Ui[t])&&!!e[t]}function Pt(){return Tt}function Dt(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function It(t,e){if(Dt(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Xi.call(e,n[r])||!Dt(t[n[r]],e[n[r]]))return!1;return!0}function kt(t){var e=t;if(t.alternate)for(;e.return;)e=e.return;else{if(0!==(2&e.effectTag))return 1;for(;e.return;)if(e=e.return,0!==(2&e.effectTag))return 1}return 5===e.tag?2:3}function Nt(t){2!==kt(t)&&i("188")}function Rt(t){var e=t.alternate;if(!e)return e=kt(t),3===e&&i("188"),1===e?null:t;for(var n=t,r=e;;){var s=n.return,o=s?s.alternate:null;if(!s||!o)break;if(s.child===o.child){for(var a=s.child;a;){if(a===n)return Nt(s),t;if(a===r)return Nt(s),e;a=a.sibling}i("188")}if(n.return!==r.return)n=s,r=o;else{a=!1;for(var u=s.child;u;){if(u===n){a=!0,n=s,r=o;break}if(u===r){a=!0,r=s,n=o;break}u=u.sibling}if(!a){for(u=o.child;u;){if(u===n){a=!0,n=o,r=s;break}if(u===r){a=!0,r=o,n=s;break}u=u.sibling}a||i("189")}}n.alternate!==r&&i("190")}return 5!==n.tag&&i("188"),n.stateNode.current===n?t:e}function Bt(t){if(!(t=Rt(t)))return null;for(var e=t;;){if(7===e.tag||8===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function _t(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function Ht(t,e){var n=t[0];t=t[1];var r="on"+(t[0].toUpperCase()+t.slice(1));e={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:e},ls[t]=e,cs[n]=e}function Ot(t){var e=t.targetInst,n=e;do{if(!n){t.ancestors.push(n);break}var r;for(r=n;r.return;)r=r.return;if(!(r=5!==r.tag?null:r.stateNode.containerInfo))break;t.ancestors.push(n),n=m(r)}while(n);for(n=0;n<t.ancestors.length;n++){e=t.ancestors[n];var i=G(t.nativeEvent);r=t.topLevelType;for(var s=t.nativeEvent,o=null,a=0;a<Dr.length;a++){var u=Dr[a];u&&(u=u.extractEvents(r,e,s,i))&&(o=h(o,u))}v(o,!1)}}function jt(t,e){if(!e)return null;var n=(fs(t)?Vt:Mt).bind(null,t);e.addEventListener(t,n,!1)}function Lt(t,e){if(!e)return null;var n=(fs(t)?Vt:Mt).bind(null,t);e.addEventListener(t,n,!0)}function Vt(t,e){z(Mt,t,e)}function Mt(t,e){if(ps){var n=G(e);if(n=m(n),null===n||"number"!==typeof n.tag||2===kt(n)||(n=null),ds.length){var r=ds.pop();r.topLevelType=t,r.nativeEvent=e,r.targetInst=n,t=r}else t={topLevelType:t,nativeEvent:e,targetInst:n,ancestors:[]};try{Y(Ot,t)}finally{t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>ds.length&&ds.push(t)}}}function Ut(t){return Object.prototype.hasOwnProperty.call(t,vs)||(t[vs]=ys++,gs[t[vs]]={}),gs[t[vs]]}function Kt(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function qt(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function zt(t,e){var n=qt(t);t=0;for(var r;n;){if(3===n.nodeType){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=qt(n)}}function Wt(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?Wt(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function Yt(){for(var t=window,e=Kt();e instanceof t.HTMLIFrameElement;){try{t=e.contentDocument.defaultView}catch(t){break}e=Kt(t.document)}return e}function Jt(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}function Gt(t,e){var n=e.window===e?e.document:9===e.nodeType?e:e.ownerDocument;return Es||null==Ss||Ss!==Kt(n)?null:(n=Ss,"selectionStart"in n&&Jt(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),xs&&It(xs,n)?null:(xs=n,t=R.getPooled(bs.select,ws,t,e),t.type="select",t.target=Ss,T(t),t))}function $t(t){var e="";return br.Children.forEach(t,function(t){null!=t&&(e+=t)}),e}function Xt(t,e){return t=Sr({children:void 0},e),(e=$t(e.children))&&(t.children=e),t}function Zt(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+ct(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function Qt(t,e){return null!=e.dangerouslySetInnerHTML&&i("91"),Sr({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function te(t,e){var n=e.value;null==n&&(n=e.defaultValue,e=e.children,null!=e&&(null!=n&&i("92"),Array.isArray(e)&&(1>=e.length||i("93"),e=e[0]),n=e),null==n&&(n="")),t._wrapperState={initialValue:ct(n)}}function ee(t,e){var n=ct(e.value),r=ct(e.defaultValue);null!=n&&(n=""+n,n!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function ne(t){var e=t.textContent;e===t._wrapperState.initialValue&&(t.value=e)}function re(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ie(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?re(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}function se(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}function oe(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,s=e[n];i=null==s||"boolean"===typeof s||""===s?"":r||"number"!==typeof s||0===s||Ps.hasOwnProperty(i)&&Ps[i]?(""+s).trim():s+"px","float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}function ae(t,e){e&&(Is[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&i("137",t,""),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&i("60"),"object"===typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML||i("61")),null!=e.style&&"object"!==typeof e.style&&i("62",""))}function ue(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function le(t,e){t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument;var n=Ut(t);e=Nr[e];for(var r=0;r<e.length;r++){var i=e[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":Lt("scroll",t);break;case"focus":case"blur":Lt("focus",t),Lt("blur",t),n.blur=!0,n.focus=!0;break;case"cancel":case"close":$(i)&&Lt(i,t);break;case"invalid":case"submit":case"reset":break;default:-1===Gr.indexOf(i)&&jt(i,t)}n[i]=!0}}}function ce(){}function he(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function fe(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}function de(t){for(t=t.nextSibling;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}function pe(t){for(t=t.firstChild;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}function ge(t){0>Bs||(t.current=Rs[Bs],Rs[Bs]=null,Bs--)}function ye(t,e){Bs++,Rs[Bs]=t.current,t.current=e}function ve(t,e){var n=t.type.contextTypes;if(!n)return _s;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,s={};for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function me(t){return null!==(t=t.childContextTypes)&&void 0!==t}function be(t){ge(Os,t),ge(Hs,t)}function Se(t){ge(Os,t),ge(Hs,t)}function we(t,e,n){Hs.current!==_s&&i("168"),ye(Hs,e,t),ye(Os,n,t)}function xe(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!==typeof r.getChildContext)return n;r=r.getChildContext();for(var s in r)s in t||i("108",nt(e)||"Unknown",s);return Sr({},n,r)}function Ee(t){var e=t.stateNode;return e=e&&e.__reactInternalMemoizedMergedChildContext||_s,js=Hs.current,ye(Hs,e,t),ye(Os,Os.current,t),!0}function Fe(t,e,n){var r=t.stateNode;r||i("169"),n?(e=xe(t,e,js),r.__reactInternalMemoizedMergedChildContext=e,ge(Os,t),ge(Hs,t),ye(Hs,e,t)):ge(Os,t),ye(Os,n,t)}function Ae(t){return function(e){try{return t(e)}catch(t){}}}function Ce(t){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);Ls=Ae(function(t){return e.onCommitFiberRoot(n,t)}),Vs=Ae(function(t){return e.onCommitFiberUnmount(n,t)})}catch(t){}return!0}function Te(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=e,this.firstContextDependency=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Pe(t){return!(!(t=t.prototype)||!t.isReactComponent)}function De(t,e,n){var r=t.alternate;return null===r?(r=new Te(t.tag,e,t.key,t.mode),r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childExpirationTime=t.childExpirationTime,r.expirationTime=e!==t.pendingProps?n:t.expirationTime,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,r.firstContextDependency=t.firstContextDependency,r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Ie(t,e,n){var r=t.type,s=t.key;t=t.props;var o=void 0;if("function"===typeof r)o=Pe(r)?2:4;else if("string"===typeof r)o=7;else t:switch(r){case wi:return ke(t.children,e,n,s);case Ci:o=10,e|=3;break;case xi:o=10,e|=2;break;case Ei:return r=new Te(15,t,s,4|e),r.type=Ei,r.expirationTime=n,r;case Pi:o=16;break;default:if("object"===typeof r&&null!==r)switch(r.$$typeof){case Fi:o=12;break t;case Ai:o=11;break t;case Ti:o=13;break t;default:if("function"===typeof r.then){o=4;break t}}i("130",null==r?r:typeof r,"")}return e=new Te(o,t,s,e),e.type=r,e.expirationTime=n,e}function ke(t,e,n,r){return t=new Te(9,t,r,e),t.expirationTime=n,t}function Ne(t,e,n){return t=new Te(8,t,null,e),t.expirationTime=n,t}function Re(t,e,n){return e=new Te(6,null!==t.children?t.children:[],t.key,e),e.expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Be(t,e){t.didError=!1;var n=t.earliestPendingTime;0===n?t.earliestPendingTime=t.latestPendingTime=e:n>e?t.earliestPendingTime=e:t.latestPendingTime<e&&(t.latestPendingTime=e),_e(e,t)}function _e(t,e){var n=e.earliestSuspendedTime,r=e.latestSuspendedTime,i=e.earliestPendingTime,s=e.latestPingedTime;i=0!==i?i:s,0===i&&(0===t||r>t)&&(i=r),t=i,0!==t&&0!==n&&n<t&&(t=n),e.nextExpirationTimeToWorkOn=i,e.expirationTime=t}function He(t){return{baseState:t,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Oe(t){return{baseState:t.baseState,firstUpdate:t.firstUpdate,lastUpdate:t.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function je(t){return{expirationTime:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Le(t,e){null===t.lastUpdate?t.firstUpdate=t.lastUpdate=e:(t.lastUpdate.next=e,t.lastUpdate=e)}function Ve(t,e){var n=t.alternate;if(null===n){var r=t.updateQueue,i=null;null===r&&(r=t.updateQueue=He(t.memoizedState))}else r=t.updateQueue,i=n.updateQueue,null===r?null===i?(r=t.updateQueue=He(t.memoizedState),i=n.updateQueue=He(n.memoizedState)):r=t.updateQueue=Oe(i):null===i&&(i=n.updateQueue=Oe(r));null===i||r===i?Le(r,e):null===r.lastUpdate||null===i.lastUpdate?(Le(r,e),Le(i,e)):(Le(r,e),i.lastUpdate=e)}function Me(t,e){var n=t.updateQueue;n=null===n?t.updateQueue=He(t.memoizedState):Ue(t,n),null===n.lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=e:(n.lastCapturedUpdate.next=e,n.lastCapturedUpdate=e)}function Ue(t,e){var n=t.alternate;return null!==n&&e===n.updateQueue&&(e=t.updateQueue=Oe(e)),e}function Ke(t,e,n,r,i,s){switch(n.tag){case 1:return t=n.payload,"function"===typeof t?t.call(s,r,i):t;case 3:t.effectTag=-1025&t.effectTag|64;case 0:if(t=n.payload,null===(i="function"===typeof t?t.call(s,r,i):t)||void 0===i)break;return Sr({},r,i);case 2:Ms=!0}return r}function qe(t,e,n,r,i){Ms=!1,e=Ue(t,e);for(var s=e.baseState,o=null,a=0,u=e.firstUpdate,l=s;null!==u;){var c=u.expirationTime;c>i?(null===o&&(o=u,s=l),(0===a||a>c)&&(a=c)):(l=Ke(t,e,u,l,n,r),null!==u.callback&&(t.effectTag|=32,u.nextEffect=null,null===e.lastEffect?e.firstEffect=e.lastEffect=u:(e.lastEffect.nextEffect=u,e.lastEffect=u))),u=u.next}for(c=null,u=e.firstCapturedUpdate;null!==u;){var h=u.expirationTime;h>i?(null===c&&(c=u,null===o&&(s=l)),(0===a||a>h)&&(a=h)):(l=Ke(t,e,u,l,n,r),null!==u.callback&&(t.effectTag|=32,u.nextEffect=null,null===e.lastCapturedEffect?e.firstCapturedEffect=e.lastCapturedEffect=u:(e.lastCapturedEffect.nextEffect=u,e.lastCapturedEffect=u))),u=u.next}null===o&&(e.lastUpdate=null),null===c?e.lastCapturedUpdate=null:t.effectTag|=32,null===o&&null===c&&(s=l),e.baseState=s,e.firstUpdate=o,e.firstCapturedUpdate=c,t.expirationTime=a,t.memoizedState=l}function ze(t,e,n){null!==e.firstCapturedUpdate&&(null!==e.lastUpdate&&(e.lastUpdate.next=e.firstCapturedUpdate,e.lastUpdate=e.lastCapturedUpdate),e.firstCapturedUpdate=e.lastCapturedUpdate=null),We(e.firstEffect,n),e.firstEffect=e.lastEffect=null,We(e.firstCapturedEffect,n),e.firstCapturedEffect=e.lastCapturedEffect=null}function We(t,e){for(;null!==t;){var n=t.callback;if(null!==n){t.callback=null;var r=e;"function"!==typeof n&&i("191",n),n.call(r)}t=t.nextEffect}}function Ye(t,e){return{value:t,source:e,stack:rt(e)}}function Je(t,e){var n=t.type._context;ye(Us,n._currentValue,t),n._currentValue=e}function Ge(t){var e=Us.current;ge(Us,t),t.type._context._currentValue=e}function $e(t){Ks=t,zs=qs=null,t.firstContextDependency=null}function Xe(t,e){return zs!==t&&!1!==e&&0!==e&&("number"===typeof e&&1073741823!==e||(zs=t,e=1073741823),e={context:t,observedBits:e,next:null},null===qs?(null===Ks&&i("277"),Ks.firstContextDependency=qs=e):qs=qs.next=e),t._currentValue}function Ze(t){return t===Ws&&i("174"),t}function Qe(t,e){ye(Gs,e,t),ye(Js,t,t),ye(Ys,Ws,t);var n=e.nodeType;switch(n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ie(null,"");break;default:n=8===n?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=ie(e,n)}ge(Ys,t),ye(Ys,e,t)}function tn(t){ge(Ys,t),ge(Js,t),ge(Gs,t)}function en(t){Ze(Gs.current);var e=Ze(Ys.current),n=ie(e,t.type);e!==n&&(ye(Js,t,t),ye(Ys,n,t))}function nn(t){Js.current===t&&(ge(Ys,t),ge(Js,t))}function rn(t,e,n,r){e=t.memoizedState,n=n(r,e),n=null===n||void 0===n?e:Sr({},e,n),t.memoizedState=n,null!==(r=t.updateQueue)&&0===t.expirationTime&&(r.baseState=n)}function sn(t,e,n,r,i,s,o){return t=t.stateNode,"function"===typeof t.shouldComponentUpdate?t.shouldComponentUpdate(r,s,o):!e.prototype||!e.prototype.isPureReactComponent||(!It(n,r)||!It(i,s))}function on(t,e,n,r){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Xs.enqueueReplaceState(e,e.state,null)}function an(t,e,n,r){var i=t.stateNode,s=me(e)?js:Hs.current;i.props=n,i.state=t.memoizedState,i.refs=$s,i.context=ve(t,s),s=t.updateQueue,null!==s&&(qe(t,s,n,i,r),i.state=t.memoizedState),s=e.getDerivedStateFromProps,"function"===typeof s&&(rn(t,e,s,n),i.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(e=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&Xs.enqueueReplaceState(i,i.state,null),null!==(s=t.updateQueue)&&(qe(t,s,n,i,r),i.state=t.memoizedState)),"function"===typeof i.componentDidMount&&(t.effectTag|=4)}function un(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){if(n._owner){n=n._owner;var r=void 0;n&&(2!==n.tag&&3!==n.tag&&i("110"),r=n.stateNode),r||i("147",t);var s=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===s?e.ref:(e=function(t){var e=r.refs;e===$s&&(e=r.refs={}),null===t?delete e[s]:e[s]=t},e._stringRef=s,e)}"string"!==typeof t&&i("284"),n._owner||i("254",t)}return t}function ln(t,e){"textarea"!==t.type&&i("31","[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,"")}function cn(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function s(t,e,n){return t=De(t,e,n),t.index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index,r<n?(e.effectTag=2,n):r):(e.effectTag=2,n):n}function a(e){return t&&null===e.alternate&&(e.effectTag=2),e}function u(t,e,n,r){return null===e||8!==e.tag?(e=Ne(n,t.mode,r),e.return=t,e):(e=s(e,n,r),e.return=t,e)}function l(t,e,n,r){return null!==e&&e.type===n.type?(r=s(e,n.props,r),r.ref=un(t,e,n),r.return=t,r):(r=Ie(n,t.mode,r),r.ref=un(t,e,n),r.return=t,r)}function c(t,e,n,r){return null===e||6!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?(e=Re(n,t.mode,r),e.return=t,e):(e=s(e,n.children||[],r),e.return=t,e)}function h(t,e,n,r,i){return null===e||9!==e.tag?(e=ke(n,t.mode,r,i),e.return=t,e):(e=s(e,n,r),e.return=t,e)}function f(t,e,n){if("string"===typeof e||"number"===typeof e)return e=Ne(""+e,t.mode,n),e.return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case bi:return n=Ie(e,t.mode,n),n.ref=un(t,null,e),n.return=t,n;case Si:return e=Re(e,t.mode,n),e.return=t,e}if(Zs(e)||et(e))return e=ke(e,t.mode,n,null),e.return=t,e;ln(t,e)}return null}function d(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(t,e,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case bi:return n.key===i?n.type===wi?h(t,e,n.props.children,r,i):l(t,e,n,r):null;case Si:return n.key===i?c(t,e,n,r):null}if(Zs(n)||et(n))return null!==i?null:h(t,e,n,r,null);ln(t,n)}return null}function p(t,e,n,r,i){if("string"===typeof r||"number"===typeof r)return t=t.get(n)||null,u(e,t,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case bi:return t=t.get(null===r.key?n:r.key)||null,r.type===wi?h(e,t,r.props.children,i,r.key):l(e,t,r,i);case Si:return t=t.get(null===r.key?n:r.key)||null,c(e,t,r,i)}if(Zs(r)||et(r))return t=t.get(n)||null,h(e,t,r,i,null);ln(e,r)}return null}function g(i,s,a,u){for(var l=null,c=null,h=s,g=s=0,y=null;null!==h&&g<a.length;g++){h.index>g?(y=h,h=null):y=h.sibling;var v=d(i,h,a[g],u);if(null===v){null===h&&(h=y);break}t&&h&&null===v.alternate&&e(i,h),s=o(v,s,g),null===c?l=v:c.sibling=v,c=v,h=y}if(g===a.length)return n(i,h),l;if(null===h){for(;g<a.length;g++)(h=f(i,a[g],u))&&(s=o(h,s,g),null===c?l=h:c.sibling=h,c=h);return l}for(h=r(i,h);g<a.length;g++)(y=p(h,i,g,a[g],u))&&(t&&null!==y.alternate&&h.delete(null===y.key?g:y.key),s=o(y,s,g),null===c?l=y:c.sibling=y,c=y);return t&&h.forEach(function(t){return e(i,t)}),l}function y(s,a,u,l){var c=et(u);"function"!==typeof c&&i("150"),null==(u=c.call(u))&&i("151");for(var h=c=null,g=a,y=a=0,v=null,m=u.next();null!==g&&!m.done;y++,m=u.next()){g.index>y?(v=g,g=null):v=g.sibling;var b=d(s,g,m.value,l);if(null===b){g||(g=v);break}t&&g&&null===b.alternate&&e(s,g),a=o(b,a,y),null===h?c=b:h.sibling=b,h=b,g=v}if(m.done)return n(s,g),c;if(null===g){for(;!m.done;y++,m=u.next())null!==(m=f(s,m.value,l))&&(a=o(m,a,y),null===h?c=m:h.sibling=m,h=m);return c}for(g=r(s,g);!m.done;y++,m=u.next())null!==(m=p(g,s,y,m.value,l))&&(t&&null!==m.alternate&&g.delete(null===m.key?y:m.key),a=o(m,a,y),null===h?c=m:h.sibling=m,h=m);return t&&g.forEach(function(t){return e(s,t)}),c}return function(t,r,o,u){var l="object"===typeof o&&null!==o&&o.type===wi&&null===o.key;l&&(o=o.props.children);var c="object"===typeof o&&null!==o;if(c)switch(o.$$typeof){case bi:t:{for(c=o.key,l=r;null!==l;){if(l.key===c){if(9===l.tag?o.type===wi:l.type===o.type){n(t,l.sibling),r=s(l,o.type===wi?o.props.children:o.props,u),r.ref=un(t,l,o),r.return=t,t=r;break t}n(t,l);break}e(t,l),l=l.sibling}o.type===wi?(r=ke(o.props.children,t.mode,u,o.key),r.return=t,t=r):(u=Ie(o,t.mode,u),u.ref=un(t,r,o),u.return=t,t=u)}return a(t);case Si:t:{for(l=o.key;null!==r;){if(r.key===l){if(6===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),r=s(r,o.children||[],u),r.return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}r=Re(o,t.mode,u),r.return=t,t=r}return a(t)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&8===r.tag?(n(t,r.sibling),r=s(r,o,u),r.return=t,t=r):(n(t,r),r=Ne(o,t.mode,u),r.return=t,t=r),a(t);if(Zs(o))return g(t,r,o,u);if(et(o))return y(t,r,o,u);if(c&&ln(t,o),"undefined"===typeof o&&!l)switch(t.tag){case 2:case 3:case 0:u=t.type,i("152",u.displayName||u.name||"Component")}return n(t,r)}}function hn(t,e){var n=new Te(7,null,null,0);n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function fn(t,e){switch(t.tag){case 7:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 8:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);default:return!1}}function dn(t){if(ro){var e=no;if(e){var n=e;if(!fn(t,e)){if(!(e=de(n))||!fn(t,e))return t.effectTag|=2,ro=!1,void(eo=t);hn(eo,n)}eo=t,no=pe(e)}else t.effectTag|=2,ro=!1,eo=t}}function pn(t){for(t=t.return;null!==t&&7!==t.tag&&5!==t.tag;)t=t.return;eo=t}function gn(t){if(t!==eo)return!1;if(!ro)return pn(t),ro=!0,!1;var e=t.type;if(7!==t.tag||"head"!==e&&"body"!==e&&!fe(e,t.memoizedProps))for(e=no;e;)hn(t,e),e=de(e);return pn(t),no=eo?de(t.stateNode):null,!0}function yn(){no=eo=null,ro=!1}function vn(t){switch(t._reactStatus){case 1:return t._reactResult;case 2:throw t._reactResult;case 0:throw t;default:throw t._reactStatus=0,t.then(function(e){if(0===t._reactStatus){if(t._reactStatus=1,"object"===typeof e&&null!==e){var n=e.default;e=void 0!==n&&null!==n?n:e}t._reactResult=e}},function(e){0===t._reactStatus&&(t._reactStatus=2,t._reactResult=e)}),t}}function mn(t,e,n,r){e.child=null===t?to(e,null,n,r):Qs(e,t.child,n,r)}function bn(t,e,n,r,i){n=n.render;var s=e.ref;return Os.current||e.memoizedProps!==r||s!==(null!==t?t.ref:null)?(n=n(r,s),mn(t,e,n,i),e.memoizedProps=r,e.child):Tn(t,e,i)}function Sn(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function wn(t,e,n,r,i){var s=me(n)?js:Hs.current;return s=ve(e,s),$e(e,i),n=n(r,s),e.effectTag|=1,mn(t,e,n,i),e.memoizedProps=r,e.child}function xn(t,e,n,r,i){if(me(n)){var s=!0;Ee(e)}else s=!1;if($e(e,i),null===t)if(null===e.stateNode){var o=me(n)?js:Hs.current,a=n.contextTypes,u=null!==a&&void 0!==a;a=u?ve(e,o):_s;var l=new n(r,a);e.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,l.updater=Xs,e.stateNode=l,l._reactInternalFiber=e,u&&(u=e.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=o,u.__reactInternalMemoizedMaskedChildContext=a),an(e,n,r,i),r=!0}else{o=e.stateNode,a=e.memoizedProps,o.props=a;var c=o.context;u=me(n)?js:Hs.current,u=ve(e,u);var h=n.getDerivedStateFromProps;(l="function"===typeof h||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==r||c!==u)&&on(e,o,r,u),Ms=!1;var f=e.memoizedState;c=o.state=f;var d=e.updateQueue;null!==d&&(qe(e,d,r,o,i),c=e.memoizedState),a!==r||f!==c||Os.current||Ms?("function"===typeof h&&(rn(e,n,h,r),c=e.memoizedState),(a=Ms||sn(e,n,a,r,f,c,u))?(l||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(e.effectTag|=4)):("function"===typeof o.componentDidMount&&(e.effectTag|=4),e.memoizedProps=r,e.memoizedState=c),o.props=r,o.state=c,o.context=u,r=a):("function"===typeof o.componentDidMount&&(e.effectTag|=4),r=!1)}else o=e.stateNode,a=e.memoizedProps,o.props=a,c=o.context,u=me(n)?js:Hs.current,u=ve(e,u),h=n.getDerivedStateFromProps,(l="function"===typeof h||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==r||c!==u)&&on(e,o,r,u),Ms=!1,c=e.memoizedState,f=o.state=c,d=e.updateQueue,null!==d&&(qe(e,d,r,o,i),f=e.memoizedState),a!==r||c!==f||Os.current||Ms?("function"===typeof h&&(rn(e,n,h,r),f=e.memoizedState),(h=Ms||sn(e,n,a,r,c,f,u))?(l||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,f,u),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,f,u)),"function"===typeof o.componentDidUpdate&&(e.effectTag|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!==typeof o.componentDidUpdate||a===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=256),e.memoizedProps=r,e.memoizedState=f),o.props=r,o.state=f,o.context=u,r=h):("function"!==typeof o.componentDidUpdate||a===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=256),r=!1);return En(t,e,n,r,s,i)}function En(t,e,n,r,i,s){Sn(t,e);var o=0!==(64&e.effectTag);if(!r&&!o)return i&&Fe(e,n,!1),Tn(t,e,s);r=e.stateNode,io.current=e;var a=o?null:r.render();return e.effectTag|=1,null!==t&&o&&(mn(t,e,null,s),e.child=null),mn(t,e,a,s),e.memoizedState=r.state,e.memoizedProps=r.props,i&&Fe(e,n,!0),e.child}function Fn(t){var e=t.stateNode;e.pendingContext?we(t,e.pendingContext,e.pendingContext!==e.context):e.context&&we(t,e.context,!1),Qe(t,e.containerInfo)}function An(t,e){if(t&&t.defaultProps){e=Sr({},e),t=t.defaultProps;for(var n in t)void 0===e[n]&&(e[n]=t[n])}return e}function Cn(t,e,n,r){null!==t&&i("155");var s=e.pendingProps;if("object"===typeof n&&null!==n&&"function"===typeof n.then){n=vn(n);var o=n;o="function"===typeof o?Pe(o)?3:1:void 0!==o&&null!==o&&o.$$typeof?14:4,o=e.tag=o;var a=An(n,s);switch(o){case 1:return wn(t,e,n,a,r);case 3:return xn(t,e,n,a,r);case 14:return bn(t,e,n,a,r);default:i("283",n)}}if(o=ve(e,Hs.current),$e(e,r),o=n(s,o),e.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){e.tag=2,me(n)?(a=!0,Ee(e)):a=!1,e.memoizedState=null!==o.state&&void 0!==o.state?o.state:null;var u=n.getDerivedStateFromProps;return"function"===typeof u&&rn(e,n,u,s),o.updater=Xs,e.stateNode=o,o._reactInternalFiber=e,an(e,n,s,r),En(t,e,n,!0,a,r)}return e.tag=0,mn(t,e,o,r),e.memoizedProps=s,e.child}function Tn(t,e,n){null!==t&&(e.firstContextDependency=t.firstContextDependency);var r=e.childExpirationTime;if(0===r||r>n)return null;if(null!==t&&e.child!==t.child&&i("153"),null!==e.child){for(t=e.child,n=De(t,t.pendingProps,t.expirationTime),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,n=n.sibling=De(t,t.pendingProps,t.expirationTime),n.return=e;n.sibling=null}return e.child}function Pn(t,e,n){var r=e.expirationTime;if(!Os.current&&(0===r||r>n)){switch(e.tag){case 5:Fn(e),yn();break;case 7:en(e);break;case 2:me(e.type)&&Ee(e);break;case 3:me(e.type._reactResult)&&Ee(e);break;case 6:Qe(e,e.stateNode.containerInfo);break;case 12:Je(e,e.memoizedProps.value)}return Tn(t,e,n)}switch(e.expirationTime=0,e.tag){case 4:return Cn(t,e,e.type,n);case 0:return wn(t,e,e.type,e.pendingProps,n);case 1:var s=e.type._reactResult;return r=e.pendingProps,t=wn(t,e,s,An(s,r),n),e.memoizedProps=r,t;case 2:return xn(t,e,e.type,e.pendingProps,n);case 3:return s=e.type._reactResult,r=e.pendingProps,t=xn(t,e,s,An(s,r),n),e.memoizedProps=r,t;case 5:return Fn(e),r=e.updateQueue,null===r&&i("282"),s=e.memoizedState,s=null!==s?s.element:null,qe(e,r,e.pendingProps,null,n),r=e.memoizedState.element,r===s?(yn(),e=Tn(t,e,n)):(s=e.stateNode,(s=(null===t||null===t.child)&&s.hydrate)&&(no=pe(e.stateNode.containerInfo),eo=e,s=ro=!0),s?(e.effectTag|=2,e.child=to(e,null,r,n)):(mn(t,e,r,n),yn()),e=e.child),e;case 7:en(e),null===t&&dn(e),r=e.type,s=e.pendingProps;var o=null!==t?t.memoizedProps:null,a=s.children;return fe(r,s)?a=null:null!==o&&fe(r,o)&&(e.effectTag|=16),Sn(t,e),1073741823!==n&&1&e.mode&&s.hidden?(e.expirationTime=1073741823,e.memoizedProps=s,e=null):(mn(t,e,a,n),e.memoizedProps=s,e=e.child),e;case 8:return null===t&&dn(e),e.memoizedProps=e.pendingProps,null;case 16:return null;case 6:return Qe(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=Qs(e,null,r,n):mn(t,e,r,n),e.memoizedProps=r,e.child;case 13:return bn(t,e,e.type,e.pendingProps,n);case 14:return s=e.type._reactResult,r=e.pendingProps,t=bn(t,e,s,An(s,r),n),e.memoizedProps=r,t;case 9:return r=e.pendingProps,mn(t,e,r,n),e.memoizedProps=r,e.child;case 10:return r=e.pendingProps.children,mn(t,e,r,n),e.memoizedProps=r,e.child;case 15:return r=e.pendingProps,mn(t,e,r.children,n),e.memoizedProps=r,e.child;case 12:t:{if(r=e.type._context,s=e.pendingProps,a=e.memoizedProps,o=s.value,e.memoizedProps=s,Je(e,o),null!==a){var u=a.value;if(0===(o=u===o&&(0!==u||1/u===1/o)||u!==u&&o!==o?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(a.children===s.children&&!Os.current){e=Tn(t,e,n);break t}}else for(null!==(a=e.child)&&(a.return=e);null!==a;){if(null!==(u=a.firstContextDependency))do{if(u.context===r&&0!==(u.observedBits&o)){if(2===a.tag||3===a.tag){var l=je(n);l.tag=2,Ve(a,l)}(0===a.expirationTime||a.expirationTime>n)&&(a.expirationTime=n),l=a.alternate,null!==l&&(0===l.expirationTime||l.expirationTime>n)&&(l.expirationTime=n);for(var c=a.return;null!==c;){if(l=c.alternate,0===c.childExpirationTime||c.childExpirationTime>n)c.childExpirationTime=n,null!==l&&(0===l.childExpirationTime||l.childExpirationTime>n)&&(l.childExpirationTime=n);else{if(null===l||!(0===l.childExpirationTime||l.childExpirationTime>n))break;l.childExpirationTime=n}c=c.return}}l=a.child,u=u.next}while(null!==u);else l=12===a.tag&&a.type===e.type?null:a.child;if(null!==l)l.return=a;else for(l=a;null!==l;){if(l===e){l=null;break}if(null!==(a=l.sibling)){a.return=l.return,l=a;break}l=l.return}a=l}}mn(t,e,s.children,n),e=e.child}return e;case 11:return o=e.type,r=e.pendingProps,s=r.children,$e(e,n),o=Xe(o,r.unstable_observedBits),s=s(o),e.effectTag|=1,mn(t,e,s,n),e.memoizedProps=r,e.child;default:i("156")}}function Dn(t){t.effectTag|=4}function In(t,e){var n=e.source,r=e.stack;null===r&&null!==n&&(r=rt(n)),null!==n&&nt(n.type),e=e.value,null!==t&&2===t.tag&&nt(t.type);try{console.error(e)}catch(t){setTimeout(function(){throw t})}}function kn(t){var e=t.ref;if(null!==e)if("function"===typeof e)try{e(null)}catch(e){qn(t,e)}else e.current=null}function Nn(t){switch("function"===typeof Vs&&Vs(t),t.tag){case 2:case 3:kn(t);var e=t.stateNode;if("function"===typeof e.componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){qn(t,e)}break;case 7:kn(t);break;case 6:_n(t)}}function Rn(t){return 7===t.tag||5===t.tag||6===t.tag}function Bn(t){t:{for(var e=t.return;null!==e;){if(Rn(e)){var n=e;break t}e=e.return}i("160"),n=void 0}var r=e=void 0;switch(n.tag){case 7:e=n.stateNode,r=!1;break;case 5:case 6:e=n.stateNode.containerInfo,r=!0;break;default:i("161")}16&n.effectTag&&(se(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||Rn(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;7!==n.tag&&8!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||6===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}for(var s=t;;){if(7===s.tag||8===s.tag)if(n)if(r){var o=e,a=s.stateNode,u=n;8===o.nodeType?o.parentNode.insertBefore(a,u):o.insertBefore(a,u)}else e.insertBefore(s.stateNode,n);else r?(o=e,a=s.stateNode,8===o.nodeType?(u=o.parentNode,u.insertBefore(a,o)):(u=o,u.appendChild(a)),null===u.onclick&&(u.onclick=ce)):e.appendChild(s.stateNode);else if(6!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break;for(;null===s.sibling;){if(null===s.return||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}}function _n(t){for(var e=t,n=!1,r=void 0,s=void 0;;){if(!n){n=e.return;t:for(;;){switch(null===n&&i("160"),n.tag){case 7:r=n.stateNode,s=!1;break t;case 5:case 6:r=n.stateNode.containerInfo,s=!0;break t}n=n.return}n=!0}if(7===e.tag||8===e.tag){t:for(var o=e,a=o;;)if(Nn(a),null!==a.child&&6!==a.tag)a.child.return=a,a=a.child;else{if(a===o)break;for(;null===a.sibling;){if(null===a.return||a.return===o)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}s?(o=r,a=e.stateNode,8===o.nodeType?o.parentNode.removeChild(a):o.removeChild(a)):r.removeChild(e.stateNode)}else if(6===e.tag?(r=e.stateNode.containerInfo,s=!0):Nn(e),null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;e=e.return,6===e.tag&&(n=!1)}e.sibling.return=e.return,e=e.sibling}}function Hn(t,e){switch(e.tag){case 2:case 3:break;case 7:var n=e.stateNode;if(null!=n){var r=e.memoizedProps,s=null!==t?t.memoizedProps:r;t=e.type;var o=e.updateQueue;if(e.updateQueue=null,null!==o){for(n[Vr]=r,"input"===t&&"radio"===r.type&&null!=r.name&&dt(n,r),ue(t,s),e=ue(t,r),s=0;s<o.length;s+=2){var a=o[s],u=o[s+1];"style"===a?oe(n,u):"dangerouslySetInnerHTML"===a?Ts(n,u):"children"===a?se(n,u):lt(n,a,u,e)}switch(t){case"input":pt(n,r);break;case"textarea":ee(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,o=r.value,null!=o?Zt(n,!!r.multiple,o,!1):t!==!!r.multiple&&(null!=r.defaultValue?Zt(n,!!r.multiple,r.defaultValue,!0):Zt(n,!!r.multiple,r.multiple?[]:"",!1))}}}break;case 8:null===e.stateNode&&i("162"),e.stateNode.nodeValue=e.memoizedProps;break;case 5:case 15:case 16:break;default:i("163")}}function On(t,e,n){n=je(n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){rr(r),In(t,e)},n}function jn(t,e,n){n=je(n),n.tag=3;var r=t.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(n.callback=function(){null===So?So=new Set([this]):So.add(this);var n=e.value,r=e.stack;In(t,e),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Ln(t){switch(t.tag){case 2:me(t.type)&&be(t);var e=t.effectTag;return 1024&e?(t.effectTag=-1025&e|64,t):null;case 3:return me(t.type._reactResult)&&be(t),e=t.effectTag,1024&e?(t.effectTag=-1025&e|64,t):null;case 5:return tn(t),Se(t),e=t.effectTag,0!==(64&e)&&i("285"),t.effectTag=-1025&e|64,t;case 7:return nn(t),null;case 16:return e=t.effectTag,1024&e?(t.effectTag=-1025&e|64,t):null;case 6:return tn(t),null;case 12:return Ge(t),null;default:return null}}function Vn(){if(null!==po)for(var t=po.return;null!==t;){var e=t;switch(e.tag){case 2:var n=e.type.childContextTypes;null!==n&&void 0!==n&&be(e);break;case 3:n=e.type._reactResult.childContextTypes,null!==n&&void 0!==n&&be(e);break;case 5:tn(e),Se(e);break;case 7:nn(e);break;case 6:tn(e);break;case 12:Ge(e)}t=t.return}go=null,yo=0,vo=!1,po=null}function Mn(t){for(;;){var e=t.alternate,n=t.return,r=t.sibling;if(0===(512&t.effectTag)){var s=e;e=t;var o=e.pendingProps;switch(e.tag){case 0:case 1:break;case 2:me(e.type)&&be(e);break;case 3:me(e.type._reactResult)&&be(e);break;case 5:tn(e),Se(e),o=e.stateNode,o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==s&&null!==s.child||(gn(e),e.effectTag&=-3),so(e);break;case 7:nn(e);var a=Ze(Gs.current),u=e.type;if(null!==s&&null!=e.stateNode)oo(s,e,u,o,a),s.ref!==e.ref&&(e.effectTag|=128);else if(o){var l=Ze(Ys.current);if(gn(e)){o=e,s=o.stateNode;var c=o.type,h=o.memoizedProps,f=a;switch(s[Lr]=o,s[Vr]=h,u=void 0,a=c){case"iframe":case"object":jt("load",s);break;case"video":case"audio":for(c=0;c<Gr.length;c++)jt(Gr[c],s);break;case"source":jt("error",s);break;case"img":case"image":case"link":jt("error",s),jt("load",s);break;case"form":jt("reset",s),jt("submit",s);break;case"details":jt("toggle",s);break;case"input":ft(s,h),jt("invalid",s),le(f,"onChange");break;case"select":s._wrapperState={wasMultiple:!!h.multiple},jt("invalid",s),le(f,"onChange");break;case"textarea":te(s,h),jt("invalid",s),le(f,"onChange")}ae(a,h),c=null;for(u in h)h.hasOwnProperty(u)&&(l=h[u],"children"===u?"string"===typeof l?s.textContent!==l&&(c=["children",l]):"number"===typeof l&&s.textContent!==""+l&&(c=["children",""+l]):kr.hasOwnProperty(u)&&null!=l&&le(f,u));switch(a){case"input":Q(s),gt(s,h,!0);break;case"textarea":Q(s),ne(s,h);break;case"select":case"option":break;default:"function"===typeof h.onClick&&(s.onclick=ce)}u=c,o.updateQueue=u,o=null!==u,o&&Dn(e)}else{h=e,s=u,f=o,c=9===a.nodeType?a:a.ownerDocument,l===As.html&&(l=re(s)),l===As.html?"script"===s?(s=c.createElement("div"),s.innerHTML="<script><\/script>",c=s.removeChild(s.firstChild)):"string"===typeof f.is?c=c.createElement(s,{is:f.is}):(c=c.createElement(s),"select"===s&&f.multiple&&(c.multiple=!0)):c=c.createElementNS(l,s),s=c,s[Lr]=h,s[Vr]=o;t:for(h=s,f=e,c=f.child;null!==c;){if(7===c.tag||8===c.tag)h.appendChild(c.stateNode);else if(6!==c.tag&&null!==c.child){c.child.return=c,c=c.child;continue}if(c===f)break;for(;null===c.sibling;){if(null===c.return||c.return===f)break t;c=c.return}c.sibling.return=c.return,c=c.sibling}f=s,c=u,h=o;var d=a,p=ue(c,h);switch(c){case"iframe":case"object":jt("load",f),a=h;break;case"video":case"audio":for(a=0;a<Gr.length;a++)jt(Gr[a],f);a=h;break;case"source":jt("error",f),a=h;break;case"img":case"image":case"link":jt("error",f),jt("load",f),a=h;break;case"form":jt("reset",f),jt("submit",f),a=h;break;case"details":jt("toggle",f),a=h;break;case"input":ft(f,h),a=ht(f,h),jt("invalid",f),le(d,"onChange");break;case"option":a=Xt(f,h);break;case"select":f._wrapperState={wasMultiple:!!h.multiple},a=Sr({},h,{value:void 0}),jt("invalid",f),le(d,"onChange");break;case"textarea":te(f,h),a=Qt(f,h),jt("invalid",f),le(d,"onChange");break;default:a=h}ae(c,a),l=void 0;var g=c,y=f,v=a;for(l in v)if(v.hasOwnProperty(l)){var m=v[l];"style"===l?oe(y,m):"dangerouslySetInnerHTML"===l?null!=(m=m?m.__html:void 0)&&Ts(y,m):"children"===l?"string"===typeof m?("textarea"!==g||""!==m)&&se(y,m):"number"===typeof m&&se(y,""+m):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(kr.hasOwnProperty(l)?null!=m&&le(d,l):null!=m&&lt(y,l,m,p))}switch(c){case"input":Q(f),gt(f,h,!1);break;case"textarea":Q(f),ne(f,h);break;case"option":null!=h.value&&f.setAttribute("value",""+ct(h.value));break;case"select":a=f,a.multiple=!!h.multiple,f=h.value,null!=f?Zt(a,!!h.multiple,f,!1):null!=h.defaultValue&&Zt(a,!!h.multiple,h.defaultValue,!0);break;default:"function"===typeof a.onClick&&(f.onclick=ce)}(o=he(u,o))&&Dn(e),e.stateNode=s}null!==e.ref&&(e.effectTag|=128)}else null===e.stateNode&&i("166");break;case 8:s&&null!=e.stateNode?ao(s,e,s.memoizedProps,o):("string"!==typeof o&&(null===e.stateNode&&i("166")),s=Ze(Gs.current),Ze(Ys.current),gn(e)?(o=e,u=o.stateNode,s=o.memoizedProps,u[Lr]=o,(o=u.nodeValue!==s)&&Dn(e)):(u=e,o=(9===s.nodeType?s:s.ownerDocument).createTextNode(o),o[Lr]=u,e.stateNode=o));break;case 13:case 14:case 16:case 9:case 10:case 15:break;case 6:tn(e),so(e);break;case 12:Ge(e);break;case 11:break;case 4:i("167");default:i("156")}if(e=po=null,o=t,1073741823===yo||1073741823!==o.childExpirationTime){for(u=0,s=o.child;null!==s;)a=s.expirationTime,h=s.childExpirationTime,(0===u||0!==a&&a<u)&&(u=a),(0===u||0!==h&&h<u)&&(u=h),s=s.sibling;o.childExpirationTime=u}if(null!==e)return e;null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=t.firstEffect),n.lastEffect=t.lastEffect),1<t.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=t:n.firstEffect=t,n.lastEffect=t))}else{if(null!==(t=Ln(t,yo)))return t.effectTag&=511,t;null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512)}if(null!==r)return r;if(null===n)break;t=n}return null}function Un(t){var e=Pn(t.alternate,t,yo);return null===e&&(e=Mn(t)),lo.current=null,e}function Kn(t,e,n){fo&&i("243"),fo=!0,lo.currentDispatcher=uo;var r=t.nextExpirationTimeToWorkOn;r===yo&&t===go&&null!==po||(Vn(),go=t,yo=r,po=De(go.current,null,yo),t.pendingCommitExpirationTime=0);for(var s=!1;;){try{if(e)for(;null!==po&&!nr();)po=Un(po);else for(;null!==po;)po=Un(po)}catch(t){if(null===po)s=!0,rr(t);else{null===po&&i("271");var o=po,a=o.return;if(null!==a){t:{var u=a,l=o,c=t;a=yo,l.effectTag|=512,l.firstEffect=l.lastEffect=null,vo=!0,c=Ye(c,l);do{switch(u.tag){case 5:u.effectTag|=1024,u.expirationTime=a,a=On(u,c,a),Me(u,a);break t;case 2:case 3:l=c;var h=u.stateNode;if(0===(64&u.effectTag)&&null!==h&&"function"===typeof h.componentDidCatch&&(null===So||!So.has(h))){u.effectTag|=1024,u.expirationTime=a,a=jn(u,l,a),Me(u,a);break t}}u=u.return}while(null!==u)}po=Mn(o);continue}s=!0,rr(t)}}break}if(fo=!1,zs=qs=Ks=lo.currentDispatcher=null,s)go=null,t.finishedWork=null;else if(null!==po)t.finishedWork=null;else{if(e=t.current.alternate,null===e&&i("281"),go=null,vo){if(s=t.latestPendingTime,o=t.latestSuspendedTime,a=t.latestPingedTime,0!==s&&s>r||0!==o&&o>r||0!==a&&a>r)return t.didError=!1,n=t.latestPingedTime,0!==n&&n<=r&&(t.latestPingedTime=0),n=t.earliestPendingTime,e=t.latestPendingTime,n===r?t.earliestPendingTime=e===r?t.latestPendingTime=0:e:e===r&&(t.latestPendingTime=n),n=t.earliestSuspendedTime,e=t.latestSuspendedTime,0===n?t.earliestSuspendedTime=t.latestSuspendedTime=r:n>r?t.earliestSuspendedTime=r:e<r&&(t.latestSuspendedTime=r),_e(r,t),void(t.expirationTime=t.expirationTime);if(!t.didError&&!n)return t.didError=!0,t.nextExpirationTimeToWorkOn=r,r=t.expirationTime=1,void(t.expirationTime=r)}t.pendingCommitExpirationTime=r,t.finishedWork=e}}function qn(t,e){var n;t:{for(fo&&!bo&&i("263"),n=t.return;null!==n;){switch(n.tag){case 2:case 3:var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromCatch||"function"===typeof r.componentDidCatch&&(null===So||!So.has(r))){t=Ye(e,t),t=jn(n,t,1),Ve(n,t),Wn(n,1),n=void 0;break t}break;case 5:t=Ye(e,t),t=On(n,t,1),Ve(n,t),Wn(n,1),n=void 0;break t}n=n.return}5===t.tag&&(n=Ye(e,t),n=On(t,n,1),Ve(t,n),Wn(t,1)),n=void 0}return n}function zn(t,e){return 0!==ho?t=ho:fo?t=bo?1:yo:1&e.mode?(t=_o?2+10*(1+((t-2+15)/10|0)):2+25*(1+((t-2+500)/25|0)),null!==go&&t===yo&&(t+=1)):t=1,_o&&(0===Po||t>Po)&&(Po=t),t}function Wn(t,e){t:{(0===t.expirationTime||t.expirationTime>e)&&(t.expirationTime=e);var n=t.alternate;null!==n&&(0===n.expirationTime||n.expirationTime>e)&&(n.expirationTime=e);var r=t.return;if(null===r&&5===t.tag)t=t.stateNode;else{for(;null!==r;){if(n=r.alternate,(0===r.childExpirationTime||r.childExpirationTime>e)&&(r.childExpirationTime=e),null!==n&&(0===n.childExpirationTime||n.childExpirationTime>e)&&(n.childExpirationTime=e),null===r.return&&5===r.tag){t=r.stateNode;break t}r=r.return}t=null}}null!==t&&(!fo&&0!==yo&&e<yo&&Vn(),Be(t,e),fo&&!bo&&go===t||(e=t,t=t.expirationTime,null===e.nextScheduledRoot?(e.expirationTime=t,null===xo?(wo=xo=e,e.nextScheduledRoot=e):(xo=xo.nextScheduledRoot=e,xo.nextScheduledRoot=wo)):(0===(n=e.expirationTime)||t<n)&&(e.expirationTime=t),Ao||(Ro?Bo&&(Co=e,To=1,tr(e,1,!0)):1===t?Qn(1,null):Gn(e,t))),Mo>Vo&&(Mo=0,i("185")))}function Yn(t,e,n,r,i){var s=ho;ho=1;try{return t(e,n,r,i)}finally{ho=s}}function Jn(){jo=2+((wr.unstable_now()-Oo)/10|0)}function Gn(t,e){if(0!==Eo){if(e>Eo)return;null!==Fo&&wr.unstable_cancelScheduledWork(Fo)}Eo=e,t=wr.unstable_now()-Oo,Fo=wr.unstable_scheduleWork(Zn,{timeout:10*(e-2)-t})}function $n(){return Ao?Lo:(Xn(),0!==To&&1073741823!==To||(Jn(),Lo=jo),Lo)}function Xn(){var t=0,e=null;if(null!==xo)for(var n=xo,r=wo;null!==r;){var s=r.expirationTime;if(0===s){if((null===n||null===xo)&&i("244"),r===r.nextScheduledRoot){wo=xo=r.nextScheduledRoot=null;break}if(r===wo)wo=s=r.nextScheduledRoot,xo.nextScheduledRoot=s,r.nextScheduledRoot=null;else{if(r===xo){xo=n,xo.nextScheduledRoot=wo,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===t||s<t)&&(t=s,e=r),r===xo)break;if(1===t)break;n=r,r=r.nextScheduledRoot}}Co=e,To=t}function Zn(t){if(t.didTimeout&&null!==wo){Jn();var e=wo;do{var n=e.expirationTime;0!==n&&jo>=n&&(e.nextExpirationTimeToWorkOn=jo),e=e.nextScheduledRoot}while(e!==wo)}Qn(0,t)}function Qn(t,e){if(No=e,Xn(),null!==No)for(Jn(),Lo=jo;null!==Co&&0!==To&&(0===t||t>=To)&&(!Do||jo>=To);)tr(Co,To,jo>=To),Xn(),Jn(),Lo=jo;else for(;null!==Co&&0!==To&&(0===t||t>=To);)tr(Co,To,!0),Xn();if(null!==No&&(Eo=0,Fo=null),0!==To&&Gn(Co,To),No=null,Do=!1,Mo=0,Uo=null,null!==Ho)for(t=Ho,Ho=null,e=0;e<t.length;e++){var n=t[e];try{n._onComplete()}catch(t){Io||(Io=!0,ko=t)}}if(Io)throw t=ko,ko=null,Io=!1,t}function tr(t,e,n){if(Ao&&i("245"),Ao=!0,null===No||n){var r=t.finishedWork;null!==r?er(t,r,e):(t.finishedWork=null,Kn(t,!1,n),null!==(r=t.finishedWork)&&er(t,r,e))}else r=t.finishedWork,null!==r?er(t,r,e):(t.finishedWork=null,Kn(t,!0,n),null!==(r=t.finishedWork)&&(nr()?t.finishedWork=r:er(t,r,e)));Ao=!1}function er(t,e,n){var r=t.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Ho?Ho=[r]:Ho.push(r),r._defer))return t.finishedWork=e,void(t.expirationTime=0);t.finishedWork=null,t===Uo?Mo++:(Uo=t,Mo=0),bo=fo=!0,t.current===e&&i("177"),n=t.pendingCommitExpirationTime,0===n&&i("261"),t.pendingCommitExpirationTime=0,r=e.expirationTime;var s=e.childExpirationTime;if(r=0===r||0!==s&&s<r?s:r,t.didError=!1,0===r?(t.earliestPendingTime=0,t.latestPendingTime=0,t.earliestSuspendedTime=0,t.latestSuspendedTime=0,t.latestPingedTime=0):(s=t.latestPendingTime,0!==s&&(s<r?t.earliestPendingTime=t.latestPendingTime=0:t.earliestPendingTime<r&&(t.earliestPendingTime=t.latestPendingTime)),s=t.earliestSuspendedTime,0===s?Be(t,r):r>t.latestSuspendedTime?(t.earliestSuspendedTime=0,t.latestSuspendedTime=0,t.latestPingedTime=0,Be(t,r)):r<s&&Be(t,r)),_e(0,t),lo.current=null,1<e.effectTag?null!==e.lastEffect?(e.lastEffect.nextEffect=e,r=e.firstEffect):r=e:r=e.firstEffect,ks=ps,s=Yt(),Jt(s)){if("selectionStart"in s)var o={start:s.selectionStart,end:s.selectionEnd};else t:{o=(o=s.ownerDocument)&&o.defaultView||window;var a=o.getSelection&&o.getSelection();if(a&&0!==a.rangeCount){o=a.anchorNode;var u=a.anchorOffset,l=a.focusNode;a=a.focusOffset;try{o.nodeType,l.nodeType}catch(t){o=null;break t}var c=0,h=-1,f=-1,d=0,p=0,g=s,y=null;e:for(;;){for(var v;g!==o||0!==u&&3!==g.nodeType||(h=c+u),g!==l||0!==a&&3!==g.nodeType||(f=c+a),3===g.nodeType&&(c+=g.nodeValue.length),null!==(v=g.firstChild);)y=g,g=v;for(;;){if(g===s)break e;if(y===o&&++d===u&&(h=c),y===l&&++p===a&&(f=c),null!==(v=g.nextSibling))break;g=y,y=g.parentNode}g=v}o=-1===h||-1===f?null:{start:h,end:f}}else o=null}o=o||{start:0,end:0}}else o=null;for(Ns={focusedElem:s,selectionRange:o},ps=!1,mo=r;null!==mo;){s=!1,o=void 0;try{for(;null!==mo;){if(256&mo.effectTag){var m=mo.alternate;t:switch(u=mo,u.tag){case 2:case 3:if(256&u.effectTag&&null!==m){var b=m.memoizedProps,S=m.memoizedState,w=u.stateNode;w.props=u.memoizedProps,w.state=u.memoizedState;var x=w.getSnapshotBeforeUpdate(b,S);w.__reactInternalSnapshotBeforeUpdate=x}break t;case 5:case 7:case 8:case 6:break t;default:i("163")}}mo=mo.nextEffect}}catch(t){s=!0,o=t}s&&(null===mo&&i("178"),qn(mo,o),null!==mo&&(mo=mo.nextEffect))}for(mo=r;null!==mo;){m=!1,b=void 0;try{for(;null!==mo;){var E=mo.effectTag;if(16&E&&se(mo.stateNode,""),128&E){var F=mo.alternate;if(null!==F){var A=F.ref;null!==A&&("function"===typeof A?A(null):A.current=null)}}switch(14&E){case 2:Bn(mo),mo.effectTag&=-3;break;case 6:Bn(mo),mo.effectTag&=-3,Hn(mo.alternate,mo);break;case 4:Hn(mo.alternate,mo);break;case 8:S=mo,_n(S),S.return=null,S.child=null,S.alternate&&(S.alternate.child=null,S.alternate.return=null)}mo=mo.nextEffect}}catch(t){m=!0,b=t}m&&(null===mo&&i("178"),qn(mo,b),null!==mo&&(mo=mo.nextEffect))}if(A=Ns,F=Yt(),E=A.focusedElem,b=A.selectionRange,F!==E&&E&&E.ownerDocument&&Wt(E.ownerDocument.documentElement,E)){null!==b&&Jt(E)&&(F=b.start,A=b.end,void 0===A&&(A=F),"selectionStart"in E?(E.selectionStart=F,E.selectionEnd=Math.min(A,E.value.length)):(m=E.ownerDocument||document,F=(m&&m.defaultView||window).getSelection(),S=E.textContent.length,A=Math.min(b.start,S),b=void 0===b.end?A:Math.min(b.end,S),!F.extend&&A>b&&(S=b,b=A,A=S),S=zt(E,A),w=zt(E,b),S&&w&&(1!==F.rangeCount||F.anchorNode!==S.node||F.anchorOffset!==S.offset||F.focusNode!==w.node||F.focusOffset!==w.offset)&&(m=m.createRange(),m.setStart(S.node,S.offset),F.removeAllRanges(),A>b?(F.addRange(m),F.extend(w.node,w.offset)):(m.setEnd(w.node,w.offset),F.addRange(m))))),F=[];for(A=E;A=A.parentNode;)1===A.nodeType&&F.push({element:A,left:A.scrollLeft,top:A.scrollTop});for("function"===typeof E.focus&&E.focus(),E=0;E<F.length;E++)A=F[E],A.element.scrollLeft=A.left,A.element.scrollTop=A.top}for(Ns=null,ps=!!ks,ks=null,t.current=e,mo=r;null!==mo;){r=!1,E=void 0;try{for(F=n;null!==mo;){var C=mo.effectTag;if(36&C){var T=mo.alternate;switch(A=mo,m=F,A.tag){case 2:case 3:var P=A.stateNode;if(4&A.effectTag)if(null===T)P.props=A.memoizedProps,P.state=A.memoizedState,P.componentDidMount();else{var D=T.memoizedProps,I=T.memoizedState;P.props=A.memoizedProps,P.state=A.memoizedState,P.componentDidUpdate(D,I,P.__reactInternalSnapshotBeforeUpdate)}var k=A.updateQueue;null!==k&&(P.props=A.memoizedProps,P.state=A.memoizedState,ze(A,k,P,m));break;case 5:var N=A.updateQueue;if(null!==N){if(b=null,null!==A.child)switch(A.child.tag){case 7:b=A.child.stateNode;break;case 2:case 3:b=A.child.stateNode}ze(A,N,b,m)}break;case 7:var R=A.stateNode;null===T&&4&A.effectTag&&he(A.type,A.memoizedProps)&&R.focus();break;case 8:case 6:case 15:case 16:break;default:i("163")}}if(128&C){var B=mo.ref;if(null!==B){var _=mo.stateNode;switch(mo.tag){case 7:var H=_;break;default:H=_}"function"===typeof B?B(H):B.current=H}}var O=mo.nextEffect;mo.nextEffect=null,mo=O}}catch(t){r=!0,E=t}r&&(null===mo&&i("178"),qn(mo,E),null!==mo&&(mo=mo.nextEffect))}fo=bo=!1,"function"===typeof Ls&&Ls(e.stateNode),C=e.expirationTime,e=e.childExpirationTime,e=0===C||0!==e&&e<C?e:C,0===e&&(So=null),t.expirationTime=e,t.finishedWork=null}function nr(){return!!Do||!(null===No||No.timeRemaining()>Ko)&&(Do=!0)}function rr(t){null===Co&&i("246"),Co.expirationTime=0,Io||(Io=!0,ko=t)}function ir(t,e){var n=Ro;Ro=!0;try{return t(e)}finally{(Ro=n)||Ao||Qn(1,null)}}function sr(t,e){if(Ro&&!Bo){Bo=!0;try{return t(e)}finally{Bo=!1}}return t(e)}function or(t,e,n){if(_o)return t(e,n);Ro||Ao||0===Po||(Qn(Po,null),Po=0);var r=_o,i=Ro;Ro=_o=!0;try{return t(e,n)}finally{_o=r,(Ro=i)||Ao||Qn(1,null)}}function ar(t){if(!t)return _s;t=t._reactInternalFiber;t:{(2!==kt(t)||2!==t.tag&&3!==t.tag)&&i("170");var e=t;do{switch(e.tag){case 5:e=e.stateNode.context;break t;case 2:if(me(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}break;case 3:if(me(e.type._reactResult)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);i("171"),e=void 0}if(2===t.tag){var n=t.type;if(me(n))return xe(t,n,e)}else if(3===t.tag&&(n=t.type._reactResult,me(n)))return xe(t,n,e);return e}function ur(t,e,n,r,i){var s=e.current;return n=ar(n),null===e.context?e.context=n:e.pendingContext=n,e=i,i=je(r),i.payload={element:t},e=void 0===e?null:e,null!==e&&(i.callback=e),Ve(s,i),Wn(s,r),r}function lr(t,e,n,r){var i=e.current;return i=zn($n(),i),ur(t,e,n,i,r)}function cr(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 7:default:return t.child.stateNode}}function hr(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Si,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function fr(t){var e=2+25*(1+(($n()-2+500)/25|0));e<=co&&(e=co+1),this._expirationTime=co=e,this._root=t,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function dr(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function pr(t,e,n){e=new Te(5,null,null,e?3:0),t={current:e,containerInfo:t,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=e.stateNode=t}function gr(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function yr(t,e){if(e||(e=t?9===t.nodeType?t.documentElement:t.firstChild:null,e=!(!e||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new pr(t,!1,e)}function vr(t,e,n,r,s){gr(n)||i("200");var o=n._reactRootContainer;if(o){if("function"===typeof s){var a=s;s=function(){var t=cr(o._internalRoot);a.call(t)}}null!=t?o.legacy_renderSubtreeIntoContainer(t,e,s):o.render(e,s)}else{if(o=n._reactRootContainer=yr(n,r),"function"===typeof s){var u=s;s=function(){var t=cr(o._internalRoot);u.call(t)}}sr(function(){null!=t?o.legacy_renderSubtreeIntoContainer(t,e,s):o.render(e,s)})}return cr(o._internalRoot)}function mr(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return gr(e)||i("200"),hr(t,e,null,n)}var br=n(0),Sr=n(1),wr=n(16);br||i("227");var xr=!1,Er=null,Fr=!1,Ar=null,Cr={onError:function(t){xr=!0,Er=t}},Tr=null,Pr={},Dr=[],Ir={},kr={},Nr={},Rr=null,Br=null,_r=null,Hr=null,Or={injectEventPluginOrder:function(t){Tr&&i("101"),Tr=Array.prototype.slice.call(t),u()},injectEventPluginsByName:function(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];Pr.hasOwnProperty(e)&&Pr[e]===r||(Pr[e]&&i("102",e),Pr[e]=r,n=!0)}n&&u()}},jr=Math.random().toString(36).slice(2),Lr="__reactInternalInstance$"+jr,Vr="__reactEventHandlers$"+jr,Mr=!("undefined"===typeof window||!window.document||!window.document.createElement),Ur={animationend:P("Animation","AnimationEnd"),animationiteration:P("Animation","AnimationIteration"),animationstart:P("Animation","AnimationStart"),transitionend:P("Transition","TransitionEnd")},Kr={},qr={};Mr&&(qr=document.createElement("div").style,"AnimationEvent"in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),"TransitionEvent"in window||delete Ur.transitionend.transition);var zr=D("animationend"),Wr=D("animationiteration"),Yr=D("animationstart"),Jr=D("transitionend"),Gr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),$r=null,Xr=null,Zr=null;Sr(R.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=k)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=k)},persist:function(){this.isPersistent=k},isPersistent:N,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=N,this._dispatchInstances=this._dispatchListeners=null}}),R.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},R.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var i=new e;return Sr(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=Sr({},r.Interface,t),n.extend=r.extend,H(n),n},H(R);var Qr=R.extend({data:null}),ti=R.extend({data:null}),ei=[9,13,27,32],ni=Mr&&"CompositionEvent"in window,ri=null;Mr&&"documentMode"in document&&(ri=document.documentMode);var ii=Mr&&"TextEvent"in window&&!ri,si=Mr&&(!ni||ri&&8<ri&&11>=ri),oi=String.fromCharCode(32),ai={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ui=!1,li=!1,ci={eventTypes:ai,extractEvents:function(t,e,n,r){var i=void 0,s=void 0;if(ni)t:{switch(t){case"compositionstart":i=ai.compositionStart;break t;case"compositionend":i=ai.compositionEnd;break t;case"compositionupdate":i=ai.compositionUpdate;break t}i=void 0}else li?O(t,n)&&(i=ai.compositionEnd):"keydown"===t&&229===n.keyCode&&(i=ai.compositionStart);return i?(si&&"ko"!==n.locale&&(li||i!==ai.compositionStart?i===ai.compositionEnd&&li&&(s=I()):($r=r,Xr="value"in $r?$r.value:$r.textContent,li=!0)),i=Qr.getPooled(i,e,n,r),s?i.data=s:null!==(s=j(n))&&(i.data=s),T(i),s=i):s=null,(t=ii?L(t,n):V(t,n))?(e=ti.getPooled(ai.beforeInput,e,n,r),e.data=t,T(e)):e=null,null===s?e:null===e?s:[s,e]}},hi=null,fi=null,di=null,pi=!1,gi={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},yi=br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vi=/^(.*)[\\\/]/,mi="function"===typeof Symbol&&Symbol.for,bi=mi?Symbol.for("react.element"):60103,Si=mi?Symbol.for("react.portal"):60106,wi=mi?Symbol.for("react.fragment"):60107,xi=mi?Symbol.for("react.strict_mode"):60108,Ei=mi?Symbol.for("react.profiler"):60114,Fi=mi?Symbol.for("react.provider"):60109,Ai=mi?Symbol.for("react.context"):60110,Ci=mi?Symbol.for("react.async_mode"):60111,Ti=mi?Symbol.for("react.forward_ref"):60112,Pi=mi?Symbol.for("react.placeholder"):60113,Di="function"===typeof Symbol&&Symbol.iterator,Ii=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ki=Object.prototype.hasOwnProperty,Ni={},Ri={},Bi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Bi[t]=new at(t,0,!1,t,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Bi[e]=new at(e,1,!1,t[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){Bi[t]=new at(t,2,!1,t.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Bi[t]=new at(t,2,!1,t,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Bi[t]=new at(t,3,!1,t.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(t){Bi[t]=new at(t,3,!0,t,null)}),["capture","download"].forEach(function(t){Bi[t]=new at(t,4,!1,t,null)}),["cols","rows","size","span"].forEach(function(t){Bi[t]=new at(t,6,!1,t,null)}),["rowSpan","start"].forEach(function(t){Bi[t]=new at(t,5,!1,t.toLowerCase(),null)});var _i=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(_i,ut);Bi[e]=new at(e,1,!1,t,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(_i,ut);Bi[e]=new at(e,1,!1,t,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(_i,ut);Bi[e]=new at(e,1,!1,t,"http://www.w3.org/XML/1998/namespace")}),Bi.tabIndex=new at("tabIndex",1,!1,"tabindex",null);var Hi={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},Oi=null,ji=null,Li=!1;Mr&&(Li=$("input")&&(!document.documentMode||9<document.documentMode));var Vi={eventTypes:Hi,_isInputEventSupported:Li,extractEvents:function(t,e,n,r){var i=e?S(e):window,s=void 0,o=void 0,a=i.nodeName&&i.nodeName.toLowerCase();if("select"===a||"input"===a&&"file"===i.type?s=St:J(i)?Li?s=Ct:(s=Ft,o=Et):(a=i.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(s=At),s&&(s=s(t,e)))return vt(s,n,r);o&&o(t,i,e),"blur"===t&&(t=i._wrapperState)&&t.controlled&&"number"===i.type&&yt(i,"number",i.value)}},Mi=R.extend({view:null,detail:null}),Ui={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Ki=0,qi=0,zi=!1,Wi=!1,Yi=Mi.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Pt,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},movementX:function(t){if("movementX"in t)return t.movementX;var e=Ki;return Ki=t.screenX,zi?"mousemove"===t.type?t.screenX-e:0:(zi=!0,0)},movementY:function(t){if("movementY"in t)return t.movementY;var e=qi;return qi=t.screenY,Wi?"mousemove"===t.type?t.screenY-e:0:(Wi=!0,0)}}),Ji=Yi.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Gi={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},$i={eventTypes:Gi,extractEvents:function(t,e,n,r){var i="mouseover"===t||"pointerover"===t,s="mouseout"===t||"pointerout"===t;if(i&&(n.relatedTarget||n.fromElement)||!s&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,s?(s=e,e=(e=n.relatedTarget||n.toElement)?m(e):null):s=null,s===e)return null;var o=void 0,a=void 0,u=void 0,l=void 0;"mouseout"===t||"mouseover"===t?(o=Yi,a=Gi.mouseLeave,u=Gi.mouseEnter,l="mouse"):"pointerout"!==t&&"pointerover"!==t||(o=Ji,a=Gi.pointerLeave,u=Gi.pointerEnter,l="pointer");var c=null==s?i:S(s);if(i=null==e?i:S(e),t=o.getPooled(a,s,n,r),t.type=l+"leave",t.target=c,t.relatedTarget=i,n=o.getPooled(u,e,n,r),n.type=l+"enter",n.target=i,n.relatedTarget=c,r=e,s&&r)t:{for(e=s,i=r,l=0,o=e;o;o=x(o))l++;for(o=0,u=i;u;u=x(u))o++;for(;0<l-o;)e=x(e),l--;for(;0<o-l;)i=x(i),o--;for(;l--;){if(e===i||e===i.alternate)break t;e=x(e),i=x(i)}e=null}else e=null;for(i=e,e=[];s&&s!==i&&(null===(l=s.alternate)||l!==i);)e.push(s),s=x(s);for(s=[];r&&r!==i&&(null===(l=r.alternate)||l!==i);)s.push(r),r=x(r);for(r=0;r<e.length;r++)A(e[r],"bubbled",t);for(r=s.length;0<r--;)A(s[r],"captured",n);return[t,n]}},Xi=Object.prototype.hasOwnProperty,Zi=R.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qi=R.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ts=Mi.extend({relatedTarget:null}),es={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ns={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},rs=Mi.extend({key:function(t){if(t.key){var e=es[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?(t=_t(t),13===t?"Enter":String.fromCharCode(t)):"keydown"===t.type||"keyup"===t.type?ns[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Pt,charCode:function(t){return"keypress"===t.type?_t(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?_t(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),is=Yi.extend({dataTransfer:null}),ss=Mi.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Pt}),os=R.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),as=Yi.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),us=[["abort","abort"],[zr,"animationEnd"],[Wr,"animationIteration"],[Yr,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[Jr,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],ls={},cs={};[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(t){Ht(t,!0)}),us.forEach(function(t){Ht(t,!1)});var hs={eventTypes:ls,isInteractiveTopLevelEventType:function(t){return void 0!==(t=cs[t])&&!0===t.isInteractive},extractEvents:function(t,e,n,r){var i=cs[t];if(!i)return null;switch(t){case"keypress":if(0===_t(n))return null;case"keydown":case"keyup":t=rs;break;case"blur":case"focus":t=ts;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=Yi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=is;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=ss;break;case zr:case Wr:case Yr:t=Zi;break;case Jr:t=os;break;case"scroll":t=Mi;break;case"wheel":t=as;break;case"copy":case"cut":case"paste":t=Qi;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=Ji;break;default:t=R}return e=t.getPooled(i,e,n,r),T(e),e}},fs=hs.isInteractiveTopLevelEventType,ds=[],ps=!0,gs={},ys=0,vs="_reactListenersID"+(""+Math.random()).slice(2),ms=Mr&&"documentMode"in document&&11>=document.documentMode,bs={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Ss=null,ws=null,xs=null,Es=!1,Fs={eventTypes:bs,extractEvents:function(t,e,n,r){var i,s=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!s)){t:{s=Ut(s),i=Nr.onSelect;for(var o=0;o<i.length;o++){var a=i[o];if(!s.hasOwnProperty(a)||!s[a]){s=!1;break t}}s=!0}i=!s}if(i)return null;switch(s=e?S(e):window,t){case"focus":(J(s)||"true"===s.contentEditable)&&(Ss=s,ws=e,xs=null);break;case"blur":xs=ws=Ss=null;break;case"mousedown":Es=!0;break;case"contextmenu":case"mouseup":case"dragend":return Es=!1,Gt(n,r);case"selectionchange":if(ms)break;case"keydown":case"keyup":return Gt(n,r)}return null}};Or.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Rr=w,Br=b,_r=S,Or.injectEventPluginsByName({SimpleEventPlugin:hs,EnterLeaveEventPlugin:$i,ChangeEventPlugin:Vi,SelectEventPlugin:Fs,BeforeInputEventPlugin:ci});var As={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Cs=void 0,Ts=function(t){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n)})}:t}(function(t,e){if(t.namespaceURI!==As.svg||"innerHTML"in t)t.innerHTML=e;else{for(Cs=Cs||document.createElement("div"),Cs.innerHTML="<svg>"+e+"</svg>",e=Cs.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}}),Ps={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ds=["Webkit","ms","Moz","O"];Object.keys(Ps).forEach(function(t){Ds.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ps[e]=Ps[t]})});var Is=Sr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ks=null,Ns=null;new Set;var Rs=[],Bs=-1,_s={},Hs={current:_s},Os={current:!1},js=_s,Ls=null,Vs=null,Ms=!1,Us={current:null},Ks=null,qs=null,zs=null,Ws={},Ys={current:Ws},Js={current:Ws},Gs={current:Ws},$s=(new br.Component).refs,Xs={isMounted:function(t){return!!(t=t._reactInternalFiber)&&2===kt(t)},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=$n();r=zn(r,t);var i=je(r);i.payload=e,void 0!==n&&null!==n&&(i.callback=n),Ve(t,i),Wn(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=$n();r=zn(r,t);var i=je(r);i.tag=1,i.payload=e,void 0!==n&&null!==n&&(i.callback=n),Ve(t,i),Wn(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=$n();n=zn(n,t);var r=je(n);r.tag=2,void 0!==e&&null!==e&&(r.callback=e),Ve(t,r),Wn(t,n)}},Zs=Array.isArray,Qs=cn(!0),to=cn(!1),eo=null,no=null,ro=!1,io=yi.ReactCurrentOwner,so=void 0,oo=void 0,ao=void 0;so=function(){},oo=function(t,e,n,r,i){var s=t.memoizedProps;if(s!==r){var o=e.stateNode;switch(Ze(Ys.current),t=null,n){case"input":s=ht(o,s),r=ht(o,r),t=[];break;case"option":s=Xt(o,s),r=Xt(o,r),t=[];break;case"select":s=Sr({},s,{value:void 0}),r=Sr({},r,{value:void 0}),t=[];break;case"textarea":s=Qt(o,s),r=Qt(o,r),t=[];break;default:"function"!==typeof s.onClick&&"function"===typeof r.onClick&&(o.onclick=ce)}ae(n,r),o=n=void 0;var a=null;for(n in s)if(!r.hasOwnProperty(n)&&s.hasOwnProperty(n)&&null!=s[n])if("style"===n){var u=s[n];for(o in u)u.hasOwnProperty(o)&&(a||(a={}),a[o]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(kr.hasOwnProperty(n)?t||(t=[]):(t=t||[]).push(n,null));for(n in r){var l=r[n];if(u=null!=s?s[n]:void 0,r.hasOwnProperty(n)&&l!==u&&(null!=l||null!=u))if("style"===n)if(u){for(o in u)!u.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(a||(a={}),a[o]="");for(o in l)l.hasOwnProperty(o)&&u[o]!==l[o]&&(a||(a={}),a[o]=l[o])}else a||(t||(t=[]),t.push(n,a)),a=l;else"dangerouslySetInnerHTML"===n?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(t=t||[]).push(n,""+l)):"children"===n?u===l||"string"!==typeof l&&"number"!==typeof l||(t=t||[]).push(n,""+l):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(kr.hasOwnProperty(n)?(null!=l&&le(i,n),t||u===l||(t=[])):(t=t||[]).push(n,l))}a&&(t=t||[]).push("style",a),i=t,(e.updateQueue=i)&&Dn(e)}},ao=function(t,e,n,r){n!==r&&Dn(e)};var uo={readContext:Xe},lo=yi.ReactCurrentOwner,co=0,ho=0,fo=!1,po=null,go=null,yo=0,vo=!1,mo=null,bo=!1,So=null,wo=null,xo=null,Eo=0,Fo=void 0,Ao=!1,Co=null,To=0,Po=0,Do=!1,Io=!1,ko=null,No=null,Ro=!1,Bo=!1,_o=!1,Ho=null,Oo=wr.unstable_now(),jo=2+(Oo/10|0),Lo=jo,Vo=50,Mo=0,Uo=null,Ko=1;hi=function(t,e,n){switch(e){case"input":if(pt(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=w(r);s||i("90"),tt(r),pt(r,s)}}}break;case"textarea":ee(t,n);break;case"select":null!=(e=n.value)&&Zt(t,!!n.multiple,e,!1)}},fr.prototype.render=function(t){this._defer||i("250"),this._hasChildren=!0,this._children=t;var e=this._root._internalRoot,n=this._expirationTime,r=new dr;return ur(t,e,null,n,r._onCommit),r},fr.prototype.then=function(t){if(this._didComplete)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},fr.prototype.commit=function(){var t=this._root._internalRoot,e=t.firstBatch;if(this._defer&&null!==e||i("251"),this._hasChildren){var n=this._expirationTime;if(e!==this){this._hasChildren&&(n=this._expirationTime=e._expirationTime,this.render(this._children));for(var r=null,s=e;s!==this;)r=s,s=s._next;null===r&&i("251"),r._next=s._next,this._next=e,t.firstBatch=this}this._defer=!1,e=n,Ao&&i("253"),Co=t,To=e,tr(t,e,!0),Qn(1,null),e=this._next,this._next=null,e=t.firstBatch=e,null!==e&&e._hasChildren&&e.render(e._children)}else this._next=null,this._defer=!1},fr.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++)(0,t[e])()}},dr.prototype.then=function(t){if(this._didCommit)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},dr.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++){var n=t[e];"function"!==typeof n&&i("191",n),n()}}},pr.prototype.render=function(t,e){var n=this._internalRoot,r=new dr;return e=void 0===e?null:e,null!==e&&r.then(e),lr(t,n,null,r._onCommit),r},pr.prototype.unmount=function(t){var e=this._internalRoot,n=new dr;return t=void 0===t?null:t,null!==t&&n.then(t),lr(null,e,null,n._onCommit),n},pr.prototype.legacy_renderSubtreeIntoContainer=function(t,e,n){var r=this._internalRoot,i=new dr;return n=void 0===n?null:n,null!==n&&i.then(n),lr(e,r,t,i._onCommit),i},pr.prototype.createBatch=function(){var t=new fr(this),e=t._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=t,t._next=null;else{for(n=null;null!==r&&r._expirationTime<=e;)n=r,r=r._next;t._next=r,null!==n&&(n._next=t)}return t},q=ir,z=or,W=function(){Ao||0===Po||(Qn(Po,null),Po=0)};var qo={createPortal:mr,findDOMNode:function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternalFiber;return void 0===e&&("function"===typeof t.render?i("188"):i("268",Object.keys(t))),t=Bt(e),t=null===t?null:t.stateNode},hydrate:function(t,e,n){return vr(null,t,e,!0,n)},render:function(t,e,n){return vr(null,t,e,!1,n)},unstable_renderSubtreeIntoContainer:function(t,e,n,r){return(null==t||void 0===t._reactInternalFiber)&&i("38"),vr(t,e,n,!1,r)},unmountComponentAtNode:function(t){return gr(t)||i("40"),!!t._reactRootContainer&&(sr(function(){vr(null,null,t,!1,function(){t._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return mr.apply(void 0,arguments)},unstable_batchedUpdates:ir,unstable_interactiveUpdates:or,flushSync:function(t,e){Ao&&i("187");var n=Ro;Ro=!0;try{return Yn(t,e)}finally{Ro=n,Qn(1,null)}},unstable_flushControlled:function(t){var e=Ro;Ro=!0;try{Yn(t)}finally{(Ro=e)||Ao||Qn(1,null)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[b,S,w,Or.injectEventPluginsByName,Ir,T,function(t){f(t,C)},U,K,Mt,v]},unstable_createRoot:function(t,e){return gr(t)||i("278"),new pr(t,!0,null!=e&&!0===e.hydrate)}};!function(t){var e=t.findFiberByHostInstance;Ce(Sr({},t,{findHostInstanceByFiber:function(t){return t=Bt(t),null===t?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null}}))}({findFiberByHostInstance:m,bundleType:0,version:"16.5.2",rendererPackageName:"react-dom"});var zo={default:qo},Wo=zo&&qo||zo;t.exports=Wo.default||Wo},function(t,e,n){"use strict";t.exports=n(17)},function(t,e,n){"use strict";function r(){if(!c){var t=l.timesOutAt;h?w():h=!0,S(s,t)}}function i(){var t=l,e=l.next;if(l===e)l=null;else{var n=l.previous;l=n.next=e,e.previous=n}t.next=t.previous=null,(t=t.callback)(d)}function s(t){c=!0,d.didTimeout=t;try{if(t)for(;null!==l;){var n=e.unstable_now();if(!(l.timesOutAt<=n))break;do{i()}while(null!==l&&l.timesOutAt<=n)}else if(null!==l)do{i()}while(null!==l&&0<x()-e.unstable_now())}finally{c=!1,null!==l?r(l):h=!1}}function o(t){a=v(function(e){y(u),t(e)}),u=g(function(){m(a),t(e.unstable_now())},100)}Object.defineProperty(e,"__esModule",{value:!0});var a,u,l=null,c=!1,h=!1,f="object"===typeof performance&&"function"===typeof performance.now,d={timeRemaining:f?function(){var t=x()-performance.now();return 0<t?t:0}:function(){var t=x()-Date.now();return 0<t?t:0},didTimeout:!1},p=Date,g="function"===typeof setTimeout?setTimeout:void 0,y="function"===typeof clearTimeout?clearTimeout:void 0,v="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,m="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0;if(f){var b=performance;e.unstable_now=function(){return b.now()}}else e.unstable_now=function(){return p.now()};var S,w,x;if("undefined"===typeof window){var E=-1;S=function(t){E=setTimeout(t,0,!0)},w=function(){clearTimeout(E)},x=function(){return 0}}else if(window._schedMock){var F=window._schedMock;S=F[0],w=F[1],x=F[2]}else{"undefined"!==typeof console&&("function"!==typeof v&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var A=null,C=!1,T=-1,P=!1,D=!1,I=0,k=33,N=33;x=function(){return I};var R="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(t){if(t.source===window&&t.data===R){C=!1;var n=e.unstable_now();if(t=!1,0>=I-n){if(!(-1!==T&&T<=n))return void(P||(P=!0,o(B)));t=!0}if(T=-1,n=A,A=null,null!==n){D=!0;try{n(t)}finally{D=!1}}}},!1);var B=function(t){P=!1;var e=t-I+N;e<N&&k<N?(8>e&&(e=8),N=e<k?k:e):k=e,I=t+N,C||(C=!0,window.postMessage(R,"*"))};S=function(t,e){A=t,T=e,D?window.postMessage(R,"*"):P||(P=!0,o(B))},w=function(){A=null,C=!1,T=-1}}e.unstable_scheduleWork=function(t,n){var i=e.unstable_now();if(n=void 0!==n&&null!==n&&null!==n.timeout&&void 0!==n.timeout?i+n.timeout:i+5e3,t={callback:t,timesOutAt:n,next:null,previous:null},null===l)l=t.next=t.previous=t,r(l);else{i=null;var s=l;do{if(s.timesOutAt>n){i=s;break}s=s.next}while(s!==l);null===i?i=l:i===l&&(l=t,r(l)),n=i.previous,n.next=i.previous=t,t.next=i,t.previous=n}return t},e.unstable_cancelScheduledWork=function(t){var e=t.next;if(null!==e){if(e===t)l=null;else{t===l&&(l=e);var n=t.previous;n.next=e,e.previous=n}t.next=t.previous=null}}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function s(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(0),a=n.n(o),u=n(19),l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),l(e,[{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(u.a,{doFetch:!0}))}}]),e}(o.Component);e.a=c},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){function r(i,s){try{var o=e[i](s),a=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(a).then(function(t){r("next",t)},function(t){r("throw",t)});t(a)}return r("next")})}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function u(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var l=n(20),c=n.n(l),h=n(0),f=n.n(h),d=n(5),p=(n.n(d),n(2)),g=(n.n(p),n(27)),y=n(28),v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),m=function(t){function e(t){o(this,e);var n=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.deleteContent=function(t){n.setState(function(e){var n=e.jwtJson;return console.log(n),{jwtJson:n.filter(function(e){return Object.keys(e)[0]!==t})}},function(){n.deleteData(t)})},n.exitNewItem=function(t){n.setState({createNew:!1}),n.setState({editing:""})},n.state={jwtJson:[],createNew:!1,editing:""},n.deleteContent=n.deleteContent.bind(n),n.newItem=n.newItem.bind(n),n.exitNewItem=n.exitNewItem.bind(n),n.isUnique=n.isUnique.bind(n),n.updateIdCB=n.updateIdCB.bind(n),n.returnItem=n.returnItem.bind(n),n.submitContent=n.submitContent.bind(n),n.saveData=n.saveData.bind(n),n.initData=n.initData.bind(n),n}return u(e,t),v(e,[{key:"componentDidMount",value:function(){function t(){return e.apply(this,arguments)}var e=s(c.a.mark(function t(){var e;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.props.doFetch){t.next=5;break}return t.next=3,fetch("http://localhost:8090/api/public",{method:"GET",headers:{Accept:"application/json"}}).then(function(t){return t.json()}).catch(function(t){console.log("Could not load data, make sure the server is running.")});case 3:e=t.sent,this.initData(e);case 5:case"end":return t.stop()}},t,this)}));return t}()},{key:"saveData",value:function(){function t(t){return e.apply(this,arguments)}var e=s(c.a.mark(function t(e){var n,r,i;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object.keys(e)[0],r=e[n],i={id:n,key:r},!this.props.doFetch){t.next=6;break}return t.next=6,fetch("http://localhost:8090/api/public",{method:"POST",headers:{Accept:"application/json",Content:"application/json"},body:JSON.stringify(i)}).then(function(t){console.log("Saved the data")}).catch(function(t){console.log("Could not save data")});case 6:case"end":return t.stop()}},t,this)}));return t}()},{key:"deleteData",value:function(){function t(t){return e.apply(this,arguments)}var e=s(c.a.mark(function t(e){return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.props.doFetch){t.next=4;break}return t.next=3,fetch("http://localhost:8090/api/public/"+e,{method:"DELETE",headers:{Accept:"application/json",Content:"application/json"}}).then(function(t){console.log("Deleted the data")}).catch(function(t){console.log("Could not save data")});case 3:case 4:case"end":return t.stop()}},t,this)}));return t}()},{key:"editData",value:function(){function t(t,n){return e.apply(this,arguments)}var e=s(c.a.mark(function t(e,n){var r,i,s;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=Object.keys(n)[0],i=n[r],s={id:r,key:JSON.stringify(i)},!this.props.doFetch){t.next=7;break}return t.next=6,fetch("http://localhost:8090/api/public/"+e,{method:"PUT",headers:{Accept:"application/json",Contetn:"application/json"},body:JSON.stringify(s)}).then(function(t){console.log("Saved the data")}).catch(function(t){console.log("Could not save data")});case 6:case 7:case"end":return t.stop()}},t,this)}));return t}()},{key:"initData",value:function(t){if(t){var e=[];Object.keys(t).map(function(n){var r=t[n].id;e.push(i({},r,t[n].key))}),this.setState({jwtJson:e})}}},{key:"updateIdCB",value:function(t,e,n){var r=this,s=!0;this.state.jwtJson.map(function(e){JSON.stringify(e[t])==JSON.stringify(n)&&(s=!1)}),s&&this.setState(function(r){return{jwtJson:r.jwtJson.map(function(r){return Object.keys(r)[0]==t?(console.log(n),console.log(r[t]),i({},e,JSON.stringify(n))):r})}},function(){return r.editData(t,i({},e,n))})}},{key:"newItem",value:function(){this.setState({createNew:!0}),this.setState({editing:"editing"})}},{key:"isUnique",value:function(t){return 0===this.state.jwtJson.filter(function(e){return Object.keys(e)[0]==t}).length}},{key:"submitContent",value:function(t,e){var n=this;this.setState({createNew:!1}),this.setState({editing:""});var s=i({},t,e);this.setState(function(t){return{jwtJson:[s].concat(r(t.jwtJson))}},function(){n.saveData(i({},t,e))})}},{key:"returnItem",value:function(){if(this.state.createNew)return f.a.createElement(y.a,{deleteCB:this.exitNewItem,isUnique:this.isUnique,submitContent:this.submitContent})}},{key:"render",value:function(){var t,e,n=this,r=0;return f.a.createElement("div",null,f.a.createElement("button",{id:"addButton",className:"newEntryButton",onClick:this.newItem},f.a.createElement("span",{className:"glyphicon glyphicon-plus-sign"})),f.a.createElement("button",{className:"newEntryButton reloadButton",onClick:this.initData},f.a.createElement("span",{className:"glyphicon glyphicon-retweet"})),f.a.createElement("div",{className:"borderDiv"}),this.returnItem(),this.state.jwtJson.map(function(i){return t=Object.keys(i)[0],r+=.2,e=i[t],f.a.createElement(g.a,{extraClass:n.state.editing,deleteCB:n.deleteContent,updateIdCB:n.updateIdCB,kid:t,delay:r+"s",jwt:e,key:t})}))}}]),e}(h.Component);e.a=m},function(t,e,n){t.exports=n(21)},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,s=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(22),i)r.regeneratorRuntime=s;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";function n(t,e,n,r){var s=e&&e.prototype instanceof i?e:i,o=Object.create(s.prototype),a=new d(r||[]);return o._invoke=l(t,n,a),o}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function i(){}function s(){}function o(){}function a(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function u(t){function e(n,i,s,o){var a=r(t[n],t,i);if("throw"!==a.type){var u=a.arg,l=u.value;return l&&"object"===typeof l&&m.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,s,o)},function(t){e("throw",t,s,o)}):Promise.resolve(l).then(function(t){u.value=t,s(u)},o)}o(a.arg)}function n(t,n){function r(){return new Promise(function(r,i){e(t,n,r,i)})}return i=i?i.then(r,r):r()}var i;this._invoke=n}function l(t,e,n){var i=A;return function(s,o){if(i===T)throw new Error("Generator is already running");if(i===P){if("throw"===s)throw o;return g()}for(n.method=s,n.arg=o;;){var a=n.delegate;if(a){var u=c(a,n);if(u){if(u===D)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===A)throw i=P,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=T;var l=r(t,e,n);if("normal"===l.type){if(i=n.done?P:C,l.arg===D)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=P,n.method="throw",n.arg=l.arg)}}}function c(t,e){var n=t.iterator[e.method];if(n===y){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=y,c(t,e),"throw"===e.method))return D;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return D}var i=r(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,D;var s=i.arg;return s?s.done?(e[t.resultName]=s.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=y),e.delegate=null,D):s:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,D)}function h(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function f(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(h,this),this.reset(!0)}function p(t){if(t){var e=t[S];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(m.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=y,e.done=!0,e};return r.next=r}}return{next:g}}function g(){return{value:y,done:!0}}var y,v=Object.prototype,m=v.hasOwnProperty,b="function"===typeof Symbol?Symbol:{},S=b.iterator||"@@iterator",w=b.asyncIterator||"@@asyncIterator",x=b.toStringTag||"@@toStringTag",E="object"===typeof t,F=e.regeneratorRuntime;if(F)return void(E&&(t.exports=F));F=e.regeneratorRuntime=E?t.exports:{},F.wrap=n;var A="suspendedStart",C="suspendedYield",T="executing",P="completed",D={},I={};I[S]=function(){return this};var k=Object.getPrototypeOf,N=k&&k(k(p([])));N&&N!==v&&m.call(N,S)&&(I=N);var R=o.prototype=i.prototype=Object.create(I);s.prototype=R.constructor=o,o.constructor=s,o[x]=s.displayName="GeneratorFunction",F.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===s||"GeneratorFunction"===(e.displayName||e.name))},F.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,o):(t.__proto__=o,x in t||(t[x]="GeneratorFunction")),t.prototype=Object.create(R),t},F.awrap=function(t){return{__await:t}},a(u.prototype),u.prototype[w]=function(){return this},F.AsyncIterator=u,F.async=function(t,e,r,i){var s=new u(n(t,e,r,i));return F.isGeneratorFunction(e)?s:s.next().then(function(t){return t.done?t.value:s.next()})},a(R),R[x]="Generator",R[S]=function(){return this},R.toString=function(){return"[object Generator]"},F.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},F.values=p,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.method="next",this.arg=y,this.tryEntries.forEach(f),!t)for(var e in this)"t"===e.charAt(0)&&m.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=y)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return s.type="throw",s.arg=t,n.next=e,r&&(n.method="next",n.arg=y),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var o=m.call(i,"catchLoc"),a=m.call(i,"finallyLoc");if(o&&a){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,D):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),D},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),f(n),D}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:p(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=y),D}}}(function(){return this}()||Function("return this")())},function(t,e,n){"use strict";(function(t){function r(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(r()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=s.prototype):(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,n){if(!s.TYPED_ARRAY_SUPPORT&&!(this instanceof s))return new s(t,e,n);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return o(this,t,e,n)}function o(t,e,n,r){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,n,r):"string"===typeof e?c(t,e,n):d(t,e)}function a(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e,n,r){return a(e),e<=0?i(t,e):void 0!==n?"string"===typeof r?i(t,e).fill(n,r):i(t,e).fill(n):i(t,e)}function l(t,e){if(a(e),t=i(t,e<0?0:0|p(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function c(t,e,n){if("string"===typeof n&&""!==n||(n="utf8"),!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(e,n);t=i(t,r);var o=t.write(e,n);return o!==r&&(t=t.slice(0,o)),t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=i(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),s.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=s.prototype):t=h(t,e),t}function d(t,e){if(s.isBuffer(e)){var n=0|p(e.length);return t=i(t,n),0===t.length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||G(e.length)?i(t,0):h(t,e);if("Buffer"===e.type&&Z(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(t){if(t>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),s.alloc(+t)}function y(t,e){if(s.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(r)return q(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return I(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:S(t,e,n,r,i);if("number"===typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):S(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function S(t,e,n,r,i){function s(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,a/=2,u/=2,n/=2}var l;if(i){var c=-1;for(l=n;l<a;l++)if(s(t,l)===s(e,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===u)return c*o}else-1!==c&&(l-=l-c),c=-1}else for(n+u>a&&(n=a-u),l=n;l>=0;l--){for(var h=!0,f=0;f<u;f++)if(s(t,l+f)!==s(e,f)){h=!1;break}if(h)return l}return-1}function w(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=e.length;if(s%2!==0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[n+o]=a}return o}function x(t,e,n,r){return J(q(e,t.length-n),t,n,r)}function E(t,e,n,r){return J(z(e),t,n,r)}function F(t,e,n,r){return E(t,e,n,r)}function A(t,e,n,r){return J(Y(e),t,n,r)}function C(t,e,n,r){return J(W(e,t.length-n),t,n,r)}function T(t,e,n){return 0===e&&n===t.length?$.fromByteArray(t):$.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=n){var u,l,c,h;switch(a){case 1:s<128&&(o=s);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&s)<<6|63&u)>127&&(o=h);break;case 3:u=t[i+1],l=t[i+2],128===(192&u)&&128===(192&l)&&(h=(15&s)<<12|(63&u)<<6|63&l)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:u=t[i+1],l=t[i+2],c=t[i+3],128===(192&u)&&128===(192&l)&&128===(192&c)&&(h=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return D(r)}function D(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Q));return n}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function N(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=e;s<n;++s)i+=K(t[s]);return i}function R(t,e,n){for(var r=t.slice(e,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function B(t,e,n){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function _(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function H(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-n,2);i<s;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-n,4);i<s;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function j(t,e,n,r,i,s){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,i){return i||j(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function V(t,e,n,r,i){return i||j(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function M(t){if(t=U(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function U(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function K(t){return t<16?"0"+t.toString(16):t.toString(16)}function q(t,e){e=e||1/0;for(var n,r=t.length,i=null,s=[],o=0;o<r;++o){if((n=t.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;s.push(n)}else if(n<2048){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function z(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function W(t,e){for(var n,r,i,s=[],o=0;o<t.length&&!((e-=2)<0);++o)n=t.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}function Y(t){return $.toByteArray(M(t))}function J(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function G(t){return t!==t}var $=n(24),X=n(25),Z=n(26);e.Buffer=s,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=r(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,n){return o(null,t,e,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,n){return u(null,t,e,n)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Z(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):v.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,a=n-e,u=Math.min(o,a),l=this.slice(r,i),c=t.slice(e,n),h=0;h<u;++h)if(l[h]!==c[h]){o=l[h],a=c[h];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"===typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return E(this,t,e,n);case"latin1":case"binary":return F(this,t,e,n);case"base64":return A(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;s.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r;if(s.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=s.prototype;else{var i=e-t;r=new s(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},s.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t],i=1,s=0;++s<e&&(i*=256);)r+=this[t+s]*i;return r},s.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t],i=1,s=0;++s<e&&(i*=256);)r+=this[t+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=e,i=1,s=this[t+--r];r>0&&(i*=256);)s+=this[t+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},s.prototype.readInt8=function(t,e){return e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||B(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||B(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||B(t,4,this.length),X.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),X.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),X.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),X.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){_(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=1,s=0;for(this[e]=255&t;++s<n&&(i*=256);)this[e+s]=t/i&255;return e+n},s.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){_(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=n-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):H(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):H(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):O(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);_(this,t,e,n,i-1,-i)}var s=0,o=1,a=0;for(this[e]=255&t;++s<n&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);_(this,t,e,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):H(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):H(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):O(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||_(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return V(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return V(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},s.prototype.fill=function(t,e,n,r){if("string"===typeof t){if("string"===typeof e?(r=e,e=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var o;if("number"===typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=s.isBuffer(t)?t:q(new s(t,r).toString()),u=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,n(4))},function(t,e,n){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function i(t){var e=r(t),n=e[0],i=e[1];return 3*(n+i)/4-i}function s(t,e,n){return 3*(e+n)/4-n}function o(t){for(var e,n=r(t),i=n[0],o=n[1],a=new f(s(t,i,o)),u=0,l=o>0?i-4:i,c=0;c<l;c+=4)e=h[t.charCodeAt(c)]<<18|h[t.charCodeAt(c+1)]<<12|h[t.charCodeAt(c+2)]<<6|h[t.charCodeAt(c+3)],a[u++]=e>>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===o&&(e=h[t.charCodeAt(c)]<<2|h[t.charCodeAt(c+1)]>>4,a[u++]=255&e),1===o&&(e=h[t.charCodeAt(c)]<<10|h[t.charCodeAt(c+1)]<<4|h[t.charCodeAt(c+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a}function a(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function u(t,e,n){for(var r,i=[],s=e;s<n;s+=3)r=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),i.push(a(r));return i.join("")}function l(t){for(var e,n=t.length,r=n%3,i=[],s=0,o=n-r;s<o;s+=16383)i.push(u(t,s,s+16383>o?o:s+16383));return 1===r?(e=t[n-1],i.push(c[e>>2]+c[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(c[e>>10]+c[e>>4&63]+c[e<<2&63]+"=")),i.join("")}e.byteLength=i,e.toByteArray=o,e.fromByteArray=l;for(var c=[],h=[],f="undefined"!==typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,g=d.length;p<g;++p)c[p]=d[p],h[d.charCodeAt(p)]=p;h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var s,o,a=8*i-r-1,u=(1<<a)-1,l=u>>1,c=-7,h=n?i-1:0,f=n?-1:1,d=t[e+h];for(h+=f,s=d&(1<<-c)-1,d>>=-c,c+=a;c>0;s=256*s+t[e+h],h+=f,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=256*o+t[e+h],h+=f,c-=8);if(0===s)s=1-l;else{if(s===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),s-=l}return(d?-1:1)*o*Math.pow(2,s-r)},e.write=function(t,e,n,r,i,s){var o,a,u,l=8*s-i-1,c=(1<<l)-1,h=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:s-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),e+=o+h>=1?f/u:f*Math.pow(2,1-h),e*u>=2&&(o++,u/=2),o+h>=c?(a=0,o=c):o+h>=1?(a=(e*u-1)*Math.pow(2,i),o+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[n+d]=255&a,d+=p,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;t[n+d]=255&o,d+=p,o/=256,l-=8);t[n+d-p]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function s(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(0),a=n.n(o),u=n(2),l=n.n(u),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),h=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={animationClasses:"animated animatedFadeInUp fadeInUp keyEntry",kid:n.props.kid,jwt:n.props.jwt,editMode:!1,showContent:!0,data:"text/json;charset=utf-8,"+encodeURIComponent(n.props.jwt)},n.updateContent=n.updateContent.bind(n),n.handleChange=n.handleChange.bind(n),n.deleteContent=n.deleteContent.bind(n),n}return s(e,t),c(e,[{key:"componentDidMount",value:function(){try{var t=JSON.parse(this.state.jwt)}catch(e){t=this.state.jwt}try{var e=u.KEYUTIL.getKey(t),n=u.KEYUTIL.getJWKFromKey(e);this.setState({jwt:JSON.stringify(n)}),this.setState({data:"text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(n))})}catch(t){}}},{key:"handleChange",value:function(t){this.setState({jwt:t.target.value})}},{key:"updateContent",value:function(t){t.preventDefault(),this.setState({animationClasses:"keyEntry"}),console.log(this.state.animationClasses);try{var e=JSON.parse(this.state.jwt)}catch(t){e=this.state.jwt}try{var n=u.KEYUTIL.getKey(e),r=u.KEYUTIL.getJWKFromKey(n);this.setState({jwt:JSON.stringify(r)});var i=l.a.jws.JWS.getJWKthumbprint(r);i!=this.state.kid&&(this.props.updateIdCB(this.state.kid,i,r),this.setState({kid:i})),this.setState({data:"text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(r))})}catch(t){this.props.updateIdCB(this.state.kid,this.state.kid,this.state.jwt)}this.state.editMode?this.setState({editMode:!1}):this.setState({editMode:!0})}},{key:"deleteContent",value:function(){this.props.deleteCB(this.state.kid)}},{key:"render",value:function(){var t=this,e={animationDelay:this.props.delay};return this.state.showContent?a.a.createElement("div",null,a.a.createElement("div",{className:this.state.animationClasses+" "+this.props.extraClass,value:this.state.value,style:e},a.a.createElement("div",{className:"jwtContent"},a.a.createElement("form",{onSubmit:this.updateContent,className:"keyEntryForm"},a.a.createElement("div",{className:"kidBox"},"ID: ",this.state.kid),this.state.editMode?a.a.createElement("div",null,a.a.createElement("input",{value:this.state.jwt,className:"editInput",onChange:function(e){return t.handleChange(e)}})):a.a.createElement("div",{className:"keyData"},this.state.jwt))),a.a.createElement("div",{className:"buttonContent"},a.a.createElement("button",{className:"editingButton addButton "+this.props.extraClass,onClick:this.state.editMode?this.updateContent:function(){t.setState({editMode:!t.state.editMode})}},this.state.editMode?a.a.createElement("span",{className:"glyphicon glyphicon-remove"}):a.a.createElement("span",{className:"glyphicon glyphicon-pencil"})),a.a.createElement("button",{className:"editingButton deleteButton "+this.props.extraClass,onClick:this.deleteContent},a.a.createElement("span",{className:"glyphicon glyphicon-trash"})),a.a.createElement("a",{href:"data:"+this.state.data,download:this.state.kid+".json"},a.a.createElement("button",{className:"editingButton downloadButton "+this.props.extraClass},a.a.createElement("span",{className:"glyphicon glyphicon-download-alt"})))))):null}}]),e}(o.Component);e.a=h},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),u=n.n(a),l=n(2),c=n.n(l),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t){function e(t){i(this,e);var n=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={kid:"",jwt:"",editMode:!0,generateKeyID:!1,uniqueKey:!0},n.updateContent=n.updateContent.bind(n),n.handleChange=n.handleChange.bind(n),n.deleteContent=n.deleteContent.bind(n),n.generateKeyID=n.generateKeyID.bind(n),n.submitContent=n.submitContent.bind(n),n}return o(e,t),h(e,[{key:"handleChange",value:function(t,e){this.setState(r({},e,t.target.value)),"jwt"===e&this.state.generateKeyID&&this.setState({kid:this.getKeyID(t.target.value)})}},{key:"getKeyID",value:function(t){var e=null;try{e=JSON.parse(t)}catch(n){e=t}i="";try{var n=l.KEYUTIL.getKey(e),r=l.KEYUTIL.getJWKFromKey(n),i=c.a.jws.JWS.getJWKthumbprint(r)}catch(t){console.log(t)}return i}},{key:"generateKeyID",value:function(){this.state.generateKeyID||this.setState({kid:this.getKeyID(this.state.jwt)}),this.setState({generateKeyID:!this.state.generateKeyID})}},{key:"updateContent",value:function(t){try{var e=JSON.parse(this.state.jwt)}catch(t){e=this.state.jwt}try{var n=l.KEYUTIL.getKey(e),r=l.KEYUTIL.getJWKFromKey(n);this.setState({jwt:JSON.stringify(r)});var i=c.a.jws.JWS.getJWKthumbprint(r);this.setState({kid:i})}catch(t){}t.preventDefault(),this.state.editMode?this.setState({editMode:!1}):this.setState({editMode:!0})}},{key:"deleteContent",value:function(){console.log("deleting"),this.props.deleteCB(!1)}},{key:"submitContent",value:function(t){t.preventDefault(),this.props.isUnique(this.state.kid)?this.props.submitContent(this.state.kid,this.state.jwt):alert("Key ID must be unique")}},{key:"render",value:function(){var t=this,e={animationDelay:this.props.delay};return u.a.createElement("div",{id:"editEntry"},u.a.createElement("div",{className:"animated animatedFadeInUp fadeInUp keyEntry editEntry",value:this.state.value,style:e},u.a.createElement("div",{className:"jwtContent"},u.a.createElement("button",{id:"editDeleteButton",className:"editingButton",onClick:this.deleteContent},"X"),u.a.createElement("form",{onSubmit:this.submitContent},u.a.createElement("div",{className:"kidBox"},u.a.createElement("div",{className:"kidBox"},"Key ID: "),u.a.createElement("input",{value:this.state.kid,className:"editInput",onChange:function(e){return t.handleChange(e,"kid")}})),u.a.createElement("div",null,u.a.createElement("div",{className:"kidBox"},"Public Key: "),u.a.createElement("textarea",{value:this.state.jwt,className:"editInput jwtTextArea",onChange:function(e){return t.handleChange(e,"jwt")}}))),u.a.createElement("span",null,"Generate Key ID: "),u.a.createElement("button",{className:"editModeButton checkBox "+(this.state.generateKeyID?"checkBoxPressed":""),onClick:this.generateKeyID}),u.a.createElement("button",{className:"clickButton",onClick:this.submitContent},"Submit"))))}}]),e}(a.Component);e.a=f}]);
  //# sourceMappingURL=main.55a2e4d3.js.map