| 1234567891011121314151617181920 |
- import{g as te,u as ee,a as ie,r as Ot,b as re,c as at,o as ht,d as xt,e as K,t as G,n as ne,f as Z,w as Y,h as It,i as gt,j as Dt,k as se,F as oe,l as ae}from"./index-ChSCF_LJ.js";import{u as he}from"./use-current-user-b1m4NEMJ.js";import{r as ue,a as le}from"./login-Bj_XxsPp.js";import{_ as kt}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ce="/assets/logo-B-RMh_L1.png",fe="/assets/login_group-Cpfobb93.png";var Ft={exports:{}};/*! For license information please see jsencrypt.min.js.LICENSE.txt */(function(H,J){(function(Q,et){H.exports=et()})(window,()=>(()=>{var Q={155:D=>{var y,w,v=D.exports={};function k(){throw new Error("setTimeout has not been defined")}function st(){throw new Error("clearTimeout has not been defined")}function ut(V){if(y===setTimeout)return setTimeout(V,0);if((y===k||!y)&&setTimeout)return y=setTimeout,setTimeout(V,0);try{return y(V,0)}catch{try{return y.call(null,V,0)}catch{return y.call(this,V,0)}}}(function(){try{y=typeof setTimeout=="function"?setTimeout:k}catch{y=k}try{w=typeof clearTimeout=="function"?clearTimeout:st}catch{w=st}})();var M,I=[],m=!1,E=-1;function F(){m&&M&&(m=!1,M.length?I=M.concat(I):E=-1,I.length&&W())}function W(){if(!m){var V=ut(F);m=!0;for(var j=I.length;j;){for(M=I,I=[];++E<j;)M&&M[E].run();E=-1,j=I.length}M=null,m=!1,function(O){if(w===clearTimeout)return clearTimeout(O);if((w===st||!w)&&clearTimeout)return w=clearTimeout,clearTimeout(O);try{w(O)}catch{try{return w.call(null,O)}catch{return w.call(this,O)}}}(V)}}function q(V,j){this.fun=V,this.array=j}function P(){}v.nextTick=function(V){var j=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)j[O-1]=arguments[O];I.push(new q(V,j)),I.length!==1||m||ut(W)},q.prototype.run=function(){this.fun.apply(null,this.array)},v.title="browser",v.browser=!0,v.env={},v.argv=[],v.version="",v.versions={},v.on=P,v.addListener=P,v.once=P,v.off=P,v.removeListener=P,v.removeAllListeners=P,v.emit=P,v.prependListener=P,v.prependOnceListener=P,v.listeners=function(V){return[]},v.binding=function(V){throw new Error("process.binding is not supported")},v.cwd=function(){return"/"},v.chdir=function(V){throw new Error("process.chdir is not supported")},v.umask=function(){return 0}}},et={};function X(D){var y=et[D];if(y!==void 0)return y.exports;var w=et[D]={exports:{}};return Q[D](w,w.exports,X),w.exports}X.d=(D,y)=>{for(var w in y)X.o(y,w)&&!X.o(D,w)&&Object.defineProperty(D,w,{enumerable:!0,get:y[w]})},X.o=(D,y)=>Object.prototype.hasOwnProperty.call(D,y);var nt={};return(()=>{function D(r){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(r)}function y(r,t){return r&t}function w(r,t){return r|t}function v(r,t){return r^t}function k(r,t){return r&~t}function st(r){if(r==0)return-1;var t=0;return!(65535&r)&&(r>>=16,t+=16),!(255&r)&&(r>>=8,t+=8),!(15&r)&&(r>>=4,t+=4),!(3&r)&&(r>>=2,t+=2),!(1&r)&&++t,t}function ut(r){for(var t=0;r!=0;)r&=r-1,++t;return t}X.d(nt,{default:()=>Xt});var M,I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function m(r){var t,e,i="";for(t=0;t+3<=r.length;t+=3)e=parseInt(r.substring(t,t+3),16),i+=I.charAt(e>>6)+I.charAt(63&e);for(t+1==r.length?(e=parseInt(r.substring(t,t+1),16),i+=I.charAt(e<<2)):t+2==r.length&&(e=parseInt(r.substring(t,t+2),16),i+=I.charAt(e>>2)+I.charAt((3&e)<<4));(3&i.length)>0;)i+="=";return i}function E(r){var t,e="",i=0,n=0;for(t=0;t<r.length&&r.charAt(t)!="=";++t){var s=I.indexOf(r.charAt(t));s<0||(i==0?(e+=D(s>>2),n=3&s,i=1):i==1?(e+=D(n<<2|s>>4),n=15&s,i=2):i==2?(e+=D(n),e+=D(s>>2),n=3&s,i=3):(e+=D(n<<2|s>>4),e+=D(15&s),i=0))}return i==1&&(e+=D(n<<2)),e}var F,W={decode:function(r){var t;if(F===void 0){var e=`= \f
- \r \u2028\u2029`;for(F=Object.create(null),t=0;t<64;++t)F["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(F["-"]=62,F._=63,t=0;t<e.length;++t)F[e.charAt(t)]=-1}var i=[],n=0,s=0;for(t=0;t<r.length;++t){var o=r.charAt(t);if(o=="=")break;if((o=F[o])!=-1){if(o===void 0)throw new Error("Illegal character at offset "+t);n|=o,++s>=4?(i[i.length]=n>>16,i[i.length]=n>>8&255,i[i.length]=255&n,n=0,s=0):n<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=n>>10;break;case 3:i[i.length]=n>>16,i[i.length]=n>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(r){var t=W.re.exec(r);if(t)if(t[1])r=t[1];else{if(!t[2])throw new Error("RegExp out of sync");r=t[2]}return W.decode(r)}},q=1e13,P=function(){function r(t){this.buf=[+t||0]}return r.prototype.mulAdd=function(t,e){var i,n,s=this.buf,o=s.length;for(i=0;i<o;++i)(n=s[i]*t+e)<q?e=0:n-=(e=0|n/q)*q,s[i]=n;e>0&&(s[i]=e)},r.prototype.sub=function(t){var e,i,n=this.buf,s=n.length;for(e=0;e<s;++e)(i=n[e]-t)<0?(i+=q,t=1):t=0,n[e]=i;for(;n[n.length-1]===0;)n.pop()},r.prototype.toString=function(t){if((t||10)!=10)throw new Error("only base 10 is supported");for(var e=this.buf,i=e[e.length-1].toString(),n=e.length-2;n>=0;--n)i+=(q+e[n]).toString().substring(1);return i},r.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;i>=0;--i)e=e*q+t[i];return e},r.prototype.simplify=function(){var t=this.buf;return t.length==1?t[0]:this},r}(),V=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,j=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function O(r,t){return r.length>t&&(r=r.substring(0,t)+"…"),r}var N,dt=function(){function r(t,e){this.hexDigits="0123456789ABCDEF",t instanceof r?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=e)}return r.prototype.get=function(t){if(t===void 0&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(t):this.enc[t]},r.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},r.prototype.hexDump=function(t,e,i){for(var n="",s=t;s<e;++s)if(n+=this.hexByte(this.get(s)),i!==!0)switch(15&s){case 7:n+=" ";break;case 15:n+=`
- `;break;default:n+=" "}return n},r.prototype.isASCII=function(t,e){for(var i=t;i<e;++i){var n=this.get(i);if(n<32||n>176)return!1}return!0},r.prototype.parseStringISO=function(t,e){for(var i="",n=t;n<e;++n)i+=String.fromCharCode(this.get(n));return i},r.prototype.parseStringUTF=function(t,e){for(var i="",n=t;n<e;){var s=this.get(n++);i+=s<128?String.fromCharCode(s):s>191&&s<224?String.fromCharCode((31&s)<<6|63&this.get(n++)):String.fromCharCode((15&s)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return i},r.prototype.parseStringBMP=function(t,e){for(var i,n,s="",o=t;o<e;)i=this.get(o++),n=this.get(o++),s+=String.fromCharCode(i<<8|n);return s},r.prototype.parseTime=function(t,e,i){var n=this.parseStringISO(t,e),s=(i?V:j).exec(n);return s?(i&&(s[1]=+s[1],s[1]+=+s[1]<70?2e3:1900),n=s[1]+"-"+s[2]+"-"+s[3]+" "+s[4],s[5]&&(n+=":"+s[5],s[6]&&(n+=":"+s[6],s[7]&&(n+="."+s[7]))),s[8]&&(n+=" UTC",s[8]!="Z"&&(n+=s[8],s[9]&&(n+=":"+s[9]))),n):"Unrecognized time: "+n},r.prototype.parseInteger=function(t,e){for(var i,n=this.get(t),s=n>127,o=s?255:0,a="";n==o&&++t<e;)n=this.get(t);if((i=e-t)==0)return s?-1:0;if(i>4){for(a=n,i<<=3;!(128&(+a^o));)a=+a<<1,--i;a="("+i+` bit)
- `}s&&(n-=256);for(var h=new P(n),l=t+1;l<e;++l)h.mulAdd(256,this.get(l));return a+h.toString()},r.prototype.parseBitString=function(t,e,i){for(var n=this.get(t),s="("+((e-t-1<<3)-n)+` bit)
- `,o="",a=t+1;a<e;++a){for(var h=this.get(a),l=a==e-1?n:0,c=7;c>=l;--c)o+=h>>c&1?"1":"0";if(o.length>i)return s+O(o,i)}return s+o},r.prototype.parseOctetString=function(t,e,i){if(this.isASCII(t,e))return O(this.parseStringISO(t,e),i);var n=e-t,s="("+n+` byte)
- `;n>(i/=2)&&(e=t+i);for(var o=t;o<e;++o)s+=this.hexByte(this.get(o));return n>i&&(s+="…"),s},r.prototype.parseOID=function(t,e,i){for(var n="",s=new P,o=0,a=t;a<e;++a){var h=this.get(a);if(s.mulAdd(128,127&h),o+=7,!(128&h)){if(n==="")if((s=s.simplify())instanceof P)s.sub(80),n="2."+s.toString();else{var l=s<80?s<40?0:1:2;n=l+"."+(s-40*l)}else n+="."+s.toString();if(n.length>i)return O(n,i);s=new P,o=0}}return o>0&&(n+=".incomplete"),n},r}(),Ut=function(){function r(t,e,i,n,s){if(!(n instanceof Nt))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=i,this.tag=n,this.sub=s}return r.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},r.prototype.content=function(t){if(this.tag===void 0)return null;t===void 0&&(t=1/0);var e=this.posContent(),i=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);switch(this.tag.tagNumber){case 1:return this.stream.get(e)===0?"false":"true";case 2:return this.stream.parseInteger(e,e+i);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+i,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);case 6:return this.stream.parseOID(e,e+i,t);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return O(this.stream.parseStringUTF(e,e+i),t);case 18:case 19:case 20:case 21:case 22:case 26:return O(this.stream.parseStringISO(e,e+i),t);case 30:return O(this.stream.parseStringBMP(e,e+i),t);case 23:case 24:return this.stream.parseTime(e,e+i,this.tag.tagNumber==23)}return null},r.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},r.prototype.toPrettyString=function(t){t===void 0&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||this.tag.tagNumber!=3&&this.tag.tagNumber!=4||this.sub===null||(e+=" (encapsulates)"),e+=`
- `,this.sub!==null){t+=" ";for(var i=0,n=this.sub.length;i<n;++i)e+=this.sub[i].toPrettyString(t)}return e},r.prototype.posStart=function(){return this.stream.pos},r.prototype.posContent=function(){return this.stream.pos+this.header},r.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},r.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},r.decodeLength=function(t){var e=t.get(),i=127&e;if(i==e)return i;if(i>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(i===0)return null;e=0;for(var n=0;n<i;++n)e=256*e+t.get();return e},r.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,i=2*this.length;return t.substr(e,i)},r.decode=function(t){var e;e=t instanceof dt?t:new dt(t,0);var i=new dt(e),n=new Nt(e),s=r.decodeLength(e),o=e.pos,a=o-i.pos,h=null,l=function(){var b=[];if(s!==null){for(var g=o+s;e.pos<g;)b[b.length]=r.decode(e);if(e.pos!=g)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var x=r.decode(e);if(x.tag.isEOC())break;b[b.length]=x}s=o-e.pos}catch(S){throw new Error("Exception while decoding undefined length content: "+S)}return b};if(n.tagConstructed)h=l();else if(n.isUniversal()&&(n.tagNumber==3||n.tagNumber==4))try{if(n.tagNumber==3&&e.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=l();for(var c=0;c<h.length;++c)if(h[c].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{h=null}if(h===null){if(s===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);e.pos=o+Math.abs(s)}return new r(i,a,s,n,h)},r}(),Nt=function(){function r(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=(32&e)!=0,this.tagNumber=31&e,this.tagNumber==31){var i=new P;do e=t.get(),i.mulAdd(128,127&e);while(128&e);this.tagNumber=i.simplify()}}return r.prototype.isUniversal=function(){return this.tagClass===0},r.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},r}(),_=[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],Kt=(1<<26)/_[_.length-1],p=function(){function r(t,e,i){t!=null&&(typeof t=="number"?this.fromNumber(t,e,i):e==null&&typeof t!="string"?this.fromString(t,256):this.fromString(t,e))}return r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else{if(t!=4)return this.toRadix(t);e=2}var i,n=(1<<e)-1,s=!1,o="",a=this.t,h=this.DB-a*this.DB%e;if(a-- >0)for(h<this.DB&&(i=this[a]>>h)>0&&(s=!0,o=D(i));a>=0;)h<e?(i=(this[a]&(1<<h)-1)<<e-h,i|=this[--a]>>(h+=this.DB-e)):(i=this[a]>>(h-=e)&n,h<=0&&(h+=this.DB,--a)),i>0&&(s=!0),s&&(o+=D(i));return s?o:"0"},r.prototype.negate=function(){var t=d();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(e!=0)return e;var i=this.t;if((e=i-t.t)!=0)return this.s<0?-e:e;for(;--i>=0;)if((e=this[i]-t[i])!=0)return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+vt(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=d();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new Pt(e):new Mt(e),this.exp(t,i)},r.prototype.clone=function(){var t=d();return this.copyTo(t),t},r.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},r.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},r.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i,n=this.DB-t*this.DB%8,s=0;if(t-- >0)for(n<this.DB&&(i=this[t]>>n)!=(this.s&this.DM)>>n&&(e[s++]=i|this.s<<this.DB-n);t>=0;)n<8?(i=(this[t]&(1<<n)-1)<<8-n,i|=this[--t]>>(n+=this.DB-8)):(i=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),128&i&&(i|=-256),s==0&&(128&this.s)!=(128&i)&&++s,(s>0||i!=this.s)&&(e[s++]=i);return e},r.prototype.equals=function(t){return this.compareTo(t)==0},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=d();return this.bitwiseTo(t,y,e),e},r.prototype.or=function(t){var e=d();return this.bitwiseTo(t,w,e),e},r.prototype.xor=function(t){var e=d();return this.bitwiseTo(t,v,e),e},r.prototype.andNot=function(t){var e=d();return this.bitwiseTo(t,k,e),e},r.prototype.not=function(){for(var t=d(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},r.prototype.shiftLeft=function(t){var e=d();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},r.prototype.shiftRight=function(t){var e=d();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},r.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(this[t]!=0)return t*this.DB+st(this[t]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=ut(this[i]^e);return t},r.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?this.s!=0:(this[e]&1<<t%this.DB)!=0},r.prototype.setBit=function(t){return this.changeBit(t,w)},r.prototype.clearBit=function(t){return this.changeBit(t,k)},r.prototype.flipBit=function(t){return this.changeBit(t,v)},r.prototype.add=function(t){var e=d();return this.addTo(t,e),e},r.prototype.subtract=function(t){var e=d();return this.subTo(t,e),e},r.prototype.multiply=function(t){var e=d();return this.multiplyTo(t,e),e},r.prototype.divide=function(t){var e=d();return this.divRemTo(t,e,null),e},r.prototype.remainder=function(t){var e=d();return this.divRemTo(t,null,e),e},r.prototype.divideAndRemainder=function(t){var e=d(),i=d();return this.divRemTo(t,e,i),[e,i]},r.prototype.modPow=function(t,e){var i,n,s=t.bitLength(),o=it(1);if(s<=0)return o;i=s<18?1:s<48?3:s<144?4:s<768?5:6,n=s<8?new Pt(e):e.isEven()?new zt(e):new Mt(e);var a=[],h=3,l=i-1,c=(1<<i)-1;if(a[1]=n.convert(this),i>1){var b=d();for(n.sqrTo(a[1],b);h<=c;)a[h]=d(),n.mulTo(b,a[h-2],a[h]),h+=2}var g,x,S=t.t-1,T=!0,B=d();for(s=vt(t[S])-1;S>=0;){for(s>=l?g=t[S]>>s-l&c:(g=(t[S]&(1<<s+1)-1)<<l-s,S>0&&(g|=t[S-1]>>this.DB+s-l)),h=i;!(1&g);)g>>=1,--h;if((s-=h)<0&&(s+=this.DB,--S),T)a[g].copyTo(o),T=!1;else{for(;h>1;)n.sqrTo(o,B),n.sqrTo(B,o),h-=2;h>0?n.sqrTo(o,B):(x=o,o=B,B=x),n.mulTo(B,a[g],o)}for(;S>=0&&!(t[S]&1<<s);)n.sqrTo(o,B),x=o,o=B,B=x,--s<0&&(s=this.DB-1,--S)}return n.revert(o)},r.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||t.signum()==0)return r.ZERO;for(var i=t.clone(),n=this.clone(),s=it(1),o=it(0),a=it(0),h=it(1);i.signum()!=0;){for(;i.isEven();)i.rShiftTo(1,i),e?(s.isEven()&&o.isEven()||(s.addTo(this,s),o.subTo(t,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),e?(a.isEven()&&h.isEven()||(a.addTo(this,a),h.subTo(t,h)),a.rShiftTo(1,a)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);i.compareTo(n)>=0?(i.subTo(n,i),e&&s.subTo(a,s),o.subTo(h,o)):(n.subTo(i,n),e&&a.subTo(s,a),h.subTo(o,h))}return n.compareTo(r.ONE)!=0?r.ZERO:h.compareTo(t)>=0?h.subtract(t):h.signum()<0?(h.addTo(t,h),h.signum()<0?h.add(t):h):h},r.prototype.pow=function(t){return this.exp(t,new $t)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var n=e;e=i,i=n}var s=e.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return e;for(s<o&&(o=s),o>0&&(e.rShiftTo(o,e),i.rShiftTo(o,i));e.signum()>0;)(s=e.getLowestSetBit())>0&&e.rShiftTo(s,e),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return o>0&&i.lShiftTo(o,i),i},r.prototype.isProbablePrime=function(t){var e,i=this.abs();if(i.t==1&&i[0]<=_[_.length-1]){for(e=0;e<_.length;++e)if(i[0]==_[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<_.length;){for(var n=_[e],s=e+1;s<_.length&&n<Kt;)n*=_[s++];for(n=i.modInt(n);e<s;)if(n%_[e++]==0)return!1}return i.millerRabin(t)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(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},r.prototype.fromString=function(t,e){var i;if(e==16)i=4;else if(e==8)i=3;else if(e==256)i=8;else if(e==2)i=1;else if(e==32)i=5;else{if(e!=4)return void this.fromRadix(t,e);i=2}this.t=0,this.s=0;for(var n=t.length,s=!1,o=0;--n>=0;){var a=i==8?255&+t[n]:Lt(t,n);a<0?t.charAt(n)=="-"&&(s=!0):(s=!1,o==0?this[this.t++]=a:o+i>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+=i)>=this.DB&&(o-=this.DB))}i==8&&128&+t[0]&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),s&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},r.prototype.lShiftTo=function(t,e){for(var i=t%this.DB,n=this.DB-i,s=(1<<n)-1,o=Math.floor(t/this.DB),a=this.s<<i&this.DM,h=this.t-1;h>=0;--h)e[h+o+1]=this[h]>>n|a,a=(this[h]&s)<<i;for(h=o-1;h>=0;--h)e[h]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var n=t%this.DB,s=this.DB-n,o=(1<<n)-1;e[0]=this[i]>>n;for(var a=i+1;a<this.t;++a)e[a-i-1]|=(this[a]&o)<<s,e[a-i]=this[a]>>n;n>0&&(e[this.t-i-1]|=(this.s&o)<<s),e.t=this.t-i,e.clamp()}},r.prototype.subTo=function(t,e){for(var i=0,n=0,s=Math.min(t.t,this.t);i<s;)n+=this[i]-t[i],e[i++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;i<this.t;)n+=this[i],e[i++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;i<t.t;)n-=t[i],e[i++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[i++]=this.DV+n:n>0&&(e[i++]=n),e.t=i,e.clamp()},r.prototype.multiplyTo=function(t,e){var i=this.abs(),n=t.abs(),s=i.t;for(e.t=s+n.t;--s>=0;)e[s]=0;for(s=0;s<n.t;++s)e[s+i.t]=i.am(0,n[s],e,s,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&r.ZERO.subTo(e,e)},r.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;--i>=0;)t[i]=0;for(i=0;i<e.t-1;++i){var n=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,n,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,i){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t)return e!=null&&e.fromInt(0),void(i!=null&&this.copyTo(i));i==null&&(i=d());var o=d(),a=this.s,h=t.s,l=this.DB-vt(n[n.t-1]);l>0?(n.lShiftTo(l,o),s.lShiftTo(l,i)):(n.copyTo(o),s.copyTo(i));var c=o.t,b=o[c-1];if(b!=0){var g=b*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),x=this.FV/g,S=(1<<this.F1)/g,T=1<<this.F2,B=i.t,tt=B-c,L=e??d();for(o.dlShiftTo(tt,L),i.compareTo(L)>=0&&(i[i.t++]=1,i.subTo(L,i)),r.ONE.dlShiftTo(c,L),L.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--tt>=0;){var C=i[--B]==b?this.DM:Math.floor(i[B]*x+(i[B-1]+T)*S);if((i[B]+=o.am(0,C,i,tt,0,c))<C)for(o.dlShiftTo(tt,L),i.subTo(L,i);i[B]<--C;)i.subTo(L,i)}e!=null&&(i.drShiftTo(c,e),a!=h&&r.ZERO.subTo(e,e)),i.t=c,i.clamp(),l>0&&i.rShiftTo(l,i),a<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return(this.t>0?1&this[0]:this.s)==0},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var i=d(),n=d(),s=e.convert(this),o=vt(t)-1;for(s.copyTo(i);--o>=0;)if(e.sqrTo(i,n),(t&1<<o)>0)e.mulTo(n,s,i);else{var a=i;i=n,n=a}return e.revert(i)},r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(t==null&&(t=10),this.signum()==0||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),n=it(i),s=d(),o=d(),a="";for(this.divRemTo(n,s,o);s.signum()>0;)a=(i+o.intValue()).toString(t).substr(1)+a,s.divRemTo(n,s,o);return o.intValue().toString(t)+a},r.prototype.fromRadix=function(t,e){this.fromInt(0),e==null&&(e=10);for(var i=this.chunkSize(e),n=Math.pow(e,i),s=!1,o=0,a=0,h=0;h<t.length;++h){var l=Lt(t,h);l<0?t.charAt(h)=="-"&&this.signum()==0&&(s=!0):(a=e*a+l,++o>=i&&(this.dMultiply(n),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(a,0)),s&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,i){if(typeof e=="number")if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),w,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var n=[],s=7&t;n.length=1+(t>>3),e.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}},r.prototype.bitwiseTo=function(t,e,i){var n,s,o=Math.min(t.t,this.t);for(n=0;n<o;++n)i[n]=e(this[n],t[n]);if(t.t<this.t){for(s=t.s&this.DM,n=o;n<this.t;++n)i[n]=e(this[n],s);i.t=this.t}else{for(s=this.s&this.DM,n=o;n<t.t;++n)i[n]=e(s,t[n]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},r.prototype.changeBit=function(t,e){var i=r.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},r.prototype.addTo=function(t,e){for(var i=0,n=0,s=Math.min(t.t,this.t);i<s;)n+=this[i]+t[i],e[i++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;i<this.t;)n+=this[i],e[i++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;i<t.t;)n+=t[i],e[i++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[i++]=n:n<-1&&(e[i++]=this.DV+n),e.t=i,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(t!=0){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]}},r.prototype.multiplyLowerTo=function(t,e,i){var n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(var s=i.t-this.t;n<s;++n)i[n+this.t]=this.am(0,t[n],i,n,0,this.t);for(s=Math.min(t.t,e);n<s;++n)this.am(0,t[n],i,n,0,e-n);i.clamp()},r.prototype.multiplyUpperTo=function(t,e,i){--e;var n=i.t=this.t+t.t-e;for(i.s=0;--n>=0;)i[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)i[this.t+n-e]=this.am(e-n,t[n],i,0,0,this.t+n-e);i.clamp(),i.drShiftTo(1,i)},r.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(this.t>0)if(e==0)i=this[0]%t;else for(var n=this.t-1;n>=0;--n)i=(e*i+this[n])%t;return i},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var n=e.shiftRight(i);(t=t+1>>1)>_.length&&(t=_.length);for(var s=d(),o=0;o<t;++o){s.fromInt(_[Math.floor(Math.random()*_.length)]);var a=s.modPow(n,this);if(a.compareTo(r.ONE)!=0&&a.compareTo(e)!=0){for(var h=1;h++<i&&a.compareTo(e)!=0;)if((a=a.modPowInt(2,this)).compareTo(r.ONE)==0)return!1;if(a.compareTo(e)!=0)return!1}}return!0},r.prototype.square=function(){var t=d();return this.squareTo(t),t},r.prototype.gcda=function(t,e){var i=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(i.compareTo(n)<0){var s=i;i=n,n=s}var o=i.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)e(i);else{o<a&&(a=o),a>0&&(i.rShiftTo(a,i),n.rShiftTo(a,n));var h=function(){(o=i.getLowestSetBit())>0&&i.rShiftTo(o,i),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),i.compareTo(n)>=0?(i.subTo(n,i),i.rShiftTo(1,i)):(n.subTo(i,n),n.rShiftTo(1,n)),i.signum()>0?setTimeout(h,0):(a>0&&n.lShiftTo(a,n),setTimeout(function(){e(n)},0))};setTimeout(h,10)}},r.prototype.fromNumberAsync=function(t,e,i,n){if(typeof e=="number")if(t<2)this.fromInt(1);else{this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),w,this),this.isEven()&&this.dAddOffset(1,0);var s=this,o=function(){s.dAddOffset(2,0),s.bitLength()>t&&s.subTo(r.ONE.shiftLeft(t-1),s),s.isProbablePrime(e)?setTimeout(function(){n()},0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],h=7&t;a.length=1+(t>>3),e.nextBytes(a),h>0?a[0]&=(1<<h)-1:a[0]=0,this.fromString(a,256)}},r}(),$t=function(){function r(){}return r.prototype.convert=function(t){return t},r.prototype.revert=function(t){return t},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},r.prototype.sqrTo=function(t,e){t.squareTo(e)},r}(),Pt=function(){function r(t){this.m=t}return r.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},r.prototype.revert=function(t){return t},r.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}(),Mt=function(){function r(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}return r.prototype.convert=function(t){var e=d();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(p.ZERO)>0&&this.m.subTo(e,e),e},r.prototype.revert=function(t){var e=d();return t.copyTo(e),this.reduce(e),e},r.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],n=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}(),zt=function(){function r(t){this.m=t,this.r2=d(),this.q3=d(),p.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return r.prototype.convert=function(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=d();return t.copyTo(e),this.reduce(e),e},r.prototype.revert=function(t){return t},r.prototype.reduce=function(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)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}();function d(){return new p(null)}function R(r,t){return new p(r,t)}var _t=typeof navigator<"u";_t&&navigator.appName=="Microsoft Internet Explorer"?(p.prototype.am=function(r,t,e,i,n,s){for(var o=32767&t,a=t>>15;--s>=0;){var h=32767&this[r],l=this[r++]>>15,c=a*h+l*o;n=((h=o*h+((32767&c)<<15)+e[i]+(1073741823&n))>>>30)+(c>>>15)+a*l+(n>>>30),e[i++]=1073741823&h}return n},N=30):_t&&navigator.appName!="Netscape"?(p.prototype.am=function(r,t,e,i,n,s){for(;--s>=0;){var o=t*this[r++]+e[i]+n;n=Math.floor(o/67108864),e[i++]=67108863&o}return n},N=26):(p.prototype.am=function(r,t,e,i,n,s){for(var o=16383&t,a=t>>14;--s>=0;){var h=16383&this[r],l=this[r++]>>14,c=a*h+l*o;n=((h=o*h+((16383&c)<<14)+e[i]+n)>>28)+(c>>14)+a*l,e[i++]=268435455&h}return n},N=28),p.prototype.DB=N,p.prototype.DM=(1<<N)-1,p.prototype.DV=1<<N,p.prototype.FV=Math.pow(2,52),p.prototype.F1=52-N,p.prototype.F2=2*N-52;var lt,U,mt=[];for(lt=48,U=0;U<=9;++U)mt[lt++]=U;for(lt=97,U=10;U<36;++U)mt[lt++]=U;for(lt=65,U=10;U<36;++U)mt[lt++]=U;function Lt(r,t){var e=mt[r.charCodeAt(t)];return e??-1}function it(r){var t=d();return t.fromInt(r),t}function vt(r){var t,e=1;return(t=r>>>16)!=0&&(r=t,e+=16),(t=r>>8)!=0&&(r=t,e+=8),(t=r>>4)!=0&&(r=t,e+=4),(t=r>>2)!=0&&(r=t,e+=2),(t=r>>1)!=0&&(r=t,e+=1),e}p.ZERO=it(0),p.ONE=it(1);var yt,$,Zt=function(){function r(){this.i=0,this.j=0,this.S=[]}return r.prototype.init=function(t){var e,i,n;for(e=0;e<256;++e)this.S[e]=e;for(i=0,e=0;e<256;++e)i=i+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[i],this.S[i]=n;this.i=0,this.j=0},r.prototype.next=function(){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]},r}(),rt=null;if(rt==null){rt=[],$=0;var bt=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var Bt=new Uint32Array(256);for(window.crypto.getRandomValues(Bt),bt=0;bt<Bt.length;++bt)rt[$++]=255&Bt[bt]}var Rt=0,Tt=function(r){if((Rt=Rt||0)>=256||$>=256)window.removeEventListener?window.removeEventListener("mousemove",Tt,!1):window.detachEvent&&window.detachEvent("onmousemove",Tt);else try{var t=r.x+r.y;rt[$++]=255&t,Rt+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",Tt,!1):window.attachEvent&&window.attachEvent("onmousemove",Tt))}function Yt(){if(yt==null){for(yt=new Zt;$<256;){var r=Math.floor(65536*Math.random());rt[$++]=255&r}for(yt.init(rt),$=0;$<rt.length;++$)rt[$]=0;$=0}return yt.next()}var At=function(){function r(){}return r.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Yt()},r}(),Gt=function(){function r(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return r.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},r.prototype.doPrivate=function(t){if(this.p==null||this.q==null)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(i)<0;)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)},r.prototype.setPublic=function(t,e){t!=null&&e!=null&&t.length>0&&e.length>0?(this.n=R(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},r.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,i=function(h,l){if(l<h.length+11)return console.error("Message too long for RSA"),null;for(var c=[],b=h.length-1;b>=0&&l>0;){var g=h.charCodeAt(b--);g<128?c[--l]=g:g>127&&g<2048?(c[--l]=63&g|128,c[--l]=g>>6|192):(c[--l]=63&g|128,c[--l]=g>>6&63|128,c[--l]=g>>12|224)}c[--l]=0;for(var x=new At,S=[];l>2;){for(S[0]=0;S[0]==0;)x.nextBytes(S);c[--l]=S[0]}return c[--l]=2,c[--l]=0,new p(c)}(t,e);if(i==null)return null;var n=this.doPublic(i);if(n==null)return null;for(var s=n.toString(16),o=s.length,a=0;a<2*e-o;a++)s="0"+s;return s},r.prototype.setPrivate=function(t,e,i){t!=null&&e!=null&&t.length>0&&e.length>0?(this.n=R(t,16),this.e=parseInt(e,16),this.d=R(i,16)):console.error("Invalid RSA private key")},r.prototype.setPrivateEx=function(t,e,i,n,s,o,a,h){t!=null&&e!=null&&t.length>0&&e.length>0?(this.n=R(t,16),this.e=parseInt(e,16),this.d=R(i,16),this.p=R(n,16),this.q=R(s,16),this.dmp1=R(o,16),this.dmq1=R(a,16),this.coeff=R(h,16)):console.error("Invalid RSA private key")},r.prototype.generate=function(t,e){var i=new At,n=t>>1;this.e=parseInt(e,16);for(var s=new p(e,16);;){for(;this.p=new p(t-n,1,i),this.p.subtract(p.ONE).gcd(s).compareTo(p.ONE)!=0||!this.p.isProbablePrime(10););for(;this.q=new p(n,1,i),this.q.subtract(p.ONE).gcd(s).compareTo(p.ONE)!=0||!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(p.ONE),h=this.q.subtract(p.ONE),l=a.multiply(h);if(l.gcd(s).compareTo(p.ONE)==0){this.n=this.p.multiply(this.q),this.d=s.modInverse(l),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(h),this.coeff=this.q.modInverse(this.p);break}}},r.prototype.decrypt=function(t){var e=R(t,16),i=this.doPrivate(e);return i==null?null:function(n,s){for(var o=n.toByteArray(),a=0;a<o.length&&o[a]==0;)++a;if(o.length-a!=s-1||o[a]!=2)return null;for(++a;o[a]!=0;)if(++a>=o.length)return null;for(var h="";++a<o.length;){var l=255&o[a];l<128?h+=String.fromCharCode(l):l>191&&l<224?(h+=String.fromCharCode((31&l)<<6|63&o[a+1]),++a):(h+=String.fromCharCode((15&l)<<12|(63&o[a+1])<<6|63&o[a+2]),a+=2)}return h}(i,this.n.bitLength()+7>>3)},r.prototype.generateAsync=function(t,e,i){var n=new At,s=t>>1;this.e=parseInt(e,16);var o=new p(e,16),a=this,h=function(){var l=function(){if(a.p.compareTo(a.q)<=0){var g=a.p;a.p=a.q,a.q=g}var x=a.p.subtract(p.ONE),S=a.q.subtract(p.ONE),T=x.multiply(S);T.gcd(o).compareTo(p.ONE)==0?(a.n=a.p.multiply(a.q),a.d=o.modInverse(T),a.dmp1=a.d.mod(x),a.dmq1=a.d.mod(S),a.coeff=a.q.modInverse(a.p),setTimeout(function(){i()},0)):setTimeout(h,0)},c=function(){a.q=d(),a.q.fromNumberAsync(s,1,n,function(){a.q.subtract(p.ONE).gcda(o,function(g){g.compareTo(p.ONE)==0&&a.q.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)})})},b=function(){a.p=d(),a.p.fromNumberAsync(t-s,1,n,function(){a.p.subtract(p.ONE).gcda(o,function(g){g.compareTo(p.ONE)==0&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(b,0)})})};setTimeout(b,0)};setTimeout(h,0)},r.prototype.sign=function(t,e,i){var n=function(a,h){if(h<a.length+22)return console.error("Message too long for RSA"),null;for(var l=h-a.length-6,c="",b=0;b<l;b+=2)c+="ff";return R("0001"+c+"00"+a,16)}((St[i]||"")+e(t).toString(),this.n.bitLength()/4);if(n==null)return null;var s=this.doPrivate(n);if(s==null)return null;var o=s.toString(16);return 1&o.length?"0"+o:o},r.prototype.verify=function(t,e,i){var n=R(e,16),s=this.doPublic(n);return s==null?null:function(o){for(var a in St)if(St.hasOwnProperty(a)){var h=St[a],l=h.length;if(o.substr(0,l)==h)return o.substr(l)}return o}(s.toString(16).replace(/^1f+00/,""))==i(t).toString()},r}(),St={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},A={};A.lang={extend:function(r,t,e){if(!t||!r)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=t.prototype,r.prototype=new i,r.prototype.constructor=r,r.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),e){var n;for(n in e)r.prototype[n]=e[n];var s=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(s=function(a,h){for(n=0;n<o.length;n+=1){var l=o[n],c=h[l];typeof c=="function"&&c!=Object.prototype[l]&&(a[l]=c)}})}catch{}s(r.prototype,e)}}};var u={};u.asn1!==void 0&&u.asn1||(u.asn1={}),u.asn1.ASN1Util=new function(){this.integerToByteHex=function(r){var t=r.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(r){var t=r.toString(16);if(t.substr(0,1)!="-")t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var e=t.substr(1).length;e%2==1?e+=1:t.match(/^[0-7]/)||(e+=2);for(var i="",n=0;n<e;n++)i+="f";t=new p(i,16).xor(r).add(p.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(r,t){return hextopem(r,t)},this.newObject=function(r){var t=u.asn1,e=t.DERBoolean,i=t.DERInteger,n=t.DERBitString,s=t.DEROctetString,o=t.DERNull,a=t.DERObjectIdentifier,h=t.DEREnumerated,l=t.DERUTF8String,c=t.DERNumericString,b=t.DERPrintableString,g=t.DERTeletexString,x=t.DERIA5String,S=t.DERUTCTime,T=t.DERGeneralizedTime,B=t.DERSequence,tt=t.DERSet,L=t.DERTaggedObject,C=t.ASN1Util.newObject,ct=Object.keys(r);if(ct.length!=1)throw"key of param shall be only one.";var f=ct[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+f+":")==-1)throw"undefined key: "+f;if(f=="bool")return new e(r[f]);if(f=="int")return new i(r[f]);if(f=="bitstr")return new n(r[f]);if(f=="octstr")return new s(r[f]);if(f=="null")return new o(r[f]);if(f=="oid")return new a(r[f]);if(f=="enum")return new h(r[f]);if(f=="utf8str")return new l(r[f]);if(f=="numstr")return new c(r[f]);if(f=="prnstr")return new b(r[f]);if(f=="telstr")return new g(r[f]);if(f=="ia5str")return new x(r[f]);if(f=="utctime")return new S(r[f]);if(f=="gentime")return new T(r[f]);if(f=="seq"){for(var ft=r[f],pt=[],ot=0;ot<ft.length;ot++){var Vt=C(ft[ot]);pt.push(Vt)}return new B({array:pt})}if(f=="set"){for(ft=r[f],pt=[],ot=0;ot<ft.length;ot++)Vt=C(ft[ot]),pt.push(Vt);return new tt({array:pt})}if(f=="tag"){var z=r[f];if(Object.prototype.toString.call(z)==="[object Array]"&&z.length==3){var Wt=C(z[2]);return new L({tag:z[0],explicit:z[1],obj:Wt})}var Et={};if(z.explicit!==void 0&&(Et.explicit=z.explicit),z.tag!==void 0&&(Et.tag=z.tag),z.obj===void 0)throw"obj shall be specified for 'tag'.";return Et.obj=C(z.obj),new L(Et)}},this.jsonToASN1HEX=function(r){return this.newObject(r).getEncodedHex()}},u.asn1.ASN1Util.oidHexToInt=function(r){for(var t="",e=parseInt(r.substr(0,2),16),i=(t=Math.floor(e/40)+"."+e%40,""),n=2;n<r.length;n+=2){var s=("00000000"+parseInt(r.substr(n,2),16).toString(2)).slice(-8);i+=s.substr(1,7),s.substr(0,1)=="0"&&(t=t+"."+new p(i,2).toString(10),i="")}return t},u.asn1.ASN1Util.oidIntToHex=function(r){var t=function(a){var h=a.toString(16);return h.length==1&&(h="0"+h),h},e=function(a){var h="",l=new p(a,10).toString(2),c=7-l.length%7;c==7&&(c=0);for(var b="",g=0;g<c;g++)b+="0";for(l=b+l,g=0;g<l.length-1;g+=7){var x=l.substr(g,7);g!=l.length-7&&(x="1"+x),h+=t(parseInt(x,2))}return h};if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var i="",n=r.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=t(s),n.splice(0,2);for(var o=0;o<n.length;o++)i+=e(n[o]);return i},u.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(this.hV===void 0||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var r=this.hV.length/2,t=r.toString(16);if(t.length%2==1&&(t="0"+t),r<128)return t;var e=t.length/2;if(e>15)throw"ASN.1 length too long to represent by 8x: n = "+r.toString(16);return(128+e).toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||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""}},u.asn1.DERAbstractString=function(r){u.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=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(typeof r=="string"?this.setString(r):r.str!==void 0?this.setString(r.str):r.hex!==void 0&&this.setStringHex(r.hex))},A.lang.extend(u.asn1.DERAbstractString,u.asn1.ASN1Object),u.asn1.DERAbstractTime=function(r){u.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,i){var n=this.zeroPadding,s=this.localDateToUTC(t),o=String(s.getFullYear());e=="utc"&&(o=o.substr(2,2));var a=o+n(String(s.getMonth()+1),2)+n(String(s.getDate()),2)+n(String(s.getHours()),2)+n(String(s.getMinutes()),2)+n(String(s.getSeconds()),2);if(i===!0){var h=s.getMilliseconds();if(h!=0){var l=n(String(h),3);a=a+"."+(l=l.replace(/[0]+$/,""))}}return a+"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=stohex(t)},this.setByDateValue=function(t,e,i,n,s,o){var a=new Date(Date.UTC(t,e-1,i,n,s,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},A.lang.extend(u.asn1.DERAbstractTime,u.asn1.ASN1Object),u.asn1.DERAbstractStructured=function(r){u.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,r!==void 0&&r.array!==void 0&&(this.asn1Array=r.array)},A.lang.extend(u.asn1.DERAbstractStructured,u.asn1.ASN1Object),u.asn1.DERBoolean=function(){u.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},A.lang.extend(u.asn1.DERBoolean,u.asn1.ASN1Object),u.asn1.DERInteger=function(r){u.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=u.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new p(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(r.bigint!==void 0?this.setByBigInteger(r.bigint):r.int!==void 0?this.setByInteger(r.int):typeof r=="number"?this.setByInteger(r):r.hex!==void 0&&this.setValueHex(r.hex))},A.lang.extend(u.asn1.DERInteger,u.asn1.ASN1Object),u.asn1.DERBitString=function(r){if(r!==void 0&&r.obj!==void 0){var t=u.asn1.ASN1Util.newObject(r.obj);r.hex="00"+t.getEncodedHex()}u.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,i){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+i},this.setByBinaryString=function(e){var i=8-(e=e.replace(/0+$/,"")).length%8;i==8&&(i=0);for(var n=0;n<=i;n++)e+="0";var s="";for(n=0;n<e.length-1;n+=8){var o=e.substr(n,8),a=parseInt(o,2).toString(16);a.length==1&&(a="0"+a),s+=a}this.hTLV=null,this.isModified=!0,this.hV="0"+i+s},this.setByBooleanArray=function(e){for(var i="",n=0;n<e.length;n++)e[n]==1?i+="1":i+="0";this.setByBinaryString(i)},this.newFalseArray=function(e){for(var i=new Array(e),n=0;n<e;n++)i[n]=!1;return i},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(typeof r=="string"&&r.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(r):r.hex!==void 0?this.setHexValueIncludingUnusedBits(r.hex):r.bin!==void 0?this.setByBinaryString(r.bin):r.array!==void 0&&this.setByBooleanArray(r.array))},A.lang.extend(u.asn1.DERBitString,u.asn1.ASN1Object),u.asn1.DEROctetString=function(r){if(r!==void 0&&r.obj!==void 0){var t=u.asn1.ASN1Util.newObject(r.obj);r.hex=t.getEncodedHex()}u.asn1.DEROctetString.superclass.constructor.call(this,r),this.hT="04"},A.lang.extend(u.asn1.DEROctetString,u.asn1.DERAbstractString),u.asn1.DERNull=function(){u.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},A.lang.extend(u.asn1.DERNull,u.asn1.ASN1Object),u.asn1.DERObjectIdentifier=function(r){var t=function(i){var n=i.toString(16);return n.length==1&&(n="0"+n),n},e=function(i){var n="",s=new p(i,10).toString(2),o=7-s.length%7;o==7&&(o=0);for(var a="",h=0;h<o;h++)a+="0";for(s=a+s,h=0;h<s.length-1;h+=7){var l=s.substr(h,7);h!=s.length-7&&(l="1"+l),n+=t(parseInt(l,2))}return n};u.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(i){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueOidString=function(i){if(!i.match(/^[0-9.]+$/))throw"malformed oid string: "+i;var n="",s=i.split("."),o=40*parseInt(s[0])+parseInt(s[1]);n+=t(o),s.splice(0,2);for(var a=0;a<s.length;a++)n+=e(s[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueName=function(i){var n=u.asn1.x509.OID.name2oid(i);if(n==="")throw"DERObjectIdentifier oidName undefined: "+i;this.setValueOidString(n)},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(typeof r=="string"?r.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(r):this.setValueName(r):r.oid!==void 0?this.setValueOidString(r.oid):r.hex!==void 0?this.setValueHex(r.hex):r.name!==void 0&&this.setValueName(r.name))},A.lang.extend(u.asn1.DERObjectIdentifier,u.asn1.ASN1Object),u.asn1.DEREnumerated=function(r){u.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=u.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new p(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(r.int!==void 0?this.setByInteger(r.int):typeof r=="number"?this.setByInteger(r):r.hex!==void 0&&this.setValueHex(r.hex))},A.lang.extend(u.asn1.DEREnumerated,u.asn1.ASN1Object),u.asn1.DERUTF8String=function(r){u.asn1.DERUTF8String.superclass.constructor.call(this,r),this.hT="0c"},A.lang.extend(u.asn1.DERUTF8String,u.asn1.DERAbstractString),u.asn1.DERNumericString=function(r){u.asn1.DERNumericString.superclass.constructor.call(this,r),this.hT="12"},A.lang.extend(u.asn1.DERNumericString,u.asn1.DERAbstractString),u.asn1.DERPrintableString=function(r){u.asn1.DERPrintableString.superclass.constructor.call(this,r),this.hT="13"},A.lang.extend(u.asn1.DERPrintableString,u.asn1.DERAbstractString),u.asn1.DERTeletexString=function(r){u.asn1.DERTeletexString.superclass.constructor.call(this,r),this.hT="14"},A.lang.extend(u.asn1.DERTeletexString,u.asn1.DERAbstractString),u.asn1.DERIA5String=function(r){u.asn1.DERIA5String.superclass.constructor.call(this,r),this.hT="16"},A.lang.extend(u.asn1.DERIA5String,u.asn1.DERAbstractString),u.asn1.DERUTCTime=function(r){u.asn1.DERUTCTime.superclass.constructor.call(this,r),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=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},r!==void 0&&(r.str!==void 0?this.setString(r.str):typeof r=="string"&&r.match(/^[0-9]{12}Z$/)?this.setString(r):r.hex!==void 0?this.setStringHex(r.hex):r.date!==void 0&&this.setByDate(r.date))},A.lang.extend(u.asn1.DERUTCTime,u.asn1.DERAbstractTime),u.asn1.DERGeneralizedTime=function(r){u.asn1.DERGeneralizedTime.superclass.constructor.call(this,r),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=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},r!==void 0&&(r.str!==void 0?this.setString(r.str):typeof r=="string"&&r.match(/^[0-9]{14}Z$/)?this.setString(r):r.hex!==void 0?this.setStringHex(r.hex):r.date!==void 0&&this.setByDate(r.date),r.millis===!0&&(this.withMillis=!0))},A.lang.extend(u.asn1.DERGeneralizedTime,u.asn1.DERAbstractTime),u.asn1.DERSequence=function(r){u.asn1.DERSequence.superclass.constructor.call(this,r),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}},A.lang.extend(u.asn1.DERSequence,u.asn1.DERAbstractStructured),u.asn1.DERSet=function(r){u.asn1.DERSet.superclass.constructor.call(this,r),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var i=this.asn1Array[e];t.push(i.getEncodedHex())}return this.sortFlag==1&&t.sort(),this.hV=t.join(""),this.hV},r!==void 0&&r.sortflag!==void 0&&r.sortflag==0&&(this.sortFlag=!1)},A.lang.extend(u.asn1.DERSet,u.asn1.DERAbstractStructured),u.asn1.DERTaggedObject=function(r){u.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,i){this.hT=e,this.isExplicit=t,this.asn1Object=i,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=i.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(r.tag!==void 0&&(this.hT=r.tag),r.explicit!==void 0&&(this.isExplicit=r.explicit),r.obj!==void 0&&(this.asn1Object=r.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},A.lang.extend(u.asn1.DERTaggedObject,u.asn1.ASN1Object);var wt,qt,Jt=(wt=function(r,t){return wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},wt(r,t)},function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=r}wt(r,t),r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),jt=function(r){function t(e){var i=r.call(this)||this;return e&&(typeof e=="string"?i.parseKey(e):(t.hasPrivateKeyProperty(e)||t.hasPublicKeyProperty(e))&&i.parsePropertiesFrom(e)),i}return Jt(t,r),t.prototype.parseKey=function(e){try{var i=0,n=0,s=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?function(S){var T;if(M===void 0){var B="0123456789ABCDEF",tt=` \f
- \r \u2028\u2029`;for(M={},T=0;T<16;++T)M[B.charAt(T)]=T;for(B=B.toLowerCase(),T=10;T<16;++T)M[B.charAt(T)]=T;for(T=0;T<tt.length;++T)M[tt.charAt(T)]=-1}var L=[],C=0,ct=0;for(T=0;T<S.length;++T){var f=S.charAt(T);if(f=="=")break;if((f=M[f])!=-1){if(f===void 0)throw new Error("Illegal character at offset "+T);C|=f,++ct>=2?(L[L.length]=C,C=0,ct=0):C<<=4}}if(ct)throw new Error("Hex encoding incomplete: 4 bits missing");return L}(e):W.unarmor(e),o=Ut.decode(s);if(o.sub.length===3&&(o=o.sub[2].sub[0]),o.sub.length===9){i=o.sub[1].getHexStringValue(),this.n=R(i,16),n=o.sub[2].getHexStringValue(),this.e=parseInt(n,16);var a=o.sub[3].getHexStringValue();this.d=R(a,16);var h=o.sub[4].getHexStringValue();this.p=R(h,16);var l=o.sub[5].getHexStringValue();this.q=R(l,16);var c=o.sub[6].getHexStringValue();this.dmp1=R(c,16);var b=o.sub[7].getHexStringValue();this.dmq1=R(b,16);var g=o.sub[8].getHexStringValue();this.coeff=R(g,16)}else{if(o.sub.length!==2)return!1;if(o.sub[0].sub){var x=o.sub[1].sub[0];i=x.sub[0].getHexStringValue(),this.n=R(i,16),n=x.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else i=o.sub[0].getHexStringValue(),this.n=R(i,16),n=o.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch{return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new u.asn1.DERInteger({int:0}),new u.asn1.DERInteger({bigint:this.n}),new u.asn1.DERInteger({int:this.e}),new u.asn1.DERInteger({bigint:this.d}),new u.asn1.DERInteger({bigint:this.p}),new u.asn1.DERInteger({bigint:this.q}),new u.asn1.DERInteger({bigint:this.dmp1}),new u.asn1.DERInteger({bigint:this.dmq1}),new u.asn1.DERInteger({bigint:this.coeff})]};return new u.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return m(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new u.asn1.DERSequence({array:[new u.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new u.asn1.DERNull]}),i=new u.asn1.DERSequence({array:[new u.asn1.DERInteger({bigint:this.n}),new u.asn1.DERInteger({int:this.e})]}),n=new u.asn1.DERBitString({hex:"00"+i.getEncodedHex()});return new u.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return m(this.getPublicBaseKey())},t.wordwrap=function(e,i){if(!e)return e;var n="(.{1,"+(i=i||64)+`})( +|$
- ?)|(.{1,`+i+"})";return e.match(RegExp(n,"g")).join(`
- `)},t.prototype.getPrivateKey=function(){var e=`-----BEGIN RSA PRIVATE KEY-----
- `;return(e+=t.wordwrap(this.getPrivateBaseKeyB64())+`
- `)+"-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e=`-----BEGIN PUBLIC KEY-----
- `;return(e+=t.wordwrap(this.getPublicBaseKeyB64())+`
- `)+"-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(Gt),Ct=X(155),Qt=Ct!==void 0?(qt=Ct.env)===null||qt===void 0?void 0:"3.3.1":void 0;const Xt=function(){function r(t){t===void 0&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return r.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new jt(t)},r.prototype.setPrivateKey=function(t){this.setKey(t)},r.prototype.setPublicKey=function(t){this.setKey(t)},r.prototype.decrypt=function(t){try{return this.getKey().decrypt(E(t))}catch{return!1}},r.prototype.encrypt=function(t){try{return m(this.getKey().encrypt(t))}catch{return!1}},r.prototype.sign=function(t,e,i){try{return m(this.getKey().sign(t,e,i))}catch{return!1}},r.prototype.verify=function(t,e,i){try{return this.getKey().verify(t,E(e),i)}catch{return!1}},r.prototype.getKey=function(t){if(!this.key){if(this.key=new jt,t&&{}.toString.call(t)==="[object Function]")return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},r.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},r.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},r.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},r.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},r.version=Qt,r}()})(),nt.default})())})(Ft);var pe=Ft.exports;const ge=te(pe),de=`MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw
- J0feodpQYfSPeeBRlyqlqfs5dtP38LL19kKO3wwdP+vdcktxXR9Inje9Jcq+nIUJ
- +Comh3bEh1nsWUDBgtlz4vEqecho9KFaDqkFp3tR/emWJYT0KLEcBidKUImkumJk0cVBKleww/4R1HDorwE
- 9J2a1Rp9z0DUEU7YuudoaUy5Es1vORjDplIZv9bzip7/LANv6GmdtXwk5IpdbfNr
- koJgGXlE063uIMkqRyiOo04ofeYpSjZbP4bvnboxYi23wpIe81uLIsM+4JcFoU6u
- N0cYs03oYkfjXQdlKTpBpM6lcm+7xhEz9Y/OR7YorRWB1Qdt7nr3cRmx0uIs/h/T
- 9QIDAQAB`;function Ht(H){const J=new ge;return J.setPublicKey(de),J.encrypt(H)}function me(H){return{username:[{required:!0,message:H("login.usernameTips"),trigger:"blur"},{min:3,max:20,message:H("login.usernameLength"),trigger:"blur"}],email:[{required:!0,message:H("login.emailTips"),trigger:"blur"},{type:"email",message:H("login.emailFormat"),trigger:"blur"}],password:[{required:!0,message:H("login.passwordTips"),trigger:"blur"},{min:8,max:20,message:H("login.passwordLength"),trigger:"blur"}]}}const ve={key:0,class:"tips-register"},ye={key:1,class:"tips-login"},be={__name:"FormItem",setup(H){const J=ee(),{appContext:Q}=ae(),et=he(),{t:X}=ie(),nt=Q.config.globalProperties.$message,D=Ot(),y=re({username:"",email:"",password:""}),w=me(X),v=Ot(0),k=Ot(!1),st=m=>{k.value=!0,v.value?ut():et.toLogin({username:m.username,password:Ht(m.password)}).then(async E=>{nt.success(E),await et.getRoutesList(),await et.getUserInfo(),J.replace({path:"/"})}).catch(E=>{nt.error(E)}).finally(()=>{k.value=!1})},ut=()=>{ue({username:y.username,email:y.email,password:Ht(y.password)}).then(m=>{m.code==200?(nt.success(m.msg),v.value=0,D.value.resetFields(),M(m.data.userFlag)):nt.error(m.msg)}).finally(()=>{k.value=!1})},M=async m=>{await le(m)},I=(m,E)=>{console.log(m,E),m.preventDefault(),D.value.resetFields(),v.value=E};return(m,E)=>{const F=at("icon-user"),W=at("a-input"),q=at("a-form-item"),P=at("icon-email"),V=at("a-input-password"),j=at("a-button"),O=at("a-form");return ht(),xt(oe,null,[K("div",{class:"form-title",style:ne({top:v.value?"50px":"70px"})},G(v.value?m.$t("login.registerModel"):m.$t("login.loginModel")),5),Z(O,{ref_key:"ref_form",ref:D,model:y,rules:se(w),style:{width:"calc(100% - 40px)"},layout:"validate",onSubmitSuccess:st},{default:Y(()=>[Z(q,{field:"username"},{default:Y(()=>[Z(W,{modelValue:y.username,"onUpdate:modelValue":E[0]||(E[0]=N=>y.username=N),placeholder:m.$t("login.usernameTips")},{prefix:Y(()=>[Z(F)]),_:1},8,["modelValue","placeholder"])]),_:1}),v.value?(ht(),It(q,{key:0,field:"email"},{default:Y(()=>[Z(W,{modelValue:y.email,"onUpdate:modelValue":E[1]||(E[1]=N=>y.email=N),placeholder:m.$t("login.emailTips")},{prefix:Y(()=>[Z(P)]),_:1},8,["modelValue","placeholder"])]),_:1})):gt("",!0),Z(q,{field:"password"},{default:Y(()=>[Z(V,{modelValue:y.password,"onUpdate:modelValue":E[2]||(E[2]=N=>y.password=N),placeholder:m.$t("login.passwordTips"),defaultVisibility:!0,"allow-clear":""},{prefix:Y(()=>[Z(F)]),_:1},8,["modelValue","placeholder"])]),_:1}),Z(q,{style:{"margin-top":"30px"}},{default:Y(()=>[v.value?gt("",!0):(ht(),It(j,{key:0,class:"submit-btn",type:"primary","html-type":"submit",loading:k.value},{default:Y(()=>[Dt(G(m.$t("login.loginBtn")),1)]),_:1},8,["loading"])),v.value?(ht(),It(j,{key:1,class:"submit-btn",type:"primary","html-type":"submit",loading:k.value},{default:Y(()=>[Dt(G(m.$t("login.registerBtn")),1)]),_:1},8,["loading"])):gt("",!0)]),_:1})]),_:1},8,["model","rules"]),v.value?gt("",!0):(ht(),xt("div",ve,[Dt(G(m.$t("login.noAccount"))+" ",1),K("a",{class:"reg-link",href:"#",onClick:E[3]||(E[3]=N=>I(N,1))},G(m.$t("login.registerBtn")),1)])),v.value?(ht(),xt("div",ye,[Dt(G(m.$t("login.hasAccount"))+" ",1),K("a",{class:"reg-link",href:"#",onClick:E[4]||(E[4]=N=>I(N,0))},G(m.$t("login.loginBtn")),1)])):gt("",!0)],64)}}},Te=kt(be,[["__scopeId","data-v-f3c38be1"]]),Se={class:"login"},we={class:"login-logo"},Ee={class:"logo-title"},De={class:"login-section"},xe={class:"intro"},Be={class:"intro-title"},Re={class:"intro-title"},Ae={class:"login-form"},Ve={__name:"Login",setup(H){return(J,Q)=>(ht(),xt("div",Se,[K("div",we,[Q[0]||(Q[0]=K("img",{class:"logo-img",src:ce,alt:"logo"},null,-1)),K("div",Ee,G(J.$t("login.logoTitle")),1)]),K("div",De,[K("div",xe,[K("div",Be,G(J.$t("login.logoTitle")),1),K("div",Re,G(J.$t("login.titleTips")),1),Q[1]||(Q[1]=K("img",{src:fe,alt:""},null,-1))]),K("div",Ae,[Z(Te)])])]))}},Me=kt(Ve,[["__scopeId","data-v-f67f6e06"]]);export{Me as default};
|