PageSourceSearch

https://fhs6qk607kybxk8d.qvc.jp/cdn/assets/js/sess30443196.js

js qvc.jp collected 2026-09-24 09:18:09 UTC 360,406 bytes, 37 lines download raw bytes

1/**
2 * @preserve
3 * @version 1.1.0+9596261
4 */(function(){"use strict";class it extends Error{constructor(e){super(`Invalid client context. ${e}`),this.name="InvalidClientContextError"}}const st={config:"data-omoti-cfg",collectorKey:"data-omoti-key",companyCode:"data-omoti-code"},ln=t=>{try{const e=atob(t),r=Uint8Array.from(e,v=>v.charCodeAt(0)),l=JSON.parse(new TextDecoder().decode(r));if(!(v=>{if(!v||typeof v!="object")return!1;const f=v;if(typeof f.collectorKey!="string"||!f.collectorKey||typeof f.eventId!="string"||!/^(?!00)\d{2}$/.test(f.eventId)||!f.hash||typeof f.hash!="object"||typeof f.hash.enabled!="boolean")return!1;if(f.hash.enabled){if(typeof f.hash.salt!="string"||!f.hash.salt)return!1}else if(f.hash.salt!==void 0&&typeof f.hash.salt!="string")return!1;return!0})(l))throw new it("schema validation failed");return l}catch(e){throw e instanceof it?e:new it(`Invalid: ${st.config}`)}},un=({customizedEventId:t}={})=>{const e=document.querySelector(`[${st.config}], [${st.collectorKey}]`);if(!e)throw new it(`Missing or invalid: ${st.config} or ${st.collectorKey}`);if(e.tagName.toLowerCase()!=="script")throw new it("Invalid tag: expected <script>");const r=e.getAttribute("src");if(!r)throw new it("Missing attribute: src");let l;try{l=new URL(r).origin}catch{throw new it("Invalid: src attribute")}const C=e.getAttribute(st.config);if(C){const a=ln(C);return{collectorUrl:l,collectorKey:a.collectorKey,eventId:t??a.eventId,hash:a.hash}}if(!t)throw new it("Missing eventId");const v=e.getAttribute(st.collectorKey)??void 0;if(!v)throw new it(`Missing attribute: ${st.collectorKey}`);const f=e.getAttribute(st.companyCode)??void 0;if(!f)throw new it(`Missing attribute: ${st.companyCode}`);return{collectorUrl:l,collectorKey:v,eventId:t,hash:{enabled:!0,salt:f}}};class cn{}const fn=Symbol("ENV_PICKED"),hn=t=>({...t.prod?t.prod:{},[fn]:!0}),dn=t=>t,pn="30443196";class gn extends cn{constructor(){super(...arguments),this.encryptPublicKey=()=>dn("-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh2suqRJ2LtzPTda+iF1I\\nKmZ5dmHvTdzqTkjFabyN6fgD5iNOqT8rh7tzJfNGD5TJUO+N4xi3Qrml2LVABdjd\\nVswn53I8BFe72rXA0aViOY8OHDevp9sA/uCoydetzc6taxOxmNm80D04ckcLsPD4\\nAeRlHPC5BKd+BFbnYpGni9A1lm3acagKtvYg+G1fmbT/gB6uQJ6gKhjj04J8p9De\\npfk+GraJ2ncW1HPT9/uM1Ibe2lJP8VjqFL56RHvFI8eDQC06N/unoZJw10PaCJa4\\nmUu9xrTzp1EH68ZoTxL8t7OM74UHLPnU5PT8TOT7OzYaskVMLNJAEiLxE/Qfnb5z\\ndQIDAQAB\\n-----END PUBLIC KEY-----"),this.storageKey=pn,this.useJQuery=!1,this.companyType="SINGLE"}}const vn=t=>t.replace(/^\s+|\s+$/g,""),jr=t=>t!==null&&!!/[^\x01-\x7E]/.exec(t),yn=t=>t.replace(/[!-~]/g,function(r){return String.fromCharCode(r.charCodeAt(0)-65248)}).replace(/”/g,'"').replace(/’/g,"'").replace(/‘/g,"`").replace(/¥/g,"\\").replace(/\u3000/g," ").replace(/〜/g,"~"),Qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",mn=Qr.length,qt=t=>Array.from({length:t},()=>Qr.charAt(Math.floor(Math.random()*mn))).join(""),Cn=t=>jr(t)?encodeURIComponent(t):t;class En{operationCollectionTargets(){return[window]}}const xn=En;class Sn extends xn{getLoginButtons(){return[]}}class Tn{}class In extends Tn{}class An extends In{constructor(){super(...arguments),this.jsFiles={entry:"sess30443196.js",
4notify:"sess30443196_ov.js"},this.hostsConfig=()=>hn({prod:{cookieDomain:".qvc.jp",domainType:"sameOrigin"}})}}class bn extends Sn{getUserIdDom(){return document.querySelector('input[name="email"]')??void 0}getUserId(){const e=this.getUserIdDom()?.value;if(e)return yn(vn(e)).toLowerCase()}getLoginForms(){const e=this.getUserIdDom()?.closest("form");return e?[e]:[]}getPasswordDom(){return document.querySelector('input[name="pw"]')??void 0}getSoftwareKeyboardButton(){}isSubmitCancelableForm(){return!1}getCustomDomEvents(){return[]}}const Bn=[An,bn];function wn(t,e){const[r,l]=Bn,C=new gn,v=new r,f=new l,p={clientContext:un({customizedEventId:v.eventId}),companyCtx:C,companyEventCtx:v,companyFormCtx:f},h=e(p);new t(p,h).init()}var $r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _n(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function l(){var C=!1;try{C=this instanceof l}catch{}return C?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(l){var C=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(r,l,C.get?C:{enumerable:!0,get:function(){return t[l]}})}),r}var Tt={exports:{}},zt,Wr;function Nn(){if(Wr)return zt;Wr=1;function t(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}zt=e;function e(r,l,C){var v=C&&C.stringify||t,f=1;if(typeof r=="object"&&r!==null){var a=l.length+f;if(a===1)return r;var p=new Array(a);p[0]=v(r);for(var h=1;h<a;h++)p[h]=v(l[h]);return p.join(" ")}if(typeof r!="string")return r;var T=l.length;if(T===0)return r;for(var k="",S=1-f,c=-1,m=r&&r.length||0,E=0;E<m;){if(r.charCodeAt(E)===37&&E+1<m){switch(c=c>-1?c:0,r.charCodeAt(E+1)){case 100:case 102:if(S>=T||l[S]==null)break;c<E&&(k+=r.slice(c,E)),k+=Number(l[S]),c=E+2,E++;break;case 105:if(S>=T||l[S]==null)break;c<E&&(k+=r.slice(c,E)),k+=Math.floor(Number(l[S])),c=E+2,E++;break;case 79:case 111:case 106:if(S>=T||l[S]===void 0)break;c<E&&(k+=r.slice(c,E));var x=typeof l[S];if(x==="string"){k+="'"+l[S]+"'",c=E+2,E++;break}if(x==="function"){k+=l[S].name||"<anonymous>",c=E+2,E++;break}k+=v(l[S]),c=E+2,E++;break;case 115:if(S>=T)break;c<E&&(k+=r.slice(c,E)),k+=String(l[S]),c=E+2,E++;break;case 37:c<E&&(k+=r.slice(c,E)),k+="%",c=E+2,E++,S--;break}++S}++E}return c===-1?r:(c<m&&(k+=r.slice(c)),k)}return zt}var Yr;function Rn(){if(Yr)return Tt.exports;Yr=1;const t=Nn();Tt.exports=T;const e=H().console||{},r={mapHttpRequest:i,mapHttpResponse:i,wrapRequestSerializer:n,wrapResponseSerializer:n,wrapErrorSerializer:n,req:i,res:i,err:R,errWithCause:R};function l(F,K){return F==="silent"?1/0:K.levels.values[F]}const C=Symbol("pino.logFuncs"),v=Symbol("pino.hierarchy"),f={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function a(F,K){const q={logger:K,parent:F[v]};K[v]=q}function p(F,K,q){const Q={};K.forEach(j=>{Q[j]=q[j]?q[j]:e[j]||e[f[j]||"log"]||I}),F[C]=Q}function h(F,K){return Array.isArray(F)?F.filter(function(Q){return Q!=="!stdSerializers.err"}):F===!0?Object.keys(K):!1}function T(F){F=F||{},F.browser=F.browser||{};const K=F.browser.transmit;if(K&&typeof K.send!="function")throw Error("pino: transmit option must have a send function");const q=F.browser.write||e;F.browser.write&&(F.browser.asObject=!0);const Q=F.serializers||{},j=h(F.browser.serialize,Q);let ee=F.browser.serialize;Array.isArray(F.browser.serialize)&&F.browser.serialize.indexOf("!stdSerializers.err")>-1&&(ee=!1);const se=Object.keys(F.customLevels||{}),oe=["error","fatal","warn","info","debug","trace"].concat(se);typeof q=="function"&&oe.forEach(function(D){q[D]=q}),(F.enabled===!1||F.browser.disabled)&&(F.level="silent");const fe=F.level||"info",z=Object.create(q);z.log||(z.log=I),p(z,oe,q),a({},z),Object.defineProperty(z,"levelVal",{get:Z}),Object.defineProperty(z,"level",{get:be,set:he});const le={transmit:K,serialize:j,asObject:F.browser.asObject,asObjectBindingsOnly:F.browser.asObjectBindingsOnly,formatters:F.browser.formatters,levels:oe,timestamp:u(F),messageKey:F.messageKey||"msg",onChild:F.onChild||I};z.levels=k(F),z.level=fe,z.isLevelEnabled=function(D){return this.levels.values[D]?this.levels.values[D]>=this.levels.values[this.level]:!1},z.setMaxListeners=z.getMaxListeners=z.emit=z.addListener=z.on=z.prependListener=z.once=z.prepe
4ndOnceListener=z.removeListener=z.removeAllListeners=z.listeners=z.listenerCount=z.eventNames=z.write=z.flush=I,z.serializers=Q,z._serialize=j,z._stdErrSerialize=ee,z.child=function(...D){return d.call(this,le,...D)},K&&(z._logEvent=b());function Z(){return l(this.level,this)}function be(){return this._level}function he(D){if(D!=="silent"&&!this.levels.values[D])throw Error("unknown level "+D);this._level=D,m(this,le,z,"error"),m(this,le,z,"fatal"),m(this,le,z,"warn"),m(this,le,z,"info"),m(this,le,z,"debug"),m(this,le,z,"trace"),se.forEach(_=>{m(this,le,z,_)})}function d(D,_,o){if(!_)throw new Error("missing bindings for child Pino");o=o||{},j&&_.serializers&&(o.serializers=_.serializers);const B=o.serializers;if(j&&B){var V=Object.assign({},Q,B),M=F.browser.serialize===!0?Object.keys(V):j;delete _.serializers,g([_],M,V,this._stdErrSerialize)}function W(ie){this._childLevel=(ie._childLevel|0)+1,this.bindings=_,V&&(this.serializers=V,this._serialize=M),K&&(this._logEvent=b([].concat(ie._logEvent.bindings,_)))}W.prototype=this;const te=new W(this);return a(this,te),te.child=function(...ie){return d.call(this,D,...ie)},te.level=o.level||this.level,D.onChild(te),te}return z}function k(F){const K=F.customLevels||{},q=Object.assign({},T.levels.values,K),Q=Object.assign({},T.levels.labels,S(K));return{values:q,labels:Q}}function S(F){const K={};return Object.keys(F).forEach(function(q){K[F[q]]=q}),K}T.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},T.stdSerializers=r,T.stdTimeFunctions=Object.assign({},{nullTime:N,epochTime:U,unixTime:L,isoTime:O});function c(F){const K=[];F.bindings&&K.push(F.bindings);let q=F[v];for(;q.parent;)q=q.parent,q.logger.bindings&&K.push(q.logger.bindings);return K.reverse()}function m(F,K,q,Q){if(Object.defineProperty(F,Q,{value:l(F.level,q)>l(Q,q)?I:q[C][Q],writable:!0,enumerable:!0,configurable:!0}),F[Q]===I){if(!K.transmit)return;const ee=K.transmit.level||F.level,se=l(ee,q);if(l(Q,q)<se)return}F[Q]=x(F,K,q,Q);const j=c(F);j.length!==0&&(F[Q]=E(j,F[Q]))}function E(F,K){return function(){return K.apply(this,[...F,...arguments])}}function x(F,K,q,Q){return(function(j){return function(){const se=K.timestamp(),oe=new Array(arguments.length),fe=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var z=0;z<oe.length;z++)oe[z]=arguments[z];var le=!1;if(K.serialize&&(g(oe,this._serialize,this.serializers,this._stdErrSerialize),le=!0),K.asObject||K.formatters?j.call(fe,...s(this,Q,oe,se,K)):j.apply(fe,oe),K.transmit){const Z=K.transmit.level||F._level,be=l(Z,q),he=l(Q,q);if(he<be)return;y(this,{ts:se,methodLevel:Q,methodValue:he,transmitValue:q.levels.values[K.transmit.level||F._level],send:K.transmit.send,val:l(F._level,q)},oe,le)}}})(F[C][Q])}function s(F,K,q,Q,j){const{level:ee,log:se=Z=>Z}=j.formatters||{},oe=q.slice();let fe=oe[0];const z={};let le=(F._childLevel|0)+1;if(le<1&&(le=1),Q&&(z.time=Q),ee){const Z=ee(K,F.levels.values[K]);Object.assign(z,Z)}else z.level=F.levels.values[K];if(j.asObjectBindingsOnly){if(fe!==null&&typeof fe=="object")for(;le--&&typeof oe[0]=="object";)Object.assign(z,oe.shift());return[se(z),...oe]}else{if(fe!==null&&typeof fe=="object"){for(;le--&&typeof oe[0]=="object";)Object.assign(z,oe.shift());fe=oe.length?t(oe.shift(),oe):void 0}else typeof fe=="string"&&(fe=t(oe.shift(),oe));return fe!==void 0&&(z[j.messageKey]=fe),[se(z)]}}function g(F,K,q,Q){for(const j in F)if(Q&&F[j]instanceof Error)F[j]=T.stdSerializers.err(F[j]);else if(typeof F[j]=="object"&&!Array.isArray(F[j])&&K)for(const ee in F[j])K.indexOf(ee)>-1&&ee in q&&(F[j][ee]=q[ee](F[j][ee]))}function y(F,K,q,Q=!1){const j=K.send,ee=K.ts,se=K.methodLevel,oe=K.methodValue,fe=K.val,z=F._logEvent.bindings;Q||g(q,F._serialize||Object.keys(F.serializers),F.serializers,F._stdErrSerialize===void 0?!0:F._stdErrSerialize),F._logEvent.ts=ee,F._logEvent.messages=q.filter(function(le){return z.indexOf(le)===-1}),F._logEvent.level.label=se,F._logEvent.level.value=oe,j(se,F._logEvent,fe),F._logEvent=b(z)}function b(F){return{ts:0,messages:[],bindings:F||[],level:{label:"",value:0}}}function R(F){const K={type:F.constructor.name,msg:F.message,stack:F.stack};for(const q in F)K[q]===void 0&&(K[q]=F[q]);return K}function u(F){return typeof F.timestamp=="function"?F.timestamp:F.timestamp===!1?N:U}function i(){return{}}function n(F){return F}function I(){}function N(){return!1}function U(){return Date.now()}function L(){return Math.round(Date.now()/1e3)}function O(){return new Date(Date.now()).toISOString()}function H(){function F(K){return typeof K<"u"&&K}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return F(self)||F(window)||F(this)||{}}}return Tt.exports.default=T,Tt.exports.pino=T,Tt.exports}var Ln=Rn();const Ct=Xr(Ln)({level:"error",browser:{asObject:!0,formatters:{level:t=>({level:t})}}}),_e={debug:(t,e)=>{e?Ct.debug(e,t):Ct.debug(t)},info:(t,e)=>{e?Ct.info(e,t):Ct.info(t)},warn:(t,{error:e,...r})=>{Ct.warn({error:e,...r},t)},error:(t,{error:e,...r})=>{Ct.error({error:e,...r},t)}},pt=t=>{let e;return typeof t=="string"?e={errorName:t,fileName:"",lineNumber:"",columnNumber:"",message:t,stack:""}:e={errorName:t.name,fileName:"fileName"in t?t.fileName:"",lineNumber:"lineNumber"in t?t.lineNumber:"",columnNumber:"columnNumber"in t?t.columnNumber:"",message:t.message,stack:t.stack??""},e},Dn=()=>{const t=window.navigator.appVersion.toLowerCase();return It()&&t.includes("msie 6.")}
4,Jr=()=>{const t=window.navigator.appVersion.toLowerCase();return It()&&t.includes("msie 7.")},kn=()=>{const t=window.navigator.appVersion.toLowerCase();return It()&&t.includes("msie 8.")},Un=()=>{const t=window.navigator.appVersion.toLowerCase();return It()&&t.includes("msie 9.")},Fn=()=>{const t=window.navigator.appVersion.toLowerCase();return It()&&t.includes("msie 10.")},Pn=()=>Dn()||Jr()||kn()||Un()||Fn(),It=()=>window.navigator.userAgent.toLowerCase().includes("msie"),On=()=>{const t=navigator.userAgent;return t.includes("Windows NT")&&t.includes("ARM")},At=t=>{if(!t)return!1;const e=t.getAttribute("type");return t.tagName.toLowerCase()==="input"&&!!e&&["text","email","tel","password"].includes(e)&&"value"in t},gt=t=>{const e=t instanceof Event?t.target:t;return["id","name","class"].map(r=>String(e.getAttribute(r))).join(" ")};var jt={exports:{}};const bt=_n(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
5 * [js-sha256]{@link https://github.com/emn178/js-sha256}
6 *
7 * @version 0.11.1
8 * @author Chen, Yi-Cyuan [[email protected]]
9 * @copyright Chen, Yi-Cyuan 2014-2025
10 * @license MIT
11 */var Zr;function Mn(){return Zr||(Zr=1,(function(t){(function(){var e="input is invalid type",r=typeof window=="object",l=r?window:{};l.JS_SHA256_NO_WINDOW&&(r=!1);var C=!r&&typeof self=="object",v=!l.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node&&process.type!="renderer";v?l=$r:C&&(l=self);var f=!l.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,a=!l.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),h=[-2147483648,8388608,32768,128],T=[24,16,8,0],k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],S=["hex","array","digest","arrayBuffer"],c=[];(l.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(u){return Object.prototype.toString.call(u)==="[object Array]"}),a&&(l.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(u){return typeof u=="object"&&u.buffer&&u.buffer.constructor===ArrayBuffer});var m=function(u,i){return function(n){return new y(i,!0).update(n)[u]()}},E=function(u){var i=m("hex",u);v&&(i=x(i,u)),i.create=function(){return new y(u)},i.update=function(N){return i.create().update(N)};for(var n=0;n<S.length;++n){var I=S[n];i[I]=m(I,u)}return i},x=function(u,i){var n=bt,I=bt.Buffer,N=i?"sha224":"sha256",U;I.from&&!l.JS_SHA256_NO_BUFFER_FROM?U=I.from:U=function(O){return new I(O)};var L=function(O){if(typeof O=="string")return n.createHash(N).update(O,"utf8").digest("hex");if(O==null)throw new Error(e);return O.constructor===ArrayBuffer&&(O=new Uint8Array(O)),Array.isArray(O)||ArrayBuffer.isView(O)||O.constructor===I?n.createHash(N).update(U(O)).digest("hex"):u(O)};return L},s=function(u,i){return function(n,I){return new b(n,i,!0).update(I)[u]()}},g=function(u){var i=s("hex",u);i.create=function(N){return new b(N,u)},i.update=function(N,U){return i.create(N).update(U)};for(var n=0;n<S.length;++n){var I=S[n];i[I]=s(I,u)}return i};function y(u,i){i?(c[0]=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0,this.blocks=c):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=u}y.prototype.update=function(u){if(!this.finalized){var i,n=typeof u;
vendor: 5,119 bytes, line 11
11if(n!=="string"){if(n==="object"){if(u===null)throw new Error(e);if(a&&u.constructor===ArrayBuffer)u=new Uint8Array(u);else if(!Array.isArray(u)&&(!a||!ArrayBuffer.isView(u)))throw new Error(e)}else throw new Error(e);i=!0}for(var I,N=0,U,L=u.length,O=this.blocks;N<L;){if(this.hashed&&(this.hashed=!1,O[0]=this.block,this.block=O[16]=O[1]=O[2]=O[3]=O[4]=O[5]=O[6]=O[7]=O[8]=O[9]=O[10]=O[11]=O[12]=O[13]=O[14]=O[15]=0),i)for(U=this.start;N<L&&U<64;++N)O[U>>>2]|=u[N]<<T[U++&3];else for(U=this.start;N<L&&U<64;++N)I=u.charCodeAt(N),I<128?O[U>>>2]|=I<<T[U++&3]:I<2048?(O[U>>>2]|=(192|I>>>6)<<T[U++&3],O[U>>>2]|=(128|I&63)<<T[U++&3]):I<55296||I>=57344?(O[U>>>2]|=(224|I>>>12)<<T[U++&3],O[U>>>2]|=(128|I>>>6&63)<<T[U++&3],O[U>>>2]|=(128|I&63)<<T[U++&3]):(I=65536+((I&1023)<<10|u.charCodeAt(++N)&1023),O[U>>>2]|=(240|I>>>18)<<T[U++&3],O[U>>>2]|=(128|I>>>12&63)<<T[U++&3],O[U>>>2]|=(128|I>>>6&63)<<T[U++&3],O[U>>>2]|=(128|I&63)<<T[U++&3]);this.lastByteIndex=U,this.bytes+=U-this.start,U>=64?(this.block=O[16],this.start=U-64,this.hash(),this.hashed=!0):this.start=U}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},y.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var u=this.blocks,i=this.lastByteIndex;u[16]=this.block,u[i>>>2]|=h[i&3],this.block=u[16],i>=56&&(this.hashed||this.hash(),u[0]=this.block,u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0),u[14]=this.hBytes<<3|this.bytes>>>29,u[15]=this.bytes<<3,this.hash()}},y.prototype.hash=function(){var u=this.h0,i=this.h1,n=this.h2,I=this.h3,N=this.h4,U=this.h5,L=this.h6,O=this.h7,H=this.blocks,F,K,q,Q,j,ee,se,oe,fe,z,le;for(F=16;F<64;++F)j=H[F-15],K=(j>>>7|j<<25)^(j>>>18|j<<14)^j>>>3,j=H[F-2],q=(j>>>17|j<<15)^(j>>>19|j<<13)^j>>>10,H[F]=H[F-16]+K+H[F-7]+q<<0;for(le=i&n,F=0;F<64;F+=4)this.first?(this.is224?(oe=300032,j=H[0]-1413257819,O=j-150054599<<0,I=j+24177077<<0):(oe=704751109,j=H[0]-210244248,O=j-1521486534<<0,I=j+143694565<<0),this.first=!1):(K=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),q=(N>>>6|N<<26)^(N>>>11|N<<21)^(N>>>25|N<<7),oe=u&i,Q=oe^u&n^le,se=N&U^~N&L,j=O+q+se+k[F]+H[F],ee=K+Q,O=I+j<<0,I=j+ee<<0),K=(I>>>2|I<<30)^(I>>>13|I<<19)^(I>>>22|I<<10),q=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),fe=I&u,Q=fe^I&i^oe,se=O&N^~O&U,j=L+q+se+k[F+1]+H[F+1],ee=K+Q,L=n+j<<0,n=j+ee<<0,K=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),q=(L>>>6|L<<26)^(L>>>11|L<<21)^(L>>>25|L<<7),z=n&I,Q=z^n&u^fe,se=L&O^~L&N,j=U+q+se+k[F+2]+H[F+2],ee=K+Q,U=i+j<<0,i=j+ee<<0,K=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),q=(U>>>6|U<<26)^(U>>>11|U<<21)^(U>>>25|U<<7),le=i&n,Q=le^i&I^z,se=U&L^~U&O,j=N+q+se+k[F+3]+H[F+3],ee=K+Q,N=u+j<<0,u=j+ee<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+u<<0,this.h1=this.h1+i<<0,this.h2=this.h2+n<<0,this.h3=this.h3+I<<0,this.h4=this.h4+N<<0,this.h5=this.h5+U<<0,this.h6=this.h6+L<<0,this.h7=this.h7+O<<0},y.prototype.hex=function(){this.finalize();var u=this.h0,i=this.h1,n=this.h2,I=this.h3,N=this.h4,U=this.h5,L=this.h6,O=this.h7,H=p[u>>>28&15]+p[u>>>24&15]+p[u>>>20&15]+p[u>>>16&15]+p[u>>>12&15]+p[u>>>8&15]+p[u>>>4&15]+p[u&15]+p[i>>>28&15]+p[i>>>24&15]+p[i>>>20&15]+p[i>>>16&15]+p[i>>>12&15]+p[i>>>8&15]+p[i>>>4&15]+p[i&15]+p[n>>>28&15]+p[n>>>24&15]+p[n>>>20&15]+p[n>>>16&15]+p[n>>>12&15]+p[n>>>8&15]+p[n>>>4&15]+p[n&15]+p[I>>>28&15]+p[I>>>24&15]+p[I>>>20&15]+p[I>>>16&15]+p[I>>>12&15]+p[I>>>8&15]+p[I>>>4&15]+p[I&15]+p[N>>>28&15]+p[N>>>24&15]+p[N>>>20&15]+p[N>>>16&15]+p[N>>>12&15]+p[N>>>8&15]+p[N>>>4&15]+p[N&15]+p[U>>>28&15]+p[U>>>24&15]+p[U>>>20&15]+p[U>>>16&15]+p[U>>>12&15]+p[U>>>8&15]+p[U>>>4&15]+p[U&15]+p[L>>>28&15]+p[L>>>24&15]+p[L>>>20&15]+p[L>>>16&15]+p[L>>>12&15]+p[L>>>8&15]+p[L>>>4&15]+p[L&15];return this.is224||(H+=p[O>>>28&15]+p[O>>>24&15]+p[O>>>20&15]+p[O>>>16&15]+p[O>>>12&15]+p[O>>>8&15]+p[O>>>4&15]+p[O&15]),H},y.prototype.toString=y.prototype.hex,y.prototype.digest=function(){this.finalize();var u=this.h0,i=this.h1,n=this.h2,I=this.h3,N=this.h4,U=this.h5,L=this.h6,O=this.h7,H=[u>>>24&255,u>>>16&255,u>>>8&255,u&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255,N>>>24&255,N>>>16&255,N>>>8&255,N&255,U>>>24&255,U>>>16&255,U>>>8&255,U&255,L>>>24&255,L>>>16&255,L>>>8&255,L&255];return this.is224||H.push(O>>>24&255,O>>>16&255,O>>>8&255,O&255),H},y.prototype.array=y.prototype.digest,y.prototype.arrayBuffer=function(){this.finalize();var u=new ArrayBuffer(this.is224?28:32),i=new DataView(u);return i.setUint32(0,this.h0),i.setUint32(4,this.h1),i.setUint32(8,this.h2),i.setUint32(12,this.h3),i.setUint32(16,this.h4),i.setUint32(20,this.h5),i.setUint32(24,this.h6),this.is224||i.setUint32(28,this.h7),u};function b(u,i,n){var I,N=typeof u;if(N==="string"){var U=[],L=u.length,O=0,H;for(I=0;I<L;++I)H=u.charCodeAt(I),H<128?U[O++]=H:H<2048?(U[O++]=192|H>>>6,U[O++]=128|H&63):H<55296||H>=57344?(U[O++]=224|H>>>12,U[O++]=128|H>>>6&63,U[O++]=128|H&63):(H=65536+((H&1023)<<10|u.charCodeAt(++I)&1023),U[O++]=240|H>>>18,U[O++]=128|H>>>12&63,U[O++]=128|H>>>6&63,U[O++]=128|H&63);u=U}else if(N==="object"){if(u===null)throw new Error(e);
11if(a&&u.constructor===ArrayBuffer)u=new Uint8Array(u);else if(!Array.isArray(u)&&(!a||!ArrayBuffer.isView(u)))throw new Error(e)}else throw new Error(e);u.length>64&&(u=new y(i,!0).update(u).array());var F=[],K=[];for(I=0;I<64;++I){var q=u[I]||0;F[I]=92^q,K[I]=54^q}y.call(this,i,n),this.update(K),this.oKeyPad=F,this.inner=!0,this.sharedMemory=n}b.prototype=new y,b.prototype.finalize=function(){if(y.prototype.finalize.call(this),this.inner){this.inner=!1;var u=this.array();y.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(u),y.prototype.finalize.call(this)}};var R=E();R.sha256=R,R.sha224=E(!0),R.sha256.hmac=g(),R.sha224.hmac=g(!0),f?t.exports=R:(l.sha256=R.sha256,l.sha224=R.sha224)})()})(jt)),jt.exports}var Vn=Mn();const Bt=({val:t,salt:e=""})=>Vn.sha256(t+e),ea=t=>new Promise(e=>setTimeout(e,t)),ta=(t,e)=>Math.abs(t-e);class ra{constructor({baseUrl:e}){this.baseUrl=e}parseResponseBody(e,r){if(e===204)return{isOk:!0,body:null};try{return{isOk:!0,body:JSON.parse(r)}}catch{return{isOk:!1,body:r}}}send(e){const{isAsync:r,headers:l,onResponse:C,onError:v}=e,f=`${this.baseUrl}${this.endpoint}`,a=`[${r?"Async":"Sync"}] ${this.method} ${f}`,p=this.method==="GET"?void 0:"body"in e?JSON.stringify(e.body):void 0;try{let h=new XMLHttpRequest;if("withCredentials"in h)h.open(this.method,f,r),this.contentType&&h.setRequestHeader("Content-Type",this.contentType),l&&Object.entries(l).forEach(([T,k])=>{h.setRequestHeader(T,k)}),r&&(h.onreadystatechange=()=>{h.readyState===4&&h.status!==0&&(_e.info(`${a} completed`),this.handleRequestFinished(h,C,v))});else if(typeof XDomainRequest<"u"){if(l&&_e.warn("XDomainRequest doesn't support custom headers, so the request may fail if headers are required by the server",{headers:l}),this.method!=="GET"&&this.method!=="POST"){v?.(new Error("XDomainRequest supports only GET and POST"));return}h=new XDomainRequest,h.onload=()=>{_e.info(`${a} completed`),this.handleRequestFinished(h,C,v)},h.onprogress=()=>{},h.open(this.method,f)}else{v?.(new Error("XHR/XDR not supported"));return}v&&this.registerErrorEvents(h,v),h.send(p),_e.info(`${a} sended`),!r&&"withCredentials"in h&&(h.readyState===4&&h.status!==0?(_e.info(`${a} completed`),this.handleRequestFinished(h,C,v)):v?.(new Error("XMLHttpRequest error")))}catch(h){_e.warn(`${a} completed`,{error:h}),v?.(h)}}registerErrorEvents(e,r){e.onerror=()=>{r(new Error("network error"))},e.ontimeout=()=>{r(new Error("timeout"))},"onabort"in e&&(e.onabort=()=>{r(new Error("aborted"))})}handleRequestFinished(e,r,l){const C="status"in e?e.status:200;if(![200,204,304].includes(C))l?.(new Error(`HTTP error: ${C}`));else{const v=this.parseResponseBody(C,e.responseText);v.isOk?r({status:C,responseBody:v.body,headers:"getAllResponseHeaders"in e?this.transformToHeaders(e.getAllResponseHeaders()):{}}):l?.(new Error(`parse error: status:${C}, body: ${v.body}`))}}transformToHeaders(e){return e.trim().split(/[\r\n]+/).reduce((l,C)=>{const[v,...f]=C.split(":").map(a=>a.trim());return{...l,[v]:f.join(":")}},{})}}class Kn extends ra{constructor(){super(...arguments),this.method="GET",this.contentType=void 0}}class Hn extends ra{constructor(){super(...arguments),this.contentType="application/json"}}const Gn=Kn,qn="/assets";class zn extends Gn{constructor(){super(...arguments),this.endpoint=`${qn}/img/nocaeb/img.gif`,this.contentType="text/plain"}send(e){super.send({...e,isAsync:!0})}}const jn=Hn;class Qn extends jn{constructor(){super(...arguments),this.endpoint="/api/v1/web/entry",this.method="POST"}send(e){super.send({...e,isAsync:!1})}}const $n="loaded",Xn=({jsUrl:t,scriptId:e})=>new Promise((r,l)=>{const C=document.getElementById(e);if(C?.dataset[$n]==="true"){r();return}const v=C??(()=>{const f=document.createElement("script");return f.id=e,f.src=t,f.type="text/javascript",document.body.appendChild(f),f})();v.onload=()=>{v.dataset.loaded="true",r()},v.onerror=()=>{l(new Error(`failed to load script: ${t}`))},document.body.appendChild(v)}),Wn="/cdn/assets/vendor/three.min.js";class Qt{constructor(){this.errors=[]}addError(...e){this.errors=[...this.errors,...e.map(r=>typeof r=="object"&&"errorName"in r&&"fileName"in r?r:pt(r))]}}function ue(t){const e=new Date().getTime();try{const r=t();return Yn(r)?r.then(l=>(_e.debug("done",{cb:t,processInMs:`${new Date().getTime()-e}`}),l),l=>{_e.warn("error on collector callback",{cb:t,err:l,processInMs:`${new Date().getTime()-e}`})}):(_e.debug("done",{cb:t,processInMs:`${new Date().getTime()-e}`}),r)}catch(r){_e.warn("error on collector callback",{cb:t,err:r,processMs:`${new Date().getTime()-e}`});return}}const Yn=t=>typeof t=="object"&&t!==null&&"then"in t,pe=t=>t===null?"null":typeof t>"u"?"undefined":t,Jn=()=>ue(()=>{const t=document.createElement("canvas"),e=t.getContext?.("2d");if(!e)return;const r="<aBc1壱De2瓊FgH3\b燦iJ4\b鰤kL\bm5鼯No6轆PqR7\b質sT8甌uVw9颶XyZ0勵>";return e.textBaseline="top",e.font="14px 'Arial'",e.textBaseline="alphabetic",e.fillStyle="#f60",e.fillRect(125,1,62,20),e.fillStyle="#069",e.fillText(r,2,15),e.fillStyle="rgba(102, 204, 0, 0.7)",e.fillText(r,4,17),Bt({val:t.toDataURL()})}),Zn=()=>{try{return{plugins:ei()}}catch(t){return{error:pt(t)}}},ei=()=>{const t=navigator.plugins;if(t?.length)return Array.from(t).map(({name:e,version:r})=>`${e}-${r}`).join("_")},ti=()=>ue(()=>{const t=180/Math.PI;let e=0;for(let r=0;r<1e5;r++)e+=Math.sin(t*r)*Math.cos(t*r);return e}),ri=async()=>{const t=await ai();return Bt({val:t})},ai=()=>new Promise(function(t){const e=[];let r="";
11const l=window.RTCPeerConnection||window.webkitRTCPeerConnection||window.mozRTCPeerConnection;if(l){const C=new l({iceServers:[]});window.mozRTCPeerConnection&&C.createDataChannel("",{reliable:!1}),C.onicecandidate=function(a){a.candidate&&f(a.candidate.candidate)},C.createOffer({offerToReceiveAudio:!0}).then(a=>{f(a.sdp),C.setLocalDescription(a)}).catch(a=>{r+=`offer failed ${a}`});const v=function(a){!e.includes(a)&&a!=="0.0.0.0"&&(e.push(a),r+=", "+a,r=r.replace(/^, /,""),t(r))},f=function(a){a.split(`\r
12`).forEach(function(p){if(p.startsWith("a=candidate")){const h=p.split(" "),T=h[4];h[7]==="host"&&v(T)}else if(p.startsWith("candidate")){const h=p.split(" "),T=h[4];h[7]==="host"&&v(T)}else if(p.startsWith("c=")){const T=p.split(" ")[2];v(T)}})}}else r+="unsupported",t(r)}),ni=({tag:t,attributes:{id:e,...r},callback:l})=>{if(document.getElementById(e))return l();const C=document.createElement(t);C.setAttribute("id",e),Object.entries(r).forEach(([v,f])=>{C.setAttribute(v,f)});try{document.body.appendChild(C)}catch{}return l()},aa="ads",ii=()=>ni({tag:"div",attributes:{id:aa},callback:()=>!document.getElementById(aa)}),si=()=>ue(()=>{const t=navigator.mimeTypes,e=t?.length,r=[];if(e)for(let C=0;C<e;C++){const v=t[C].suffixes;r.push(v||"")}const l=r.length&&r.join("_")||"";return Cn(l)}),oi=()=>ue(()=>{if(navigator.userAgent.indexOf("MSIE")>0){const t=[];let e=-1;return t[e++]=ge("AOLARTImageFormatSupport","{47F67D00-9E55-11D1-BAEF-00C04FC2D130}
12"),t[e++]=ge("AddressBook","{7790769C-0471-11D2-AF11-00C04FA35D02}"),t[e++]=ge("ArabicTextDisplaySupport","{76C19B38-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("Chinese(Simplified)TextDisplaySupport","{76C19B34-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("Chinese(Traditional)TextDisplaySupport","{76C19B33-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("DirectAnimationJavaClasses","{4F216970-C90C-11D1-B5C7-0000F8051515}"),t[e++]=ge("DirectAnimation","{283807B5-2C60-11D0-A31D-00AA00B92C03}"),t[e++]=ge("DirectShow","{44BBA848-CC51-11CF-AAFA-00AA00B6015C}"),t[e++]=ge("DynamicHTMLDataBindingforJava","{4F216970-C90C-11D1-B5C7-0000F8051515}"),t[e++]=ge("DynamicHTMLDataBinding","{9381D8F2-0288-11D0-9501-00AA00B911A5}"),t[e++]=ge("HebrewTextDisplaySupport","{76C19B36-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("InternetConnectionWizard","{5A8D6EE0-3E18-11D0-821E-444553540000}"),t[e++]=ge("InternetExplorerWebBrowser","{89820200-ECBD-11CF-8B85-00AA005B4383}"),t[e++]=ge("InternetExplorerBrowsingEnhancements","{630B1DA0-B465-11D1-9948-00C04F98BBC9}"),t[e++]=ge("InternetExplorerClassesforJava","{08B0E5C0-4FCB-11CF-AAA5-00401C608555}"),t[e++]=ge("InternetExplorerHelpEngine","{DE5AED00-A4BF-11D1-9948-00C04F98BBC9}"),t[e++]=ge("InternetExplorerHelp","{45EA75A0-A269-11D1-B5BF-0000F8051515}"),t[e++]=ge("InternetExplorerWebBrowser","{89820200-ECBD-11CF-8B85-00AA005B4383}"),t[e++]=ge("JapaneseTextDisplaySupport","{76C19B30-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("KoreanTextDisplaySupport","{76C19B31-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("LanguageAuto-Selection","{76C19B50-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("MacromediaFlash","{D27CDB6E-AE6D-11CF-96B8-444553540000}"),t[e++]=ge("MacromediaShockwaveDirector","{2A202491-F00D-11CF-87CC-0020AFEECF20}"),t[e++]=ge("Microsoftvirtualmachine","{08B0E5C0-4FCB-11CF-AAA5-00401C608500}"),t[e++]=ge("NetMeetingNT","{44BBA842-CC51-11CF-AAFA-00AA00B6015B}"),t[e++]=ge("OfflineBrowsingPack","{3AF36230-A269-11D1-B5BF-0000F8051515}"),t[e++]=ge("OutlookExpress","{44BBA840-CC51-11CF-AAFA-00AA00B6015C}"),t[e++]=ge("Pan-EuropeanTextDisplaySupport","{76C19B32-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("TaskScheduler","{CC2A9BA0-3BDD-11D0-821E-444553540000}"),t[e++]=ge("ThaiTextDisplaySupport","{76C19B35-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("Uniscribe","{3BF42070-B3B1-11D1-B5C5-0000F8051515}"),t[e++]=ge("VRML2.0Viewer","{90A7533D-88FE-11D0-9DBE-0000C0411FC3}"),t[e++]=ge("VectorGraphicsRendering(VML)","{10072CEC-8CC1-11D1-986E-00A0C955B42F}"),t[e++]=ge("VietnameseTextDisplaySupport","{76C19B37-F0C8-11CF-87CC-0020AFEECF20}"),t[e++]=ge("VisualBasicScriptingSupport","{4F645220-306D-11D2-995D-00C04F98BBC9}"),t[e++]=ge("Wallet","{1CDEE860-E95B-11CF-B1B0-00AA00BBAD66}"),t[e++]=ge("WebFolders","{73FA19D0-2D75-11D2-995D-00C04F98BBC9}"),t[e++]=ge("WindowsDesktopUpdateNT","{89820200-ECBD-11CF-8B85-00AA005B4340}"),t[e++]=ge("WindowsMediaPlayerRealNetworkSupport","{23064720-C4F8-11D1-994D-00C04F98BBC9}"),t[e++]=ge("WindowsMediaPlayer","{22D6F312-B0F6-11D0-94AB-0080C74C7E95}"),t.join("_")}}),ge=(t,e)=>{let r=!1,l=!1;try{const C=document.createElement("span");if(C.addBehavior("#default#clientCaps"),typeof C.id<"u"&&typeof C.getComponentVersion<"u")return r=C.isComponentInstalled(e,"ComponentID"),r&&(l=C.getComponentVersion(e,"ComponentID")),`${t}-${l}`}catch{}},li=10,Rt=["monospace","sans-serif","serif"],ui=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3",...
vendor: 6,127 bytes, line 12
12["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"]
12],ci=async()=>ue(async()=>{const t="mmmmmmmmmmlli",e="72px",r=document.getElementsByTagName("body")[0],l=document.createElement("span");l.style.position="absolute",l.style.left="-9999px",l.style.fontSize=e,l.innerHTML=t;const C=[0,0,0],v=[0,0,0];for(let f=0,a=Rt.length;f<a;f++)l.style.fontFamily=Rt[f],r.appendChild(l),C[f]=l.offsetWidth,v[f]=l.offsetHeight,r.removeChild(l);return await ea(1),fi(ui,{bodyDom:r,spanDom:l,defaultWidth:C,defaultHeight:v})}),fi=async(t,e)=>{let r="",l=0;for(;l<t.length;){for(let C=0,v=t.length;C<li&&l<v;C++,l++)r+=di(t[l],e);l<t.length&&await ea(1)}return hi(r)},hi=t=>{t="1"+t;let e="";for(;t.length>0;){const r=t.slice(-4);e=parseInt(r,2).toString(16)+e,t=t.slice(0,-4)}return e},di=(t,{bodyDom:e,spanDom:r,defaultWidth:l,defaultHeight:C})=>{let v=!1;for(let f=0,a=Rt.length;f<a;f++){r.style.fontFamily=t+","+Rt[f],e.appendChild(r);const p=r.offsetWidth!==l[f]||r.offsetHeight!==C[f];e.removeChild(r),v=v||p}return v?"1":"0"},pi=()=>ue(()=>{const t=document.body;try{if(t.setAttribute("sPersist","foobar"),t.save("oXMLBranch"),t.load("oXMLBranch"),t.getAttribute("sPersist")==="foobar")return!0}catch{return"unsupported"}})??"unsupported",gi=()=>ue(async()=>{const t=navigator.battery??await navigator.getBattery(),e=t.charging??"",r=t.chargingTime??"",l=t.dischargingTime??"",C=t.level??"";return`${e}_${r}_${l}_${C}`}),vi=()=>ue(async()=>{const t=await navigator.mediaDevices.enumerateDevices();return typeof t!="object"||!("length"in t)?t:t.map(e=>`${e.kind}:${e.deviceId}`).join("|")});class na{constructor({keyName:e}){this.keyName=e}set(e){try{this.setRaw(e)}catch(r){return _e.warn("save storage error",{provider:this.constructor.name,error:r}),{saveErrors:[pt(r)]}}return{saved:e,saveErrors:[]}}get(){try{return this.getRaw()}catch(e){_e.warn("get storage error",{provider:this.constructor.name,error:e});return}}}class yi extends na{getRaw(){return localStorage.getItem(this.keyName)??void 0}setRaw(e){localStorage.setItem(this.keyName,e)}}const $t=t=>[t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()].map(e=>String(e).padStart(2,"0")).join("")+String(t.getMilliseconds()).padStart(3,"0");let mi=class extends yi{constructor({keyName:e,...r}){super({keyName:`sess_${e}`,...r})}};class Xt{constructor(e){this.storage=e}static create(e){return new Xt(new mi(e))}ensure(){const e=this.storage.get()??`${location.hostname}_${$t(new Date)}${qt(5)}`;return this.storage.set(e)}}const Ci=1e17,Ei=()=>ue(()=>new Promise(t=>{const e=navigator.webkitTemporaryStorage;e?e.requestQuota(Ci,r=>{t(`${r}0`)},()=>{t("failed")}):t(void 0)})),xi=()=>ue(()=>{const t=Si();if(!t){_e.info("WebGL Canvas is not supported.");return}const e=[],r="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",l="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",C=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,C);const v=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);t.bufferData(t.ARRAY_BUFFER,v,t.STATIC_DRAW),C.itemSize=3,C.numItems=3;const f=t.createProgram(),a=t.createShader(t.VERTEX_SHADER);t.shaderSource(a,r),t.compileShader(a);const p=t.createShader(t.FRAGMENT_SHADER);return t.shaderSource(p,l),t.compileShader(p),t.attachShader(f,a),t.attachShader(f,p),t.linkProgram(f),t.useProgram(f),f.vertexPosAttrib=t.getAttribLocation(f,"attrVertex"),f.offsetUniform=t.getUniformLocation(f,"uniformOffset"),t.enableVertexAttribArray(f.vertexPosArray),t.vertexAttribPointer(f.vertexPosAttrib,C.itemSize,t.FLOAT,!1,0,0),t.uniform2f(f.offsetUniform,1,1),t.drawArrays(t.TRIANGLE_STRIP,0,C.numItems),t.canvas&&e.push(t.canvas.toDataURL()),e.push(`extensions:${t.getSupportedExtensions().join(";")}`),e.push(`webgl aliased line width range:${Wt(t)(t.getParameter(t.ALIASED_LINE_WIDTH_RANGE))}`),e.push(`webgl aliased point size range:${Wt(t)(t.getParameter(t.ALIASED_POINT_SIZE_RANGE))}`),e.push(`webgl alpha bits:${t.getParameter(t.ALPHA_BITS)}`),e.push(`webgl antialiasing:${t.getContextAttributes().antialias?"yes":"no"}`),e.push(`webgl blue bits:${t.getParameter(t.BLUE_BITS)}`),e.push(`webgl depth bits:${t.getParameter(t.DEPTH_BITS)}`),e.push(`webgl green bits:${t.getParameter(t.GREEN_BITS)}`),e.push(`webgl max anisotropy:${Ti(t)}`),e.push(`webgl max combined texture image units:${t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS)}`),e.push(`webgl max cube map texture size:${t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE)}`),e.push(`webgl max fragment uniform vectors:${t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS)}`),e.push(`webgl max render buffer size:${t.getParameter(t.MAX_RENDERBUFFER_SIZE)}`),e.push(`webgl max texture image units:${t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}`),e.push(`webgl max texture size:${t.getParameter(t.MAX_TEXTURE_SIZE)}`),e.push(`webgl max varying vectors:${t.getParameter(t.MAX_VARYING_VECTORS)}`),e.push(`webgl max vertex attribs:${t.getParameter(t.MAX_VERTEX_ATTRIBS)}`),e.push(`webgl max vertex texture image units:${t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS)}`),e.push(`webgl max vertex uniform vectors:${t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS)}`),e.push(`webgl max viewport dims:${Wt(t)(t.getParameter(t.MAX_VIEWPORT_DIMS))}`),e.push(`webgl red bits:${t.getParameter(t.RED_BITS)}`),e.push(`webgl renderer:${t.getParameter(t.RENDERER)}`),e.push(`webgl shading language version:${t.getParameter(t.SHADING_LANGUAGE_VERSION)}`),e.push(`webgl stencil bits:${t.getParameter(t.STENCIL_BITS)}`),e.push(`webgl vendor:${t.getParameter(t.VENDOR)}`),e.push(`webgl version:${t.getParameter(t.VERSION)}`),t.getShaderPrecisionFormat?(e.push(`webgl vertex shader high float precision:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision}`),e.push(`webgl vertex shader high float precision rangeMin:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).rangeMin}`),e.push(`webgl vertex shader high float precision rangeMax:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).rangeMax}`),e.push(`webgl vertex shader medium float precision:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision}`),e.push(`webgl vertex shader medium float precision rangeMin:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).rangeMin}`),e.push(`webgl vertex shader medium float precision rangeMax:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).rangeMax}`),e.push(`webgl vertex shader low float precision:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.LOW_FLOAT).precision}`),e.push(`webgl vertex shader low float precision rangeMin:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.LOW_FLOAT).rangeMin}`),e.push(`webgl vertex shader low float precision rangeMax:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.LOW_FLOAT).rangeMax}`),e.push(`webgl fragment shader high float precision:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision}`),e.push(`webgl fragment shader high float precision rangeMin:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).rangeMin}`),e.push(`webgl fragment shader high float precision rangeMax:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).rangeMax}`),e.push(`webgl fragment shader medium float precision:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision}`),e.push(`webgl fragment shader medium float precision rangeMin:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).rangeMin}`),e.push(`webgl fragment shader medium float precision rangeMax:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).rangeMax}`),e.push(`webgl fragment shader low float precision:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.LOW_FLOAT).precision}`),e.push(`webgl fragment shader low float precision rangeMin:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.LOW_FLOAT).rangeMin}`),e.push(`webgl fragment shader low float precision rangeMax:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.LOW_FLOAT).rangeMax}`),e.push(`webgl vertex shader high int precision:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_INT).precision}`),e.push(`webgl vertex shader high int precision rangeMin:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_INT).rangeMin}`),e.push(`webgl vertex shader high int precision rangeMax:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_INT).rangeMax}`),e.push(`webgl vertex shader medium int precision:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_INT).precision}`),e.push(`webgl vertex shader medium int precision rangeMin:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_INT).rangeMin}`),e.push(`webgl vertex shader medium int precision rangeMax:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_INT).rangeMax}`),e.push(`webgl vertex shader low int precision:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.LOW_INT).precision}`),e.push(`webgl vertex shader low int precision rangeMin:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.LOW_INT).rangeMin}`),e.push(`webgl vertex shader low int precision rangeMax:${t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.LOW_INT).rangeMax}`),e.push(`webgl fragment shader high int precision:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_INT).precision}`),e.push(`webgl fragment shader high int precision rangeMin:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_INT).rangeMin}`),e.push(`webgl fragment shader high int precision rangeMax:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_INT).rangeMax}`),e.push(`webgl fragment shader medium int precision:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_INT).precision}`),e.push(`webgl fragment shader medium int precision rangeMin:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_INT).rangeMin}`),e.push(`webgl fragment shader medium int precision rangeMax:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_INT).rangeMax}`),e.push(`webgl fragment shader low int precision:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.LOW_INT).precision}`),e.push(`webgl fragment shader low int precision rangeMin:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.LOW_INT).rangeMin}`),e.push(`webgl fragment shader low int precision rangeMax:${t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.LOW_INT).rangeMax}`),Bt({val:e.join("~")})):e.join("~")}),Si=()=>{const t=document.createElement("canvas");try{return t.getContext("webgl")??t.getContext("experimental-webgl")??void 0}catch{}},Wt=t=>e=>(t.clearColor(0,0,0,1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),`[${e[0]}, ${e[1]}]`),Ti=function(t){let e;const r=t.getExtension("EXT_texture_filter_anisotropic")??t.getExtension("WEBKIT_EXT_texture_filter_anisotropic")??t.getExtension("MOZ_EXT_texture_filter_anisotropic");return r?(e=t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT),e===0&&(e=2),e):void 0},Ii=()=>ue(()=>{const t=bi();
12if(!t?.getSupportedExtensions()?.includes("WEBGL_debug_renderer_info")){_e.info("WebGL is not supported on this browser/environment");return}const{camera:e,scene:r,renderer:l}=Ai();ia(l,r,e);const C=t.getExtension("WEBGL_debug_renderer_info"),v=ue(()=>Bt({val:l.domElement.toDataURL("image/png")})),f=ue(()=>{const p=C?.UNMASKED_VENDOR_WEBGL;return p?t.getParameter(p):void 0}),a=ue(()=>{const p=C?.UNMASKED_RENDERER_WEBGL;return p?t.getParameter(p):void 0});return{webGlData:v,webGlVendor:f,webGlRenderer:a}}),Ai=()=>{const t=new window.THREE.MeshBasicMaterial({color:16777164}),e=new window.THREE.MeshBasicMaterial({color:0,wireframe:!0,transparent:!0}),r=[t,e],l=new window.THREE.WebGLRenderer;l.setSize(1e3,400);const C=new window.THREE.PerspectiveCamera(70,window.innerWidth/window.innerHeight,1,1e3);C.position.z=125;const v=new window.THREE.Scene,f=window.THREE.SceneUtils.createMultiMaterialObject(new window.THREE.BoxGeometry(50,50,50),r);f.rotation.set(15,15,15),v.add(f);const a=window.THREE.SceneUtils.createMultiMaterialObject(new window.THREE.SphereGeometry(40,32,16),r);a.position.set(-100,0,0),v.add(a);const p=window.THREE.SceneUtils.createMultiMaterialObject(new window.THREE.TorusKnotGeometry(30,6,160,10,3,7),r);return p.position.set(100,0,0),p.rotation.set(15,30,0),v.add(p),{camera:C,scene:v,renderer:l}},bi=()=>{try{if(!window.WebGLRenderingContext)return;const t=document.createElement("canvas");return t.getContext("webgl")??t.getContext("experimental-webgl")??void 0}catch{return}},ia=(t,e,r)=>{requestAnimationFrame(()=>{ia(t,e,r)}),t.render(e,r)};class Bi extends Qt{constructor({baseUrl:e,keyName:r}){super(),this.collectionInfo={st:0,et:0,syet:0,tjst:0,tjet:0,pjst:0,pjet:0,apcn:"",apmv:"",apn:"",apv:"",cpc:"",ocp:"",pfm:"",lng:"",bwlng:"",uslng:"",sylng:"",lt:"",tzof:"",lcstr:"",dm:"",hsn:"",prt:"",ptn:"",hr:"",rfr:"",jen:"",cken:"",fsen:"",oln:"",mn:"",plg:"",psb:"",sch:"",scw:"",avh:"",avw:"",cdp:"",dxd:"",dyd:"",upi:"",ua:"",dfc:"",sebv:"",semjv:"",semnv:"",fnt:"",cfp:"",dpr:"",se:"",ieud:"",hwc:"",dnt:"",adbh:"",opdb:"",adbl:"",btst:"",mst:"",hdfs:"",pvip:"",wgif:"",wgdt:"",wgvn:"",wgrn:"",lcstg:"",wbdr:"",mtps:""},this.threeJsUrl=`${e}${Wn}`,this.keyName=r,this.deviceLocalStorage=Xt.create({keyName:this.keyName})}collect(){this.collectionInfo.st=Date.now();let e;Pn()||(this.collectionInfo.tjst=Date.now(),e=Xn({jsUrl:this.threeJsUrl,scriptId:`${this.keyName}-thr`}).finally(()=>this.collectionInfo.tjet=Date.now())),this.collectSync(),this.collectionInfo.syet=Date.now(),gi().then(v=>{this.collectionInfo.btst=v??"unsupported"}),Ei().then(v=>{this.collectionInfo.hdfs=v??"unsupported"}),ri().then(v=>{this.collectionInfo.pvip=v});const r=ci().then(v=>{this.collectionInfo.fnt=v??""}),l=e?.then(()=>{this.collectionInfo.wgif=xi()??"HashError";const v=Ii()??{webGlData:void 0,webGlVendor:void 0,webGlRenderer:void 0};this.collectionInfo.wgdt=v.webGlData??"HashError",this.collectionInfo.wgvn=v.webGlVendor??"HashError",this.collectionInfo.wgrn=v.webGlRenderer??"HashError"}),C=vi().then(v=>{this.collectionInfo.mst=v??"unsupported"});Promise.allSettled([r,l,C]).finally(()=>{this.collectionInfo.et=Date.now()})}collectSync(){this.collectionInfo.ocp=pe(ue(()=>navigator.oscpu)),this.collectionInfo.pfm=pe(ue(()=>navigator.platform)),this.collectionInfo.apcn=pe(ue(()=>navigator.appCodeName)),this.collectionInfo.apn=pe(ue(()=>navigator.appName)),this.collectionInfo.apv=pe(ue(()=>navigator.appVersion)),this.collectionInfo.apmv=pe(ue(()=>navigator.appMinorVersion)),this.collectionInfo.cpc=pe(ue(()=>navigator.cpuClass)),this.collectionInfo.lng=pe(ue(()=>navigator.language)),this.collectionInfo.bwlng=pe(ue(()=>navigator.browserLanguage)),this.collectionInfo.uslng=pe(ue(()=>navigator.userLanguage)),this.collectionInfo.sylng=pe(ue(()=>navigator.systemLanguage)),this.collectionInfo.jen=pe(ue(()=>navigator.javaEnabled())),this.collectionInfo.cken=pe(ue(()=>navigator.cookieEnabled)),this.collectionInfo.oln=pe(ue(()=>navigator.onLine)),this.collectionInfo.ua=pe(ue(()=>navigator.userAgent)),this.collectionInfo.hwc=pe(ue(()=>navigator.hardwareConcurrency)),this.collectionInfo.wbdr=pe(ue(()=>navigator.webdriver)),this.collectionInfo.mtps=pe(ue(()=>navigator.maxTouchPoints)),this.collectionInfo.psb=pe(ue(()=>navigator.productSub)),this.collectionInfo.hwc=ue(()=>navigator.hardwareConcurrency)??"undefined",this.collectionInfo.dnt=ue(()=>navigator.doNotTrack)??"undefined";const e=new Date;this.collectionInfo.lt=e.getTime(),this.collectionInfo.tzof=e.getTimezoneOffset(),this.collectionInfo.lcstr=e.toLocaleStr
12ing(),this.collectionInfo.cken=pe(ue(()=>navigator.cookieEnabled)),this.collectionInfo.hsn=pe(ue(()=>location.hostname)),this.collectionInfo.prt=pe(ue(()=>location.port)),this.collectionInfo.ptn=pe(ue(()=>location.pathname)),this.collectionInfo.hr=pe(ue(()=>location.href)),this.collectionInfo.dm=pe(ue(()=>document.domain)),this.collectionInfo.rfr=pe(ue(()=>document.referrer)),this.collectionInfo.dfc=pe(ue(()=>document.characterSet)),this.collectionInfo.sch=pe(ue(()=>screen.height)),this.collectionInfo.scw=pe(ue(()=>screen.width)),this.collectionInfo.avh=pe(ue(()=>screen.availHeight)),this.collectionInfo.avw=pe(ue(()=>screen.availWidth)),this.collectionInfo.cdp=pe(ue(()=>screen.colorDepth)),this.collectionInfo.dxd=pe(ue(()=>screen.deviceXDPI)),this.collectionInfo.dyd=pe(ue(()=>screen.deviceYDPI)),this.collectionInfo.upi=pe(ue(()=>screen.updateInterval)),this.collectionInfo.fsen=pe(ue(()=>screen.fontSmoothingEnabled)),this.collectionInfo.dpr=pe(ue(()=>window.devicePixelRatio)),this.collectionInfo.sebv=pe(ue(()=>ScriptEngineBuildVersion())),this.collectionInfo.semjv=pe(ue(()=>ScriptEngineMajorVersion())),this.collectionInfo.semnv=pe(ue(()=>ScriptEngineMinorVersion())),this.collectionInfo.dpr=window.devicePixelRatio?window.devicePixelRatio:"undefined",this.collectionInfo.adbh=!!document.body.addBehavior,this.collectionInfo.opdb=!!window.openDatabase,this.collectionInfo.mn=si()??"";const r=oi();if(r)this.collectionInfo.plg=r;else{const C=Zn();"plugins"in C&&(this.collectionInfo.plg=C.plugins??""),C.error&&this.addError(C.error)}this.collectionInfo.cfp=Jn()??"unsupported",this.collectionInfo.se=ti()??"",this.collectionInfo.ieud=pi(),this.collectionInfo.adbl=ue(()=>ii())??"";const l=this.deviceLocalStorage.ensure();l.saveErrors.length>0&&this.addError(...l.saveErrors),this.collectionInfo.lcstg=l.saved??""}}const wi=30;class Lt extends Qt{constructor({eventTargets:e}){super(),this.collectionInfo=[],this.registeredListeners=[],this.collect=()=>{this.listenerObjects.forEach(r=>{this.registerEventListener(r.eventName,l=>{if(this.isLimit()){try{this.disableEventListener()}catch(C){this.addError(C)}return}try{r.collectEventListener(l)}catch(C){this.addError(C),this.disableEventListener()}})})},this.isLimit=()=>this.collectionInfo.length>=wi,this.nextIndex=()=>this.collectionInfo.length===0?0:this.collectionInfo.map(r=>r.id).reduce((r,l)=>Math.max(r,l))+1,this.lastInfo=()=>{if(this.collectionInfo.length!==0)return this.collectionInfo[this.collectionInfo.length-1]},this.registerEventListener=(r,l)=>{try{this.collectionTargets.forEach(C=>{"addEventListener"in C?C.addEventListener(r,l,!1):"attachEvent"in C&&(C.attachEvent(`on${r}`,l),C===window&&document.attachEvent(`on${r}`,l)),this.registeredListeners.push({eventName:r,listener:l})})}catch(C){this.addError(C)}},this.disableEventListener=()=>{this.collectionTargets.forEach(r=>{this.registeredListeners.forEach(({eventName:l,listener:C})=>{"removeEventListener"in r?r.removeEventListener(l,C,!1):"detachEvent"in r&&(r.detachEvent(`on${l}`,C),r===window&&document.detachEvent(`on${l}`,C))})})},this.collectionTargets=e??[window]}}class Dt extends Lt{constructor({eventTargets:e}){super({eventTargets:e})}}class _i extends Dt{constructor({inputForms:e,...r}){super(r),this.AUTOCOMPLETE_EVENT_INTERVAL=20,this.currentInfo={},this.textFieldChecker=(l,C)=>{At(l.target)&&C(l)},this.onloadEvent=()=>{this.inputForms.filter(l=>!!l&&At(l)&&l.value.length>0).forEach(l=>this.collectionInfo.push({id:this.nextIndex(),di:gt(l),rs:!0,bl:0,al:l.value.length,it:new Date().getTime(),ct:new Date().getTime()}))},this.inputEvent=l=>{const C=gt(l),v=this.currentInfo[C],f=!!v&&v.afterLength||0;this.currentInfo[C]={beforeLength:f,afterLength:l.target.value.length,time:new Date().getTime()}},this.changeEvent=l=>{const C=gt(l),v=this.currentInfo[C];if(!v)return;const f=new Date().getTime(),a=v.beforeLength===0&&ta(f,v.time)<this.AUTOCOMPLETE_EVENT_INTERVAL;this.collectionInfo.push({id:this.nextIndex(),di:C,it:v.time,bl:v.beforeLength,al:l.target.value.length,ct:f,rs:a})},this.listenerObjects=[{eventName:"change",collectEventListener:l=>{this.textFieldChecker(l,this.changeEvent)}},{eventName:"input",collectEventListener:l=>{this.textFieldChecker(l,this.inputEvent)}}],this.inputForms=e,this.onloadEvent()}}class Ni extends Dt{constructor(){super(...arguments),this.dropEvent=e=>{const r=e.target;if(!At(r))return;const l=gt(r);this.collectionInfo.push({id:this.nextIndex(),di:l,dt:new Date().getTime(),cx:e.clientX,cy:e.clientY,sx:e.screenX,sy:e.screenY,px:e.pageX,py:e.pageY})},this.listenerObjects=[{eventName:"drop",collectEventListener:this.dropEvent}]}}class Ri extends Dt{constructor(){super(...arguments),this.KEYCODE_TAB_KEY=9,this.KEYCODE_ENTER_KEY=13,this.KEYCODE_V=86,this.textSequence={},this.pastKeyIndex=-1,this.pastTextField="",this.pressingKeyInfos=[],this.keyDownEvent=e=>{const r=document.activeElement;if(!At(r))return;const l=gt(r),C=r.value.length,v=new Date().getTime(),f=e.keyCode===this.KEYCODE_ENTER_KEY,a=e.keyCode===this.KEYCODE_TAB_KEY,p=e.keyCode===this.KEYCODE_V&&(e.ctrlKey||e.metaKey),h={id:this.nextIndex(),di:l,kdt:v,kut:v,ss:r.selectionStart,se:r.selectionEnd,lc:e.location,ck:e.ctrlKey,sk:e.shiftKey,mk:e.metaKey,ak:e.altKey,ek:f,tk:a,pt:p,rp:e.repeat,bl:C,al:C,sq:0};this.collectionInfo.push(h),this.pastKeyIndex!==-1&&(this.collectionInfo[this.pastKeyIndex].al=C,this.updateTextSequence()),this.pastKeyIndex=h.id;const T={index:h.id,keyCode:e.keyCode,metaKey:e.metaKey,repeat:e.repeat};this.pressingKeyInfos.push(T),this.pastTextField=r},this.keyUpEvent=e=>{const r=e.keyCode,l=this.searchPressingKeyInfoIndex(r);if(l===-1){this.pastTextField="",this.pastKeyIndex=-1;return}const C=this.pressingKeyInfos[l].index;if(this.collectionInfo[C].kut=new Date().getTime(),this.pastKeyIndex!==-1){const v=this.pastTextField.value.length;this.collectionInfo[this.pastKeyIndex].al=v,this.updateTextSequence(),this.pastKeyIndex=-1}this.pastTextField="",this.pressingKeyInfos.splice(l,1),this.collectionInfo[C].mk&&this.checkPressingMetaInput(this.collectionInfo[C].kut)},this.searchPressingKeyInfoIndex=e=>{for(let r=0;r<this.pressingKeyInfos.length;r++)if(e===this.pressingKeyInfos[r].keyCode&&!this.pressingKeyInfos[r].repeat)return r;return-1},this.checkPressingMetaInput=e=>{let r=0;for(;r<this.pressingKeyInfos.length;)this.pressingKeyInfos[r].metaKey?(this.collectionInfo[this.pressingKeyInfos[r].index].kut=e,this.pressingKeyInfos.splice(r,1)):r++},this.updateTextSequence=()=>{const e=this.collectionInfo[this.pastKeyIndex];let r,l;e.se>=e.ss?(r=e.ss,l=e.se):(r=e.se,l=e.ss);const C=l-r,v=e.al-e.bl,f=C+v,a=e.di;typeof this.textSequence[a]>"u"&&(this.textSequence[a]=[]),C===0&&v<0?this.textSequence[a].splice(r+v,v*-1):this.textSequence[a].splice(r,l-r);for(let p=0;p<f;p++)this.textSequence[a].splice(r,0,this.pastKeyIndex)},this.confirmSequence=()=>{for(const e in this.textSequence)for(let r=0;r<this.textSequence[e].length;r++){const l=this.textSequence[e][r];this.collectionInfo[l]&&this.collectionInfo[l].sq===0&&(this.collectionInfo[l].sq=r+1)}},this.listenerObjects=[{eventName:"keydown",collectEventListener:this.keyDownEvent},{eventName:"keyup",collectEventListener:this.keyUpEvent}]}get infos(){if(this.pastKeyIndex!==-1&&this.pastTextField!==""){const e=this.pastTextField.value.length;this.collectionInfo[this.pastKeyIndex].al=e,this.updateTextSequence(),this.pastKeyIndex=-1}return this.confirmSequence(),this.collectionInfo}}class Li extends Lt{constructor(){super({eventTargets:[window]}),this.moveTime=new Date().getTime(),this.mouseDownEvent=e=>{const r=new Date().getTime();this.collectionInfo.push({id:this.nextIndex(),mdt:r,mut:r,dfs:0,bt:e.button,cx:e.clientX,cy:e.clientY,px:e.pageX,py:e.pageY,sx:e.screenX,sy:e.screenY})},this.mouseUpEvent=()=>{const e=new Date().getTime(),r=this.lastInfo();r&&(r.mut=e,r.dfs=e-this.moveTime)},this.listenerObjects=[{eventName:"mousedown",collectEventListener:this.mouseDownEvent},{eventName:"mouseup",collectEventListener:this.mouseUpEvent},{eventName:"mousemove",collectEventListener:()=>{this.moveTime=new Date().getTime()}}]}}class Di extends Lt{constructor(){super({eventTargets:[window]}),this.COLLECTION_INTERVAL=5,this.mouseMoveEvent=e=>{const r=new Date().getTime(),C=this.lastInfo()?.mt;C&&new Date().getTime()-C<this.COLLECTION_INTERVAL||this.collectionInfo.push({mt:r,id:this.nextIndex(),cx:e.clientX,cy:e.clientY,sx:e.screenX,sy:e.screenY,px:e.pageX,py:e.pageY,pr:Math.floor(e.mozPressure*100)/100,is:e.mozInputSource})},this.listenerObjects=[{eventName:"mousemove",collectEventListener:this.mouseMoveEvent}]}}class ki extends Dt{constructor(){super(...arguments),this.pasteEvent=e=>{const r=e.target;if(!At(r))return;const l=gt(r);this.collectionInfo.push({id:this.nextIndex(),di:l,pt:new Date().getTime()})},this.listenerObjects=[{eventName:"paste",collectEventListener:this.pasteEvent}]}}class Ui extends Qt{constructor({passwordForm:e,softwareKeyboardButton:r}){super(),this.eventName="click",this.registerEventListener=()=>{try{this.softwareKeyboardButton?.addEventListener?this.softwareKeyboardButton.addEventListener(this.eventName,this.clickEvent,!1):this.softwareKeyboardButton?.attachEvent&&this.softwareKeyboardButton.attachEvent(`on${this.eventName}`,this.clickEvent)}catch(l){this.addError(l)}},this.clickEvent=()=>{this.collectionInfo.us=!0;try{this.softwareKeyboardButton?.removeEventListener?this.softwareKeyboardButton.removeEventListener(this.eventName,this.clickEvent,!1):this.softwareKeyboardButton?.detachEvent&&this.softwareKeyboardButton.detachEvent(`on${this.eventName}`,this.clickEvent)}catch(l){this.addError(l)}},this.softwareKeyboardButton=r,this.passwordForm=e,this.collectionInfo={di:!!e&&gt(e)||"",us:!1}}collect(){this.passwordForm&&this.softwareKeyboardButton&&this.registerEventListener()}}const Fi=100;class Pi extends Lt{constructor(){super({eventTargets:[window]}
12),this.getSwipeId=(e=!1)=>{if(this.collectionInfo.length===0)return 0;const r=this.collectionInfo.map(l=>l.sid).reduce((l,C)=>Math.max(l,C));return e?r+1:r},this.nextIndex=()=>{if(this.collectionInfo.length===0)return 0;const e=this.getSwipeId();return this.collectionInfo.filter(r=>e===r.sid).map(r=>r.id).reduce((r,l)=>Math.max(r,l))+1},this.pressEvent=e=>{this.addSwipeInfo(e,this.getSwipeId(!0),!0)},this.moveEvent=e=>{const r=this.lastInfo()?.st;r&&ta(new Date().getTime(),r)<Fi||this.addSwipeInfo(e,this.getSwipeId())},this.pressEndEvent=e=>{this.addSwipeInfo(e,this.getSwipeId())},this.addSwipeInfo=(e,r,l=!1)=>{const C=e.changedTouches.item(0);this.collectionInfo.push({sid:r,id:l?0:this.nextIndex(),st:new Date().getTime(),cx:C.clientX,cy:C.clientY,sx:C.screenX,sy:C.screenY,px:C.pageX,py:C.pageY,zm:document.body.clientWidth/window.innerWidth,rx:C.radiusX,ry:C.radiusY,fc:C.force})},this.listenerObjects=[{eventName:"touchstart",collectEventListener:this.pressEvent},{eventName:"touchmove",collectEventListener:this.moveEvent},{eventName:"touchend",collectEventListener:this.pressEndEvent}]}}var Yt,sa;function ve(){return sa||(sa=1,Yt={options:{usePureJavaScript:!1}}),Yt}var Jt={exports:{}},Zt,oa;function Oi(){if(oa)return Zt;oa=1;var t={};Zt=t;var e={};t.encode=function(l,C,v){if(typeof C!="string")throw new TypeError('"alphabet" must be a string.');if(v!==void 0&&typeof v!="number")throw new TypeError('"maxline" must be a number.');var f="";if(!(l instanceof Uint8Array))f=r(l,C);else{var a=0,p=C.length,h=C.charAt(0),T=[0];for(a=0;a<l.length;++a){for(var k=0,S=l[a];k<T.length;++k)S+=T[k]<<8,T[k]=S%p,S=S/p|0;for(;S>0;)T.push(S%p),S=S/p|0}for(a=0;l[a]===0&&a<l.length-1;++a)f+=h;for(a=T.length-1;a>=0;--a)f+=C[T[a]]}if(v){var c=new RegExp(".{1,"+v+"}","g");f=f.match(c).join(`\r
13`)}return f},t.decode=function(l,C){if(typeof l!="string")throw new TypeError('"input" must be a string.');if(typeof C!="string")throw new TypeError('"alphabet" must be a string.');var v=e[C];if(!v){v=e[C]=[];for(var f=0;f<C.length;++f)v[C.charCodeAt(f)]=f}l=l.replace(/\s/g,"");for(var a=C.length,p=C.charAt(0),h=[0],f=0;f<l.length;f++){var T=v[l.charCodeAt(f)];if(T===void 0)return;for(var k=0,S=T;k<h.length;++k)S+=h[k]*a,h[k]=S&255,S>>=8;for(;S>0;)h.push(S&255),S>>=8}for(var c=0;l[c]===p&&c<l.length-1;++c)h.push(0);return typeof Buffer<"u"?Buffer.from(h.reverse()):new Uint8Array(h.reverse())};function r(l,C){var v=0,f=C.length,a=C.charAt(0),p=[0];for(v=0;v<l.length();++v){for(var h=0,T=l.at(v);h<p.length;++h)T+=p[h]<<8,p[h]=T%f,T=T/f|0;for(;T>0;)p.push(T%f),T=T/f|0}var k="";for(v=0;l.at(v)===0&&v<l.length()-1;++v)k+=a;for(v=p.length-1;v>=0;--v)k+=C[p[v]];return k}return Zt}var la;function me(){if(la)return Jt.exports;la=1;var t=ve(),e=Oi(),r=Jt.exports=t.util=t.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){r.nextTick=process.nextTick,typeof setImmediate=="function"?r.setImmediate=setImmediate:r.setImmediate=r.nextTick;return}if(typeof setImmediate=="function"){r.setImmediate=function(){return setImmediate.apply(void 0,arguments)},r.nextTick=function(i){return setImmediate(i)};return}if(r.setImmediate=function(i){setTimeout(i,0)},typeof window<"u"&&typeof window.postMessage=="function"){let i=function(n){if(n.source===window&&n.data===s){n.stopPropagation();var I=g.slice();g.length=0,I.forEach(function(N){N()})}};var s="forge.setImmediate",g=[];r.setImmediate=function(n){g.push(n),g.length===1&&window.postMessage(s,"*")},window.addEventListener("message",i,!0)}if(typeof MutationObserver<"u"){var y=Date.now(),b=!0,R=document.createElement("div"),g=[];new MutationObserver(function(){var n=g.slice();g.length=0,n.forEach(function(I){I()})}).observe(R,{attributes:!0});var u=r.setImmediate;r.setImmediate=function(n){Date.now()-y>15?(y=Date.now(),u(n)):(g.push(n),g.length===1&&R.setAttribute("a",b=!b))}}r.nextTick=r.setImmediate})(),r.isNodejs=typeof process<"u"&&process.versions&&process.versions.node,r.globalScope=(function(){return r.isNodejs?$r:typeof self>"u"?window:self})(),r.isArray=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"},r.isArrayBuffer=function(s){return typeof ArrayBuffer<"u"&&s instanceof ArrayBuffer},r.isArrayBufferView=function(s){return s&&r.isArrayBuffer(s.buffer)&&s.byteLength!==void 0};function l(s){if(!(s===8||s===16||s===24||s===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+s)}r.ByteBuffer=C;function C(s){if(this.data="",this.read=0,typeof s=="string")this.data=s;else if(r.isArrayBuffer(s)||r.isArrayBufferView(s))if(typeof Buffer<"u"&&s instanceof Buffer)this.data=s.toString("binary");else{var g=new Uint8Array(s);try{this.data=String.fromCharCode.apply(null,g)}catch{for(var y=0;y<g.length;++y)this.putByte(g[y])}}
13else(s instanceof C||typeof s=="object"&&typeof s.data=="string"&&typeof s.read=="number")&&(this.data=s.data,this.read=s.read);this._constructedStringLength=0}r.ByteStringBuffer=C;var v=4096;r.ByteStringBuffer.prototype._optimizeConstructedString=function(s){this._constructedStringLength+=s,this._constructedStringLength>v&&(this.data.substr(0,1),this._constructedStringLength=0)},r.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},r.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},r.ByteStringBuffer.prototype.putByte=function(s){return this.putBytes(String.fromCharCode(s))},r.ByteStringBuffer.prototype.fillWithByte=function(s,g){s=String.fromCharCode(s);for(var y=this.data;g>0;)g&1&&(y+=s),g>>>=1,g>0&&(s+=s);return this.data=y,this._optimizeConstructedString(g),this},r.ByteStringBuffer.prototype.putBytes=function(s){return this.data+=s,this._optimizeConstructedString(s.length),this},r.ByteStringBuffer.prototype.putString=function(s){return this.putBytes(r.encodeUtf8(s))},r.ByteStringBuffer.prototype.putInt16=function(s){return this.putBytes(String.fromCharCode(s>>8&255)+String.fromCharCode(s&255))},r.ByteStringBuffer.prototype.putInt24=function(s){return this.putBytes(String.fromCharCode(s>>16&255)+String.fromCharCode(s>>8&255)+String.fromCharCode(s&255))},r.ByteStringBuffer.prototype.putInt32=function(s){return this.putBytes(String.fromCharCode(s>>24&255)+String.fromCharCode(s>>16&255)+String.fromCharCode(s>>8&255)+String.fromCharCode(s&255))},r.ByteStringBuffer.prototype.putInt16Le=function(s){return this.putBytes(String.fromCharCode(s&255)+String.fromCharCode(s>>8&255))},r.ByteStringBuffer.prototype.putInt24Le=function(s){return this.putBytes(String.fromCharCode(s&255)+String.fromCharCode(s>>8&255)+String.fromCharCode(s>>16&255))},r.ByteStringBuffer.prototype.putInt32Le=function(s){return this.putBytes(String.fromCharCode(s&255)+String.fromCharCode(s>>8&255)+String.fromCharCode(s>>16&255)+String.fromCharCode(s>>24&255))},r.ByteStringBuffer.prototype.putInt=function(s,g){l(g);var y="";do g-=8,y+=String.fromCharCode(s>>g&255);while(g>0);return this.putBytes(y)},r.ByteStringBuffer.prototype.putSignedInt=function(s,g){return s<0&&(s+=2<<g-1),this.putInt(s,g)},r.ByteStringBuffer.prototype.putBuffer=function(s){return this.putBytes(s.getBytes())},r.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},r.ByteStringBuffer.prototype.getInt16=function(){var s=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,s},r.ByteStringBuffer.prototype.getInt24=function(){var s=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,s},r.ByteStringBuffer.prototype.getInt32=function(){var s=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,s},r.ByteStringBuffer.prototype.getInt16Le=function(){var s=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,s},r.ByteStringBuffer.prototype.getInt24Le=function(){var s=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,s},r.ByteStringBuffer.prototype.getInt32Le=function(){var s=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,s},r.ByteStringBuffer.prototype.getInt=function(s){l(s);var g=0;do g=(g<<8)+this.data.charCodeAt(this.read++),s-=8;while(s>0);return g},r.ByteStringBuffer.prototype.getSignedInt=function(s){var g=this.getInt(s),y=2<<s-2;return g>=y&&(g-=y<<1),g},r.ByteStringBuffer.prototype.getBytes=function(s){var g;return s?(s=Math.min(this.length(),s),g=this.data.slice(this.read,this.read+s),this.read+=s):s===0?g="":(g=this.read===0?this.data:this.data.slice(this.read),this.clear()),g},r.ByteStringBuffer.prototype.bytes=function(s){return typeof s>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+s)},r.ByteStringBuffer.prototype.at=function(s){return this.data.charCodeAt(this.read+s)},r.ByteStringBuffer.prototype.setAt=function(s,g){return this.data=this.data.substr(0,this.read+s)+String.fromCharCode(g)+this.data.substr(this.read+s+1),this},r.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},r.ByteStringBuffer.prototype.copy=function(){var s=r.createBuffer(this.data);return s.read=this.read,s},r.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},r.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},r.ByteStringBuffer.prototype.truncate=function(s){var g=Math.max(0,this.length()-s);return this.data=this.data.substr(this.read,g),this.read=0,this},r.ByteStringBuffer.prototype.toHex=function(){for(var s="",g=this.read;g<this.data.length;++g){var y=this.data.charCodeAt(g);y<16&&(s+="0"),s+=y.toString(16)}return s},r.ByteStringBuffer.prototype.toString=function(){return r.decodeUtf8(this.bytes())};function f(s,g){g=g||{},this.read=g.readOffset||0,this.growSize=g.growSize||1024;var y=r.isArrayBuffer(s),b=r.isArrayBufferView(s);if(y||b){y?this.data=new DataView(s):this.data=new DataView(s.buffer,s.byteOffset,s.byteLength),this.write="writeOffset"in g?g.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,s!=null&&this.putBytes(s),"writeOffset"in g&&(this.write=g.writeOffset)}r.DataBuffer=f,r.DataBuffer.prototype.length=function(){return this.write-this.read},r.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},r.DataBuffer.prototype.accommodate=function(s,g){if(this.length()>=s)return this;g=Math.max(g||this.growSize,s);var y=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),b=new Uint8Array(this.length()+g);return b.set(y),this.data=new DataView(b.buffer),this},r.DataBuffer.prototype.putByte=function(s){return this.accommodate(1),this.data.setUint8(this.write++,s),this},r.DataBuffer.prototype.fillWithByte=function(s,g){this.accommodate(g);for(var y=0;y<g;++y)this.data.setUint8(s);return this},r.DataBuffer.prototype.putBytes=function(s,g){if(r.isArrayBufferView(s)){var y=new Uint8Array(s.buffer,s.byteOffset,s.byteLength),b=y.byteLength-y.byteOffset;this.accommodate(b);var R=new Uint8Array(this.data.buffer,this.write);return R.set(y),this.write+=b,this}if(r.isArrayBuffer(s)){var y=new Uint8Array(s);this.accommodate(y.byteLength);var R=new Uint8Array(this.data.buffer);return R.set(y,this.write),this.write+=y.byteLength,this}if(s instanceof r.DataBuffer||typeof s=="object"&&typeof s.read=="number"&&typeof s.write=="number"&&r.isArrayBufferView(s.data)){var y=new Uint8Array(s.data.byteLength,s.read,s.length());this.accommodate(y.byteLength);var R=new Uint8Array(s.data.byteLength,this.write);return R.set(y),this.write+=y.byteLength,this}if(s instanceof r.ByteStringBuffer&&(s=s.data,g="binary"),g=g||"binary",typeof s=="string"){var u;if(g==="hex")return this.accommodate(Math.ceil(s.length/2)),u=new Uint8Array(this.data.buffer,this.write),this.write+=r.binary.hex.decode(s,u,this.write),this;if(g==="base64")return this.accommodate(Math.ceil(s.length/4)*3),u=new Uint8Array(this.data.buffer,this.write),this.write+=r.binary.base64.decode(s,u,this.write),this;if(g==="utf8"&&(s=r.encodeUtf8(s),g="binary"),g==="binary"||g==="raw")return this.accommodate(s.length),u=new Uint8Array(this.data.buffer,this.write),this.write+=r.binary.raw.decode(u),this;if(g==="utf16")return this.accommodate(s.length*2),u=new Uint16Array(this.data.buffer,this.write),this.write+=r.text.utf16.encode(u),this;throw new Error("Invalid encoding: "+g)}throw Error("Invalid parameter: "+s)},r.DataBuffer.prototype.putBuffer=function(s){return this.putBytes(s),s.clear(),this},r.DataBuffer.prototype.putString=function(s){return this.putBytes(s,"utf16")},r.DataBuffer.prototype.putInt16=function(s){return this.accommodate(2),this.data.setInt16(this.write,
13s),this.write+=2,this},r.DataBuffer.prototype.putInt24=function(s){return this.accommodate(3),this.data.setInt16(this.write,s>>8&65535),this.data.setInt8(this.write,s>>16&255),this.write+=3,this},r.DataBuffer.prototype.putInt32=function(s){return this.accommodate(4),this.data.setInt32(this.write,s),this.write+=4,this},r.DataBuffer.prototype.putInt16Le=function(s){return this.accommodate(2),this.data.setInt16(this.write,s,!0),this.write+=2,this},r.DataBuffer.prototype.putInt24Le=function(s){return this.accommodate(3),this.data.setInt8(this.write,s>>16&255),this.data.setInt16(this.write,s>>8&65535,!0),this.write+=3,this},r.DataBuffer.prototype.putInt32Le=function(s){return this.accommodate(4),this.data.setInt32(this.write,s,!0),this.write+=4,this},r.DataBuffer.prototype.putInt=function(s,g){l(g),this.accommodate(g/8);do g-=8,this.data.setInt8(this.write++,s>>g&255);while(g>0);return this},r.DataBuffer.prototype.putSignedInt=function(s,g){return l(g),this.accommodate(g/8),s<0&&(s+=2<<g-1),this.putInt(s,g)},r.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},r.DataBuffer.prototype.getInt16=function(){var s=this.data.getInt16(this.read);return this.read+=2,s},r.DataBuffer.prototype.getInt24=function(){var s=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,s},r.DataBuffer.prototype.getInt32=function(){var s=this.data.getInt32(this.read);return this.read+=4,s},r.DataBuffer.prototype.getInt16Le=function(){var s=this.data.getInt16(this.read,!0);return this.read+=2,s},r.DataBuffer.prototype.getInt24Le=function(){var s=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,s},r.DataBuffer.prototype.getInt32Le=function(){var s=this.data.getInt32(this.read,!0);return this.read+=4,s},r.DataBuffer.prototype.getInt=function(s){l(s);var g=0;do g=(g<<8)+this.data.getInt8(this.read++),s-=8;while(s>0);return g},r.DataBuffer.prototype.getSignedInt=function(s){var g=this.getInt(s),y=2<<s-2;return g>=y&&(g-=y<<1),g},r.DataBuffer.prototype.getBytes=function(s){var g;return s?(s=Math.min(this.length(),s),g=this.data.slice(this.read,this.read+s),this.read+=s):s===0?g="":(g=this.read===0?this.data:this.data.slice(this.read),this.clear()),g},r.DataBuffer.prototype.bytes=function(s){return typeof s>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+s)},r.DataBuffer.prototype.at=function(s){return this.data.getUint8(this.read+s)},r.DataBuffer.prototype.setAt=function(s,g){return this.data.setUint8(s,g),this},r.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},r.DataBuffer.prototype.copy=function(){return new r.DataBuffer(this)},r.DataBuffer.prototype.compact=function(){if(this.read>0){var s=new Uint8Array(this.data.buffer,this.read),g=new Uint8Array(s.byteLength);g.set(s),this.data=new DataView(g),this.write-=this.read,this.read=0}return this},r.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},r.DataBuffer.prototype.truncate=function(s){return this.write=Math.max(0,this.length()-s),this.read=Math.min(this.read,this.write),this},r.DataBuffer.prototype.toHex=function(){for(var s="",g=this.read;g<this.data.byteLength;++g){var y=this.data.getUint8(g);y<16&&(s+="0"),s+=y.toString(16)}return s},r.DataBuffer.prototype.toString=function(s){var g=new Uint8Array(this.data,this.read,this.length());if(s=s||"utf8",s==="binary"||s==="raw")return r.binary.raw.encode(g);if(s==="hex")return r.binary.hex.encode(g);if(s==="base64")return r.binary.base64.encode(g);if(s==="utf8")return r.text.utf8.decode(g);if(s==="utf16")return r.text.utf16.decode(g);throw new Error("Invalid encoding: "+s)},r.createBuffer=function(s,g){return g=g||"raw",s!==void 0&&g==="utf8"&&(s=r.encodeUtf8(s)),new r.ByteBuffer(s)},r.fillString=function(s,g){for(var y="";g>0;)g&1&&(y+=s),g>>>=1,g>0&&(s+=s);return y},r.xorBytes=function(s,g,y){for(var b="",R="",u="",i=0,n=0;y>0;--y,++i)R=s.charCodeAt(i)^g.charCodeAt(i),n>=10&&(b+=u,u="",n=0),u+=String.fromCharCode(R),++n;return b+=u,b},r.hexToBytes=function(s){var g="",y=0;for(s.length&!0&&(y=1,g+=String.fromCharCode(parseInt(s[0],16)));y<s.length;y+=2)g+=String.fromCharCode(parseInt(s.substr(y,2),16));return g},r.bytesToHex=function(s){return r.createBuffer(s).toHex()},r.int32ToBytes=function(s){return String.fromCharCode(s>>24&255)+String.fromCharCode(s>>16&255)+String.fromCharCode(s>>8&255)+String.fromCharCode(s&255)};var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
13+/=",p=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],h="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";r.encode64=function(s,g){for(var y="",b="",R,u,i,n=0;n<s.length;)R=s.charCodeAt(n++),u=s.charCodeAt(n++),i=s.charCodeAt(n++),y+=a.charAt(R>>2),y+=a.charAt((R&3)<<4|u>>4),isNaN(u)?y+="==":(y+=a.charAt((u&15)<<2|i>>6),y+=isNaN(i)?"=":a.charAt(i&63)),g&&y.length>g&&(b+=y.substr(0,g)+`\r
14`,y=y.substr(g));return b+=y,b},r.decode64=function(s){s=s.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var g="",y,b,R,u,i=0;i<s.length;)y=p[s.charCodeAt(i++)-43],b=p[s.charCodeAt(i++)-43],R=p[s.charCodeAt(i++)-43],u=p[s.charCodeAt(i++)-43],g+=String.fromCharCode(y<<2|b>>4),R!==64&&(g+=String.fromCharCode((b&15)<<4|R>>2),u!==64&&(g+=String.fromCharCode((R&3)<<6|u)));return g},r.encodeUtf8=function(s){return unescape(encodeURIComponent(s))},r.decodeUtf8=function(s){return decodeURIComponent(escape(s))},r.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:e.encode,decode:e.decode}},r.binary.raw.encode=function(s){return String.fromCharCode.apply(null,s)},r.binary.raw.decode=function(s,g,y){var b=g;b||(b=new Uint8Array(s.length)),y=y||0;for(var R=y,u=0;u<s.length;++u)b[R++]=s.charCodeAt(u);return g?R-y:b},r.binary.hex.encode=r.bytesToHex,r.binary.hex.decode=function(s,g,y){var b=g;b||(b=new Uint8Array(Math.ceil(s.length/2))),y=y||0;var R=0,u=y;for(s.length&1&&(R=1,b[u++]=parseInt(s[0],16));R<s.length;R+=2)b[u++]=parseInt(s.substr(R,2),16);return g?u-y:b},r.binary.base64.encode=function(s,g){for(var y="",b="",R,u,i,n=0;n<s.byteLength;)R=s[n++],u=s[n++],i=s[n++],y+=a.charAt(R>>2),y+=a.charAt((R&3)<<4|u>>4),isNaN(u)?y+="==":(y+=a.charAt((u&15)<<2|i>>6),y+=isNaN(i)?"=":a.charAt(i&63)),g&&y.length>g&&(b+=y.substr(0,g)+`\r
15`,y=y.substr(g));return b+=y,b},r.binary.base64.decode=function(s,g,y){var b=g;b||(b=new Uint8Array(Math.ceil(s.length/4)*3)),s=s.replace(/[^A-Za-z0-9\+\/\=]/g,""),y=y||0;for(var R,u,i,n,I=0,N=y;I<s.length;)R=p[s.charCodeAt(I++)-43],u=p[s.charCodeAt(I++)-43],i=p[s.charCodeAt(I++)-43],n=p[s.charCodeAt(I++)-43],b[N++]=R<<2|u>>4,i!==64&&(b[N++]=(u&15)<<4|i>>2,n!==64&&(b[N++]=(i&3)<<6|n));return g?N-y:b.subarray(0,N)},r.binary.base58.encode=function(s,g){return r.binary.baseN.encode(s,h,g)},r.binary.base58.decode=function(s,g){return r.binary.baseN.decode(s,h,g)},r.text={utf8:{},utf16:{}},r.text.utf8.encode=function(s,g,y){s=r.encodeUtf8(s);var b=g;b||(b=new Uint8Array(s.length)),y=y||0;for(var R=y,u=0;u<s.length;++u)b[R++]=s.charCodeAt(u);return g?R-y:b},r.text.utf8.decode=function(s){return r.decodeUtf8(String.fromCharCode.apply(null,s))},r.text.utf16.encode=function(s,g,y){var b=g;b||(b=new Uint8Array(s.length*2));var R=new Uint16Array(b.buffer);y=y||0;for(var u=y,i=y,n=0;n<s.length;++n)R[i++]=s.charCodeAt(n),u+=2;return g?u-y:b},r.text.utf16.decode=function(s){return String.fromCharCode.apply(null,new Uint16Array(s.buffer))},r.deflate=function(s,g,y){if(g=r.decode64(s.deflate(r.encode64(g)).rval),y){var b=2,R=g.charCodeAt(1);R&32&&(b=6),g=g.substring(b,g.length-4)}return g},r.inflate=function(s,g,y){var b=s.inflate(r.encode64(g)).rval;return b===null?null:r.decode64(b)};var T=function(s,g,y){if(!s)throw new Error("WebStorage not available.");var b;if(y===null?b=s.removeItem(g):(y=r.encode64(JSON.stringify(y)),b=s.setItem(g,y)),typeof b<"u"&&b.rval!==!0){var R=new Error(b.error.message);throw R.id=b.error.id,R.name=b.error.name,R}},k=function(s,g){if(!s)throw new Error("WebStorage not available.");var y=s.getItem(g);if(s.init)if(y.rval===null){if(y.error){var b=new Error(y.error.message);throw b.id=y.error.id,b.name=y.error.name,b}y=null}else y=y.rval;return y!==null&&(y=JSON.parse(r.decode64(y))),y},S=function(s,g,y,b){var R=k(s,g);R===null&&(R={}),R[y]=b,T(s,g,R)},c=function(s,g,y){var b=k(s,g);return b!==null&&(b=y in b?b[y]:null),b},m=function(s,g,y){var b=k(s,g);if(b!==null&&y in b){delete b[y];var R=!0;for(var u in b){R=!1;break}R&&(b=null),T(s,g,b)}}
15,E=function(s,g){T(s,g,null)},x=function(s,g,y){var b=null;typeof y>"u"&&(y=["web","flash"]);var R,u=!1,i=null;for(var n in y){R=y[n];try{if(R==="flash"||R==="both"){if(g[0]===null)throw new Error("Flash local storage not available.");b=s.apply(this,g),u=R==="flash"}(R==="web"||R==="both")&&(g[0]=localStorage,b=s.apply(this,g),u=!0)}catch(I){i=I}if(u)break}if(!u)throw i;return b};return r.setItem=function(s,g,y,b,R){x(S,arguments,R)},r.getItem=function(s,g,y,b){return x(c,arguments,b)},r.removeItem=function(s,g,y,b){x(m,arguments,b)},r.clearItems=function(s,g,y){x(E,arguments,y)},r.isEmpty=function(s){for(var g in s)if(s.hasOwnProperty(g))return!1;return!0},r.format=function(s){for(var g=/%./g,y,b,R=0,u=[],i=0;y=g.exec(s);){b=s.substring(i,g.lastIndex-2),b.length>0&&u.push(b),i=g.lastIndex;var n=y[0][1];switch(n){case"s":case"o":R<arguments.length?u.push(arguments[R+++1]):u.push("<?>");break;case"%":u.push("%");break;default:u.push("<%"+n+"?>")}}return u.push(s.substring(i)),u.join("")},r.formatNumber=function(s,g,y,b){var R=s,u=isNaN(g=Math.abs(g))?2:g,i=y===void 0?",":y,n=b===void 0?".":b,I=R<0?"-":"",N=parseInt(R=Math.abs(+R||0).toFixed(u),10)+"",U=N.length>3?N.length%3:0;return I+(U?N.substr(0,U)+n:"")+N.substr(U).replace(/(\d{3})(?=\d)/g,"$1"+n)+(u?i+Math.abs(R-N).toFixed(u).slice(2):"")},r.formatSize=function(s){return s>=1073741824?s=r.formatNumber(s/1073741824,2,".","")+" GiB":s>=1048576?s=r.formatNumber(s/1048576,2,".","")+" MiB":s>=1024?s=r.formatNumber(s/1024,0)+" KiB":s=r.formatNumber(s,0)+" bytes",s},r.bytesFromIP=function(s){return s.indexOf(".")!==-1?r.bytesFromIPv4(s):s.indexOf(":")!==-1?r.bytesFromIPv6(s):null},r.bytesFromIPv4=function(s){if(s=s.split("."),s.length!==4)return null;for(var g=r.createBuffer(),y=0;y<s.length;++y){var b=parseInt(s[y],10);if(isNaN(b))return null;g.putByte(b)}return g.getBytes()},r.bytesFromIPv6=function(s){var g=0;s=s.split(":").filter(function(i){return i.length===0&&++g,!0});for(var y=(8-s.length+g)*2,b=r.createBuffer(),R=0;R<8;++R){if(!s[R]||s[R].length===0){b.fillWithByte(0,y),y=0;continue}var u=r.hexToBytes(s[R]);u.length<2&&b.putByte(0),b.putBytes(u)}return b.getBytes()},r.bytesToIP=function(s){return s.length===4?r.bytesToIPv4(s):s.length===16?r.bytesToIPv6(s):null},r.bytesToIPv4=function(s){if(s.length!==4)return null;for(var g=[],y=0;y<s.length;++y)g.push(s.charCodeAt(y));return g.join(".")},r.bytesToIPv6=function(s){if(s.length!==16)return null;for(var g=[],y=[],b=0,R=0;R<s.length;R+=2){for(var u=r.bytesToHex(s[R]+s[R+1]);u[0]==="0"&&u!=="0";)u=u.substr(1);if(u==="0"){var i=y[y.length-1],n=g.length;!i||n!==i.end+1?y.push({start:n,end:n}):(i.end=n,i.end-i.start>y[b].end-y[b].start&&(b=y.length-1))}g.push(u)}if(y.length>0){var I=y[b];I.end-I.start>0&&(g.splice(I.start,I.end-I.start+1,""),I.start===0&&g.unshift(""),I.end===7&&g.push(""))}return g.join(":")},r.estimateCores=function(s,g){if(typeof s=="function"&&(g=s,s={}),s=s||{},"cores"in r&&!s.update)return g(null,r.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return r.cores=navigator.hardwareConcurrency,g(null,r.cores);if(typeof Worker>"u")return r.cores=1,g(null,r.cores);if(typeof Blob>"u")return r.cores=2,g(null,r.cores);var y=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function(i){var n=Date.now(),I=n+4;self.postMessage({st:n,et:I})})}).toString(),")()"],{type:"application/javascript"}));b([],5,16);function b(i,n,I){if(n===0){var N=Math.floor(i.reduce(function(U,L){return U+L},0)/i.length);return r.cores=Math.max(1,N),URL.revokeObjectURL(y),g(null,r.cores)}R(I,function(U,L){i.push(u(I,L)),b(i,n-1,I)})}function R(i,n){for(var I=[],N=[],U=0;U<i;++U){var L=new Worker(y);L.addEventListener("message",function(O){if(N.push(O.data),N.length===i){for(var H=0;H<i;++H)I[H].terminate();n(null,N)}}),I.push(L)}for(var U=0;U<i;++U)I[U].postMessage(U)}function u(i,n){for(var I=[],N=0;N<i;++N)for(var U=n[N],L=I[N]=[],O=0;O<i;++O)if(N!==O){var H=n[O];(U.st>H.st&&U.st<H.et||H.st>U.st&&H.st<U.et)&&L.push(O)}return I.reduce(function(F,K){return Math.max(F,K.length)},0)}},Jt.exports}var er,ua;function tr(){if(ua)return er;ua=1;var t=ve();me(),er=t.cipher=t.cipher||{},t.cipher.algorithms=t.cipher.algorithms||{},t.cipher.createCipher=function(r,l){var C=r;if(typeof C=="string"&&(C=t.cipher.getAlgorithm(C),C&&(C=C())),!C)throw new Error("Unsupported algorithm: "+r);return new t.cipher.BlockCipher({algorithm:C,key:l,decrypt:!1})},t.cipher.createDecipher=function(r,l){var C=r;if(typeof C=="string"&&(C=t.cipher.getAlgorithm(C),C&&(C=C())),!C)throw new Error("Unsupported algorithm: "+r);return new t.cipher.BlockCipher({algorithm:C,key:l,decrypt:!0})},t.cipher.registerAlgorithm=function(r,l){r=r.toUpperCase(),t.cipher.algorithms[r]=l},t.cipher.getAlgorithm=function(r){return r=r.toUpperCase(),r in t.cipher.algorithms?t.cipher.algorithms[r]:null};var e=t.cipher.BlockCipher=function(r){this.algorithm=r.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=r.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=r.decrypt,this.algorithm.initialize(r)};return e.prototype.start=function(r){r=r||{};var l={};for(var C in r)l[C]=r[C];l.decrypt=this._decrypt,this._finish=!1,this._input=t.util.createBuffer(),this.output=r.output||t.util.createBuffer(),this.mode.start(l)},e.prototype.update=function(r){for(r&&this._input.putBuffer(r);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},e.prototype.finish=function(r){r&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(C){return r(this.blockSize,C,!1)},this.mode.unpad=function(C){return r(this.blockSize,C,!0)});var l={};return l.decrypt=this._decrypt,l.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,l)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,l))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,l))},er}var rr={exports:{}},ca;function fa(){if(ca)return rr.exports;ca=1;var t=ve();me(),t.cipher=t.cipher||{};var e=rr.exports=t.cipher.modes=t.cipher.modes||{};e.ecb=function(v){v=v||{},this.name="ECB",this.cipher=v.cipher,this.blockSize=v.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},e.ecb.prototype.start=function(v){},e.ecb.prototype.encrypt=function(v,f,a){if(v.length()<this.blockSize&&!(a&&v.length()>0))return!0;for(var p=0;p<this._ints;++p)this._inBlock[p]=v.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var p=0;p<this._ints;++p)f.putInt32(this._outBlock[p])},e.ecb.prototype.decrypt=function(v,f,a){if(v.length()<this.blockSize&&!(a&&v.length()>0))return!0;for(var p=0;p<this._ints;++p)this._inBlock[p]=v.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var p=0;p<this._ints;++p)f.putInt32(this._outBlock[p])},e.ecb.prototype.pad=function(v,f){var a=v.length()===this.blockSize?this.blockSize:this.blockSize-v.length();return v.fillWithByte(a,a),!0},e.ecb.prototype.unpad=function(v,f){if(f.overflow>0)return!1;var a=v.length(),p=v.at(a-1);return p>this.blockSize<<2?!1:(v.truncate(p),!0)},e.cbc=function(v){v=v||{},this.name="CBC",this.cipher=v.cipher,this.blockSize=v.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},e.cbc.prototype.start=function(v){if(v.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in v)this._iv=r(v.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")},e.cbc.prototype.encrypt=function(v,f,a){if(v.length()<this.blockSize&&!(a&&v.length()>0))return!0;for(var p=0;p<this._ints;++p)this._inBlock[p]=this._prev[p]^v.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var p=0;p<this._ints;++p)f.putInt32(this._outBlock[p]);this._prev=this._outBlock},e.cbc.prototype.decrypt=function(v,f,a){if(v.length()<this.blockSize&&!(a&&v.length()>0))return!0;for(var p=0;p<this._ints;++p)this._inBlock[p]=v.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var p=0;p<this._ints;++p)f.putInt32(this._prev[p]^this._outBlock[p]);this._prev=this._inBlock.slice(0)},e.cbc.prototype.pad=function(v,f){var a=v.length()===this.blockSize?this.blockSize:this.blockSize-v.length();return v.fillWithByte(a,a),!0},e.cbc.prototype.unpad=function(v,f){if(f.overflow>0)return!1;var a=v.length(),p=v.at(a-1);return p>this.blockSize<<2?!1:(v.truncate(p),!0)},e.cfb=function(v){v=v||{},this.name="CFB",this.cipher=v.cipher,this.blockSize=v.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=t.util.createBuffer(),this._partialBytes=0},e.cfb.prototype.start=function(v){if(!("iv"in v))throw new Error("Invalid IV parameter.");this._iv=r(v.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.cfb.prototype.encrypt=function(v,f,a){var p=v.length();if(p===0)return!0;
15if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&p>=this.blockSize){for(var h=0;h<this._ints;++h)this._inBlock[h]=v.getInt32()^this._outBlock[h],f.putInt32(this._inBlock[h]);return}var T=(this.blockSize-p)%this.blockSize;T>0&&(T=this.blockSize-T),this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialBlock[h]=v.getInt32()^this._outBlock[h],this._partialOutput.putInt32(this._partialBlock[h]);if(T>0)v.read-=this.blockSize;else for(var h=0;h<this._ints;++h)this._inBlock[h]=this._partialBlock[h];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),T>0&&!a)return f.putBytes(this._partialOutput.getBytes(T-this._partialBytes)),this._partialBytes=T,!0;f.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=0},e.cfb.prototype.decrypt=function(v,f,a){var p=v.length();if(p===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&p>=this.blockSize){for(var h=0;h<this._ints;++h)this._inBlock[h]=v.getInt32(),f.putInt32(this._inBlock[h]^this._outBlock[h]);return}var T=(this.blockSize-p)%this.blockSize;T>0&&(T=this.blockSize-T),this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialBlock[h]=v.getInt32(),this._partialOutput.putInt32(this._partialBlock[h]^this._outBlock[h]);if(T>0)v.read-=this.blockSize;else for(var h=0;h<this._ints;++h)this._inBlock[h]=this._partialBlock[h];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),T>0&&!a)return f.putBytes(this._partialOutput.getBytes(T-this._partialBytes)),this._partialBytes=T,!0;f.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=0},e.ofb=function(v){v=v||{},this.name="OFB",this.cipher=v.cipher,this.blockSize=v.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=t.util.createBuffer(),this._partialBytes=0},e.ofb.prototype.start=function(v){if(!("iv"in v))throw new Error("Invalid IV parameter.");this._iv=r(v.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.ofb.prototype.encrypt=function(v,f,a){var p=v.length();if(v.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&p>=this.blockSize){for(var h=0;h<this._ints;++h)f.putInt32(v.getInt32()^this._outBlock[h]),this._inBlock[h]=this._outBlock[h];return}var T=(this.blockSize-p)%this.blockSize;T>0&&(T=this.blockSize-T),this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialOutput.putInt32(v.getInt32()^this._outBlock[h]);if(T>0)v.read-=this.blockSize;else for(var h=0;h<this._ints;++h)this._inBlock[h]=this._outBlock[h];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),T>0&&!a)return f.putBytes(this._partialOutput.getBytes(T-this._partialBytes)),this._partialBytes=T,!0;f.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=0},e.ofb.prototype.decrypt=e.ofb.prototype.encrypt,e.ctr=function(v){v=v||{},this.name="CTR",this.cipher=v.cipher,this.blockSize=v.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=t.util.createBuffer(),this._partialBytes=0},e.ctr.prototype.start=function(v){if(!("iv"in v))throw new Error("Invalid IV parameter.");this._iv=r(v.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.ctr.prototype.encrypt=function(v,f,a){var p=v.length();if(p===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&p>=this.blockSize)for(var h=0;h<this._ints;++h)f.putInt32(v.getInt32()^this._outBlock[h]);else{var T=(this.blockSize-p)%this.blockSize;T>0&&(T=this.blockSize-T),this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialOutput.putInt32(v.getInt32()^this._outBlock[h]);if(T>0&&(v.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),T>0&&!a)return f.putBytes(this._partialOutput.getBytes(T-this._partialBytes)),this._partialBytes=T,!0;f.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=0}l(this._inBlock)},e.ctr.prototype.decrypt=e.ctr.prototype.encrypt,e.gcm=function(v){v=v||{},this.name="GCM",this.cipher=v.cipher,this.blockSize=v.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=t.util.createBuffer(),this._partialBytes=0,this._R=3774873600},e.gcm.prototype.start=function(v){if(!("iv"in v))throw new Error("Invalid IV parameter.");var f=t.util.createBuffer(v.iv);this._cipherLength=0;var a;if("additionalData"in v?a=t.util.createBuffer(v.additionalData):a=t.util.createBuffer(),"tagLength"in v?this._tagLength=v.tagLength:this._tagLength=128,this._tag=null,v.decrypt&&(this._tag=t.util.createBuffer(v.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var p=f.length();if(p===12)this._j0=[f.getInt32(),f.getInt32(),f.getInt32(),1];else{for(this._j0=[0,0,0,0];f.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[f.getInt32(),f.getInt32(),f.getInt32(),f.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(C(p*8)))}this._inBlock=this._j0.slice(0),l(this._inBlock),this._partialBytes=0,a=t.util.createBuffer(a),this._aDataLength=C(a.length()*8);var h=a.length()%this.blockSize;for(h&&a.fillWithByte(0,this.blockSize-h),this._s=[0,0,0,0];a.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()])},e.gcm.prototype.encrypt=function(v,f,a){var p=v.length();if(p===0)return!0;
15if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&p>=this.blockSize){for(var h=0;h<this._ints;++h)f.putInt32(this._outBlock[h]^=v.getInt32());this._cipherLength+=this.blockSize}else{var T=(this.blockSize-p)%this.blockSize;T>0&&(T=this.blockSize-T),this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialOutput.putInt32(v.getInt32()^this._outBlock[h]);if(T<=0||a){if(a){var k=p%this.blockSize;this._cipherLength+=k,this._partialOutput.truncate(this.blockSize-k)}else this._cipherLength+=this.blockSize;for(var h=0;h<this._ints;++h)this._outBlock[h]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),T>0&&!a)return v.read-=this.blockSize,f.putBytes(this._partialOutput.getBytes(T-this._partialBytes)),this._partialBytes=T,!0;f.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),l(this._inBlock)},e.gcm.prototype.decrypt=function(v,f,a){var p=v.length();if(p<this.blockSize&&!(a&&p>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),l(this._inBlock),this._hashBlock[0]=v.getInt32(),this._hashBlock[1]=v.getInt32(),this._hashBlock[2]=v.getInt32(),this._hashBlock[3]=v.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var h=0;h<this._ints;++h)f.putInt32(this._outBlock[h]^this._hashBlock[h]);p<this.blockSize?this._cipherLength+=p%this.blockSize:this._cipherLength+=this.blockSize},e.gcm.prototype.afterFinish=function(v,f){var a=!0;f.decrypt&&f.overflow&&v.truncate(this.blockSize-f.overflow),this.tag=t.util.createBuffer();var p=this._aDataLength.concat(C(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,p);var h=[];this.cipher.encrypt(this._j0,h);for(var T=0;T<this._ints;++T)this.tag.putInt32(this._s[T]^h[T]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),f.decrypt&&this.tag.bytes()!==this._tag&&(a=!1),a},e.gcm.prototype.multiply=function(v,f){for(var a=[0,0,0,0],p=f.slice(0),h=0;h<128;++h){var T=v[h/32|0]&1<<31-h%32;T&&(a[0]^=p[0],a[1]^=p[1],a[2]^=p[2],a[3]^=p[3]),this.pow(p,p)}return a},e.gcm.prototype.pow=function(v,f){for(var a=v[3]&1,p=3;p>0;--p)f[p]=v[p]>>>1|(v[p-1]&1)<<31;f[0]=v[0]>>>1,a&&(f[0]^=this._R)},e.gcm.prototype.tableMultiply=function(v){for(var f=[0,0,0,0],a=0;a<32;++a){var p=a/8|0,h=v[p]>>>(7-a%8)*4&15,T=this._m[a][h];f[0]^=T[0],f[1]^=T[1],f[2]^=T[2],f[3]^=T[3]}return f},e.gcm.prototype.ghash=function(v,f,a){return f[0]^=a[0],f[1]^=a[1],f[2]^=a[2],f[3]^=a[3],this.tableMultiply(f)},e.gcm.prototype.generateHashTable=function(v,f){for(var a=8/f,p=4*a,h=16*a,T=new Array(h),k=0;k<h;++k){var S=[0,0,0,0],c=k/p|0,m=(p-1-k%p)*f;S[c]=1<<f-1<<m,T[k]=this.generateSubHashTable(this.multiply(S,v),f)}return T},e.gcm.prototype.generateSubHashTable=function(v,f){var a=1<<f,p=a>>>1,h=new Array(a);h[p]=v.slice(0);for(var T=p>>>1;T>0;)this.pow(h[2*T],h[T]=[]),T>>=1;for(T=2;T<p;){for(var k=1;k<T;++k){var S=h[T],c=h[k];h[T+k]=[S[0]^c[0],S[1]^c[1],S[2]^c[2],S[3]^c[3]]}T*=2}for(h[0]=[0,0,0,0],T=p+1;T<a;++T){var m=h[T^p];h[T]=[v[0]^m[0],v[1]^m[1],v[2]^m[2],v[3]^m[3]]}return h};function r(v,f){if(typeof v=="string"&&(v=t.util.createBuffer(v)),t.util.isArray(v)&&v.length>4){var a=v;v=t.util.createBuffer();for(var p=0;p<a.length;++p)v.putByte(a[p])}if(v.length()<f)throw new Error("Invalid IV length; got "+v.length()+" bytes and expected "+f+" bytes.");if(!t.util.isArray(v)){for(var h=[],T=f/4,p=0;p<T;++p)h.push(v.getInt32());v=h}return v}function l(v){v[v.length-1]=v[v.length-1]+1&4294967295}function C(v){return[v/4294967296|0,v&4294967295]}return rr.exports}var ar,ha;function vt(){if(ha)return ar;ha=1;var t=ve();tr(),fa(),me(),ar=t.aes=t.aes||{},t.aes.startEncrypting=function(c,m,E,x){var s=S({key:c,output:E,decrypt:!1,mode:x});return s.start(m),s},t.aes.createEncryptionCipher=function(c,m){return S({key:c,output:null,decrypt:!1,mode:m})},t.aes.startDecrypting=function(c,m,E,x){var s=S({key:c,output:E,decrypt:!0,mode:x});return s.start(m),s}
15,t.aes.createDecryptionCipher=function(c,m){return S({key:c,output:null,decrypt:!0,mode:m})},t.aes.Algorithm=function(c,m){r||h();var E=this;E.name=c,E.mode=new m({blockSize:16,cipher:{encrypt:function(x,s){return k(E._w,x,s,!1)},decrypt:function(x,s){return k(E._w,x,s,!0)}}}),E._init=!1},t.aes.Algorithm.prototype.initialize=function(c){if(!this._init){var m=c.key,E;if(typeof m=="string"&&(m.length===16||m.length===24||m.length===32))m=t.util.createBuffer(m);else if(t.util.isArray(m)&&(m.length===16||m.length===24||m.length===32)){E=m,m=t.util.createBuffer();for(var x=0;x<E.length;++x)m.putByte(E[x])}if(!t.util.isArray(m)){E=m,m=[];var s=E.length();if(s===16||s===24||s===32){s=s>>>2;for(var x=0;x<s;++x)m.push(E.getInt32())}}if(!t.util.isArray(m)||!(m.length===4||m.length===6||m.length===8))throw new Error("Invalid key parameter.");var g=this.mode.name,y=["CFB","OFB","CTR","GCM"].indexOf(g)!==-1;this._w=T(m,c.decrypt&&!y),this._init=!0}},t.aes._expandKey=function(c,m){return r||h(),T(c,m)},t.aes._updateBlock=k,e("AES-ECB",t.cipher.modes.ecb),e("AES-CBC",t.cipher.modes.cbc),e("AES-CFB",t.cipher.modes.cfb),e("AES-OFB",t.cipher.modes.ofb),e("AES-CTR",t.cipher.modes.ctr),e("AES-GCM",t.cipher.modes.gcm);function e(c,m){var E=function(){return new t.aes.Algorithm(c,m)};t.cipher.registerAlgorithm(c,E)}var r=!1,l=4,C,v,f,a,p;function h(){r=!0,f=[0,1,2,4,8,16,32,64,128,27,54];for(var c=new Array(256),m=0;m<128;++m)c[m]=m<<1,c[m+128]=m+128<<1^283;C=new Array(256),v=new Array(256),a=new Array(4),p=new Array(4);for(var m=0;m<4;++m)a[m]=new Array(256),p[m]=new Array(256);for(var E=0,x=0,s,g,y,b,R,u,i,m=0;m<256;++m){b=x^x<<1^x<<2^x<<3^x<<4,b=b>>8^b&255^99,C[E]=b,v[b]=E,R=c[b],s=c[E],g=c[s],y=c[g],u=R<<24^b<<16^b<<8^(b^R),i=(s^g^y)<<24^(E^y)<<16^(E^g^y)<<8^(E^s^y);for(var n=0;n<4;++n)a[n][E]=u,p[n][b]=i,u=u<<24|u>>>8,i=i<<24|i>>>8;E===0?E=x=1:(E=s^c[c[c[s^y]]],x^=c[c[x]])}}function T(c,m){for(var E=c.slice(0),x,s=1,g=E.length,y=g+6+1,b=l*y,R=g;R<b;++R)x=E[R-1],R%g===0?(x=C[x>>>16&255]<<24^C[x>>>8&255]<<16^C[x&255]<<8^C[x>>>24]^f[s]<<24,s++):g>6&&R%g===4&&(x=C[x>>>24]<<24^C[x>>>16&255]<<16^C[x>>>8&255]<<8^C[x&255]),E[R]=E[R-g]^x;if(m){var u,i=p[0],n=p[1],I=p[2],N=p[3],U=E.slice(0);b=E.length;for(var R=0,L=b-l;R<b;R+=l,L-=l)if(R===0||R===b-l)U[R]=E[L],U[R+1]=E[L+3],U[R+2]=E[L+2],U[R+3]=E[L+1];else for(var O=0;O<l;++O)u=E[L+O],U[R+(3&-O)]=i[C[u>>>24]]^n[C[u>>>16&255]]^I[C[u>>>8&255]]^N[C[u&255]];E=U}return E}function k(c,m,E,x){var s=c.length/4-1,g,y,b,R,u;x?(g=p[0],y=p[1],b=p[2],R=p[3],u=v):(g=a[0],y=a[1],b=a[2],R=a[3],u=C);var i,n,I,N,U,L,O;i=m[0]^c[0],n=m[x?3:1]^c[1],I=m[2]^c[2],N=m[x?1:3]^c[3];for(var H=3,F=1;F<s;++F)U=g[i>>>24]^y[n>>>16&255]^b[I>>>8&255]^R[N&255]^c[++H],L=g[n>>>24]^y[I>>>16&255]^b[N>>>8&255]^R[i&255]^c[++H],O=g[I>>>24]^y[N>>>16&255]^b[i>>>8&255]^R[n&255]^c[++H],N=g[N>>>24]^y[i>>>16&255]^b[n>>>8&255]^R[I&255]^c[++H],i=U,n=L,I=O;E[0]=u[i>>>24]<<24^u[n>>>16&255]<<16^u[I>>>8&255]<<8^u[N&255]^c[++H],E[x?3:1]=u[n>>>24]<<24^u[I>>>16&255]<<16^u[N>>>8&255]<<8^u[i&255]^c[++H],E[2]=u[I>>>24]<<24^u[N>>>16&255]<<16^u[i>>>8&255]<<8^u[n&255]^c[++H],E[x?1:3]=u[N>>>24]<<24^u[i>>>16&255]<<16^u[n>>>8&255]<<8^u[I&255]^c[++H]}function S(c){c=c||{};var m=(c.mode||"CBC").toUpperCase(),E="AES-"+m,x;c.decrypt?x=t.cipher.createDecipher(E,c.key):x=t.cipher.createCipher(E,c.key);var s=x.start;return x.start=function(g,y){var b=null;y instanceof t.util.ByteBuffer&&(b=y,y={}),y=y||{},y.output=b,y.iv=g,s.call(x,y)},x}return ar}var nr={exports:{}},ir={exports:{}},sr={exports:{}},da;function yt(){if(da)return sr.exports;da=1;var t=ve();t.pki=t.pki||{};var e=sr.exports=t.pki.oids=t.oids=t.oids||{};function r(C,v){e[C]=v,e[v]=C}function l(C,v){e[C]=v}return r("1.2.840.113549.1.1.1","rsaEncryption"),r("1.2.840.113549.1.1.4","md5WithRSAEncryption"),r("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),r("1.2.840.113549.1.1.7","RSAES-OAEP"),r("1.2.840.113549.1.1.8","mgf1"),r("1.2.840.113549.1.1.9","pSpecified"),r("1.2.840.113549.1.1.10","RSASSA-PSS"),r("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),r("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),r("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),r("1.3.101.112","EdDSA25519"),r("1.2.840.10040.4.3","dsa-with-sha1"),r("1.3.14.3.2.7","desCBC"),r("1.3.14.3.2.26","sha1"),r("1.3.14.3.2.29","sha1WithRSASignature"),r("2.16.840.1.101.3.4.2.1","sha256"),r("2.16.840.1.101.3.4.2.2","sha384"),r("2.16.840.1.101.3.4.2.3","sha512"),r("2.16.840.1.101.3.4.2.4","sha224"),r("2.16.840.1.101.3.4.2.5","sha512-224"),r("2.16.840.1.101.3.4.2.6","sha512-256"),r("1.2.840.113549.2.2","md2"),r("1.2.840.113549.2.5","md5"),r("1.2.840.113549.1.7.1","data"),r("1.2.840.113549.1.7.2","signedData"),r("1.2.840.113549.1.7.3","envelopedData"),r("1.2.840.113549.1.7.4","signedAndEnvelopedData"),r("1.2.840.113549.1.7.5","digestedData"),r("1.2.840.113549.1.7.6","encryptedData"),r("1.2.840.113549.1.9.1","emailAddress"),r("1.2.840.113549.1.9.2","unstructuredName"),r("1.2.840.113549.1.9.3","contentType"),r("1.2.840.113549.1.9.4","messageDigest"),r("1.2.840.113549.1.9.5","signingTime"),r("1.2.840.113549.1.9.6","counterSignature"),r("1.2.840.113549.1.9.7","challengePassword"),r("1.2.840.113549.1.9.8","unstructuredAddress"),r("1.2.840.113549.1.9.14","extensionRequest"),r("1.2.840.113549.1.9.20","friendlyName"),r("1.2.840.113549.1.9.21","localKeyId"),r("1.2.840.113549.1.9.22.1","x509Certificate"),r("1.2.840.113549.1.12.10.1.1","keyBag"),r("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),r("1.2.840.113549.1.12.10.1.3","certBag"),r("1.2.840.113549.1.12.10.1.4","crlBag"),r("1.2.840.113549.1.12.10.1.5","secretBag"),r("1.2.840.113549.1.12.10.1.6","safeContentsBag"),r("1.2.840.113549.1.5.
1513","pkcs5PBES2"),r("1.2.840.113549.1.5.12","pkcs5PBKDF2"),r("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),r("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),r("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),r("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),r("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),r("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),r("1.2.840.113549.2.7","hmacWithSHA1"),r("1.2.840.113549.2.8","hmacWithSHA224"),r("1.2.840.113549.2.9","hmacWithSHA256"),r("1.2.840.113549.2.10","hmacWithSHA384"),r("1.2.840.113549.2.11","hmacWithSHA512"),r("1.2.840.113549.3.7","des-EDE3-CBC"),r("2.16.840.1.101.3.4.1.2","aes128-CBC"),r("2.16.840.1.101.3.4.1.22","aes192-CBC"),r("2.16.840.1.101.3.4.1.42","aes256-CBC"),r("2.5.4.3","commonName"),r("2.5.4.4","surname"),r("2.5.4.5","serialNumber"),r("2.5.4.6","countryName"),r("2.5.4.7","localityName"),r("2.5.4.8","stateOrProvinceName"),r("2.5.4.9","streetAddress"),r("2.5.4.10","organizationName"),r("2.5.4.11","organizationalUnitName"),r("2.5.4.12","title"),r("2.5.4.13","description"),r("2.5.4.15","businessCategory"),r("2.5.4.17","postalCode"),r("2.5.4.42","givenName"),r("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),r("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),r("2.16.840.1.113730.1.1","nsCertType"),r("2.16.840.1.113730.1.13","nsComment"),l("2.5.29.1","authorityKeyIdentifier"),l("2.5.29.2","keyAttributes"),l("2.5.29.3","certificatePolicies"),l("2.5.29.4","keyUsageRestriction"),l("2.5.29.5","policyMapping"),l("2.5.29.6","subtreesConstraint"),l("2.5.29.7","subjectAltName"),l("2.5.29.8","issuerAltName"),l("2.5.29.9","subjectDirectoryAttributes"),l("2.5.29.10","basicConstraints"),l("2.5.29.11","nameConstraints"),l("2.5.29.12","policyConstraints"),l("2.5.29.13","basicConstraints"),r("2.5.29.14","subjectKeyIdentifier"),r("2.5.29.15","keyUsage"),l("2.5.29.16","privateKeyUsagePeriod"),r("2.5.29.17","subjectAltName"),r("2.5.29.18","issuerAltName"),r("2.5.29.19","basicConstraints"),l("2.5.29.20","cRLNumber"),l("2.5.29.21","cRLReason"),l("2.5.29.22","expirationDate"),l("2.5.29.23","instructionCode"),l("2.5.29.24","invali
15dityDate"),l("2.5.29.25","cRLDistributionPoints"),l("2.5.29.26","issuingDistributionPoint"),l("2.5.29.27","deltaCRLIndicator"),l("2.5.29.28","issuingDistributionPoint"),l("2.5.29.29","certificateIssuer"),l("2.5.29.30","nameConstraints"),r("2.5.29.31","cRLDistributionPoints"),r("2.5.29.32","certificatePolicies"),l("2.5.29.33","policyMappings"),l("2.5.29.34","policyConstraints"),r("2.5.29.35","authorityKeyIdentifier"),l("2.5.29.36","policyConstraints"),r("2.5.29.37","extKeyUsage"),l("2.5.29.46","freshestCRL"),l("2.5.29.54","inhibitAnyPolicy"),r("1.3.6.1.4.1.11129.2.4.2","timestampList"),r("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),r("1.3.6.1.5.5.7.3.1","serverAuth"),r("1.3.6.1.5.5.7.3.2","clientAuth"),r("1.3.6.1.5.5.7.3.3","codeSigning"),r("1.3.6.1.5.5.7.3.4","emailProtection"),r("1.3.6.1.5.5.7.3.8","timeStamping"),sr.exports}var pa;function ot(){if(pa)return ir.exports;pa=1;var t=ve();me(),yt();var e=ir.exports=t.asn1=t.asn1||{};e.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},e.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},e.maxDepth=256,e.create=function(f,a,p,h,T){if(t.util.isArray(h)){for(var k=[],S=0;S<h.length;++S)h[S]!==void 0&&k.push(h[S]);h=k}var c={tagClass:f,type:a,constructed:p,composed:p||t.util.isArray(h),value:h};return T&&"bitStringContents"in T&&(c.bitStringContents=T.bitStringContents,c.original=e.copy(c)),c},e.copy=function(f,a){var p;if(t.util.isArray(f)){p=[];for(var h=0;h<f.length;++h)p.push(e.copy(f[h],a));return p}return typeof f=="string"?f:(p={tagClass:f.tagClass,type:f.type,constructed:f.constructed,composed:f.composed,value:e.copy(f.value,a)},a&&!a.excludeBitStringContents&&(p.bitStringContents=f.bitStringContents),p)},e.equals=function(f,a,p){if(t.util.isArray(f)){if(!t.util.isArray(a)||f.length!==a.length)return!1;for(var h=0;h<f.length;++h)if(!e.equals(f[h],a[h]))return!1;return!0}if(typeof f!=typeof a)return!1;if(typeof f=="string")return f===a;var T=f.tagClass===a.tagClass&&f.type===a.type&&f.constructed===a.constructed&&f.composed===a.composed&&e.equals(f.value,a.value);return p&&p.includeBitStringContents&&(T=T&&f.bitStringContents===a.bitStringContents),T},e.getBerValueLength=function(f){var a=f.getByte();if(a!==128){var p,h=a&128;return h?p=f.getInt((a&127)<<3):p=a,p}};function r(f,a,p){if(p>a){var h=new Error("Too few bytes to parse DER.");throw h.available=f.length(),h.remaining=a,h.requested=p,h}}var l=function(f,a){var p=f.getByte();if(a--,p!==128){var h,T=p&128;if(!T)h=p;else{var k=p&127;r(f,a,k),h=f.getInt(k<<3)}if(h<0)throw new Error("Negative length: "+h);return h}};e.fromDer=function(f,a){a===void 0&&(a={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof a=="boolean"&&(a={strict:a,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in a||(a.strict=!0),"parseAllBytes"in a||(a.parseAllBytes=!0),"decodeBitStrings"in a||(a.decodeBitStrings=!0),"maxDepth"in a||(a.maxDepth=e.maxDepth),typeof f=="string"&&(f=t.util.createBuffer(f));var p=f.length(),h=C(f,f.length(),0,a);if(a.parseAllBytes&&f.length()!==0){var T=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw T.byteCount=p,T.remaining=f.length(),T}return h};function C(f,a,p,h){if(p>=h.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var T;r(f,a,2);var k=f.getByte();a--;var S=k&192,c=k&31;T=f.length();var m=l(f,a);if(a-=T-f.length(),m!==void 0&&m>a){if(h.strict){var E=new Error("Too few bytes to read ASN.1 value.");throw E.available=f.length(),E.remaining=a,E.requested=m,E}m=a}var x,s,g=(k&32)===32;if(g)if(x=[],m===void 0)for(;;){if(r(f,a,2),f.bytes(2)==="\0\0"){f.getBytes(2),a-=2;break}T=f.length(),x.push(C(f,a,p+1,h)),a-=T-f.length()}else for(;m>0;)T=f.length(),x.push(C(f,m,p+1,h)),a-=T-f.length(),m-=T-f.length();if(x===void 0&&S===e.Class.UNIVERSAL&&c===e.Type.BITSTRING&&(s=f.bytes(m)),x===void 0&&h.decodeBitStrings&&S===e.Class.UNIVERSAL&&c===e.Type.BITSTRING&&m>1){var y=f.read,b=a,R=0;if(c===e.Type.BITSTRING&&(r(f,a,1),R=f.getByte(),a--),R===0)try{T=f.length();var u={strict:!0,decodeBitStrings:!0},i=C(f,a,p+1,u),n=T-f.length();a-=n,c==e.Type.BITSTRING&&n++;var I=i.tagClass;n===m&&(I===e.Class.UNIVERSAL||I===e.Class.CONTEXT_SPECIFIC)&&(x=[i])}catch{}x===void 0&&(f.read=y,a=b)}if(x===void 0){if(m===void 0){if(h.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");m=a}if(c===e.Type.BMPSTRING)for(x="";m>0;m-=2)r(f,a,2),x+=String.fromCharCode(f.getInt16()),a-=2;else x=f.getBytes(m),a-=m}var N=s===void 0?null:{bitStringContents:s};return e.create(S,c,g,x,N)}e.toDer=function(f){var a=t.util.createBuffer(),p=f.tagClass|f.type,h=t.util.createBuffer(),T=!1;
15if("bitStringContents"in f&&(T=!0,f.original&&(T=e.equals(f,f.original))),T)h.putBytes(f.bitStringContents);else if(f.composed){f.constructed?p|=32:h.putByte(0);for(var k=0;k<f.value.length;++k)f.value[k]!==void 0&&h.putBuffer(e.toDer(f.value[k]))}else if(f.type===e.Type.BMPSTRING)for(var k=0;k<f.value.length;++k)h.putInt16(f.value.charCodeAt(k));else f.type===e.Type.INTEGER&&f.value.length>1&&(f.value.charCodeAt(0)===0&&(f.value.charCodeAt(1)&128)===0||f.value.charCodeAt(0)===255&&(f.value.charCodeAt(1)&128)===128)?h.putBytes(f.value.substr(1)):h.putBytes(f.value);if(a.putByte(p),h.length()<=127)a.putByte(h.length()&127);else{var S=h.length(),c="";do c+=String.fromCharCode(S&255),S=S>>>8;while(S>0);a.putByte(c.length|128);for(var k=c.length-1;k>=0;--k)a.putByte(c.charCodeAt(k))}return a.putBuffer(h),a},e.oidToDer=function(f){var a=f.split("."),p=t.util.createBuffer();p.putByte(40*parseInt(a[0],10)+parseInt(a[1],10));for(var h,T,k,S,c=2;c<a.length;++c){if(h=!0,T=[],k=parseInt(a[c],10),k>4294967295)throw new Error("OID value too large; max is 32-bits.");do S=k&127,k=k>>>7,h||(S|=128),T.push(S),h=!1;while(k>0);for(var m=T.length-1;m>=0;--m)p.putByte(T[m])}return p},e.derToOid=function(f){var a;typeof f=="string"&&(f=t.util.createBuffer(f));var p=f.getByte();a=Math.floor(p/40)+"."+p%40;for(var h=0;f.length()>0;){if(h>70368744177663)throw new Error("OID value too large; max is 53-bits.");p=f.getByte(),h=h*128,p&128?h+=p&127:(a+="."+(h+p),h=0)}return a},e.utcTimeToDate=function(f){var a=new Date,p=parseInt(f.substr(0,2),10);p=p>=50?1900+p:2e3+p;var h=parseInt(f.substr(2,2),10)-1,T=parseInt(f.substr(4,2),10),k=parseInt(f.substr(6,2),10),S=parseInt(f.substr(8,2),10),c=0;if(f.length>11){var m=f.charAt(10),E=10;m!=="+"&&m!=="-"&&(c=parseInt(f.substr(10,2),10),E+=2)}if(a.setUTCFullYear(p,h,T),a.setUTCHours(k,S,c,0),E&&(m=f.charAt(E),m==="+"||m==="-")){var x=parseInt(f.substr(E+1,2),10),s=parseInt(f.substr(E+4,2),10),g=x*60+s;g*=6e4,m==="+"?a.setTime(+a-g):a.setTime(+a+g)}return a},e.generalizedTimeToDate=function(f){var a=new Date,p=parseInt(f.substr(0,4),10),h=parseInt(f.substr(4,2),10)-1,T=parseInt(f.substr(6,2),10),k=parseInt(f.substr(8,2),10),S=parseInt(f.substr(10,2),10),c=parseInt(f.substr(12,2),10),m=0,E=0,x=!1;f.charAt(f.length-1)==="Z"&&(x=!0);var s=f.length-5,g=f.charAt(s);if(g==="+"||g==="-"){var y=parseInt(f.substr(s+1,2),10),b=parseInt(f.substr(s+4,2),10);E=y*60+b,E*=6e4,g==="+"&&(E*=-1),x=!0}return f.charAt(14)==="."&&(m=parseFloat(f.substr(14),10)*1e3),x?(a.setUTCFullYear(p,h,T),a.setUTCHours(k,S,c,m),a.setTime(+a+E)):(a.setFullYear(p,h,T),a.setHours(k,S,c,m)),a},e.dateToUtcTime=function(f){if(typeof f=="string")return f;var a="",p=[];p.push((""+f.getUTCFullYear()).substr(2)),p.push(""+(f.getUTCMonth()+1)),p.push(""+f.getUTCDate()),p.push(""+f.getUTCHours()),p.push(""+f.getUTCMinutes()),p.push(""+f.getUTCSeconds());for(var h=0;h<p.length;++h)p[h].length<2&&(a+="0"),a+=p[h];return a+="Z",a},e.dateToGeneralizedTime=function(f){if(typeof f=="string")return f;var a="",p=[];p.push(""+f.getUTCFullYear()),p.push(""+(f.getUTCMonth()+1)),p.push(""+f.getUTCDate()),p.push(""+f.getUTCHours()),p.push(""+f.getUTCMinutes()),p.push(""+f.getUTCSeconds());for(var h=0;h<p.length;++h)p[h].length<2&&(a+="0"),a+=p[h];return a+="Z",a},e.integerToDer=function(f){var a=t.util.createBuffer();if(f>=-128&&f<128)return a.putSignedInt(f,8);if(f>=-32768&&f<32768)return a.putSignedInt(f,16);if(f>=-8388608&&f<8388608)return a.putSignedInt(f,24);if(f>=-2147483648&&f<2147483648)return a.putSignedInt(f,32);var p=new Error("Integer too large; max is 32-bits.");throw p.integer=f,p},e.derToInteger=function(f){typeof f=="string"&&(f=t.util.createBuffer(f));var a=f.length()*8;if(a>32)throw new Error("Integer too large; max is 32-bits.");return f.getSignedInt(a)},e.validate=function(f,a,p,h){var T=!1;if((f.tagClass===a.tagClass||typeof a.tagClass>"u")&&(f.type===a.type||typeof a.type>"u"))if(f.constructed===a.constructed||typeof a.constructed>"u"){if(T=!0,a.value&&t.util.isArray(a.value))for(var k=0,S=0;T&&S<a.value.length;++S){var c=a.value[S];T=!!c.optional;var m=f.value[k];if(!m){c.optional||(T=!1,h&&h.push("["+a.name+'] Missing required element. Expected tag class "'+c.tagClass+'", type "'+c.type+'"'));continue}var E=typeof c.tagClass<"u"&&typeof c.type<"u";if(E&&(m.tagClass!==c.tagClass||m.type!==c.type))if(c.optional){T=!0;continue}else{T=!1,h&&h.push("["+a.name+"] Tag mismatch. Expected ("+c.tagClass+","+c.type+"), got ("+m.tagClass+","+m.type+")");break}var x=e.validate(m,c,p,h);if(x)++k,T=!0;else if(c.optional)T=!0;else{T=!1;break}}
15if(T&&p&&(a.capture&&(p[a.capture]=f.value),a.captureAsn1&&(p[a.captureAsn1]=f),a.captureBitStringContents&&"bitStringContents"in f&&(p[a.captureBitStringContents]=f.bitStringContents),a.captureBitStringValue&&"bitStringContents"in f))if(f.bitStringContents.length<2)p[a.captureBitStringValue]="";else{var s=f.bitStringContents.charCodeAt(0);if(s!==0)throw new Error("captureBitStringValue only supported for zero unused bits");p[a.captureBitStringValue]=f.bitStringContents.slice(1)}}else h&&h.push("["+a.name+'] Expected constructed "'+a.constructed+'", got "'+f.constructed+'"');else h&&(f.tagClass!==a.tagClass&&h.push("["+a.name+'] Expected tag class "'+a.tagClass+'", got "'+f.tagClass+'"'),f.type!==a.type&&h.push("["+a.name+'] Expected type "'+a.type+'", got "'+f.type+'"'));return T};var v=/[^\\u0000-\\u00ff]/;return e.prettyPrint=function(f,a,p){var h="";a=a||0,p=p||2,a>0&&(h+=`
16`);for(var T="",k=0;k<a*p;++k)T+=" ";switch(h+=T+"Tag: ",f.tagClass){case e.Class.UNIVERSAL:h+="Universal:";break;case e.Class.APPLICATION:h+="Application:";break;case e.Class.CONTEXT_SPECIFIC:h+="Context-Specific:";break;case e.Class.PRIVATE:h+="Private:";break}if(f.tagClass===e.Class.UNIVERSAL)switch(h+=f.type,f.type){case e.Type.NONE:h+=" (None)";break;case e.Type.BOOLEAN:h+=" (Boolean)";break;case e.Type.INTEGER:h+=" (Integer)";break;case e.Type.BITSTRING:h+=" (Bit string)";break;case e.Type.OCTETSTRING:h+=" (Octet string)";break;case e.Type.NULL:h+=" (Null)";break;case e.Type.OID:h+=" (Object Identifier)";break;case e.Type.ODESC:h+=" (Object Descriptor)";break;case e.Type.EXTERNAL:h+=" (External or Instance of)";break;case e.Type.REAL:h+=" (Real)";break;case e.Type.ENUMERATED:h+=" (Enumerated)";break;case e.Type.EMBEDDED:h+=" (Embedded PDV)";break;case e.Type.UTF8:h+=" (UTF8)";break;case e.Type.ROID:h+=" (Relative Object Identifier)";break;case e.Type.SEQUENCE:h+=" (Sequence)";break;case e.Type.SET:h+=" (Set)";break;case e.Type.PRINTABLESTRING:h+=" (Printable String)";break;case e.Type.IA5String:h+=" (IA5String (ASCII))";break;case e.Type.UTCTIME:h+=" (UTC time)";break;case e.Type.GENERALIZEDTIME:h+=" (Generalized time)";break;case e.Type.BMPSTRING:h+=" (BMP String)";break}else h+=f.type;if(h+=`
17`,h+=T+"Constructed: "+f.constructed+`
18`,f.composed){for(var S=0,c="",k=0;k<f.value.length;++k)f.value[k]!==void 0&&(S+=1,c+=e.prettyPrint(f.value[k],a+1,p),k+1<f.value.length&&(c+=","));h+=T+"Sub values: "+S+c}else{if(h+=T+"Value: ",f.type===e.Type.OID){var m=e.derToOid(f.value);h+=m,t.pki&&t.pki.oids&&m in t.pki.oids&&(h+=" ("+t.pki.oids[m]+") ")}if(f.type===e.Type.INTEGER)try{h+=e.derToInteger(f.value)}catch{h+="0x"+t.util.bytesToHex(f.value)}else if(f.type===e.Type.BITSTRING){if(f.value.length>1?h+="0x"+t.util.bytesToHex(f.value.slice(1)):h+="(none)",f.value.length>0){var E=f.value.charCodeAt(0);E==1?h+=" (1 unused bit shown)":E>1&&(h+=" ("+E+" unused bits shown)")}}else if(f.type===e.Type.OCTETSTRING)v.test(f.value)||(h+="("+f.value+") "),h+="0x"+t.util.bytesToHex(f.value);else if(f.type===e.Type.UTF8)try{h+=t.util.decodeUtf8(f.value)}catch(x){if(x.message==="URI malformed")h+="0x"+t.util.bytesToHex(f.value)+" (malformed UTF8)";else throw x}else f.type===e.Type.PRINTABLESTRING||f.type===e.Type.IA5String?h+=f.value:v.test(f.value)?h+="0x"+t.util.bytesToHex(f.value):f.value.length===0?h+="[null]":h+=f.value}return h},ir.exports}var or={exports:{}},lr,ga;function ut(){if(ga)return lr;ga=1;var t=ve();return lr=t.md=t.md||{},t.md.algorithms=t.md.algorithms||{},lr}var va;function wt(){if(va)return or.exports;va=1;var t=ve();ut(),me();var e=or.exports=t.hmac=t.hmac||{};return e.create=function(){var r=null,l=null,C=null,v=null,f={};return f.start=function(a,p){if(a!==null)if(typeof a=="string")if(a=a.toLowerCase(),a in t.md.algorithms)l=t.md.algorithms[a].create();else throw new Error('Unknown hash algorithm "'+a+'"');else l=a;if(p===null)p=r;else{if(typeof p=="string")p=t.util.createBuffer(p);else if(t.util.isArray(p)){var h=p;p=t.util.createBuffer();for(var T=0;T<h.length;++T)p.putByte(h[T])}var k=p.length();k>l.blockLength&&(l.start(),l.update(p.bytes()),p=l.digest()),C=t.util.createBuffer(),v=t.util.createBuffer(),k=p.length();for(var T=0;T<k;++T){var h=p.at(T);C.putByte(54^h),v.putByte(92^h)}if(k<l.blockLength)for(var h=l.blockLength-k,T=0;T<h;++T)C.putByte(54),v.putByte(92);r=p,C=C.bytes(),v=v.bytes()}l.start(),l.update(C)},f.update=function(a){l.update(a)},f.getMac=function(){var a=l.digest().bytes();return l.start(),l.update(v),l.update(a),l.digest()},f.digest=f.getMac,f},or.exports}var ur={exports:{}},ya;function cr(){if(ya)return ur.exports;ya=1;var t=ve();ut(),me();
18var e=ur.exports=t.md5=t.md5||{};t.md.md5=t.md.algorithms.md5=e,e.create=function(){f||a();var h=null,T=t.util.createBuffer(),k=new Array(16),S={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return S.start=function(){S.messageLength=0,S.fullMessageLength=S.messageLength64=[];for(var c=S.messageLengthSize/4,m=0;m<c;++m)S.fullMessageLength.push(0);return T=t.util.createBuffer(),h={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},S},S.start(),S.update=function(c,m){m==="utf8"&&(c=t.util.encodeUtf8(c));var E=c.length;S.messageLength+=E,E=[E/4294967296>>>0,E>>>0];for(var x=S.fullMessageLength.length-1;x>=0;--x)S.fullMessageLength[x]+=E[1],E[1]=E[0]+(S.fullMessageLength[x]/4294967296>>>0),S.fullMessageLength[x]=S.fullMessageLength[x]>>>0,E[0]=E[1]/4294967296>>>0;return T.putBytes(c),p(h,k,T),(T.read>2048||T.length()===0)&&T.compact(),S},S.digest=function(){var c=t.util.createBuffer();c.putBytes(T.bytes());var m=S.fullMessageLength[S.fullMessageLength.length-1]+S.messageLengthSize,E=m&S.blockLength-1;c.putBytes(r.substr(0,S.blockLength-E));for(var x,s=0,g=S.fullMessageLength.length-1;g>=0;--g)x=S.fullMessageLength[g]*8+s,s=x/4294967296>>>0,c.putInt32Le(x>>>0);var y={h0:h.h0,h1:h.h1,h2:h.h2,h3:h.h3};p(y,k,c);var b=t.util.createBuffer();return b.putInt32Le(y.h0),b.putInt32Le(y.h1),b.putInt32Le(y.h2),b.putInt32Le(y.h3),b},S};var r=null,l=null,C=null,v=null,f=!1;function a(){r="€",r+=t.util.fillString("\0",64),l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],C=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],v=new Array(64);for(var h=0;h<64;++h)v[h]=Math.floor(Math.abs(Math.sin(h+1))*4294967296);f=!0}function p(h,T,k){for(var S,c,m,E,x,s,g,y,b=k.length();b>=64;){for(c=h.h0,m=h.h1,E=h.h2,x=h.h3,y=0;y<16;++y)T[y]=k.getInt32Le(),s=x^m&(E^x),S=c+s+v[y]+T[y],g=C[y],c=x,x=E,E=m,m+=S<<g|S>>>32-g;for(;y<32;++y)s=E^x&(m^E),S=c+s+v[y]+T[l[y]],g=C[y],c=x,x=E,E=m,m+=S<<g|S>>>32-g;for(;y<48;++y)s=m^E^x,S=c+s+v[y]+T[l[y]],g=C[y],c=x,x=E,E=m,m+=S<<g|S>>>32-g;for(;y<64;++y)s=E^(m|~x),S=c+s+v[y]+T[l[y]],g=C[y],c=x,x=E,E=m,m+=S<<g|S>>>32-g;h.h0=h.h0+c|0,h.h1=h.h1+m|0,h.h2=h.h2+E|0,h.h3=h.h3+x|0,b-=64}}return ur.exports}var fr={exports:{}},ma;function Et(){if(ma)return fr.exports;ma=1;var t=ve();me();var e=fr.exports=t.pem=t.pem||{};e.encode=function(C,v){v=v||{};var f="-----BEGIN "+C.type+`-----\r
19`,a;if(C.procType&&(a={name:"Proc-Type",values:[String(C.procType.version),C.procType.type]},f+=r(a)),C.contentDomain&&(a={name:"Content-Domain",values:[C.contentDomain]},f+=r(a)),C.dekInfo&&(a={name:"DEK-Info",values:[C.dekInfo.algorithm]},C.dekInfo.parameters&&a.values.push(C.dekInfo.parameters),f+=r(a)),C.headers)for(var p=0;p<C.headers.length;++p)f+=r(C.headers[p]);return C.procType&&(f+=`\r
20`),f+=t.util.encode64(C.body,v.maxline||64)+`\r
21`,f+="-----END "+C.type+`-----\r
22`,f},e.decode=function(C){for(var v=[],f=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,a=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,p=/\r?\n/,h;h=f.exec(C),!!h;){var T=h[1];T==="NEW CERTIFICATE REQUEST"&&(T="CERTIFICATE REQUEST");var k={type:T,procType:null,contentDomain:null,dekInfo:null,headers:[],body:t.util.decode64(h[3])};if(v.push(k),!!h[2]){for(var S=h[2].split(p),c=0;h&&c<S.length;){for(var m=S[c].replace(/\s+$/,""),E=c+1;E<S.length;++E){var x=S[E];if(!/\s/.test(x[0]))break;m+=x,c=E}if(h=m.match(a),h){for(var s={name:h[1],values:[]},g=h[2].split(","),y=0;y<g.length;++y)s.values.push(l(g[y]));if(k.procType)if(!k.contentDomain&&s.name==="Content-Domain")k.contentDomain=g[0]||"";else if(!k.dekInfo&&s.name==="DEK-Info"){if(s.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');k.dekInfo={algorithm:g[0],parameters:g[1]||null}}else k.headers.push(s);else{if(s.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(s.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');k.procType={version:g[0],type:g[1]}}}++c}if(k.procType==="ENCRYPTED"&&!k.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(v.length===0)throw new Error("Invalid PEM formatted message.");return v};function r(C){for(var v=C.name+": ",f=[],a=function(S,c){return" "+c},p=0;p<C.values.length;++p)f.push(C.values[p].replace(/^(\S+\r\n)/,a));v+=f.join(",")+`\r
23`;for(var h=0,T=-1,p=0;p<v.length;++p,++h)if(h>65&&T!==-1){var k=v[T];k===","?(++T,v=v.substr(0,T)+`\r
24 `+v.substr(T)):v=v.substr(0,T)+`\r
25`+k+v.substr(T+1),h=p-T-1,T=-1,++p}else(v[p]===" "||v[p]==="	"||v[p]===",")&&(T=p);return v}function l(C){return C.replace(/^\s+/,"")}return fr.exports}var hr={exports:{}},dr,Ca;function kt(){if(Ca)return dr;Ca=1;var t=ve();tr(),fa(),me(),dr=t.des=t.des||{},t.des.startEncrypting=function(c,m,E,x){var s=S({key:c,output:E,decrypt:!1,mode:x||(m===null?"ECB":"CBC")});return s.start(m),s}
25,t.des.createEncryptionCipher=function(c,m){return S({key:c,output:null,decrypt:!1,mode:m})},t.des.startDecrypting=function(c,m,E,x){var s=S({key:c,output:E,decrypt:!0,mode:x||(m===null?"ECB":"CBC")});return s.start(m),s},t.des.createDecryptionCipher=function(c,m){return S({key:c,output:null,decrypt:!0,mode:m})},t.des.Algorithm=function(c,m){var E=this;E.name=c,E.mode=new m({blockSize:8,cipher:{encrypt:function(x,s){return k(E._keys,x,s,!1)},decrypt:function(x,s){return k(E._keys,x,s,!0)}}}),E._init=!1},t.des.Algorithm.prototype.initialize=function(c){if(!this._init){var m=t.util.createBuffer(c.key);if(this.name.indexOf("3DES")===0&&m.length()!==24)throw new Error("Invalid Triple-DES key size: "+m.length()*8);this._keys=T(m),this._init=!0}},e("DES-ECB",t.cipher.modes.ecb),e("DES-CBC",t.cipher.modes.cbc),e("DES-CFB",t.cipher.modes.cfb),e("DES-OFB",t.cipher.modes.ofb),e("DES-CTR",t.cipher.modes.ctr),e("3DES-ECB",t.cipher.modes.ecb),e("3DES-CBC",t.cipher.modes.cbc),e("3DES-CFB",t.cipher.modes.cfb),e("3DES-OFB",t.cipher.modes.ofb),e("3DES-CTR",t.cipher.modes.ctr);function e(c,m){var E=function(){return new t.des.Algorithm(c,m)};t.cipher.registerAlgorithm(c,E)}var r=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],l=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],C=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],v=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],f=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],a=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],p=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function T(c){for(var m=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,660
2552,536936960,536936964],E=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],x=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],s=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],y=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],b=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],R=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],i=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],n=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],I=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],N=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],U=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],L=c.length()>8?3:1,O=[],H=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],F=0,K,q=0;q<L;q++){var Q=c.getInt32(),j=c.getInt32();K=(Q>>>4^j)&252645135,j^=K,Q^=K<<4,K=(j>>>-16^Q)&65535,Q^=K,j^=K<<-16,K=(Q>>>2^j)&858993459,j^=K,Q^=K<<2,K=(j>>>-16^Q)&65535,Q^=K,j^=K<<-16,K=(Q>>>1^j)&1431655765,j^=K,Q^=K<<1,K=(j>>>8^Q)&16711935,Q^=K,j^=K<<8,K=(Q>>>1^j)&1431655765,j^=K,Q^=K<<1,K=Q<<8|j>>>20&240,Q=j<<24|j<<8&16711680|j>>>8&65280|j>>>24&240,j=K;for(var ee=0;ee<H.length;++ee){H[ee]?(Q=Q<<2|Q>>>26,j=j<<2|j>>>26):(Q=Q<<1|Q>>>27,j=j<<1|j>>>27),Q&=-15,j&=-15;var se=m[Q>>>28]|E[Q>>>24&15]|x[Q>>>20&15]|s[Q>>>16&15]|g[Q>>>12&15]|y[Q>>>8&15]|b[Q>>>4&15],oe=R[j>>>28]|u[j>>>24&15]|i[j>>>20&15]|n[j>>>16&15]|I[j>>>12&15]|N[j>>>8&15]|U[j>>>4&15];K=(oe>>>16^se)&65535,O[F++]=se^K,O[F++]=oe^K<<16}}return O}function k(c,m,E,x){var s=c.length===32?3:9,g;s===3?g=x?[30,-2,-2]:[0,32,2]:g=x?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var y,b=m[0],R=m[1];y=(b>>>4^R)&252645135,R^=y,b^=y<<4,y=(b>>>16^R)&65535,R^=y,b^=y<<16,y=(R>>>2^b)&858993459,b^=y,R^=y<<2,y=(R>>>8^b)&16711935,b^=y,R^=y<<8,y=(b>>>1^R)&1431655765,R^=y,b^=y<<1,b=b<<1|b>>>31,R=R<<1|R>>>31;for(var u=0;u<s;u+=3){for(var i=g[u+1],n=g[u+2],I=g[u];I!=i;I+=n){var N=R^c[I],U=(R>>>4|R<<28)^c[I+1];y=b,b=R,R=y^(l[N>>>24&63]|v[N>>>16&63]|a[N>>>8&63]|h[N&63]|r[U>>>24&63]|C[U>>>16&63]|f[U>>>8&63]|p[U&63])}y=b,b=R,R=y}b=b>>>1|b<<31,R=R>>>1|R<<31,y=(b>>>1^R)&1431655765,R^=y,b^=y<<1,y=(R>>>8^b)&16711935,b^=y,R^=y<<8,y=(R>>>2^b)&858993459,b^=y,R^=y<<2,y=(b>>>16^R)&65535,R^=y,b^=y<<16,y=(b>>>4^R)&252645135,R^=y,b^=y<<4,E[0]=b,E[1]=R}function S(c){c=c||{};var m=(c.mode||"CBC").toUpperCase(),E="DES-"+m,x;c.decrypt?x=t.cipher.createDecipher(E,c.key):x=t.cipher.createCipher(E,c.key);var s=x.start;return x.start=function(g,y){var b=null;y instanceof t.util.ByteBuffer&&(b=y,y={}),y=y||{},y.output=b,y.iv=g,s.call(x,y)},x}return dr}var pr,Ea;function gr(){if(Ea)return pr;Ea=1;var t=ve();wt(),ut(),me();var e=t.pkcs5=t.pkcs5||{},r;return t.util.isNodejs&&!t.options.usePureJavaScript&&(r=bt),pr=t.pbkdf2=e.pbkdf2=function(l,C,v,f,a,p){if(typeof a=="function"&&(p=a,a=null),t.util.isNodejs&&!t.options.usePureJavaScript&&r.pbkdf2&&(a===null||typeof a!="object")&&(r.pbkdf2Sync.length>4||!a||a==="sha1"))return typeof a!="string"&&(a="sha1"),l=Buffer.from(l,"binary"),C=Buffer.from(C,"binary"),p?r.pbkdf2Sync.length===4?r.pbkdf2(l,C,v,f,function(u,i){if(u)return p(u);p(null,i.toString("binary"))}):r.pbkdf2(l,C,v,f,a,function(u,i){if(u)return p(u);p(null,i.toString("binary"))}):r.pbkdf2Sync.length===4?r.pbkdf2Sync(l,C,v,f).toString("binary"):r.pbkdf2Sync(l,C,v,f,a).toString("binary");if((typeof a>
25"u"||a===null)&&(a="sha1"),typeof a=="string"){if(!(a in t.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=t.md[a].create()}var h=a.digestLength;if(f>4294967295*h){var T=new Error("Derived key is too long.");if(p)return p(T);throw T}var k=Math.ceil(f/h),S=f-(k-1)*h,c=t.hmac.create();c.start(a,l);var m="",E,x,s;if(!p){for(var g=1;g<=k;++g){c.start(null,null),c.update(C),c.update(t.util.int32ToBytes(g)),E=s=c.digest().getBytes();for(var y=2;y<=v;++y)c.start(null,null),c.update(s),x=c.digest().getBytes(),E=t.util.xorBytes(E,x,h),s=x;m+=g<k?E:E.substr(0,S)}return m}var g=1,y;function b(){if(g>k)return p(null,m);c.start(null,null),c.update(C),c.update(t.util.int32ToBytes(g)),E=s=c.digest().getBytes(),y=2,R()}function R(){if(y<=v)return c.start(null,null),c.update(s),x=c.digest().getBytes(),E=t.util.xorBytes(E,x,h),s=x,++y,t.util.setImmediate(R);m+=g<k?E:E.substr(0,S),++g,b()}b()},pr}var Ut={exports:{}},vr={exports:{}},xa;function Sa(){if(xa)return vr.exports;xa=1;var t=ve();ut(),me();var e=vr.exports=t.sha256=t.sha256||{};t.md.sha256=t.md.algorithms.sha256=e,e.create=function(){l||v();var a=null,p=t.util.createBuffer(),h=new Array(64),T={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return T.start=function(){T.messageLength=0,T.fullMessageLength=T.messageLength64=[];for(var k=T.messageLengthSize/4,S=0;S<k;++S)T.fullMessageLength.push(0);return p=t.util.createBuffer(),a={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},T},T.start(),T.update=function(k,S){S==="utf8"&&(k=t.util.encodeUtf8(k));var c=k.length;T.messageLength+=c,c=[c/4294967296>>>0,c>>>0];for(var m=T.fullMessageLength.length-1;m>=0;--m)T.fullMessageLength[m]+=c[1],c[1]=c[0]+(T.fullMessageLength[m]/4294967296>>>0),T.fullMessageLength[m]=T.fullMessageLength[m]>>>0,c[0]=c[1]/4294967296>>>0;return p.putBytes(k),f(a,h,p),(p.read>2048||p.length()===0)&&p.compact(),T},T.digest=function(){var k=t.util.createBuffer();k.putBytes(p.bytes());var S=T.fullMessageLength[T.fullMessageLength.length-1]+T.messageLengthSize,c=S&T.blockLength-1;k.putBytes(r.substr(0,T.blockLength-c));for(var m,E,x=T.fullMessageLength[0]*8,s=0;s<T.fullMessageLength.length-1;++s)m=T.fullMessageLength[s+1]*8,E=m/4294967296>>>0,x+=E,k.putInt32(x>>>0),x=m>>>0;k.putInt32(x);var g={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3,h4:a.h4,h5:a.h5,h6:a.h6,h7:a.h7};f(g,h,k);var y=t.util.createBuffer();return y.putInt32(g.h0),y.putInt32(g.h1),y.putInt32(g.h2),y.putInt32(g.h3),y.putInt32(g.h4),y.putInt32(g.h5),y.putInt32(g.h6),y.putInt32(g.h7),y},T};var r=null,l=!1,C=null;function v(){r="€",r+=t.util.fillString("\0",64),C=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0}function f(a,p,h){for(var T,k,S,c,m,E,x,s,g,y,b,R,u,i,n,I=h.length();I>=64;){for(x=0;x<16;++x)p[x]=h.getInt32();for(;x<64;++x)T=p[x-2],T=(T>>>17|T<<15)^(T>>>19|T<<13)^T>>>10,k=p[x-15],k=(k>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,p[x]=T+p[x-7]+k+p[x-16]|0;for(s=a.h0,g=a.h1,y=a.h2,b=a.h3,R=a.h4,u=a.h5,i=a.h6,n=a.h7,x=0;x<64;++x)c=(R>>>6|R<<26)^(R>>>11|R<<21)^(R>>>25|R<<7),m=i^R&(u^i),S=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),E=s&g|y&(s^g),T=n+c+m+C[x]+p[x],k=S+E,n=i,i=u,u=R,R=b+T>>>0,b=y,y=g,g=s,s=T+k>>>0;a.h0=a.h0+s|0,a.h1=a.h1+g|0,a.h2=a.h2+y|0,a.h3=a.h3+b|0,a.h4=a.h4+R|0,a.h5=a.h5+u|0,a.h6=a.h6+i|0,a.h7=a.h7+n|0,I-=64}}return vr.exports}var yr={exports:{}},Ta;function Ia(){if(Ta)return yr.exports;Ta=1;var t=ve();me();var e=null;t.util.isNodejs&&!t.options.usePureJavaScript&&!process.versions["node-webkit"]&&(e=bt);var r=yr.exports=t.prng=t.prng||{};
25return r.create=function(l){for(var C={plugin:l,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},v=l.md,f=new Array(32),a=0;a<32;++a)f[a]=v.create();C.pools=f,C.pool=0,C.generate=function(S,c){if(!c)return C.generateSync(S);var m=C.plugin.cipher,E=C.plugin.increment,x=C.plugin.formatKey,s=C.plugin.formatSeed,g=t.util.createBuffer();C.key=null,y();function y(b){if(b)return c(b);if(g.length()>=S)return c(null,g.getBytes(S));if(C.generated>1048575&&(C.key=null),C.key===null)return t.util.nextTick(function(){p(y)});var R=m(C.key,C.seed);C.generated+=R.length,g.putBytes(R),C.key=x(m(C.key,E(C.seed))),C.seed=s(m(C.key,C.seed)),t.util.setImmediate(y)}},C.generateSync=function(S){var c=C.plugin.cipher,m=C.plugin.increment,E=C.plugin.formatKey,x=C.plugin.formatSeed;C.key=null;for(var s=t.util.createBuffer();s.length()<S;){C.generated>1048575&&(C.key=null),C.key===null&&h();var g=c(C.key,C.seed);C.generated+=g.length,s.putBytes(g),C.key=E(c(C.key,m(C.seed))),C.seed=x(c(C.key,C.seed))}return s.getBytes(S)};function p(S){if(C.pools[0].messageLength>=32)return T(),S();var c=32-C.pools[0].messageLength<<5;C.seedFile(c,function(m,E){if(m)return S(m);C.collect(E),T(),S()})}function h(){if(C.pools[0].messageLength>=32)return T();var S=32-C.pools[0].messageLength<<5;C.collect(C.seedFileSync(S)),T()}function T(){C.reseeds=C.reseeds===4294967295?0:C.reseeds+1;var S=C.plugin.md.create();S.update(C.keyBytes);for(var c=1,m=0;m<32;++m)C.reseeds%c===0&&(S.update(C.pools[m].digest().getBytes()),C.pools[m].start()),c=c<<1;C.keyBytes=S.digest().getBytes(),S.start(),S.update(C.keyBytes);var E=S.digest().getBytes();C.key=C.plugin.formatKey(C.keyBytes),C.seed=C.plugin.formatSeed(E),C.generated=0}function k(S){var c=null,m=t.util.globalScope,E=m.crypto||m.msCrypto;E&&E.getRandomValues&&(c=function(n){return E.getRandomValues(n)});var x=t.util.createBuffer();if(c)for(;x.length()<S;){var s=Math.max(1,Math.min(S-x.length(),65536)/4),g=new Uint32Array(Math.floor(s));try{c(g);for(var y=0;y<g.length;++y)x.putInt32(g[y])}catch(n){if(!(typeof QuotaExceededError<"u"&&n instanceof QuotaExceededError))throw n}}if(x.length()<S)for(var b,R,u,i=Math.floor(Math.random()*65536);x.length()<S;){R=16807*(i&65535),b=16807*(i>>16),R+=(b&32767)<<16,R+=b>>15,R=(R&2147483647)+(R>>31),i=R&4294967295;for(var y=0;y<3;++y)u=i>>>(y<<3),u^=Math.floor(Math.random()*256),x.putByte(u&255)}return x.getBytes(S)}return e?(C.seedFile=function(S,c){e.randomBytes(S,function(m,E){if(m)return c(m);c(null,E.toString())})},C.seedFileSync=function(S){return e.randomBytes(S).toString()}):(C.seedFile=function(S,c){try{c(null,k(S))}catch(m){c(m)}},C.seedFileSync=k),C.collect=function(S){for(var c=S.length,m=0;m<c;++m)C.pools[C.pool].update(S.substr(m,1)),C.pool=C.pool===31?0:C.pool+1},C.collectInt=function(S,c){for(var m="",E=0;E<c;E+=8)m+=String.fromCharCode(S>>E&255);C.collect(m)},C.registerWorker=function(S){if(S===self)C.seedFile=function(m,E){function x(s){var g=s.data;g.forge&&g.forge.prng&&(self.removeEventListener("message",x),E(g.forge.prng.err,g.forge.prng.bytes))}self.addEventListener("message",x),self.postMessage({forge:{prng:{needed:m}}})};else{var c=function(m){var E=m.data;E.forge&&E.forge.prng&&C.seedFile(E.forge.prng.needed,function(x,s){S.postMessage({forge:{prng:{err:x,bytes:s}}})})};S.addEventListener("message",c)}},C},yr.exports}var Aa;function et(){if(Aa)return Ut.exports;Aa=1;var t=ve();return vt(),Sa(),Ia(),me(),(function(){if(t.random&&t.random.getBytes){Ut.exports=t.random;return}(function(e){var r={},l=new Array(4),C=t.util.createBuffer();r.formatKey=function(S){var c=t.util.createBuffer(S);return S=new Array(4),S[0]=c.getInt32(),S[1]=c.getInt32(),S[2]=c.getInt32(),S[3]=c.getInt32(),t.aes._expandKey(S,!1)},r.formatSeed=function(S){var c=t.util.createBuffer(S);return S=new Array(4),S[0]=c.getInt32(),S[1]=c.getInt32(),S[2]=c.getInt32(),S[3]=c.getInt32(),S},r.cipher=function(S,c){return t.aes._updateBlock(S,c,l,!1),C.putInt32(l[0]),C.putInt32(l[1]),C.putInt32(l[2]),C.putInt32(l[3]),C.getBytes()},r.increment=function(S){return++S[3],S},r.md=t.md.sha256;function v(){var S=t.prng.create(r);return S.getBytes=function(c,m){return S.generate(c,m)},S.getBytesSync=function(c){return S.generate(c)},S}var f=v(),a=null,p=t.util.globalScope,h=p.crypto||p.msCrypto;if(h&&h.getRandomValues&&(a=function(S){return h.getRandomValues(S)}),t.options.usePureJavaScript||!t.util.isNodejs&&!a){if(f.collectInt(+new Date,32),typeof navigator<"u"){var T="";for(var k in navigator)try{typeof navigator[k]=="string"&&(T+=navigator[k])}catch{}f.collect(T),T=null}e&&(e().mousemove(function(S){f.collectInt(S.clientX,16),f.collectInt(S.clientY,16)}),e().keypress(function(S){f.collectInt(S.charCode,8)}))}if(!t.random)t.random=f;else for(var k in f)t.random[k]=f[k];t.random.createInstance=v,Ut.exports=t.random})(typeof jQuery<"u"?jQuery:null)})(),Ut.exports}var mr,ba;function Ba(){if(ba)return mr;ba=1;var t=ve();me();var e=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,23
256,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],r=[1,2,3,5],l=function(f,a){return f<<a&65535|(f&65535)>>16-a},C=function(f,a){return(f&65535)>>a|f<<16-a&65535};mr=t.rc2=t.rc2||{},t.rc2.expandKey=function(f,a){typeof f=="string"&&(f=t.util.createBuffer(f)),a=a||128;var p=f,h=f.length(),T=a,k=Math.ceil(T/8),S=255>>(T&7),c;for(c=h;c<128;c++)p.putByte(e[p.at(c-1)+p.at(c-h)&255]);for(p.setAt(128-k,e[p.at(128-k)&S]),c=127-k;c>=0;c--)p.setAt(c,e[p.at(c+1)^p.at(c+k)]);return p};var v=function(f,a,p){var h=!1,T=null,k=null,S=null,c,m,E,x,s=[];for(f=t.rc2.expandKey(f,a),E=0;E<64;E++)s.push(f.getInt16Le());p?(c=function(b){for(E=0;E<4;E++)b[E]+=s[x]+(b[(E+3)%4]&b[(E+2)%4])+(~b[(E+3)%4]&b[(E+1)%4]),b[E]=l(b[E],r[E]),x++},m=function(b){for(E=0;E<4;E++)b[E]+=s[b[(E+3)%4]&63]}):(c=function(b){for(E=3;E>=0;E--)b[E]=C(b[E],r[E]),b[E]-=s[x]+(b[(E+3)%4]&b[(E+2)%4])+(~b[(E+3)%4]&b[(E+1)%4]),x--},m=function(b){for(E=3;E>=0;E--)b[E]-=s[b[(E+3)%4]&63]});var g=function(b){var R=[];for(E=0;E<4;E++){var u=T.getInt16Le();S!==null&&(p?u^=S.getInt16Le():S.putInt16Le(u)),R.push(u&65535)}x=p?0:63;for(var i=0;i<b.length;i++)for(var n=0;n<b[i][0];n++)b[i][1](R);for(E=0;E<4;E++)S!==null&&(p?S.putInt16Le(R[E]):R[E]^=S.getInt16Le()),k.putInt16Le(R[E])},y=null;return y={start:function(b,R){b&&typeof b=="string"&&(b=t.util.createBuffer(b)),h=!1,T=t.util.createBuffer(),k=R||new t.util.createBuffer,S=b,y.output=k},update:function(b){for(h||T.putBuffer(b);T.length()>=8;)g([[5,c],[1,m],[6,c],[1,m],[5,c]])},finish:function(b){var R=!0;if(p)if(b)R=b(8,T,!p);else{var u=T.length()===8?8:8-T.length();T.fillWithByte(u,u)}if(R&&(h=!0,y.update()),!p&&(R=T.length()===0,R))if(b)R=b(8,k,!p);else{var i=k.length(),n=k.at(i-1);n>i?R=!1:k.truncate(n)}return R}},y};return t.rc2.startEncrypting=function(f,a,p){var h=t.rc2.createEncryptionCipher(f,128);return h.start(a,p),h},t.rc2.createEncryptionCipher=function(f,a){return v(f,a,!0)},t.rc2.startDecrypting=function(f,a,p){var h=t.rc2.createDecryptionCipher(f,128);return h.start(a,p),h},t.rc2.createDecryptionCipher=function(f,a){return v(f,a,!1)},mr}var Cr,wa;function Ft(){if(wa)return Cr;wa=1;var t=ve();Cr=t.jsbn=t.jsbn||{};var e;function r(A,w,P){this.data=[],A!=null&&(typeof A=="number"?this.fromNumber(A,w,P):w==null&&typeof A!="string"?this.fromString(A,256):this.fromString(A,w))}t.jsbn.BigInteger=r;function l(){return new r(null)}function C(A,w,P,G,Y,J){for(;--J>=0;){var ne=w*this.data[A++]+P.data[G]+Y;Y=Math.floor(ne/67108864),P.data[G++]=ne&67108863}return Y}function v(A,w,P,G,Y,J){for(var ne=w&32767,re=w>>15;--J>=0;){var Ce=this.data[A]&32767,ze=this.data[A++]>>15,Ze=re*Ce+ze*ne;Ce=ne*Ce+((Ze&32767)<<15)+P.data[G]+(Y&1073741823),Y=(Ce>>>30)+(Ze>>>15)+re*ze+(Y>>>30),P.data[G++]=Ce&1073741823}return Y}function f(A,w,P,G,Y,J){for(var ne=w&16383,re=w>>14;--J>=0;){var Ce=this.data[A]&16383,ze=this.data[A++]>>14,Ze=re*Ce+ze*ne;Ce=ne*Ce+((Ze&16383)<<14)+P.data[G]+Y,Y=(Ce>>28)+(Ze>>14)+re*ze,P.data[G++]=Ce&268435455}return Y}typeof navigator>"u"?(r.prototype.am=f,e=28):navigator.appName=="Microsoft Internet Explorer"?(r.prototype.am=v,e=30):navigator.appName!="Netscape"?(r.prototype.am=C,e=26):(r.prototype.am=f,e=28),r.prototype.DB=e,r.prototype.DM=(1<<e)-1,r.prototype.DV=1<<e;var a=52;r.prototype.FV=Math.pow(2,a),r.prototype.F1=a-e,r.prototype.F2=2*e-a;var p="0123456789abcdefghijklmnopqrstuvwxyz",h=new Array,T,k;for(T=48,k=0;k<=9;++k)h[T++]=k;for(T=97,k=10;k<36;++k)h[T++]=k;for(T=65,k=10;k<36;++k)h[T++]=k;function S(A){return p.charAt(A)}function c(A,w){var P=h[A.charCodeAt(w)];return P??-1}function m(A){for(var w=this.t-1;w>=0;--w)A.data[w]=this.data[w];A.t=this.t,A.s=this.s}function E(A){this.t=1,this.s=A<0?-1:0,A>0?this.data[0]=A:A<-1?this.data[0]=A+this.DV:this.t=0}function x(A){var w=l();return w.fromInt(A),w}function s(A,w){var P;if(w==16)P=4;else if(w==8)P=3;else if(w==256)P=8;else if(w==2)P=1;else if(w==32)P=5;else if(w==4)P=2;else{this.fromRadix(A,w);return}this.t=0,this.s=0;for(var G=A.length,Y=!1,J=0;--G>=0;
25){var ne=P==8?A[G]&255:c(A,G);if(ne<0){A.charAt(G)=="-"&&(Y=!0);continue}Y=!1,J==0?this.data[this.t++]=ne:J+P>this.DB?(this.data[this.t-1]|=(ne&(1<<this.DB-J)-1)<<J,this.data[this.t++]=ne>>this.DB-J):this.data[this.t-1]|=ne<<J,J+=P,J>=this.DB&&(J-=this.DB)}P==8&&(A[0]&128)!=0&&(this.s=-1,J>0&&(this.data[this.t-1]|=(1<<this.DB-J)-1<<J)),this.clamp(),Y&&r.ZERO.subTo(this,this)}function g(){for(var A=this.s&this.DM;this.t>0&&this.data[this.t-1]==A;)--this.t}function y(A){if(this.s<0)return"-"+this.negate().toString(A);var w;if(A==16)w=4;else if(A==8)w=3;else if(A==2)w=1;else if(A==32)w=5;else if(A==4)w=2;else return this.toRadix(A);var P=(1<<w)-1,G,Y=!1,J="",ne=this.t,re=this.DB-ne*this.DB%w;if(ne-- >0)for(re<this.DB&&(G=this.data[ne]>>re)>0&&(Y=!0,J=S(G));ne>=0;)re<w?(G=(this.data[ne]&(1<<re)-1)<<w-re,G|=this.data[--ne]>>(re+=this.DB-w)):(G=this.data[ne]>>(re-=w)&P,re<=0&&(re+=this.DB,--ne)),G>0&&(Y=!0),Y&&(J+=S(G));return Y?J:"0"}function b(){var A=l();return r.ZERO.subTo(this,A),A}function R(){return this.s<0?this.negate():this}function u(A){var w=this.s-A.s;if(w!=0)return w;var P=this.t;if(w=P-A.t,w!=0)return this.s<0?-w:w;for(;--P>=0;)if((w=this.data[P]-A.data[P])!=0)return w;return 0}function i(A){var w=1,P;return(P=A>>>16)!=0&&(A=P,w+=16),(P=A>>8)!=0&&(A=P,w+=8),(P=A>>4)!=0&&(A=P,w+=4),(P=A>>2)!=0&&(A=P,w+=2),(P=A>>1)!=0&&(A=P,w+=1),w}function n(){return this.t<=0?0:this.DB*(this.t-1)+i(this.data[this.t-1]^this.s&this.DM)}function I(A,w){var P;for(P=this.t-1;P>=0;--P)w.data[P+A]=this.data[P];for(P=A-1;P>=0;--P)w.data[P]=0;w.t=this.t+A,w.s=this.s}function N(A,w){for(var P=A;P<this.t;++P)w.data[P-A]=this.data[P];w.t=Math.max(this.t-A,0),w.s=this.s}function U(A,w){var P=A%this.DB,G=this.DB-P,Y=(1<<G)-1,J=Math.floor(A/this.DB),ne=this.s<<P&this.DM,re;for(re=this.t-1;re>=0;--re)w.data[re+J+1]=this.data[re]>>G|ne,ne=(this.data[re]&Y)<<P;for(re=J-1;re>=0;--re)w.data[re]=0;w.data[J]=ne,w.t=this.t+J+1,w.s=this.s,w.clamp()}function L(A,w){w.s=this.s;var P=Math.floor(A/this.DB);if(P>=this.t){w.t=0;return}var G=A%this.DB,Y=this.DB-G,J=(1<<G)-1;w.data[0]=this.data[P]>>G;for(var ne=P+1;ne<this.t;++ne)w.data[ne-P-1]|=(this.data[ne]&J)<<Y,w.data[ne-P]=this.data[ne]>>G;G>0&&(w.data[this.t-P-1]|=(this.s&J)<<Y),w.t=this.t-P,w.clamp()}function O(A,w){for(var P=0,G=0,Y=Math.min(A.t,this.t);P<Y;)G+=this.data[P]-A.data[P],w.data[P++]=G&this.DM,G>>=this.DB;if(A.t<this.t){for(G-=A.s;P<this.t;)G+=this.data[P],w.data[P++]=G&this.DM,G>>=this.DB;G+=this.s}else{for(G+=this.s;P<A.t;)G-=A.data[P],w.data[P++]=G&this.DM,G>>=this.DB;G-=A.s}w.s=G<0?-1:0,G<-1?w.data[P++]=this.DV+G:G>0&&(w.data[P++]=G),w.t=P,w.clamp()}function H(A,w){var P=this.abs(),G=A.abs(),Y=P.t;for(w.t=Y+G.t;--Y>=0;)w.data[Y]=0;for(Y=0;Y<G.t;++Y)w.data[Y+P.t]=P.am(0,G.data[Y],w,Y,0,P.t);w.s=0,w.clamp(),this.s!=A.s&&r.ZERO.subTo(w,w)}function F(A){for(var w=this.abs(),P=A.t=2*w.t;--P>=0;)A.data[P]=0;for(P=0;P<w.t-1;++P){var G=w.am(P,w.data[P],A,2*P,0,1);(A.data[P+w.t]+=w.am(P+1,2*w.data[P],A,2*P+1,G,w.t-P-1))>=w.DV&&(A.data[P+w.t]-=w.DV,A.data[P+w.t+1]=1)}A.t>0&&(A.data[A.t-1]+=w.am(P,w.data[P],A,2*P,0,1)),A.s=0,A.clamp()}function K(A,w,P){var G=A.abs();if(!(G.t<=0)){var Y=this.abs();if(Y.t<G.t){w?.fromInt(0),P!=null&&this.copyTo(P);return}P==null&&(P=l());var J=l(),ne=this.s,re=A.s,Ce=this.DB-i(G.data[G.t-1]);Ce>0?(G.lShiftTo(Ce,J),Y.lShiftTo(Ce,P)):(G.copyTo(J),Y.copyTo(P));var ze=J.t,Ze=J.data[ze-1];if(Ze!=0){var Ye=Ze*(1<<this.F1)+(ze>1?J.data[ze-2]>>this.F2:0),ft=this.FV/Ye,Ht=(1<<this.F1)/Ye,at=1<<this.F2,nt=P.t,Gt=nt-ze,dt=w??l();for(J.dlShiftTo(Gt,dt),P.compareTo(dt)>=0&&(P.data[P.t++]=1,P.subTo(dt,P)),r.ONE.dlShiftTo(ze,dt),dt.subTo(J,J);J.t<ze;)J.data[J.t++]=0;for(;--Gt>=0;){var zr=P.data[--nt]==Ze?this.DM:Math.floor(P.data[nt]*ft+(P.data[nt-1]+at)*Ht);if((P.data[nt]+=J.am(0,zr,P,Gt,0,ze))<zr)for(J.dlShiftTo(Gt,dt),P.subTo(dt,P);P.data[nt]<--zr;)P.subTo(dt,P)}w!=null&&(P.drShiftTo(ze,w),ne!=re&&r.ZERO.subTo(w,w)),P.t=ze,P.clamp(),Ce>0&&P.rShiftTo(Ce,P),ne<0&&r.ZERO.subTo(P,P)}}}function q(A){var w=l();return this.abs().divRemTo(A,null,w),this.s<0&&w.compareTo(r.ZERO)>0&&A.subTo(w,w),w}function Q(A){this.m=A}
25function j(A){return A.s<0||A.compareTo(this.m)>=0?A.mod(this.m):A}function ee(A){return A}function se(A){A.divRemTo(this.m,null,A)}function oe(A,w,P){A.multiplyTo(w,P),this.reduce(P)}function fe(A,w){A.squareTo(w),this.reduce(w)}Q.prototype.convert=j,Q.prototype.revert=ee,Q.prototype.reduce=se,Q.prototype.mulTo=oe,Q.prototype.sqrTo=fe;function z(){if(this.t<1)return 0;var A=this.data[0];if((A&1)==0)return 0;var w=A&3;return w=w*(2-(A&15)*w)&15,w=w*(2-(A&255)*w)&255,w=w*(2-((A&65535)*w&65535))&65535,w=w*(2-A*w%this.DV)%this.DV,w>0?this.DV-w:-w}function le(A){this.m=A,this.mp=A.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<A.DB-15)-1,this.mt2=2*A.t}function Z(A){var w=l();return A.abs().dlShiftTo(this.m.t,w),w.divRemTo(this.m,null,w),A.s<0&&w.compareTo(r.ZERO)>0&&this.m.subTo(w,w),w}function be(A){var w=l();return A.copyTo(w),this.reduce(w),w}function he(A){for(;A.t<=this.mt2;)A.data[A.t++]=0;for(var w=0;w<this.m.t;++w){var P=A.data[w]&32767,G=P*this.mpl+((P*this.mph+(A.data[w]>>15)*this.mpl&this.um)<<15)&A.DM;for(P=w+this.m.t,A.data[P]+=this.m.am(0,G,A,w,0,this.m.t);A.data[P]>=A.DV;)A.data[P]-=A.DV,A.data[++P]++}A.clamp(),A.drShiftTo(this.m.t,A),A.compareTo(this.m)>=0&&A.subTo(this.m,A)}function d(A,w){A.squareTo(w),this.reduce(w)}function D(A,w,P){A.multiplyTo(w,P),this.reduce(P)}le.prototype.convert=Z,le.prototype.revert=be,le.prototype.reduce=he,le.prototype.mulTo=D,le.prototype.sqrTo=d;function _(){return(this.t>0?this.data[0]&1:this.s)==0}function o(A,w){if(A>4294967295||A<1)return r.ONE;var P=l(),G=l(),Y=w.convert(this),J=i(A)-1;for(Y.copyTo(P);--J>=0;)if(w.sqrTo(P,G),(A&1<<J)>0)w.mulTo(G,Y,P);else{var ne=P;P=G,G=ne}return w.revert(P)}function B(A,w){var P;return A<256||w.isEven()?P=new Q(w):P=new le(w),this.exp(A,P)}r.prototype.copyTo=m,r.prototype.fromInt=E,r.prototype.fromString=s,r.prototype.clamp=g,r.prototype.dlShiftTo=I,r.prototype.drShiftTo=N,r.prototype.lShiftTo=U,r.prototype.rShiftTo=L,r.prototype.subTo=O,r.prototype.multiplyTo=H,r.prototype.squareTo=F,r.prototype.divRemTo=K,r.prototype.invDigit=z,r.prototype.isEven=_,r.prototype.exp=o,r.prototype.toString=y,r.prototype.negate=b,r.prototype.abs=R,r.prototype.compareTo=u,r.prototype.bitLength=n,r.prototype.mod=q,r.prototype.modPowInt=B,r.ZERO=x(0),r.ONE=x(1);function V(){var A=l();return this.copyTo(A),A}function M(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function W(){return this.t==0?this.s:this.data[0]<<24>>24}function te(){return this.t==0?this.s:this.data[0]<<16>>16}function ie(A){return Math.floor(Math.LN2*this.DB/Math.log(A))}function X(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function ae(A){if(A==null&&(A=10),this.signum()==0||A<2||A>36)return"0";var w=this.chunkSize(A),P=Math.pow(A,w),G=x(P),Y=l(),J=l(),ne="";for(this.divRemTo(G,Y,J);Y.signum()>0;)ne=(P+J.intValue()).toString(A).substr(1)+ne,Y.divRemTo(G,Y,J);return J.intValue().toString(A)+ne}function ce(A,w){this.fromInt(0),w==null&&(w=10);for(var P=this.chunkSize(w),G=Math.pow(w,P),Y=!1,J=0,ne=0,re=0;re<A.length;++re){var Ce=c(A,re);if(Ce<0){A.charAt(re)=="-"&&this.signum()==0&&(Y=!0);continue}ne=w*ne+Ce,++J>=P&&(this.dMultiply(G),this.dAddOffset(ne,0),J=0,ne=0)}J>0&&(this.dMultiply(Math.pow(w,J)),this.dAddOffset(ne,0)),Y&&r.ZERO.subTo(this,this)}function ye(A,w,P){if(typeof w=="number")if(A<2)this.fromInt(1);else for(this.fromNumber(A,P),this.testBit(A-1)||this.bitwiseTo(r.ONE.shiftLeft(A-1),we,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(w);)this.dAddOffset(2,0),this.bitLength()>A&&this.subTo(r.ONE.shiftLeft(A-1),this);else{var G=new Array,Y=A&7;G.length=(A>>3)+1,w.nextBytes(G),Y>0?G[0]&=(1<<Y)-1:G[0]=0,this.fromString(G,256)}}function de(){var A=this.t,w=new Array;w[0]=this.s;var P=this.DB-A*this.DB%8,G,Y=0;if(A-- >0)for(P<this.DB&&(G=this.data[A]>>P)!=(this.s&this.DM)>>P&&(w[Y++]=G|this.s<<this.DB-P);A>=0;)P<8?(G=(this.data[A]&(1<<P)-1)<<8-P,G|=this.data[--A]>>(P+=this.DB-8)):(G=this.data[A]>>(P-=8)&255,P<=0&&(P+=this.DB,--A)),(G&128)!=0&&(G|=-256),Y==0&&(this.s&128)!=(G&128)&&++Y,(Y>0||G!=this.s)&&(w[Y++]=G);return w}function Se(A){return this.compareTo(A)==0}function Be(A){return this.compareTo(A)<0?this:A}function Ae(A){return this.compareTo(A)>0?this:A}function Te(A,w,P){var G,Y,J=Math.min(A.t,this.t);for(G=0;G<J;++G)P.data[G]=w(this.data[G],A.data[G]);if(A.t<this.t){for(Y=A.s&this.DM,G=J;G<this.t;++G)P.data[G]=w(this.data[G],Y);P.t=this.t}else{for(Y=this.s&this.DM,G=J;G<A.t;++G)P.data[G]=w(Y,A.data[G]);
25P.t=A.t}P.s=w(this.s,A.s),P.clamp()}function Ee(A,w){return A&w}function xe(A){var w=l();return this.bitwiseTo(A,Ee,w),w}function we(A,w){return A|w}function je(A){var w=l();return this.bitwiseTo(A,we,w),w}function Qe(A,w){return A^w}function $e(A){var w=l();return this.bitwiseTo(A,Qe,w),w}function Xe(A,w){return A&~w}function We(A){var w=l();return this.bitwiseTo(A,Xe,w),w}function Je(){for(var A=l(),w=0;w<this.t;++w)A.data[w]=this.DM&~this.data[w];return A.t=this.t,A.s=~this.s,A}function tt(A){var w=l();return A<0?this.rShiftTo(-A,w):this.lShiftTo(A,w),w}function lt(A){var w=l();return A<0?this.lShiftTo(-A,w):this.rShiftTo(A,w),w}function ct(A){if(A==0)return-1;var w=0;return(A&65535)==0&&(A>>=16,w+=16),(A&255)==0&&(A>>=8,w+=8),(A&15)==0&&(A>>=4,w+=4),(A&3)==0&&(A>>=2,w+=2),(A&1)==0&&++w,w}function ht(){for(var A=0;A<this.t;++A)if(this.data[A]!=0)return A*this.DB+ct(this.data[A]);return this.s<0?this.t*this.DB:-1}function mt(A){for(var w=0;A!=0;)A&=A-1,++w;return w}function xt(){for(var A=0,w=this.s&this.DM,P=0;P<this.t;++P)A+=mt(this.data[P]^w);return A}function Nt(A){var w=Math.floor(A/this.DB);return w>=this.t?this.s!=0:(this.data[w]&1<<A%this.DB)!=0}function Kt(A,w){var P=r.ONE.shiftLeft(A);return this.bitwiseTo(P,w,P),P}function Re(A){return this.changeBit(A,we)}function Le(A){return this.changeBit(A,Xe)}function De(A){return this.changeBit(A,Qe)}function ke(A,w){for(var P=0,G=0,Y=Math.min(A.t,this.t);P<Y;)G+=this.data[P]+A.data[P],w.data[P++]=G&this.DM,G>>=this.DB;if(A.t<this.t){for(G+=A.s;P<this.t;)G+=this.data[P],w.data[P++]=G&this.DM,G>>=this.DB;G+=this.s}else{for(G+=this.s;P<A.t;)G+=A.data[P],w.data[P++]=G&this.DM,G>>=this.DB;G+=A.s}w.s=G<0?-1:0,G>0?w.data[P++]=G:G<-1&&(w.data[P++]=this.DV+G),w.t=P,w.clamp()}function Ue(A){var w=l();return this.addTo(A,w),w}function Fe(A){var w=l();return this.subTo(A,w),w}function Pe(A){var w=l();return this.multiplyTo(A,w),w}function Oe(A){var w=l();return this.divRemTo(A,w,null),w}function Me(A){var w=l();return this.divRemTo(A,null,w),w}function Ve(A){var w=l(),P=l();return this.divRemTo(A,w,P),new Array(w,P)}function Ke(A){this.data[this.t]=this.am(0,A-1,this,0,0,this.t),++this.t,this.clamp()}function He(A,w){if(A!=0){for(;this.t<=w;)this.data[this.t++]=0;for(this.data[w]+=A;this.data[w]>=this.DV;)this.data[w]-=this.DV,++w>=this.t&&(this.data[this.t++]=0),++this.data[w]}}function Ie(){}function Ne(A){return A}function Ge(A,w,P){A.multiplyTo(w,P)}function qe(A,w){A.squareTo(w)}Ie.prototype.convert=Ne,Ie.prototype.revert=Ne,Ie.prototype.mulTo=Ge,Ie.prototype.sqrTo=qe;function os(A){return this.exp(A,new Ie)}function ls(A,w,P){var G=Math.min(this.t+A.t,w);for(P.s=0,P.t=G;G>0;)P.data[--G]=0;var Y;for(Y=P.t-this.t;G<Y;++G)P.data[G+this.t]=this.am(0,A.data[G],P,G,0,this.t);for(Y=Math.min(A.t,w);G<Y;++G)this.am(0,A.data[G],P,G,0,w-G);P.clamp()}function us(A,w,P){--w;var G=P.t=this.t+A.t-w;for(P.s=0;--G>=0;)P.data[G]=0;for(G=Math.max(w-this.t,0);G<A.t;++G)P.data[this.t+G-w]=this.am(w-G,A.data[G],P,0,0,this.t+G-w);P.clamp(),P.drShiftTo(1,P)}function St(A){this.r2=l(),this.q3=l(),r.ONE.dlShiftTo(2*A.t,this.r2),this.mu=this.r2.divide(A),this.m=A}function cs(A){if(A.s<0||A.t>2*this.m.t)return A.mod(this.m);if(A.compareTo(this.m)<0)return A;var w=l();return A.copyTo(w),this.reduce(w),w}function fs(A){return A}function hs(A){for(A.drShiftTo(this.m.t-1,this.r2),A.t>this.m.t+1&&(A.t=this.m.t+1,A.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);A.compareTo(this.r2)<0;)A.dAddOffset(1,this.m.t+1);for(A.subTo(this.r2,A);A.compareTo(this.m)>=0;)A.subTo(this.m,A)}function ds(A,w){A.squareTo(w),this.reduce(w)}function ps(A,w,P){A.multiplyTo(w,P),this.reduce(P)}St.prototype.convert=cs,St.prototype.revert=fs,St.prototype.reduce=hs,St.prototype.mulTo=ps,St.prototype.sqrTo=ds;function gs(A,w){var P=A.bitLength(),G,Y=x(1),J;if(P<=0)return Y;P<18?G=1:P<48?G=3:P<144?G=4:P<768?G=5:G=6,P<8?J=new Q(w):w.isEven()?J=new St(w):J=new le(w);var ne=new Array,re=3,Ce=G-1,ze=(1<<G)-1;if(ne[1]=J.convert(this),G>1){var Ze=l();for(J.sqrTo(ne[1],Ze);re<=ze;)ne[re]=l(),J.mulTo(Ze,ne[re-2],ne[re]),re+=2}var Ye=A.t-1,ft,Ht=!0,at=l(),nt;for(P=i(A.data[Ye])-1;Ye>=0;){for(P>=Ce?ft=A.data[Ye]>>P-Ce&ze:(ft=(A.data[Ye]&(1<<P+1)-1)<<Ce-P,Ye>0&&(ft|=A.data[Ye-1]>>this.DB+P-Ce)),re=G;(ft&1)==0;)ft>>=1,--re;if((P-=re)<0&&(P+=this.DB,--Ye),Ht)ne[ft].copyTo(Y),Ht=!1;else{for(;re>1;)J.sqrTo(Y,at),J.sqrTo(at,Y),re-=2;re>0?J.sqrTo(Y,at):(nt=Y,Y=at,at=nt),J.mulTo(at,ne[ft],Y)}for(;Ye>=0&&(A.data[Ye]&1<<P)==0;)J.sqrTo(Y,at),nt=Y,Y=at,at=nt,--P<0&&(P=this.DB-1,--Ye)}
25return J.revert(Y)}function vs(A){var w=this.s<0?this.negate():this.clone(),P=A.s<0?A.negate():A.clone();if(w.compareTo(P)<0){var G=w;w=P,P=G}var Y=w.getLowestSetBit(),J=P.getLowestSetBit();if(J<0)return w;for(Y<J&&(J=Y),J>0&&(w.rShiftTo(J,w),P.rShiftTo(J,P));w.signum()>0;)(Y=w.getLowestSetBit())>0&&w.rShiftTo(Y,w),(Y=P.getLowestSetBit())>0&&P.rShiftTo(Y,P),w.compareTo(P)>=0?(w.subTo(P,w),w.rShiftTo(1,w)):(P.subTo(w,P),P.rShiftTo(1,P));return J>0&&P.lShiftTo(J,P),P}function ys(A){if(A<=0)return 0;var w=this.DV%A,P=this.s<0?A-1:0;if(this.t>0)if(w==0)P=this.data[0]%A;else for(var G=this.t-1;G>=0;--G)P=(w*P+this.data[G])%A;return P}function ms(A){var w=A.isEven();if(this.isEven()&&w||A.signum()==0)return r.ZERO;for(var P=A.clone(),G=this.clone(),Y=x(1),J=x(0),ne=x(0),re=x(1);P.signum()!=0;){for(;P.isEven();)P.rShiftTo(1,P),w?((!Y.isEven()||!J.isEven())&&(Y.addTo(this,Y),J.subTo(A,J)),Y.rShiftTo(1,Y)):J.isEven()||J.subTo(A,J),J.rShiftTo(1,J);for(;G.isEven();)G.rShiftTo(1,G),w?((!ne.isEven()||!re.isEven())&&(ne.addTo(this,ne),re.subTo(A,re)),ne.rShiftTo(1,ne)):re.isEven()||re.subTo(A,re),re.rShiftTo(1,re);P.compareTo(G)>=0?(P.subTo(G,P),w&&Y.subTo(ne,Y),J.subTo(re,J)):(G.subTo(P,G),w&&ne.subTo(Y,ne),re.subTo(J,re))}if(G.compareTo(r.ONE)!=0)return r.ZERO;if(re.compareTo(A)>=0)return re.subtract(A);if(re.signum()<0)re.addTo(A,re);else return re;return re.signum()<0?re.add(A):re}var rt=[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],Cs=(1<<26)/rt[rt.length-1];function Es(A){var w,P=this.abs();if(P.t==1&&P.data[0]<=rt[rt.length-1]){for(w=0;w<rt.length;++w)if(P.data[0]==rt[w])return!0;return!1}if(P.isEven())return!1;for(w=1;w<rt.length;){for(var G=rt[w],Y=w+1;Y<rt.length&&G<Cs;)G*=rt[Y++];for(G=P.modInt(G);w<Y;)if(G%rt[w++]==0)return!1}return P.millerRabin(A)}function xs(A){var w=this.subtract(r.ONE),P=w.getLowestSetBit();if(P<=0)return!1;for(var G=w.shiftRight(P),Y=Ss(),J,ne=0;ne<A;++ne){do J=new r(this.bitLength(),Y);while(J.compareTo(r.ONE)<=0||J.compareTo(w)>=0);var re=J.modPow(G,this);if(re.compareTo(r.ONE)!=0&&re.compareTo(w)!=0){for(var Ce=1;Ce++<P&&re.compareTo(w)!=0;)if(re=re.modPowInt(2,this),re.compareTo(r.ONE)==0)return!1;if(re.compareTo(w)!=0)return!1}}return!0}function Ss(){return{nextBytes:function(A){for(var w=0;w<A.length;++w)A[w]=Math.floor(Math.random()*256)}}}return r.prototype.chunkSize=ie,r.prototype.toRadix=ae,r.prototype.fromRadix=ce,r.prototype.fromNumber=ye,r.prototype.bitwiseTo=Te,r.prototype.changeBit=Kt,r.prototype.addTo=ke,r.prototype.dMultiply=Ke,r.prototype.dAddOffset=He,r.prototype.multiplyLowerTo=ls,r.prototype.multiplyUpperTo=us,r.prototype.modInt=ys,r.prototype.millerRabin=xs,r.prototype.clone=V,r.prototype.intValue=M,r.prototype.byteValue=W,r.prototype.shortValue=te,r.prototype.signum=X,r.prototype.toByteArray=de,r.prototype.equals=Se,r.prototype.min=Be,r.prototype.max=Ae,r.prototype.and=xe,r.prototype.or=je,r.prototype.xor=$e,r.prototype.andNot=We,r.prototype.not=Je,r.prototype.shiftLeft=tt,r.prototype.shiftRight=lt,r.prototype.getLowestSetBit=ht,r.prototype.bitCount=xt,r.prototype.testBit=Nt,r.prototype.setBit=Re,r.prototype.clearBit=Le,r.prototype.flipBit=De,r.prototype.add=Ue,r.prototype.subtract=Fe,r.prototype.multiply=Pe,r.prototype.divide=Oe,r.prototype.remainder=Me,r.prototype.divideAndRemainder=Ve,r.prototype.modPow=gs,r.prototype.modInverse=ms,r.prototype.pow=os,r.prototype.gcd=vs,r.prototype.isProbablePrime=Es,Cr}var Er={exports:{}},xr={exports:{}},_a;function _t(){if(_a)return xr.exports;_a=1;var t=ve();ut(),me();var e=xr.exports=t.sha1=t.sha1||{};t.md.sha1=t.md.algorithms.sha1=e,e.create=function(){l||C();var f=null,a=t.util.createBuffer(),p=new Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return h.start=function(){h.messageLength=0,h.fullMessageLength=h.messageLength64=[];for(var T=h.messageLengthSize/4,k=0;k<T;++k)h.fullMessageLength.push(0);return a=t.util.createBuffer(),f={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},h},h.start(),h.update=function(T,k){k==="utf8"&&(T=t.util.encodeUtf8(T));var S=T.length;h.messageLength+=S,S=[S/4294967296>>>0,S>>>0];for(var c=h.fullMessageLength.length-1;c>=0;--c)h.fullMessageLength[c]+=S[1],S[1]=S[0]+(h.fullMessageLength[c]/4294967296>>>0),h.fullMessageLength[c]=h.fullMessageLength[c]>>>0,S[0]=S[1]/4294967296>>>0;return a.putBytes(T),v(f,p,a),(a.read>2048||a.length()===0)&&a.compact(),h},h.digest=function(){var T=t.util.createBuffer();T.putBytes(a.bytes());var k=h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize,S=k&h.blockLength-1;T.putBytes(r.substr(0,h.blockLength-S));for(var c,m,E=h.fullMessageLength[0]*8,x=0;x<h.fullMessageLength.length-1;++x)c=h.fullMessageLength[x+1]*8,m=c/4294967296>>>0,E+=m,T.putInt32(E>>>0),E=c>>>0;T.putInt32(E);var s={h0:f.h0,h1:f.h1,h2:f.h2,h3:f.h3,h4:f.h4};v(s,p,T);var g=t.util.createBuffer();return g.putInt32(s.h0),g.putInt32(s.h1),g.putInt32(s.h2),g.putInt32(s.h3),g.putInt32(s.h4),g},h};var r=null,l=!1;function C(){r="€",r+=t.util.fillString("\0",64),l=!0}function v(f,a,p){for(var h,T,k,S,c,m,E,x,s=p.length();s>=64;){for(T=f.h0,k=f.h1,S=f.h2,c=f.h3,m=f.h4,x=0;x<16;++x)h=p.getInt32(),a[x]=h,E=c^k&(S^c),h=(T<<5|T>>>27)+E+m+1518500249+h,m=c,c=S,S=(k<<30|k>>>2)>>>0,k=T,T=h;for(;x<20;++x)h=a[x-3]^a[x-8]^a[x-14]^a[x-16],h=h<<1|h>>>31,a[x]=h,E=c^k&(S^c),h=(T<<5|T>>>27)+E+m+1518500249+h,m=c,c=S,S=(k<<30|k>>>2)>>>0,k=T,T=h;for(;x<32;++x)h=a[x-3]^a[x-8]^a[x-14]^a[x-16],h=h<<1|h>>>31,a[x]=h,E=k^S^c,h=(T<<5|T>>>27)+E+m+1859775393+h,m=c,c=S,S=(k<<30|k>>>2)>>>0,k=T,T=h;for(;x<40;++x)h=a[x-6]^a[x-16]^a[x-28]^a[x-32],h=h<<2|h>>>30,a[x]=h,E=k^S^c,h=(T<<5|T>>>27)+E+m+1859775393+h,m=c,c=S,S=(k<<30|k>>>2)>>>0,k=T,T=h;for(;x<60;++x)h=a[x-6]^a[x-16]^a[x-28]^a[x-32],h=h<<2|h>>>30,a[x]=h,E=k&S|c&(k^S),h=(T<<5|T>>>27)+E+m+2400959708+h,m=c,c=S,S=(k<<30|k>>>2)>>>0,k=T,T=h;for(;x<80;++x)h=a[x-6]^a[x-16]^a[x-28]^a[x-32],h=h<<2|h>>>30,a[x]=h,E=k^S^c,h=(T<<5|T>>>27)+E+m+3395469782+h,m=c,c=S,S=(k<<30|k>>>2)>>>0,k=T,T=h;f.h0=f.h0+T|0,f.h1=f.h1+k|0,f.h2=f.h2+S|0,f.h3=f.h3+c|0,f.h4=f.h4+m|0,s-=64}}return xr.exports}var Na;function Ra(){if(Na)return Er.exports;Na=1;var t=ve();me(),et(),_t();var e=Er.exports=t.pkcs1=t.pkcs1||{};e.encode_rsa_oaep=function(l,C,v){var f,a,p,h;typeof v=="string"?(f=v,a=arguments[3]||void 0,p=arguments[4]||void 0):v&&(f=v.label||void 0,a=v.seed||void 0,p=v.md||void 0,v.mgf1&&v.mgf1.md&&(h=v.mgf1.md)),p?p.start():p=t.md.sha1.create(),h||(h=p);var T=Math.ceil(l.n.bitLength()/8),k=T-2*p.digestLength-2;if(C.length>k){var S=new Error("RSAES-OAEP input message length is too long.");throw S.length=C.length,S.maxLength=k,S}f||(f=""),p.update(f,"raw");for(var c=p.digest(),m="",E=k-C.length,x=0;x<E;x++)m+="\0";var s=c.getBytes()+m+"�"+C;if(!a)a=t.random.getBytes(p.digestLength);else if(a.length!==p.digestLength){var S=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw S.seedLength=a.length,S.digestLength=p.digestLength,S}var g=r(a,T-p.digestLength-1,h),y=t.util.xorBytes(s,g,s.length),b=r(y,p.digestLength,h),R=t.util.xorBytes(a,b,a.length);return"\0"+R+y},e.decode_rsa_oaep=function(l,C,v){var f,a,p;typeof v=="string"?(f=v,a=arguments[3]||void 0):v&&(f=v.label||void 0,a=v.md||void 0,v.mgf1&&v.mgf1.md&&(p=v.mgf1.md));var h=Math.ceil(l.n.bitLength()/8);if(C.length!==h){var y=new Error("RSAES-OAEP encoded message length is invali
25d.");throw y.length=C.length,y.expectedLength=h,y}if(a===void 0?a=t.md.sha1.create():a.start(),p||(p=a),h<2*a.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");f||(f=""),a.update(f,"raw");for(var T=a.digest().getBytes(),k=C.charAt(0),S=C.substring(1,a.digestLength+1),c=C.substring(1+a.digestLength),m=r(c,a.digestLength,p),E=t.util.xorBytes(S,m,S.length),x=r(E,h-a.digestLength-1,p),s=t.util.xorBytes(c,x,c.length),g=s.substring(0,a.digestLength),y=k!=="\0",b=0;b<a.digestLength;++b)y|=T.charAt(b)!==g.charAt(b);for(var R=1,u=a.digestLength,i=a.digestLength;i<s.length;i++){var n=s.charCodeAt(i),I=n&1^1,N=R?65534:0;y|=n&N,R=R&I,u+=R}if(y||s.charCodeAt(u)!==1)throw new Error("Invalid RSAES-OAEP padding.");return s.substring(u+1)};function r(l,C,v){v||(v=t.md.sha1.create());for(var f="",a=Math.ceil(C/v.digestLength),p=0;p<a;++p){var h=String.fromCharCode(p>>24&255,p>>16&255,p>>8&255,p&255);v.start(),v.update(l+h),f+=v.digest().getBytes()}return f.substring(0,C)}return Er.exports}var Pt={exports:{}},La;function Da(){if(La)return Pt.exports;La=1;var t=ve();return me(),Ft(),et(),(function(){if(t.prime){Pt.exports=t.prime;return}var e=Pt.exports=t.prime=t.prime||{},r=t.jsbn.BigInteger,l=[6,4,2,4,2,4,6,2],C=new r(null);C.fromInt(30);var v=function(S,c){return S|c};e.generateProbablePrime=function(S,c,m){typeof c=="function"&&(m=c,c={}),c=c||{};var E=c.algorithm||"PRIMEINC";typeof E=="string"&&(E={name:E}),E.options=E.options||{};var x=c.prng||t.random,s={nextBytes:function(g){for(var y=x.getBytesSync(g.length),b=0;b<g.length;++b)g[b]=y.charCodeAt(b)}};if(E.name==="PRIMEINC")return f(S,s,E.options,m);throw new Error("Invalid prime generation algorithm: "+E.name)};function f(S,c,m,E){return"workers"in m?h(S,c,m,E):a(S,c,m,E)}function a(S,c,m,E){var x=T(S,c),s=0,g=k(x.bitLength());"millerRabinTests"in m&&(g=m.millerRabinTests);var y=10;"maxBlockTime"in m&&(y=m.maxBlockTime),p(x,S,c,s,g,y,E)}function p(S,c,m,E,x,s,g){var y=+new Date;do{if(S.bitLength()>c&&(S=T(c,m)),S.isProbablePrime(x))return g(null,S);S.dAddOffset(l[E++%8],0)}while(s<0||+new Date-y<s);t.util.setImmediate(function(){p(S,c,m,E,x,s,g)})}function h(S,c,m,E){if(typeof Worker>"u")return a(S,c,m,E);var x=T(S,c),s=m.workers,g=m.workLoad||100,y=g*30/8,b=m.workerScript||"forge/prime.worker.js";if(s===-1)return t.util.estimateCores(function(u,i){u&&(i=2),s=i-1,R()});R();function R(){s=Math.max(1,s);for(var u=[],i=0;i<s;++i)u[i]=new Worker(b);for(var i=0;i<s;++i)u[i].addEventListener("message",I);var n=!1;function I(N){if(!n){var U=N.data;if(U.found){for(var L=0;L<u.length;++L)u[L].terminate();return n=!0,E(null,new r(U.prime,16))}x.bitLength()>S&&(x=T(S,c));var O=x.toString(16);N.target.postMessage({hex:O,workLoad:g}),x.dAddOffset(y,0)}}}}function T(S,c){var m=new r(S,c),E=S-1;return m.testBit(E)||m.bitwiseTo(r.ONE.shiftLeft(E),v,m),m.dAddOffset(31-m.mod(C).byteValue(),0),m}function k(S){return S<=100?27:S<=150?18:S<=200?15:S<=250?12:S<=300?9:S<=350?8:S<=400?7:S<=500?6:S<=600?5:S<=800?4:S<=1250?3:2}})(),Pt.exports}var Sr,ka;function Ot(){if(ka)return Sr;ka=1;var t=ve();if(ot(),Ft(),yt(),Ra(),Da(),et(),me(),typeof e>"u")var e=t.jsbn.BigInteger;var r=t.util.isNodejs?bt:null,l=t.asn1,C=t.util;t.pki=t.pki||{},Sr=t.pki.rsa=t.rsa=t.rsa||{};var v=t.pki,f=[6,4,2,4,2,4,6,2],a={name:"PrivateKeyInfo",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:l.Class.UNIVERSAL,type:l.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:l.Class.UNIVERSAL,type:l.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},p={name:"RSAPrivateKey",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,c
vendor: 2,383 bytes, line 25
25onstructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},h={name:"RSAPublicKey",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},T=t.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:l.Class.UNIVERSAL,type:l.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:l.Class.UNIVERSAL,type:l.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},k={name:"DigestInfo",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:l.Class.UNIVERSAL,type:l.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:l.Class.UNIVERSAL,type:l.Type.
25NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:l.Class.UNIVERSAL,type:l.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},S=function(i){var n;if(i.algorithm in v.oids)n=v.oids[i.algorithm];else{var I=new Error("Unknown message digest algorithm.");throw I.algorithm=i.algorithm,I}var N=l.oidToDer(n).getBytes(),U=l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[]),L=l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[]);L.value.push(l.create(l.Class.UNIVERSAL,l.Type.OID,!1,N)),L.value.push(l.create(l.Class.UNIVERSAL,l.Type.NULL,!1,""));var O=l.create(l.Class.UNIVERSAL,l.Type.OCTETSTRING,!1,i.digest().getBytes());return U.value.push(L),U.value.push(O),l.toDer(U).getBytes()},c=function(i,n,I){if(I)return i.modPow(n.e,n.n);if(!n.p||!n.q)return i.modPow(n.d,n.n);n.dP||(n.dP=n.d.mod(n.p.subtract(e.ONE))),n.dQ||(n.dQ=n.d.mod(n.q.subtract(e.ONE))),n.qInv||(n.qInv=n.q.modInverse(n.p));var N;do N=new e(t.util.bytesToHex(t.random.getBytes(n.n.bitLength()/8)),16);while(N.compareTo(n.n)>=0||!N.gcd(n.n).equals(e.ONE));i=i.multiply(N.modPow(n.e,n.n)).mod(n.n);for(var U=i.mod(n.p).modPow(n.dP,n.p),L=i.mod(n.q).modPow(n.dQ,n.q);U.compareTo(L)<0;)U=U.add(n.p);var O=U.subtract(L).multiply(n.qInv).mod(n.p).multiply(n.q).add(L);return O=O.multiply(N.modInverse(n.n)).mod(n.n),O};v.rsa.encrypt=function(i,n,I){var N=I,U,L=Math.ceil(n.n.bitLength()/8);I!==!1&&I!==!0?(N=I===2,U=m(i,n,I)):(U=t.util.createBuffer(),U.putBytes(i));for(var O=new e(U.toHex(),16),H=c(O,n,N),F=H.toString(16),K=t.util.createBuffer(),q=L-Math.ceil(F.length/2);q>0;)K.putByte(0),--q;return K.putBytes(t.util.hexToBytes(F)),K.getBytes()},v.rsa.decrypt=function(i,n,I,N){var U=Math.ceil(n.n.bitLength()/8);if(i.length!==U){var L=new Error("Encrypted message length is invalid.");throw L.length=i.length,L.expected=U,L}var O=new e(t.util.createBuffer(i).toHex(),16);if(O.compareTo(n.n)>=0)throw new Error("Encrypted message is invalid.");for(var H=c(O,n,I),F=H.toString(16),K=t.util.createBuffer(),q=U-Math.ceil(F.length/2);q>0;)K.putByte(0),--q;return K.putBytes(t.util.hexToBytes(F)),N!==!1?E(K.getBytes(),n,I):K.getBytes()},v.rsa.createKeyPairGenerationState=function(i,n,I){typeof i=="string"&&(i=parseInt(i,10)),i=i||2048,I=I||{};var N=I.prng||t.random,U={nextBytes:function(H){for(var F=N.getBytesSync(H.length),K=0;K<H.length;++K)H[K]=F.charCodeAt(K)}},L=I.algorithm||"PRIMEINC",O;if(L==="PRIMEINC")O={algorithm:L,state:0,bits:i,rng:U,eInt:n||65537,e:new e(null),p:null,q:null,qBits:i>>1,pBits:i-(i>>1),pqState:0,num:null,keys:null},O.e.fromInt(O.eInt);else throw new Error("Invalid key generation algorithm: "+L);return O},v.rsa.stepKeyPairGenerationState=function(i,n){"algorithm"in i||(i.algorithm="PRIMEINC");var I=new e(null);I.fromInt(30);for(var N=0,U=function(Q,j){return Q|j},L=+new Date,O,H=0;i.keys===null&&(n<=0||H<n);){if(i.state===0){var F=i.p===null?i.pBits:i.qBits,K=F-1;i.pqState===0?(i.num=new e(F,i.rng),i.num.testBit(K)||i.num.bitwiseTo(e.ONE.shiftLeft(K),U,i.num),i.num.dAddOffset(31-i.num.mod(I).byteValue(),0),N=0,++i.pqState):i.pqState===1?i.num.bitLength()>F?i.pqState=0:i.num.isProbablePrime(g(i.num.bitLength()))?++i.pqState:i.num.dAddOffset(f[N++%8],0):i.pqState===2?i.pqState=i.num.subtract(e.ONE).gcd(i.e).compareTo(e.ONE)===0?3:0:i.pqState===3&&(i.pqState=0,i.p===null?i.p=i.num:i.q=i.num,i.p!==null&&i.q!==null&&++i.state,i.num=null)}else if(i.state===1)i.p.compareTo(i.q)<0&&(i.num=i.p,i.p=i.q,i.q=i.num),++i.state;else if(i.state===2)i.p1=i.p.subtract(e.ONE),i.q1=i.q.subtract(e.ONE),i.phi=i.p1.multiply(i.q1),++i.state;else if(i.state===3)i.phi.gcd(i.e).compareTo(e.ONE)===0?++i.state:(i.p=null,i.q=null,i.state=0);else if(i.state===4)i.n=i.p.multiply(i.q),i.n.bitLength()===i.bits?++i.state:(i.q=null,i.state=0);else if(i.state===5){var q=i.e.modInverse(i.phi);i.keys={privateKey:v.rsa.setPrivateKey(i.n,i.e,q,i.p,i.q,q.mod(i.p1),q.mod(i.q1),i.q.modInverse(i.p)),publicKey:v.rsa.setPublicKey(i.n,i.e)}}O=+new Date,H+=O-L,L=O}return i.keys!==null},v.rsa.generateKeyPair=function(i,n,I,N){if(arguments.length===1?typeof i=="object"?(I=i,i=void 0):typeof i=="function"&&(N=i,i=void 0):arguments.length===2?typeof i=="number"?typeof n=="function"?(N=n,n=void 0):typeof n!="number"&&(I=n,n=void 0):(I=i,N=n,i=void 0,n=void 0):arguments.length===3&&(typeof n=="number"?typeof I=="function"&&(N=I,I=void 0):(N=I,I=n,n=void 0)),I=I||{},i===void 0&&(i=I.bits||2048),n===void 0&&(n=I.e||65537),!t.options.usePureJavaScript&&!I.prng&&i>=256&&i<=16384&&(n===65537||n===3)){if(N){if(y("generateKeyPair"))return r.generateKeyPair("rsa",{modulusLength:i,publicExponent:n,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}}
25,function(H,F,K){if(H)return N(H);N(null,{privateKey:v.privateKeyFromPem(K),publicKey:v.publicKeyFromPem(F)})});if(b("generateKey")&&b("exportKey"))return C.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:i,publicExponent:u(n),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(H){return C.globalScope.crypto.subtle.exportKey("pkcs8",H.privateKey)}).then(void 0,function(H){N(H)}).then(function(H){if(H){var F=v.privateKeyFromAsn1(l.fromDer(t.util.createBuffer(H)));N(null,{privateKey:F,publicKey:v.setRsaPublicKey(F.n,F.e)})}});if(R("generateKey")&&R("exportKey")){var U=C.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:i,publicExponent:u(n),hash:{name:"SHA-256"}},!0,["sign","verify"]);U.oncomplete=function(H){var F=H.target.result,K=C.globalScope.msCrypto.subtle.exportKey("pkcs8",F.privateKey);K.oncomplete=function(q){var Q=q.target.result,j=v.privateKeyFromAsn1(l.fromDer(t.util.createBuffer(Q)));N(null,{privateKey:j,publicKey:v.setRsaPublicKey(j.n,j.e)})},K.onerror=function(q){N(q)}},U.onerror=function(H){N(H)};return}}else if(y("generateKeyPairSync")){var L=r.generateKeyPairSync("rsa",{modulusLength:i,publicExponent:n,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:v.privateKeyFromPem(L.privateKey),publicKey:v.publicKeyFromPem(L.publicKey)}}}var O=v.rsa.createKeyPairGenerationState(i,n,I);if(!N)return v.rsa.stepKeyPairGenerationState(O,0),O.keys;x(O,I,N)},v.setRsaPublicKey=v.rsa.setPublicKey=function(i,n){var I={n:i,e:n};return I.encrypt=function(N,U,L){if(typeof U=="string"?U=U.toUpperCase():U===void 0&&(U="RSAES-PKCS1-V1_5"),U==="RSAES-PKCS1-V1_5")U={encode:function(H,F,K){return m(H,F,2).getBytes()}};else if(U==="RSA-OAEP"||U==="RSAES-OAEP")U={encode:function(H,F){return t.pkcs1.encode_rsa_oaep(F,H,L)}};else if(["RAW","NONE","NULL",null].indexOf(U)!==-1)U={encode:function(H){return H}};else if(typeof U=="string")throw new Error('Unsupported encryption scheme: "'+U+'".');var O=U.encode(N,I,!0);return v.rsa.encrypt(O,I,!0)},I.verify=function(N,U,L,O){typeof L=="string"?L=L.toUpperCase():L===void 0&&(L="RSASSA-PKCS1-V1_5"),O===void 0&&(O={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in O||(O._parseAllDigestBytes=!0),L==="RSASSA-PKCS1-V1_5"?L={verify:function(F,K){K=E(K,I,!0);var q=l.fromDer(K,{parseAllBytes:O._parseAllDigestBytes}),Q={},j=[];if(!l.validate(q,k,Q,j)){var ee=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw ee.errors=j,ee}var se=l.derToOid(Q.algorithmIdentifier);if(!(se===t.oids.md2||se===t.oids.md5||se===t.oids.sha1||se===t.oids.sha224||se===t.oids.sha256||se===t.oids.sha384||se===t.oids.sha512||se===t.oids["sha512-224"]||se===t.oids["sha512-256"])){var ee=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw ee.oid=se,ee}if((se===t.oids.md2||se===t.oids.md5)&&!("parameters"in Q))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return F===Q.digest}}:(L==="NONE"||L==="NULL"||L===null)&&(L={verify:function(F,K){return K=E(K,I,!0),F===K}});var H=v.rsa.decrypt(U,I,!0,!1);return L.verify(N,H,I.n.bitLength())},I},v.setRsaPrivateKey=v.rsa.setPrivateKey=function(i,n,I,N,U,L,O,H){var F={n:i,e:n,d:I,p:N,q:U,dP:L,dQ:O,qInv:H};return F.decrypt=function(K,q,Q){typeof q=="string"?q=q.toUpperCase():q===void 0&&(q="RSAES-PKCS1-V1_5");var j=v.rsa.decrypt(K,F,!1,!1);if(q==="RSAES-PKCS1-V1_5")q={decode:E};else if(q==="RSA-OAEP"||q==="RSAES-OAEP")q={decode:function(ee,se){return t.pkcs1.decode_rsa_oaep(se,ee,Q)}};else if(["RAW","NONE","NULL",null].indexOf(q)!==-1)q={decode:function(ee){return ee}};else throw new Error('Unsupported encryption scheme: "'+q+'".');return q.decode(j,F,!1)},F.sign=function(K,q){var Q=!1;typeof q=="string"&&(q=q.toUpperCase()),q===void 0||q==="RSASSA-PKCS1-V1_5"?(q={encode:S},Q=1):(q==="NONE"||q==="NULL"||q===null)&&(q={encode:function(){return K}},Q=1);var j=q.encode(K,F.n.bitLength());return v.rsa.encrypt(j,F,Q)},F},v.wrapRsaPrivateKey=function(i){return l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,l.integerToDer(0).getBytes()),l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[l.create(l.Class.UNIVERSAL,l.Type.OID,!1,l.oidToDer(v.oids.rsaEncryption).getBytes()),l.create(l.Class.UNIVERSAL,l.Type.NULL,!1,"")]),l.create(l.Class.UNIVERSAL,l.Type.OCTETSTRING,!1,l.toDer(i).getBytes())])},v.privateKeyFromAsn1=function(i){var n={},I=[];if(l.validate(i,a,n,I)&&(i=l.fromDer(t.util.createBuffer(n.privateKey))),n={},I=[],!l.validate(i,p,n,I)){var N=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw N.errors=I,N}var U,L,O,H,F,K,q,Q;return U=t.util.createBuffer(n.privateKeyModulus).toHex(),L=t.util.createBuffer(n.privateKeyPublicExponent).toHex(),O=t.util.createBuffer(n.privateKeyPrivateExponent).toHex(),H=t.util.createBuffer(n.privateKeyPrime1).toHex(),F=t.util.createBuffer(n.privateKeyPrime2).toHex(),K=t.util.createBuffer(n.privateKeyExponent1).toHex(),q=t.util.createBuffer(n.privateKeyExponent2).toHex(),Q=t.util.createBuffer(n.privateKeyCoefficient).toHex(),v.setRsaPrivateKey(new e(U,16),new e(L,16),new e(O,16),new e(H,16),new e(F,16),new e(K,16),new e(q,16),new e(Q,16))},v.privateKeyToAsn1=v.privateKeyToRSAPrivateKey=function(i){return l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,l.integerToDer(0).getBytes()),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.n)),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.e)),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.d)),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.p)),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.q)),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.dP)),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.dQ)),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.qInv))])},v.publicKeyFromAsn1=function(i){var n={},I=[];if(l.validate(i,T,n,I)){var N=l.derToOid(n.publicKeyOid);if(N!==v.oids.rsaEncryption){var U=new Error("Cannot read public key. Unknown OID.");throw U.oid=N,U}i=n.rsaPublicKey}if(I=[],!l.validate(i,h,n,I)){var U=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw U.errors=I,U}var L=t.util.createBuffer(n.publicKeyModulus).toHex(),O=t.util.createBuffer(n.publicKeyExponent).toHex();return v.setRsaPublicKey(new e(L,16),new e(O,16))},v.publicKeyToAsn1=v.publicKeyToSubjectPublicKeyInfo=function(i){return l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[l.create(l.Class.UNIVERSAL,l.Type.OID,!1,l.oidToDer(v.oids.rsaEncryption).getBytes()),l.create(l.Class.UNIVERSAL,l.Type.NULL,!1,"")]),l.create(l.Class.UNIVERSAL,l.Type.BITSTRING,!1,[v.publicKeyToRSAPublicKey(i)])])},v.publicKeyToRSAPublicKey=function(i){return l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.n)),l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,s(i.e))])};function m(i,n,I){var N=t.util.createBuffer(),U=Math.ceil(n.n.bitLength()/8);if(i.length>U-11){var L=new Error("Message is too long for PKCS#1 v1.5 padding.");throw L.length=i.length,L.max=U-11,L}N.putByte(0),N.putByte(I);var O=U-3-i.length,H;if(I===0||I===1){H=I===0?0:255;for(var F=0;F<O;++F)N.putByte(H)}else for(;O>0;){for(var K=0,q=t.random.getBytes(O),F=0;F<O;++F)H=q.charCodeAt(F),H===0?++K:N.putByte(H);O=K}return N.putByte(0),N.putBytes(i),N}function E(i,n,I,N){var U=Math.ceil(n.n.bitLength()/8),L=t.util.createBuffer(i),O=L.getByte(),H=L.getByte();if(O!==0||I&&H!==0&&H!==1||!I&&H!=2||I&&H===0&&typeof N>
25"u")throw new Error("Encryption block is invalid.");var F=0;if(H===0){F=U-3-N;for(var K=0;K<F;++K)if(L.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(H===1)for(F=0;L.length()>1;){if(L.getByte()!==255){--L.read;break}++F}else if(H===2)for(F=0;L.length()>1;){if(L.getByte()===0){--L.read;break}++F}var q=L.getByte();if(q!==0||F!==U-3-L.length())throw new Error("Encryption block is invalid.");return L.getBytes()}function x(i,n,I){typeof n=="function"&&(I=n,n={}),n=n||{};var N={algorithm:{name:n.algorithm||"PRIMEINC",options:{workers:n.workers||2,workLoad:n.workLoad||100,workerScript:n.workerScript}}};"prng"in n&&(N.prng=n.prng),U();function U(){L(i.pBits,function(H,F){if(H)return I(H);if(i.p=F,i.q!==null)return O(H,i.q);L(i.qBits,O)})}function L(H,F){t.prime.generateProbablePrime(H,N,F)}function O(H,F){if(H)return I(H);if(i.q=F,i.p.compareTo(i.q)<0){var K=i.p;i.p=i.q,i.q=K}if(i.p.subtract(e.ONE).gcd(i.e).compareTo(e.ONE)!==0){i.p=null,U();return}if(i.q.subtract(e.ONE).gcd(i.e).compareTo(e.ONE)!==0){i.q=null,L(i.qBits,O);return}if(i.p1=i.p.subtract(e.ONE),i.q1=i.q.subtract(e.ONE),i.phi=i.p1.multiply(i.q1),i.phi.gcd(i.e).compareTo(e.ONE)!==0){i.p=i.q=null,U();return}if(i.n=i.p.multiply(i.q),i.n.bitLength()!==i.bits){i.q=null,L(i.qBits,O);return}var q=i.e.modInverse(i.phi);i.keys={privateKey:v.rsa.setPrivateKey(i.n,i.e,q,i.p,i.q,q.mod(i.p1),q.mod(i.q1),i.q.modInverse(i.p)),publicKey:v.rsa.setPublicKey(i.n,i.e)},I(null,i.keys)}}function s(i){var n=i.toString(16);n[0]>="8"&&(n="00"+n);var I=t.util.hexToBytes(n);return I.length>1&&(I.charCodeAt(0)===0&&(I.charCodeAt(1)&128)===0||I.charCodeAt(0)===255&&(I.charCodeAt(1)&128)===128)?I.substr(1):I}function g(i){return i<=100?27:i<=150?18:i<=200?15:i<=250?12:i<=300?9:i<=350?8:i<=400?7:i<=500?6:i<=600?5:i<=800?4:i<=1250?3:2}function y(i){return t.util.isNodejs&&typeof r[i]=="function"}function b(i){return typeof C.globalScope<"u"&&typeof C.globalScope.crypto=="object"&&typeof C.globalScope.crypto.subtle=="object"&&typeof C.globalScope.crypto.subtle[i]=="function"}function R(i){return typeof C.globalScope<"u"&&typeof C.globalScope.msCrypto=="object"&&typeof C.globalScope.msCrypto.subtle=="object"&&typeof C.globalScope.msCrypto.subtle[i]=="function"}function u(i){for(var n=t.util.hexToBytes(i.toString(16)),I=new Uint8Array(n.length),N=0;N<n.length;++N)I[N]=n.charCodeAt(N);return I}return Sr}var Tr,Ua;function Fa(){if(Ua)return Tr;Ua=1;var t=ve();if(vt(),ot(),kt(),ut(),yt(),gr(),Et(),et(),Ba(),Ot(),me(),typeof e>"u")var e=t.jsbn.BigInteger;var r=t.asn1,l=t.pki=t.pki||{};Tr=l.pbe=t.pbe=t.pbe||{};var C=l.oids,v={name:"EncryptedPrivateKeyInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},f={name:"PBES2Algorithms",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]}
25,a={name:"pkcs-12PbeParams",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(S,c,m){m=m||{},m.saltSize=m.saltSize||8,m.count=m.count||2048,m.algorithm=m.algorithm||"aes128",m.prfAlgorithm=m.prfAlgorithm||"sha1";var E=t.random.getBytesSync(m.saltSize),x=m.count,s=r.integerToDer(x),g,y,b;if(m.algorithm.indexOf("aes")===0||m.algorithm==="des"){var R,u,i;switch(m.algorithm){case"aes128":g=16,R=16,u=C["aes128-CBC"],i=t.aes.createEncryptionCipher;break;case"aes192":g=24,R=16,u=C["aes192-CBC"],i=t.aes.createEncryptionCipher;break;case"aes256":g=32,R=16,u=C["aes256-CBC"],i=t.aes.createEncryptionCipher;break;case"des":g=8,R=8,u=C.desCBC,i=t.des.createEncryptionCipher;break;default:var n=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw n.algorithm=m.algorithm,n}var I="hmacWith"+m.prfAlgorithm.toUpperCase(),N=T(I),U=t.pkcs5.pbkdf2(c,E,x,g,N),L=t.random.getBytesSync(R),O=i(U);O.start(L),O.update(r.toDer(S)),O.finish(),b=O.output.getBytes();var H=k(E,s,g,I);y=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(C.pkcs5PBES2).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(C.pkcs5PBKDF2).getBytes()),H]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(u).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,L)])])])}else if(m.algorithm==="3des"){g=24;var F=new t.util.ByteBuffer(E),U=l.pbe.generatePkcs12Key(c,F,1,x,g),L=l.pbe.generatePkcs12Key(c,F,2,x,g),O=t.des.createEncryptionCipher(U);O.start(L),O.update(r.toDer(S)),O.finish(),b=O.output.getBytes(),y=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(C["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,E),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,s.getBytes())])])}else{var n=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw n.algorithm=m.algorithm,n}var K=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[y,r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b)]);return K},l.decryptPrivateKeyInfo=function(S,c){var m=null,E={},x=[];if(!r.validate(S,v,E,x)){var s=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=x,s}var g=r.derToOid(E.encryptionOid),y=l.pbe.getCipher(g,E.encryptionParams,c),b=t.util.createBuffer(E.encryptedData);return y.update(b),y.finish()&&(m=r.fromDer(y.output)),m},l.encryptedPrivateKeyToPem=function(S,c){var m={type:"ENCRYPTED PRIVATE KEY",body:r.toDer(S).getBytes()};return t.pem.encode(m,{maxline:c})},l.encryptedPrivateKeyFromPem=function(S){var c=t.pem.decode(S)[0];if(c.type!=="ENCRYPTED PRIVATE KEY"){var m=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw m.headerType=c.type,m}if(c.procType&&c.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return r.fromDer(c.body)},l.encryptRsaPrivateKey=function(S,c,m){if(m=m||{},!m.legacy){var E=l.wrapRsaPrivateKey(l.privateKeyToAsn1(S));return E=l.encryptPrivateKeyInfo(E,c,m),l.encryptedPrivateKeyToPem(E)}var x,s,g,y;switch(m.algorithm){case"aes128":x="AES-128-CBC",g=16,s=t.random.getBytesSync(16),y=t.aes.createEncryptionCipher;break;case"aes192":x="AES-192-CBC",g=24,s=t.random.getBytesSync(16),y=t.aes.createEncryptionCipher;break;case"aes256":x="AES-256-CBC",g=32,s=t.random.getBytesSync(16),y=t.aes.createEncryptionCipher;break;case"3des":x="DES-EDE3-CBC",g=24,s=t.random.getBytesSync(8),y=t.des.createEncryptionCipher;break;case"des":x="DES-CBC",g=8,s=t.random.getBytesSync(8),y=t.des.createEncryptionCipher;break;default:var b=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+m.algorithm+'".');throw b.algorithm=m.algorithm,b}var R=t.pbe.opensslDeriveBytes(c,s.substr(0,8),g),u=y(R);u.start(s),u.update(r.toDer(l.privateKeyToAsn1(S))),u.finish();var i={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:x,parameters:t.util.bytesToHex(s).toUpperCase()},body:u.output.getBytes()};return t.pem.encode(i)},l.decryptRsaPrivateKey=function(S,c){var m=null,E=t.pem.decode(S)[0];if(E.type!=="ENCRYPTED PRIVATE KEY"&&E.type!=="PRIVATE KEY"&&E.type!=="RSA PRIVATE KEY"){var x=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw x.headerType=x,x}if(E.procType&&E.procType.type==="ENCRYPTED"){var s,g;switch(E.dekInfo.algorithm){case"DES-CBC":s=8,g=t.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,g=t.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,g=t.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,g=t.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,g=t.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,g=function(i){return t.rc2.createDecryptionCipher(i,40)};break;case"RC2-64-CBC":s=8,g=function(i){return t.rc2.createDecryptionCipher(i,64)};break;case"RC2-128-CBC":s=16,g=function(i){return t.rc2.createDecryptionCipher(i,128)};break;default:var x=new Error('Could not decrypt private key; unsupported encryption algorithm "'+E.dekInfo.algorithm+'".');throw x.algorithm=E.dekInfo.algorithm,x}var y=t.util.hexToBytes(E.dekInfo.parameters),b=t.pbe.opensslDeriveBytes(c,y.substr(0,8),s),R=g(b);if(R.start(y),R.update(t.util.createBuffer(E.body)),R.finish())m=R.output.getBytes();else return m}else m=E.body;return E.type==="ENCRYPTED PRIVATE KEY"?m=l.decryptPrivateKeyInfo(r.fromDer(m),c):m=r.fromDer(m),m!==null&&(m=l.privateKeyFromAsn1(m)),m},l.pbe.generatePkcs12Key=function(S,c,m,E,x,s){var g,y;if(typeof s>"u"||s===null){if(!("sha1"in t.md))throw new Error('"sha1" hash algorithm unavailable.');s=t.md.sha1.create()}var b=s.digestLength,R=s.blockLength,u=new t.util.ByteBuffer,i=new t.util.ByteBuffer;if(S!=null){for(y=0;y<S.length;y++)i.putInt16(S.charCodeAt(y));i.putInt16(0)}var n=i.length(),I=c.length(),N=new t.util.ByteBuffer;N.fillWithByte(m,R);var U=R*Math.ceil(I/R),L=new t.util.ByteBuffer;for(y=0;y<U;y++)L.putByte(c.at(y%I));var O=R*Math.ceil(n/R),H=new t.util.ByteBuffer;for(y=0;y<O;y++)H.putByte(i.at(y%n));var F=L;F.putBuffer(H);for(var K=Math.ceil(x/b),q=1;q<=K;q++){var Q=new t.util.ByteBuffer;Q.putBytes(N.bytes()),Q.putBytes(F.bytes());for(var j=0;j<E;j++)s.start(),s.update(Q.getBytes()),Q=s.digest();var ee=new t.util.ByteBuffer;for(y=0;y<R;y++)ee.putByte(Q.at(y%b));var se=Math.ceil(I/R)+Math.ceil(n/R),oe=new t.util.ByteBuffer;for(g=0;g<se;g++){var fe=new t.util.ByteBuffer(F.getBytes(R)),z=511;for(y=ee.length()-1;y>=0;y--)z=z>>8,z+=ee.at(y)+fe.at(y),fe.setAt(y,z&255);oe.putBuffer(fe)}F=oe,u.putBuffer(Q)}return u.truncate(u.length()-x),u},l.pbe.getCipher=function(S,c,m){switch(S){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(S,c,m);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(S,c,m);default:var E=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw E.oid=S,E.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],E}},l.pbe.getCipherForPBES2=function(S,c,m){var E={},x=[];if(!r.validate(c,f,E,x)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=x,s}if(S=r.derToOid(E.kdfOid),S!==l.oids.pkcs5PBKDF2){var s=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw s.oid=S,s.supportedOids=["pkcs5PBKDF2"],s}if(S=r.derToOid(E.encOid),S!==l.oids["aes128-CBC"]&&S!==l.oids["aes192-CBC"]&&S!==l.oids["aes256-CBC"]&&S!==l.oids["des-EDE3-CBC"]&&S!==l.oids.desCBC){var s=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw s.oid=S,s.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],s}var g=E.kdfSalt,y=t.util.createBuffer(E.kdfIterationCount);y=y.getInt(y.length()<<3);var b,R;switch(l.oids[S]){case"aes128-CBC":b=16,R=t.aes.createDecryptionCipher;break;case"aes192-CBC":b=24,R=t.aes.createDecryptionCipher;break;case"aes256-CBC":b=32,R=t.aes.createDecryptionCipher;break;
25case"des-EDE3-CBC":b=24,R=t.des.createDecryptionCipher;break;case"desCBC":b=8,R=t.des.createDecryptionCipher;break}var u=h(E.prfOid),i=t.pkcs5.pbkdf2(m,g,y,b,u),n=E.encIv,I=R(i);return I.start(n),I},l.pbe.getCipherForPKCS12PBE=function(S,c,m){var E={},x=[];if(!r.validate(c,a,E,x)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=x,s}var g=t.util.createBuffer(E.salt),y=t.util.createBuffer(E.iterations);y=y.getInt(y.length()<<3);var b,R,u;switch(S){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:b=24,R=8,u=t.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:b=5,R=8,u=function(U,L){var O=t.rc2.createDecryptionCipher(U,40);return O.start(L,null),O};break;default:var s=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw s.oid=S,s}var i=h(E.prfOid),n=l.pbe.generatePkcs12Key(m,g,1,y,b,i);i.start();var I=l.pbe.generatePkcs12Key(m,g,2,y,R,i);return u(n,I)},l.pbe.opensslDeriveBytes=function(S,c,m,E){if(typeof E>"u"||E===null){if(!("md5"in t.md))throw new Error('"md5" hash algorithm unavailable.');E=t.md.md5.create()}c===null&&(c="");for(var x=[p(E,S+c)],s=16,g=1;s<m;++g,s+=16)x.push(p(E,x[g-1]+S+c));return x.join("").substr(0,m)};function p(S,c){return S.start().update(c).digest().getBytes()}function h(S){var c;if(!S)c="hmacWithSHA1";else if(c=l.oids[r.derToOid(S)],!c){var m=new Error("Unsupported PRF OID.");throw m.oid=S,m.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],m}return T(c)}function T(S){var c=t.md;switch(S){case"hmacWithSHA224":c=t.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":S=S.substr(8).toLowerCase();break;default:var m=new Error("Unsupported PRF algorithm.");throw m.algorithm=S,m.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],m}if(!c||!(S in c))throw new Error("Unknown hash algorithm: "+S);return c[S].create()}function k(S,c,m,E){var x=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,S),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,c.getBytes())]);return E!=="hmacWithSHA1"&&x.value.push(r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,t.util.hexToBytes(m.toString(16))),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(l.oids[E]).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])),x}return Tr}var Ir={exports:{}},Ar={exports:{}},Pa;function Oa(){if(Pa)return Ar.exports;Pa=1;var t=ve();ot(),me();var e=t.asn1,r=Ar.exports=t.pkcs7asn1=t.pkcs7asn1||{};t.pkcs7=t.pkcs7||{},t.pkcs7.asn1=r;var l={name:"ContentInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};r.contentInfoValidator=l;var C={name:"EncryptedContentInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:e.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};r.envelopedDataValidator={name:"EnvelopedData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(C)},r.encryptedDataValidator={name:"EncryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,c
25onstructed:!1,capture:"version"}].concat(C)};var v={name:"SignerInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:e.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:e.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};return r.signedDataValidator={name:"SignedData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},l,{name:"SignedData.Certificates",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:e.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,capture:"signerInfos",optional:!0,value:[v]}]},r.recipientInfoValidator={name:"RecipientInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:e.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]},Ar.exports}var br={exports:{}},Br={exports:{}},Ma;function Va(){if(Ma)return Br.exports;Ma=1;var t=ve();me(),t.mgf=t.mgf||{};var e=Br.exports=t.mgf.mgf1=t.mgf1=t.mgf1||{};return e.create=function(r){var l={generate:function(C,v){for(var f=new t.util.ByteBuffer,a=Math.ceil(v/r.digestLength),p=0;p<a;p++){var h=new t.util.ByteBuffer;h.putInt32(p),r.start(),r.update(C+h.getBytes()),f.putBuffer(r.digest())}return f.truncate(f.length()-v),f.getBytes()}};return l},Br.exports}var wr,Ka;function Mi(){if(Ka)return wr;Ka=1;var t=ve();return Va(),wr=t.mgf=t.mgf||{},t.mgf.mgf1=t.mgf1,wr}var _r={exports:{}},Ha;function Nr(){if(Ha)return _r.exports;Ha=1;var t=ve();et(),me();var e=_r.exports=t.pss=t.pss||{};return e.create=function(r){arguments.length===3&&(r={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var l=r.md,C=r.mgf,v=l.digestLength,f=r.salt||null;typeof f=="string"&&(f=t.util.createBuffer(f));var a;if("saltLength"in r)a=r.saltLength;else if(f!==null)a=f.length();else throw new Error("Salt length not specified or specific salt not given.");if(f!==null&&f.length()!==a)throw new Error("Given salt length does not match length of given salt.");var p=r.prng||t.random,h={};return h.encode=function(T,k){var S,c=k-1,m=Math.ceil(c/8),E=T.digest().getBytes();if(m<v+a+2)throw new Error("Message is too long to encrypt.");var x;f===null?x=p.getBytesSync(a):x=f.bytes();var s=new t.util.ByteBuffer;s.fillWithByte(0,8),s.putBytes(E),s.putBytes(x),l.start(),l.update(s.getBytes());var g=l.digest().getBytes(),y=new t.util.ByteBuffer;y.fillWithByte(0,m-a-v-2),y.putByte(1),y.putBytes(x);var b=y.getBytes(),R=m-v-1,u=C.generate(g,R),i="";for(S=0;S<R;S++)i+=String.fromCharCode(b.charCodeAt(S)^u.charCodeAt(S));var n=65280>>8*m-c&255;return i=String.fromCharCode(i.charCodeAt(0)&~n)+i.substr(1),i+g+"¼"},h.verify=function(T,k,S){var c,m=S-1,E=Math.ceil(m/8);if(k=k.substr(-E),E<v+a+2)throw new Error("Inconsistent parameters to PSS signature verification.");
25if(k.charCodeAt(E-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var x=E-v-1,s=k.substr(0,x),g=k.substr(x,v),y=65280>>8*E-m&255;if((s.charCodeAt(0)&y)!==0)throw new Error("Bits beyond keysize not zero as expected.");var b=C.generate(g,x),R="";for(c=0;c<x;c++)R+=String.fromCharCode(s.charCodeAt(c)^b.charCodeAt(c));R=String.fromCharCode(R.charCodeAt(0)&~y)+R.substr(1);var u=E-v-a-2;for(c=0;c<u;c++)if(R.charCodeAt(c)!==0)throw new Error("Leftmost octets not zero as expected");if(R.charCodeAt(u)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var i=R.substr(-a),n=new t.util.ByteBuffer;n.fillWithByte(0,8),n.putBytes(T),n.putBytes(i),l.start(),l.update(n.getBytes());var I=l.digest().getBytes();return g===I},h},_r.exports}var Ga;function Rr(){if(Ga)return br.exports;Ga=1;var t=ve();vt(),ot(),kt(),ut(),Mi(),yt(),Et(),Nr(),Ot(),me();var e=t.asn1,r=br.exports=t.pki=t.pki||{},l=r.oids,C={};C.CN=l.commonName,C.commonName="CN",C.C=l.countryName,C.countryName="C",C.L=l.localityName,C.localityName="L",C.ST=l.stateOrProvinceName,C.stateOrProvinceName="ST",C.O=l.organizationName,C.organizationName="O",C.OU=l.organizationalUnitName,C.organizationalUnitName="OU",C.E=l.emailAddress,C.emailAddress="E";var v=t.pki.rsa.publicKeyValidator,f={name:"Certificate",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:e.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:e.Class.UNIVERSAL,type:e.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:e.Class.UNIVERSAL,type:e.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:e.Class.UNIVERSAL,type:e.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:e.Class.UNIVERSAL,type:e.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},v,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:e.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:e.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:e.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:e.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParam
25s"}]},{name:"Certificate.signatureValue",tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},a={name:"rsapss",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:e.Class.UNIVERSAL,type:e.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:e.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:e.Class.UNIVERSAL,type:e.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:e.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:e.Class.UNIVERSAL,type:e.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:e.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:e.Class.UNIVERSAL,type:e.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},p={name:"CertificationRequestInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},v,{name:"CertificationRequestInfo.attributes",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[p,{name:"CertificationRequest.signatureAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:e.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};r.RDNAttributesAsArray=function(u,i){for(var n=[],I,N,U,L=0;L<u.value.length;++L){I=u.value[L];for(var O=0;O<I.value.length;++O)U={},N=I.value[O],U.type=e.derToOid(N.value[0].value),U.value=N.value[1].value,U.valueTagClass=N.value[1].type,U.type in l&&(U.name=l[U.type],U.name in C&&(U.shortName=C[U.name])),i&&(i.update(U.type),i.update(U.value)),n.push(U)}return n},r.CRIAttributesAsArray=function(u){for(var i=[],n=0;n<u.length;++n)for(var I=u[n],N=e.derToOid(I.value[0].value),U=I.value[1].value,L=0;L<U.length;++L){var O={};if(O.type=N,O.value=U[L].value,O.valueTagClass=U[L].type,O.type in l&&(O.name=l[O.type],O.name in C&&(O.shortName=C[O.name])),O.type===l.extensionRequest){O.extensions=[];for(var H=0;H<O.value.length;++H)O.extensions.push(r.certificateExtensionFromAsn1(O.value[H]))}i.push(O)}return i};function T(u,i){typeof i=="string"&&(i={shortName:i});for(var n=null,I,N=0;n===null&&N<u.attributes.length;++N)I=u.attributes[N],(i.type&&i.type===I.type||i.name&&i.name===I.name||i.shortName&&i.shortName===I.shortName)&&(n=I);return n}var k=function(u,i,n){var I={};if(u!==l["RSASSA-PSS"])return I;n&&(I={hash:{algorithmOid:l.sha1},mgf:{algorithmOid:l.mgf1,hash:{algorithmOid:l.sha1}},saltLength:20});var N={},U=[];if(!e.validate(i,a,N,U)){var L=new Error("Cannot read RSASSA-PSS parameter block.");throw L.errors=U,L}return N.hashOid!==void 0&&(I.hash=I.hash||{},I.hash.algorithmOid=e.derToOid(N.hashOid)),N.maskGenOid!==void 0&&(I.mgf=I.mgf||{},I.mgf.algorithmOid=e.derToOid(N.maskGenOid),I.mgf.hash=I.mgf.hash||{},I.mgf.hash.algorithmOid=e.derToOid(N.maskGenHashOid)),N.saltLength!==void 0&&(I.saltLength=N.saltLength.charCodeAt(0)),I},S=function(u){switch(l[u.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return t.md.sha1.create();case"md5WithRSAEncryption":return t.md.md5.create();case"sha256WithRSAEncryption":return t.md.sha256.create();case"sha384WithRSAEncryption":return t.md.sha384.create();case"sha512WithRSAEncryption":return t.md.sha512.create();case"RSASSA-PSS":return t.md.sha256.create();default:var i=new Error("Could not compute "+u.type+" digest. Unknown signature OID.");throw i.signatureOid=u.signatureOid,i}},c=function(u){var i=u.certificate,n;switch(i.signatureOid){case l.sha1WithRSAEncryption:case l.sha1WithRSASignature:break;case l["RSASSA-PSS"]:var I,N;if(I=l[i.signatureParameters.mgf.hash.algorithmOid],I===void 0||t.md[I]===void 0){var U=new Error("Unsupported MGF hash function.");throw U.oid=i.signatureParameters.mgf.hash.algorithmOid,U.name=I,U}if(N=l[i.signatureParameters.mgf.algorithmOid],N===void 0||t.mgf[N]===void 0){var U=new Error("Unsupported MGF function.");throw U.oid=i.signatureParameters.mgf.algorithmOid,U.name=N,U}if(N=t.mgf[N].create(t.md[I].create()),I=l[i.signatureParameters.hash.algorithmOid],I===void 0||t.md[I]===void 0){var U=new Error("Unsupported RSASSA-PSS hash function.");throw U.oid=i.signatureParameters.hash.algorithmOid,U.name=I,U}n=t.pss.create(t.md[I].create(),N,i.signatureParameters.saltLength);break}return i.publicKey.verify(u.md.digest().getBytes(),u.signature,n)};r.certificateFromPem=function(u,i,n){var I=t.pem.decode(u)[0];if(I.type!=="CERTIFICATE"&&I.type!=="X509 CERTIFICATE"&&I.type!=="TRUSTED CERTIFICATE"){var N=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw N.headerType=I.type,N}if(I.procType&&I.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var U=e.fromDer(I.body,n);return r.certificateFromAsn1(U,i)},r.certificateToPem=function(u,i){var n={type:"CERTIFICATE",body:e.toDer(r.certificateToAsn1(u)).getBytes()};return t.pem.encode(n,{maxline:i})},r.publicKeyFromPem=function(u){var i=t.pem.decode(u)[0];if(i.type!=="PUBLIC KEY"&&i.type!=="RSA PUBLIC KEY"){var n=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw n.headerType=i.type,n}if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var I=e.fromDer(i.body);return r.publicKeyFromAsn1(I)},r.publicKeyToPem=function(u,i){var n={type:"PUBLIC KEY",body:e.toDer(r.publicKeyToAsn1(u)).getBytes()};return t.pem.encode(n,{maxline:i})},r.publicKeyToRSAPublicKeyPem=function(u,i){var n={type:"RSA PUBLIC KEY",body:e.toDer(r.publicKeyToRSAPublicKey(u)).getBytes()};return t.pem.encode(n,{maxline:i})},r.getPublicKeyFingerprint=function(u,i){i=i||{};var n=i.md||t.md.sha1.create(),I=i.type||"RSAPublicKey",N;switch(I){case"RSAPublicKey":N=e.toDer(r.publicKeyToRSAPublicKey(u)).getBytes();break;case"SubjectPublicKeyInfo":N=e.toDer(r.publicKeyToAsn1(u)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+i.type+'".')}n.start(),n.update(N);var U=n.digest();if(i.encoding==="hex"){var L=U.toHex();return i.delimiter?L.match(/.{2}/g).join(i.delimiter):L}else{if(i.encoding==="binary")return U.getBytes();if(i.encoding)throw new Error('Unknown encoding "'+i.encoding+'".')}return U},r.certificationRequestFromPem=function(u,i,n){var I=t.pem.decode(u)[0];if(I.type!=="CERTIFICATE REQUEST"){var N=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw N.headerType=I.type,N}if(I.procType&&I.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var U=e.fromDer(I.body,n);return r.certificationRequestFromAsn1(U,i)},r.certificationRequestToPem=function(u,i){var n={type:"CERTIFICATE REQUEST",body:e.toDer(r.certificationRequestToAsn1(u)).getBytes()};return t.pem.encode(n,{maxline:i})},r.createCertificate=function(){var u={};return u.version=2,u.serialNumber="00",u.signatureOid=null,u.signature=null,u.siginfo={},u.siginfo.algorithmOid=null,u.validity={},u.validity.notBefore=new Date,u.validity.notAfter=new Date,u.issuer={},u.issuer.getField=function(i){return T(u.issuer,i)},u.issuer.addField=function(i){E([i]),u.issuer.attributes.push(i)},u.issuer.attributes=[],u.issuer.hash=null,u.subject={},u.subject.getField=function(i){return T(u.subject,i)},u.subject.addField=function(i){E([i]),u.subject.attributes.push(i)},u.subject.attributes=[],u.subject.hash=null,u.extensions=[],u.publicKey=null,u.md=null,u.setSubject=function(i,n){E(i),u.subject.attributes=i,delete u.subject.uniqueId,n&&(u.subject.uniqueId=n),u.subject.hash=null},u.setIssuer=function(i,n){E(i),u.issuer.attributes=i,delete u.issuer.uniqueId,n&&(u.issuer.uniqueId=n),u.issuer.hash=null},u.setExtensions=function(i){for(var n=0;n<i.length;++n)x(i[n],{cert:u});u.extensions=i},u.getExtension=function(i){typeof i=="string"&&(i={name:i});for(var n=null,I,N=0;n===null&&N<u.extensions.length;++N)I=u.extensions[N],(i.id&&I.id===i.id||i.name&&I.name===i.name)&&(n=I);return n},u.sign=function(i,n){u.md=n||t.md.sha1.create();var I=l[u.md.algorithm+"WithRSAEncryption"];if(!I){var N=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw N.algorithm=u.md.algorithm,N}u.signatureOid=u.siginfo.algorithmOid=I,u.tbsCertificate=r.getTBSCertificate(u);var U=e.toDer(u.tbsCertificate);u.md.update(U.getBytes()),u.signature=i.sign(u.md)},u.verify=function(i){var n=!1;if(!u.issued(i)){var I=i.issuer,N=u.subject,U=new Error("The parent certificate did n
25ot issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw U.expectedIssuer=N.attributes,U.actualIssuer=I.attributes,U}var L=i.md;if(L===null){L=S({signatureOid:i.signatureOid,type:"certificate"});var O=i.tbsCertificate||r.getTBSCertificate(i),H=e.toDer(O);L.update(H.getBytes())}return L!==null&&(n=c({certificate:u,md:L,signature:i.signature})),n},u.isIssuer=function(i){var n=!1,I=u.issuer,N=i.subject;if(I.hash&&N.hash)n=I.hash===N.hash;else if(I.attributes.length===N.attributes.length){n=!0;for(var U,L,O=0;n&&O<I.attributes.length;++O)U=I.attributes[O],L=N.attributes[O],(U.type!==L.type||U.value!==L.value)&&(n=!1)}return n},u.issued=function(i){return i.isIssuer(u)},u.generateSubjectKeyIdentifier=function(){return r.getPublicKeyFingerprint(u.publicKey,{type:"RSAPublicKey"})},u.verifySubjectKeyIdentifier=function(){for(var i=l.subjectKeyIdentifier,n=0;n<u.extensions.length;++n){var I=u.extensions[n];if(I.id===i){var N=u.generateSubjectKeyIdentifier().getBytes();return t.util.hexToBytes(I.subjectKeyIdentifier)===N}}return!1},u},r.certificateFromAsn1=function(u,i){var n={},I=[];if(!e.validate(u,f,n,I)){var N=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw N.errors=I,N}var U=e.derToOid(n.publicKeyOid);if(U!==r.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var L=r.createCertificate();L.version=n.certVersion?n.certVersion.charCodeAt(0):0;var O=t.util.createBuffer(n.certSerialNumber);L.serialNumber=O.toHex(),L.signatureOid=t.asn1.derToOid(n.certSignatureOid),L.signatureParameters=k(L.signatureOid,n.certSignatureParams,!0),L.siginfo.algorithmOid=t.asn1.derToOid(n.certinfoSignatureOid),L.siginfo.parameters=k(L.siginfo.algorithmOid,n.certinfoSignatureParams,!1),L.signature=n.certSignature;var H=[];if(n.certValidity1UTCTime!==void 0&&H.push(e.utcTimeToDate(n.certValidity1UTCTime)),n.certValidity2GeneralizedTime!==void 0&&H.push(e.generalizedTimeToDate(n.certValidity2GeneralizedTime)),n.certValidity3UTCTime!==void 0&&H.push(e.utcTimeToDate(n.certValidity3UTCTime)),n.certValidity4GeneralizedTime!==void 0&&H.push(e.generalizedTimeToDate(n.certValidity4GeneralizedTime)),H.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(H.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(L.validity.notBefore=H[0],L.validity.notAfter=H[1],L.tbsCertificate=n.tbsCertificate,i){L.md=S({signatureOid:L.signatureOid,type:"certificate"});var F=e.toDer(L.tbsCertificate);L.md.update(F.getBytes())}var K=t.md.sha1.create(),q=e.toDer(n.certIssuer);K.update(q.getBytes()),L.issuer.getField=function(ee){return T(L.issuer,ee)},L.issuer.addField=function(ee){E([ee]),L.issuer.attributes.push(ee)},L.issuer.attributes=r.RDNAttributesAsArray(n.certIssuer),n.certIssuerUniqueId&&(L.issuer.uniqueId=n.certIssuerUniqueId),L.issuer.hash=K.digest().toHex();var Q=t.md.sha1.create(),j=e.toDer(n.certSubject);return Q.update(j.getBytes()),L.subject.getField=function(ee){return T(L.subject,ee)},L.subject.addField=function(ee){E([ee]),L.subject.attributes.push(ee)},L.subject.attributes=r.RDNAttributesAsArray(n.certSubject),n.certSubjectUniqueId&&(L.subject.uniqueId=n.certSubjectUniqueId),L.subject.hash=Q.digest().toHex(),n.certExtensions?L.extensions=r.certificateExtensionsFromAsn1(n.certExtensions):L.extensions=[],L.publicKey=r.publicKeyFromAsn1(n.subjectPublicKeyInfo),L},r.certificateExtensionsFromAsn1=function(u){for(var i=[],n=0;n<u.value.length;++n)for(var I=u.value[n],N=0;N<I.value.length;++N)i.push(r.certificateExtensionFromAsn1(I.value[N]));return i},r.certificateExtensionFromAsn1=function(u){var i={};if(i.id=e.derToOid(u.value[0].value),i.critical=!1,u.value[1].type===e.Type.BOOLEAN?(i.critical=u.value[1].value.charCodeAt(0)!==0,i.value=u.value[2].value):i.value=u.value[1].value,i.id in l){if(i.name=l[i.id],i.name==="keyUsage"){var n=e.fromDer(i.value),I=0,N=0;n.value.length>1&&(I=n.value.charCodeAt(1),N=n.value.length>2?n.value.charCodeAt(2):0),i.digitalSignature=(I&128)===128,i.nonRepudiation=(I&64)===64,i.keyEncipherment=(I&32)===32,i.dataEncipherment=(I&16)===16,i.keyAgreement=(I&8)===8,i.keyCertSign=(I&4)===4,i.cRLSign=(I&2)===2,i.encipherOnly=(I&1)===1,i.decipherOnly=(N&128)===128}else if(i.name==="basicConstraints"){var n=e.fromDer(i.value);n.value.length>0&&n.value[0].type===e.Type.BOOLEAN?i.cA=n.value[0].value.charCodeAt(0)!==0:i.cA=!1;var U=null;n.value.length>0&&n.value[0].type===e.Type.INTEGER?U=n.value[0].value:n.value.length>1&&(U=n.value[1].value),U!==null&&(i.pathLenConstraint=e.derToInteger(U))}else if(i.name==="extKeyUsage")for(var n=e.fromDer(i.value),L=0;L<n.value.length;++L){var O=e.derToOid(n.value[L].value);O in l?i[l[O]]=!0:i[O]=!0}
25else if(i.name==="nsCertType"){var n=e.fromDer(i.value),I=0;n.value.length>1&&(I=n.value.charCodeAt(1)),i.client=(I&128)===128,i.server=(I&64)===64,i.email=(I&32)===32,i.objsign=(I&16)===16,i.reserved=(I&8)===8,i.sslCA=(I&4)===4,i.emailCA=(I&2)===2,i.objCA=(I&1)===1}else if(i.name==="subjectAltName"||i.name==="issuerAltName"){i.altNames=[];for(var H,n=e.fromDer(i.value),F=0;F<n.value.length;++F){H=n.value[F];var K={type:H.type,value:H.value};switch(i.altNames.push(K),H.type){case 1:case 2:case 6:break;case 7:K.ip=t.util.bytesToIP(H.value);break;case 8:K.oid=e.derToOid(H.value);break}}}else if(i.name==="subjectKeyIdentifier"){var n=e.fromDer(i.value);i.subjectKeyIdentifier=t.util.bytesToHex(n.value)}}return i},r.certificationRequestFromAsn1=function(u,i){var n={},I=[];if(!e.validate(u,h,n,I)){var N=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw N.errors=I,N}var U=e.derToOid(n.publicKeyOid);if(U!==r.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var L=r.createCertificationRequest();if(L.version=n.csrVersion?n.csrVersion.charCodeAt(0):0,L.signatureOid=t.asn1.derToOid(n.csrSignatureOid),L.signatureParameters=k(L.signatureOid,n.csrSignatureParams,!0),L.siginfo.algorithmOid=t.asn1.derToOid(n.csrSignatureOid),L.siginfo.parameters=k(L.siginfo.algorithmOid,n.csrSignatureParams,!1),L.signature=n.csrSignature,L.certificationRequestInfo=n.certificationRequestInfo,i){L.md=S({signatureOid:L.signatureOid,type:"certification request"});var O=e.toDer(L.certificationRequestInfo);L.md.update(O.getBytes())}var H=t.md.sha1.create();return L.subject.getField=function(F){return T(L.subject,F)},L.subject.addField=function(F){E([F]),L.subject.attributes.push(F)},L.subject.attributes=r.RDNAttributesAsArray(n.certificationRequestInfoSubject,H),L.subject.hash=H.digest().toHex(),L.publicKey=r.publicKeyFromAsn1(n.subjectPublicKeyInfo),L.getAttribute=function(F){return T(L,F)},L.addAttribute=function(F){E([F]),L.attributes.push(F)},L.attributes=r.CRIAttributesAsArray(n.certificationRequestInfoAttributes||[]),L},r.createCertificationRequest=function(){var u={};return u.version=0,u.signatureOid=null,u.signature=null,u.siginfo={},u.siginfo.algorithmOid=null,u.subject={},u.subject.getField=function(i){return T(u.subject,i)},u.subject.addField=function(i){E([i]),u.subject.attributes.push(i)},u.subject.attributes=[],u.subject.hash=null,u.publicKey=null,u.attributes=[],u.getAttribute=function(i){return T(u,i)},u.addAttribute=function(i){E([i]),u.attributes.push(i)},u.md=null,u.setSubject=function(i){E(i),u.subject.attributes=i,u.subject.hash=null},u.setAttributes=function(i){E(i),u.attributes=i},u.sign=function(i,n){u.md=n||t.md.sha1.create();var I=l[u.md.algorithm+"WithRSAEncryption"];if(!I){var N=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw N.algorithm=u.md.algorithm,N}u.signatureOid=u.siginfo.algorithmOid=I,u.certificationRequestInfo=r.getCertificationRequestInfo(u);var U=e.toDer(u.certificationRequestInfo);u.md.update(U.getBytes()),u.signature=i.sign(u.md)},u.verify=function(){var i=!1,n=u.md;if(n===null){n=S({signatureOid:u.signatureOid,type:"certification request"});var I=u.certificationRequestInfo||r.getCertificationRequestInfo(u),N=e.toDer(I);n.update(N.getBytes())}return n!==null&&(i=c({certificate:u,md:n,signature:u.signature})),i},u};function m(u){for(var i=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]),n,I,N=u.attributes,U=0;U<N.length;++U){n=N[U];var L=n.value,O=e.Type.PRINTABLESTRING;"valueTagClass"in n&&(O=n.valueTagClass,O===e.Type.UTF8&&(L=t.util.encodeUtf8(L))),I=e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.type).getBytes()),e.create(e.Class.UNIVERSAL,O,!1,L)])]),i.value.push(I)}return i}function E(u){for(var i,n=0;n<u.length;++n){if(i=u[n],typeof i.name>"u"&&(i.type&&i.type in r.oids?i.name=r.oids[i.type]:i.shortName&&i.shortName in C&&(i.name=r.oids[C[i.shortName]])),typeof i.type>"u")if(i.name&&i.name in r.oids)i.type=r.oids[i.name];else{var I=new Error("Attribute type not specified.");throw I.attribute=i,I}if(typeof i.shortName>
25"u"&&i.name&&i.name in C&&(i.shortName=C[i.name]),i.type===l.extensionRequest&&(i.valueConstructed=!0,i.valueTagClass=e.Type.SEQUENCE,!i.value&&i.extensions)){i.value=[];for(var N=0;N<i.extensions.length;++N)i.value.push(r.certificateExtensionToAsn1(x(i.extensions[N])))}if(typeof i.value>"u"){var I=new Error("Attribute value not specified.");throw I.attribute=i,I}}}function x(u,i){if(i=i||{},typeof u.name>"u"&&u.id&&u.id in r.oids&&(u.name=r.oids[u.id]),typeof u.id>"u")if(u.name&&u.name in r.oids)u.id=r.oids[u.name];else{var n=new Error("Extension ID not specified.");throw n.extension=u,n}if(typeof u.value<"u")return u;if(u.name==="keyUsage"){var I=0,N=0,U=0;u.digitalSignature&&(N|=128,I=7),u.nonRepudiation&&(N|=64,I=6),u.keyEncipherment&&(N|=32,I=5),u.dataEncipherment&&(N|=16,I=4),u.keyAgreement&&(N|=8,I=3),u.keyCertSign&&(N|=4,I=2),u.cRLSign&&(N|=2,I=1),u.encipherOnly&&(N|=1,I=0),u.decipherOnly&&(U|=128,I=7);var L=String.fromCharCode(I);U!==0?L+=String.fromCharCode(N)+String.fromCharCode(U):N!==0&&(L+=String.fromCharCode(N)),u.value=e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,L)}else if(u.name==="basicConstraints")u.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]),u.cA&&u.value.value.push(e.create(e.Class.UNIVERSAL,e.Type.BOOLEAN,!1,"ÿ")),"pathLenConstraint"in u&&u.value.value.push(e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(u.pathLenConstraint).getBytes()));else if(u.name==="extKeyUsage"){u.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);var O=u.value.value;for(var H in u)u[H]===!0&&(H in l?O.push(e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(l[H]).getBytes())):H.indexOf(".")!==-1&&O.push(e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(H).getBytes())))}else if(u.name==="nsCertType"){var I=0,N=0;u.client&&(N|=128,I=7),u.server&&(N|=64,I=6),u.email&&(N|=32,I=5),u.objsign&&(N|=16,I=4),u.reserved&&(N|=8,I=3),u.sslCA&&(N|=4,I=2),u.emailCA&&(N|=2,I=1),u.objCA&&(N|=1,I=0);var L=String.fromCharCode(I);N!==0&&(L+=String.fromCharCode(N)),u.value=e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,L)}else if(u.name==="subjectAltName"||u.name==="issuerAltName"){u.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);for(var F,K=0;K<u.altNames.length;++K){F=u.altNames[K];var L=F.value;if(F.type===7&&F.ip){if(L=t.util.bytesFromIP(F.ip),L===null){var n=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw n.extension=u,n}}else F.type===8&&(F.oid?L=e.oidToDer(e.oidToDer(F.oid)):L=e.oidToDer(L));u.value.value.push(e.create(e.Class.CONTEXT_SPECIFIC,F.type,!1,L))}}else if(u.name==="nsComment"&&i.cert){if(!/^[\x00-\x7F]*$/.test(u.comment)||u.comment.length<1||u.comment.length>128)throw new Error('Invalid "nsComment" content.');u.value=e.create(e.Class.UNIVERSAL,e.Type.IA5STRING,!1,u.comment)}else if(u.name==="subjectKeyIdentifier"&&i.cert){var q=i.cert.generateSubjectKeyIdentifier();u.subjectKeyIdentifier=q.toHex(),u.value=e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,q.getBytes())}else if(u.name==="authorityKeyIdentifier"&&i.cert){u.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);var O=u.value.value;if(u.keyIdentifier){var Q=u.keyIdentifier===!0?i.cert.generateSubjectKeyIdentifier().getBytes():u.keyIdentifier;O.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!1,Q))}if(u.authorityCertIssuer){var j=[e.create(e.Class.CONTEXT_SPECIFIC,4,!0,[m(u.authorityCertIssuer===!0?i.cert.issuer:u.authorityCertIssuer)])];O.push(e.create(e.Class.CONTEXT_SPECIFIC,1,!0,j))}if(u.serialNumber){var ee=t.util.hexToBytes(u.serialNumber===!0?i.cert.serialNumber:u.serialNumber);O.push(e.create(e.Class.CONTEXT_SPECIFIC,2,!1,ee))}}else if(u.name==="cRLDistributionPoints"){u.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);for(var O=u.value.value,se=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]),oe=e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[]),F,K=0;K<u.altNames.length;++K){F=u.altNames[K];var L=F.value;if(F.type===7&&F.ip){if(L=t.util.bytesFromIP(F.ip),L===null){var n=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw n.extension=u,n}}else F.type===8&&(F.oid?L=e.oidToDer(e.oidToDer(F.oid)):L=e.oidToDer(L));
25oe.value.push(e.create(e.Class.CONTEXT_SPECIFIC,F.type,!1,L))}se.value.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[oe])),O.push(se)}if(typeof u.value>"u"){var n=new Error("Extension value not specified.");throw n.extension=u,n}return u}function s(u,i){switch(u){case l["RSASSA-PSS"]:var n=[];return i.hash.algorithmOid!==void 0&&n.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.hash.algorithmOid).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")])])),i.mgf.algorithmOid!==void 0&&n.push(e.create(e.Class.CONTEXT_SPECIFIC,1,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.mgf.algorithmOid).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.mgf.hash.algorithmOid).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")])])])),i.saltLength!==void 0&&n.push(e.create(e.Class.CONTEXT_SPECIFIC,2,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(i.saltLength).getBytes())])),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,n);default:return e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")}}function g(u){var i=e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[]);if(u.attributes.length===0)return i;for(var n=u.attributes,I=0;I<n.length;++I){var N=n[I],U=N.value,L=e.Type.UTF8;"valueTagClass"in N&&(L=N.valueTagClass),L===e.Type.UTF8&&(U=t.util.encodeUtf8(U));var O=!1;"valueConstructed"in N&&(O=N.valueConstructed);var H=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(N.type).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,L,O,U)])]);i.value.push(H)}return i}var y=new Date("1950-01-01T00:00:00Z"),b=new Date("2050-01-01T00:00:00Z");function R(u){return u>=y&&u<b?e.create(e.Class.UNIVERSAL,e.Type.UTCTIME,!1,e.dateToUtcTime(u)):e.create(e.Class.UNIVERSAL,e.Type.GENERALIZEDTIME,!1,e.dateToGeneralizedTime(u))}return r.getTBSCertificate=function(u){var i=R(u.validity.notBefore),n=R(u.validity.notAfter),I=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(u.version).getBytes())]),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,t.util.hexToBytes(u.serialNumber)),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(u.siginfo.algorithmOid).getBytes()),s(u.siginfo.algorithmOid,u.siginfo.parameters)]),m(u.issuer),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[i,n]),m(u.subject),r.publicKeyToAsn1(u.publicKey)]);return u.issuer.uniqueId&&I.value.push(e.create(e.Class.CONTEXT_SPECIFIC,1,!0,[e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,"\0"+u.issuer.uniqueId)])),u.subject.uniqueId&&I.value.push(e.create(e.Class.CONTEXT_SPECIFIC,2,!0,[e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,"\0"+u.subject.uniqueId)])),u.extensions.length>0&&I.value.push(r.certificateExtensionsToAsn1(u.extensions)),I},r.getCertificationRequestInfo=function(u){var i=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(u.version).getBytes()),m(u.subject),r.publicKeyToAsn1(u.publicKey),g(u)]);return i},r.distinguishedNameToAsn1=function(u){return m(u)},r.certificateToAsn1=function(u){var i=u.tbsCertificate||r.getTBSCertificate(u);return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[i,e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(u.signatureOid).getBytes()),s(u.signatureOid,u.signatureParameters)]),e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,"\0"+u.signature)])},r.certificateExtensionsToAsn1=function(u){var i=e.create(e.Class.CONTEXT_SPECIFIC,3,!0,[]),n=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);i.value.push(n);for(var I=0;I<u.length;++I)n.value.push(r.certificateExtensionToAsn1(u[I]));return i},r.certificateExtensionToAsn1=function(u){var i=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);i.value.push(e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(u.id).getBytes())),u.critical&&i.value.push(e.create(e.Class.UNIVERSAL,e.Type.BOOLEAN,!1,"ÿ"));var n=u.value;return typeof u.value!="string"&&(n=e.toDer(n).getBytes()),i.value.push(e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,n)),i},r.certificationRequestToAsn1=function(u){var i=u.certificationRequestInfo||r.getCertificationRequestInfo(u);return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[i,e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(u.signatureOid).getBytes()),s(u.signatureOid,u.signatureParameters)]),e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,"\0"+u.signature)])},r.createCaStore=function(u){var i={certs:{}};i.getIssuer=function(L){var O=n(L.issuer);return O},i.addCertificate=function(L){if(typeof L=="string"&&(L=t.pki.certificateFromPem(L)),I(L.subject),!i.hasCertificate(L))if(L.subject.hash in i.certs){var O=i.certs[L.subject.hash];t.util.isArray(O)||(O=[O]),O.push(L),i.certs[L.subject.hash]=O}else i.certs[L.subject.hash]=L},i.hasCertificate=function(L){typeof L=="string"&&(L=t.pki.certificateFromPem(L));var O=n(L.subject);if(!O)return!1;t.util.isArray(O)||(O=[O]);for(var H=e.toDer(r.certificateToAsn1(L)).getBytes(),F=0;F<O.length;++F){var K=e.toDer(r.certificateToAsn1(O[F])).getBytes();if(H===K)return!0}return!1},i.listAllCertificates=function(){var L=[];for(var O in i.certs)if(i.certs.hasOwnProperty(O)){var H=i.certs[O];if(!t.util.isArray(H))L.push(H);else for(var F=0;F<H.length;++F)L.push(H[F])}return L},i.removeCertificate=function(L){var O;if(typeof L=="string"&&(L=t.pki.certificateFromPem(L)),I(L.subject),!i.hasCertificate(L))return null;var H=n(L.subject);if(!t.util.isArray(H))return O=i.certs[L.subject.hash],delete i.certs[L.subject.hash],O;for(var F=e.toDer(r.certificateToAsn1(L)).getBytes(),K=0;K<H.length;++K){var q=e.toDer(r.certificateToAsn1(H[K])).getBytes();F===q&&(O=H[K],H.splice(K,1))}return H.length===0&&delete i.certs[L.subject.hash],O};function n(L){return I(L),i.certs[L.hash]||null}function I(L){if(!L.hash){var O=t.md.sha1.create();L.attributes=r.RDNAttributesAsArray(m(L),O),L.hash=O.digest().toHex()}}if(u)for(var N=0;N<u.length;++N){var U=u[N];i.addCertificate(U)}return i},r.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},r.verifyCertificateChain=function(u,i,n){typeof n=="function"&&(n={verify:n}),n=n||{},i=i.slice(0);var I=i.slice(0),N=n.validityCheckDate;typeof N>"u"&&(N=new Date);var U=!0,L=null,O=0;do{var H=i.shift(),F=null,K=!1;if(N&&(N<H.validity.notBefore||N>
25H.validity.notAfter)&&(L={message:"Certificate is not valid yet or has expired.",error:r.certificateError.certificate_expired,notBefore:H.validity.notBefore,notAfter:H.validity.notAfter,now:N}),L===null){if(F=i[0]||u.getIssuer(H),F===null&&H.isIssuer(H)&&(K=!0,F=H),F){var q=F;t.util.isArray(q)||(q=[q]);for(var Q=!1;!Q&&q.length>0;){F=q.shift();try{Q=F.verify(H)}catch{}}Q||(L={message:"Certificate signature is invalid.",error:r.certificateError.bad_certificate})}L===null&&(!F||K)&&!u.hasCertificate(H)&&(L={message:"Certificate is not trusted.",error:r.certificateError.unknown_ca})}if(L===null&&F&&!H.isIssuer(F)&&(L={message:"Certificate issuer is invalid.",error:r.certificateError.bad_certificate}),L===null)for(var j={keyUsage:!0,basicConstraints:!0},ee=0;L===null&&ee<H.extensions.length;++ee){var se=H.extensions[ee];se.critical&&!(se.name in j)&&(L={message:"Certificate has an unsupported critical extension.",error:r.certificateError.unsupported_certificate})}if(L===null&&(!U||i.length===0&&(!F||K))){var oe=H.getExtension("basicConstraints"),fe=H.getExtension("keyUsage");if(fe!==null&&(!fe.keyCertSign||oe===null)&&(L={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:r.certificateError.bad_certificate}),L===null&&oe!==null&&!oe.cA&&(L={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:r.certificateError.bad_certificate}),L===null&&fe!==null&&"pathLenConstraint"in oe){var z=O-1;z>oe.pathLenConstraint&&(L={message:"Certificate basicConstraints pathLenConstraint violated.",error:r.certificateError.bad_certificate})}}var le=L===null?!0:L.error,Z=n.verify?n.verify(le,O,I):le;if(Z===!0)L=null;else throw le===!0&&(L={message:"The application rejected the certificate.",error:r.certificateError.bad_certificate}),(Z||Z===0)&&(typeof Z=="object"&&!t.util.isArray(Z)?(Z.message&&(L.message=Z.message),Z.error&&(L.error=Z.error)):typeof Z=="string"&&(L.error=Z)),L;U=!1,++O}while(i.length>0);return!0},br.exports}var qa;function za(){if(qa)return Ir.exports;qa=1;var t=ve();ot(),wt(),yt(),Oa(),Fa(),et(),Ot(),_t(),me(),Rr();var e=t.asn1,r=t.pki,l=Ir.exports=t.pkcs12=t.pkcs12||{},C={name:"ContentInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},C,{name:"PFX.macData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:e.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},f={name:"SafeBag",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},a={name:"Attribute",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,capture:"values"}]},p={name:"CertBag",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:e.Class.UNIVERSAL,type:e.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function h(E,x,s,g){for(var y=[],b=0;b<E.length;b++)for(var R=0;R<E[b].safeBags.length;R++){var u=E[b].safeBags[R];if(!(g!==void 0&&u.type!==g)){if(x===null){y.push(u);continue}u.attributes[x]!==void 0&&u.attributes[x].indexOf(s)>=0&&y.push(u)}}return y}
25l.pkcs12FromAsn1=function(E,x,s){typeof x=="string"?(s=x,x=!0):x===void 0&&(x=!0);var g={},y=[];if(!e.validate(E,v,g,y)){var b=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw b.errors=b,b}var R={version:g.version.charCodeAt(0),safeContents:[],getBags:function(F){var K={},q;return"localKeyId"in F?q=F.localKeyId:"localKeyIdHex"in F&&(q=t.util.hexToBytes(F.localKeyIdHex)),q===void 0&&!("friendlyName"in F)&&"bagType"in F&&(K[F.bagType]=h(R.safeContents,null,null,F.bagType)),q!==void 0&&(K.localKeyId=h(R.safeContents,"localKeyId",q,F.bagType)),"friendlyName"in F&&(K.friendlyName=h(R.safeContents,"friendlyName",F.friendlyName,F.bagType)),K},getBagsByFriendlyName:function(F,K){return h(R.safeContents,"friendlyName",F,K)},getBagsByLocalKeyId:function(F,K){return h(R.safeContents,"localKeyId",F,K)}};if(g.version.charCodeAt(0)!==3){var b=new Error("PKCS#12 PFX of version other than 3 not supported.");throw b.version=g.version.charCodeAt(0),b}if(e.derToOid(g.contentType)!==r.oids.data){var b=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw b.oid=e.derToOid(g.contentType),b}var u=g.content.value[0];if(u.tagClass!==e.Class.UNIVERSAL||u.type!==e.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(u=T(u),g.mac){var i=null,n=0,I=e.derToOid(g.macAlgorithm);switch(I){case r.oids.sha1:i=t.md.sha1.create(),n=20;break;case r.oids.sha256:i=t.md.sha256.create(),n=32;break;case r.oids.sha384:i=t.md.sha384.create(),n=48;break;case r.oids.sha512:i=t.md.sha512.create(),n=64;break;case r.oids.md5:i=t.md.md5.create(),n=16;break}if(i===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+I);var N=new t.util.ByteBuffer(g.macSalt),U="macIterations"in g?parseInt(t.util.bytesToHex(g.macIterations),16):1,L=l.generateKey(s,N,3,U,n,i),O=t.hmac.create();O.start(i,L),O.update(u.value);var H=O.getMac();if(H.getBytes()!==g.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(E.value)&&E.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return k(R,u.value,x,s),R};function T(E){if(E.composed||E.constructed){for(var x=t.util.createBuffer(),s=0;s<E.value.length;++s)x.putBytes(E.value[s].value);E.composed=E.constructed=!1,E.value=x.getBytes()}return E}function k(E,x,s,g){if(x=e.fromDer(x,s),x.tagClass!==e.Class.UNIVERSAL||x.type!==e.Type.SEQUENCE||x.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var y=0;y<x.value.length;y++){var b=x.value[y],R={},u=[];if(!e.validate(b,C,R,u)){var i=new Error("Cannot read ContentInfo.");throw i.errors=u,i}var n={encrypted:!1},I=null,N=R.content.value[0];switch(e.derToOid(R.contentType)){case r.oids.data:if(N.tagClass!==e.Class.UNIVERSAL||N.type!==e.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");I=T(N).value;break;case r.oids.encryptedData:I=S(N,g),n.encrypted=!0;break;default:var i=new Error("Unsupported PKCS#12 contentType.");throw i.contentType=e.derToOid(R.contentType),i}n.safeBags=c(I,s,g),E.safeContents.push(n)}}function S(E,x){var s={},g=[];if(!e.validate(E,t.pkcs7.asn1.encryptedDataValidator,s,g)){var y=new Error("Cannot read EncryptedContentInfo.");throw y.errors=g,y}var b=e.derToOid(s.contentType);if(b!==r.oids.data){var y=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw y.oid=b,y}b=e.derToOid(s.encAlgorithm);var R=r.pbe.getCipher(b,s.encParameter,x),u=T(s.encryptedContentAsn1),i=t.util.createBuffer(u.value);if(R.update(i),!R.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return R.output.getBytes()}function c(E,x,s){if(!x&&E.length===0)return[];if(E=e.fromDer(E,x),E.tagClass!==e.Class.UNIVERSAL||E.type!==e.Type.SEQUENCE||E.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var g=[],y=0;y<E.value.length;y++){var b=E.value[y],R={},u=[];if(!e.validate(b,f,R,u)){var i=new Error("Cannot read SafeBag.");throw i.errors=u,i}var n={type:e.derToOid(R.bagId),attributes:m(R.bagAttributes)};g.push(n);var I,N,U=R.bagValue.value[0];switch(n.type){case r.oids.pkcs8ShroudedKeyBag:if(U=r.decryptPrivateKeyInfo(U,s),U===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case r.oids.keyBag:try{n.key=r.privateKeyFromAsn1(U)}catch{n.key=null,n.asn1=U}continue;case r.oids.certBag:I=p,N=function(){if(e.derToOid(R.certId)!==r.oids.x509Certificate){var O=new Error("Unsupported certificate type, only X.509 supported.");throw O.oid=e.derToOid(R.certId),O}var H=e.fromDer(R.cert,x);try{n.cert=r.certificateFromAsn1(H,!0)}catch{n.cert=null,n.asn1=H}};break;default:var i=new Error("Unsupported PKCS#12 SafeBag type.");throw i.oid=n.type,i}if(I!==void 0&&!e.validate(U,I,R,u)){var i=new Error("Cannot read PKCS#12 "+I.name);throw i.errors=u,i}N()}return g}function m(E){var x={};if(E!==void 0)for(var s=0;s<E.length;++s){var g={},y=[];if(!e.validate(E[s],a,g,y)){var b=new Error("Cannot read PKCS#12 BagAttribute.");throw b.errors=y,b}var R=e.derToOid(g.oid);if(r.oids[R]!==void 0){x[r.oids[R]]=[];for(var u=0;u<g.values.length;++u)x[r.oids[R]].push(g.values[u].value)}}return x}return l.toPkcs12Asn1=function(E,x,s,g){g=g||{},g.saltSize=g.saltSize||8,g.count=g.count||2048,g.algorithm=g.algorithm||g.encAlgorithm||"aes128","useMac"in g||(g.useMac=!0),"localKeyId"in g||(g.localKeyId=null),"generateLocalKeyId"in g||(g.generateLocalKeyId=!0);var y=g.localKeyId,b;if(y!==null)y=t.util.hexToBytes(y);else if(g.generateLocalKeyId)if(x){var R=t.util.isArray(x)?x[0]:x;
25typeof R=="string"&&(R=r.certificateFromPem(R));var u=t.md.sha1.create();u.update(e.toDer(r.certificateToAsn1(R)).getBytes()),y=u.digest().getBytes()}else y=t.random.getBytes(20);var i=[];y!==null&&i.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.localKeyId).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,y)])])),"friendlyName"in g&&i.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.friendlyName).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.BMPSTRING,!1,g.friendlyName)])])),i.length>0&&(b=e.create(e.Class.UNIVERSAL,e.Type.SET,!0,i));var n=[],I=[];x!==null&&(t.util.isArray(x)?I=x:I=[x]);for(var N=[],U=0;U<I.length;++U){x=I[U],typeof x=="string"&&(x=r.certificateFromPem(x));var L=U===0?b:void 0,O=r.certificateToAsn1(x),H=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.certBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.x509Certificate).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(O).getBytes())])])]),L]);N.push(H)}if(N.length>0){var F=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,N),K=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(F).getBytes())])]);n.push(K)}var q=null;if(E!==null){var Q=r.wrapRsaPrivateKey(r.privateKeyToAsn1(E));s===null?q=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.keyBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[Q]),b]):q=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.pkcs8ShroudedKeyBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[r.encryptPrivateKeyInfo(Q,s,g)]),b]);var j=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[q]),ee=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(j).getBytes())])]);n.push(ee)}var se=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,n),oe;if(g.useMac){var u=t.md.sha1.create(),fe=new t.util.ByteBuffer(t.random.getBytes(g.saltSize)),z=g.count,E=l.generateKey(s,fe,3,z,20),le=t.hmac.create();le.start(u,E),le.update(e.toDer(se).getBytes());var Z=le.getMac();oe=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.sha1).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,Z.getBytes())]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,fe.getBytes()),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(z).getBytes())])}return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(3).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(r.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(se).getBytes())])]),oe])},l.generateKey=t.pbe.generatePkcs12Key,Ir.exports}var ja;function Qa(){if(ja)return hr.exports;ja=1;var t=ve();ot(),yt(),Fa(),Et(),gr(),za(),Nr(),Ot(),me(),Rr();var e=t.asn1,r=hr.exports=t.pki=t.pki||{};return r.pemToDer=function(l){var C=t.pem.decode(l)[0];if(C.procType&&C.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return t.util.createBuffer(C.body)},r.privateKeyFromPem=function(l){var C=t.pem.decode(l)[0];if(C.type!=="PRIVATE KEY"&&C.type!=="RSA PRIVATE KEY"){var v=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw v.headerType=C.type,v}if(C.procType&&C.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var f=e.fromDer(C.body);return r.privateKeyFromAsn1(f)},r.privateKeyToPem=function(l,C){var v={type:"RSA PRIVATE KEY",body:e.toDer(r.privateKeyToAsn1(l)).getBytes()};return t.pem.encode(v,{maxline:C})},r.privateKeyInfoToPem=function(l,C){var v={type:"PRIVATE KEY",body:e.toDer(l).getBytes()};return t.pem.encode(v,{maxline:C})},hr.exports}var Lr,$a;function Xa(){if($a)return Lr;$a=1;var t=ve();
25ot(),wt(),cr(),Et(),Qa(),et(),_t(),me();var e=function(d,D,_,o){var B=t.util.createBuffer(),V=d.length>>1,M=V+(d.length&1),W=d.substr(0,M),te=d.substr(V,M),ie=t.util.createBuffer(),X=t.hmac.create();_=D+_;var ae=Math.ceil(o/16),ce=Math.ceil(o/20);X.start("MD5",W);var ye=t.util.createBuffer();ie.putBytes(_);for(var de=0;de<ae;++de)X.start(null,null),X.update(ie.getBytes()),ie.putBuffer(X.digest()),X.start(null,null),X.update(ie.bytes()+_),ye.putBuffer(X.digest());X.start("SHA1",te);var Se=t.util.createBuffer();ie.clear(),ie.putBytes(_);for(var de=0;de<ce;++de)X.start(null,null),X.update(ie.getBytes()),ie.putBuffer(X.digest()),X.start(null,null),X.update(ie.bytes()+_),Se.putBuffer(X.digest());return B.putBytes(t.util.xorBytes(ye.getBytes(),Se.getBytes(),o)),B},r=function(d,D,_){var o=t.hmac.create();o.start("SHA1",d);var B=t.util.createBuffer();return B.putInt32(D[0]),B.putInt32(D[1]),B.putByte(_.type),B.putByte(_.version.major),B.putByte(_.version.minor),B.putInt16(_.length),B.putBytes(_.fragment.bytes()),o.update(B.getBytes()),o.digest().getBytes()},l=function(d,D,_){var o=!1;try{var B=d.deflate(D.fragment.getBytes());D.fragment=t.util.createBuffer(B),D.length=B.length,o=!0}catch{}return o},C=function(d,D,_){var o=!1;try{var B=d.inflate(D.fragment.getBytes());D.fragment=t.util.createBuffer(B),D.length=B.length,o=!0}catch{}return o},v=function(d,D){var _=0;switch(D){case 1:_=d.getByte();break;case 2:_=d.getInt16();break;case 3:_=d.getInt24();break;case 4:_=d.getInt32();break}return t.util.createBuffer(d.getBytes(_))},f=function(d,D,_){d.putInt(_.length(),D<<3),d.putBuffer(_)},a={};a.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}},a.SupportedVersions=[a.Versions.TLS_1_1,a.Versions.TLS_1_0],a.Version=a.SupportedVersions[0],a.MaxFragment=15360,a.ConnectionEnd={server:0,client:1},a.PRFAlgorithm={tls_prf_sha256:0},a.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},a.CipherType={stream:0,block:1,aead:2},a.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},a.CompressionMethod={none:0,deflate:1},a.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},a.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},a.Alert={},a.Alert.Level={warning:1,fatal:2},a.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_de
25nied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},a.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},a.CipherSuites={},a.getCipherSuite=function(d){var D=null;for(var _ in a.CipherSuites){var o=a.CipherSuites[_];if(o.id[0]===d.charCodeAt(0)&&o.id[1]===d.charCodeAt(1)){D=o;break}}return D},a.handleUnexpected=function(d,D){var _=!d.open&&d.entity===a.ConnectionEnd.client;_||d.error(d,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unexpected_message}})},a.handleHelloRequest=function(d,D,_){!d.handshaking&&d.handshakes>0&&(a.queue(d,a.createAlert(d,{level:a.Alert.Level.warning,description:a.Alert.Description.no_renegotiation})),a.flush(d)),d.process()},a.parseHelloMessage=function(d,D,_){var o=null,B=d.entity===a.ConnectionEnd.client;if(_<38)d.error(d,{message:B?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});else{var V=D.fragment,M=V.length();if(o={version:{major:V.getByte(),minor:V.getByte()},random:t.util.createBuffer(V.getBytes(32)),session_id:v(V,1),extensions:[]},B?(o.cipher_suite=V.getBytes(2),o.compression_method=V.getByte()):(o.cipher_suites=v(V,2),o.compression_methods=v(V,1)),M=_-(M-V.length()),M>0){for(var W=v(V,2);W.length()>0;)o.extensions.push({type:[W.getByte(),W.getByte()],data:v(W,2)});if(!B)for(var te=0;te<o.extensions.length;++te){var ie=o.extensions[te];if(ie.type[0]===0&&ie.type[1]===0)for(var X=v(ie.data,2);X.length()>0;){var ae=X.getByte();if(ae!==0)break;d.session.extensions.server_name.serverNameList.push(v(X,2).getBytes())}}}if(d.session.version&&(o.version.major!==d.session.version.major||o.version.minor!==d.session.version.minor))return d.error(d,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}});if(B)d.session.cipherSuite=a.getCipherSuite(o.cipher_suite);else for(var ce=t.util.createBuffer(o.cipher_suites.bytes());ce.length()>0&&(d.session.cipherSuite=a.getCipherSuite(ce.getBytes(2)),d.session.cipherSuite===null););if(d.session.cipherSuite===null)return d.error(d,{message:"No cipher suites in common.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.handshake_failure},cipherSuite:t.util.bytesToHex(o.cipher_suite)});B?d.session.compressionMethod=o.compression_method:d.session.compressionMethod=a.CompressionMethod.none}return o},a.createSecurityParameters=function(d,D){var _=d.entity===a.ConnectionEnd.client,o=D.random.bytes(),B=_?d.session.sp.client_random:o,V=_?o:a.createRandom().getBytes();d.session.sp={entity:d.entity,prf_algorithm:a.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:d.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:B,server_random:V}},a.handleServerHello=function(d,D,_){var o=a.parseHelloMessage(d,D,_);if(!d.fail){if(o.version.minor<=d.version.minor)d.version.minor=o.version.minor;else return d.error(d,{message:"Incompatible TLS version.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}});d.session.version=d.version;var B=o.session_id.bytes();B.length>0&&B===d.session.id?(d.expect=c,d.session.resuming=!0,d.session.sp.server_random=o.random.bytes()):(d.expect=h,d.session.resuming=!1,a.createSecurityParameters(d,o)),d.session.id=B,d.process()}},a.handleClientHello=function(d,D,_){var o=a.parseHelloMessage(d,D,_);if(!d.fail){var B=o.session_id.bytes(),V=null;if(d.sessionCache&&(V=d.sessionCache.getSession(B),V===null?B="":(V.version.major!==o.version.major||V.version.minor>o.version.minor)&&(V=null,B="")),B.length===0&&(B=t.random.getBytes(32)),d.session.id=B,d.session.clientHelloVersion=o.version,d.session.sp={},V)d.version=d.session.version=V.version,d.session.sp=V.sp;else{for(var M,W=1;W<a.SupportedVersions.length&&(M=a.SupportedVersions[W],!(M.minor<=o.version.minor));++W);d.version={major:M.major,minor:M.minor},d.session.version=d.version}V!==null?(d.expect=R,d.session.resuming=!0,d.session.sp.client_random=o.random.bytes()):(d.expect=d.verifyClient!==!1?g:y,d.session.resuming=!1,a.createSecurityParameters(d,o)),d.open=!0,a.queue(d,a.createRecord(d,{type:a.ContentType.handshake,data:a.createServerHello(d)})),d.session.resuming?(a.queue(d,a.createRecord(d,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),d.state.pending=a.createConnectionState(d),d.state.current.write=d.state.pending.write,a.queue(d,a.createRecord(d,{type:a.ContentType.handshake,data:a.createFinished(d)}))):(a.queue(d,a.createRecord(d,{type:a.ContentType.handshake,data:a.createCertificate(d)}
25)),d.fail||(a.queue(d,a.createRecord(d,{type:a.ContentType.handshake,data:a.createServerKeyExchange(d)})),d.verifyClient!==!1&&a.queue(d,a.createRecord(d,{type:a.ContentType.handshake,data:a.createCertificateRequest(d)})),a.queue(d,a.createRecord(d,{type:a.ContentType.handshake,data:a.createServerHelloDone(d)})))),a.flush(d),d.process()}},a.handleCertificate=function(d,D,_){if(_<3)return d.error(d,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var o=D.fragment,B={certificate_list:v(o,3)},V,M,W=[];try{for(;B.certificate_list.length()>0;)V=v(B.certificate_list,3),M=t.asn1.fromDer(V),V=t.pki.certificateFromAsn1(M,!0),W.push(V)}catch(ie){return d.error(d,{message:"Could not parse certificate list.",cause:ie,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate}})}var te=d.entity===a.ConnectionEnd.client;(te||d.verifyClient===!0)&&W.length===0?d.error(d,{message:te?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}}):W.length===0?d.expect=te?T:y:(te?d.session.serverCertificate=W[0]:d.session.clientCertificate=W[0],a.verifyCertificateChain(d,W)&&(d.expect=te?T:y)),d.process()},a.handleServerKeyExchange=function(d,D,_){if(_>0)return d.error(d,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unsupported_certificate}});d.expect=k,d.process()},a.handleClientKeyExchange=function(d,D,_){if(_<48)return d.error(d,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unsupported_certificate}});var o=D.fragment,B={enc_pre_master_secret:v(o,2).getBytes()},V=null;if(d.getPrivateKey)try{V=d.getPrivateKey(d,d.session.serverCertificate),V=t.pki.privateKeyFromPem(V)}catch(te){d.error(d,{message:"Could not get private key.",cause:te,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}})}if(V===null)return d.error(d,{message:"No private key set.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}});try{var M=d.session.sp;M.pre_master_secret=V.decrypt(B.enc_pre_master_secret);var W=d.session.clientHelloVersion;if(W.major!==M.pre_master_secret.charCodeAt(0)||W.minor!==M.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{M.pre_master_secret=t.random.getBytes(48)}d.expect=R,d.session.clientCertificate!==null&&(d.expect=b),d.process()},a.handleCertificateRequest=function(d,D,_){if(_<3)return d.error(d,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var o=D.fragment,B={certificate_types:v(o,1),certificate_authorities:v(o,2)};d.session.certificateRequest=B,d.expect=S,d.process()},a.handleCertificateVerify=function(d,D,_){if(_<2)return d.error(d,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var o=D.fragment;o.read-=4;var B=o.bytes();o.read+=4;var V={signature:v(o,2).getBytes()},M=t.util.createBuffer();M.putBuffer(d.session.md5.digest()),M.putBuffer(d.session.sha1.digest()),M=M.getBytes();try{var W=d.session.clientCertificate;if(!W.publicKey.verify(M,V.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");d.session.md5.update(B),d.session.sha1.update(B)}catch{return d.error(d,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.handshake_failure}})}d.expect=R,d.process()},a.handleServerHelloDone=function(d,D,_){if(_>0)return d.error(d,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.record_overflow}});if(d.serverCertificate===null){var o={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.insufficient_security}},B=0,V=d.verify(d,o.alert.description,B,[]);if(V!==!0)return(V||V===0)&&(typeof V=="object"&&!t.util.isArray(V)?(V.message&&(o.message=V.message),V.alert&&(o.alert.description=V.alert)):typeof V=="number"&&(o.alert.description=V)),d.error(d,o)}d.session.certificateRequest!==null&&(D=a.createRecord(d,{type:a.ContentType.handshake,data:a.createCertificate(d)}),a.queue(d,D)),D=a.createRecord(d,{type:a.ContentType.handshake,data:a.createClientKeyExchange(d)}),a.queue(d,D),d.expect=x;var M=function(W,te){W.session.certificateRequest!==null&&W.session.clientCertificate!==null&&a.queue(W,a.createRecord(W,{type:a.ContentType.handshake,data:a.createCertificateVerify(W,te)})),a.queue(W,a.createRecord(W,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),W.state.pending=a.createConnectionState(W),W.state.current.write=W.state.pending.write,a.queue(W,a.createRecord(W,{type:a.ContentType.handshake,data:a.createFinished(W)})),W.expect=c,a.flush(W),W.process()};if(d.session.certificateRequest===null||d.session.clientCertificate===null)return M(d,null);a.getClientSignature(d,M)},a.handleChangeCipherSpec=function(d,D){if(D.fragment.getByte()!==1)return d.error(d,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var _=d.entity===a.ConnectionEnd.client;(d.session.resuming&&_||!d.session.resuming&&!_)&&(d.state.pending=a.createConnectionState(d)),d.state.current.read=d.state.pending.read,(!d.session.resuming&&_||d.session.resuming&&!_)&&(d.state.pending=null),d.expect=_?m:u,d.process()},a.handleFinished=function(d,D,_){var o=D.fragment;o.read-=4;var B=o.bytes();o.read+=4;var V=D.fragment.getBytes();o=t.util.createBuffer(),o.putBuffer(d.session.md5.digest()),o.putBuffer(d.session.sha1.digest());var M=d.entity===a.ConnectionEnd.client,W=M?"server finished":"client finished",te=d.session.sp,ie=12,X=e;if(o=X(te.master_secret,W,o.getBytes(),ie),o.getBytes()!==V)return d.error(d,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.decrypt_error}});d.session.md5.update(B),d.session.sha1.update(B),(d.session.resuming&&M||!d.session.resuming&&!M)&&(a.queue(d,a.createRecord(d,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),d.state.current.write=d.state.pending.write,d.state.pending=null,a.queue(d,a.createRecord(d,{type:a.ContentType.handshake,data:a.createFinished(d)}))),d.expect=M?E:i,d.handshaking=!1,++d.handshakes,d.peerCertificate=M?d.session.serverCertificate:d.session.clientCertificate,a.flush(d),d.isConnected=!0,d.connected(d),d.process()},a.handleAlert=function(d,D){var _=D.fragment,o={level:_.getByte(),description:_.getByte()},B;switch(o.description){case a.Alert.Description.close_notify:B="Connection closed.";break;case a.Alert.Description.unexpected_message:B="Unexpected message.";break;case a.Alert.Description.bad_record_mac:B="Bad record MAC.";break;case a.Alert.Description.decryption_failed:B="Decryption failed.";break;case a.Alert.Description.record_overflow:B="Record overflow.";break;case a.Alert.Description.decompression_failure:B="Decompression failed.";break;case a.Alert.Description.handshake_failure:B="Handshake failure.";break;case a.Alert.Description.bad_certificate:B="Bad certificate.";break;case a.Alert.Description.unsupported_certificate:B="Unsupported certificate.";break;
vendor: 9,991 bytes, line 25
25case a.Alert.Description.certificate_revoked:B="Certificate revoked.";break;case a.Alert.Description.certificate_expired:B="Certificate expired.";break;case a.Alert.Description.certificate_unknown:B="Certificate unknown.";break;case a.Alert.Description.illegal_parameter:B="Illegal parameter.";break;case a.Alert.Description.unknown_ca:B="Unknown certificate authority.";break;case a.Alert.Description.access_denied:B="Access denied.";break;case a.Alert.Description.decode_error:B="Decode error.";break;case a.Alert.Description.decrypt_error:B="Decrypt error.";break;case a.Alert.Description.export_restriction:B="Export restriction.";break;case a.Alert.Description.protocol_version:B="Unsupported protocol version.";break;case a.Alert.Description.insufficient_security:B="Insufficient security.";break;case a.Alert.Description.internal_error:B="Internal error.";break;case a.Alert.Description.user_canceled:B="User canceled.";break;case a.Alert.Description.no_renegotiation:B="Renegotiation not supported.";break;default:B="Unknown error.";break}if(o.description===a.Alert.Description.close_notify)return d.close();d.error(d,{message:B,send:!1,origin:d.entity===a.ConnectionEnd.client?"server":"client",alert:o}),d.process()},a.handleHandshake=function(d,D){var _=D.fragment,o=_.getByte(),B=_.getInt24();if(B>_.length())return d.fragmented=D,D.fragment=t.util.createBuffer(),_.read-=4,d.process();d.fragmented=null,_.read-=4;var V=_.bytes(B+4);_.read+=4,o in oe[d.entity][d.expect]?(d.entity===a.ConnectionEnd.server&&!d.open&&!d.fail&&(d.handshaking=!0,d.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:t.md.md5.create(),sha1:t.md.sha1.create()}),o!==a.HandshakeType.hello_request&&o!==a.HandshakeType.certificate_verify&&o!==a.HandshakeType.finished&&(d.session.md5.update(V),d.session.sha1.update(V)),oe[d.entity][d.expect][o](d,D,B)):a.handleUnexpected(d,D)},a.handleApplicationData=function(d,D){d.data.putBuffer(D.fragment),d.dataReady(d),d.process()},a.handleHeartbeat=function(d,D){var _=D.fragment,o=_.getByte(),B=_.getInt16(),V=_.getBytes(B);if(o===a.HeartbeatMessageType.heartbeat_request){if(d.handshaking||B>V.length)return d.process();a.queue(d,a.createRecord(d,{type:a.ContentType.heartbeat,data:a.createHeartbeat(a.HeartbeatMessageType.heartbeat_response,V)})),a.flush(d)}else if(o===a.HeartbeatMessageType.heartbeat_response){if(V!==d.expectedHeartbeatPayload)return d.process();d.heartbeatReceived&&d.heartbeatReceived(d,t.util.createBuffer(V))}d.process()};var p=0,h=1,T=2,k=3,S=4,c=5,m=6,E=7,x=8,s=0,g=1,y=2,b=3,R=4,u=5,i=6,n=a.handleUnexpected,I=a.handleChangeCipherSpec,N=a.handleAlert,U=a.handleHandshake,L=a.handleApplicationData,O=a.handleHeartbeat,H=[];H[a.ConnectionEnd.client]=[[n,N,U,n,O],[n,N,U,n,O],[n,N,U,n,O],[n,N,U,n,O],[n,N,U,n,O],[I,N,n,n,O],[n,N,U,n,O],[n,N,U,L,O],[n,N,U,n,O]],H[a.ConnectionEnd.server]=[[n,N,U,n,O],[n,N,U,n,O],[n,N,U,n,O],[n,N,U,n,O],[I,N,n,n,O],[n,N,U,n,O],[n,N,U,L,O],[n,N,U,n,O]];var F=a.handleHelloRequest,K=a.handleServerHello,q=a.handleCertificate,Q=a.handleServerKeyExchange,j=a.handleCertificateRequest,ee=a.handleServerHelloDone,se=a.handleFinished,oe=[];oe[a.ConnectionEnd.client]=[[n,n,K,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n],[F,n,n,n,n,n,n,n,n,n,n,q,Q,j,ee,n,n,n,n,n,n],[F,n,n,n,n,n,n,n,n,n,n,n,Q,j,ee,n,n,n,n,n,n],[F,n,n,n,n,n,n,n,n,n,n,n,n,j,ee,n,n,n,n,n,n],[F,n,n,n,n,n,n,n,n,n,n,n,n,n,ee,n,n,n,n,n,n],[F,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n],[F,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,se],[F,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n],[F,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n]];var fe=a.handleClientHello,z=a.handleClientKeyExchange,le=a.handleCertificateVerify;oe[a.ConnectionEnd.server]=[[n,fe,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n],[n,n,n,n,n,n,n,n,n,n,n,q,n,n,n,n,n,n,n,n,n],[n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,z,n,n,n,n],[n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,le,n,n,n,n,n],[n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n],[n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,se],[n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n],[n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n]],a.generateKeys=function(d,D){var _=e,o=D.client_random+D.server_random;d.session.resuming||(D.master_secret=_(D.pre_master_secret,"master secret",o,48).bytes(),D.pre_master_secret=null),o=D.server_random+D.client_random;var B=2*D.mac_key_length+2*D.enc_key_length,V=d.version.major===a.Versions.TLS_1_0.major&&d.version.minor===a.Versions.TLS_1_0.minor;V&&(B+=2*D.fixed_iv_length);var M=_(D.master_secret,"key expansion",o,B),W={client_write_MAC_key:M.getBytes(D.mac_key_length),server_write_MAC_key:M.getBytes(D.mac_key_length),client_write_key:M.getBytes(D.enc_key_length),server_write_key:M.getBytes(D.enc_key_length)};return V&&(W.client_write_IV=M.getBytes(D.fixed_iv_length),W.server_write_IV=M.getBytes(D.fixed_iv_length)),W},a.createConnectionState=function(d){var D=d.entity===a.ConnectionEnd.client,_=function(){var V={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(M){return!0},compressionState:null,compressFunction:function(M){return!0},updateSequenceNumber:function(){V.sequenceNumber[1]===4294967295?(V.sequenceNumber[1]=0,++V.sequenceNumber[0]):++V.sequenceNumber[1]}};return V},o={read:_(),write:_()};if(o.read.update=function(V,M){return o.read.cipherFunction(M,o.read)?o.read.compressFunction(V,M,o.read)||V.error(V,{message:"Could not decompress record.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.decompression_failure}}):V.error(V,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_record_mac}}),!V.fail},o.write.update=function(V,M){return o.write.compressFunction(V,M,o.write)?o.write.cipherFunction(M,o.write)||V.error(V,{message:"Could not encrypt record.",send:!1,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}}):V.error(V,{message:"Could not compress record.",send:!1,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}}),!V.fail},d.session){var B=d.session.sp;switch(d.session.cipherSuite.initSecurityParameters(B),B.keys=a.generateKeys(d,B),o.read.macKey=D?B.keys.server_write_MAC_key:B.keys.client_write_MAC_key,o.write.macKey=D?B.keys.client_write_MAC_key:B.keys.server_write_MAC_key,d.session.cipherSuite.initConnectionState(o,d,B),B.compression_algorithm){case a.CompressionMethod.none:break;case a.CompressionMethod.deflate:o.read.compressFunction=C,o.write.compressFunction=l;break;default:throw new Error("Unsupported compression algorithm.")}}return o},a.createRandom=function(){var d=new Date,D=+d+d.getTimezoneOffset()*6e4,_=t.util.createBuffer();return _.putInt32(D),_.putBytes(t.random.getBytes(28)),_},a.createRecord=function(d,D){if(!D.data)return null;var _={type:D.type,version:{major:d.version.major,minor:d.version.minor},length:D.data.length(),fragment:D.data};return _},a.createAlert=function(d,D){var _=t.util.createBuffer();return _.putByte(D.level),_.putByte(D.description),a.createRecord(d,{type:a.ContentType.alert,data:_})},a.createClientHello=function(d){d.session.clientHelloVersion={major:d.version.major,minor:d.version.minor};for(var D=t.util.createBuffer(),_=0;_<d.cipherSuites.length;++_){var o=d.cipherSuites[_];D.putByte(o.id[0]),D.putByte(o.id[1])}var B=D.length(),V=t.util.createBuffer();V.putByte(a.CompressionMethod.none);var M=V.length(),W=t.util.createBuffer();if(d.virtualHost){var te=t.util.createBuffer();te.putByte(0),te.putByte(0);var ie=t.util.createBuffer();ie.putByte(0),f(ie,2,t.util.createBuffer(d.virtualHost));var X=t.util.createBuffer();f(X,2,ie),f(te,2,X),W.putBuffer(te)}var ae=W.length();ae>0&&(ae+=2);var ce=d.session.id,ye=ce.length+1+2+4+28+2+B+1+M+ae,de=t.util.createBuffer();return de.putByte(a.HandshakeType.client_hello),de.putInt24(ye),de.putByte(d.version.major),de.putByte(d.version.minor),de.putBytes(d.session.sp.client_random),f(de,1,t.util.createBuffer(ce)),f(de,2,D),f(de,1,V),ae>0&&f(de,2,W),de},a.createServerHello=function(d){var D=d.session.id,_=D.length+1+2+4+28+2+1,o=t.util.createBuffer();return o.putByte(a.HandshakeType.server_hello),o.putInt24(_),o.putByte(d.version.major),o.putByte(d.version.minor),o.putBytes(d.session.sp.server_random),f(o,1,t.util.createBuffer(D)),o.putByte(d.session.cipherSuite.id[0]),o.putByte(d.session.cipherSuite.id[1]),o.putByte(d.session.compressionMethod),o},a.createCertificate=function(d){var D=d.entity===a.ConnectionEnd.client,_=null;if(d.getCertificate){var o;D?o=d.session.certificateRequest:o=d.session.extensions.server_name.serverNameList,_=d.getCertificate(d,o)}var B=t.util.createBuffer();if(_!==null)try{t.util.isArray(_)||(_=[_]);for(var V=null,M=0;M<_.length;++M){var W=t.pem.decode(_[M])[0];if(W.type!=="CERTIFICATE"&&W.type!=="X509 CERTIFICATE"&&W.type!=="TRUSTED CERTIFICATE"){var te=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw te.headerType=W.type,te}if(W.procType&&W.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var ie=t.util.createBuffer(W.body);V===null&&(V=t.asn1.fromDer(ie.bytes(),!1));var X=t.util.createBuffer();f(X,3,ie),B.putBuffer(X)}_=t.pki.certificateFromAsn1(V),D?d.session.clientCertificate=_:d.session.serverCertificate=_}catch(ye){return d.error(d,{message:"Could not send certificate list.",cause:ye,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate}})}var ae=3+B.length(),ce=t.util.createBuffer();return ce.putByte(a.HandshakeType.certificate),ce.putInt24(ae),f(ce,3,B),ce},a.createClientKeyExchange=function(d){var D=t.util.createBuffer();D.putByte(d.session.clientHelloVersion.major),D.putByte(d.session.clientHelloVersion.minor),D.putBytes(t.random.getBytes(46));var _=d.session.sp;_.pre_master_secret=D.getBytes();var o=d.session.serverCertificate.publicKey;
25D=o.encrypt(_.pre_master_secret);var B=D.length+2,V=t.util.createBuffer();return V.putByte(a.HandshakeType.client_key_exchange),V.putInt24(B),V.putInt16(D.length),V.putBytes(D),V},a.createServerKeyExchange=function(d){var D=t.util.createBuffer();return D},a.getClientSignature=function(d,D){var _=t.util.createBuffer();_.putBuffer(d.session.md5.digest()),_.putBuffer(d.session.sha1.digest()),_=_.getBytes(),d.getSignature=d.getSignature||function(o,B,V){var M=null;if(o.getPrivateKey)try{M=o.getPrivateKey(o,o.session.clientCertificate),M=t.pki.privateKeyFromPem(M)}catch(W){o.error(o,{message:"Could not get private key.",cause:W,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}})}M===null?o.error(o,{message:"No private key set.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}}):B=M.sign(B,null),V(o,B)},d.getSignature(d,_,D)},a.createCertificateVerify=function(d,D){var _=D.length+2,o=t.util.createBuffer();return o.putByte(a.HandshakeType.certificate_verify),o.putInt24(_),o.putInt16(D.length),o.putBytes(D),o},a.createCertificateRequest=function(d){var D=t.util.createBuffer();D.putByte(1);var _=t.util.createBuffer();for(var o in d.caStore.certs){var B=d.caStore.certs[o],V=t.pki.distinguishedNameToAsn1(B.subject),M=t.asn1.toDer(V);_.putInt16(M.length()),_.putBuffer(M)}var W=1+D.length()+2+_.length(),te=t.util.createBuffer();return te.putByte(a.HandshakeType.certificate_request),te.putInt24(W),f(te,1,D),f(te,2,_),te},a.createServerHelloDone=function(d){var D=t.util.createBuffer();return D.putByte(a.HandshakeType.server_hello_done),D.putInt24(0),D},a.createChangeCipherSpec=function(){var d=t.util.createBuffer();return d.putByte(1),d},a.createFinished=function(d){var D=t.util.createBuffer();D.putBuffer(d.session.md5.digest()),D.putBuffer(d.session.sha1.digest());var _=d.entity===a.ConnectionEnd.client,o=d.session.sp,B=12,V=e,M=_?"client finished":"server finished";D=V(o.master_secret,M,D.getBytes(),B);var W=t.util.createBuffer();return W.putByte(a.HandshakeType.finished),W.putInt24(D.length()),W.putBuffer(D),W},a.createHeartbeat=function(d,D,_){typeof _>"u"&&(_=D.length);var o=t.util.createBuffer();o.putByte(d),o.putInt16(_),o.putBytes(D);var B=o.length(),V=Math.max(16,B-_-3);return o.putBytes(t.random.getBytes(V)),o},a.queue=function(d,D){if(D&&!(D.fragment.length()===0&&(D.type===a.ContentType.handshake||D.type===a.ContentType.alert||D.type===a.ContentType.change_cipher_spec))){if(D.type===a.ContentType.handshake){var _=D.fragment.bytes();d.session.md5.update(_),d.session.sha1.update(_),_=null}var o;if(D.fragment.length()<=a.MaxFragment)o=[D];else{o=[];for(var B=D.fragment.bytes();B.length>a.MaxFragment;)o.push(a.createRecord(d,{type:D.type,data:t.util.createBuffer(B.slice(0,a.MaxFragment))})),B=B.slice(a.MaxFragment);B.length>0&&o.push(a.createRecord(d,{type:D.type,data:t.util.createBuffer(B)}))}for(var V=0;V<o.length&&!d.fail;++V){var M=o[V],W=d.state.current.write;W.update(d,M)&&d.records.push(M)}}},a.flush=function(d){for(var D=0;D<d.records.length;++D){var _=d.records[D];d.tlsData.putByte(_.type),d.tlsData.putByte(_.version.major),d.tlsData.putByte(_.version.minor),d.tlsData.putInt16(_.fragment.length()),d.tlsData.putBuffer(d.records[D].fragment)}return d.records=[],d.tlsDataReady(d)};var Z=function(d){switch(d){case!0:return!0;case t.pki.certificateError.bad_certificate:return a.Alert.Description.bad_certificate;case t.pki.certificateError.unsupported_certificate:return a.Alert.Description.unsupported_certificate;case t.pki.certificateError.certificate_revoked:return a.Alert.Description.certificate_revoked;case t.pki.certificateError.certificate_expired:return a.Alert.Description.certificate_expired;case t.pki.certificateError.certificate_unknown:return a.Alert.Description.certificate_unknown;case t.pki.certificateError.unknown_ca:return a.Alert.Description.unknown_ca;default:return a.Alert.Description.bad_certificate}},be=function(d){switch(d){case!0:return!0;case a.Alert.Description.bad_certificate:return t.pki.certificateError.bad_certificate;case a.Alert.Description.unsupported_certificate:return t.pki.certificateError.unsupported_certificate;case a.Alert.Description.certificate_revoked:return t.pki.certificateError.certificate_revoked;case a.Alert.Description.certificate_expired:return t.pki.certificateError.certificate_expired;case a.Alert.Description.certificate_unknown:return t.pki.certificateError.certificate_unknown;case a.Alert.Description.unknown_ca:return t.pki.certificateError.unknown_ca;default:return t.pki.certificateError.bad_certificate}};a.verifyCertificateChain=function(d,D){try{var _={};for(var o in d.verifyOptions)_[o]=d.verifyOptions[o];_.verify=function(V,M,W){var te=Z(V),ie=d.verify(d,V,M,W);if(ie!==!0){if(typeof ie=="object"&&!t.util.isArray(ie)){var X=new Error("The application rejected the certificate.");throw X.send=!0,X.alert={level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate},ie.message&&(X.message=ie.message),ie.alert&&(X.alert.description=ie.alert),X}ie!==V&&(ie=be(ie))}return ie},t.pki.verifyCertificateChain(d.caStore,D,_)}catch(V){var B=V;(typeof B!="object"||t.util.isArray(B))&&(B={send:!0,alert:{level:a.Alert.Level.fatal,description:Z(V)}}),"send"in B||(B.send=!0),"alert"in B||(B.alert={level:a.Alert.Level.fatal,description:Z(B.error)}),d.error(d,B)}return!d.fail},a.createSessionCache=function(d,D){var _=null;if(d&&d.getSession&&d.setSession&&d.order)_=d;else{_={},_.cache=d||{},_.capacity=Math.max(D||100,1),_.order=[];for(var o in d)_.order.length<=D?_.order.push(o):delete d[o];_.getSession=function(B){var V=null,M=null;if(B?M=t.util.bytesToHex(B):_.order.length>0&&(M=_.order[0]),M!==null&&M in _.cache){V=_.cache[M],delete _.cache[M];for(var W in _.order)if(_.order[W]===M){_.order.splice(W,1);break}}return V},_.setSession=function(B,V){if(_.order.length===_.capacity){var M=_.order.shift();delete _.cache[M]}var M=t.util.bytesToHex(B);_.order.push(M),_.cache[M]=V}}return _},a.createConnection=function(d){var D=null;d.caStore?t.util.isArray(d.caStore)?D=t.pki.createCaStore(d.caStore):D=d.caStore:D=t.pki.createCaStore();var _=d.cipherSuites||null;if(_===null){_=[];for(var o in a.CipherSuites)_.push(a.CipherSuites[o])}var B=d.server?a.ConnectionEnd.server:a.ConnectionEnd.client,V=d.sessionCache?a.createSessionCache(d.sessionCache):null,M={version:{major:a.Version.major,minor:a.Version.minor},entity:B,sessionId:d.sessionId,caStore:D,sessionCache:V,cipherSuites:_,connected:d.connected,virtualHost:d.virtualHost||null,verifyClient:d.verifyClient||!1,verify:d.verify||function(X,ae,ce,ye){return ae},verifyOptions:d.verifyOptions||{},getCertificate:d.getCertificate||null,getPrivateKey:d.getPrivateKey||null,getSignature:d.getSignature||null,input:t.util.createBuffer(),tlsData:t.util.createBuffer(),data:t.util.createBuffer(),tlsDataReady:d.tlsDataReady,dataReady:d.dataReady,heartbeatReceived:d.heartbeatReceived,closed:d.closed,error:function(X,ae){ae.origin=ae.origin||(X.entity===a.ConnectionEnd.client?"client":"server"),ae.send&&
25(a.queue(X,a.createAlert(X,ae.alert)),a.flush(X));var ce=ae.fatal!==!1;ce&&(X.fail=!0),d.error(X,ae),ce&&X.close(!1)},deflate:d.deflate||null,inflate:d.inflate||null};M.reset=function(X){M.version={major:a.Version.major,minor:a.Version.minor},M.record=null,M.session=null,M.peerCertificate=null,M.state={pending:null,current:null},M.expect=M.entity===a.ConnectionEnd.client?p:s,M.fragmented=null,M.records=[],M.open=!1,M.handshakes=0,M.handshaking=!1,M.isConnected=!1,M.fail=!(X||typeof X>"u"),M.input.clear(),M.tlsData.clear(),M.data.clear(),M.state.current=a.createConnectionState(M)},M.reset();var W=function(X,ae){var ce=ae.type-a.ContentType.change_cipher_spec,ye=H[X.entity][X.expect];ce in ye?ye[ce](X,ae):a.handleUnexpected(X,ae)},te=function(X){var ae=0,ce=X.input,ye=ce.length();if(ye<5)ae=5-ye;else{X.record={type:ce.getByte(),version:{major:ce.getByte(),minor:ce.getByte()},length:ce.getInt16(),fragment:t.util.createBuffer(),ready:!1};var de=X.record.version.major===X.version.major;de&&X.session&&X.session.version&&(de=X.record.version.minor===X.version.minor),de||X.error(X,{message:"Incompatible TLS version.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}})}return ae},ie=function(X){var ae=0,ce=X.input,ye=ce.length();if(ye<X.record.length)ae=X.record.length-ye;else{X.record.fragment.putBytes(ce.getBytes(X.record.length)),ce.compact();var de=X.state.current.read;de.update(X,X.record)&&(X.fragmented!==null&&(X.fragmented.type===X.record.type?(X.fragmented.fragment.putBuffer(X.record.fragment),X.record=X.fragmented):X.error(X,{message:"Invalid fragmented record.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unexpected_message}})),X.record.ready=!0)}return ae};return M.handshake=function(X){if(M.entity!==a.ConnectionEnd.client)M.error(M,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(M.handshaking)M.error(M,{message:"Handshake already in progress.",fatal:!1});else{M.fail&&!M.open&&M.handshakes===0&&(M.fail=!1),M.handshaking=!0,X=X||"";var ae=null;X.length>0&&(M.sessionCache&&(ae=M.sessionCache.getSession(X)),ae===null&&(X="")),X.length===0&&M.sessionCache&&(ae=M.sessionCache.getSession(),ae!==null&&(X=ae.id)),M.session={id:X,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:t.md.md5.create(),sha1:t.md.sha1.create()},ae&&(M.version=ae.version,M.session.sp=ae.sp),M.session.sp.client_random=a.createRandom().getBytes(),M.open=!0,a.queue(M,a.createRecord(M,{type:a.ContentType.handshake,data:a.createClientHello(M)})),a.flush(M)}},M.process=function(X){var ae=0;return X&&M.input.putBytes(X),M.fail||(M.record!==null&&M.record.ready&&M.record.fragment.isEmpty()&&(M.record=null),M.record===null&&(ae=te(M)),!M.fail&&M.record!==null&&!M.record.ready&&(ae=ie(M)),!M.fail&&M.record!==null&&M.record.ready&&W(M,M.record)),ae},M.prepare=function(X){return a.queue(M,a.createRecord(M,{type:a.ContentType.application_data,data:t.util.createBuffer(X)})),a.flush(M)},M.prepareHeartbeatRequest=function(X,ae){return X instanceof t.util.ByteBuffer&&(X=X.bytes()),typeof ae>"u"&&(ae=X.length),M.expectedHeartbeatPayload=X,a.queue(M,a.createRecord(M,{type:a.ContentType.heartbeat,data:a.createHeartbeat(a.HeartbeatMessageType.heartbeat_request,X,ae)})),a.flush(M)},M.close=function(X){if(!M.fail&&M.sessionCache&&M.session){var ae={id:M.session.id,version:M.session.version,sp:M.session.sp};ae.sp.keys=null,M.sessionCache.setSession(ae.id,ae)}M.open&&(M.open=!1,M.input.clear(),(M.isConnected||M.handshaking)&&(M.isConnected=M.handshaking=!1,a.queue(M,a.createAlert(M,{level:a.Alert.Level.warning,description:a.Alert.Description.close_notify})),a.flush(M)),M.closed(M)),M.reset(X)},M},Lr=t.tls=t.tls||{};for(var he in a)typeof a[he]!="function"&&(t.tls[he]=a[he]);return t.tls.prf_tls1=e,t.tls.hmac_sha1=r,t.tls.createSessionCache=a.createSessionCache,t.tls.createConnection=a.createConnection,Lr}var Wa;function Vi(){if(Wa)return nr.exports;Wa=1;var t=ve();vt(),Xa();var e=nr.exports=t.tls;e.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(p){p.bulk_cipher_algorithm=e.BulkCipherAlgorithm.aes,p.cipher_type=e.CipherType.block,p.enc_key_length=16,p.block_length=16,p.fixed_iv_length=16,p.record_iv_length=16,p.mac_algorithm=e.MACAlgorithm.hmac_sha1,p.mac_length=20,p.mac_key_length=20}
25,initConnectionState:r},e.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(p){p.bulk_cipher_algorithm=e.BulkCipherAlgorithm.aes,p.cipher_type=e.CipherType.block,p.enc_key_length=32,p.block_length=16,p.fixed_iv_length=16,p.record_iv_length=16,p.mac_algorithm=e.MACAlgorithm.hmac_sha1,p.mac_length=20,p.mac_key_length=20},initConnectionState:r};function r(p,h,T){var k=h.entity===t.tls.ConnectionEnd.client;p.read.cipherState={init:!1,cipher:t.cipher.createDecipher("AES-CBC",k?T.keys.server_write_key:T.keys.client_write_key),iv:k?T.keys.server_write_IV:T.keys.client_write_IV},p.write.cipherState={init:!1,cipher:t.cipher.createCipher("AES-CBC",k?T.keys.client_write_key:T.keys.server_write_key),iv:k?T.keys.client_write_IV:T.keys.server_write_IV},p.read.cipherFunction=f,p.write.cipherFunction=l,p.read.macLength=p.write.macLength=T.mac_length,p.read.macFunction=p.write.macFunction=e.hmac_sha1}function l(p,h){var T=!1,k=h.macFunction(h.macKey,h.sequenceNumber,p);p.fragment.putBytes(k),h.updateSequenceNumber();var S;p.version.minor===e.Versions.TLS_1_0.minor?S=h.cipherState.init?null:h.cipherState.iv:S=t.random.getBytesSync(16),h.cipherState.init=!0;var c=h.cipherState.cipher;return c.start({iv:S}),p.version.minor>=e.Versions.TLS_1_1.minor&&c.output.putBytes(S),c.update(p.fragment),c.finish(C)&&(p.fragment=c.output,p.length=p.fragment.length(),T=!0),T}function C(p,h,T){if(!T){var k=p-h.length()%p;h.fillWithByte(k-1,k)}return!0}function v(p,h,T){var k=!0;if(T){for(var S=h.length(),c=h.last(),m=S-1-c;m<S-1;++m)k=k&&h.at(m)==c;k&&h.truncate(c+1)}return k}function f(p,h){var T=!1,k;p.version.minor===e.Versions.TLS_1_0.minor?k=h.cipherState.init?null:h.cipherState.iv:k=p.fragment.getBytes(16),h.cipherState.init=!0;var S=h.cipherState.cipher;S.start({iv:k}),S.update(p.fragment),T=S.finish(v);var c=h.macLength,m=t.random.getBytesSync(c),E=S.output.length();E>=c?(p.fragment=S.output.getBytes(E-c),m=S.output.getBytes(c)):p.fragment=S.output.getBytes(),p.fragment=t.util.createBuffer(p.fragment),p.length=p.fragment.length();var x=h.macFunction(h.macKey,h.sequenceNumber,p);return h.updateSequenceNumber(),T=a(h.macKey,m,x)&&T,T}function a(p,h,T){var k=t.hmac.create();return k.start("SHA1",p),k.update(h),h=k.digest().getBytes(),k.start(null,null),k.update(T),T=k.digest().getBytes(),h===T}return nr.exports}var Dr={exports:{}},Ya;function Ja(){if(Ya)return Dr.exports;Ya=1;var t=ve();ut(),me();var e=Dr.exports=t.sha512=t.sha512||{};t.md.sha512=t.md.algorithms.sha512=e;var r=t.sha384=t.sha512.sha384=t.sha512.sha384||{};r.create=function(){return e.create("SHA-384")},t.md.sha384=t.md.algorithms.sha384=r,t.sha512.sha256=t.sha512.sha256||{create:function(){return e.create("SHA-512/256")}},t.md["sha512/256"]=t.md.algorithms["sha512/256"]=t.sha512.sha256,t.sha512.sha224=t.sha512.sha224||{create:function(){return e.create("SHA-512/224")}},t.md["sha512/224"]=t.md.algorithms["sha512/224"]=t.sha512.sha224,e.create=function(h){if(C||a(),typeof h>"u"&&(h="SHA-512"),!(h in f))throw new Error("Invalid SHA-512 algorithm: "+h);for(var T=f[h],k=null,S=t.util.createBuffer(),c=new Array(80),m=0;m<80;++m)c[m]=new Array(2);var E=64;switch(h){case"SHA-384":E=48;break;case"SHA-512/256":E=32;break;case"SHA-512/224":E=28;break}var x={algorithm:h.replace("-","").toLowerCase(),blockLength:128,digestLength:E,messageLength:0,fullMessageLength:null,messageLengthSize:16};return x.start=function(){x.messageLength=0,x.fullMessageLength=x.messageLength128=[];for(var s=x.messageLengthSize/4,g=0;g<s;++g)x.fullMessageLength.push(0);S=t.util.createBuffer(),k=new Array(T.length);for(var g=0;g<T.length;++g)k[g]=T[g].slice(0);return x},x.start(),x.update=function(s,g){g==="utf8"&&(s=t.util.encodeUtf8(s));var y=s.length;x.messageLength+=y,y=[y/4294967296>>>0,y>>>0];for(var b=x.fullMessageLength.length-1;b>=0;--b)x.fullMessageLength[b]+=y[1],y[1]=y[0]+(x.fullMessageLength[b]/4294967296>>>0),x.fullMessageLength[b]=x.fullMessageLength[b]>>>0,y[0]=y[1]/4294967296>>>0;return S.putBytes(s),p(k,c,S),(S.read>2048||S.length()===0)&&S.compact(),x},x.digest=function(){var s=t.util.createBuffer();s.putBytes(S.bytes());var g=x.fullMessageLength[x.fullMessageLength.length-1]+x.messageLengthSize,y=g&x.blockLength-1;s.putBytes(l.substr(0,x.blockLength-y));for(var b,R,u=x.fullMessageLength[0]*8,i=0;i<x.fullMessageLength.length-1;++i)b=x.fullMessageLength[i+1]*8,R=b/4294967296>>>0,u+=R,s.putInt32(u>>>0),u=b>>>0;s.putInt32(u);for(var n=new Array(k.length),i=0;i<k.length;++i)n[i]=k[i].slice(0);p(n,c,s);var I=t.util.createBuffer(),N;h==="SHA-512"?N=n.length:h==="SHA-384"?N=n.length-2:N=n.length-4;for(var i=0;i<N;++i)I.putInt32(n[i][0]),(i!==N-1||h!=="SHA-512/224")&&I.putInt32(n[i][1]);return I},x};var l=null,C=!1,v=null,f=null;function a(){l="€",l+=t.util.fillString("\0",128),v=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],f={},f["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],f["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],f["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,28279439
2507],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],f["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],C=!0}function p(h,T,k){for(var S,c,m,E,x,s,g,y,b,R,u,i,n,I,N,U,L,O,H,F,K,q,Q,j,ee,se,oe,fe,z,le,Z,be,he,d,D,_=k.length();_>=128;){for(z=0;z<16;++z)T[z][0]=k.getInt32()>>>0,T[z][1]=k.getInt32()>>>0;for(;z<80;++z)be=T[z-2],le=be[0],Z=be[1],S=((le>>>19|Z<<13)^(Z>>>29|le<<3)^le>>>6)>>>0,c=((le<<13|Z>>>19)^(Z<<3|le>>>29)^(le<<26|Z>>>6))>>>0,d=T[z-15],le=d[0],Z=d[1],m=((le>>>1|Z<<31)^(le>>>8|Z<<24)^le>>>7)>>>0,E=((le<<31|Z>>>1)^(le<<24|Z>>>8)^(le<<25|Z>>>7))>>>0,he=T[z-7],D=T[z-16],Z=c+he[1]+E+D[1],T[z][0]=S+he[0]+m+D[0]+(Z/4294967296>>>0)>>>0,T[z][1]=Z>>>0;for(n=h[0][0],I=h[0][1],N=h[1][0],U=h[1][1],L=h[2][0],O=h[2][1],H=h[3][0],F=h[3][1],K=h[4][0],q=h[4][1],Q=h[5][0],j=h[5][1],ee=h[6][0],se=h[6][1],oe=h[7][0],fe=h[7][1],z=0;z<80;++z)g=((K>>>14|q<<18)^(K>>>18|q<<14)^(q>>>9|K<<23))>>>0,y=((K<<18|q>>>14)^(K<<14|q>>>18)^(q<<23|K>>>9))>>>0,b=(ee^K&(Q^ee))>>>0,R=(se^q&(j^se))>>>0,x=((n>>>28|I<<4)^(I>>>2|n<<30)^(I>>>7|n<<25))>>>0,s=((n<<4|I>>>28)^(I<<30|n>>>2)^(I<<25|n>>>7))>>>0,u=(n&N|L&(n^N))>>>0,i=(I&U|O&(I^U))>>>0,Z=fe+y+R+v[z][1]+T[z][1],S=oe+g+b+v[z][0]+T[z][0]+(Z/4294967296>>>0)>>>0,c=Z>>>0,Z=s+i,m=x+u+(Z/4294967296>>>0)>>>0,E=Z>>>0,oe=ee,fe=se,ee=Q,se=j,Q=K,j=q,Z=F+c,K=H+S+(Z/4294967296>>>0)>>>0,q=Z>>>0,H=L,F=O,L=N,O=U,N=n,U=I,Z=c+E,n=S+m+(Z/4294967296>>>0)>>>0,I=Z>>>0;Z=h[0][1]+I,h[0][0]=h[0][0]+n+(Z/4294967296>>>0)>>>0,h[0][1]=Z>>>0,Z=h[1][1]+U,h[1][0]=h[1][0]+N+(Z/4294967296>>>0)>>>0,h[1][1]=Z>>>0,Z=h[2][1]+O,h[2][0]=h[2][0]+L+(Z/4294967296>>>0)>>>0,h[2][1]=Z>>>0,Z=h[3][1]+F,h[3][0]=h[3][0]+H+(Z/4294967296>>>0)>>>0,h[3][1]=Z>>>0,Z=h[4][1]+q,h[4][0]=h[4][0]+K+(Z/4294967296>>>0)>>>0,h[4][1]=Z>>>0,Z=h[5][1]+j,h[5][0]=h[5][0]+Q+(Z/4294967296>>>0)>>>0,h[5][1]=Z>>>0,Z=h[6][1]+se,h[6][0]=h[6][0]+ee+(Z/4294967296>>>0)>>>0,h[6][1]=Z>>>0,Z=h[7][1]+fe,h[7][0]=h[7][0]+oe+(Z/4294967296>>>0)>>>0,h[7][1]=Z>>>0,_-=128}}return Dr.exports}var Mt={},Za;function Ki(){if(Za)return Mt;Za=1;var t=ve();ot();var e=t.asn1;return Mt.privateKeyValidator={name:"PrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},Mt.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]},Mt}var kr,en;function Hi(){if(en)return kr;en=1;var t=ve();Ft(),et(),Ja(),me();var e=Ki(),r=e.publicKeyValidator,l=e.privateKeyValidator;if(typeof C>"u")var C=t.jsbn.BigInteger;var v=t.util.ByteBuffer,f=typeof Buffer>"u"?Uint8Array:Buffer;t.pki=t.pki||{},kr=t.pki.ed25519=t.ed25519=t.ed25519||{};var a=t.ed25519;a.constants={},a.constants.PUBLIC_KEY_BYTE_LENGTH=32,a.constants.PRIVATE_KEY_BYTE_LENGTH=64,a.constants.SEED_BYTE_LENGTH=32,a.constants.SIGN_BYTE_LENGTH=64,a.constants.HASH_BYTE_LENGTH=64,a.generateKeyPair=function(d){d=d||{};var D=d.seed;if(D===void 0)D=t.random.getBytesSync(a.constants.SEED_BYTE_LENGTH);
25else if(typeof D=="string"){if(D.length!==a.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+a.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(D instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');D=p({message:D,encoding:"binary"});for(var _=new f(a.constants.PUBLIC_KEY_BYTE_LENGTH),o=new f(a.constants.PRIVATE_KEY_BYTE_LENGTH),B=0;B<32;++B)o[B]=D[B];return g(_,o),{publicKey:_,privateKey:o}},a.privateKeyFromAsn1=function(d){var D={},_=[],o=t.asn1.validate(d,l,D,_);if(!o){var B=new Error("Invalid Key.");throw B.errors=_,B}var V=t.asn1.derToOid(D.privateKeyOid),M=t.oids.EdDSA25519;if(V!==M)throw new Error('Invalid OID "'+V+'"; OID must be "'+M+'".');var W=D.privateKey,te=p({message:t.asn1.fromDer(W).value,encoding:"binary"});return{privateKeyBytes:te}},a.publicKeyFromAsn1=function(d){var D={},_=[],o=t.asn1.validate(d,r,D,_);if(!o){var B=new Error("Invalid Key.");throw B.errors=_,B}var V=t.asn1.derToOid(D.publicKeyOid),M=t.oids.EdDSA25519;if(V!==M)throw new Error('Invalid OID "'+V+'"; OID must be "'+M+'".');var W=D.ed25519PublicKey;if(W.length!==a.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return p({message:W,encoding:"binary"})},a.publicKeyFromPrivateKey=function(d){d=d||{};var D=p({message:d.privateKey,encoding:"binary"});if(D.length!==a.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+a.constants.PRIVATE_KEY_BYTE_LENGTH);for(var _=new f(a.constants.PUBLIC_KEY_BYTE_LENGTH),o=0;o<_.length;++o)_[o]=D[32+o];return _},a.sign=function(d){d=d||{};var D=p(d),_=p({message:d.privateKey,encoding:"binary"});if(_.length===a.constants.SEED_BYTE_LENGTH){var o=a.generateKeyPair({seed:_});_=o.privateKey}else if(_.length!==a.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+a.constants.SEED_BYTE_LENGTH+" or "+a.constants.PRIVATE_KEY_BYTE_LENGTH);var B=new f(a.constants.SIGN_BYTE_LENGTH+D.length);y(B,D,D.length,_);for(var V=new f(a.constants.SIGN_BYTE_LENGTH),M=0;M<V.length;++M)V[M]=B[M];return V},a.verify=function(d){d=d||{};var D=p(d);if(d.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var _=p({message:d.signature,encoding:"binary"});if(_.length!==a.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+a.constants.SIGN_BYTE_LENGTH);var o=p({message:d.publicKey,encoding:"binary"});if(o.length!==a.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+a.constants.PUBLIC_KEY_BYTE_LENGTH);var B=new f(a.constants.SIGN_BYTE_LENGTH+D.length),V=new f(a.constants.SIGN_BYTE_LENGTH+D.length),M;for(M=0;M<a.constants.SIGN_BYTE_LENGTH;++M)B[M]=_[M];for(M=0;M<D.length;++M)B[M+a.constants.SIGN_BYTE_LENGTH]=D[M];return b(V,B,B.length,o)>=0};function p(d){var D=d.message;if(D instanceof Uint8Array||D instanceof f)return D;var _=d.encoding;if(D===void 0)if(d.md)D=d.md.digest().getBytes(),_="binary";else throw new TypeError('"options.message" or "options.md" not specified.');
25if(typeof D=="string"&&!_)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof D=="string"){if(typeof Buffer<"u")return Buffer.from(D,_);D=new v(D,_)}else if(!(D instanceof v))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var o=new f(D.length()),B=0;B<o.length;++B)o[B]=D.at(B);return o}var h=z(),T=z([1]),k=z([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),S=z([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),c=z([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),m=z([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),E=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),x=z([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function s(d,D){var _=t.md.sha512.create(),o=new v(d);_.update(o.getBytes(D),"binary");var B=_.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(B,"binary");for(var V=new f(a.constants.HASH_BYTE_LENGTH),M=0;M<64;++M)V[M]=B.charCodeAt(M);return V}function g(d,D){var _=[z(),z(),z(),z()],o,B=s(D,32);for(B[0]&=248,B[31]&=127,B[31]|=64,j(_,B),I(d,_),o=0;o<32;++o)D[o+32]=d[o];return 0}function y(d,D,_,o){var B,V,M=new Float64Array(64),W=[z(),z(),z(),z()],te=s(o,32);te[0]&=248,te[31]&=127,te[31]|=64;var ie=_+64;for(B=0;B<_;++B)d[64+B]=D[B];for(B=0;B<32;++B)d[32+B]=te[32+B];var X=s(d.subarray(32),_+32);for(u(X),j(W,X),I(d,W),B=32;B<64;++B)d[B]=o[B];var ae=s(d,_+64);for(u(ae),B=32;B<64;++B)M[B]=0;for(B=0;B<32;++B)M[B]=X[B];for(B=0;B<32;++B)for(V=0;V<32;V++)M[B+V]+=ae[B]*te[V];return R(d.subarray(32),M),ie}function b(d,D,_,o){var B,V,M=new f(32),W=[z(),z(),z(),z()],te=[z(),z(),z(),z()];if(V=-1,_<64||U(te,o))return-1;for(B=0;B<_;++B)d[B]=D[B];for(B=0;B<32;++B)d[B+32]=o[B];var ie=s(d,_);if(u(ie),Q(W,te,ie),j(te,D.subarray(32)),i(W,te),I(M,W),_-=64,F(D,0,M,0)){for(B=0;B<_;++B)d[B]=0;return-1}for(B=0;B<_;++B)d[B]=D[B+64];return V=_,V}function R(d,D){var _,o,B,V;for(o=63;o>=32;--o){for(_=0,B=o-32,V=o-12;B<V;++B)D[B]+=_-16*D[o]*E[B-(o-32)],_=D[B]+128>>8,D[B]-=_*256;D[B]+=_,D[o]=0}for(_=0,B=0;B<32;++B)D[B]+=_-(D[31]>>4)*E[B],_=D[B]>>8,D[B]&=255;for(B=0;B<32;++B)D[B]-=_*E[B];for(o=0;o<32;++o)D[o+1]+=D[o]>>8,d[o]=D[o]&255}function u(d){for(var D=new Float64Array(64),_=0;_<64;++_)D[_]=d[_],d[_]=0;R(d,D)}function i(d,D){var _=z(),o=z(),B=z(),V=z(),M=z(),W=z(),te=z(),ie=z(),X=z();Z(_,d[1],d[0]),Z(X,D[1],D[0]),he(_,_,X),le(o,d[0],d[1]),le(X,D[0],D[1]),he(o,o,X),he(B,d[3],D[3]),he(B,B,S),he(V,d[2],D[2]),le(V,V,V),Z(M,o,_),Z(W,V,B),le(te,V,B),le(ie,o,_),he(d[0],M,W),he(d[1],ie,te),he(d[2],te,W),he(d[3],M,ie)}function n(d,D,_){for(var o=0;o<4;++o)fe(d[o],D[o],_)}function I(d,D){var _=z(),o=z(),B=z();se(B,D[2]),he(_,D[0],B),he(o,D[1],B),N(d,o),d[31]^=q(_)<<7}function N(d,D){var _,o,B,V=z(),M=z();for(_=0;_<16;++_)M[_]=D[_];for(oe(M),oe(M),oe(M),o=0;o<2;++o){for(V[0]=M[0]-65517,_=1;_<15;++_)V[_]=M[_]-65535-(V[_-1]>>16&1),V[_-1]&=65535;V[15]=M[15]-32767-(V[14]>>16&1),B=V[15]>>16&1,V[14]&=65535,fe(M,V,1-B)}for(_=0;_<16;_++)d[2*_]=M[_]&255,d[2*_+1]=M[_]>>8}function U(d,D){var _=z(),o=z(),B=z(),V=z(),M=z(),W=z(),te=z();return ee(d[2],T),L(d[1],D),be(B,d[1]),he(V,B,k),Z(B,B,d[2]),le(V,d[2],V),be(M,V),be(W,M),he(te,W,M),he(_,te,B),he(_,_,V),O(_,_),he(_,_,B),he(_,_,V),he(_,_,V),he(d[0],_,V),be(o,d[0]),he(o,o,V),H(o,B)&&he(d[0],d[0],x),be(o,d[0]),he(o,o,V),H(o,B)?-1:(q(d[0])===D[31]>>7&&Z(d[0],h,d[0]),he(d[3],d[0],d[1]),0)}function L(d,D){var _;for(_=0;_<16;++_)d[_]=D[2*_]+(D[2*_+1]<<8);d[15]&=32767}function O(d,D){var _=z(),o;for(o=0;o<16;++o)_[o]=D[o];for(o=250;o>=0;--o)be(_,_),o!==1&&he(_,_,D);for(o=0;o<16;++o)d[o]=_[o]}function H(d,D){var _=new f(32),o=new f(32);return N(_,d),N(o,D),F(_,0,o,0)}function F(d,D,_,o){return K(d,D,_,o,32)}function K(d,D,_,o,B){var V,M=0;for(V=0;V<B;++V)M|=d[D+V]^_[o+V];return(1&M-1>>>8)-1}function q(d){var D=new f(32);return N(D,d),D[0]&1}function Q(d,D,_){var o,B;for(ee(d[0],h),ee(d[1],T),ee(d[2],T),ee(d[3],h),B=255;B>=0;--B)o=_[B/8|0]>>(B&7)&1,n(d,D,o),i(D,d),i(d,d),n(d,D,o)}function j(d,D){var _=[z(),z(),z(),z()];ee(_[0],c),ee(_[1],m),ee(_[2],T),he(_[3],c,m),Q(d,_,D)}function ee(d,D){var _;
25for(_=0;_<16;_++)d[_]=D[_]|0}function se(d,D){var _=z(),o;for(o=0;o<16;++o)_[o]=D[o];for(o=253;o>=0;--o)be(_,_),o!==2&&o!==4&&he(_,_,D);for(o=0;o<16;++o)d[o]=_[o]}function oe(d){var D,_,o=1;for(D=0;D<16;++D)_=d[D]+o+65535,o=Math.floor(_/65536),d[D]=_-o*65536;d[0]+=o-1+37*(o-1)}function fe(d,D,_){for(var o,B=~(_-1),V=0;V<16;++V)o=B&(d[V]^D[V]),d[V]^=o,D[V]^=o}function z(d){var D,_=new Float64Array(16);if(d)for(D=0;D<d.length;++D)_[D]=d[D];return _}function le(d,D,_){for(var o=0;o<16;++o)d[o]=D[o]+_[o]}function Z(d,D,_){for(var o=0;o<16;++o)d[o]=D[o]-_[o]}function be(d,D){he(d,D,D)}function he(d,D,_){var o,B,V=0,M=0,W=0,te=0,ie=0,X=0,ae=0,ce=0,ye=0,de=0,Se=0,Be=0,Ae=0,Te=0,Ee=0,xe=0,we=0,je=0,Qe=0,$e=0,Xe=0,We=0,Je=0,tt=0,lt=0,ct=0,ht=0,mt=0,xt=0,Nt=0,Kt=0,Re=_[0],Le=_[1],De=_[2],ke=_[3],Ue=_[4],Fe=_[5],Pe=_[6],Oe=_[7],Me=_[8],Ve=_[9],Ke=_[10],He=_[11],Ie=_[12],Ne=_[13],Ge=_[14],qe=_[15];o=D[0],V+=o*Re,M+=o*Le,W+=o*De,te+=o*ke,ie+=o*Ue,X+=o*Fe,ae+=o*Pe,ce+=o*Oe,ye+=o*Me,de+=o*Ve,Se+=o*Ke,Be+=o*He,Ae+=o*Ie,Te+=o*Ne,Ee+=o*Ge,xe+=o*qe,o=D[1],M+=o*Re,W+=o*Le,te+=o*De,ie+=o*ke,X+=o*Ue,ae+=o*Fe,ce+=o*Pe,ye+=o*Oe,de+=o*Me,Se+=o*Ve,Be+=o*Ke,Ae+=o*He,Te+=o*Ie,Ee+=o*Ne,xe+=o*Ge,we+=o*qe,o=D[2],W+=o*Re,te+=o*Le,ie+=o*De,X+=o*ke,ae+=o*Ue,ce+=o*Fe,ye+=o*Pe,de+=o*Oe,Se+=o*Me,Be+=o*Ve,Ae+=o*Ke,Te+=o*He,Ee+=o*Ie,xe+=o*Ne,we+=o*Ge,je+=o*qe,o=D[3],te+=o*Re,ie+=o*Le,X+=o*De,ae+=o*ke,ce+=o*Ue,ye+=o*Fe,de+=o*Pe,Se+=o*Oe,Be+=o*Me,Ae+=o*Ve,Te+=o*Ke,Ee+=o*He,xe+=o*Ie,we+=o*Ne,je+=o*Ge,Qe+=o*qe,o=D[4],ie+=o*Re,X+=o*Le,ae+=o*De,ce+=o*ke,ye+=o*Ue,de+=o*Fe,Se+=o*Pe,Be+=o*Oe,Ae+=o*Me,Te+=o*Ve,Ee+=o*Ke,xe+=o*He,we+=o*Ie,je+=o*Ne,Qe+=o*Ge,$e+=o*qe,o=D[5],X+=o*Re,ae+=o*Le,ce+=o*De,ye+=o*ke,de+=o*Ue,Se+=o*Fe,Be+=o*Pe,Ae+=o*Oe,Te+=o*Me,Ee+=o*Ve,xe+=o*Ke,we+=o*He,je+=o*Ie,Qe+=o*Ne,$e+=o*Ge,Xe+=o*qe,o=D[6],ae+=o*Re,ce+=o*Le,ye+=o*De,de+=o*ke,Se+=o*Ue,Be+=o*Fe,Ae+=o*Pe,Te+=o*Oe,Ee+=o*Me,xe+=o*Ve,we+=o*Ke,je+=o*He,Qe+=o*Ie,$e+=o*Ne,Xe+=o*Ge,We+=o*qe,o=D[7],ce+=o*Re,ye+=o*Le,de+=o*De,Se+=o*ke,Be+=o*Ue,Ae+=o*Fe,Te+=o*Pe,Ee+=o*Oe,xe+=o*Me,we+=o*Ve,je+=o*Ke,Qe+=o*He,$e+=o*Ie,Xe+=o*Ne,We+=o*Ge,Je+=o*qe,o=D[8],ye+=o*Re,de+=o*Le,Se+=o*De,Be+=o*ke,Ae+=o*Ue,Te+=o*Fe,Ee+=o*Pe,xe+=o*Oe,we+=o*Me,je+=o*Ve,Qe+=o*Ke,$e+=o*He,Xe+=o*Ie,We+=o*Ne,Je+=o*Ge,tt+=o*qe,o=D[9],de+=o*Re,Se+=o*Le,Be+=o*De,Ae+=o*ke,Te+=o*Ue,Ee+=o*Fe,xe+=o*Pe,we+=o*Oe,je+=o*Me,Qe+=o*Ve,$e+=o*Ke,Xe+=o*He,We+=o*Ie,Je+=o*Ne,tt+=o*Ge,lt+=o*qe,o=D[10],Se+=o*Re,Be+=o*Le,Ae+=o*De,Te+=o*ke,Ee+=o*Ue,xe+=o*Fe,we+=o*Pe,je+=o*Oe,Qe+=o*Me,$e+=o*Ve,Xe+=o*Ke,We+=o*He,Je+=o*Ie,tt+=o*Ne,lt+=o*Ge,ct+=o*qe,o=D[11],Be+=o*Re,Ae+=o*Le,Te+=o*De,Ee+=o*ke,xe+=o*Ue,we+=o*Fe,je+=o*Pe,Qe+=o*Oe,$e+=o*Me,Xe+=o*Ve,We+=o*Ke,Je+=o*He,tt+=o*Ie,lt+=o*Ne,ct+=o*Ge,ht+=o*qe,o=D[12],Ae+=o*Re,Te+=o*Le,Ee+=o*De,xe+=o*ke,we+=o*Ue,je+=o*Fe,Qe+=o*Pe,$e+=o*Oe,Xe+=o*Me,We+=o*Ve,Je+=o*Ke,tt+=o*He,lt+=o*Ie,ct+=o*Ne,ht+=o*Ge,mt+=o*qe,o=D[13],Te+=o*Re,Ee+=o*Le,xe+=o*De,we+=o*ke,je+=o*Ue,Qe+=o*Fe,$e+=o*Pe,Xe+=o*Oe,We+=o*Me,Je+=o*Ve,tt+=o*Ke,lt+=o*He,ct+=o*Ie,ht+=o*Ne,mt+=o*Ge,xt+=o*qe,o=D[14],Ee+=o*Re,xe+=o*Le,we+=o*De,je+=o*ke,Qe+=o*Ue,$e+=o*Fe,Xe+=o*Pe,We+=o*Oe,Je+=o*Me,tt+=o*Ve,lt+=o*Ke,ct+=o*He,ht+=o*Ie,mt+=o*Ne,xt+=o*Ge,Nt+=o*qe,o=D[15],xe+=o*Re,we+=o*Le,je+=o*De,Qe+=o*ke,$e+=o*Ue,Xe+=o*Fe,We+=o*Pe,Je+=o*Oe,tt+=o*Me,lt+=o*Ve,ct+=o*Ke,ht+=o*He,mt+=o*Ie,xt+=o*Ne,Nt+=o*Ge,Kt+=o*qe,V+=38*we,M+=38*je,W+=38*Qe,te+=38*$e,ie+=38*Xe,X+=38*We,ae+=38*Je,ce+=38*tt,ye+=38*lt,de+=38*ct,Se+=38*ht,Be+=38*mt,Ae+=38*xt,Te+=38*Nt,Ee+=38*Kt,B=1,o=V+B+65535,B=Math.floor(o/65536),V=o-B*65536,o=M+B+65535,B=Math.floor(o/65536),M=o-B*65536,o=W+B+65535,B=Math.floor(o/65536),W=o-B*65536,o=te+B+65535,B=Math.floor(o/65536),te=o-B*65536,o=ie+B+65535,B=Math.floor(o/65536),ie=o-B*65536,o=X+B+65535,B=Math.floor(o/65536),X=o-B*65536,o=ae+B+65535,B=Math.floor(o/65536),ae=o-B*65536,o=ce+B+65535,B=Math.floor(o/65536),ce=o-B*65536,o=ye+B+65535,B=Math.floor(o/65536),ye=o-B*65536,o=de+B+65535,B=Math.floor(o/65536),de=o-B*65536,o=Se+B+65535,B=Math.floor(o/65536),Se=o-B*65536,o=Be+B+65535,B=Math.floor(o/65536),Be=o-B*65536,o=Ae+B+65535,B=Math.floor(o/65536),Ae=o-B*65536,o=Te+B+65535,B=Math.floor(o/65536),Te=o-B*65536,o=Ee+B+65535,B=Math.floor(o/65536),Ee=o-B*65536,o=xe+B+65535,B=Math.floor(o/65536),xe=o-B*65536,V+=B-1+37*(B-1),B=1,o=V+B+65535,B=Math.floor(o/65536),V=o-B*65536,o=M+B+65535,B=Math.floor(o/65536),M=o-B*65536,o=W+B+65535,B=Math.floor(o/65536),W=o-B*65536,o=te+B+65535,B=Math.floor(o/65536),te=o-B*65536,o=ie+B+65535,B=Math.floor(o/65536),ie=o-B*65536,o=X+B+65535,B=Math.floor(o/65536),X=o-B*65536,o=ae+B+65535,B=Math.floor(o/65536),ae=o-B*65536,o=ce+B+65535,B=Math.floor(o/65536),ce=o-B*65536,o=ye+B+65535,B=Math.floor(o/65536),ye=o-B*65536,o=de+B+65535,B=Math.floor(o/65536),de=o-B*65536,o=Se+B+65535,B=Math.floor(o/65536),Se=o-B*65536,o=Be+B+65535,B=Math.floor(o/65536),Be=o-B*65536,o=Ae+B+65535,B=Math.floor(o/65536),Ae=o-B*65536,o=Te+B+65535,B=Math.floor(o/65536),Te=o-B*65536,o=Ee+B+65535,B=Math.floor(o/65536),Ee=o-B*65536,o=xe+B+65535,B=Math.floor(o/65536),xe=o-B*65536,V+=B-1+37*(B-1),d[0]=V,d[1]=M,d[2]=W,d[3]=te,d[4]=ie,d[5]=X,d[6]=ae,d[7]=ce,d[8]=ye,d[9]=de,d[10]=Se,d[11]=Be,d[12]=Ae,d[13]=Te,d[14]=Ee,d[15]=xe}return kr}var Ur,tn;
25function Gi(){if(tn)return Ur;tn=1;var t=ve();me(),et(),Ft(),Ur=t.kem=t.kem||{};var e=t.jsbn.BigInteger;t.kem.rsa={},t.kem.rsa.create=function(l,C){C=C||{};var v=C.prng||t.random,f={};return f.encrypt=function(a,p){var h=Math.ceil(a.n.bitLength()/8),T;do T=new e(t.util.bytesToHex(v.getBytesSync(h)),16).mod(a.n);while(T.compareTo(e.ONE)<=0);T=t.util.hexToBytes(T.toString(16));var k=h-T.length;k>0&&(T=t.util.fillString("\0",k)+T);var S=a.encrypt(T,"NONE"),c=l.generate(T,p);return{encapsulation:S,key:c}},f.decrypt=function(a,p,h){var T=a.decrypt(p,"NONE");return l.generate(T,h)},f},t.kem.kdf1=function(l,C){r(this,l,0,C||l.digestLength)},t.kem.kdf2=function(l,C){r(this,l,1,C||l.digestLength)};function r(l,C,v,f){l.generate=function(a,p){for(var h=new t.util.ByteBuffer,T=Math.ceil(p/f)+v,k=new t.util.ByteBuffer,S=v;S<T;++S){k.putInt32(S),C.start(),C.update(a+k.getBytes());var c=C.digest();h.putBytes(c.getBytes(f))}return h.truncate(h.length()-p),h.getBytes()}}return Ur}var Fr,rn;function qi(){if(rn)return Fr;rn=1;var t=ve();me(),Fr=t.log=t.log||{},t.log.levels=["none","error","warning","info","debug","verbose","max"];var e={},r=[],l=null;t.log.LEVEL_LOCKED=2,t.log.NO_LEVEL_CHECK=4,t.log.INTERPOLATE=8;for(var C=0;C<t.log.levels.length;++C){var v=t.log.levels[C];e[v]={index:C,name:v.toUpperCase()}}t.log.logMessage=function(S){for(var c=e[S.level].index,m=0;m<r.length;++m){var E=r[m];if(E.flags&t.log.NO_LEVEL_CHECK)E.f(S);else{var x=e[E.level].index;c<=x&&E.f(E,S)}}},t.log.prepareStandard=function(S){"standard"in S||(S.standard=e[S.level].name+" ["+S.category+"] "+S.message)},t.log.prepareFull=function(S){if(!("full"in S)){var c=[S.message];c=c.concat([]),S.full=t.util.format.apply(this,c)}},t.log.prepareStandardFull=function(S){"standardFull"in S||(t.log.prepareStandard(S),S.standardFull=S.standard)};for(var f=["error","warning","info","debug","verbose"],C=0;C<f.length;++C)(function(c){t.log[c]=function(m,E){var x=Array.prototype.slice.call(arguments).slice(2),s={timestamp:new Date,level:c,category:m,message:E,arguments:x};t.log.logMessage(s)}})(f[C]);if(t.log.makeLogger=function(S){var c={flags:0,f:S};return t.log.setLevel(c,"none"),c},t.log.setLevel=function(S,c){var m=!1;if(S&&!(S.flags&t.log.LEVEL_LOCKED))for(var E=0;E<t.log.levels.length;++E){var x=t.log.levels[E];if(c==x){S.level=c,m=!0;break}}return m},t.log.lock=function(S,c){typeof c>"u"||c?S.flags|=t.log.LEVEL_LOCKED:S.flags&=~t.log.LEVEL_LOCKED},t.log.addLogger=function(S){r.push(S)},typeof console<"u"&&"log"in console){var a;if(console.error&&console.warn&&console.info&&console.debug){var p={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},h=function(S,c){t.log.prepareStandard(c);var m=p[c.level],E=[c.standard];E=E.concat(c.arguments.slice()),m.apply(console,E)};a=t.log.makeLogger(h)}else{var h=function(c,m){t.log.prepareStandardFull(m),console.log(m.standardFull)};a=t.log.makeLogger(h)}t.log.setLevel(a,"debug"),t.log.addLogger(a),l=a}else console={log:function(){}};if(l!==null&&typeof window<"u"&&window.location){var T=new URL(window.location.href).searchParams;if(T.has("console.level")&&t.log.setLevel(l,T.get("console.level").slice(-1)[0]),T.has("console.lock")){var k=T.get("console.lock").slice(-1)[0];k=="true"&&t.log.lock(l)}}return t.log.consoleLogger=l,Fr}var Pr,an;function zi(){return an||(an=1,Pr=ut(),cr(),_t(),Sa(),Ja()),Pr}var Or={exports:{}},nn;function ji(){if(nn)return Or.exports;nn=1;var t=ve();
25vt(),ot(),kt(),yt(),Et(),Oa(),et(),me(),Rr();var e=t.asn1,r=Or.exports=t.pkcs7=t.pkcs7||{};r.messageFromPem=function(c){var m=t.pem.decode(c)[0];if(m.type!=="PKCS7"){var E=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw E.headerType=m.type,E}if(m.procType&&m.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var x=e.fromDer(m.body);return r.messageFromAsn1(x)},r.messageToPem=function(c,m){var E={type:"PKCS7",body:e.toDer(c.toAsn1()).getBytes()};return t.pem.encode(E,{maxline:m})},r.messageFromAsn1=function(c){var m={},E=[];if(!e.validate(c,r.asn1.contentInfoValidator,m,E)){var x=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw x.errors=E,x}var s=e.derToOid(m.contentType),g;switch(s){case t.pki.oids.envelopedData:g=r.createEnvelopedData();break;case t.pki.oids.encryptedData:g=r.createEncryptedData();break;case t.pki.oids.signedData:g=r.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+s+" is not (yet) supported.")}return g.fromAsn1(m.content.value[0]),g},r.createSignedData=function(){var c=null;return c={type:t.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(x){if(k(c,x,r.asn1.signedDataValidator),c.certificates=[],c.crls=[],c.digestAlgorithmIdentifiers=[],c.contentInfo=null,c.signerInfos=[],c.rawCapture.certificates)for(var s=c.rawCapture.certificates.value,g=0;g<s.length;++g)c.certificates.push(t.pki.certificateFromAsn1(s[g]))},toAsn1:function(){c.contentInfo||c.sign();for(var x=[],s=0;s<c.certificates.length;++s)x.push(t.pki.certificateToAsn1(c.certificates[s]));var g=[],y=e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(c.version).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,c.digestAlgorithmIdentifiers),c.contentInfo])]);return x.length>0&&y.value[0].value.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!0,x)),g.length>0&&y.value[0].value.push(e.create(e.Class.CONTEXT_SPECIFIC,1,!0,g)),y.value[0].value.push(e.create(e.Class.UNIVERSAL,e.Type.SET,!0,c.signerInfos)),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.type).getBytes()),y])},addSigner:function(x){var s=x.issuer,g=x.serialNumber;if(x.certificate){var y=x.certificate;typeof y=="string"&&(y=t.pki.certificateFromPem(y)),s=y.issuer.attributes,g=y.serialNumber}var b=x.key;if(!b)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof b=="string"&&(b=t.pki.privateKeyFromPem(b));var R=x.digestAlgorithm||t.pki.oids.sha1;switch(R){case t.pki.oids.sha1:case t.pki.oids.sha256:case t.pki.oids.sha384:case t.pki.oids.sha512:case t.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+R)}var u=x.authenticatedAttributes||[];if(u.length>0){for(var i=!1,n=!1,I=0;I<u.length;++I){var N=u[I];if(!i&&N.type===t.pki.oids.contentType){if(i=!0,n)break;continue}if(!n&&N.type===t.pki.oids.messageDigest){if(n=!0,i)break;continue}}if(!i||!n)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}c.signers.push({key:b,version:1,issuer:s,serialNumber:g,digestAlgorithm:R,signatureAlgorithm:t.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(x){if(x=x||{},(typeof c.content!="object"||c.contentInfo===null)&&(c.contentInfo=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(t.pki.oids.data).getBytes())]),"content"in c)){var s;c.content instanceof t.util.ByteBuffer?s=c.content.bytes():typeof c.content=="string"&&(s=t.util.encodeUtf8(c.content)),x.detached?c.detachedContent=e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,s):c.contentInfo.value.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,s)]))}if(c.signers.length!==0){var g=m();E(g)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")}
25,addCertificate:function(x){typeof x=="string"&&(x=t.pki.certificateFromPem(x)),c.certificates.push(x)},addCertificateRevokationList:function(x){throw new Error("PKCS#7 CRL support not yet implemented.")}},c;function m(){for(var x={},s=0;s<c.signers.length;++s){var g=c.signers[s],y=g.digestAlgorithm;y in x||(x[y]=t.md[t.pki.oids[y]].create()),g.authenticatedAttributes.length===0?g.md=x[y]:g.md=t.md[t.pki.oids[y]].create()}c.digestAlgorithmIdentifiers=[];for(var y in x)c.digestAlgorithmIdentifiers.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(y).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")]));return x}function E(x){var s;if(c.detachedContent?s=c.detachedContent:(s=c.contentInfo.value[1],s=s.value[0]),!s)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var g=e.derToOid(c.contentInfo.value[0].value),y=e.toDer(s);y.getByte(),e.getBerValueLength(y),y=y.getBytes();for(var b in x)x[b].start().update(y);for(var R=new Date,u=0;u<c.signers.length;++u){var i=c.signers[u];if(i.authenticatedAttributes.length===0){if(g!==t.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{i.authenticatedAttributesAsn1=e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var n=e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[]),I=0;I<i.authenticatedAttributes.length;++I){var N=i.authenticatedAttributes[I];N.type===t.pki.oids.messageDigest?N.value=x[i.digestAlgorithm].digest():N.type===t.pki.oids.signingTime&&(N.value||(N.value=R)),n.value.push(h(N)),i.authenticatedAttributesAsn1.value.push(h(N))}y=e.toDer(n).getBytes(),i.md.start().update(y)}i.signature=i.key.sign(i.md,"RSASSA-PKCS1-V1_5")}c.signerInfos=p(c.signers)}},r.createEncryptedData=function(){var c=null;return c={type:t.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:t.pki.oids["aes256-CBC"]},fromAsn1:function(m){k(c,m,r.asn1.encryptedDataValidator)},decrypt:function(m){m!==void 0&&(c.encryptedContent.key=m),S(c)}},c},r.createEnvelopedData=function(){var c=null;return c={type:t.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:t.pki.oids["aes256-CBC"]},fromAsn1:function(m){var E=k(c,m,r.asn1.envelopedDataValidator);c.recipients=v(E.recipientInfos.value)},toAsn1:function(){return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.type).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(c.version).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,f(c.recipients)),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,T(c.encryptedContent))])])])},findRecipient:function(m){for(var E=m.issuer.attributes,x=0;x<c.recipients.length;++x){var s=c.recipients[x],g=s.issuer;if(s.serialNumber===m.serialNumber&&g.length===E.length){for(var y=!0,b=0;b<E.length;++b)if(g[b].type!==E[b].type||g[b].value!==E[b].value){y=!1;break}if(y)return s}}return null},decrypt:function(m,E){if(c.encryptedContent.key===void 0&&m!==void 0&&E!==void 0)switch(m.encryptedContent.algorithm){case t.pki.oids.rsaEncryption:case t.pki.oids.desCBC:var x=E.decrypt(m.encryptedContent.content);c.encryptedContent.key=t.util.createBuffer(x);break;default:throw new Error("Unsupported asymmetric cipher, OID "+m.encryptedContent.algorithm)}S(c)},addRecipient:function(m){c.recipients.push({version:0,issuer:m.issuer.attributes,serialNumber:m.serialNumber,encryptedContent:{algorithm:t.pki.oids.rsaEncryption,key:m.publicKey}})},encrypt:function(m,E){if(c.encryptedContent.content===void 0){E=E||c.encryptedContent.algorithm,m=m||c.encryptedContent.key;var x,s,g;switch(E){case t.pki.oids["aes128-CBC"]:x=16,s=16,g=t.aes.createEncryptionCipher;break;case t.pki.oids["aes192-CBC"]:x=24,s=16,g=t.aes.createEncryptionCipher;break;case t.pki.oids["aes256-CBC"]:x=32,s=16,g=t.aes.createEncryptionCipher;break;case t.pki.oids["des-EDE3-CBC"]:x=24,s=8,g=t.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+E)}if(m===void 0)m=t.util.createBuffer(t.random.getBytes(x));else if(m.length()!=x)throw new Error("Symmetric key has wrong length; got "+m.length()+" bytes, expected "+x+".");c.encryptedContent.algorithm=E,c.encryptedContent.key=m,c.encryptedContent.parameter=t.util.createBuffer(t.random.getBytes(s));var y=g(m);if(y.start(c.encryptedContent.parameter.copy()),y.update(c.content),!y.finish())throw new Error("Symmetric encryption failed.");c.encryptedContent.content=y.output}for(var b=0;b<c.recipients.length;++b){var R=c.recipients[b];if(R.encryptedContent.content===void 0)switch(R.encryptedContent.algorithm){case t.pki.oids.rsaEncryption:R.encryptedContent.content=R.encryptedContent.key.encrypt
25(c.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+R.encryptedContent.algorithm)}}}},c};function l(c){var m={},E=[];if(!e.validate(c,r.asn1.recipientInfoValidator,m,E)){var x=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw x.errors=E,x}return{version:m.version.charCodeAt(0),issuer:t.pki.RDNAttributesAsArray(m.issuer),serialNumber:t.util.createBuffer(m.serial).toHex(),encryptedContent:{algorithm:e.derToOid(m.encAlgorithm),parameter:m.encParameter?m.encParameter.value:void 0,content:m.encKey}}}function C(c){return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(c.version).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[t.pki.distinguishedNameToAsn1({attributes:c.issuer}),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,t.util.hexToBytes(c.serialNumber))]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.encryptedContent.algorithm).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,c.encryptedContent.content)])}function v(c){for(var m=[],E=0;E<c.length;++E)m.push(l(c[E]));return m}function f(c){for(var m=[],E=0;E<c.length;++E)m.push(C(c[E]));return m}function a(c){var m=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(c.version).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[t.pki.distinguishedNameToAsn1({attributes:c.issuer}),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,t.util.hexToBytes(c.serialNumber))]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.digestAlgorithm).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")])]);if(c.authenticatedAttributesAsn1&&m.value.push(c.authenticatedAttributesAsn1),m.value.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.signatureAlgorithm).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")])),m.value.push(e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,c.signature)),c.unauthenticatedAttributes.length>0){for(var E=e.create(e.Class.CONTEXT_SPECIFIC,1,!0,[]),x=0;x<c.unauthenticatedAttributes.length;++x){var s=c.unauthenticatedAttributes[x];E.values.push(h(s))}m.value.push(E)}return m}function p(c){for(var m=[],E=0;E<c.length;++E)m.push(a(c[E]));return m}function h(c){var m;if(c.type===t.pki.oids.contentType)m=e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.value).getBytes());else if(c.type===t.pki.oids.messageDigest)m=e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,c.value.bytes());else if(c.type===t.pki.oids.signingTime){var E=new Date("1950-01-01T00:00:00Z"),x=new Date("2050-01-01T00:00:00Z"),s=c.value;if(typeof s=="string"){var g=Date.parse(s);isNaN(g)?s.length===13?s=e.utcTimeToDate(s):s=e.generalizedTimeToDate(s):s=new Date(g)}s>=E&&s<x?m=e.create(e.Class.UNIVERSAL,e.Type.UTCTIME,!1,e.dateToUtcTime(s)):m=e.create(e.Class.UNIVERSAL,e.Type.GENERALIZEDTIME,!1,e.dateToGeneralizedTime(s))}return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.type).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[m])])}function T(c){return[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(t.pki.oids.data).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.algorithm).getBytes()),c.parameter?e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,c.parameter.getBytes()):void 0]),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,c.content.getBytes())])]}function k(c,m,E){var x={},s=[];if(!e.validate(m,E,x,s)){var g=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw g.errors=g,g}var y=e.derToOid(x.contentType);if(y!==t.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(x.encryptedContent){var b="";if(t.util.isArray(x.encryptedContent))for(var R=0;R<x.encryptedContent.length;++R){if(x.encryptedContent[R].type!==e.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");b+=x.encryptedContent[R].value}else b=x.encryptedContent;c.encryptedContent={algorithm:e.derToOid(x.encAlgorithm),parameter:t.util.createBuffer(x.encParameter.value),content:t.util.createBuffer(b)}}if(x.content){var b="";if(t.util.isArray(x.content))for(var R=0;R<x.content.length;++R){if(x.content[R].type!==e.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");b+=x.content[R].value}else b=x.content;c.content=t.util.createBuffer(b)}return c.version=x.version.charCodeAt(0),c.rawCapture=x,x}function S(c){if(c.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(c.content===void 0){var m;switch(c.encryptedContent.algorithm){case t.pki.oids["aes128-CBC"]:case t.pki.oids["aes192-CBC"]:case t.pki.oids["aes256-CBC"]:m=t.aes.createDecryptionCipher(c.encryptedContent.key);break;case t.pki.oids.desCBC:case t.pki.oids["des-EDE3-CBC"]:m=t.des.createDecryptionCipher(c.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+c.encryptedContent.algorithm)}if(m.start(c.encryptedContent.parameter),m.update(c.encryptedContent.content),!m.finish())throw new Error("Symmetric decryption failed.");c.content=m.output}}return Or.exports}var Mr={exports:{}},sn;function Qi(){if(sn)return Mr.exports;sn=1;var t=ve();vt(),wt(),cr(),_t(),me();var e=Mr.exports=t.ssh=t.ssh||{};e.privateKeyToPutty=function(v,f,a){a=a||"",f=f||"";var p="ssh-rsa",h=f===""?"none":"aes256-cbc",T="PuTTY-User-Key-File-2: "+p+`\r
26`;T+="Encryption: "+h+`\r
27`,T+="Comment: "+a+`\r
28`;var k=t.util.createBuffer();l(k,p),r(k,v.e),r(k,v.n);var S=t.util.encode64(k.bytes(),64),c=Math.floor(S.length/66)+1;T+="Public-Lines: "+c+`\r
29`,T+=S;var m=t.util.createBuffer();r(m,v.d),r(m,v.p),r(m,v.q),r(m,v.qInv);var E;if(!f)E=t.util.encode64(m.bytes(),64);else{var x=m.length()+16-1;x-=x%16;var s=C(m.bytes());s.truncate(s.length()-x+m.length()),m.putBuffer(s);var g=t.util.createBuffer();g.putBuffer(C("\0\0\0\0",f)),g.putBuffer(C("\0\0\0�",f));var y=t.aes.createEncryptionCipher(g.truncate(8),"CBC");y.start(t.util.createBuffer().fillWithByte(0,16)),y.update(m.copy()),y.finish();var b=y.output;b.truncate(16),E=t.util.encode64(b.bytes(),64)}c=Math.floor(E.length/66)+1,T+=`\r
30Private-Lines: `+c+`\r
31`,T+=E;var R=C("putty-private-key-file-mac-key",f),u=t.util.createBuffer();l(u,p),l(u,h),l(u,a),u.putInt32(k.length()),u.putBuffer(k),u.putInt32(m.length()),u.putBuffer(m);var i=t.hmac.create();return i.start("sha1",R),i.update(u.bytes()),T+=`\r
32Private-MAC: `+i.digest().toHex()+`\r
33`,T},e.publicKeyToOpenSSH=function(v,f){var a="ssh-rsa";f=f||"";var p=t.util.createBuffer();return l(p,a),r(p,v.e),r(p,v.n),a+" "+t.util.encode64(p.bytes())+" "+f},e.privateKeyToOpenSSH=function(v,f){return f?t.pki.encryptRsaPrivateKey(v,f,{legacy:!0,algorithm:"aes128"}):t.pki.privateKeyToPem(v)},e.getPublicKeyFingerprint=function(v,f){f=f||{};var a=f.md||t.md.md5.create(),p="ssh-rsa",h=t.util.createBuffer();l(h,p),r(h,v.e),r(h,v.n),a.start(),a.update(h.getBytes());var T=a.digest();if(f.encoding==="hex"){var k=T.toHex();return f.delimiter?k.match(/.{2}/g).join(f.delimiter):k}else{if(f.encoding==="binary")return T.getBytes();if(f.encoding)throw new Error('Unknown encoding "'+f.encoding+'".')}return T};function r(v,f){var a=f.toString(16);a[0]>="8"&&(a="00"+a);var p=t.util.hexToBytes(a);v.putInt32(p.length),v.putBytes(p)}function l(v,f){v.putInt32(f.length),v.putString(f)}function C(){for(var v=t.md.sha1.create(),f=arguments.length,a=0;a<f;++a)v.update(arguments[a]);return v.digest()}return Mr.exports}var Vr,on;function $i(){return on||(on=1,Vr=ve(),vt(),Vi(),ot(),tr(),kt(),Hi(),wt(),Gi(),qi(),zi(),Va(),gr(),Et(),Ra(),za(),ji(),Qa(),Da(),Ia(),Nr(),et(),Ba(),Qi(),Xa(),me()),Vr}var Xi=$i();const Vt=Xr(Xi),Wi=t=>t.trim().replace(/\\r\\n/g,`
34`).replace(/\\n/g,`
35`).replace(/\\r/g,`
36`).replace(/\r\n|\r/g,`
37`);class Yi{constructor(e){this.scheme="RSA-OAEP",this.digest=Vt.md.sha256.create();const r=Wi(e.publicKey);this.publicKey=Vt.pki.publicKeyFromPem(r)}encrypt(e){const r=Vt.util.encodeUtf8(e),l=this.publicKey.encrypt(r,this.scheme,{md:this.digest});return Vt.util.encode64(l)}}class Ji{constructor(e){if(this.publicKey=e.publicKey,this.hashPolicy=e.hashPolicy,this.publicKey)try{this.encrypter=new Yi({publicKey:this.publicKey})}catch(r){_e.warn("crypto init error.",{error:r})}}genHashedUserId({userId:e}){if(!this.hashPolicy?.enable||e==="unsupported")return e;try{return Bt({val:e,salt:this.hashPolicy.salt})}catch{return"HashError"}}genEncryptedUserId({userId:e}){if(!this.encrypter)return{encryptedUserId:""};try{return{encryptedUserId:this.encrypter.encrypt(e)}}catch(r){return _e.warn("crypto error.",{error:r}),{encryptedUserId:"",error:pt(r)}}}}class Kr extends na{constructor({domain:e,is3rdPartyCookie:r,...l}){super({...l}),this.cookieDomain=e&&Zi(e)?e:void 0,this.is3rdPartyCookie=r}getRaw(){const e=document.cookie;if(!e)return;const r=e.split(";").map(l=>l.trim()).find(l=>l.startsWith(`${this.keyName}=`))?.substring(this.keyName.length+1);return r?decodeURIComponent(r):void 0}setRaw(e,r){const l=r?.toUTCString()??(()=>{const C=new Date;return C.setTime(C.getTime()+this.retentionDays*24*60*60*1e3),C.toUTCString()})();document.cookie=[`${this.keyName}=${encodeURIComponent(e)}`,`expires=${l}`,"path=/",...this.is3rdPartyCookie?["SameSite=None","Secure"]:[""],this.cookieDomain?`domain=${this.cookieDomain}`:""].filter(C=>!!C).join("; ")}remove(){try{this.setRaw("",new Date("Thu, 01 Jan 1970 00:00:00 GMT"))}catch(e){_e.warn("remove cookie error",{provider:this.constructor.name,error:e})}}}const Zi=t=>{const e=window.location.hostname;return e?t.startsWith(".")?e.endsWith(t):e===t||e.endsWith(`.${t}`):!1};class es extends Kr{constructor({keyName:e,...r}){super({keyName:`sess_${e}`,...r}),this.retentionDays=365}}class Hr{constructor(e){this.storage=e}static create(e){return new Hr(new es(e))}ensure(){const e=this.storage.get()??`${location.hostname}_${$t(new Date)+qt(5)}`;return this.storage.set(e)}}class Gr{constructor({useJQuery:e}){this.useJQuery=e}registerEventTrigger({eventTriggerParam:e,callbackOnEvent:r}){try{this.listsCompanyDomElements(e).forEach(({elm:C,triggerEvent:v,validator:f})=>{this.addEventHandler({elm:C,triggerEvent:v,callbackOnEvent:r,validator:f})})}catch(l){return{errors:[pt(l)]}}return{errors:[]}}addEventHandler({elm:e,triggerEvent:r,callbackOnEvent:l,validator:C=v=>!0}){const v=f=>{C(f)&&l()};r==="submit"&&this.useJQuery?typeof $(e).on=="function"?$(e).on(r,v):$(e).submit(v):e.addEventListener?e.addEventListener(r,v,!1):e.attachEvent&&e.attachEvent(`on${r}`,v)}}class ts extends Gr{listsCompanyDomElements(e){return e.map(r=>{if(r instanceof HTMLElement)return{elm:r,triggerEvent:"click"};{const{button:l,isValid:C}=r;return{elm:l,triggerEvent:"click",validator:v=>C(l)}}})}}class rs extends Gr{listsCompanyDomElements(e){return e.map(r=>({elm:r,triggerEvent:"submit"}))}}class as extends Gr{listsCompanyDomElements(e){return e.map(({dom:r,triggerEvent:l,keyCode:C})=>({elm:r,triggerEvent:l,validator:v=>v&&"keyCode"in v&&C?C===v.keyCode:!1}))}}class ns extends Kr{constructor({keyName:e,...r}){super({keyName:`sess_auth_${e}`,...r}),this.retentionDays=1/24}}class is extends Kr{constructor({keyName:e,...r}){super({keyName:`sess_tran_${e}`,...r}),this.retentionDays=1}}class qr{constructor(e,{eventId:r}){this.storage=e,this.eventId=r}static create({eventId:e,...r}){return new qr(new is(r),{eventId:e})}fetchToken(){let e;try{e=this.storage.get()}catch{return{status:"none"}}return!e||/.*_sended$/.exec(e)?{status:"none"}:new RegExp(`^${this.eventId}_.*`).exec(e)?{status:"exists",sendToken:e.replace(/^\d{2}_/,"")}:{status:"other_event"}}genToken(){const e=$t(new Date)+qt(5),{saveErrors:r}=this.storage.set(`${this.eventId}_${e}`);return{sendToken:e,saveErrors:r}}saveTokenSended({sendToken:e}){this.storage.set(`${this.eventId}_${e}_sended`)}remove(){this.storage.remove()}}class ss{constructor(e,r){this.context=e,this.deps=r,this.accessDate=new Date().getTime(),this.sendedUserId="",this.etagValue="",this.errorInfos=[],this.callbackOnDomEvent=()=>{const l=this.context.companyFormCtx.getUserId();if(!l||l===this.sendedUserId||jr(l))return;this.context.companyFormCtx.isSubmitCancelableForm()||(this.sendedUserId=l);const{saved:C,saveErrors:v}=this.deps.deviceCookie.ensure(),{sendToken:f,saveErrors:a}=this.deps.notifyCookie.genToken(),{encryptedUserId:p,error:h}=this.deps.encryptedUserId.genEncryptedUserId({userId:l}),T={ei:this.context.clientContext.eventId,ui:this.deps.encryptedUserId.genHashedUserId({userId:l}),uie:p,ad:this.accessDate,sd:new Date().getTime(),ck:C??"",st:f,et:this.etagValue,ks:this.deps.collectors.keyStroke.collectionInfo,ms:this.deps.collectors.mouseMove.collectionInfo,cl:this.deps.collectors.mouseClick.collectionInfo,sw:this.deps.collectors.swipe.collectionInfo,or:[],ac:[],ps:this.deps.collectors.paste.collectionInfo,dr:this.deps.collectors.dragDrop.collectionInfo,at:this.deps.collectors.autocomplete.collectionInfo,sk:this.deps.collectors.softwareKeyboard.collectionInfo,dv:this.deps.collectors.device.collectionInfo,errors:[]};this.deps.messageApi.send({headers:{"X-API-Key":this.context.clientContext.collectorKey},body:T,onResponse:k=>{"authoriId"in k.responseBody&&this.deps.authCookie.set(k.responseBody.authoriId)},onError:k=>{_e.warn("authori error",{error:k});const S=Object.values(this.deps.collectors).map(c=>c.errors).flat();this.errorInfos.push(...S,pt(k))}})}}init(){if(this.deps.authCookie.remove(),Jr()||On())return;this.deps.etagApi.send({onResponse:({responseBody:{etag:C}})=>this.etagValue=C,onError:C=>{_e.warn("etag: error",{error:C}),this.errorInfos.push(pt(C))}}
37),Object.values(this.deps.collectors).forEach(C=>{C.collect()});const{errors:e}=this.deps.eventRegisters.loginForm.registerEventTrigger({eventTriggerParam:this.context.companyFormCtx.getLoginForms(),callbackOnEvent:this.callbackOnDomEvent}),{errors:r}=this.deps.eventRegisters.loginButton.registerEventTrigger({eventTriggerParam:this.context.companyFormCtx.getLoginButtons(),callbackOnEvent:this.callbackOnDomEvent}),{errors:l}=this.deps.eventRegisters.customEvent.registerEventTrigger({eventTriggerParam:this.context.companyFormCtx.getCustomDomEvents(),callbackOnEvent:this.callbackOnDomEvent});if(e.length||r.length||l.length){const C=Object.values(this.deps.collectors).map(v=>v.errors).flat();this.errorInfos.push(...C)}}}wn(ss,({clientContext:{collectorUrl:t,hash:e,eventId:r},companyCtx:{storageKey:l,encryptPublicKey:C,useJQuery:v},companyEventCtx:f,companyFormCtx:a})=>{const p={keyName:l,domain:f.hostsConfig?.().cookieDomain,is3rdPartyCookie:f.hostsConfig?.().domainType==="crossOrigin"},h=a.operationCollectionTargets();return{deviceCookie:Hr.create(p),authCookie:new ns(p),notifyCookie:qr.create({...p,eventId:r}),encryptedUserId:new Ji({publicKey:C(),hashPolicy:e.enabled?{enable:!0,salt:e.salt}:void 0}),collectors:{device:new Bi({baseUrl:t,keyName:l}),keyStroke:new Ri({eventTargets:h}),mouseMove:new Di,mouseClick:new Li,swipe:new Pi,paste:new ki({eventTargets:h}),dragDrop:new Ni({eventTargets:h}),autocomplete:new _i({inputForms:[a.getUserIdDom(),a.getPasswordDom()],eventTargets:h}),softwareKeyboard:new Ui({passwordForm:a.getPasswordDom(),softwareKeyboardButton:a.getSoftwareKeyboardButton()})},etagApi:new zn({baseUrl:t}),messageApi:new Qn({baseUrl:t}),eventRegisters:{loginForm:new rs({useJQuery:v}),loginButton:new ts({useJQuery:v}),customEvent:new as({useJQuery:v})}}})})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.