bjx-auth 1.19.2 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bjx-auth-api.esm.js +1 -1
- package/dist/bjx-auth-api.umd.js +1 -1
- package/dist/bjx-auth.esm.js +1 -1
- package/dist/bjx-auth.umd.js +1 -1
- package/dist/{index-DinyMXZz.js → index--V3oDBs_.js} +2 -2
- package/dist/index-COsG-hYf.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/request.cjs +1 -1
- package/dist/strategy.cjs +2 -2
- package/dist/web.mjs +1 -1
- package/package.json +1 -1
package/dist/bjx-auth.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! version: 1.
|
|
1
|
+
/*! version: 1.20.0 */
|
|
2
2
|
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(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("function"==typeof e){var n=function t(){var n=!1;try{n=this instanceof t}catch{}return n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),n}function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){r(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var s,a,u=n(Object.freeze({__proto__:null,default:function(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(t){t(n)}),(r=t.get("*"))&&r.slice().map(function(t){t(e,n)})}}}}));function c(){if(a)return s;function e(t,e){return function(){return t.apply(e,arguments)}}a=1;const{toString:n}=Object.prototype,{getPrototypeOf:r}=Object,{iterator:i,toStringTag:o}=Symbol,u=(c=Object.create(null),t=>{const e=n.call(t);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())});var c;const h=t=>(t=t.toLowerCase(),e=>u(e)===t),l=t=>e=>typeof e===t,{isArray:f}=Array,d=l("undefined");function p(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&m(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const g=h("ArrayBuffer");const y=l("string"),m=l("function"),v=l("number"),b=t=>null!==t&&"object"==typeof t,w=t=>{if("object"!==u(t))return!1;const e=r(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||o in t||i in t)},S=h("Date"),E=h("File"),_=h("Blob"),x=h("FileList"),T=h("URLSearchParams"),[O,R,D,A]=["ReadableStream","Request","Response","Headers"].map(h);function j(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),f(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{if(p(t))return;const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(r=0;r<o;r++)s=i[r],e.call(null,t[s],s,t)}}function k(t,e){if(p(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:t,C=t=>!d(t)&&t!==B;const P=(I="undefined"!=typeof Uint8Array&&r(Uint8Array),t=>I&&t instanceof I);var I;const N=h("HTMLFormElement"),q=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),U=h("RegExp"),V=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};j(n,(n,i)=>{let o;!1!==(o=e(n,i,t))&&(r[i]=o||n)}),Object.defineProperties(t,r)};const L=h("AsyncFunction"),M=(H="function"==typeof setImmediate,F=m(B.postMessage),H?setImmediate:F?(z=`axios@${Math.random()}`,K=[],B.addEventListener("message",({source:t,data:e})=>{t===B&&e===z&&K.length&&K.shift()()},!1),t=>{K.push(t),B.postMessage(z,"*")}):t=>setTimeout(t));var H,F,z,K;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(B):"undefined"!=typeof process&&process.nextTick||M;var J={isArray:f,isArrayBuffer:g,isBuffer:p,isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||m(t.append)&&("formdata"===(e=u(t))||"object"===e&&m(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&g(t.buffer),e},isString:y,isNumber:v,isBoolean:t=>!0===t||!1===t,isObject:b,isPlainObject:w,isEmptyObject:t=>{if(!b(t)||p(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(t){return!1}},isReadableStream:O,isRequest:R,isResponse:D,isHeaders:A,isUndefined:d,isDate:S,isFile:E,isBlob:_,isRegExp:U,isFunction:m,isStream:t=>b(t)&&m(t.pipe),isURLSearchParams:T,isTypedArray:P,isFileList:x,forEach:j,merge:function t(){const{caseless:e,skipUndefined:n}=C(this)&&this||{},r={},i=(i,o)=>{const s=e&&k(r,o)||o;w(r[s])&&w(i)?r[s]=t(r[s],i):w(i)?r[s]=t({},i):f(i)?r[s]=i.slice():n&&d(i)||(r[s]=i)};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&j(arguments[t],i);return r},extend:(t,n,r,{allOwnKeys:i}={})=>(j(n,(n,i)=>{r&&m(n)?t[i]=e(n,r):t[i]=n},{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let o,s,a;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)a=o[s],i&&!i(a,t,e)||u[a]||(e[a]=t[a],u[a]=!0);t=!1!==n&&r(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:u,kindOfTest:h,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(f(t))return t;let e=t.length;if(!v(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[i]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:N,hasOwnProperty:q,hasOwnProp:q,reduceDescriptors:V,freezeMethods:t=>{V(t,(e,n)=>{if(m(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];m(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach(t=>{n[t]=!0})};return f(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,n){return e.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:k,global:B,isContextDefined:C,isSpecCompliantForm:function(t){return!!(t&&m(t.append)&&"FormData"===t[o]&&t[i])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(b(t)){if(e.indexOf(t)>=0)return;if(p(t))return t;if(!("toJSON"in t)){e[r]=t;const i=f(t)?[]:{};return j(t,(t,e)=>{const o=n(t,r+1);!d(o)&&(i[e]=o)}),e[r]=void 0,i}}return t};return n(t,0)},isAsyncFn:L,isThenable:t=>t&&(b(t)||m(t))&&m(t.then)&&m(t.catch),setImmediate:M,asap:W,isIterable:t=>null!=t&&m(t[i])};function $(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}J.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}});const G=$.prototype,Z={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Z[t]={value:t}}),Object.defineProperties($,Z),Object.defineProperty(G,"isAxiosError",{value:!0}),$.from=(t,e,n,r,i,o)=>{const s=Object.create(G);J.toFlatObject(t,s,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t);const a=t&&t.message?t.message:"Error",u=null==e&&t?t.code:e;return $.call(s,a,u,n,r,i),t&&null==s.cause&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",o&&Object.assign(s,o),s};function X(t){return J.isPlainObject(t)||J.isArray(t)}function Q(t){return J.endsWith(t,"[]")?t.slice(0,-2):t}function Y(t,e,n){return t?t.concat(e).map(function(t,e){return t=Q(t),!n&&e?"["+t+"]":t}).join(n?".":""):e}const tt=J.toFlatObject(J,{},null,function(t){return/^is[A-Z]/.test(t)});function et(t,e,n){if(!J.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!J.isUndefined(e[t])})).metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(e);if(!J.isFunction(i))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(J.isDate(t))return t.toISOString();if(J.isBoolean(t))return t.toString();if(!a&&J.isBlob(t))throw new $("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(t)||J.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,i){let a=t;if(t&&!i&&"object"==typeof t)if(J.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(J.isArray(t)&&function(t){return J.isArray(t)&&!t.some(X)}(t)||(J.isFileList(t)||J.endsWith(n,"[]"))&&(a=J.toArray(t)))return n=Q(n),a.forEach(function(t,r){!J.isUndefined(t)&&null!==t&&e.append(!0===s?Y([n],r,o):null===s?n:n+"[]",u(t))}),!1;return!!X(t)||(e.append(Y(i,n,o),u(t)),!1)}const h=[],l=Object.assign(tt,{defaultVisitor:c,convertValue:u,isVisitable:X});if(!J.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!J.isUndefined(n)){if(-1!==h.indexOf(n))throw Error("Circular reference detected in "+r.join("."));h.push(n),J.forEach(n,function(n,o){!0===(!(J.isUndefined(n)||null===n)&&i.call(e,n,J.isString(o)?o.trim():o,r,l))&&t(n,r?r.concat(o):[o])}),h.pop()}}(t),e}function nt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function rt(t,e){this._pairs=[],t&&et(t,this,e)}const it=rt.prototype;function ot(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function st(t,e,n){if(!e)return t;const r=n&&n.encode||ot;J.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(o=i?i(e,n):J.isURLSearchParams(e)?e.toString():new rt(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}it.append=function(t,e){this._pairs.push([t,e])},it.toString=function(t){const e=t?function(e){return t.call(this,e,nt)}:nt;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};var at=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){J.forEach(this.handlers,function(e){null!==e&&t(e)})}},ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ct={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:rt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ht="undefined"!=typeof window&&"undefined"!=typeof document,lt="object"==typeof navigator&&navigator||void 0,ft=ht&&(!lt||["ReactNative","NativeScript","NS"].indexOf(lt.product)<0),dt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pt=ht&&window.location.href||"http://localhost";var gt={...Object.freeze({__proto__:null,hasBrowserEnv:ht,hasStandardBrowserWebWorkerEnv:dt,hasStandardBrowserEnv:ft,navigator:lt,origin:pt}),...ct};function yt(t){function e(t,n,r,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=t.length;if(o=!o&&J.isArray(r)?r.length:o,a)return J.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&J.isObject(r[o])||(r[o]=[]);return e(t,n,r[o],i)&&J.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}(r[o])),!s}if(J.isFormData(t)&&J.isFunction(t.entries)){const n={};return J.forEachEntry(t,(t,r)=>{e(function(t){return J.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),r,n,0)}),n}return null}const mt={transitional:ut,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=J.isObject(t);i&&J.isHTMLForm(t)&&(t=new FormData(t));if(J.isFormData(t))return r?JSON.stringify(yt(t)):t;if(J.isArrayBuffer(t)||J.isBuffer(t)||J.isStream(t)||J.isFile(t)||J.isBlob(t)||J.isReadableStream(t))return t;if(J.isArrayBufferView(t))return t.buffer;if(J.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return et(t,new gt.classes.URLSearchParams,{visitor:function(t,e,n,r){return gt.isNode&&J.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...e})}(t,this.formSerializer).toString();if((o=J.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return et(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t,e,n){if(J.isString(t))try{return(e||JSON.parse)(t),J.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||mt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(J.isResponse(t)||J.isReadableStream(t))return t;if(t&&J.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(t){if(n){if("SyntaxError"===t.name)throw $.from(t,$.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],t=>{mt.headers[t]={}});var vt=mt;const bt=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const wt=Symbol("internals");function St(t){return t&&String(t).trim().toLowerCase()}function Et(t){return!1===t||null==t?t:J.isArray(t)?t.map(Et):String(t)}function _t(t,e,n,r,i){return J.isFunction(r)?r.call(this,e,n):(i&&(e=n),J.isString(e)?J.isString(r)?-1!==e.indexOf(r):J.isRegExp(r)?r.test(e):void 0:void 0)}class xt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=St(e);if(!i)throw new Error("header name must be a non-empty string");const o=J.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=Et(t))}const o=(t,e)=>J.forEach(t,(t,n)=>i(t,n,e));if(J.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(J.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach(function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&bt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e})(t),e);else if(J.isObject(t)&&J.isIterable(t)){let n,r,i={};for(const e of t){if(!J.isArray(e))throw TypeError("Object iterator must return a key-value pair");i[r=e[0]]=(n=i[r])?J.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}o(i,e)}else null!=t&&i(e,t,n);return this}get(t,e){if(t=St(t)){const n=J.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(J.isFunction(e))return e.call(this,t,n);if(J.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=St(t)){const n=J.findKey(this,t);return!(!n||void 0===this[n]||e&&!_t(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=St(t)){const i=J.findKey(n,t);!i||e&&!_t(0,n[i],i,e)||(delete n[i],r=!0)}}return J.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];t&&!_t(0,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return J.forEach(this,(r,i)=>{const o=J.findKey(n,i);if(o)return e[o]=Et(r),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}(i):String(i).trim();s!==i&&delete e[i],e[s]=Et(r),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return J.forEach(this,(n,r)=>{null!=n&&!1!==n&&(e[r]=t&&J.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(t=>n.set(t)),n}static accessor(t){const e=(this[wt]=this[wt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=St(t);e[r]||(!function(t,e){const n=J.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})})}(n,t),e[r]=!0)}return J.isArray(t)?t.forEach(r):r(t),this}}xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(xt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}),J.freezeMethods(xt);var Tt=xt;function Ot(t,e){const n=this||vt,r=e||n,i=Tt.from(r.headers);let o=r.data;return J.forEach(t,function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Rt(t){return!(!t||!t.__CANCEL__)}function Dt(t,e,n){$.call(this,null==t?"canceled":t,$.ERR_CANCELED,e,n),this.name="CanceledError"}function At(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}J.inherits(Dt,$,{__CANCEL__:!0});const jt=(t,e,n=3)=>{let r=0;const i=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),c=r[s];i||(i=u),n[o]=a,r[o]=u;let h=s,l=0;for(;h!==o;)l+=n[h++],h%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),u-i<e)return;const f=c&&u-c;return f?Math.round(1e3*l/f):void 0}}(50,250);return function(t,e){let n,r,i=0,o=1e3/e;const s=(e,o=Date.now())=>{i=o,n=null,r&&(clearTimeout(r),r=null),t(...e)};return[(...t)=>{const e=Date.now(),a=e-i;a>=o?s(t,e):(n=t,r||(r=setTimeout(()=>{r=null,s(n)},o-a)))},()=>n&&s(n)]}(n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-r,u=i(a);r=o;t({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&o<=s?(s-o)/u:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0})},n)},kt=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Bt=t=>(...e)=>J.asap(()=>t(...e));var Ct=gt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,gt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(gt.origin),gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent)):()=>!0,Pt=gt.hasStandardBrowserEnv?{write(t,e,n,r,i,o,s){if("undefined"==typeof document)return;const a=[`${t}=${encodeURIComponent(e)}`];J.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),J.isString(r)&&a.push(`path=${r}`),J.isString(i)&&a.push(`domain=${i}`),!0===o&&a.push("secure"),J.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if("undefined"==typeof document)return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function It(t,e,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(r||0==n)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Nt=t=>t instanceof Tt?{...t}:t;function qt(t,e){e=e||{};const n={};function r(t,e,n,r){return J.isPlainObject(t)&&J.isPlainObject(e)?J.merge.call({caseless:r},t,e):J.isPlainObject(e)?J.merge({},e):J.isArray(e)?e.slice():e}function i(t,e,n,i){return J.isUndefined(e)?J.isUndefined(t)?void 0:r(void 0,t,0,i):r(t,e,0,i)}function o(t,e){if(!J.isUndefined(e))return r(void 0,e)}function s(t,e){return J.isUndefined(e)?J.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e,n)=>i(Nt(t),Nt(e),0,!0)};return J.forEach(Object.keys({...t,...e}),function(r){const o=u[r]||i,s=o(t[r],e[r],r);J.isUndefined(s)&&o!==a||(n[r]=s)}),n}var Ut=t=>{const e=qt({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;if(e.headers=s=Tt.from(s),e.url=st(It(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),J.isFormData(n))if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(J.isFunction(n.getHeaders)){const t=n.getHeaders(),e=["content-type","content-length"];Object.entries(t).forEach(([t,n])=>{e.includes(t.toLowerCase())&&s.set(t,n)})}if(gt.hasStandardBrowserEnv&&(r&&J.isFunction(r)&&(r=r(e)),r||!1!==r&&Ct(e.url))){const t=i&&o&&Pt.read(o);t&&s.set(i,t)}return e};var Vt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,n){const r=Ut(t);let i=r.data;const o=Tt.from(r.headers).normalize();let s,a,u,c,h,{responseType:l,onUploadProgress:f,onDownloadProgress:d}=r;function p(){c&&c(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function y(){if(!g)return;const r=Tt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());At(function(t){e(t),p()},function(t){n(t),p()},{data:l&&"text"!==l&&"json"!==l?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(n(new $("Request aborted",$.ECONNABORTED,t,g)),g=null)},g.onerror=function(e){const r=new $(e&&e.message?e.message:"Network Error",$.ERR_NETWORK,t,g);r.event=e||null,n(r),g=null},g.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||ut;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new $(e,i.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,t,g)),g=null},void 0===i&&o.setContentType(null),"setRequestHeader"in g&&J.forEach(o.toJSON(),function(t,e){g.setRequestHeader(e,t)}),J.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),l&&"json"!==l&&(g.responseType=r.responseType),d&&([u,h]=jt(d,!0),g.addEventListener("progress",u)),f&&g.upload&&([a,c]=jt(f),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=e=>{g&&(n(!e||e.type?new Dt(null,t,g):e),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const m=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);m&&-1===gt.protocols.indexOf(m)?n(new $("Unsupported protocol "+m+":",$.ERR_BAD_REQUEST,t)):g.send(i||null)})};var Lt=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const i=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;r.abort(e instanceof $?e:new Dt(e instanceof Error?e.message:e))}};let o=e&&setTimeout(()=>{o=null,i(new $(`timeout ${e} of ms exceeded`,$.ETIMEDOUT))},e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)}),t=null)};t.forEach(t=>t.addEventListener("abort",i));const{signal:a}=r;return a.unsubscribe=()=>J.asap(s),a}};const Mt=function*(t,e){let n=t.byteLength;if(n<e)return void(yield t);let r,i=0;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},Ht=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},Ft=(t,e,n,r)=>{const i=async function*(t,e){for await(const n of Ht(t))yield*Mt(n,e)}(t,e);let o,s=0,a=t=>{o||(o=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await i.next();if(e)return a(),void t.close();let o=r.byteLength;if(n){let t=s+=o;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:t=>(a(t),i.return())},{highWaterMark:2})},{isFunction:zt}=J,Kt=(({Request:t,Response:e})=>({Request:t,Response:e}))(J.global),{ReadableStream:Wt,TextEncoder:Jt}=J.global,$t=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},Gt=t=>{t=J.merge.call({skipUndefined:!0},Kt,t);const{fetch:e,Request:n,Response:r}=t,i=e?zt(e):"function"==typeof fetch,o=zt(n),s=zt(r);if(!i)return!1;const a=i&&zt(Wt),u=i&&("function"==typeof Jt?(c=new Jt,t=>c.encode(t)):async t=>new Uint8Array(await new n(t).arrayBuffer()));var c;const h=o&&a&&$t(()=>{let t=!1;const e=new n(gt.origin,{body:new Wt,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),l=s&&a&&$t(()=>J.isReadableStream(new r("").body)),f={stream:l&&(t=>t.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!f[t]&&(f[t]=(e,n)=>{let r=e&&e[t];if(r)return r.call(e);throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,n)})});const d=async(t,e)=>{const r=J.toFiniteNumber(t.getContentLength());return null==r?(async t=>{if(null==t)return 0;if(J.isBlob(t))return t.size;if(J.isSpecCompliantForm(t)){const e=new n(gt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return J.isArrayBufferView(t)||J.isArrayBuffer(t)?t.byteLength:(J.isURLSearchParams(t)&&(t+=""),J.isString(t)?(await u(t)).byteLength:void 0)})(e):r};return async t=>{let{url:i,method:s,data:a,signal:u,cancelToken:c,timeout:p,onDownloadProgress:g,onUploadProgress:y,responseType:m,headers:v,withCredentials:b="same-origin",fetchOptions:w}=Ut(t),S=e||fetch;m=m?(m+"").toLowerCase():"text";let E=Lt([u,c&&c.toAbortSignal()],p),_=null;const x=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let T;try{if(y&&h&&"get"!==s&&"head"!==s&&0!==(T=await d(v,a))){let t,e=new n(i,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(t=e.headers.get("content-type"))&&v.setContentType(t),e.body){const[t,n]=kt(T,jt(Bt(y)));a=Ft(e.body,65536,t,n)}}J.isString(b)||(b=b?"include":"omit");const e=o&&"credentials"in n.prototype,u={...w,signal:E,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:e?b:void 0};_=o&&new n(i,u);let c=await(o?S(_,w):S(i,u));const p=l&&("stream"===m||"response"===m);if(l&&(g||p&&x)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=c[e]});const e=J.toFiniteNumber(c.headers.get("content-length")),[n,i]=g&&kt(e,jt(Bt(g),!0))||[];c=new r(Ft(c.body,65536,n,()=>{i&&i(),x&&x()}),t)}m=m||"text";let O=await f[J.findKey(f,m)||"text"](c,t);return!p&&x&&x(),await new Promise((e,n)=>{At(e,n,{data:O,headers:Tt.from(c.headers),status:c.status,statusText:c.statusText,config:t,request:_})})}catch(e){if(x&&x(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new $("Network Error",$.ERR_NETWORK,t,_),{cause:e.cause||e});throw $.from(e,e&&e.code,t,_)}}},Zt=new Map,Xt=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:i}=e,o=[r,i,n];let s,a,u=o.length,c=Zt;for(;u--;)s=o[u],a=c.get(s),void 0===a&&c.set(s,a=u?new Map:Gt(e)),c=a;return a};Xt();const Qt={http:null,xhr:Vt,fetch:{get:Xt}};J.forEach(Qt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});const Yt=t=>`- ${t}`,te=t=>J.isFunction(t)||null===t||!1===t;var ee={getAdapter:function(t,e){t=J.isArray(t)?t:[t];const{length:n}=t;let r,i;const o={};for(let s=0;s<n;s++){let n;if(r=t[s],i=r,!te(r)&&(i=Qt[(n=String(r)).toLowerCase()],void 0===i))throw new $(`Unknown adapter '${n}'`);if(i&&(J.isFunction(i)||(i=i.get(e))))break;o[n||"#"+s]=i}if(!i){const t=Object.entries(o).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));throw new $("There is no suitable adapter to dispatch the request "+(n?t.length>1?"since :\n"+t.map(Yt).join("\n"):" "+Yt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i},adapters:Qt};function ne(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dt(null,t)}function re(t){ne(t),t.headers=Tt.from(t.headers),t.data=Ot.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return ee.getAdapter(t.adapter||vt.adapter,t)(t).then(function(e){return ne(t),e.data=Ot.call(t,t.transformResponse,e),e.headers=Tt.from(e.headers),e},function(e){return Rt(e)||(ne(t),e&&e.response&&(e.response.data=Ot.call(t,t.transformResponse,e.response),e.response.headers=Tt.from(e.response.headers))),Promise.reject(e)})}const ie="1.13.2",oe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{oe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const se={};oe.transitional=function(t,e,n){function r(t,e){return"[Axios v"+ie+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new $(r(i," has been removed"+(e?" in "+e:"")),$.ERR_DEPRECATED);return e&&!se[i]&&(se[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}},oe.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};var ae={assertOptions:function(t,e,n){if("object"!=typeof t)throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new $("option "+o+" must be "+n,$.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new $("Unknown option "+o,$.ERR_BAD_OPTION)}},validators:oe};const ue=ae.validators;class ce{constructor(t){this.defaults=t||{},this.interceptors={request:new at,response:new at}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=qt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;void 0!==n&&ae.assertOptions(n,{silentJSONParsing:ue.transitional(ue.boolean),forcedJSONParsing:ue.transitional(ue.boolean),clarifyTimeoutError:ue.transitional(ue.boolean)},!1),null!=r&&(J.isFunction(r)?e.paramsSerializer={serialize:r}:ae.assertOptions(r,{encode:ue.function,serialize:ue.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ae.assertOptions(e,{baseUrl:ue.spelling("baseURL"),withXsrfToken:ue.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&J.merge(i.common,i[e.method]);i&&J.forEach(["delete","get","head","post","put","patch","common"],t=>{delete i[t]}),e.headers=Tt.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))});const u=[];let c;this.interceptors.response.forEach(function(t){u.push(t.fulfilled,t.rejected)});let h,l=0;if(!a){const t=[re.bind(this),void 0];for(t.unshift(...s),t.push(...u),h=t.length,c=Promise.resolve(e);l<h;)c=c.then(t[l++],t[l++]);return c}h=s.length;let f=e;for(;l<h;){const t=s[l++],e=s[l++];try{f=t(f)}catch(t){e.call(this,t);break}}try{c=re.call(this,f)}catch(t){return Promise.reject(t)}for(l=0,h=u.length;l<h;)c=c.then(u[l++],u[l++]);return c}getUri(t){return st(It((t=qt(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}J.forEach(["delete","get","head","options"],function(t){ce.prototype[t]=function(e,n){return this.request(qt(n||{},{method:t,url:e,data:(n||{}).data}))}}),J.forEach(["post","put","patch"],function(t){function e(e){return function(n,r,i){return this.request(qt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ce.prototype[t]=e(),ce.prototype[t+"Form"]=e(!0)});var he=ce;class le{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(t){e=t});const n=this;this.promise.then(t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null}),this.promise.then=t=>{let e;const r=new Promise(t=>{n.subscribe(t),e=t}).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t(function(t,r,i){n.reason||(n.reason=new Dt(t,r,i),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new le(function(e){t=e}),cancel:t}}}var fe=le;const de={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(de).forEach(([t,e])=>{de[e]=t});var pe=de;const ge=function t(n){const r=new he(n),i=e(he.prototype.request,r);return J.extend(i,he.prototype,r,{allOwnKeys:!0}),J.extend(i,r,null,{allOwnKeys:!0}),i.create=function(e){return t(qt(n,e))},i}(vt);return ge.Axios=he,ge.CanceledError=Dt,ge.CancelToken=fe,ge.isCancel=Rt,ge.VERSION=ie,ge.toFormData=et,ge.AxiosError=$,ge.Cancel=ge.CanceledError,ge.all=function(t){return Promise.all(t)},ge.spread=function(t){return function(e){return t.apply(null,e)}},ge.isAxiosError=function(t){return J.isObject(t)&&!0===t.isAxiosError},ge.mergeConfig=qt,ge.AxiosHeaders=Tt,ge.formToJSON=t=>yt(J.isHTMLForm(t)?new FormData(t):t),ge.getAdapter=ee.getAdapter,ge.HttpStatusCode=pe,ge.default=ge,s=ge}var h,l={exports:{}},f={exports:{}};function d(){return h||(h=1,function(t){const e={eqp:"",os:"",ba:"",bp:"",ver:"",clientId:"",clientSecret:"",apiVersion:"",signVersion:"",signKey:"",timeout:2e4,passportapi:"",userapi:"",login:"",auth:"",enterpriseapi:"",debug:!1,debugApiUrl:"",app:null};function n(t,n){"auth"===t&&console.warn("config.auth配置项已弃用"),void 0!==e[t]&&(e[t]=n)}const r={getConfig:function(t){return t?e[t]:e},setConfig:async function(t,e){if("object"==typeof t)for(const e in t)n(e,t[e]);else t&&n(t,e)}};Object.keys(e).forEach(t=>{Object.defineProperty(r,t,{get:()=>e[t],enumerable:!0})}),t.exports=r}(f)),f.exports}var p={exports:{}},g={exports:{}},y={exports:{}},m={exports:{}};var v,b={exports:{}},w=n(Object.freeze({__proto__:null,default:{}}));function S(){return v||(v=1,b.exports=(e=e||function(e,n){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==t&&t.crypto&&(r=t.crypto),!r)try{r=w}catch(t){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},a=s.lib={},u=a.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=n?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)e[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(i());return new c.init(e,t)}}),h=s.enc={},l=h.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new c.init(n,e/2)}},f=h.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new c.init(n,e)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},p=a.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,h=e.min(4*u,o);if(u){for(var l=0;l<u;l+=s)this._doProcessBlock(i,l);n=i.splice(0,u),r.sigBytes-=h}return new c.init(n,h)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});a.Hasher=p.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new g.HMAC.init(t,n).finalize(e)}}});var g=s.algo={};return s}(Math),e)),b.exports;var e}var E,_={exports:{}};function x(){return E?_.exports:(E=1,_.exports=(t=S(),function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(a[i]=n(e.pow(r,.5))),u[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],h=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],h=n[5],l=n[6],f=n[7],d=0;d<64;d++){if(d<16)c[d]=0|t[e+d];else{var p=c[d-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,y=c[d-2],m=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[d]=g+c[d-7]+m+c[d-16]}var v=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=f+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&h^~a&l)+u[d]+c[d];f=l,l=h,h=a,a=s+w|0,s=o,o=i,i=r,r=w+(b+v)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+h|0,n[6]=n[6]+l|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=o._createHelper(h),n.HmacSHA256=o._createHmacHelper(h)}(Math),t.SHA256));var t}var T,O={exports:{}};function R(){return T?O.exports:(T=1,O.exports=(t=S(),n=(e=t).lib.Base,r=e.enc.Utf8,void(e.algo.HMAC=n.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=r.parse(e));var n=t.blockSize,i=4*n;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),s=this._iKey=e.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}}))));var t,e,n,r}var D;var A,j={exports:{}};function k(){return A?j.exports:(A=1,j.exports=(t=S(),function(){var e=t,n=e.lib.WordArray;function r(t,e,r){for(var i=[],o=0,s=0;s<e;s++)if(s%4){var a=r[t.charCodeAt(s-1)]<<s%4*2|r[t.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}e.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var e=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(e=a)}return r(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64));var t}var B,C={exports:{}};function P(){return B||(B=1,C.exports=(t=S(),function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=t[e+0],u=t[e+1],d=t[e+2],p=t[e+3],g=t[e+4],y=t[e+5],m=t[e+6],v=t[e+7],b=t[e+8],w=t[e+9],S=t[e+10],E=t[e+11],_=t[e+12],x=t[e+13],T=t[e+14],O=t[e+15],R=o[0],D=o[1],A=o[2],j=o[3];R=c(R,D,A,j,s,7,a[0]),j=c(j,R,D,A,u,12,a[1]),A=c(A,j,R,D,d,17,a[2]),D=c(D,A,j,R,p,22,a[3]),R=c(R,D,A,j,g,7,a[4]),j=c(j,R,D,A,y,12,a[5]),A=c(A,j,R,D,m,17,a[6]),D=c(D,A,j,R,v,22,a[7]),R=c(R,D,A,j,b,7,a[8]),j=c(j,R,D,A,w,12,a[9]),A=c(A,j,R,D,S,17,a[10]),D=c(D,A,j,R,E,22,a[11]),R=c(R,D,A,j,_,7,a[12]),j=c(j,R,D,A,x,12,a[13]),A=c(A,j,R,D,T,17,a[14]),R=h(R,D=c(D,A,j,R,O,22,a[15]),A,j,u,5,a[16]),j=h(j,R,D,A,m,9,a[17]),A=h(A,j,R,D,E,14,a[18]),D=h(D,A,j,R,s,20,a[19]),R=h(R,D,A,j,y,5,a[20]),j=h(j,R,D,A,S,9,a[21]),A=h(A,j,R,D,O,14,a[22]),D=h(D,A,j,R,g,20,a[23]),R=h(R,D,A,j,w,5,a[24]),j=h(j,R,D,A,T,9,a[25]),A=h(A,j,R,D,p,14,a[26]),D=h(D,A,j,R,b,20,a[27]),R=h(R,D,A,j,x,5,a[28]),j=h(j,R,D,A,d,9,a[29]),A=h(A,j,R,D,v,14,a[30]),R=l(R,D=h(D,A,j,R,_,20,a[31]),A,j,y,4,a[32]),j=l(j,R,D,A,b,11,a[33]),A=l(A,j,R,D,E,16,a[34]),D=l(D,A,j,R,T,23,a[35]),R=l(R,D,A,j,u,4,a[36]),j=l(j,R,D,A,g,11,a[37]),A=l(A,j,R,D,v,16,a[38]),D=l(D,A,j,R,S,23,a[39]),R=l(R,D,A,j,x,4,a[40]),j=l(j,R,D,A,s,11,a[41]),A=l(A,j,R,D,p,16,a[42]),D=l(D,A,j,R,m,23,a[43]),R=l(R,D,A,j,w,4,a[44]),j=l(j,R,D,A,_,11,a[45]),A=l(A,j,R,D,O,16,a[46]),R=f(R,D=l(D,A,j,R,d,23,a[47]),A,j,s,6,a[48]),j=f(j,R,D,A,v,10,a[49]),A=f(A,j,R,D,T,15,a[50]),D=f(D,A,j,R,y,21,a[51]),R=f(R,D,A,j,_,6,a[52]),j=f(j,R,D,A,p,10,a[53]),A=f(A,j,R,D,S,15,a[54]),D=f(D,A,j,R,u,21,a[55]),R=f(R,D,A,j,b,6,a[56]),j=f(j,R,D,A,O,10,a[57]),A=f(A,j,R,D,m,15,a[58]),D=f(D,A,j,R,x,21,a[59]),R=f(R,D,A,j,g,6,a[60]),j=f(j,R,D,A,E,10,a[61]),A=f(A,j,R,D,d,15,a[62]),D=f(D,A,j,R,w,21,a[63]),o[0]=o[0]+R|0,o[1]=o[1]+D|0,o[2]=o[2]+A|0,o[3]=o[3]+j|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var h=u[c];u[c]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return a},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,n,r,i,o,s){var a=t+(e&n|~e&r)+i+s;return(a<<o|a>>>32-o)+e}function h(t,e,n,r,i,o,s){var a=t+(e&r|n&~r)+i+s;return(a<<o|a>>>32-o)+e}function l(t,e,n,r,i,o,s){var a=t+(e^n^r)+i+s;return(a<<o|a>>>32-o)+e}function f(t,e,n,r,i,o,s){var a=t+(n^(e|~r))+i+s;return(a<<o|a>>>32-o)+e}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),t.MD5)),C.exports;var t}var I,N,q,U,V,L={exports:{}};function M(){return I?L.exports:(I=1,L.exports=S().enc.Hex)}function H(){return N||(N=1,function(t){const e=D?m.exports:(D=1,m.exports=(n=S(),x(),R(),n.HmacSHA256));var n;const r=k(),i=P(),o=M();t.exports={hashHS256:function(t,n){return e(t,n).toString(r)},hashMD5:function(t){return i(t).toString(o)}}}(y)),y.exports}function F(){if(U)return q;let t;return U=1,t=H(),q=t}function z(){return V||(V=1,function(t){const{hashHS256:e}=F(),n=d();function r(t){return"[object Object]"===Object.prototype.toString.call(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=r(t[n]),e),{}):"[object Array]"===Object.prototype.toString.call(t)?t.map(t=>r(t)):t}function i(t,n){const i=function(t){let e=[];return Object.entries(t).map(t=>{let[n,r]=t;void 0===r||""===r||null===r||("[object Array]"===Object.prototype.toString.call(r)||"[object Object]"===Object.prototype.toString.call(r)?e.push("".concat(n,"=").concat(encodeURIComponent(JSON.stringify(r)))):e.push("".concat(n,"=").concat(encodeURIComponent(r))))}),e.join("&")}(r(t)),s=e(i,n);return o(o({},t),{},{sign:s})}t.exports=function(t,e){const{eqp:r,os:o,ba:s,bp:a,ver:u,apiVersion:c,signVersion:h,clientId:l,clientSecret:f,data:d={}}=t||{};return i({eqp:r||n.eqp||"",os:1*o||1*n.os||1,ba:s||n.ba||"",bp:a||n.bp||"",ver:u||n.ver||"1.0.0",ts:Date.now(),apiVersion:c||n.apiVersion||"1.0.0",signVersion:h||n.signVersion||"V1",clientId:l||n.clientId||"",clientSecret:f||n.clientSecret||"",data:d},e=e||n.signKey)}}(g)),g.exports}var K,W,J,$={exports:{}},G={exports:{}},Z={exports:{}},X={exports:{}};function Q(){return K||(K=1,function(t){const e=d();t.exports={errorLogger:function(){var t,n;e.app?null===(t=(n=e.app).emit)||void 0===t||t.call(n,"error",arguments.length<=0?void 0:arguments[0],(arguments.length<=1?void 0:arguments[1])||{},"bjx-auth"):console.error(...arguments)},debugLogger:function(){e.debug&&console.log(...arguments)}}}(X)),X.exports}function Y(){return W||(W=1,function(t){const e=c(),n=d(),{debugLogger:r}=Q(),i=t=>e=>{var i;if(!n[t])throw new Error("config.".concat(t,"配置项未配置"));return e.baseURL||(e.baseURL=n[t]||""),e.timeout||(e.timeout=n.timeout||2e4),null!==(i=n.debugApiUrl)&&void 0!==i&&i.includes(e.url)&&r(e.url+" <<",e),e},o=t=>{var e;return null!==(e=n.debugApiUrl)&&void 0!==e&&e.includes(t.config.url)&&r(t.config.url+" >>",t.data),t},s=e.create({withCredentials:!0,proxy:!1});s.interceptors.request.use(i("passportapi")),s.interceptors.response.use(o);const a=e.create({withCredentials:!0,proxy:!1});a.interceptors.request.use(i("userapi")),a.interceptors.response.use(o);const u=e.create({proxy:!1});u.interceptors.request.use(i("auth")),u.interceptors.response.use(o);const h=e.create({proxy:!1});h.interceptors.request.use(i("enterpriseapi")),h.interceptors.response.use(o),t.exports={axios:e,passportapi:s,userapi:a,auth:u,enterpriseapi:h}}(Z)),Z.exports}function tt(){return J||(J=1,function(t){const e=z(),{passportapi:n}=Y(),{errorLogger:r,debugLogger:i}=Q();let o=null;t.exports={getPublicPem:async function(){if(o&&o.expiresAt>Date.now())return o.value;let t=e();try{const{data:e}=await n({url:"/api/v1/common/config/security",method:"POST",data:t});if(!1===e.isError)return i("公钥获取成功"),o={value:"-----BEGIN PUBLIC KEY-----\n".concat(e.data.rsaPubkey,"\n-----END PUBLIC KEY-----"),expiresAt:Date.now()+288e5},o.value;throw new Error("getPublicPem invalid data",{cause:e})}catch(t){return r(t),null}},clearPublicPemCache:function(){return i("公钥清除成功"),o=null,!0},hasPublicPemCache:function(){return!!o}}}(G)),G.exports}var et,nt={exports:{}},rt={exports:{}};function it(){return et||(et=1,rt.exports=function(){var t={606:function(t){var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var a,u=[],c=!1,h=-1;function l(){c&&a&&(c=!1,a.length?u=a.concat(u):h=-1,u.length&&f())}function f(){if(!c){var t=s(l);c=!0;for(var e=u.length;e;){for(a=u,u=[];++h<e;)a&&a[h].run();h=-1,e=u.length}a=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||c||s(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function e(t,e){return t&e}function i(t,e){return t|e}function o(t,e){return t^e}function s(t,e){return t&~e}function a(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function u(t){for(var e=0;0!=t;)t&=t-1,++e;return e}n.d(r,{default:function(){return Et}});var c,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function l(t){var e,n,r="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),r+=h.charAt(n>>6)+h.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=h.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=h.charAt(n>>2)+h.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function f(e){var n,r="",i=0,o=0;for(n=0;n<e.length&&"="!=e.charAt(n);++n){var s=h.indexOf(e.charAt(n));s<0||(0==i?(r+=t(s>>2),o=3&s,i=1):1==i?(r+=t(o<<2|s>>4),o=15&s,i=2):2==i?(r+=t(o),r+=t(s>>2),o=3&s,i=3):(r+=t(o<<2|s>>4),r+=t(15&s),i=0))}return 1==i&&(r+=t(o<<2)),r}var d,p=function(t){var e;if(void 0===c){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(c={},e=0;e<16;++e)c[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)c[n.charAt(e)]=e;for(e=0;e<8;++e)c[r.charAt(e)]=-1}var i=[],o=0,s=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=c[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);o|=a,++s>=2?(i[i.length]=o,o=0,s=0):o<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return i},g={decode:function(t){var e;if(void 0===d){var n="= \f\n\r\t \u2028\u2029";for(d=Object.create(null),e=0;e<64;++e)d["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(d["-"]=62,d._=63,e=0;e<9;++e)d[n.charAt(e)]=-1}var r=[],i=0,o=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=d[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);i|=s,++o>=4?(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,o=0):i<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=g.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return g.decode(t)}},y=1e13,m=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,o=i.length;for(n=0;n<o;++n)(r=i[n]*t+e)<y?e=0:r-=(e=0|r/y)*y,i[n]=r;e>0&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;e<i;++e)(n=r[e]-t)<0?(n+=y,t=1):t=0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),r=e.length-2;r>=0;--r)n+=(y+e[r]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=e*y+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),v=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,b=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function w(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var S,E=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;i<e;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;r<e;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;r<e;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",o=t;o<e;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?v:b).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=r>127,o=i?255:0,s="";r==o&&++t<e;)r=this.get(t);if(0===(n=e-t))return i?-1:0;if(n>4){for(s=r,n<<=3;!(128&(+s^o));)s=+s<<1,--n;s="("+n+" bit)\n"}i&&(r-=256);for(var a=new m(r),u=t+1;u<e;++u)a.mulAdd(256,this.get(u));return s+a.toString()},t.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i="("+((e-t-1<<3)-r)+" bit)\n",o="",s=t+1;s<e;++s){for(var a=this.get(s),u=s==e-1?r:0,c=7;c>=u;--c)o+=a>>c&1?"1":"0";if(o.length>n)return i+w(o,n)}return i+o},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return w(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)\n";r>(n/=2)&&(e=t+n);for(var o=t;o<e;++o)i+=this.hexByte(this.get(o));return r>n&&(i+="…"),i},t.prototype.parseOID=function(t,e,n){for(var r="",i=new m,o=0,s=t;s<e;++s){var a=this.get(s);if(i.mulAdd(128,127&a),o+=7,!(128&a)){if(""===r)if((i=i.simplify())instanceof m)i.sub(80),r="2."+i.toString();else{var u=i<80?i<40?0:1:2;r=u+"."+(i-40*u)}else r+="."+i.toString();if(r.length>n)return w(r,n);i=new m,o=0}}return o>0&&(r+=".incomplete"),r},t}(),_=function(){function t(t,e,n,r,i){if(!(r instanceof x))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return w(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return w(this.stream.parseStringISO(e,e+n),t);case 30:return w(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;n<r;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var r=0;r<n;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substring(e,e+n)},t.decode=function(e){var n;n=e instanceof E?e:new E(e,0);var r=new E(n),i=new x(n),o=t.decodeLength(n),s=n.pos,a=s-r.pos,u=null,c=function(){var e=[];if(null!==o){for(var r=s+o;n.pos<r;)e[e.length]=t.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}o=s-n.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(i.tagConstructed)u=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");u=c();for(var h=0;h<u.length;++h)if(u[h].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){u=null}if(null===u){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);n.pos=s+Math.abs(o)}return new t(r,a,o,i,u)},t}(),x=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=!!(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new m;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),T=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],O=(1<<26)/T[T.length-1],R=function(){function n(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var n;if(16==e)n=4;else if(8==e)n=3;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return this.toRadix(e);n=2}var r,i=(1<<n)-1,o=!1,s="",a=this.t,u=this.DB-a*this.DB%n;if(a-- >0)for(u<this.DB&&(r=this[a]>>u)>0&&(o=!0,s=t(r));a>=0;)u<n?(r=(this[a]&(1<<u)-1)<<n-u,r|=this[--a]>>(u+=this.DB-n)):(r=this[a]>>(u-=n)&i,u<=0&&(u+=this.DB,--a)),r>0&&(o=!0),o&&(s+=t(r));return o?s:"0"},n.prototype.negate=function(){var t=B();return n.ZERO.subTo(this,t),t},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+L(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(t){var e=B();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e},n.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new A(e):new j(e),this.exp(t,n)},n.prototype.clone=function(){var t=B();return this.copyTo(t),t},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),128&n&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},n.prototype.equals=function(t){return 0==this.compareTo(t)},n.prototype.min=function(t){return this.compareTo(t)<0?this:t},n.prototype.max=function(t){return this.compareTo(t)>0?this:t},n.prototype.and=function(t){var n=B();return this.bitwiseTo(t,e,n),n},n.prototype.or=function(t){var e=B();return this.bitwiseTo(t,i,e),e},n.prototype.xor=function(t){var e=B();return this.bitwiseTo(t,o,e),e},n.prototype.andNot=function(t){var e=B();return this.bitwiseTo(t,s,e),e},n.prototype.not=function(){for(var t=B(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},n.prototype.shiftLeft=function(t){var e=B();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},n.prototype.shiftRight=function(t){var e=B();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},n.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+a(this[t]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=u(this[n]^e);return t},n.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},n.prototype.setBit=function(t){return this.changeBit(t,i)},n.prototype.clearBit=function(t){return this.changeBit(t,s)},n.prototype.flipBit=function(t){return this.changeBit(t,o)},n.prototype.add=function(t){var e=B();return this.addTo(t,e),e},n.prototype.subtract=function(t){var e=B();return this.subTo(t,e),e},n.prototype.multiply=function(t){var e=B();return this.multiplyTo(t,e),e},n.prototype.divide=function(t){var e=B();return this.divRemTo(t,e,null),e},n.prototype.remainder=function(t){var e=B();return this.divRemTo(t,null,e),e},n.prototype.divideAndRemainder=function(t){var e=B(),n=B();return this.divRemTo(t,e,n),[e,n]},n.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),o=V(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new A(e):e.isEven()?new k(e):new j(e);var s=[],a=3,u=n-1,c=(1<<n)-1;if(s[1]=r.convert(this),n>1){var h=B();for(r.sqrTo(s[1],h);a<=c;)s[a]=B(),r.mulTo(h,s[a-2],s[a]),a+=2}var l,f,d=t.t-1,p=!0,g=B();for(i=L(t[d])-1;d>=0;){for(i>=u?l=t[d]>>i-u&c:(l=(t[d]&(1<<i+1)-1)<<u-i,d>0&&(l|=t[d-1]>>this.DB+i-u)),a=n;!(1&l);)l>>=1,--a;if((i-=a)<0&&(i+=this.DB,--d),p)s[l].copyTo(o),p=!1;else{for(;a>1;)r.sqrTo(o,g),r.sqrTo(g,o),a-=2;a>0?r.sqrTo(o,g):(f=o,o=g,g=f),r.mulTo(g,s[l],o)}for(;d>=0&&!(t[d]&1<<i);)r.sqrTo(o,g),f=o,o=g,g=f,--i<0&&(i=this.DB-1,--d)}return r.revert(o)},n.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=V(1),s=V(0),a=V(0),u=V(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),e&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(n.ONE)?n.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},n.prototype.pow=function(t){return this.exp(t,new D)},n.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},n.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=T[T.length-1]){for(e=0;e<T.length;++e)if(n[0]==T[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<T.length;){for(var r=T[e],i=e+1;i<T.length&&r<O;)r*=T[i++];for(r=n.modInt(r);e<i;)if(r%T[e++]==0)return!1}return n.millerRabin(t)},n.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},n.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},n.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==r?255&+t[i]:U(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&128&+t[0]&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},n.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},n.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},n.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(t/this.DB),s=this.s<<n&this.DM,a=this.t-1;a>=0;--a)e[a+o+1]=this[a]>>r|s,s=(this[a]&i)<<n;for(a=o-1;a>=0;--a)e[a]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},n.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},n.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},n.prototype.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)},n.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},n.prototype.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=B());var s=B(),a=this.s,u=t.s,c=this.DB-L(i[i.t-1]);c>0?(i.lShiftTo(c,s),o.lShiftTo(c,r)):(i.copyTo(s),o.copyTo(r));var h=s.t,l=s[h-1];if(0!=l){var f=l*(1<<this.F1)+(h>1?s[h-2]>>this.F2:0),d=this.FV/f,p=(1<<this.F1)/f,g=1<<this.F2,y=r.t,m=y-h,v=null==e?B():e;for(s.dlShiftTo(m,v),r.compareTo(v)>=0&&(r[r.t++]=1,r.subTo(v,r)),n.ONE.dlShiftTo(h,v),v.subTo(s,s);s.t<h;)s[s.t++]=0;for(;--m>=0;){var b=r[--y]==l?this.DM:Math.floor(r[y]*d+(r[y-1]+g)*p);if((r[y]+=s.am(0,b,r,m,0,h))<b)for(s.dlShiftTo(m,v),r.subTo(v,r);r[y]<--b;)r.subTo(v,r)}null!=e&&(r.drShiftTo(h,e),a!=u&&n.ZERO.subTo(e,e)),r.t=h,r.clamp(),c>0&&r.rShiftTo(c,r),a<0&&n.ZERO.subTo(r,r)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var r=B(),i=B(),o=e.convert(this),s=L(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,i),(t&1<<s)>0)e.mulTo(i,o,r);else{var a=r;r=i,i=a}return e.revert(r)},n.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},n.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=V(n),i=B(),o=B(),s="";for(this.divRemTo(r,i,o);i.signum()>0;)s=(n+o.intValue()).toString(t).substring(1)+s,i.divRemTo(r,i,o);return o.intValue().toString(t)+s},n.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),o=!1,s=0,a=0,u=0;u<t.length;++u){var c=U(t,u);c<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(a=e*a+c,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),i,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var o=[],s=7&t;o.length=1+(t>>3),e.nextBytes(o),s>0?o[0]&=(1<<s)-1:o[0]=0,this.fromString(o,256)}},n.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},n.prototype.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},n.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},n.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},n.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},n.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},n.prototype.millerRabin=function(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);(t=t+1>>1)>T.length&&(t=T.length);for(var o=B(),s=0;s<t;++s){o.fromInt(T[Math.floor(Math.random()*T.length)]);var a=o.modPow(i,this);if(0!=a.compareTo(n.ONE)&&0!=a.compareTo(e)){for(var u=1;u++<r&&0!=a.compareTo(e);)if(0==(a=a.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=a.compareTo(e))return!1}}return!0},n.prototype.square=function(){var t=B();return this.squareTo(t),t},n.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var o=n.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)e(n);else{o<s&&(s=o),s>0&&(n.rShiftTo(s,n),r.rShiftTo(s,r));var a=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(a,0):(s>0&&r.lShiftTo(s,r),setTimeout(function(){e(r)},0))};setTimeout(a,10)}},n.prototype.fromNumberAsync=function(t,e,r,o){if("number"==typeof e)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),i,this),this.isEven()&&this.dAddOffset(1,0);var s=this,a=function(){s.dAddOffset(2,0),s.bitLength()>t&&s.subTo(n.ONE.shiftLeft(t-1),s),s.isProbablePrime(e)?setTimeout(function(){o()},0):setTimeout(a,0)};setTimeout(a,0)}else{var u=[],c=7&t;u.length=1+(t>>3),e.nextBytes(u),c>0?u[0]&=(1<<c)-1:u[0]=0,this.fromString(u,256)}},n}(),D=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),A=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),j=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=B();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(R.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=B();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),k=function(){function t(t){this.m=t,this.r2=B(),this.q3=B(),R.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=B();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function B(){return new R(null)}function C(t,e){return new R(t,e)}var P="undefined"!=typeof navigator;P&&"Microsoft Internet Explorer"==navigator.appName?(R.prototype.am=function(t,e,n,r,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,h=a*u+c*s;i=((u=s*u+((32767&h)<<15)+n[r]+(1073741823&i))>>>30)+(h>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i},S=30):P&&"Netscape"!=navigator.appName?(R.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var s=e*this[t++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},S=26):(R.prototype.am=function(t,e,n,r,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,h=a*u+c*s;i=((u=s*u+((16383&h)<<14)+n[r]+i)>>28)+(h>>14)+a*c,n[r++]=268435455&u}return i},S=28),R.prototype.DB=S,R.prototype.DM=(1<<S)-1,R.prototype.DV=1<<S,R.prototype.FV=Math.pow(2,52),R.prototype.F1=52-S,R.prototype.F2=2*S-52;var I,N,q=[];for(I="0".charCodeAt(0),N=0;N<=9;++N)q[I++]=N;for(I="a".charCodeAt(0),N=10;N<36;++N)q[I++]=N;for(I="A".charCodeAt(0),N=10;N<36;++N)q[I++]=N;function U(t,e){var n=q[t.charCodeAt(e)];return null==n?-1:n}function V(t){var e=B();return e.fromInt(t),e}function L(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}R.ZERO=V(0),R.ONE=V(1);var M,H,F=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),z=null;if(null==z){z=[],H=0;var K=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var W=new Uint32Array(256);for(self.crypto.getRandomValues(W),K=0;K<W.length;++K)z[H++]=255&W[K]}var J=0,$=function(t){if((J=J||0)>=256||H>=256)self.removeEventListener?self.removeEventListener("mousemove",$,!1):self.detachEvent&&self.detachEvent("onmousemove",$);else try{var e=t.x+t.y;z[H++]=255&e,J+=1}catch(t){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",$,!1):self.attachEvent&&self.attachEvent("onmousemove",$))}function G(){if(null==M){for(M=new F;H<256;){var t=Math.floor(65536*Math.random());z[H++]=255&t}for(M.init(z),H=0;H<z.length;++H)z[H]=0;H=0}return M.next()}var Z=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=G()},t}();function X(t){return function(t){for(var e="",n=0;n<32*t.length;n+=8)e+=String.fromCharCode(t[n>>5]>>>24-n%32&255);return e}(function(t,e){var n,r,i,o,s,a,u,c,h,l,f,d,p=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),g=new Array(64);for(t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e,h=0;h<t.length;h+=16){for(n=p[0],r=p[1],i=p[2],o=p[3],s=p[4],a=p[5],u=p[6],c=p[7],l=0;l<64;l++)g[l]=l<16?t[l+h]:ut(ut(ut(st(g[l-2]),g[l-7]),ot(g[l-15])),g[l-16]),f=ut(ut(ut(ut(c,it(s)),et(s,a,u)),at[l]),g[l]),d=ut(rt(n),nt(n,r,i)),c=u,u=a,a=s,s=ut(o,f),o=i,i=r,r=n,n=ut(f,d);p[0]=ut(n,p[0]),p[1]=ut(r,p[1]),p[2]=ut(i,p[2]),p[3]=ut(o,p[3]),p[4]=ut(s,p[4]),p[5]=ut(a,p[5]),p[6]=ut(u,p[6]),p[7]=ut(c,p[7])}return p}(function(t){for(var e=Array(t.length>>2),n=0;n<e.length;n++)e[n]=0;for(n=0;n<8*t.length;n+=8)e[n>>5]|=(255&t.charCodeAt(n/8))<<24-n%32;return e}(t),8*t.length))}function Q(t){for(var e="0123456789abcdef",n="",r=0;r<t.length;r++){var i=t.charCodeAt(r);n+=e.charAt(i>>>4&15)+e.charAt(15&i)}return n}function Y(t,e){return t>>>e|t<<32-e}function tt(t,e){return t>>>e}function et(t,e,n){return t&e^~t&n}function nt(t,e,n){return t&e^t&n^e&n}function rt(t){return Y(t,2)^Y(t,13)^Y(t,22)}function it(t){return Y(t,6)^Y(t,11)^Y(t,25)}function ot(t){return Y(t,7)^Y(t,18)^tt(t,3)}function st(t){return Y(t,17)^Y(t,19)^tt(t,10)}var at=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function ut(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function ct(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=t.length-1;r>=0&&e>0;){var i=t.charCodeAt(r--);i<128?n[--e]=i:i>127&&i<2048?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new Z,s=[];e>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);n[--e]=s[0]}return n[--e]=2,n[--e]=0,new R(n)}function ht(t,e,n){for(var r="",i=0;r.length<e;)r+=n(String.fromCharCode.apply(String,t.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function lt(t,e){var n=X;if(t.length+64+2>e)throw"Message too long for RSA";var r,i="";for(r=0;r<e-t.length-64-2;r+=1)i+="\0";var o=n("")+i+""+t,s=new Array(32);(new Z).nextBytes(s);var a=ht(s,o.length,n),u=[];for(r=0;r<o.length;r+=1)u[r]=o.charCodeAt(r)^a.charCodeAt(r);var c=ht(u,s.length,n),h=[0];for(r=0;r<s.length;r+=1)h[r+1]=s[r]^c.charCodeAt(r);return new R(h.concat(u))}var ft=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=C(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t,e){void 0===e&&(e=ct);var n=this.n.bitLength()+7>>3,r=e(t,n);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;for(var o=i.toString(16),s=o.length,a=0;a<2*n-s;a++)o="0"+o;return o},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=C(t,16),this.e=parseInt(e,16),this.d=C(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,r,i,o,s,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=C(t,16),this.e=parseInt(e,16),this.d=C(n,16),this.p=C(r,16),this.q=C(i,16),this.dmp1=C(o,16),this.dmq1=C(s,16),this.coeff=C(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new Z,r=t>>1;this.e=parseInt(e,16);for(var i=new R(e,16);;){for(;this.p=new R(t-r,1,n),0!=this.p.subtract(R.ONE).gcd(i).compareTo(R.ONE)||!this.p.isProbablePrime(10););for(;this.q=new R(r,1,n),0!=this.q.subtract(R.ONE).gcd(i).compareTo(R.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(R.ONE),a=this.q.subtract(R.ONE),u=s.multiply(a);if(0==u.gcd(i).compareTo(R.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=C(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),r=0;r<n.length&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var i="";++r<n.length;){var o=255&n[r];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var r=new Z,i=t>>1;this.e=parseInt(e,16);var o=new R(e,16),s=this,a=function(){var e=function(){if(s.p.compareTo(s.q)<=0){var t=s.p;s.p=s.q,s.q=t}var e=s.p.subtract(R.ONE),r=s.q.subtract(R.ONE),i=e.multiply(r);0==i.gcd(o).compareTo(R.ONE)?(s.n=s.p.multiply(s.q),s.d=o.modInverse(i),s.dmp1=s.d.mod(e),s.dmq1=s.d.mod(r),s.coeff=s.q.modInverse(s.p),setTimeout(function(){n()},0)):setTimeout(a,0)},u=function(){s.q=B(),s.q.fromNumberAsync(i,1,r,function(){s.q.subtract(R.ONE).gcda(o,function(t){0==t.compareTo(R.ONE)&&s.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(u,0)})})},c=function(){s.p=B(),s.p.fromNumberAsync(t-i,1,r,function(){s.p.subtract(R.ONE).gcda(o,function(t){0==t.compareTo(R.ONE)&&s.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,n){var r=(dt[n]||"")+e(t).toString(),i=this.n.bitLength()/4,o=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,r="",i=0;i<n;i+=2)r+="ff";return C("0001"+r+"00"+t,16)}(r,i);if(null==o)return null;var s=this.doPrivate(o);if(null==s)return null;for(var a=s.toString(16),u=a.length,c=0;c<i-u;c++)a="0"+a;return a},t.prototype.verify=function(t,e,n){var r=C(e,16),i=this.doPublic(r);return null==i?null:function(t){for(var e in dt)if(dt.hasOwnProperty(e)){var n=dt[e],r=n.length;if(t.substring(0,r)==n)return t.substring(r)}return t}(i.toString(16).replace(/^1f+00/,""))==n(t).toString()},t}(),dt={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function pt(t,e,n){if(!e||!t)throw new Error("extend failed, please check that all dependencies are included.");var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e)}var gt={};void 0!==gt.asn1&>.asn1||(gt.asn1={}),gt.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substring(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substring(1).length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";e=new R(r,16).xor(t).add(R.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=gt.asn1,n=e.DERBoolean,r=e.DERInteger,i=e.DERBitString,o=e.DEROctetString,s=e.DERNull,a=e.DERObjectIdentifier,u=e.DEREnumerated,c=e.DERUTF8String,h=e.DERNumericString,l=e.DERPrintableString,f=e.DERTeletexString,d=e.DERIA5String,p=e.DERUTCTime,g=e.DERGeneralizedTime,y=e.DERSequence,m=e.DERSet,v=e.DERTaggedObject,b=e.ASN1Util.newObject,w=Object.keys(t);if(1!=w.length)throw"key of param shall be only one.";var S=w[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+S+":"))throw"undefined key: "+S;if("bool"==S)return new n(t[S]);if("int"==S)return new r(t[S]);if("bitstr"==S)return new i(t[S]);if("octstr"==S)return new o(t[S]);if("null"==S)return new s(t[S]);if("oid"==S)return new a(t[S]);if("enum"==S)return new u(t[S]);if("utf8str"==S)return new c(t[S]);if("numstr"==S)return new h(t[S]);if("prnstr"==S)return new l(t[S]);if("telstr"==S)return new f(t[S]);if("ia5str"==S)return new d(t[S]);if("utctime"==S)return new p(t[S]);if("gentime"==S)return new g(t[S]);if("seq"==S){for(var E=t[S],_=[],x=0;x<E.length;x++){var T=b(E[x]);_.push(T)}return new y({array:_})}if("set"==S){for(E=t[S],_=[],x=0;x<E.length;x++)T=b(E[x]),_.push(T);return new m({array:_})}if("tag"==S){var O=t[S];if("[object Array]"===Object.prototype.toString.call(O)&&3==O.length){var R=b(O[2]);return new v({tag:O[0],explicit:O[1],obj:R})}var D={};if(void 0!==O.explicit&&(D.explicit=O.explicit),void 0!==O.tag&&(D.tag=O.tag),void 0===O.obj)throw"obj shall be specified for 'tag'.";return D.obj=b(O.obj),new v(D)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},gt.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substring(0,2),16),r=(e=Math.floor(n/40)+"."+n%40,""),i=2;i<t.length;i+=2){var o=("00000000"+parseInt(t.substring(i,i+2),16).toString(2)).slice(-8);r+=o.substring(1,8),"0"==o.substring(0,1)&&(e=e+"."+new R(r,2).toString(10),r="")}return e},gt.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new R(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",s=0;s<i;s++)o+="0";for(r=o+r,s=0;s<r.length-1;s+=7){var a=r.substring(s,s+7);s!=r.length-7&&(a="1"+a),n+=e(parseInt(a,2))}return n};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);return r},gt.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},gt.asn1.DERAbstractString=function(t){gt.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},pt(gt.asn1.DERAbstractString,gt.asn1.ASN1Object),gt.asn1.DERAbstractTime=function(t){gt.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),o=String(i.getFullYear());"utc"==e&&(o=o.substring(2,4));var s=o+r(String(i.getMonth()+1),2)+r(String(i.getDate()),2)+r(String(i.getHours()),2)+r(String(i.getMinutes()),2)+r(String(i.getSeconds()),2);if(!0===n){var a=i.getMilliseconds();if(0!=a){var u=r(String(a),3);s=s+"."+(u=u.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,o){var s=new Date(Date.UTC(t,e-1,n,r,i,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},pt(gt.asn1.DERAbstractTime,gt.asn1.ASN1Object),gt.asn1.DERAbstractStructured=function(t){gt.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},pt(gt.asn1.DERAbstractStructured,gt.asn1.ASN1Object),gt.asn1.DERBoolean=function(){gt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},pt(gt.asn1.DERBoolean,gt.asn1.ASN1Object),gt.asn1.DERInteger=function(t){gt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=gt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new R(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},pt(gt.asn1.DERInteger,gt.asn1.ASN1Object),gt.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=gt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}gt.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";var r="";for(n=0;n<t.length-1;n+=8){var i=t.substring(n,n+8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),r+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},pt(gt.asn1.DERBitString,gt.asn1.ASN1Object),gt.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=gt.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}gt.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},pt(gt.asn1.DEROctetString,gt.asn1.DERAbstractString),gt.asn1.DERNull=function(){gt.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},pt(gt.asn1.DERNull,gt.asn1.ASN1Object),gt.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new R(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",s=0;s<i;s++)o+="0";for(r=o+r,s=0;s<r.length-1;s+=7){var a=r.substring(s,s+7);s!=r.length-7&&(a="1"+a),n+=e(parseInt(a,2))}return n};gt.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=gt.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},pt(gt.asn1.DERObjectIdentifier,gt.asn1.ASN1Object),gt.asn1.DEREnumerated=function(t){gt.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=gt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new R(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},pt(gt.asn1.DEREnumerated,gt.asn1.ASN1Object),gt.asn1.DERUTF8String=function(t){gt.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},pt(gt.asn1.DERUTF8String,gt.asn1.DERAbstractString),gt.asn1.DERNumericString=function(t){gt.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},pt(gt.asn1.DERNumericString,gt.asn1.DERAbstractString),gt.asn1.DERPrintableString=function(t){gt.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},pt(gt.asn1.DERPrintableString,gt.asn1.DERAbstractString),gt.asn1.DERTeletexString=function(t){gt.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},pt(gt.asn1.DERTeletexString,gt.asn1.DERAbstractString),gt.asn1.DERIA5String=function(t){gt.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},pt(gt.asn1.DERIA5String,gt.asn1.DERAbstractString),gt.asn1.DERUTCTime=function(t){gt.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},pt(gt.asn1.DERUTCTime,gt.asn1.DERAbstractTime),gt.asn1.DERGeneralizedTime=function(t){gt.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},pt(gt.asn1.DERGeneralizedTime,gt.asn1.DERAbstractTime),gt.asn1.DERSequence=function(t){gt.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++)t+=this.asn1Array[e].getEncodedHex();return this.hV=t,this.hV}},pt(gt.asn1.DERSequence,gt.asn1.DERAbstractStructured),gt.asn1.DERSet=function(t){gt.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},pt(gt.asn1.DERSet,gt.asn1.DERAbstractStructured),gt.asn1.DERTaggedObject=function(t){gt.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},pt(gt.asn1.DERTaggedObject,gt.asn1.ASN1Object);var yt,mt,vt=(yt=function(t,e){return yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},yt(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}yt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),bt=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return vt(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?p(t):g.unarmor(t),i=_.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=C(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=C(o,16);var s=i.sub[4].getHexStringValue();this.p=C(s,16);var a=i.sub[5].getHexStringValue();this.q=C(a,16);var u=i.sub[6].getHexStringValue();this.dmp1=C(u,16);var c=i.sub[7].getHexStringValue();this.dmq1=C(c,16);var h=i.sub[8].getHexStringValue();this.coeff=C(h,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var l=i.sub[1].sub[0];e=l.sub[0].getHexStringValue(),this.n=C(e,16),n=l.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else e=i.sub[0].getHexStringValue(),this.n=C(e,16),n=i.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new gt.asn1.DERInteger({int:0}),new gt.asn1.DERInteger({bigint:this.n}),new gt.asn1.DERInteger({int:this.e}),new gt.asn1.DERInteger({bigint:this.d}),new gt.asn1.DERInteger({bigint:this.p}),new gt.asn1.DERInteger({bigint:this.q}),new gt.asn1.DERInteger({bigint:this.dmp1}),new gt.asn1.DERInteger({bigint:this.dmq1}),new gt.asn1.DERInteger({bigint:this.coeff})]};return new gt.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return l(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new gt.asn1.DERSequence({array:[new gt.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new gt.asn1.DERNull]}),e=new gt.asn1.DERSequence({array:[new gt.asn1.DERInteger({bigint:this.n}),new gt.asn1.DERInteger({int:this.e})]}),n=new gt.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new gt.asn1.DERSequence({array:[t,n]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return l(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var n="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return(t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n")+"-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return(t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n")+"-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(ft),wt=n(606),St=void 0!==wt?null===(mt=wt.env)||void 0===mt?void 0:"3.5.4":void 0,Et=function(){function t(t){void 0===t&&(t={}),this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=t.key||null}return t.prototype.setKey=function(t){t?(this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new bt(t)):!this.key&&this.log&&console.error("A key was not set.")},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(f(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return l(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.encryptOAEP=function(t){try{return l(this.getKey().encrypt(t,lt))}catch(t){return!1}},t.prototype.sign=function(t,e,n){void 0===e&&(e=function(t){return t}),void 0===n&&(n="");try{return l(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.signSha256=function(t){return this.sign(t,function(t){return Q(X(t))},"sha256")},t.prototype.verify=function(t,e,n){void 0===n&&(n=function(t){return t});try{return this.getKey().verify(t,f(e),n)}catch(t){return!1}},t.prototype.verifySha256=function(t,e){return this.verify(t,e,function(t){return Q(X(t))})},t.prototype.getKey=function(t){if(!this.key){if(this.key=new bt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=St,t}()}(),r.default}()),rt.exports}var ot,st={exports:{}},at={exports:{}},ut={exports:{}};function ct(){return ot?ut.exports:(ot=1,ut.exports=(a=S(),e=(t=a).lib,n=e.WordArray,r=e.Hasher,i=t.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|t[e+c];else{var h=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=h<<1|h>>>31}var l=(r<<5|r>>>27)+u+o[c];l+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}}),t.SHA1=r._createHelper(s),t.HmacSHA1=r._createHmacHelper(s),a.SHA1));var t,e,n,r,i,o,s,a}var ht;function lt(){return ht?at.exports:(ht=1,at.exports=(a=S(),ct(),R(),e=(t=a).lib,n=e.Base,r=e.WordArray,i=t.algo,o=i.MD5,s=i.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n,i=this.cfg,o=i.hasher.create(),s=r.create(),a=s.words,u=i.keySize,c=i.iterations;a.length<u;){n&&o.update(n),n=o.update(t).finalize(e),o.reset();for(var h=1;h<c;h++)n=o.finalize(n),o.reset();s.concat(n)}return s.sigBytes=4*u,s}}),t.EvpKDF=function(t,e,n){return s.create(n).compute(t,e)},a.EvpKDF));var t,e,n,r,i,o,s,a}var ft,dt={exports:{}};function pt(){return ft?dt.exports:(ft=1,dt.exports=(t=S(),lt(),void(t.lib.Cipher||function(e){var n=t,r=n.lib,i=r.Base,o=r.WordArray,s=r.BufferedBlockAlgorithm,a=n.enc;a.Utf8;var u=a.Base64,c=n.algo.EvpKDF,h=r.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?b:m}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()});r.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=n.mode={},f=r.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),d=l.CBC=function(){var t=f.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;n.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,o=t.slice(e,e+i);r.decryptBlock(t,e),n.call(this,t,e,i),this._prevBlock=o}}),t}(),p=(n.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,r=n-t.sigBytes%n,i=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(i);var u=o.create(s,r);t.concat(u)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};r.BlockCipher=h.extend({cfg:h.cfg.extend({mode:d,padding:p}),reset:function(){var t;h.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4});var g=r.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),y=(n.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(e):e).toString(u)},parse:function(t){var e,n=u.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:e})}},m=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),s=i.cfg;return g.create({ciphertext:o,key:n,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),v=(n.kdf={}).OpenSSL={execute:function(t,e,n,r,i){if(r||(r=o.random(8)),i)s=c.create({keySize:e+n,hasher:i}).compute(t,r);else var s=c.create({keySize:e+n}).compute(t,r);var a=o.create(s.words.slice(e),4*n);return s.sigBytes=4*e,g.create({key:s,iv:a,salt:r})}},b=r.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:v}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=m.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt,r.hasher);return r.iv=i.iv,m.decrypt.call(this,t,e,i.key,r)}})}())));var t}var gt;var yt,mt={exports:{}};function vt(){return yt||(yt=1,mt.exports=(t=S(),function(){if("function"==typeof ArrayBuffer){var e=t.lib.WordArray,n=e.init,r=e.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,r=[],i=0;i<e;i++)r[i>>>2]|=t[i]<<24-i%4*8;n.call(this,r,e)}else n.apply(this,arguments)};r.prototype=e}}(),t.lib.WordArray)),mt.exports;var t}var bt,wt,St,Et,_t,xt={exports:{}};function Tt(){return wt||(wt=1,function(t){const e=it(),n=gt?st.exports:(gt=1,st.exports=(r=S(),k(),P(),lt(),pt(),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],h=[],l=[],f=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,r=0;for(e=0;e<256;e++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=t[n],y=t[g],m=t[y],v=257*t[p]^16843008*p;s[n]=v<<24|v>>>8,a[n]=v<<16|v>>>16,u[n]=v<<8|v>>>24,c[n]=v,v=16843009*m^65537*y^257*g^16843008*n,h[p]=v<<24|v>>>8,l[p]=v<<16|v>>>16,f[p]=v<<8|v>>>24,d[p]=v,n?(n=g^t[t[t[m^g]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=e[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:h[i[c>>>24]]^l[i[c>>>16&255]]^f[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,a,u,c,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,h,l,f,d,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,s,a){for(var u=this._nRounds,c=t[e]^n[0],h=t[e+1]^n[1],l=t[e+2]^n[2],f=t[e+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[h>>>16&255]^o[l>>>8&255]^s[255&f]^n[d++],y=r[h>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&c]^n[d++],m=r[l>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&h]^n[d++],v=r[f>>>24]^i[c>>>16&255]^o[h>>>8&255]^s[255&l]^n[d++];c=g,h=y,l=m,f=v}g=(a[c>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^n[d++],y=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[d++],m=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&h])^n[d++],v=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^n[d++],t[e]=g,t[e+1]=y,t[e+2]=m,t[e+3]=v},keySize:8});t.AES=e._createHelper(g)}(),r.AES));var r;const i=vt(),o=function(){return bt?xt.exports:(bt=1,xt.exports=(t=S(),pt(),t.pad.Pkcs7));var t}(),s=M();t.exports={encryptRSA:function(t,n){if(!n)throw new Error("publicPem is required");const r=new e;return r.setPublicKey(n),r.encrypt(t)},encryptAES:function(t){const e=i.random(16),r=e,a=n.encrypt(t,r,{iv:e,padding:o});return{iv:e.toString(s),encrypted:a.toString()}}}}(nt)),nt.exports}function Ot(){return _t||(_t=1,function(t){const{getPublicPem:e}=tt(),{encryptRSA:n,encryptAES:r}=function(){if(Et)return St;let t;return Et=1,t=Tt(),St=t}();t.exports=async function(t){if(!t)throw new Error("data is required");const i=await e(),o=JSON.stringify(t),{encrypted:s,iv:a}=r(o);return{akaParams:s,secretKey:n(a,i)}}}($)),$.exports}var Rt,Dt,At={exports:{}};function jt(){return Rt||(Rt=1,function(t){const{hashMD5:e}=F(),n=d();t.exports={getReqSign:function(t){"string"==typeof t&&(t={eqp:t||"",os:(arguments.length<=1?void 0:arguments[1])||"",ba:(arguments.length<=2?void 0:arguments[2])||"",bp:(arguments.length<=3?void 0:arguments[3])||""});let{eqp:r,os:i,ba:o,bp:s,ver:a,ctx:u}=t||{};u&&(r||(r=u.uuid),o||(o=u.query.ba),s||(s=u.query.bp));const c={EQP:r||n.eqp||"",OS:i||1*n.os||1,BA:o||n.ba||"",BP:s||n.bp||"",Ver:a||n.ver||"1.0.0",TS:Date.now()},h="EQP=".concat(c.EQP,"&OS=").concat(c.OS,"&BA=").concat(c.BA,"&BP=").concat(c.BP,"&Ver=").concat(c.Ver,"&TS=").concat(c.TS,"+").concat("bjxstat2019"),l=e(h).toUpperCase();return Object.assign(c,{Sign:l})},getReqSign2:function(t){"string"==typeof t&&(t={eqp:t||"",os:(arguments.length<=1?void 0:arguments[1])||"",ba:(arguments.length<=2?void 0:arguments[2])||"",bp:(arguments.length<=3?void 0:arguments[3])||"",xappid:(arguments.length<=4?void 0:arguments[4])||""});let{eqp:r,os:i,ba:o,bp:s,ver:a,xappid:u,ctx:c}=t||{};c&&(r||(r=c.uuid),o||(o=c.query.ba),s||(s=c.query.bp));const h={EQP:r||n.eqp||"",OS:i||1*n.os||1,BA:o||n.ba||"",BP:s||n.bp||"",Ver:a||n.ver||"1.0.0",TS:Date.now(),XAppId:u||n.clientId||""},l="EQP=".concat(h.EQP,"&OS=").concat(h.OS,"&BA=").concat(h.BA,"&BP=").concat(h.BP,"&Ver=").concat(h.Ver,"&TS=").concat(h.TS,"&XAppId=").concat(h.XAppId,"+").concat("%SiGn2021!@#"),f=e(l).toUpperCase();return Object.assign(h,{Sign:f})}}}(At)),At.exports}function kt(){return Dt||(Dt=1,function(t){const e=z(),n=Ot(),r=jt();t.exports=o({reqSign:e,reqEncrypt:n,getReqBody:async function(t,r,i){let{eqp:o="",os:s="",ba:a="",bp:u="",ver:c="",apiVersion:h="",signVersion:l="",clientId:f="",clientSecret:d="",ctx:p}=i||{};p&&(o||(o=p.uuid),a||(a=p.query.ba),u||(u=p.query.bp));const g={eqp:o,os:s,ba:a,bp:u,ver:c,apiVersion:h,signVersion:l,clientId:f,clientSecret:d};return r&&t&&Object.keys(t).length>0?g.data=await n(t):g.data=t||{},e(g)}},r)}(p)),p.exports}var Bt,Ct={exports:{}};function Pt(){return Bt||(Bt=1,function(t){const{passportapi:e}=Y(),{getReqBody:n}=kt();t.exports={getToken:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.__isRefresh__?async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(null,!1,r),e(o({url:"/api/v1/token/refresh/web",method:"POST"},t))}(t,r):async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(null,!1,r),e(o({url:"/api/v1/token/web",method:"POST"},t))}(t,r)},loginSms:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/login/sms/web",method:"POST"},t))},loginPwd:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/login/pwd/web",method:"POST"},t))},registerSms:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/register/sms/web",method:"POST"},t))},logout:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(null,!1,r),e(o({url:"/api/v1/logout/web",method:"POST"},t))},loginSmsQuick:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/login/sms/quick/web",method:"POST"},t))},userPatchInfo:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/user/basic/sync",method:"POST"},t))},userBusmold:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/user/busmold/seekers/set",method:"POST"},t))},userExist:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/user/exist/phone",method:"POST"},t))},pwdResetVerify:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/user/pwd/reset/verify",method:"POST"},t))},pwdReset:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/user/pwd/reset",method:"POST"},t))},wxpubCode:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/wechat/wxpub/qrcode",method:"POST"},t))},wxpubScan:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/wechat/wxpub/scan/login",method:"POST"},t))},wxpubBindLogin:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/wechat/wxpub/scan/bindlogin",method:"POST"},t))},wxpubH5Code:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/wechat/wxpub/h5/getcode",method:"POST"},t))},wxpubH5BindLogin:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/wechat/wxpub/h5/bindlogin",method:"POST"},t))},webappCode:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/wechat/webapp/code",method:"POST"},t))},webappBindLogin:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!0,r),e(o({url:"/api/v1/wechat/webapp/bindlogin",method:"POST"},t))}}}(Ct)),Ct.exports}var It,Nt={exports:{}};function qt(){return It||(It=1,function(t){const{userapi:e}=Y(),{getReqBody:n}=kt();t.exports={baseinfo:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/user/baseinfo",method:"POST"},t))},geetestGet:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/geetest/sign/get",method:"POST"},t))},geetestCheck:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/geetest/sign/check",method:"POST"},t))},geetestSend:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/sms/geetest/code/send",method:"POST"},t))},regionCode:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await n(t.data,!1,r),e(o({url:"/api/v1/common/country/region-code",method:"POST"},t))}}}(Nt)),Nt.exports}var Ut,Vt,Lt={exports:{}};function Mt(){return Ut||(Ut=1,function(t){const{auth:e,enterpriseapi:n,userapi:r}=Y(),{getReqSign:i,getReqBody:s}=kt();t.exports={getUserInfo:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const u=["baseinfo","BaseInfo","BaseInfoV1","ExtendInfo","userInfo"];return u.includes(t.__type__)||(t.__type__=u[0]),"userInfo"===t.__type__?async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=o(o({},t.data),i(e)),n(o({url:"/enterprise/user/userInfo",method:"POST"},t)).then(t=>{const{data:e}=t;return t.data={HttpStatusCode:e.code,Error:e.errMsg,IsError:!e.success,Data:e.data&&Object.keys(e.data).length?{HasCompany:e.data.hasCompanyState>0,Id:e.data.id||"",UId:e.data.userId||0,UserName:e.data.userName||"",NickName:e.data.nickName||"",Email:e.data.userEmail||"",EmailIsCheck:e.data.emailCheckState>0,RegionCode:e.data.regionCode||"",Phone:e.data.userPhone||"",PhoneIsCheck:e.data.phoneCheckState>0,HeadUrl:e.data.headUrl||"",BackImage:e.data.backImage||"",BriefIntro:e.data.briefIntro||"",Industry:e.data.industryId||0,Source:e.data.registerSource||0,ShowName:e.data.showName||"",HeadIsDef:e.data.headDefState>0,Nick:e.data.nick||"",NickShowName:e.data.nickShowName||"",RegDate:e.data.registerDate||""}:{}},t})}(t,a):"baseinfo"===t.__type__?async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=await s(t.data,!1,e),r(o({url:"/api/v1/user/baseinfo",method:"POST"},t)).then(t=>{const{data:e}=t;return t.data={HttpStatusCode:e.httpStatusCode,Error:e.error,IsError:e.isError,Data:e.data&&Object.keys(e.data).length?{HasCompany:e.data.hasCompany,Id:e.data.id||"",UId:e.data.uid||0,UserName:e.data.userName||"",NickName:e.data.nickName||"",Email:e.data.email||"",EmailIsCheck:e.data.emailIsCheck,RegionCode:e.data.regionCode||"",Phone:e.data.phone||"",PhoneIsCheck:e.data.phoneIsCheck,HeadUrl:e.data.headUrl||"",BackImage:e.data.backImage||"",BriefIntro:e.data.briefIntro||"",Industry:e.data.industry||0,Source:e.data.source||0,ShowName:e.data.showName||"",HeadIsDef:e.data.headIsDef,Nick:e.data.nick||"",NickShowName:e.data.nickShowName||"",RegDate:e.data.regDate||""}:{}},t})}(t,a):async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.data=o(o({},t.data),i(n)),e(o({url:"/api/User/"+t.__type__,method:"POST"},t))}(t,a)}}}(Lt)),Lt.exports}function Ht(){return Vt||(Vt=1,function(t){const{setConfig:e,getConfig:n}=d(),r=kt(),i=Pt(),o=qt(),s=Mt(),{clearPublicPemCache:a,hasPublicPemCache:u}=tt();t.exports=Object.assign({setConfig:e,getConfig:n,clearPublicPemCache:a,hasPublicPemCache:u},r,i,o,s)}(l)),l.exports}const Ft=["ctx","site","returnUrl","BA","BP","OS","EQP"];var zt,Kt,Wt,Jt,$t,Gt,Zt,Xt;function Qt(){if(Kt)return zt;Kt=1;const t=d();function e(t){if(!t||0===Object.keys(t).length)return"";const e=[];for(const n in t)t[n]&&e.push("".concat(n,"=").concat(encodeURIComponent(t[n])));return e.join("&")}return zt={getLoginCenterUrl:function(n){var r,i;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const a=n||{},{ctx:u,site:c="",returnUrl:h="",BA:l="",BP:f="",OS:d="",EQP:p=""}=a,g=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(a,Ft);if(!c&&!u)throw new Error("site is required");if(!h&&!u)throw new Error("returnUrl is required");const{clientId:y,login:m}=t,v=e({BA:l||(null==u||null===(r=u.query)||void 0===r?void 0:r.ba)||t.ba||"",BP:f||(null==u||null===(i=u.query)||void 0===i?void 0:i.bp)||t.bp||"",OS:d||t.os||1,EQP:p||(null==u?void 0:u.uuid)||t.eqp||""});let b;!u||c&&h||(b=function(t,e){let n=t.query.f||"";const r=t.origin,i=new RegExp("^"+r);if(/^\//.test(n))n=r+n;else if(n&&!i.test(n))n=r;else if(!n){const e=t.headers.referer;n=i.test(e)&&e!==t.href?e:r}const o={returnUrl:n};if(e){const t=n.replace(/^https?:\/\//,"").replace(/\/.*/,"");o.site=function(t){const e={hr:3e4,dljob:30100,hdjob:30101,fdjob:30102,sdjob:30103,hedjob:30104,gfjob:30105,zhnyfwjob:30106,shdjob:30107,tanjob:30108,qnjob:30109,dqjob:30200,cnjob:30201,spdjob:30202,zdhjob:30203,xxhjob:30204,hbjob:30300,scljob:30301,gfcljob:30302,dqzljob:30303,jchpjob:30304,hbfdjob:30305,hbgcjob:30306,hbsbjob:30307,hjxfjob:30308,jnjob:30309,gcjob:30400,dlgcjob:30401,jzjob:30402,szlqjob:30403,gdjob:30404,jdjob:30406,sjjob:30407,jljob:30408,gczjjob:30409,dcjob:30500,dcscjob:30501,dcyyjob:30502,dccljob:30503,dchsjob:30504,dcjsjob:30507,spdsbjob:30601,pdywjob:30602,pwpdgcjob:30603,znwdwjob:30604,zlpdwjob:30605,xndcjob:30606,dlscjob:30700,mhr:4e4,mdljob:40100,mhdjob:40101,mfdjob:40102,msdjob:40103,mhedjob:40104,mgfjob:40105,mzhnyfwjob:40106,mshdjob:40107,mtanjob:40108,mqnjob:40109,mdqjob:40200,mcnjob:40201,mspdjob:40202,mzdhjob:40203,mxxhjob:40204,mhbjob:40300,mscljob:40301,mgfcljob:40302,mdqzljob:40303,mjchpjob:40304,mhbfdjob:40305,mhbgcjob:40306,mhbsbjob:40307,mhjxfjob:40308,mjnjob:40309,mgcjob:40400,mdlgcjob:40401,mjzjob:40402,mszlqjob:40403,mgdjob:40404,mjdjob:40406,msjjob:40407,mjljob:40408,mgczjjob:40409,mdcjob:40500,mdcscjob:40501,mdcyyjob:40502,mdccljob:40503,mdchsjob:40504,mdcjsjob:40507,mspdsbjob:40601,mpdywjob:40602,mpwpdgcjob:40603,mznwdwjob:40604,mzlpdwjob:40605,mxndcjob:40606,mdlscjob:40700,yun:3099,yun:30991,yun:30992,yun:30993,yun:30994,yun:30995,yun:30996,tv:3095,sp:3096,sxh:3094,msxh:3093,xiaoyuan:3091,mxiaoyuan:4091,xxsxh:3090,mxxsxh:4090,keyjob:3092,my:3097,mmy:4097,star:3088,stat:3086,manager2:3095,hrcrm:3084,baogao:3076};for(const n in e){if(t.includes(n))return n+".bjx.com.cn";if(t.includes(e[n]))return n+".bjx.com.cn"}return"hr.bjx.com.cn"}(t)}return o}(u,!c));const w=e(o(o({site:c||b.site,clientId:y,pp:v},g),{},{returnUrl:h||b.returnUrl})),S="/Account/Login?".concat(w),E={login:S,register:"/Account/Register?".concat(w),logout:"/Account/Logout?".concat(w),bind:"/External/UserBind?".concat(w),logout2:"/Account/Logout?".concat(w.replace("returnUrl=.+$","")+encodeURIComponent(S))},_={login:"".concat(m).concat(E.login),register:"".concat(m).concat(E.register),logout:"".concat(m).concat(E.logout),bind:"".concat(m).concat(E.bind),logout2:"".concat(m).concat(E.logout2),returnUrl:b.returnUrl};if(s){let t=[];if(Array.isArray(s)?t=s:"string"==typeof s&&(t=s.split(",").map(t=>t.trim())),!t.length)return _;const e={};return t.forEach(t=>{const n=_[t];n&&(e[t]=n)}),1===Object.keys(e).length?Object.values(e)[0]:Object.keys(e).length?e:_}return _}},zt}function Yt(){if(Gt)return $t;Gt=1;const t=u,e=c(),n=Ht(),{getLoginCenterUrl:r}=Qt(),{errorLogger:i,debugLogger:s}=Q(),{setConfig:a,getConfig:h,getTokenApi:l,refreshTokenApi:f,getUserInfoApi:d}=function(){if(Jt)return Wt;Jt=1;const{setConfig:t,getConfig:e,getToken:n,getUserInfo:r}=Ht();async function i(t){const e=new URLSearchParams(window.location.search),r=e.get("ba")||"",i=e.get("bp")||"";return n({__isRefresh__:t||!1},{ba:r,bp:i}).then(t=>{let{data:e}=t;if(!1===e.isError)return{token_type:"",access_token:e.data.authToken,expires_at:e.data.expiresAt||Date.now()/1e3+14400|0};throw new Error("invalid data",{cause:e})})}return Wt={setConfig:t,getConfig:e,getTokenApi:i,refreshTokenApi:async function(){return i(!0)},getUserInfoApi:async function(t,e){if(!t)return null;const n={};t.__flag__?n.AuthToken=t.access_token:n.Authorization=t.token_type+" "+t.access_token;const i=new URLSearchParams(window.location.search),s=i.get("ba")||"",a=i.get("bp")||"";return r({__type__:e,headers:o({},n)},{ba:s,bp:a}).then(t=>{let{data:e}=t;if(!1===e.IsError)return e.Data;throw new Error("invalid data",{cause:e})})}}}();class p{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=o({loadUserInfo:!0,userInfoType:"",handleQueryToken:!1,dispatchCustomEvent:!1,authConfig:{},extendDataHandler:null,extendDataExpires:30,storage:"",cookieWatchInterval:1e3,excludeRouterReg:/^\/sso\/|^\/oidc\//},e),this._cookieWatchInterval=this.options.cookieWatchInterval||1e3,this._userInfoExpires=this._normalizeExpires(this.options.loadUserInfo),this._extendDataExpires=this._normalizeExpires(this.options.extendDataExpires),this.storage=null,this._initStorage(),this.emitter=t(),this.on=this.emitter.on,this.off=this.emitter.off,this.emit=this.emitter.emit,this.tokenset=null,this.userInfo=null,this.extendData=null,this._pendingRequests={},this._queryTokenset=null,this.options.handleQueryToken&&this._handleQueryToken(),this._restoreFromStorage(),this.storage===window.localStorage&&(this._boundHandleStorageEvent=this._handleStorageEvent.bind(this),window.addEventListener("storage",this._boundHandleStorageEvent)),a(this.options.authConfig),this.options.authConfig.debug&&s("配置项",h()),this._cookieTimer=null}_normalizeExpires(t){return"number"==typeof t&&t>0?60*t*1e3:18e5}_handleQueryToken(){const t=new URLSearchParams(window.location.search),e=t.get("token"),n=t.get("authtoken");n?this._queryTokenset={token_type:"",access_token:n,expires_at:Math.floor(Date.now()/1e3)+3600,__flag__:"This token from authtoken query",__source__:"query"}:e&&(this._queryTokenset={token_type:"Bearer",access_token:e.replace("Bearer ",""),expires_at:Math.floor(Date.now()/1e3)+3600,__source__:"query"}),this._queryTokenset&&(this.storage=null)}_initStorage(){try{if("localStorage"===this.options.storage)this.storage=window.localStorage;else if("sessionStorage"===this.options.storage)this.storage=window.sessionStorage;else if("object"==typeof this.options.storage&&null!==this.options.storage){if(!("setItem"in this.options.storage&&"getItem"in this.options.storage&&"removeItem"in this.options.storage))throw new Error("Storage object is not valid");this.storage=this.options.storage}else void 0!==this.options.storage&&""!==this.options.storage||(this.storage=window.localStorage)}catch(t){i("Init storage Failed",t)}}_restoreFromStorage(){if(!this.storage)return;const t=this._getCookie("idsrv.session");if(!t)return;const e=JSON.parse(this.storage.getItem("bjx_auth_tokenset")||"null");e&&e.__flag__===t&&1e3*e.expires_at>Date.now()&&(this.tokenset=e,this.userInfo=JSON.parse(this.storage.getItem("bjx_auth_userInfo")||"null"),this.extendData=JSON.parse(this.storage.getItem("bjx_auth_extendData")||"null"),this.tokenset&&this._dispatchEvent("tokensetChange",this.tokenset),this.userInfo&&this._dispatchEvent("userInfoChange",this.userInfo),this.extendData&&this._dispatchEvent("extendDataChange",this.extendData),this._startCookieWatcher())}_startCookieWatcher(){return this._stopCookieWatcher(),this._cookieTimer=setInterval(()=>{var t;const e=this._getCookie("idsrv.session");e&&e===(null===(t=this.tokenset)||void 0===t?void 0:t.__flag__)||this._clearAuthData()},this._cookieWatchInterval),!0}_stopCookieWatcher(){this._cookieTimer&&(clearInterval(this._cookieTimer),this._cookieTimer=null)}_saveToStorage(t){this.storage&&(!this.tokenset||t&&"tokenset"!==t||this.storage.setItem("bjx_auth_tokenset",JSON.stringify(this.tokenset)),!this.userInfo||t&&"userInfo"!==t||this.storage.setItem("bjx_auth_userInfo",JSON.stringify(this.userInfo)),!this.extendData||t&&"extendData"!==t||this.storage.setItem("bjx_auth_extendData",JSON.stringify(this.extendData)))}_clearAuthData(t){this._stopCookieWatcher(),this.tokenset=null,this.userInfo=null,this.extendData=null,this.storage&&["bjx_auth_tokenset","bjx_auth_userInfo","bjx_auth_extendData"].forEach(t=>{this.storage.removeItem(t)}),t||(this._dispatchEvent("tokensetChange",null),this._dispatchEvent("userInfoChange",null),"function"==typeof this.options.extendDataHandler&&this._dispatchEvent("extendDataChange",null))}_getCookie(t){const e="; ".concat(document.cookie).split("; ".concat(t,"="));return 2===e.length?e.pop().split(";").shift():null}_setCookie(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r="";if(n){const t=new Date;t.setTime(t.getTime()+24*n*60*60*1e3),r="; expires="+t.toUTCString()}document.cookie=t+"="+(e||"")+r+"; path=/"}_deleteCookie(t){document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/"}_handleStorageEvent(t){if(!this.storage)return;const e=this._getCookie("idsrv.session");if("bjx_auth_tokenset"===t.key){const n=JSON.parse(t.newValue||"null");(n&&n.__flag__===e||!t.newValue)&&(this.tokenset=n,this._dispatchEvent("tokensetChange",n))}else"bjx_auth_userInfo"===t.key?Promise.resolve().then(()=>{(this.tokenset&&this.tokenset.__flag__===e||!t.newValue)&&(this.userInfo=JSON.parse(t.newValue||"null"),this._dispatchEvent("userInfoChange",this.userInfo))}):"bjx_auth_extendData"===t.key&&Promise.resolve().then(()=>{(this.tokenset&&this.tokenset.__flag__===e||!t.newValue)&&(this.extendData=JSON.parse(t.newValue||"null"),this._dispatchEvent("extendDataChange",this.extendData))})}_dispatchEvent(t,e){Promise.resolve().then(()=>{if(this.emit(t,e),this.options.dispatchCustomEvent){const n=new CustomEvent("bjxAuth:"+t,{detail:e});window.dispatchEvent(n)}})}async init(){return this.getTokenset()}async isAuth(){return null!==await this.getTokenset()}async getToken(){const t=await this.getTokenset();return t&&t.access_token?(t.token_type?t.token_type+" ":"")+t.access_token:null}async getTokenset(){if(this._queryTokenset){return await this.getUserInfo(void 0,this._queryTokenset)?(this.options.authConfig.debug&&s("通过".concat(this._queryTokenset.__flag__?"authtoken":"token","参数登录系统")),this.tokenset=this._queryTokenset,this._dispatchEvent("tokensetChange",this._queryTokenset),this.getExtendData(),this.tokenset):null}const t=this._getCookie("idsrv.session");if(!t)return this.tokenset&&this._clearAuthData(),null;if(this.tokenset&&this.tokenset.__flag__===t){if(1e3*this.tokenset.expires_at<=Date.now()){let e="refreshToken";try{this._pendingRequests[e]||(this._pendingRequests[e]=f.call(this));const n=await this._pendingRequests[e];if(delete this._pendingRequests[e],!n)throw new Error("Empty refreshToken data");this.tokenset=o(o({},n),{},{__flag__:t}),this._saveToStorage("tokenset"),this._dispatchEvent("tokensetChange",this.tokenset)}catch(t){return delete this._pendingRequests[e],i("Get refreshToken failed:",t),null}}}else{let e="getToken";try{this._pendingRequests[e]||(this._pendingRequests[e]=l.call(this));const n=await this._pendingRequests[e];if(delete this._pendingRequests[e],!n)throw new Error("Empty token data");this.tokenset=o(o({},n),{},{__flag__:t}),this._saveToStorage("tokenset"),this._dispatchEvent("tokensetChange",this.tokenset),this._startCookieWatcher()}catch(t){return delete this._pendingRequests[e],i("Get token failed:",t),null}}return this.getUserInfo(),this.getExtendData(),this.tokenset}async getUserInfo(t,e){const n=e||this.tokenset;if(!n)return null;if(!this.options.loadUserInfo&&!e)return null;const r=this._getCookie("idsrv.session");if(!t&&this.userInfo&&this.userInfo.__expires_at__>Date.now()&&this.userInfo.__flag__===r)return this.userInfo;const s="getUserInfo";try{this._pendingRequests[s]||(this._pendingRequests[s]=d.call(this,n,this.options.userInfoType));const t=await this._pendingRequests[s];if(delete this._pendingRequests[s],!t)throw new Error("Empty userInfo data");const e=o(o({},t),{},{__flag__:r,__expires_at__:Date.now()+this._userInfoExpires});return this.options.loadUserInfo&&(this.userInfo=e,this._saveToStorage("userInfo"),this._dispatchEvent("userInfoChange",this.userInfo)),e}catch(t){return delete this._pendingRequests[s],i("Get userInfo failed:",t),null}}async getExtendData(t){if("function"!=typeof this.options.extendDataHandler)return null;if(!this.tokenset)return null;const e=this._getCookie("idsrv.session");if(!t&&this.extendData&&this.extendData.__expires_at__>Date.now()&&this.extendData.__flag__===e)return this.extendData;const n="getExtendData";try{this._pendingRequests[n]||(this._pendingRequests[n]=this.options.extendDataHandler.call(this,this.tokenset,this));const t=await this._pendingRequests[n];if(delete this._pendingRequests[n],!t)throw new Error("Empty extendData data");return this.extendData=o(o({},t),{},{__flag__:e,__expires_at__:Date.now()+this._extendDataExpires}),this._saveToStorage("extendData"),this._dispatchEvent("extendDataChange",this.extendData),this.extendData}catch(t){return delete this._pendingRequests[n],i("Get extendData failed:",t),null}}createVueRouterMiddleware(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/sso/login";return async(e,n,r)=>{var i,o;const s=await this.isAuth();null!=e&&null!==(i=e.meta)&&void 0!==i&&i.isPublic||null!==(o=this.options.excludeRouterReg)&&void 0!==o&&o.test(null==e?void 0:e.path)||s?r():r(t)}}destroy(){this._stopCookieWatcher(),this.emitter.all.clear(),this.tokenset=null,this.userInfo=null,this.extendData=null,this._pendingRequests={},this._boundHandleStorageEvent&&(window.removeEventListener("storage",this._boundHandleStorageEvent),this._boundHandleStorageEvent=null)}clear(t){this._clearAuthData(t)}}return p.prototype.mitt=t,p.prototype.axios=e,p.prototype.bjxAuthApi=n,p.prototype.getLoginCenterUrl=r,p.mitt=t,p.axios=e,p.bjxAuthApi=n,p.getLoginCenterUrl=r,$t=p}var te=function(){if(Xt)return Zt;Xt=1;const t=Yt(),e=t.axios,n=document.currentScript;if(n){const r=n.hasAttribute("init"),i=n.getAttribute("init"),s=n.hasAttribute("expose"),a=n.getAttribute("expose"),u=n.hasAttribute("bind"),c=n.hasAttribute("debug");r&&e({url:i||"/api/get_bjx_auth_conf"}).then(e=>{let{data:n}=e;const r=(null==n?void 0:n.Data)||(null==n?void 0:n.data)||n;if(r&&Object.keys(r).length){const e=o(o({},r),{},{dispatchCustomEvent:!0});c&&(e.authConfig=o(o({},e.authConfig),{},{debug:!0}));const n=new t(e);n.init(),u&&(n.on("tokensetChange",t=>{t&&t.access_token?n._setCookie("bjx_auth_token",t.access_token,0):n._deleteCookie("bjx_auth_token")}),n.on("userInfoChange",t=>{t&&t.UId?n._setCookie("bjx_auth_uid",t.UId,0):n._deleteCookie("bjx_auth_uid")})),s&&(window[a||"bjx_auth_ins"]=n)}})}return Zt=t}(),ee=e(te);export{ee as default};
|