| 12345678910111213141516 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fda28c4c"],{"0fd9":function(t,e,i){"use strict";i("4b85");var s=i("2b0e"),r=i("d9f7"),n=i("80d2");const o=["sm","md","lg","xl"],a=["start","end","center"];function h(t,e){return o.reduce((i,s)=>(i[t+Object(n["E"])(s)]=e(),i),{})}const u=t=>[...a,"baseline","stretch"].includes(t),c=h("align",()=>({type:String,default:null,validator:u})),l=t=>[...a,"space-between","space-around"].includes(t),f=h("justify",()=>({type:String,default:null,validator:l})),p=t=>[...a,"space-between","space-around","stretch"].includes(t),d=h("alignContent",()=>({type:String,default:null,validator:p})),g={align:Object.keys(c),justify:Object.keys(f),alignContent:Object.keys(d)},v={align:"align",justify:"justify",alignContent:"align-content"};function m(t,e,i){let s=v[t];if(null!=i){if(e){const i=e.replace(t,"");s+="-"+i}return s+="-"+i,s.toLowerCase()}}const y=new Map;e["a"]=s["default"].extend({name:"v-row",functional:!0,props:{tag:{type:String,default:"div"},dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:u},...c,justify:{type:String,default:null,validator:l},...f,alignContent:{type:String,default:null,validator:p},...d},render(t,{props:e,data:i,children:s}){let n="";for(const r in e)n+=String(e[r]);let o=y.get(n);if(!o){let t;for(t in o=[],g)g[t].forEach(i=>{const s=e[i],r=m(t,i,s);r&&o.push(r)});o.push({"no-gutters":e.noGutters,"row--dense":e.dense,["align-"+e.align]:e.align,["justify-"+e.justify]:e.justify,["align-content-"+e.alignContent]:e.alignContent}),y.set(n,o)}return t(e.tag,Object(r["a"])(i,{staticClass:"row",class:o}),s)}})},"2db4":function(t,e,i){"use strict";i("ca71");var s=i("8dd9"),r=i("a9ad"),n=i("7560"),o=i("f2e7"),a=i("fe6c"),h=i("58df"),u=i("80d2"),c=i("d9bd");e["a"]=Object(h["a"])(s["a"],r["a"],o["a"],Object(a["b"])(["absolute","bottom","left","right","top"])).extend({name:"v-snackbar",props:{app:Boolean,centered:Boolean,contentClass:{type:String,default:""},multiLine:Boolean,text:Boolean,timeout:{type:[Number,String],default:5e3},transition:{type:[Boolean,String],default:"v-snack-transition",validator:t=>"string"===typeof t||!1===t},vertical:Boolean},data:()=>({activeTimeout:-1}),computed:{classes(){return{"v-snack--absolute":this.absolute,"v-snack--active":this.isActive,"v-snack--bottom":this.bottom||!this.top,"v-snack--centered":this.centered,"v-snack--has-background":this.hasBackground,"v-snack--left":this.left,"v-snack--multi-line":this.multiLine&&!this.vertical,"v-snack--right":this.right,"v-snack--text":this.text,"v-snack--top":this.top,"v-snack--vertical":this.vertical}},hasBackground(){return!this.text&&!this.outlined},isDark(){return this.hasBackground?!this.light:n["a"].options.computed.isDark.call(this)},styles(){if(this.absolute)return{};const{bar:t,bottom:e,footer:i,insetFooter:s,left:r,right:n,top:o}=this.$vuetify.application;return{paddingBottom:Object(u["g"])(e+i+s),paddingLeft:this.app?Object(u["g"])(r):void 0,paddingRight:this.app?Object(u["g"])(n):void 0,paddingTop:Object(u["g"])(t+o)}}},watch:{isActive:"setTimeout",timeout:"setTimeout"},mounted(){this.isActive&&this.setTimeout()},created(){this.$attrs.hasOwnProperty("auto-height")&&Object(c["e"])("auto-height",this),0==this.timeout&&Object(c["d"])('timeout="0"',"-1",this)},methods:{genActions(){return this.$createElement("div",{staticClass:"v-snack__action "},[Object(u["r"])(this,"action",{attrs:{class:"v-snack__btn"}})])},genContent(){return this.$createElement("div",{staticClass:"v-snack__content",class:{[this.contentClass]:!0},attrs:{role:"status","aria-live":"polite"}},[Object(u["r"])(this)])},genWrapper(){const t=this.hasBackground?this.setBackgroundColor:this.setTextColor,e=t(this.color,{staticClass:"v-snack__wrapper",class:s["a"].options.computed.classes.call(this),directives:[{name:"show",value:this.isActive}]});return this.$createElement("div",e,[this.genContent(),this.genActions()])},genTransition(){return this.$createElement("transition",{props:{name:this.transition}},[this.genWrapper()])},setTimeout(){window.clearTimeout(this.activeTimeout);const t=Number(this.timeout);this.isActive&&![0,-1].includes(t)&&(this.activeTimeout=window.setTimeout(()=>{this.isActive=!1},t))}},render(t){return t("div",{staticClass:"v-snack",class:this.classes,style:this.styles},[!1!==this.transition?this.genTransition():this.genWrapper()])}})},"615b":function(t,e,i){},"62ad":function(t,e,i){"use strict";i("4b85");var s=i("2b0e"),r=i("d9f7"),n=i("80d2");const o=["sm","md","lg","xl"],a=(()=>o.reduce((t,e)=>(t[e]={type:[Boolean,String,Number],default:!1},t),{}))(),h=(()=>o.reduce((t,e)=>(t["offset"+Object(n["E"])(e)]={type:[String,Number],default:null},t),{}))(),u=(()=>o.reduce((t,e)=>(t["order"+Object(n["E"])(e)]={type:[String,Number],default:null},t),{}))(),c={col:Object.keys(a),offset:Object.keys(h),order:Object.keys(u)};function l(t,e,i){let s=t;if(null!=i&&!1!==i){if(e){const i=e.replace(t,"");s+="-"+i}return"col"!==t||""!==i&&!0!==i?(s+="-"+i,s.toLowerCase()):s.toLowerCase()}}const f=new Map;e["a"]=s["default"].extend({name:"v-col",functional:!0,props:{cols:{type:[Boolean,String,Number],default:!1},...a,offset:{type:[String,Number],default:null},...h,order:{type:[String,Number],default:null},...u,alignSelf:{type:String,default:null,validator:t=>["auto","start","end","center","baseline","stretch"].includes(t)},tag:{type:String,default:"div"}},render(t,{props:e,data:i,children:s,parent:n}){let o="";for(const r in e)o+=String(e[r]);let a=f.get(o);if(!a){let t;for(t in a=[],c)c[t].forEach(i=>{const s=e[i],r=l(t,i,s);r&&a.push(r)});const i=a.some(t=>t.startsWith("col-"));a.push({col:!i||!e.cols,["col-"+e.cols]:e.cols,["offset-"+e.offset]:e.offset,["order-"+e.order]:e.order,["align-self-"+e.alignSelf]:e.alignSelf}),f.set(o,a)}return t(e.tag,Object(r["a"])(i,{class:a}),s)}})},8547:function(t,e,i){"use strict";var s=i("2b0e"),r=i("80d2");e["a"]=s["default"].extend({name:"comparable",props:{valueComparator:{type:Function,default:r["i"]}}})},"9d01":function(t,e,i){},a524:function(t){t.exports=JSON.parse('{"version":"3.2.1"}')},b0af:function(t,e,i){"use strict";i("615b");var s=i("10d2"),r=i("297c"),n=i("1c87"),o=i("58df");e["a"]=Object(o["a"])(r["a"],n["a"],s["a"]).extend({name:"v-card",props:{flat:Boolean,hover:Boolean,img:String,link:Boolean,loaderHeight:{type:[Number,String],default:4},raised:Boolean},computed:{classes(){return{"v-card":!0,...n["a"].options.computed.classes.call(this),"v-card--flat":this.flat,"v-card--hover":this.hover,"v-card--link":this.isClickable,"v-card--loading":this.loading,"v-card--disabled":this.disabled,"v-card--raised":this.raised,...s["a"].options.computed.classes.call(this)}},styles(){const t={...s["a"].options.computed.styles.call(this)};return this.img&&(t.background=`url("${this.img}") center center / cover no-repeat`),t}},methods:{genProgress(){const t=r["a"].options.methods.genProgress.call(this);return t?this.$createElement("div",{staticClass:"v-card__progress",key:"progress"},[t]):null}},render(t){const{tag:e,data:i}=this.generateRouteLink();return i.style=this.styles,this.isClickable&&(i.attrs=i.attrs||{},i.attrs.tabindex=0),t(e,this.setBackgroundColor(this.color,i),[this.genProgress(),this.$slots.default])}})},b73d:function(t,e,i){"use strict";i("ec29"),i("9d01");var s=i("c37a"),r=i("5607"),n=i("2b0e"),o=n["default"].extend({name:"rippleable",directives:{ripple:r["a"]},props:{ripple:{type:[Boolean,Object],default:!0}},methods:{genRipple(t={}){return this.ripple?(t.staticClass="v-input--selection-controls__ripple",t.directives=t.directives||[],t.directives.push({name:"ripple",value:{center:!0}}),this.$createElement("div",t)):null}}}),a=i("8547"),h=i("58df");function u(t){t.preventDefault()}var c=Object(h["a"])(s["a"],o,a["a"]).extend({name:"selectable",model:{prop:"inputValue",event:"change"},props:{id:String,inputValue:null,falseValue:null,trueValue:null,multiple:{type:Boolean,default:null},label:String},data(){return{hasColor:this.inputValue,lazyValue:this.inputValue}},computed:{computedColor(){if(this.isActive)return this.color?this.color:this.isDark&&!this.appIsDark?"white":"primary"},isMultiple(){return!0===this.multiple||null===this.multiple&&Array.isArray(this.internalValue)},isActive(){const t=this.value,e=this.internalValue;return this.isMultiple?!!Array.isArray(e)&&e.some(e=>this.valueComparator(e,t)):void 0===this.trueValue||void 0===this.falseValue?t?this.valueComparator(t,e):Boolean(e):this.valueComparator(e,this.trueValue)},isDirty(){return this.isActive},rippleState(){return this.isDisabled||this.validationState?this.validationState:void 0}},watch:{inputValue(t){this.lazyValue=t,this.hasColor=t}},methods:{genLabel(){const t=s["a"].options.methods.genLabel.call(this);return t?(t.data.on={click:u},t):t},genInput(t,e){return this.$createElement("input",{attrs:Object.assign({"aria-checked":this.isActive.toString(),disabled:this.isDisabled,id:this.computedId,role:t,type:t},e),domProps:{value:this.value,checked:this.isActive},on:{blur:this.onBlur,change:this.onChange,focus:this.onFocus,keydown:this.onKeydown,click:u},ref:"input"})},onBlur(){this.isFocused=!1},onClick(t){this.onChange(),this.$emit("click",t)},onChange(){if(!this.isInteractive)return;const t=this.value;let e=this.internalValue;if(this.isMultiple){Array.isArray(e)||(e=[]);const i=e.length;e=e.filter(e=>!this.valueComparator(e,t)),e.length===i&&e.push(t)}else e=void 0!==this.trueValue&&void 0!==this.falseValue?this.valueComparator(e,this.trueValue)?this.falseValue:this.trueValue:t?this.valueComparator(e,t)?null:t:!e;this.validate(!0,e),this.internalValue=e,this.hasColor=e},onFocus(){this.isFocused=!0},onKeydown(t){}}}),l=i("c3f0"),f=i("0789"),p=i("490a"),d=i("80d2");e["a"]=c.extend({name:"v-switch",directives:{Touch:l["a"]},props:{inset:Boolean,loading:{type:[Boolean,String],default:!1},flat:{type:Boolean,default:!1}},computed:{classes(){return{...s["a"].options.computed.classes.call(this),"v-input--selection-controls v-input--switch":!0,"v-input--switch--flat":this.flat,"v-input--switch--inset":this.inset}},attrs(){return{"aria-checked":String(this.isActive),"aria-disabled":String(this.isDisabled),role:"switch"}},validationState(){return this.hasError&&this.shouldValidate?"error":this.hasSuccess?"success":null!==this.hasColor?this.computedColor:void 0},switchData(){return this.setTextColor(this.loading?void 0:this.validationState,{class:this.themeClasses})}},methods:{genDefaultSlot(){return[this.genSwitch(),this.genLabel()]},genSwitch(){return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.genInput("checkbox",{...this.attrs,...this.attrs$}),this.genRipple(this.setTextColor(this.validationState,{directives:[{name:"touch",value:{left:this.onSwipeLeft,right:this.onSwipeRight}}]})),this.$createElement("div",{staticClass:"v-input--switch__track",...this.switchData}),this.$createElement("div",{staticClass:"v-input--switch__thumb",...this.switchData},[this.genProgress()])])},genProgress(){return this.$createElement(f["c"],{},[!1===this.loading?null:this.$slots.progress||this.$createElement(p["a"],{props:{color:!0===this.loading||""===this.loading?this.color||"primary":this.loading,size:16,width:2,indeterminate:!0}})])},onSwipeLeft(){this.isActive&&this.onChange()},onSwipeRight(){this.isActive||this.onChange()},onKeydown(t){(t.keyCode===d["x"].left&&this.isActive||t.keyCode===d["x"].right&&!this.isActive)&&this.onChange()}}})},bd0c:function(t,e,i){},c3f0:function(t,e,i){"use strict";var s=i("80d2");const r=t=>{const{touchstartX:e,touchendX:i,touchstartY:s,touchendY:r}=t,n=.5,o=16;t.offsetX=i-e,t.offsetY=r-s,Math.abs(t.offsetY)<n*Math.abs(t.offsetX)&&(t.left&&i<e-o&&t.left(t),t.right&&i>e+o&&t.right(t)),Math.abs(t.offsetX)<n*Math.abs(t.offsetY)&&(t.up&&r<s-o&&t.up(t),t.down&&r>s+o&&t.down(t))};function n(t,e){const i=t.changedTouches[0];e.touchstartX=i.clientX,e.touchstartY=i.clientY,e.start&&e.start(Object.assign(t,e))}function o(t,e){const i=t.changedTouches[0];e.touchendX=i.clientX,e.touchendY=i.clientY,e.end&&e.end(Object.assign(t,e)),r(e)}function a(t,e){const i=t.changedTouches[0];e.touchmoveX=i.clientX,e.touchmoveY=i.clientY,e.move&&e.move(Object.assign(t,e))}function h(t){const e={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:t.left,right:t.right,up:t.up,down:t.down,start:t.start,move:t.move,end:t.end};return{touchstart:t=>n(t,e),touchend:t=>o(t,e),touchmove:t=>a(t,e)}}function u(t,e,i){const r=e.value,n=r.parent?t.parentElement:t,o=r.options||{passive:!0};if(!n)return;const a=h(e.value);n._touchHandlers=Object(n._touchHandlers),n._touchHandlers[i.context._uid]=a,Object(s["y"])(a).forEach(t=>{n.addEventListener(t,a[t],o)})}function c(t,e,i){const r=e.value.parent?t.parentElement:t;if(!r||!r._touchHandlers)return;const n=r._touchHandlers[i.context._uid];Object(s["y"])(n).forEach(t=>{r.removeEventListener(t,n[t])}),delete r._touchHandlers[i.context._uid]}const l={inserted:u,unbind:c};e["a"]=l},ca71:function(t,e,i){},d10f:function(t,e,i){"use strict";var s=i("2b0e");e["a"]=s["default"].extend({name:"ssr-bootable",data:()=>({isBooted:!1}),mounted(){window.requestAnimationFrame(()=>{this.$el.setAttribute("data-booted","true"),this.isBooted=!0})}})},dd7b:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-main",[i("v-container",{attrs:{"fill-height":""}},[i("v-row",{attrs:{justify:"center",align:"center"}},[i("v-col",{attrs:{cols:"12"}},[i("v-card",{staticClass:"mx-auto",attrs:{"max-width":"500"}},[i("v-row",{staticStyle:{height:"64px"},attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"10"}},[i("v-btn",{attrs:{text:""},on:{click:t.backHome}},[i("v-icon",[t._v(" mdi-arrow-left ")]),t._v(" 返回 ")],1)],1)],1),i("v-row",{attrs:{justify:"center"}},[i("img",{attrs:{src:this.$store.state.webInfo.logoUrl,height:"36px"}})]),i("v-row",{attrs:{justify:"center"}},[i("h1",[t._v(t._s(this.$store.state.webInfo.name)+" "+t._s(t.type))])]),i("v-row",{staticStyle:{height:"48px"}}),i("LoginFormMobile",{directives:[{name:"show",rawName:"v-show",value:t.showLogin,expression:"showLogin"}],on:{login:t.userLogin}}),i("LoginFormPassword",{directives:[{name:"show",rawName:"v-show",value:!0===t.showLogin1,expression:"showLogin1 === true"}],on:{login:t.userLogin}}),i("RegisterForm",{directives:[{name:"show",rawName:"v-show",value:!1===t.showLogin,expression:"showLogin === false"}],on:{register:t.userRegister}}),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"5"}},[i("v-btn",{attrs:{text:"",color:"primary"}},[t._v("忘记密码")])],1),i("v-col",{staticStyle:{"text-align":"right"},attrs:{cols:"5"}},[i("v-btn",{attrs:{text:""},on:{click:t.moveRegister}},[t._v(t._s(t.moveMessage))])],1)],1)],1)],1)],1),i("v-snackbar",{attrs:{top:!0,timeout:3e3},scopedSlots:t._u([{key:"action",fn:function(e){var s=e.attrs;return[i("v-btn",t._b({attrs:{color:"pink",text:""},on:{click:function(e){t.showMessage=!1}}},"v-btn",s,!1),[t._v(" 关闭 ")])]}}]),model:{value:t.showMessage,callback:function(e){t.showMessage=e},expression:"showMessage"}},[t._v(" "+t._s(t.message)+" ")])],1)],1)},r=[],n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"10"}},[i("v-text-field",{attrs:{placeholder:"请输入手机号/邮箱",label:"手机号/邮箱",rules:[function(){return null!=t.userLogin.username||"手机号/邮箱不能为空"}],clearable:""},model:{value:t.userLogin.username,callback:function(e){t.$set(t.userLogin,"username",e)},expression:"userLogin.username"}})],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"10"}},[i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"5"}},[i("v-text-field",{attrs:{placeholder:"请输入验证码",label:"验证码",rules:[function(){return null!=t.userLogin.password||"验证码不能为空"}],clearable:""},model:{value:t.userLogin.password,callback:function(e){t.$set(t.userLogin,"password",e)},expression:"userLogin.password"}})],1),i("v-col",{attrs:{cols:"5"}},[i("v-btn",{attrs:{color:"primary"},on:{click:t.getVerifyCode}},[t._v("获取验证码")])],1)],1)],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"5"}},[i("img",{staticStyle:{cursor:"pointer"},attrs:{src:t.captchaUrl,alt:"图形验证码",title:"点击刷新"},on:{click:t.getCaptcha}})]),i("v-col",{attrs:{cols:"5"}},[i("v-text-field",{attrs:{placeholder:"图形验证码",label:"图形验证码",rules:[function(){return null!=t.userLogin.captchaCode||"图形验证码不能为空"}],clearable:""},model:{value:t.userLogin.captchaCode,callback:function(e){t.$set(t.userLogin,"captchaCode",e)},expression:"userLogin.captchaCode"}})],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-btn",{attrs:{color:"primary"},on:{click:t.submitLogin}},[t._v("登录/注册")])],1)],1)},o=[];function a(t){t=t||16;for(var e="012345678ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",i=e.length,s="",r=0;r<t;r++)s+=e.charAt(Math.floor(Math.random()*i));return s}function h(t){return"//api.reghao.cn/api/account/captcha?r="+t}var u=i("37f8"),c=i("ea2a"),l={name:"Register",data:function(){return{captchaUrl:"",showMessage:!1,userLogin:{accountType:1,loginType:2,username:null,password:null,captchaCode:null,r:null,plat:"web"}}},created:function(){this.getCaptcha(),this.fetchPubkey()},methods:{submitLogin:function(){this.$emit("login",this.userLogin)},getCaptcha:function(){var t=a(10);this.userLogin.r=t,this.captchaUrl=h(t)},fetchPubkey:function(){var t=this;Object(c["a"])().then((function(e){0===e.code?(t.pubkey=e.data.pubkey,t.pubkeyR=e.data.r):alert(e.data)})).catch((function(t){console.error(t.message)}))},getVerifyCode:function(){var t={};t.receiver=this.userLogin.username,t.notifyType=2,Object(u["a"])(t).then((function(t){0===t.code?alert(t.msg):console.error(t.msg)})).catch((function(t){console.error(t.message)}))}}},f=l,p=i("2877"),d=i("6544"),g=i.n(d),v=i("8336"),m=i("62ad"),y=i("0fd9"),b=i("8654"),w=Object(p["a"])(f,n,o,!1,null,null,null),S=w.exports;g()(w,{VBtn:v["a"],VCol:m["a"],VRow:y["a"],VTextField:b["a"]});var T=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"10"}},[i("v-text-field",{attrs:{placeholder:"请输入邮箱",label:"邮箱",rules:[function(){return null!=t.username||"请输入邮箱"}],clearable:""},model:{value:t.username,callback:function(e){t.username=e},expression:"username"}})],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"10"}},[i("v-text-field",{attrs:{placeholder:"请输入密码",label:"密码",clearable:"",rules:[function(){return null!=t.password||"密码不能为空"}],type:"password"},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"5"}},[i("img",{staticStyle:{cursor:"pointer"},attrs:{src:t.captchaUrl,alt:"验证码",title:"点击刷新"},on:{click:t.getCaptcha}})]),i("v-col",{attrs:{cols:"5"}},[i("v-text-field",{attrs:{placeholder:"验证码",label:"验证码",rules:[function(){return null!=t.captcha||"验证码不能为空"}],clearable:""},model:{value:t.captcha,callback:function(e){t.captcha=e},expression:"captcha"}})],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"3"}},[i("v-switch",{attrs:{label:"记住我"},model:{value:t.rememberMe,callback:function(e){t.rememberMe=e},expression:"rememberMe"}})],1),i("v-col",{attrs:{cols:"7"}})],1),i("v-row",{attrs:{justify:"center"}},[i("v-btn",{attrs:{color:"primary"},on:{click:t.submitLogin}},[t._v("登录")])],1)],1)},E=[],x="0123456789abcdefghijklmnopqrstuvwxyz";function D(t){return x.charAt(t)}function R(t,e){return t&e}function B(t,e){return t|e}function V(t,e){return t^e}function O(t,e){return t&~e}function A(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 C(t){var e=0;while(0!=t)t&=t-1,++e;return e}var k,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I="=";function N(t){var e,i,s="";for(e=0;e+3<=t.length;e+=3)i=parseInt(t.substring(e,e+3),16),s+=j.charAt(i>>6)+j.charAt(63&i);e+1==t.length?(i=parseInt(t.substring(e,e+1),16),s+=j.charAt(i<<2)):e+2==t.length&&(i=parseInt(t.substring(e,e+2),16),s+=j.charAt(i>>2)+j.charAt((3&i)<<4));while((3&s.length)>0)s+=I;return s}function L(t){var e,i="",s=0,r=0;for(e=0;e<t.length;++e){if(t.charAt(e)==I)break;var n=j.indexOf(t.charAt(e));n<0||(0==s?(i+=D(n>>2),r=3&n,s=1):1==s?(i+=D(r<<2|n>>4),r=15&n,s=2):2==s?(i+=D(r),i+=D(n>>2),r=3&n,s=3):(i+=D(r<<2|n>>4),i+=D(15&n),s=0))}return 1==s&&(i+=D(r<<2)),i}var M,P={decode:function(t){var e;if(void 0===k){var i="0123456789ABCDEF",s=" \f\n\r\t \u2028\u2029";for(k={},e=0;e<16;++e)k[i.charAt(e)]=e;for(i=i.toLowerCase(),e=10;e<16;++e)k[i.charAt(e)]=e;for(e=0;e<s.length;++e)k[s.charAt(e)]=-1}var r=[],n=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(a=k[a],-1!=a){if(void 0===a)throw new Error("Illegal character at offset "+e);n|=a,++o>=2?(r[r.length]=n,n=0,o=0):n<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return r}},_={decode:function(t){var e;if(void 0===M){var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s="= \f\n\r\t \u2028\u2029";for(M=Object.create(null),e=0;e<64;++e)M[i.charAt(e)]=e;for(M["-"]=62,M["_"]=63,e=0;e<s.length;++e)M[s.charAt(e)]=-1}var r=[],n=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(a=M[a],-1!=a){if(void 0===a)throw new Error("Illegal character at offset "+e);n|=a,++o>=4?(r[r.length]=n>>16,r[r.length]=n>>8&255,r[r.length]=255&n,n=0,o=0):n<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=n>>10;break;case 3:r[r.length]=n>>16,r[r.length]=n>>8&255;break}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=_.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return _.decode(t)}},H=1e13,q=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var i,s,r=this.buf,n=r.length;for(i=0;i<n;++i)s=r[i]*t+e,s<H?e=0:(e=0|s/H,s-=e*H),r[i]=s;e>0&&(r[i]=e)},t.prototype.sub=function(t){var e,i,s=this.buf,r=s.length;for(e=0;e<r;++e)i=s[e]-t,i<0?(i+=H,t=1):t=0,s[e]=i;while(0===s[s.length-1])s.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,i=e[e.length-1].toString(),s=e.length-2;s>=0;--s)i+=(H+e[s]).toString().substring(1);return i},t.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;i>=0;--i)e=e*H+t[i];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),F="…",U=/^(\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)?)?$/,$=/^(\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 K(t,e){return t.length>e&&(t=t.substring(0,e)+F),t}var z,Y=function(){function t(e,i){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=i)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"===typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,i){for(var s="",r=t;r<e;++r)if(s+=this.hexByte(this.get(r)),!0!==i)switch(15&r){case 7:s+=" ";break;case 15:s+="\n";break;default:s+=" "}return s},t.prototype.isASCII=function(t,e){for(var i=t;i<e;++i){var s=this.get(i);if(s<32||s>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var i="",s=t;s<e;++s)i+=String.fromCharCode(this.get(s));return i},t.prototype.parseStringUTF=function(t,e){for(var i="",s=t;s<e;){var r=this.get(s++);i+=r<128?String.fromCharCode(r):r>191&&r<224?String.fromCharCode((31&r)<<6|63&this.get(s++)):String.fromCharCode((15&r)<<12|(63&this.get(s++))<<6|63&this.get(s++))}return i},t.prototype.parseStringBMP=function(t,e){for(var i,s,r="",n=t;n<e;)i=this.get(n++),s=this.get(n++),r+=String.fromCharCode(i<<8|s);return r},t.prototype.parseTime=function(t,e,i){var s=this.parseStringISO(t,e),r=(i?U:$).exec(s);return r?(i&&(r[1]=+r[1],r[1]+=+r[1]<70?2e3:1900),s=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(s+=":"+r[5],r[6]&&(s+=":"+r[6],r[7]&&(s+="."+r[7]))),r[8]&&(s+=" UTC","Z"!=r[8]&&(s+=r[8],r[9]&&(s+=":"+r[9]))),s):"Unrecognized time: "+s},t.prototype.parseInteger=function(t,e){var i,s=this.get(t),r=s>127,n=r?255:0,o="";while(s==n&&++t<e)s=this.get(t);if(i=e-t,0===i)return r?-1:0;if(i>4){o=s,i<<=3;while(0==(128&(+o^n)))o=+o<<1,--i;o="("+i+" bit)\n"}r&&(s-=256);for(var a=new q(s),h=t+1;h<e;++h)a.mulAdd(256,this.get(h));return o+a.toString()},t.prototype.parseBitString=function(t,e,i){for(var s=this.get(t),r=(e-t-1<<3)-s,n="("+r+" bit)\n",o="",a=t+1;a<e;++a){for(var h=this.get(a),u=a==e-1?s:0,c=7;c>=u;--c)o+=h>>c&1?"1":"0";if(o.length>i)return n+K(o,i)}return n+o},t.prototype.parseOctetString=function(t,e,i){if(this.isASCII(t,e))return K(this.parseStringISO(t,e),i);var s=e-t,r="("+s+" byte)\n";i/=2,s>i&&(e=t+i);for(var n=t;n<e;++n)r+=this.hexByte(this.get(n));return s>i&&(r+=F),r},t.prototype.parseOID=function(t,e,i){for(var s="",r=new q,n=0,o=t;o<e;++o){var a=this.get(o);if(r.mulAdd(128,127&a),n+=7,!(128&a)){if(""===s)if(r=r.simplify(),r instanceof q)r.sub(80),s="2."+r.toString();else{var h=r<80?r<40?0:1:2;s=h+"."+(r-40*h)}else s+="."+r.toString();if(s.length>i)return K(s,i);r=new q,n=0}}return n>0&&(s+=".incomplete"),s},t}(),Z=function(){function t(t,e,i,s,r){if(!(s instanceof X))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=i,this.tag=s,this.sub=r}return t.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()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),i=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"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 null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return K(this.stream.parseStringUTF(e,e+i),t);case 18:case 19:case 20:case 21:case 22:case 26:return K(this.stream.parseStringISO(e,e+i),t);case 30:return K(this.stream.parseStringBMP(e,e+i),t);case 23:case 24:return this.stream.parseTime(e,e+i,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(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()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var i=0,s=this.sub.length;i<s;++i)e+=this.sub[i].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.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(0===i)return null;e=0;for(var s=0;s<i;++s)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,i=2*this.length;return t.substr(e,i)},t.decode=function(e){var i;i=e instanceof Y?e:new Y(e,0);var s=new Y(i),r=new X(i),n=t.decodeLength(i),o=i.pos,a=o-s.pos,h=null,u=function(){var e=[];if(null!==n){var s=o+n;while(i.pos<s)e[e.length]=t.decode(i);if(i.pos!=s)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var r=t.decode(i);if(r.tag.isEOC())break;e[e.length]=r}n=o-i.pos}catch(a){throw new Error("Exception while decoding undefined length content: "+a)}return e};if(r.tagConstructed)h=u();else if(r.isUniversal()&&(3==r.tagNumber||4==r.tagNumber))try{if(3==r.tagNumber&&0!=i.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=u();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(l){h=null}if(null===h){if(null===n)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);i.pos=o+Math.abs(n)}return new t(s,a,n,r,h)},t}(),X=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!==(32&e),this.tagNumber=31&e,31==this.tagNumber){var i=new q;do{e=t.get(),i.mulAdd(128,127&e)}while(128&e);this.tagNumber=i.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),G=0xdeadbeefcafe,W=15715070==(16777215&G),J=[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],Q=(1<<26)/J[J.length-1],tt=function(){function t(t,e,i){null!=t&&("number"==typeof t?this.fromNumber(t,e,i):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(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 i,s=(1<<e)-1,r=!1,n="",o=this.t,a=this.DB-o*this.DB%e;if(o-- >0){a<this.DB&&(i=this[o]>>a)>0&&(r=!0,n=D(i));while(o>=0)a<e?(i=(this[o]&(1<<a)-1)<<e-a,i|=this[--o]>>(a+=this.DB-e)):(i=this[o]>>(a-=e)&s,a<=0&&(a+=this.DB,--o)),i>0&&(r=!0),r&&(n+=D(i))}return r?n:"0"},t.prototype.negate=function(){var e=nt();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(e=i-t.t,0!=e)return this.s<0?-e:e;while(--i>=0)if(0!=(e=this[i]-t[i]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+dt(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var i=nt();return this.abs().divRemTo(e,null,i),this.s<0&&i.compareTo(t.ZERO)>0&&e.subTo(i,i),i},t.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new it(e):new st(e),this.exp(t,i)},t.prototype.clone=function(){var t=nt();return this.copyTo(t),t},t.prototype.intValue=function(){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]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i,s=this.DB-t*this.DB%8,r=0;if(t-- >0){s<this.DB&&(i=this[t]>>s)!=(this.s&this.DM)>>s&&(e[r++]=i|this.s<<this.DB-s);while(t>=0)s<8?(i=(this[t]&(1<<s)-1)<<8-s,i|=this[--t]>>(s+=this.DB-8)):(i=this[t]>>(s-=8)&255,s<=0&&(s+=this.DB,--t)),0!=(128&i)&&(i|=-256),0==r&&(128&this.s)!=(128&i)&&++r,(r>0||i!=this.s)&&(e[r++]=i)}return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=nt();return this.bitwiseTo(t,R,e),e},t.prototype.or=function(t){var e=nt();return this.bitwiseTo(t,B,e),e},t.prototype.xor=function(t){var e=nt();return this.bitwiseTo(t,V,e),e},t.prototype.andNot=function(t){var e=nt();return this.bitwiseTo(t,O,e),e},t.prototype.not=function(){for(var t=nt(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=nt();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=nt();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+A(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=C(this[i]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,B)},t.prototype.clearBit=function(t){return this.changeBit(t,O)},t.prototype.flipBit=function(t){return this.changeBit(t,V)},t.prototype.add=function(t){var e=nt();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=nt();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=nt();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=nt();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=nt();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=nt(),i=nt();return this.divRemTo(t,e,i),[e,i]},t.prototype.modPow=function(t,e){var i,s,r=t.bitLength(),n=pt(1);if(r<=0)return n;i=r<18?1:r<48?3:r<144?4:r<768?5:6,s=r<8?new it(e):e.isEven()?new rt(e):new st(e);var o=[],a=3,h=i-1,u=(1<<i)-1;if(o[1]=s.convert(this),i>1){var c=nt();s.sqrTo(o[1],c);while(a<=u)o[a]=nt(),s.mulTo(c,o[a-2],o[a]),a+=2}var l,f,p=t.t-1,d=!0,g=nt();r=dt(t[p])-1;while(p>=0){r>=h?l=t[p]>>r-h&u:(l=(t[p]&(1<<r+1)-1)<<h-r,p>0&&(l|=t[p-1]>>this.DB+r-h)),a=i;while(0==(1&l))l>>=1,--a;if((r-=a)<0&&(r+=this.DB,--p),d)o[l].copyTo(n),d=!1;else{while(a>1)s.sqrTo(n,g),s.sqrTo(g,n),a-=2;a>0?s.sqrTo(n,g):(f=n,n=g,g=f),s.mulTo(g,o[l],n)}while(p>=0&&0==(t[p]&1<<r))s.sqrTo(n,g),f=n,n=g,g=f,--r<0&&(r=this.DB-1,--p)}return s.revert(n)},t.prototype.modInverse=function(e){var i=e.isEven();if(this.isEven()&&i||0==e.signum())return t.ZERO;var s=e.clone(),r=this.clone(),n=pt(1),o=pt(0),a=pt(0),h=pt(1);while(0!=s.signum()){while(s.isEven())s.rShiftTo(1,s),i?(n.isEven()&&o.isEven()||(n.addTo(this,n),o.subTo(e,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);while(r.isEven())r.rShiftTo(1,r),i?(a.isEven()&&h.isEven()||(a.addTo(this,a),h.subTo(e,h)),a.rShiftTo(1,a)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);s.compareTo(r)>=0?(s.subTo(r,s),i&&n.subTo(a,n),o.subTo(h,o)):(r.subTo(s,r),i&&a.subTo(n,a),h.subTo(o,h))}return 0!=r.compareTo(t.ONE)?t.ZERO:h.compareTo(e)>=0?h.subtract(e):h.signum()<0?(h.addTo(e,h),h.signum()<0?h.add(e):h):h},t.prototype.pow=function(t){return this.exp(t,new et)},t.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 s=e;e=i,i=s}var r=e.getLowestSetBit(),n=i.getLowestSetBit();if(n<0)return e;r<n&&(n=r),n>0&&(e.rShiftTo(n,e),i.rShiftTo(n,i));while(e.signum()>0)(r=e.getLowestSetBit())>0&&e.rShiftTo(r,e),(r=i.getLowestSetBit())>0&&i.rShiftTo(r,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return n>0&&i.lShiftTo(n,i),i},t.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=J[J.length-1]){for(e=0;e<J.length;++e)if(i[0]==J[e])return!0;return!1}if(i.isEven())return!1;e=1;while(e<J.length){var s=J[e],r=e+1;while(r<J.length&&s<Q)s*=J[r++];s=i.modInt(s);while(e<r)if(s%J[e++]==0)return!1}return i.millerRabin(t)},t.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},t.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},t.prototype.fromString=function(e,i){var s;if(16==i)s=4;else if(8==i)s=3;else if(256==i)s=8;else if(2==i)s=1;else if(32==i)s=5;else{if(4!=i)return void this.fromRadix(e,i);s=2}this.t=0,this.s=0;var r=e.length,n=!1,o=0;while(--r>=0){var a=8==s?255&+e[r]:ft(e,r);a<0?"-"==e.charAt(r)&&(n=!0):(n=!1,0==o?this[this.t++]=a:o+s>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+=s,o>=this.DB&&(o-=this.DB))}8==s&&0!=(128&+e[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),n&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){var t=this.s&this.DM;while(this.t>0&&this[this.t-1]==t)--this.t},t.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},t.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},t.prototype.lShiftTo=function(t,e){for(var i=t%this.DB,s=this.DB-i,r=(1<<s)-1,n=Math.floor(t/this.DB),o=this.s<<i&this.DM,a=this.t-1;a>=0;--a)e[a+n+1]=this[a]>>s|o,o=(this[a]&r)<<i;for(a=n-1;a>=0;--a)e[a]=0;e[n]=o,e.t=this.t+n+1,e.s=this.s,e.clamp()},t.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 s=t%this.DB,r=this.DB-s,n=(1<<s)-1;e[0]=this[i]>>s;for(var o=i+1;o<this.t;++o)e[o-i-1]|=(this[o]&n)<<r,e[o-i]=this[o]>>s;s>0&&(e[this.t-i-1]|=(this.s&n)<<r),e.t=this.t-i,e.clamp()}},t.prototype.subTo=function(t,e){var i=0,s=0,r=Math.min(t.t,this.t);while(i<r)s+=this[i]-t[i],e[i++]=s&this.DM,s>>=this.DB;if(t.t<this.t){s-=t.s;while(i<this.t)s+=this[i],e[i++]=s&this.DM,s>>=this.DB;s+=this.s}else{s+=this.s;while(i<t.t)s-=t[i],e[i++]=s&this.DM,s>>=this.DB;s-=t.s}e.s=s<0?-1:0,s<-1?e[i++]=this.DV+s:s>0&&(e[i++]=s),e.t=i,e.clamp()},t.prototype.multiplyTo=function(e,i){var s=this.abs(),r=e.abs(),n=s.t;i.t=n+r.t;while(--n>=0)i[n]=0;for(n=0;n<r.t;++n)i[n+s.t]=s.am(0,r[n],i,n,0,s.t);i.s=0,i.clamp(),this.s!=e.s&&t.ZERO.subTo(i,i)},t.prototype.squareTo=function(t){var e=this.abs(),i=t.t=2*e.t;while(--i>=0)t[i]=0;for(i=0;i<e.t-1;++i){var s=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,s,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()},t.prototype.divRemTo=function(e,i,s){var r=e.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t)return null!=i&&i.fromInt(0),void(null!=s&&this.copyTo(s));null==s&&(s=nt());var o=nt(),a=this.s,h=e.s,u=this.DB-dt(r[r.t-1]);u>0?(r.lShiftTo(u,o),n.lShiftTo(u,s)):(r.copyTo(o),n.copyTo(s));var c=o.t,l=o[c-1];if(0!=l){var f=l*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),p=this.FV/f,d=(1<<this.F1)/f,g=1<<this.F2,v=s.t,m=v-c,y=null==i?nt():i;o.dlShiftTo(m,y),s.compareTo(y)>=0&&(s[s.t++]=1,s.subTo(y,s)),t.ONE.dlShiftTo(c,y),y.subTo(o,o);while(o.t<c)o[o.t++]=0;while(--m>=0){var b=s[--v]==l?this.DM:Math.floor(s[v]*p+(s[v-1]+g)*d);if((s[v]+=o.am(0,b,s,m,0,c))<b){o.dlShiftTo(m,y),s.subTo(y,s);while(s[v]<--b)s.subTo(y,s)}}null!=i&&(s.drShiftTo(c,i),a!=h&&t.ZERO.subTo(i,i)),s.t=c,s.clamp(),u>0&&s.rShiftTo(u,s),a<0&&t.ZERO.subTo(s,s)}}},t.prototype.invDigit=function(){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},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,i){if(e>4294967295||e<1)return t.ONE;var s=nt(),r=nt(),n=i.convert(this),o=dt(e)-1;n.copyTo(s);while(--o>=0)if(i.sqrTo(s,r),(e&1<<o)>0)i.mulTo(r,n,s);else{var a=s;s=r,r=a}return i.revert(s)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),s=pt(i),r=nt(),n=nt(),o="";this.divRemTo(s,r,n);while(r.signum()>0)o=(i+n.intValue()).toString(t).substr(1)+o,r.divRemTo(s,r,n);return n.intValue().toString(t)+o},t.prototype.fromRadix=function(e,i){this.fromInt(0),null==i&&(i=10);for(var s=this.chunkSize(i),r=Math.pow(i,s),n=!1,o=0,a=0,h=0;h<e.length;++h){var u=ft(e,h);u<0?"-"==e.charAt(h)&&0==this.signum()&&(n=!0):(a=i*a+u,++o>=s&&(this.dMultiply(r),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(i,o)),this.dAddOffset(a,0)),n&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,i,s){if("number"==typeof i)if(e<2)this.fromInt(1);else{this.fromNumber(e,s),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),B,this),this.isEven()&&this.dAddOffset(1,0);while(!this.isProbablePrime(i))this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this)}else{var r=[],n=7&e;r.length=1+(e>>3),i.nextBytes(r),n>0?r[0]&=(1<<n)-1:r[0]=0,this.fromString(r,256)}},t.prototype.bitwiseTo=function(t,e,i){var s,r,n=Math.min(t.t,this.t);for(s=0;s<n;++s)i[s]=e(this[s],t[s]);if(t.t<this.t){for(r=t.s&this.DM,s=n;s<this.t;++s)i[s]=e(this[s],r);i.t=this.t}else{for(r=this.s&this.DM,s=n;s<t.t;++s)i[s]=e(r,t[s]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},t.prototype.changeBit=function(e,i){var s=t.ONE.shiftLeft(e);return this.bitwiseTo(s,i,s),s},t.prototype.addTo=function(t,e){var i=0,s=0,r=Math.min(t.t,this.t);while(i<r)s+=this[i]+t[i],e[i++]=s&this.DM,s>>=this.DB;if(t.t<this.t){s+=t.s;while(i<this.t)s+=this[i],e[i++]=s&this.DM,s>>=this.DB;s+=this.s}else{s+=this.s;while(i<t.t)s+=t[i],e[i++]=s&this.DM,s>>=this.DB;s+=t.s}e.s=s<0?-1:0,s>0?e[i++]=s:s<-1&&(e[i++]=this.DV+s),e.t=i,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){while(this.t<=e)this[this.t++]=0;this[e]+=t;while(this[e]>=this.DV)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,i){var s=Math.min(this.t+t.t,e);i.s=0,i.t=s;while(s>0)i[--s]=0;for(var r=i.t-this.t;s<r;++s)i[s+this.t]=this.am(0,t[s],i,s,0,this.t);for(r=Math.min(t.t,e);s<r;++s)this.am(0,t[s],i,s,0,e-s);i.clamp()},t.prototype.multiplyUpperTo=function(t,e,i){--e;var s=i.t=this.t+t.t-e;i.s=0;while(--s>=0)i[s]=0;for(s=Math.max(e-this.t,0);s<t.t;++s)i[this.t+s-e]=this.am(e-s,t[s],i,0,0,this.t+s-e);i.clamp(),i.drShiftTo(1,i)},t.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(0==e)i=this[0]%t;else for(var s=this.t-1;s>=0;--s)i=(e*i+this[s])%t;return i},t.prototype.millerRabin=function(e){var i=this.subtract(t.ONE),s=i.getLowestSetBit();if(s<=0)return!1;var r=i.shiftRight(s);e=e+1>>1,e>J.length&&(e=J.length);for(var n=nt(),o=0;o<e;++o){n.fromInt(J[Math.floor(Math.random()*J.length)]);var a=n.modPow(r,this);if(0!=a.compareTo(t.ONE)&&0!=a.compareTo(i)){var h=1;while(h++<s&&0!=a.compareTo(i))if(a=a.modPowInt(2,this),0==a.compareTo(t.ONE))return!1;if(0!=a.compareTo(i))return!1}}return!0},t.prototype.square=function(){var t=nt();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var i=this.s<0?this.negate():this.clone(),s=t.s<0?t.negate():t.clone();if(i.compareTo(s)<0){var r=i;i=s,s=r}var n=i.getLowestSetBit(),o=s.getLowestSetBit();if(o<0)e(i);else{n<o&&(o=n),o>0&&(i.rShiftTo(o,i),s.rShiftTo(o,s));var a=function(){(n=i.getLowestSetBit())>0&&i.rShiftTo(n,i),(n=s.getLowestSetBit())>0&&s.rShiftTo(n,s),i.compareTo(s)>=0?(i.subTo(s,i),i.rShiftTo(1,i)):(s.subTo(i,s),s.rShiftTo(1,s)),i.signum()>0?setTimeout(a,0):(o>0&&s.lShiftTo(o,s),setTimeout((function(){e(s)}),0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,i,s,r){if("number"==typeof i)if(e<2)this.fromInt(1);else{this.fromNumber(e,s),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),B,this),this.isEven()&&this.dAddOffset(1,0);var n=this,o=function(){n.dAddOffset(2,0),n.bitLength()>e&&n.subTo(t.ONE.shiftLeft(e-1),n),n.isProbablePrime(i)?setTimeout((function(){r()}),0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],h=7&e;a.length=1+(e>>3),i.nextBytes(a),h>0?a[0]&=(1<<h)-1:a[0]=0,this.fromString(a,256)}},t}(),et=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),it=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),st=function(){function t(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 t.prototype.convert=function(t){var e=nt();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(tt.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=nt();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){while(t.t<=this.mt2)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],s=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;i=e+this.m.t,t[i]+=this.m.am(0,s,t,e,0,this.m.t);while(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)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),rt=function(){function t(t){this.m=t,this.r2=nt(),this.q3=nt(),tt.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.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=nt();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){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);while(t.compareTo(this.r2)<0)t.dAddOffset(1,this.m.t+1);t.subTo(this.r2,t);while(t.compareTo(this.m)>=0)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function nt(){return new tt(null)}function ot(t,e){return new tt(t,e)}var at="undefined"!==typeof navigator;at&&W&&"Microsoft Internet Explorer"==navigator.appName?(tt.prototype.am=function(t,e,i,s,r,n){var o=32767&e,a=e>>15;while(--n>=0){var h=32767&this[t],u=this[t++]>>15,c=a*h+u*o;h=o*h+((32767&c)<<15)+i[s]+(1073741823&r),r=(h>>>30)+(c>>>15)+a*u+(r>>>30),i[s++]=1073741823&h}return r},z=30):at&&W&&"Netscape"!=navigator.appName?(tt.prototype.am=function(t,e,i,s,r,n){while(--n>=0){var o=e*this[t++]+i[s]+r;r=Math.floor(o/67108864),i[s++]=67108863&o}return r},z=26):(tt.prototype.am=function(t,e,i,s,r,n){var o=16383&e,a=e>>14;while(--n>=0){var h=16383&this[t],u=this[t++]>>14,c=a*h+u*o;h=o*h+((16383&c)<<14)+i[s]+r,r=(h>>28)+(c>>14)+a*u,i[s++]=268435455&h}return r},z=28),tt.prototype.DB=z,tt.prototype.DM=(1<<z)-1,tt.prototype.DV=1<<z;var ht=52;tt.prototype.FV=Math.pow(2,ht),tt.prototype.F1=ht-z,tt.prototype.F2=2*z-ht;var ut,ct,lt=[];for(ut="0".charCodeAt(0),ct=0;ct<=9;++ct)lt[ut++]=ct;for(ut="a".charCodeAt(0),ct=10;ct<36;++ct)lt[ut++]=ct;for(ut="A".charCodeAt(0),ct=10;ct<36;++ct)lt[ut++]=ct;function ft(t,e){var i=lt[t.charCodeAt(e)];return null==i?-1:i}function pt(t){var e=nt();return e.fromInt(t),e}function dt(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}tt.ZERO=pt(0),tt.ONE=pt(1);var gt=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,i,s;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,s=this.S[e],this.S[e]=this.S[i],this.S[i]=s;this.i=0,this.j=0},t.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]},t}();function vt(){return new gt}var mt,yt,bt=256,wt=null;if(null==wt){wt=[],yt=0;var St=void 0;if(window.crypto&&window.crypto.getRandomValues){var Tt=new Uint32Array(256);for(window.crypto.getRandomValues(Tt),St=0;St<Tt.length;++St)wt[yt++]=255&Tt[St]}var Et=0,xt=function(t){if(Et=Et||0,Et>=256||yt>=bt)window.removeEventListener?window.removeEventListener("mousemove",xt,!1):window.detachEvent&&window.detachEvent("onmousemove",xt);else try{var e=t.x+t.y;wt[yt++]=255&e,Et+=1}catch(i){}};window.addEventListener?window.addEventListener("mousemove",xt,!1):window.attachEvent&&window.attachEvent("onmousemove",xt)}function Dt(){if(null==mt){mt=vt();while(yt<bt){var t=Math.floor(65536*Math.random());wt[yt++]=255&t}for(mt.init(wt),yt=0;yt<wt.length;++yt)wt[yt]=0;yt=0}return mt.next()}var Rt=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Dt()},t}();function Bt(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var i=e-t.length-6,s="",r=0;r<i;r+=2)s+="ff";var n="0001"+s+"00"+t;return ot(n,16)}function Vt(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;var i=[],s=t.length-1;while(s>=0&&e>0){var r=t.charCodeAt(s--);r<128?i[--e]=r:r>127&&r<2048?(i[--e]=63&r|128,i[--e]=r>>6|192):(i[--e]=63&r|128,i[--e]=r>>6&63|128,i[--e]=r>>12|224)}i[--e]=0;var n=new Rt,o=[];while(e>2){o[0]=0;while(0==o[0])n.nextBytes(o);i[--e]=o[0]}return i[--e]=2,i[--e]=0,new tt(i)}var Ot=function(){function t(){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 t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);while(e.compareTo(i)<0)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=ot(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,i=Vt(t,e);if(null==i)return null;var s=this.doPublic(i);if(null==s)return null;for(var r=s.toString(16),n=r.length,o=0;o<2*e-n;o++)r="0"+r;return r},t.prototype.setPrivate=function(t,e,i){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=ot(t,16),this.e=parseInt(e,16),this.d=ot(i,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,i,s,r,n,o,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=ot(t,16),this.e=parseInt(e,16),this.d=ot(i,16),this.p=ot(s,16),this.q=ot(r,16),this.dmp1=ot(n,16),this.dmq1=ot(o,16),this.coeff=ot(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var i=new Rt,s=t>>1;this.e=parseInt(e,16);for(var r=new tt(e,16);;){for(;;)if(this.p=new tt(t-s,1,i),0==this.p.subtract(tt.ONE).gcd(r).compareTo(tt.ONE)&&this.p.isProbablePrime(10))break;for(;;)if(this.q=new tt(s,1,i),0==this.q.subtract(tt.ONE).gcd(r).compareTo(tt.ONE)&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract(tt.ONE),a=this.q.subtract(tt.ONE),h=o.multiply(a);if(0==h.gcd(r).compareTo(tt.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=ot(t,16),i=this.doPrivate(e);return null==i?null:At(i,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,i){var s=new Rt,r=t>>1;this.e=parseInt(e,16);var n=new tt(e,16),o=this,a=function(){var e=function(){if(o.p.compareTo(o.q)<=0){var t=o.p;o.p=o.q,o.q=t}var e=o.p.subtract(tt.ONE),s=o.q.subtract(tt.ONE),r=e.multiply(s);0==r.gcd(n).compareTo(tt.ONE)?(o.n=o.p.multiply(o.q),o.d=n.modInverse(r),o.dmp1=o.d.mod(e),o.dmq1=o.d.mod(s),o.coeff=o.q.modInverse(o.p),setTimeout((function(){i()}),0)):setTimeout(a,0)},h=function(){o.q=nt(),o.q.fromNumberAsync(r,1,s,(function(){o.q.subtract(tt.ONE).gcda(n,(function(t){0==t.compareTo(tt.ONE)&&o.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(h,0)}))}))},u=function(){o.p=nt(),o.p.fromNumberAsync(t-r,1,s,(function(){o.p.subtract(tt.ONE).gcda(n,(function(t){0==t.compareTo(tt.ONE)&&o.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(u,0)}))}))};setTimeout(u,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,i){var s=kt(i),r=s+e(t).toString(),n=Bt(r,this.n.bitLength()/4);if(null==n)return null;var o=this.doPrivate(n);if(null==o)return null;var a=o.toString(16);return 0==(1&a.length)?a:"0"+a},t.prototype.verify=function(t,e,i){var s=ot(e,16),r=this.doPublic(s);if(null==r)return null;var n=r.toString(16).replace(/^1f+00/,""),o=jt(n);return o==i(t).toString()},t}();function At(t,e){var i=t.toByteArray(),s=0;while(s<i.length&&0==i[s])++s;if(i.length-s!=e-1||2!=i[s])return null;++s;while(0!=i[s])if(++s>=i.length)return null;var r="";while(++s<i.length){var n=255&i[s];n<128?r+=String.fromCharCode(n):n>191&&n<224?(r+=String.fromCharCode((31&n)<<6|63&i[s+1]),++s):(r+=String.fromCharCode((15&n)<<12|(63&i[s+1])<<6|63&i[s+2]),s+=2)}return r}var Ct={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function kt(t){return Ct[t]||""}function jt(t){for(var e in Ct)if(Ct.hasOwnProperty(e)){var i=Ct[e],s=i.length;if(t.substr(0,s)==i)return t.substr(s)}return t}
- /*!
- Copyright (c) 2011, Yahoo! Inc. All rights reserved.
- Code licensed under the BSD License:
- http://developer.yahoo.com/yui/license.html
- version: 2.9.0
- */var It={};It.lang={extend:function(t,e,i){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var s=function(){};if(s.prototype=e.prototype,t.prototype=new s,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),i){var r;for(r in i)t.prototype[r]=i[r];var n=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(n=function(t,e){for(r=0;r<o.length;r+=1){var i=o[r],s=e[i];"function"===typeof s&&s!=Object.prototype[i]&&(t[i]=s)}})}catch(a){}n(t.prototype,i)}}};
- /**
- * @fileOverview
- * @name asn1-1.0.js
- * @author Kenji Urushima kenji.urushima@gmail.com
- * @version asn1 1.0.13 (2017-Jun-02)
- * @since jsrsasign 2.1
- * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
- */
- var Nt={};"undefined"!=typeof Nt.asn1&&Nt.asn1||(Nt.asn1={}),Nt.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 i=e.substr(1),s=i.length;s%2==1?s+=1:e.match(/^[0-7]/)||(s+=2);for(var r="",n=0;n<s;n++)r+="f";var o=new tt(r,16),a=o.xor(t).add(tt.ONE);e=a.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=Nt,i=e.asn1,s=i.DERBoolean,r=i.DERInteger,n=i.DERBitString,o=i.DEROctetString,a=i.DERNull,h=i.DERObjectIdentifier,u=i.DEREnumerated,c=i.DERUTF8String,l=i.DERNumericString,f=i.DERPrintableString,p=i.DERTeletexString,d=i.DERIA5String,g=i.DERUTCTime,v=i.DERGeneralizedTime,m=i.DERSequence,y=i.DERSet,b=i.DERTaggedObject,w=i.ASN1Util.newObject,S=Object.keys(t);if(1!=S.length)throw"key of param shall be only one.";var T=S[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+T+":"))throw"undefined key: "+T;if("bool"==T)return new s(t[T]);if("int"==T)return new r(t[T]);if("bitstr"==T)return new n(t[T]);if("octstr"==T)return new o(t[T]);if("null"==T)return new a(t[T]);if("oid"==T)return new h(t[T]);if("enum"==T)return new u(t[T]);if("utf8str"==T)return new c(t[T]);if("numstr"==T)return new l(t[T]);if("prnstr"==T)return new f(t[T]);if("telstr"==T)return new p(t[T]);if("ia5str"==T)return new d(t[T]);if("utctime"==T)return new g(t[T]);if("gentime"==T)return new v(t[T]);if("seq"==T){for(var E=t[T],x=[],D=0;D<E.length;D++){var R=w(E[D]);x.push(R)}return new m({array:x})}if("set"==T){for(E=t[T],x=[],D=0;D<E.length;D++){R=w(E[D]);x.push(R)}return new y({array:x})}if("tag"==T){var B=t[T];if("[object Array]"===Object.prototype.toString.call(B)&&3==B.length){var V=w(B[2]);return new b({tag:B[0],explicit:B[1],obj:V})}var O={};if(void 0!==B.explicit&&(O.explicit=B.explicit),void 0!==B.tag&&(O.tag=B.tag),void 0===B.obj)throw"obj shall be specified for 'tag'.";return O.obj=w(B.obj),new b(O)}},this.jsonToASN1HEX=function(t){var e=this.newObject(t);return e.getEncodedHex()}},Nt.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",i=parseInt(t.substr(0,2),16),s=Math.floor(i/40),r=i%40,n=(e=s+"."+r,""),o=2;o<t.length;o+=2){var a=parseInt(t.substr(o,2),16),h=("00000000"+a.toString(2)).slice(-8);if(n+=h.substr(1,7),"0"==h.substr(0,1)){var u=new tt(n,2);e=e+"."+u.toString(10),n=""}}return e},Nt.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},i=function(t){var i="",s=new tt(t,10),r=s.toString(2),n=7-r.length%7;7==n&&(n=0);for(var o="",a=0;a<n;a++)o+="0";r=o+r;for(a=0;a<r.length-1;a+=7){var h=r.substr(a,7);a!=r.length-7&&(h="1"+h),i+=e(parseInt(h,2))}return i};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var s="",r=t.split("."),n=40*parseInt(r[0])+parseInt(r[1]);s+=e(n),r.splice(0,2);for(var o=0;o<r.length;o++)s+=i(r[o]);return s},Nt.asn1.ASN1Object=function(){var t="";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="+t.length+",v="+this.hV;var e=this.hV.length/2,i=e.toString(16);if(i.length%2==1&&(i="0"+i),e<128)return i;var s=i.length/2;if(s>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);var r=128+s;return r.toString(16)+i},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""}},Nt.asn1.DERAbstractString=function(t){Nt.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},"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"]))},It.lang.extend(Nt.asn1.DERAbstractString,Nt.asn1.ASN1Object),Nt.asn1.DERAbstractTime=function(t){Nt.asn1.DERAbstractTime.superclass.constructor.call(this);this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e,i){var s=this.zeroPadding,r=this.localDateToUTC(t),n=String(r.getFullYear());"utc"==e&&(n=n.substr(2,2));var o=s(String(r.getMonth()+1),2),a=s(String(r.getDate()),2),h=s(String(r.getHours()),2),u=s(String(r.getMinutes()),2),c=s(String(r.getSeconds()),2),l=n+o+a+h+u+c;if(!0===i){var f=r.getMilliseconds();if(0!=f){var p=s(String(f),3);p=p.replace(/[0]+$/,""),l=l+"."+p}}return l+"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,s,r,n){var o=new Date(Date.UTC(t,e-1,i,s,r,n,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},It.lang.extend(Nt.asn1.DERAbstractTime,Nt.asn1.ASN1Object),Nt.asn1.DERAbstractStructured=function(t){Nt.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"])},It.lang.extend(Nt.asn1.DERAbstractStructured,Nt.asn1.ASN1Object),Nt.asn1.DERBoolean=function(){Nt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},It.lang.extend(Nt.asn1.DERBoolean,Nt.asn1.ASN1Object),Nt.asn1.DERInteger=function(t){Nt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=Nt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new tt(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"]))},It.lang.extend(Nt.asn1.DERInteger,Nt.asn1.ASN1Object),Nt.asn1.DERBitString=function(t){if(void 0!==t&&"undefined"!==typeof t.obj){var e=Nt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}Nt.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 i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+e},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var e=8-t.length%8;8==e&&(e=0);for(var i=0;i<=e;i++)t+="0";var s="";for(i=0;i<t.length-1;i+=8){var r=t.substr(i,8),n=parseInt(r,2).toString(16);1==n.length&&(n="0"+n),s+=n}this.hTLV=null,this.isModified=!0,this.hV="0"+e+s},this.setByBooleanArray=function(t){for(var e="",i=0;i<t.length;i++)1==t[i]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=!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"]))},It.lang.extend(Nt.asn1.DERBitString,Nt.asn1.ASN1Object),Nt.asn1.DEROctetString=function(t){if(void 0!==t&&"undefined"!==typeof t.obj){var e=Nt.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}Nt.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},It.lang.extend(Nt.asn1.DEROctetString,Nt.asn1.DERAbstractString),Nt.asn1.DERNull=function(){Nt.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},It.lang.extend(Nt.asn1.DERNull,Nt.asn1.ASN1Object),Nt.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},i=function(t){var i="",s=new tt(t,10),r=s.toString(2),n=7-r.length%7;7==n&&(n=0);for(var o="",a=0;a<n;a++)o+="0";r=o+r;for(a=0;a<r.length-1;a+=7){var h=r.substr(a,7);a!=r.length-7&&(h="1"+h),i+=e(parseInt(h,2))}return i};Nt.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 s="",r=t.split("."),n=40*parseInt(r[0])+parseInt(r[1]);s+=e(n),r.splice(0,2);for(var o=0;o<r.length;o++)s+=i(r[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=s},this.setValueName=function(t){var e=Nt.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))},It.lang.extend(Nt.asn1.DERObjectIdentifier,Nt.asn1.ASN1Object),Nt.asn1.DEREnumerated=function(t){Nt.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=Nt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new tt(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"]))},It.lang.extend(Nt.asn1.DEREnumerated,Nt.asn1.ASN1Object),Nt.asn1.DERUTF8String=function(t){Nt.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},It.lang.extend(Nt.asn1.DERUTF8String,Nt.asn1.DERAbstractString),Nt.asn1.DERNumericString=function(t){Nt.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},It.lang.extend(Nt.asn1.DERNumericString,Nt.asn1.DERAbstractString),Nt.asn1.DERPrintableString=function(t){Nt.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},It.lang.extend(Nt.asn1.DERPrintableString,Nt.asn1.DERAbstractString),Nt.asn1.DERTeletexString=function(t){Nt.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},It.lang.extend(Nt.asn1.DERTeletexString,Nt.asn1.DERAbstractString),Nt.asn1.DERIA5String=function(t){Nt.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},It.lang.extend(Nt.asn1.DERIA5String,Nt.asn1.DERAbstractString),Nt.asn1.DERUTCTime=function(t){Nt.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=stohex(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=stohex(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))},It.lang.extend(Nt.asn1.DERUTCTime,Nt.asn1.DERAbstractTime),Nt.asn1.DERGeneralizedTime=function(t){Nt.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=stohex(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=stohex(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))},It.lang.extend(Nt.asn1.DERGeneralizedTime,Nt.asn1.DERAbstractTime),Nt.asn1.DERSequence=function(t){Nt.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){var i=this.asn1Array[e];t+=i.getEncodedHex()}return this.hV=t,this.hV}},It.lang.extend(Nt.asn1.DERSequence,Nt.asn1.DERAbstractStructured),Nt.asn1.DERSet=function(t){Nt.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 i=this.asn1Array[e];t.push(i.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)},It.lang.extend(Nt.asn1.DERSet,Nt.asn1.DERAbstractStructured),Nt.asn1.DERTaggedObject=function(t){Nt.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},"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)))},It.lang.extend(Nt.asn1.DERTaggedObject,Nt.asn1.ASN1Object);var Lt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Mt=function(t){function e(i){var s=t.call(this)||this;return i&&("string"===typeof i?s.parseKey(i):(e.hasPrivateKeyProperty(i)||e.hasPublicKeyProperty(i))&&s.parsePropertiesFrom(i)),s}return Lt(e,t),e.prototype.parseKey=function(t){try{var e=0,i=0,s=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,r=s.test(t)?P.decode(t):_.unarmor(t),n=Z.decode(r);if(3===n.sub.length&&(n=n.sub[2].sub[0]),9===n.sub.length){e=n.sub[1].getHexStringValue(),this.n=ot(e,16),i=n.sub[2].getHexStringValue(),this.e=parseInt(i,16);var o=n.sub[3].getHexStringValue();this.d=ot(o,16);var a=n.sub[4].getHexStringValue();this.p=ot(a,16);var h=n.sub[5].getHexStringValue();this.q=ot(h,16);var u=n.sub[6].getHexStringValue();this.dmp1=ot(u,16);var c=n.sub[7].getHexStringValue();this.dmq1=ot(c,16);var l=n.sub[8].getHexStringValue();this.coeff=ot(l,16)}else{if(2!==n.sub.length)return!1;var f=n.sub[1],p=f.sub[0];e=p.sub[0].getHexStringValue(),this.n=ot(e,16),i=p.sub[1].getHexStringValue(),this.e=parseInt(i,16)}return!0}catch(d){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new Nt.asn1.DERInteger({int:0}),new Nt.asn1.DERInteger({bigint:this.n}),new Nt.asn1.DERInteger({int:this.e}),new Nt.asn1.DERInteger({bigint:this.d}),new Nt.asn1.DERInteger({bigint:this.p}),new Nt.asn1.DERInteger({bigint:this.q}),new Nt.asn1.DERInteger({bigint:this.dmp1}),new Nt.asn1.DERInteger({bigint:this.dmq1}),new Nt.asn1.DERInteger({bigint:this.coeff})]},e=new Nt.asn1.DERSequence(t);return e.getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return N(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new Nt.asn1.DERSequence({array:[new Nt.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new Nt.asn1.DERNull]}),e=new Nt.asn1.DERSequence({array:[new Nt.asn1.DERInteger({bigint:this.n}),new Nt.asn1.DERInteger({int:this.e})]}),i=new Nt.asn1.DERBitString({hex:"00"+e.getEncodedHex()}),s=new Nt.asn1.DERSequence({array:[t,i]});return s.getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return N(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(e=e||64,!t)return t;var i="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(i,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----",t},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----",t},e.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(Ot),Pt=i("a524"),_t=function(){function t(t){void 0===t&&(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 t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Mt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(L(t))}catch(e){return!1}},t.prototype.encrypt=function(t){try{return N(this.getKey().encrypt(t))}catch(e){return!1}},t.prototype.sign=function(t,e,i){try{return N(this.getKey().sign(t,e,i))}catch(s){return!1}},t.prototype.verify=function(t,e,i){try{return this.getKey().verify(t,L(e),i)}catch(s){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new Mt,t&&"[object Function]"==={}.toString.call(t))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},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=Pt.version,t}(),Ht={name:"LoginFrom",data:function(){return{captchaUrl:"",captchaBase64:"",r:"",username:"",password:"",captcha:"",rememberMe:!1,pubkey:"",pubkeyR:""}},created:function(){this.getCaptcha(),this.fetchPubkey()},methods:{encryptPassword:function(t,e,i){var s=new _t;return s.setPublicKey(e),s.encrypt(i+t)},submitLogin:function(){var t=1,e=1,i=this.username,s=this.$options.methods.encryptPassword(this.password,this.pubkey,this.pubkeyR),r=this.captcha,n=this.r,o=this.rememberMe,a={accountType:t,loginType:e,username:i,password:s,captchaCode:r,r:n,rememberMe:o};""!==i?""!==s&&null!==s?""!==r?this.$emit("login",a):alert("captcha 字段不符合要求"):alert("password 字段不符合要求"):alert("username 字段不符合要求")},getCaptcha:function(){this.r=a(10),this.captchaUrl=h(this.r)},fetchPubkey:function(){var t=this;Object(c["a"])().then((function(e){0===e.code?(t.pubkey=e.data.pubkey,t.pubkeyR=e.data.r):(console.log(e.data),alert(e.data))})).catch((function(t){console.error(t.message)}))}}},qt=Ht,Ft=i("b73d"),Ut=Object(p["a"])(qt,T,E,!1,null,null,null),$t=Ut.exports;g()(Ut,{VBtn:v["a"],VCol:m["a"],VRow:y["a"],VSwitch:Ft["a"],VTextField:b["a"]});var Kt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"10"}},[i("v-text-field",{attrs:{placeholder:"请输入邮箱",label:"邮箱",rules:[function(){return null!=t.userRegistry.email||"邮箱不能为空"}],type:"email",clearable:""},on:{blur:t.checkEmail},model:{value:t.userRegistry.email,callback:function(e){t.$set(t.userRegistry,"email",e)},expression:"userRegistry.email"}})],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"10"}},[i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"5"}},[i("v-text-field",{attrs:{placeholder:"请输入邮件验证码",label:"邮件验证码",rules:[function(){return null!=t.userRegistry.regVerifyCode||"邮件验证码不能为空"}],type:"email",clearable:""},model:{value:t.userRegistry.regVerifyCode,callback:function(e){t.$set(t.userRegistry,"regVerifyCode",e)},expression:"userRegistry.regVerifyCode"}})],1),i("v-col",{attrs:{cols:"5"}},[i("v-btn",{attrs:{color:"primary"},on:{click:t.getVerifyCode}},[t._v("获取邮件验证码")])],1)],1)],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"10"}},[i("v-text-field",{attrs:{placeholder:"请输入密码",label:"密码",rules:[function(){return null!=t.userRegistry.password||"密码不能为空"}],clearable:"",type:"password"},model:{value:t.userRegistry.password,callback:function(e){t.$set(t.userRegistry,"password",e)},expression:"userRegistry.password"}})],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-col",{attrs:{cols:"5"}},[i("img",{staticStyle:{cursor:"pointer"},attrs:{src:t.captchaUrl,alt:"验证码",title:"点击刷新"},on:{click:t.getCaptcha}})]),i("v-col",{attrs:{cols:"5"}},[i("v-text-field",{attrs:{placeholder:"验证码",label:"验证码",rules:[function(){return null!=t.userRegistry.captchaCode||"验证码不能为空"}],clearable:""},model:{value:t.userRegistry.captchaCode,callback:function(e){t.$set(t.userRegistry,"captchaCode",e)},expression:"userRegistry.captchaCode"}})],1)],1),i("v-row",{attrs:{justify:"center"}},[i("v-btn",{attrs:{color:"primary"},on:{click:t.submitRegister}},[t._v("注册")])],1)],1)},zt=[],Yt={name:"Register",data:function(){return{captchaUrl:"",captchaBase64:"",showMessage:!1,userRegistry:{regType:1,email:"",password:"",regVerifyCode:"",captchaCode:"",r:""}}},created:function(){this.getCaptcha()},methods:{checkUsername:function(){Object(u["c"])(this.userRegistry.username).then((function(t){0===t.code?console.log(t.msg):alert(t.data)})).catch((function(t){console.error(t.message)}))},selectUsername:function(){Object(u["e"])(this.userRegistry.username).then((function(t){0===t.code?console.log(t.msg):alert(t.data)})).catch((function(t){console.error(t.message)}))},checkEmail:function(){var t=this.userRegistry.email;null!==t&&""!==t&&Object(u["b"])(this.userRegistry.email).then((function(t){0===t.code?console.log(t.msg):alert(t.data)})).catch((function(t){console.error(t.message)}))},submitRegister:function(){var t=/^(([^()[\]\\.,;:\s@\"]+(\.[^()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;t.test(this.userRegistry.email)?""===this.userRegistry.password||this.userRegistry.password.length<6?console.log("password 字段不符合要求"):""!==this.userRegistry.captchaCode?1!==this.$store.state.webInfo.openInvitationRegister||""!==this.userRegistry.invitationCode?this.$emit("register",this.userRegistry):console.log("openInvitationRegister 或 invitationCode 字段不符合要求"):alert("captchaCode 或 username 字段不符合要求"):console.log("email 字段不符合要求")},getCaptcha:function(){var t=a(10);this.userRegistry.r=t,this.captchaUrl=h(t)},getVerifyCode:function(){var t=this.userRegistry.email;if(null!=t&&""!==t){var e={};e.receiver=t,e.notifyType=1,Object(u["a"])(e).then((function(t){0===t.code?alert(t.msg):console.error(t.msg)})).catch((function(t){console.error(t.message)}))}else alert("请输入邮箱地址")}}},Zt=Yt,Xt=Object(p["a"])(Zt,Kt,zt,!1,null,null,null),Gt=Xt.exports;g()(Xt,{VBtn:v["a"],VCol:m["a"],VRow:y["a"],VTextField:b["a"]});var Wt={name:"Login",components:{LoginFormMobile:S,LoginFormPassword:$t,RegisterForm:Gt},data:function(){return{captchaUrl:"",r:"",user:{},type:"登录",moveMessage:"没有账号,创建账号",showLogin:!0,showLogin1:!1,message:"",showMessage:!1}},created:function(){},methods:{userLogin:function(t){var e=this;this.$store.dispatch("user/login",t).then((function(){e.$router.push("/")})).catch((function(){}))},userRegister:function(t){var e=this;this.$store.dispatch("user/register",t).then((function(){e.message="注册成功,即将为你跳转到登录页面!",e.showMessage=!0,e.moveRegister()})).catch((function(){alert("用户注册失败")}))},moveRegister:function(){"登录"===this.type?this.type="注册":this.type="登录","没有账号,创建账号"===this.moveMessage?this.moveMessage="已有账号,我要登录":this.moveMessage="没有账号,创建账号",this.showLogin=!this.showLogin},backHome:function(){this.$router.push("/")}}},Jt=Wt,Qt=i("b0af"),te=i("a523"),ee=i("132d"),ie=i("f6c4"),se=i("2db4"),re=Object(p["a"])(Jt,s,r,!1,null,null,null);e["default"]=re.exports;g()(re,{VBtn:v["a"],VCard:Qt["a"],VCol:m["a"],VContainer:te["a"],VIcon:ee["a"],VMain:ie["a"],VRow:y["a"],VSnackbar:se["a"]})},ec29:function(t,e,i){},f6c4:function(t,e,i){"use strict";i("bd0c");var s=i("d10f");e["a"]=s["a"].extend({name:"v-main",props:{tag:{type:String,default:"main"}},computed:{styles(){const{bar:t,top:e,right:i,footer:s,insetFooter:r,bottom:n,left:o}=this.$vuetify.application;return{paddingTop:e+t+"px",paddingRight:i+"px",paddingBottom:s+r+n+"px",paddingLeft:o+"px"}}},render(t){const e={staticClass:"v-main",style:this.styles,ref:"main"};return t(this.tag,e,[t("div",{staticClass:"v-main__wrap"},this.$slots.default)])}})}}]);
|