UNPKG

@glodon-aiot/agent-cli-sdk

Version:

aiot agent client js sdk

15 lines (13 loc) 1.32 MB
(function(Mi,Ci){typeof exports=="object"&&typeof module<"u"?Ci(exports):typeof define=="function"&&define.amd?define(["exports"],Ci):(Mi=typeof globalThis<"u"?globalThis:Mi||self,Ci(Mi.AgentClientSDK={}))})(this,function(Mi){"use strict";class Ci{constructor(O,L=!1){Object.defineProperty(this,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:O}),Object.defineProperty(this,"open",{enumerable:!0,configurable:!0,writable:!0,value:L})}disable(){this.open=!1}enable(){this.open=!0}log(...O){!this.open&&!Ci.debug||console.log(this.prefix,...O)}info(...O){!this.open&&!Ci.debug||console.info(`%c ${this.prefix} %o`,"color:#0f0;",...O)}error(...O){!this.open&&!Ci.debug||console.error(this.prefix,...O)}warn(...O){!this.open&&!Ci.debug||console.warn(this.prefix,...O)}}Object.defineProperty(Ci,"debug",{enumerable:!0,configurable:!0,writable:!0,value:!1});const Zh=new Ci("[Config] ");var ro;(function(K){K.dev="https://aiot-dev.glodon.com/api/cvforcepd",K.test="https://aiot-dev.glodon.com/api/cvforce",K.prod="https://copilot.glodon.com/api/cvforce",K.local="http://localhost:3000/api/cvforcepd"})(ro||(ro={})),Mi.configuration={debug:!1,env:"prod",apiRoot:ro.prod,applicationId:"",plugins:{},loadRelatedQuesions:!0};function yu(K){Ci.debug=(K==null?void 0:K.debug)||!1,Mi.configuration=Object.assign(Object.assign(Object.assign({},Mi.configuration),K),{apiRoot:(K==null?void 0:K.apiRoot)||Mi.configuration.apiRoot||(K!=null&&K.env?ro[K.env||"prod"]:Mi.configuration.apiRoot)}),Ci.debug&&Zh.log("updated",Mi.configuration)}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function Kh(K,O){var L={};for(var Y in K)Object.prototype.hasOwnProperty.call(K,Y)&&O.indexOf(Y)<0&&(L[Y]=K[Y]);if(K!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,Y=Object.getOwnPropertySymbols(K);ut<Y.length;ut++)O.indexOf(Y[ut])<0&&Object.prototype.propertyIsEnumerable.call(K,Y[ut])&&(L[Y[ut]]=K[Y[ut]]);return L}function Le(K,O,L,Y){function ut(lt){return lt instanceof L?lt:new L(function(V){V(lt)})}return new(L||(L=Promise))(function(lt,V){function _(v){try{x(Y.next(v))}catch(m){V(m)}}function y(v){try{x(Y.throw(v))}catch(m){V(m)}}function x(v){v.done?lt(v.value):ut(v.value).then(_,y)}x((Y=Y.apply(K,O||[])).next())})}const va=typeof Buffer=="function",bu=typeof TextDecoder=="function"?new TextDecoder:void 0;typeof TextEncoder=="function"&&new TextEncoder;const Jh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Gh=Array.prototype.slice.call(Jh),no=(K=>{let O={};return K.forEach((L,Y)=>O[L]=Y),O})(Gh),Yh=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,en=String.fromCharCode.bind(String),wu=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):K=>new Uint8Array(Array.prototype.slice.call(K,0)),Mu=K=>K.replace(/[^A-Za-z0-9\+\/]/g,""),Qh=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,tf=K=>{switch(K.length){case 4:var O=(7&K.charCodeAt(0))<<18|(63&K.charCodeAt(1))<<12|(63&K.charCodeAt(2))<<6|63&K.charCodeAt(3),L=O-65536;return en((L>>>10)+55296)+en((L&1023)+56320);case 3:return en((15&K.charCodeAt(0))<<12|(63&K.charCodeAt(1))<<6|63&K.charCodeAt(2));default:return en((31&K.charCodeAt(0))<<6|63&K.charCodeAt(1))}},ef=K=>K.replace(Qh,tf),xu=typeof atob=="function"?K=>atob(Mu(K)):va?K=>Buffer.from(K,"base64").toString("binary"):K=>{if(K=K.replace(/\s+/g,""),!Yh.test(K))throw new TypeError("malformed base64.");K+="==".slice(2-(K.length&3));let O,L="",Y,ut;for(let lt=0;lt<K.length;)O=no[K.charAt(lt++)]<<18|no[K.charAt(lt++)]<<12|(Y=no[K.charAt(lt++)])<<6|(ut=no[K.charAt(lt++)]),L+=Y===64?en(O>>16&255):ut===64?en(O>>16&255,O>>8&255):en(O>>16&255,O>>8&255,O&255);return L},rf=va?K=>wu(Buffer.from(K,"base64")):K=>wu(xu(K).split("").map(O=>O.charCodeAt(0))),nf=va?K=>Buffer.from(K,"base64").toString("utf8"):bu?K=>bu.decode(rf(K)):K=>ef(xu(K)),of=K=>Mu(K.replace(/[-_]/g,O=>O=="-"?"+":"/")),af=K=>nf(of(K)),oo=K=>JSON.parse(af(K.split(".")[1])),sf=K=>{const O=oo(K).exp;return new Date().valueOf()/1e3>=O},uf=K=>K==null?void 0:K.replace(/[\r\n]+/gm,""),cf=K=>K.replace(/\\|\\/g,"");var lf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _u(K){return K&&K.__esModule&&Object.prototype.hasOwnProperty.call(K,"default")?K.default:K}var ya={exports:{}},Su=function(O,L){return function(){for(var ut=new Array(arguments.length),lt=0;lt<ut.length;lt++)ut[lt]=arguments[lt];return O.apply(L,ut)}},hf=Su,rn=Object.prototype.toString;function ba(K){return rn.call(K)==="[object Array]"}function wa(K){return typeof K>"u"}function ff(K){return K!==null&&!wa(K)&&K.constructor!==null&&!wa(K.constructor)&&typeof K.constructor.isBuffer=="function"&&K.constructor.isBuffer(K)}function pf(K){return rn.call(K)==="[object ArrayBuffer]"}function df(K){return typeof FormData<"u"&&K instanceof FormData}function mf(K){var O;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?O=ArrayBuffer.isView(K):O=K&&K.buffer&&K.buffer instanceof ArrayBuffer,O}function gf(K){return typeof K=="string"}function vf(K){return typeof K=="number"}function Eu(K){return K!==null&&typeof K=="object"}function ao(K){if(rn.call(K)!=="[object Object]")return!1;var O=Object.getPrototypeOf(K);return O===null||O===Object.prototype}function yf(K){return rn.call(K)==="[object Date]"}function bf(K){return rn.call(K)==="[object File]"}function wf(K){return rn.call(K)==="[object Blob]"}function ku(K){return rn.call(K)==="[object Function]"}function Mf(K){return Eu(K)&&ku(K.pipe)}function xf(K){return typeof URLSearchParams<"u"&&K instanceof URLSearchParams}function _f(K){return K.trim?K.trim():K.replace(/^\s+|\s+$/g,"")}function Sf(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Ma(K,O){if(!(K===null||typeof K>"u"))if(typeof K!="object"&&(K=[K]),ba(K))for(var L=0,Y=K.length;L<Y;L++)O.call(null,K[L],L,K);else for(var ut in K)Object.prototype.hasOwnProperty.call(K,ut)&&O.call(null,K[ut],ut,K)}function xa(){var K={};function O(ut,lt){ao(K[lt])&&ao(ut)?K[lt]=xa(K[lt],ut):ao(ut)?K[lt]=xa({},ut):ba(ut)?K[lt]=ut.slice():K[lt]=ut}for(var L=0,Y=arguments.length;L<Y;L++)Ma(arguments[L],O);return K}function Ef(K,O,L){return Ma(O,function(ut,lt){L&&typeof ut=="function"?K[lt]=hf(ut,L):K[lt]=ut}),K}function kf(K){return K.charCodeAt(0)===65279&&(K=K.slice(1)),K}var Qi={isArray:ba,isArrayBuffer:pf,isBuffer:ff,isFormData:df,isArrayBufferView:mf,isString:gf,isNumber:vf,isObject:Eu,isPlainObject:ao,isUndefined:wa,isDate:yf,isFile:bf,isBlob:wf,isFunction:ku,isStream:Mf,isURLSearchParams:xf,isStandardBrowserEnv:Sf,forEach:Ma,merge:xa,extend:Ef,trim:_f,stripBOM:kf},mn=Qi;function Iu(K){return encodeURIComponent(K).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Ou=function(O,L,Y){if(!L)return O;var ut;if(Y)ut=Y(L);else if(mn.isURLSearchParams(L))ut=L.toString();else{var lt=[];mn.forEach(L,function(y,x){y===null||typeof y>"u"||(mn.isArray(y)?x=x+"[]":y=[y],mn.forEach(y,function(m){mn.isDate(m)?m=m.toISOString():mn.isObject(m)&&(m=JSON.stringify(m)),lt.push(Iu(x)+"="+Iu(m))}))}),ut=lt.join("&")}if(ut){var V=O.indexOf("#");V!==-1&&(O=O.slice(0,V)),O+=(O.indexOf("?")===-1?"?":"&")+ut}return O},If=Qi;function so(){this.handlers=[]}so.prototype.use=function(O,L,Y){return this.handlers.push({fulfilled:O,rejected:L,synchronous:Y?Y.synchronous:!1,runWhen:Y?Y.runWhen:null}),this.handlers.length-1},so.prototype.eject=function(O){this.handlers[O]&&(this.handlers[O]=null)},so.prototype.forEach=function(O){If.forEach(this.handlers,function(Y){Y!==null&&O(Y)})};var Of=so,Af=Qi,Tf=function(O,L){Af.forEach(O,function(ut,lt){lt!==L&&lt.toUpperCase()===L.toUpperCase()&&(O[L]=ut,delete O[lt])})},Au=function(O,L,Y,ut,lt){return O.config=L,Y&&(O.code=Y),O.request=ut,O.response=lt,O.isAxiosError=!0,O.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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},O},_a,Tu;function Bu(){if(Tu)return _a;Tu=1;var K=Au;return _a=function(L,Y,ut,lt,V){var _=new Error(L);return K(_,Y,ut,lt,V)},_a}var Sa,ju;function Bf(){if(ju)return Sa;ju=1;var K=Bu();return Sa=function(L,Y,ut){var lt=ut.config.validateStatus;!ut.status||!lt||lt(ut.status)?L(ut):Y(K("Request failed with status code "+ut.status,ut.config,null,ut.request,ut))},Sa}var Ea,Ru;function jf(){if(Ru)return Ea;Ru=1;var K=Qi;return Ea=K.isStandardBrowserEnv()?function(){return{write:function(Y,ut,lt,V,_,y){var x=[];x.push(Y+"="+encodeURIComponent(ut)),K.isNumber(lt)&&x.push("expires="+new Date(lt).toGMTString()),K.isString(V)&&x.push("path="+V),K.isString(_)&&x.push("domain="+_),y===!0&&x.push("secure"),document.cookie=x.join("; ")},read:function(Y){var ut=document.cookie.match(new RegExp("(^|;\\s*)("+Y+")=([^;]*)"));return ut?decodeURIComponent(ut[3]):null},remove:function(Y){this.write(Y,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Ea}var ka,Nu;function Rf(){return Nu||(Nu=1,ka=function(O){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(O)}),ka}var Ia,Cu;function Nf(){return Cu||(Cu=1,Ia=function(O,L){return L?O.replace(/\/+$/,"")+"/"+L.replace(/^\/+/,""):O}),Ia}var Oa,Pu;function Cf(){if(Pu)return Oa;Pu=1;var K=Rf(),O=Nf();return Oa=function(Y,ut){return Y&&!K(ut)?O(Y,ut):ut},Oa}var Aa,Lu;function Pf(){if(Lu)return Aa;Lu=1;var K=Qi,O=["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"];return Aa=function(Y){var ut={},lt,V,_;return Y&&K.forEach(Y.split(` `),function(x){if(_=x.indexOf(":"),lt=K.trim(x.substr(0,_)).toLowerCase(),V=K.trim(x.substr(_+1)),lt){if(ut[lt]&&O.indexOf(lt)>=0)return;lt==="set-cookie"?ut[lt]=(ut[lt]?ut[lt]:[]).concat([V]):ut[lt]=ut[lt]?ut[lt]+", "+V:V}}),ut},Aa}var Ta,Du;function Lf(){if(Du)return Ta;Du=1;var K=Qi;return Ta=K.isStandardBrowserEnv()?function(){var L=/(msie|trident)/i.test(navigator.userAgent),Y=document.createElement("a"),ut;function lt(V){var _=V;return L&&(Y.setAttribute("href",_),_=Y.href),Y.setAttribute("href",_),{href:Y.href,protocol:Y.protocol?Y.protocol.replace(/:$/,""):"",host:Y.host,search:Y.search?Y.search.replace(/^\?/,""):"",hash:Y.hash?Y.hash.replace(/^#/,""):"",hostname:Y.hostname,port:Y.port,pathname:Y.pathname.charAt(0)==="/"?Y.pathname:"/"+Y.pathname}}return ut=lt(window.location.href),function(_){var y=K.isString(_)?lt(_):_;return y.protocol===ut.protocol&&y.host===ut.host}}():function(){return function(){return!0}}(),Ta}var Ba,Uu;function uo(){if(Uu)return Ba;Uu=1;function K(O){this.message=O}return K.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},K.prototype.__CANCEL__=!0,Ba=K,Ba}var ja,qu;function Fu(){if(qu)return ja;qu=1;var K=Qi,O=Bf(),L=jf(),Y=Ou,ut=Cf(),lt=Pf(),V=Lf(),_=Bu(),y=co(),x=uo();return ja=function(m){return new Promise(function(a,p){var c=m.data,l=m.headers,f=m.responseType,g;function h(){m.cancelToken&&m.cancelToken.unsubscribe(g),m.signal&&m.signal.removeEventListener("abort",g)}K.isFormData(c)&&delete l["Content-Type"];var u=new XMLHttpRequest;if(m.auth){var w=m.auth.username||"",b=m.auth.password?unescape(encodeURIComponent(m.auth.password)):"";l.Authorization="Basic "+btoa(w+":"+b)}var E=ut(m.baseURL,m.url);u.open(m.method.toUpperCase(),Y(E,m.params,m.paramsSerializer),!0),u.timeout=m.timeout;function I(){if(u){var B="getAllResponseHeaders"in u?lt(u.getAllResponseHeaders()):null,P=!f||f==="text"||f==="json"?u.responseText:u.response,N={data:P,status:u.status,statusText:u.statusText,headers:B,config:m,request:u};O(function(et){a(et),h()},function(et){p(et),h()},N),u=null}}if("onloadend"in u?u.onloadend=I:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(I)},u.onabort=function(){u&&(p(_("Request aborted",m,"ECONNABORTED",u)),u=null)},u.onerror=function(){p(_("Network Error",m,null,u)),u=null},u.ontimeout=function(){var P=m.timeout?"timeout of "+m.timeout+"ms exceeded":"timeout exceeded",N=m.transitional||y.transitional;m.timeoutErrorMessage&&(P=m.timeoutErrorMessage),p(_(P,m,N.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},K.isStandardBrowserEnv()){var M=(m.withCredentials||V(E))&&m.xsrfCookieName?L.read(m.xsrfCookieName):void 0;M&&(l[m.xsrfHeaderName]=M)}"setRequestHeader"in u&&K.forEach(l,function(P,N){typeof c>"u"&&N.toLowerCase()==="content-type"?delete l[N]:u.setRequestHeader(N,P)}),K.isUndefined(m.withCredentials)||(u.withCredentials=!!m.withCredentials),f&&f!=="json"&&(u.responseType=m.responseType),typeof m.onDownloadProgress=="function"&&u.addEventListener("progress",m.onDownloadProgress),typeof m.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",m.onUploadProgress),(m.cancelToken||m.signal)&&(g=function(B){u&&(p(!B||B&&B.type?new x("canceled"):B),u.abort(),u=null)},m.cancelToken&&m.cancelToken.subscribe(g),m.signal&&(m.signal.aborted?g():m.signal.addEventListener("abort",g))),c||(c=null),u.send(c)})},ja}var Ra,zu;function co(){if(zu)return Ra;zu=1;var K=Qi,O=Tf,L=Au,Y={"Content-Type":"application/x-www-form-urlencoded"};function ut(y,x){!K.isUndefined(y)&&K.isUndefined(y["Content-Type"])&&(y["Content-Type"]=x)}function lt(){var y;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(y=Fu()),y}function V(y,x,v){if(K.isString(y))try{return(x||JSON.parse)(y),K.trim(y)}catch(m){if(m.name!=="SyntaxError")throw m}return(v||JSON.stringify)(y)}var _={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:lt(),transformRequest:[function(x,v){return O(v,"Accept"),O(v,"Content-Type"),K.isFormData(x)||K.isArrayBuffer(x)||K.isBuffer(x)||K.isStream(x)||K.isFile(x)||K.isBlob(x)?x:K.isArrayBufferView(x)?x.buffer:K.isURLSearchParams(x)?(ut(v,"application/x-www-form-urlencoded;charset=utf-8"),x.toString()):K.isObject(x)||v&&v["Content-Type"]==="application/json"?(ut(v,"application/json"),V(x)):x}],transformResponse:[function(x){var v=this.transitional||_.transitional,m=v&&v.silentJSONParsing,S=v&&v.forcedJSONParsing,a=!m&&this.responseType==="json";if(a||S&&K.isString(x)&&x.length)try{return JSON.parse(x)}catch(p){if(a)throw p.name==="SyntaxError"?L(p,this,"E_JSON_PARSE"):p}return x}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(x){return x>=200&&x<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return K.forEach(["delete","get","head"],function(x){_.headers[x]={}}),K.forEach(["post","put","patch"],function(x){_.headers[x]=K.merge(Y)}),Ra=_,Ra}var Df=Qi,Uf=co(),qf=function(O,L,Y){var ut=this||Uf;return Df.forEach(Y,function(V){O=V.call(ut,O,L)}),O},Na,$u;function Hu(){return $u||($u=1,Na=function(O){return!!(O&&O.__CANCEL__)}),Na}var Wu=Qi,Ca=qf,Ff=Hu(),zf=co(),$f=uo();function Pa(K){if(K.cancelToken&&K.cancelToken.throwIfRequested(),K.signal&&K.signal.aborted)throw new $f("canceled")}var Hf=function(O){Pa(O),O.headers=O.headers||{},O.data=Ca.call(O,O.data,O.headers,O.transformRequest),O.headers=Wu.merge(O.headers.common||{},O.headers[O.method]||{},O.headers),Wu.forEach(["delete","get","head","post","put","patch","common"],function(ut){delete O.headers[ut]});var L=O.adapter||zf.adapter;return L(O).then(function(ut){return Pa(O),ut.data=Ca.call(O,ut.data,ut.headers,O.transformResponse),ut},function(ut){return Ff(ut)||(Pa(O),ut&&ut.response&&(ut.response.data=Ca.call(O,ut.response.data,ut.response.headers,O.transformResponse))),Promise.reject(ut)})},tr=Qi,Vu=function(O,L){L=L||{};var Y={};function ut(v,m){return tr.isPlainObject(v)&&tr.isPlainObject(m)?tr.merge(v,m):tr.isPlainObject(m)?tr.merge({},m):tr.isArray(m)?m.slice():m}function lt(v){if(tr.isUndefined(L[v])){if(!tr.isUndefined(O[v]))return ut(void 0,O[v])}else return ut(O[v],L[v])}function V(v){if(!tr.isUndefined(L[v]))return ut(void 0,L[v])}function _(v){if(tr.isUndefined(L[v])){if(!tr.isUndefined(O[v]))return ut(void 0,O[v])}else return ut(void 0,L[v])}function y(v){if(v in L)return ut(O[v],L[v]);if(v in O)return ut(void 0,O[v])}var x={url:V,method:V,data:V,baseURL:_,transformRequest:_,transformResponse:_,paramsSerializer:_,timeout:_,timeoutMessage:_,withCredentials:_,adapter:_,responseType:_,xsrfCookieName:_,xsrfHeaderName:_,onUploadProgress:_,onDownloadProgress:_,decompress:_,maxContentLength:_,maxBodyLength:_,transport:_,httpAgent:_,httpsAgent:_,cancelToken:_,socketPath:_,responseEncoding:_,validateStatus:y};return tr.forEach(Object.keys(O).concat(Object.keys(L)),function(m){var S=x[m]||lt,a=S(m);tr.isUndefined(a)&&S!==y||(Y[m]=a)}),Y},La,Xu;function Zu(){return Xu||(Xu=1,La={version:"0.24.0"}),La}var Wf=Zu().version,Da={};["object","boolean","number","function","string","symbol"].forEach(function(K,O){Da[K]=function(Y){return typeof Y===K||"a"+(O<1?"n ":" ")+K}});var Ku={};Da.transitional=function(O,L,Y){function ut(lt,V){return"[Axios v"+Wf+"] Transitional option '"+lt+"'"+V+(Y?". "+Y:"")}return function(lt,V,_){if(O===!1)throw new Error(ut(V," has been removed"+(L?" in "+L:"")));return L&&!Ku[V]&&(Ku[V]=!0,console.warn(ut(V," has been deprecated since v"+L+" and will be removed in the near future"))),O?O(lt,V,_):!0}};function Vf(K,O,L){if(typeof K!="object")throw new TypeError("options must be an object");for(var Y=Object.keys(K),ut=Y.length;ut-- >0;){var lt=Y[ut],V=O[lt];if(V){var _=K[lt],y=_===void 0||V(_,lt,K);if(y!==!0)throw new TypeError("option "+lt+" must be "+y);continue}if(L!==!0)throw Error("Unknown option "+lt)}}var Xf={assertOptions:Vf,validators:Da},Ju=Qi,Zf=Ou,Gu=Of,Yu=Hf,lo=Vu,Qu=Xf,gn=Qu.validators;function Nn(K){this.defaults=K,this.interceptors={request:new Gu,response:new Gu}}Nn.prototype.request=function(O){typeof O=="string"?(O=arguments[1]||{},O.url=arguments[0]):O=O||{},O=lo(this.defaults,O),O.method?O.method=O.method.toLowerCase():this.defaults.method?O.method=this.defaults.method.toLowerCase():O.method="get";var L=O.transitional;L!==void 0&&Qu.assertOptions(L,{silentJSONParsing:gn.transitional(gn.boolean),forcedJSONParsing:gn.transitional(gn.boolean),clarifyTimeoutError:gn.transitional(gn.boolean)},!1);var Y=[],ut=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(O)===!1||(ut=ut&&S.synchronous,Y.unshift(S.fulfilled,S.rejected))});var lt=[];this.interceptors.response.forEach(function(S){lt.push(S.fulfilled,S.rejected)});var V;if(!ut){var _=[Yu,void 0];for(Array.prototype.unshift.apply(_,Y),_=_.concat(lt),V=Promise.resolve(O);_.length;)V=V.then(_.shift(),_.shift());return V}for(var y=O;Y.length;){var x=Y.shift(),v=Y.shift();try{y=x(y)}catch(m){v(m);break}}try{V=Yu(y)}catch(m){return Promise.reject(m)}for(;lt.length;)V=V.then(lt.shift(),lt.shift());return V},Nn.prototype.getUri=function(O){return O=lo(this.defaults,O),Zf(O.url,O.params,O.paramsSerializer).replace(/^\?/,"")},Ju.forEach(["delete","get","head","options"],function(O){Nn.prototype[O]=function(L,Y){return this.request(lo(Y||{},{method:O,url:L,data:(Y||{}).data}))}}),Ju.forEach(["post","put","patch"],function(O){Nn.prototype[O]=function(L,Y,ut){return this.request(lo(ut||{},{method:O,url:L,data:Y}))}});var Kf=Nn,Ua,tc;function Jf(){if(tc)return Ua;tc=1;var K=uo();function O(L){if(typeof L!="function")throw new TypeError("executor must be a function.");var Y;this.promise=new Promise(function(V){Y=V});var ut=this;this.promise.then(function(lt){if(ut._listeners){var V,_=ut._listeners.length;for(V=0;V<_;V++)ut._listeners[V](lt);ut._listeners=null}}),this.promise.then=function(lt){var V,_=new Promise(function(y){ut.subscribe(y),V=y}).then(lt);return _.cancel=function(){ut.unsubscribe(V)},_},L(function(V){ut.reason||(ut.reason=new K(V),Y(ut.reason))})}return O.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},O.prototype.subscribe=function(Y){if(this.reason){Y(this.reason);return}this._listeners?this._listeners.push(Y):this._listeners=[Y]},O.prototype.unsubscribe=function(Y){if(this._listeners){var ut=this._listeners.indexOf(Y);ut!==-1&&this._listeners.splice(ut,1)}},O.source=function(){var Y,ut=new O(function(V){Y=V});return{token:ut,cancel:Y}},Ua=O,Ua}var qa,ec;function Gf(){return ec||(ec=1,qa=function(O){return function(Y){return O.apply(null,Y)}}),qa}var Fa,ic;function Yf(){return ic||(ic=1,Fa=function(O){return typeof O=="object"&&O.isAxiosError===!0}),Fa}var rc=Qi,Qf=Su,ho=Kf,tp=Vu,ep=co();function nc(K){var O=new ho(K),L=Qf(ho.prototype.request,O);return rc.extend(L,ho.prototype,O),rc.extend(L,O),L.create=function(ut){return nc(tp(K,ut))},L}var Sr=nc(ep);Sr.Axios=ho,Sr.Cancel=uo(),Sr.CancelToken=Jf(),Sr.isCancel=Hu(),Sr.VERSION=Zu().version,Sr.all=function(O){return Promise.all(O)},Sr.spread=Gf(),Sr.isAxiosError=Yf(),ya.exports=Sr,ya.exports.default=Sr;var ip=ya.exports,rp=ip;const oc=_u(rp);var np=Object.defineProperty,ac=Object.getOwnPropertySymbols,op=Object.prototype.hasOwnProperty,ap=Object.prototype.propertyIsEnumerable,sc=(K,O,L)=>O in K?np(K,O,{enumerable:!0,configurable:!0,writable:!0,value:L}):K[O]=L,za=(K,O)=>{for(var L in O||(O={}))op.call(O,L)&&sc(K,L,O[L]);if(ac)for(var L of ac(O))ap.call(O,L)&&sc(K,L,O[L]);return K},ar=(K,O,L)=>new Promise((Y,ut)=>{var lt=y=>{try{_(L.next(y))}catch(x){ut(x)}},V=y=>{try{_(L.throw(y))}catch(x){ut(x)}},_=y=>y.done?Y(y.value):Promise.resolve(y.value).then(lt,V);_((L=L.apply(K,O)).next())});class sp{constructor(O,L){this.axios=O,this.errorHandler=L}get(O,L,Y){return ar(this,null,function*(){const ut=this.axios.get(O,{params:L});return this.handleResponse(ut,Y)})}listPaged(O,L){return ar(this,null,function*(){const Y=this.axios.get(O,{params:L});return this.handleResponse(Y)})}list(O,L){return ar(this,null,function*(){const Y=this.axios.get(O,{params:L});return this.handleResponse(Y)})}delete(O,L){return ar(this,null,function*(){const Y=this.axios.delete(O,{params:L});return this.handleResponse(Y)})}post(O,L,Y,ut){return ar(this,null,function*(){const lt=this.axios.post(O,L,za({params:Y},ut));return this.handleResponse(lt)})}postForm(O,L,Y){return ar(this,null,function*(){const ut=this.axios.post(O,L,{params:Y,headers:{"Content-Type":"multipart/form-data"}});return this.handleResponse(ut)})}patch(O,L,Y){return ar(this,null,function*(){const ut=this.axios.patch(O,L,{params:Y});return this.handleResponse(ut)})}put(O,L){return ar(this,null,function*(){const Y=this.axios.put(O,L);return this.handleResponse(Y)})}upload(O,L,Y){return ar(this,null,function*(){const ut=this.axios.post(O,L,za({},Y));return this.handleResponse(ut)})}getNonStandard(O,L){return ar(this,null,function*(){const Y=this.axios.get(O,L);try{const ut=yield Y;if(ut.status===200)return ut}catch(ut){throw this.handleError(ut)}})}postNonStandard(O,L,Y,ut){return ar(this,null,function*(){var lt,V;const _=yield this.axios.post(O,L,za({params:Y},ut));if(_.status===200)if((lt=_.data)!=null&&lt.code)(V=this.errorHandler)!=null&&V.onAppStatusError&&this.errorHandler.onAppStatusError(_.data.code,_.data.message);else return _.data})}handleResponse(O,L){return ar(this,null,function*(){try{const Y=yield O;return this.handleAppError(Y.data,L).data}catch(Y){throw this.handleError(Y)}})}handleAppError(O,L){var Y;if(O.code<200||O.code>=300)throw(Y=this.errorHandler)!=null&&Y.onAppStatusError?this.errorHandler.onAppStatusError(O.code,cp(O.code,O.message),L):console.error("未处理应用错误:",O),{isAxiosError:!1,message:O.message};return O}handleError(O){var L,Y;return O.response?(L=this.errorHandler)!=null&&L.onHttpStatusError&&(console.log("HTTP 错误",this.errorHandler),this.errorHandler.onHttpStatusError(O.response.status,"",O.response)):O.request?(console.log(O.request),(Y=this.errorHandler)!=null&&Y.onNetworkError&&this.errorHandler.onNetworkError()):console.error("axios request config error:",O),new Error(O.message)}}const up=K=>K>=10002&&K<=10012,cp=(K,O)=>up(K)?"数据操作错误":O||"未知接口错误";var lp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},uc={exports:{}},$a=(K,O)=>{if(O=Symbol[K])return O;throw Error("Symbol."+K+" is not defined")},vn=Math.pow,Ha=(K,O,L)=>new Promise((Y,ut)=>{var lt=y=>{try{_(L.next(y))}catch(x){ut(x)}},V=y=>{try{_(L.throw(y))}catch(x){ut(x)}},_=y=>y.done?Y(y.value):Promise.resolve(y.value).then(lt,V);_((L=L.apply(K,O)).next())}),hp=function(K,O){this[0]=K,this[1]=O},fp=K=>{var O=K[$a("asyncIterator")],L=!1,Y,ut={};return O==null?(O=K[$a("iterator")](),Y=lt=>ut[lt]=V=>O[lt](V)):(O=O.call(K),Y=lt=>ut[lt]=V=>{if(L){if(L=!1,lt==="throw")throw V;return V}return L=!0,{done:!1,value:new hp(new Promise(_=>{var y=O[lt](V);if(!(y instanceof Object))throw TypeError("Object expected");_(y)}),1)}}),ut[$a("iterator")]=()=>ut,Y("next"),"throw"in O?Y("throw"):ut.throw=lt=>{throw lt},"return"in O&&Y("return"),ut};/*! For license information please see minio-zj.js.LICENSE.txt */(function(K,O){(function(L,Y){K.exports=Y()})(lp,()=>(()=>{var L={9809:(V,_,y)=>{const x=_;x.bignum=y(4590),x.define=y(2500).define,x.base=y(1979),x.constants=y(6826),x.decoders=y(8307),x.encoders=y(6579)},2500:(V,_,y)=>{const x=y(6579),v=y(8307),m=y(5717);function S(a,p){this.name=a,this.body=p,this.decoders={},this.encoders={}}_.define=function(a,p){return new S(a,p)},S.prototype._createNamed=function(a){const p=this.name;function c(l){this._initNamed(l,p)}return m(c,a),c.prototype._initNamed=function(l,f){a.call(this,l,f)},new c(this)},S.prototype._getDecoder=function(a){return a=a||"der",this.decoders.hasOwnProperty(a)||(this.decoders[a]=this._createNamed(v[a])),this.decoders[a]},S.prototype.decode=function(a,p,c){return this._getDecoder(p).decode(a,c)},S.prototype._getEncoder=function(a){return a=a||"der",this.encoders.hasOwnProperty(a)||(this.encoders[a]=this._createNamed(x[a])),this.encoders[a]},S.prototype.encode=function(a,p,c){return this._getEncoder(p).encode(a,c)}},6625:(V,_,y)=>{const x=y(5717),v=y(8465).b,m=y(2399).Buffer;function S(p,c){v.call(this,c),m.isBuffer(p)?(this.base=p,this.offset=0,this.length=p.length):this.error("Input not Buffer")}function a(p,c){if(Array.isArray(p))this.length=0,this.value=p.map(function(l){return a.isEncoderBuffer(l)||(l=new a(l,c)),this.length+=l.length,l},this);else if(typeof p=="number"){if(!(0<=p&&p<=255))return c.error("non-byte EncoderBuffer value");this.value=p,this.length=1}else if(typeof p=="string")this.value=p,this.length=m.byteLength(p);else{if(!m.isBuffer(p))return c.error("Unsupported type: "+typeof p);this.value=p,this.length=p.length}}x(S,v),_.C=S,S.isDecoderBuffer=function(p){return p instanceof S||typeof p=="object"&&m.isBuffer(p.base)&&p.constructor.name==="DecoderBuffer"&&typeof p.offset=="number"&&typeof p.length=="number"&&typeof p.save=="function"&&typeof p.restore=="function"&&typeof p.isEmpty=="function"&&typeof p.readUInt8=="function"&&typeof p.skip=="function"&&typeof p.raw=="function"},S.prototype.save=function(){return{offset:this.offset,reporter:v.prototype.save.call(this)}},S.prototype.restore=function(p){const c=new S(this.base);return c.offset=p.offset,c.length=this.offset,this.offset=p.offset,v.prototype.restore.call(this,p.reporter),c},S.prototype.isEmpty=function(){return this.offset===this.length},S.prototype.readUInt8=function(p){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(p||"DecoderBuffer overrun")},S.prototype.skip=function(p,c){if(!(this.offset+p<=this.length))return this.error(c||"DecoderBuffer overrun");const l=new S(this.base);return l._reporterState=this._reporterState,l.offset=this.offset,l.length=this.offset+p,this.offset+=p,l},S.prototype.raw=function(p){return this.base.slice(p?p.offset:this.offset,this.length)},_.R=a,a.isEncoderBuffer=function(p){return p instanceof a||typeof p=="object"&&p.constructor.name==="EncoderBuffer"&&typeof p.length=="number"&&typeof p.join=="function"},a.prototype.join=function(p,c){return p||(p=m.alloc(this.length)),c||(c=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(l){l.join(p,c),c+=l.length}):(typeof this.value=="number"?p[c]=this.value:typeof this.value=="string"?p.write(this.value,c):m.isBuffer(this.value)&&this.value.copy(p,c),c+=this.length)),p}},1979:(V,_,y)=>{const x=_;x.Reporter=y(8465).b,x.DecoderBuffer=y(6625).C,x.EncoderBuffer=y(6625).R,x.Node=y(1949)},1949:(V,_,y)=>{const x=y(8465).b,v=y(6625).R,m=y(6625).C,S=y(9746),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],p=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(f,g,h){const u={};this._baseState=u,u.name=h,u.enc=f,u.parent=g||null,u.children=null,u.tag=null,u.args=null,u.reverseArgs=null,u.choice=null,u.optional=!1,u.any=!1,u.obj=!1,u.use=null,u.useDecoder=null,u.key=null,u.default=null,u.explicit=null,u.implicit=null,u.contains=null,u.parent||(u.children=[],this._wrap())}V.exports=c;const l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const f=this._baseState,g={};l.forEach(function(u){g[u]=f[u]});const h=new this.constructor(g.parent);return h._baseState=g,h},c.prototype._wrap=function(){const f=this._baseState;p.forEach(function(g){this[g]=function(){const h=new this.constructor(this);return f.children.push(h),h[g].apply(h,arguments)}},this)},c.prototype._init=function(f){const g=this._baseState;S(g.parent===null),f.call(this),g.children=g.children.filter(function(h){return h._baseState.parent===this},this),S.equal(g.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(f){const g=this._baseState,h=f.filter(function(u){return u instanceof this.constructor},this);f=f.filter(function(u){return!(u instanceof this.constructor)},this),h.length!==0&&(S(g.children===null),g.children=h,h.forEach(function(u){u._baseState.parent=this},this)),f.length!==0&&(S(g.args===null),g.args=f,g.reverseArgs=f.map(function(u){if(typeof u!="object"||u.constructor!==Object)return u;const w={};return Object.keys(u).forEach(function(b){b==(0|b)&&(b|=0);const E=u[b];w[E]=b}),w}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(f){c.prototype[f]=function(){const g=this._baseState;throw new Error(f+" not implemented for encoding: "+g.enc)}}),a.forEach(function(f){c.prototype[f]=function(){const g=this._baseState,h=Array.prototype.slice.call(arguments);return S(g.tag===null),g.tag=f,this._useArgs(h),this}}),c.prototype.use=function(f){S(f);const g=this._baseState;return S(g.use===null),g.use=f,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(f){const g=this._baseState;return S(g.default===null),g.default=f,g.optional=!0,this},c.prototype.explicit=function(f){const g=this._baseState;return S(g.explicit===null&&g.implicit===null),g.explicit=f,this},c.prototype.implicit=function(f){const g=this._baseState;return S(g.explicit===null&&g.implicit===null),g.implicit=f,this},c.prototype.obj=function(){const f=this._baseState,g=Array.prototype.slice.call(arguments);return f.obj=!0,g.length!==0&&this._useArgs(g),this},c.prototype.key=function(f){const g=this._baseState;return S(g.key===null),g.key=f,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(f){const g=this._baseState;return S(g.choice===null),g.choice=f,this._useArgs(Object.keys(f).map(function(h){return f[h]})),this},c.prototype.contains=function(f){const g=this._baseState;return S(g.use===null),g.contains=f,this},c.prototype._decode=function(f,g){const h=this._baseState;if(h.parent===null)return f.wrapResult(h.children[0]._decode(f,g));let u,w=h.default,b=!0,E=null;if(h.key!==null&&(E=f.enterKey(h.key)),h.optional){let I=null;if(h.explicit!==null?I=h.explicit:h.implicit!==null?I=h.implicit:h.tag!==null&&(I=h.tag),I!==null||h.any){if(b=this._peekTag(f,I,h.any),f.isError(b))return b}else{const M=f.save();try{h.choice===null?this._decodeGeneric(h.tag,f,g):this._decodeChoice(f,g),b=!0}catch{b=!1}f.restore(M)}}if(h.obj&&b&&(u=f.enterObject()),b){if(h.explicit!==null){const M=this._decodeTag(f,h.explicit);if(f.isError(M))return M;f=M}const I=f.offset;if(h.use===null&&h.choice===null){let M;h.any&&(M=f.save());const B=this._decodeTag(f,h.implicit!==null?h.implicit:h.tag,h.any);if(f.isError(B))return B;h.any?w=f.raw(M):f=B}if(g&&g.track&&h.tag!==null&&g.track(f.path(),I,f.length,"tagged"),g&&g.track&&h.tag!==null&&g.track(f.path(),f.offset,f.length,"content"),h.any||(w=h.choice===null?this._decodeGeneric(h.tag,f,g):this._decodeChoice(f,g)),f.isError(w))return w;if(h.any||h.choice!==null||h.children===null||h.children.forEach(function(M){M._decode(f,g)}),h.contains&&(h.tag==="octstr"||h.tag==="bitstr")){const M=new m(w);w=this._getUse(h.contains,f._reporterState.obj)._decode(M,g)}}return h.obj&&b&&(w=f.leaveObject(u)),h.key===null||w===null&&b!==!0?E!==null&&f.exitKey(E):f.leaveKey(E,h.key,w),w},c.prototype._decodeGeneric=function(f,g,h){const u=this._baseState;return f==="seq"||f==="set"?null:f==="seqof"||f==="setof"?this._decodeList(g,f,u.args[0],h):/str$/.test(f)?this._decodeStr(g,f,h):f==="objid"&&u.args?this._decodeObjid(g,u.args[0],u.args[1],h):f==="objid"?this._decodeObjid(g,null,null,h):f==="gentime"||f==="utctime"?this._decodeTime(g,f,h):f==="null_"?this._decodeNull(g,h):f==="bool"?this._decodeBool(g,h):f==="objDesc"?this._decodeStr(g,f,h):f==="int"||f==="enum"?this._decodeInt(g,u.args&&u.args[0],h):u.use!==null?this._getUse(u.use,g._reporterState.obj)._decode(g,h):g.error("unknown tag: "+f)},c.prototype._getUse=function(f,g){const h=this._baseState;return h.useDecoder=this._use(f,g),S(h.useDecoder._baseState.parent===null),h.useDecoder=h.useDecoder._baseState.children[0],h.implicit!==h.useDecoder._baseState.implicit&&(h.useDecoder=h.useDecoder.clone(),h.useDecoder._baseState.implicit=h.implicit),h.useDecoder},c.prototype._decodeChoice=function(f,g){const h=this._baseState;let u=null,w=!1;return Object.keys(h.choice).some(function(b){const E=f.save(),I=h.choice[b];try{const M=I._decode(f,g);if(f.isError(M))return!1;u={type:b,value:M},w=!0}catch{return f.restore(E),!1}return!0},this),w?u:f.error("Choice not matched")},c.prototype._createEncoderBuffer=function(f){return new v(f,this.reporter)},c.prototype._encode=function(f,g,h){const u=this._baseState;if(u.default!==null&&u.default===f)return;const w=this._encodeValue(f,g,h);return w===void 0||this._skipDefault(w,g,h)?void 0:w},c.prototype._encodeValue=function(f,g,h){const u=this._baseState;if(u.parent===null)return u.children[0]._encode(f,g||new x);let w=null;if(this.reporter=g,u.optional&&f===void 0){if(u.default===null)return;f=u.default}let b=null,E=!1;if(u.any)w=this._createEncoderBuffer(f);else if(u.choice)w=this._encodeChoice(f,g);else if(u.contains)b=this._getUse(u.contains,h)._encode(f,g),E=!0;else if(u.children)b=u.children.map(function(I){if(I._baseState.tag==="null_")return I._encode(null,g,f);if(I._baseState.key===null)return g.error("Child should have a key");const M=g.enterKey(I._baseState.key);if(typeof f!="object")return g.error("Child expected, but input is not object");const B=I._encode(f[I._baseState.key],g,f);return g.leaveKey(M),B},this).filter(function(I){return I}),b=this._createEncoderBuffer(b);else if(u.tag==="seqof"||u.tag==="setof"){if(!u.args||u.args.length!==1)return g.error("Too many args for : "+u.tag);if(!Array.isArray(f))return g.error("seqof/setof, but data is not Array");const I=this.clone();I._baseState.implicit=null,b=this._createEncoderBuffer(f.map(function(M){const B=this._baseState;return this._getUse(B.args[0],f)._encode(M,g)},I))}else u.use!==null?w=this._getUse(u.use,h)._encode(f,g):(b=this._encodePrimitive(u.tag,f),E=!0);if(!u.any&&u.choice===null){const I=u.implicit!==null?u.implicit:u.tag,M=u.implicit===null?"universal":"context";I===null?u.use===null&&g.error("Tag could be omitted only for .use()"):u.use===null&&(w=this._encodeComposite(I,E,M,b))}return u.explicit!==null&&(w=this._encodeComposite(u.explicit,!1,"context",w)),w},c.prototype._encodeChoice=function(f,g){const h=this._baseState,u=h.choice[f.type];return u||S(!1,f.type+" not found in "+JSON.stringify(Object.keys(h.choice))),u._encode(f.value,g)},c.prototype._encodePrimitive=function(f,g){const h=this._baseState;if(/str$/.test(f))return this._encodeStr(g,f);if(f==="objid"&&h.args)return this._encodeObjid(g,h.reverseArgs[0],h.args[1]);if(f==="objid")return this._encodeObjid(g,null,null);if(f==="gentime"||f==="utctime")return this._encodeTime(g,f);if(f==="null_")return this._encodeNull();if(f==="int"||f==="enum")return this._encodeInt(g,h.args&&h.reverseArgs[0]);if(f==="bool")return this._encodeBool(g);if(f==="objDesc")return this._encodeStr(g,f);throw new Error("Unsupported tag: "+f)},c.prototype._isNumstr=function(f){return/^[0-9 ]*$/.test(f)},c.prototype._isPrintstr=function(f){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(f)}},8465:(V,_,y)=>{const x=y(5717);function v(S){this._reporterState={obj:null,path:[],options:S||{},errors:[]}}function m(S,a){this.path=S,this.rethrow(a)}_.b=v,v.prototype.isError=function(S){return S instanceof m},v.prototype.save=function(){const S=this._reporterState;return{obj:S.obj,pathLen:S.path.length}},v.prototype.restore=function(S){const a=this._reporterState;a.obj=S.obj,a.path=a.path.slice(0,S.pathLen)},v.prototype.enterKey=function(S){return this._reporterState.path.push(S)},v.prototype.exitKey=function(S){const a=this._reporterState;a.path=a.path.slice(0,S-1)},v.prototype.leaveKey=function(S,a,p){const c=this._reporterState;this.exitKey(S),c.obj!==null&&(c.obj[a]=p)},v.prototype.path=function(){return this._reporterState.path.join("/")},v.prototype.enterObject=function(){const S=this._reporterState,a=S.obj;return S.obj={},a},v.prototype.leaveObject=function(S){const a=this._reporterState,p=a.obj;return a.obj=S,p},v.prototype.error=function(S){let a;const p=this._reporterState,c=S instanceof m;if(a=c?S:new m(p.path.map(function(l){return"["+JSON.stringify(l)+"]"}).join(""),S.message||S,S.stack),!p.options.partial)throw a;return c||p.errors.push(a),a},v.prototype.wrapResult=function(S){const a=this._reporterState;return a.options.partial?{result:this.isError(S)?null:S,errors:a.errors}:S},x(m,Error),m.prototype.rethrow=function(S){if(this.message=S+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,m),!this.stack)try{throw new Error(this.message)}catch(a){this.stack=a.stack}return this}},160:(V,_)=>{function y(x){const v={};return Object.keys(x).forEach(function(m){(0|m)==m&&(m|=0);const S=x[m];v[S]=m}),v}_.tagClass={0:"universal",1:"application",2:"context",3:"private"},_.tagClassByName=y(_.tagClass),_.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},_.tagByName=y(_.tag)},6826:(V,_,y)=>{const x=_;x._reverse=function(v){const m={};return Object.keys(v).forEach(function(S){(0|S)==S&&(S|=0);const a=v[S];m[a]=S}),m},x.der=y(160)},1671:(V,_,y)=>{const x=y(5717),v=y(4590),m=y(6625).C,S=y(1949),a=y(160);function p(g){this.enc="der",this.name=g.name,this.entity=g,this.tree=new c,this.tree._init(g.body)}function c(g){S.call(this,"der",g)}function l(g,h){let u=g.readUInt8(h);if(g.isError(u))return u;const w=a.tagClass[u>>6],b=(32&u)==0;if((31&u)==31){let E=u;for(u=0;(128&E)==128;){if(E=g.readUInt8(h),g.isError(E))return E;u<<=7,u|=127&E}}else u&=31;return{cls:w,primitive:b,tag:u,tagStr:a.tag[u]}}function f(g,h,u){let w=g.readUInt8(u);if(g.isError(w))return w;if(!h&&w===128)return null;if(!(128&w))return w;const b=127&w;if(b>4)return g.error("length octect is too long");w=0;for(let E=0;E<b;E++){w<<=8;const I=g.readUInt8(u);if(g.isError(I))return I;w|=I}return w}V.exports=p,p.prototype.decode=function(g,h){return m.isDecoderBuffer(g)||(g=new m(g,h)),this.tree._decode(g,h)},x(c,S),c.prototype._peekTag=function(g,h,u){if(g.isEmpty())return!1;const w=g.save(),b=l(g,'Failed to peek tag: "'+h+'"');return g.isError(b)?b:(g.restore(w),b.tag===h||b.tagStr===h||b.tagStr+"of"===h||u)},c.prototype._decodeTag=function(g,h,u){const w=l(g,'Failed to decode tag of "'+h+'"');if(g.isError(w))return w;let b=f(g,w.primitive,'Failed to get length of "'+h+'"');if(g.isError(b))return b;if(!u&&w.tag!==h&&w.tagStr!==h&&w.tagStr+"of"!==h)return g.error('Failed to match tag: "'+h+'"');if(w.primitive||b!==null)return g.skip(b,'Failed to match body of: "'+h+'"');const E=g.save(),I=this._skipUntilEnd(g,'Failed to skip indefinite length body: "'+this.tag+'"');return g.isError(I)?I:(b=g.offset-E.offset,g.restore(E),g.skip(b,'Failed to match body of: "'+h+'"'))},c.prototype._skipUntilEnd=function(g,h){for(;;){const u=l(g,h);if(g.isError(u))return u;const w=f(g,u.primitive,h);if(g.isError(w))return w;let b;if(b=u.primitive||w!==null?g.skip(w):this._skipUntilEnd(g,h),g.isError(b))return b;if(u.tagStr==="end")break}},c.prototype._decodeList=function(g,h,u,w){const b=[];for(;!g.isEmpty();){const E=this._peekTag(g,"end");if(g.isError(E))return E;const I=u.decode(g,"der",w);if(g.isError(I)&&E)break;b.push(I)}return b},c.prototype._decodeStr=function(g,h){if(h==="bitstr"){const u=g.readUInt8();return g.isError(u)?u:{unused:u,data:g.raw()}}if(h==="bmpstr"){const u=g.raw();if(u.length%2==1)return g.error("Decoding of string type: bmpstr length mismatch");let w="";for(let b=0;b<u.length/2;b++)w+=String.fromCharCode(u.readUInt16BE(2*b));return w}if(h==="numstr"){const u=g.raw().toString("ascii");return this._isNumstr(u)?u:g.error("Decoding of string type: numstr unsupported characters")}if(h==="octstr"||h==="objDesc")return g.raw();if(h==="printstr"){const u=g.raw().toString("ascii");return this._isPrintstr(u)?u:g.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(h)?g.raw().toString():g.error("Decoding of string type: "+h+" unsupported")},c.prototype._decodeObjid=function(g,h,u){let w;const b=[];let E=0,I=0;for(;!g.isEmpty();)I=g.readUInt8(),E<<=7,E|=127&I,!(128&I)&&(b.push(E),E=0);128&I&&b.push(E);const M=b[0]/40|0,B=b[0]%40;if(w=u?b:[M,B].concat(b.slice(1)),h){let P=h[w.join(" ")];P===void 0&&(P=h[w.join(".")]),P!==void 0&&(w=P)}return w},c.prototype._decodeTime=function(g,h){const u=g.raw().toString();let w,b,E,I,M,B;if(h==="gentime")w=0|u.slice(0,4),b=0|u.slice(4,6),E=0|u.slice(6,8),I=0|u.slice(8,10),M=0|u.slice(10,12),B=0|u.slice(12,14);else{if(h!=="utctime")return g.error("Decoding "+h+" time is not supported yet");w=0|u.slice(0,2),b=0|u.slice(2,4),E=0|u.slice(4,6),I=0|u.slice(6,8),M=0|u.slice(8,10),B=0|u.slice(10,12),w=w<70?2e3+w:1900+w}return Date.UTC(w,b-1,E,I,M,B,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(g){const h=g.readUInt8();return g.isError(h)?h:h!==0},c.prototype._decodeInt=function(g,h){const u=g.raw();let w=new v(u);return h&&(w=h[w.toString(10)]||w),w},c.prototype._use=function(g,h){return typeof g=="function"&&(g=g(h)),g._getDecoder("der").tree}},8307:(V,_,y)=>{const x=_;x.der=y(1671),x.pem=y(9631)},9631:(V,_,y)=>{const x=y(5717),v=y(2399).Buffer,m=y(1671);function S(a){m.call(this,a),this.enc="pem"}x(S,m),V.exports=S,S.prototype.decode=function(a,p){const c=a.toString().split(/[\r\n]+/g),l=p.label.toUpperCase(),f=/^-----(BEGIN|END) ([^-]+)-----$/;let g=-1,h=-1;for(let b=0;b<c.length;b++){const E=c[b].match(f);if(E!==null&&E[2]===l){if(g!==-1){if(E[1]!=="END")break;h=b;break}if(E[1]!=="BEGIN")break;g=b}}if(g===-1||h===-1)throw new Error("PEM section not found for: "+l);const u=c.slice(g+1,h).join("");u.replace(/[^a-z0-9+/=]+/gi,"");const w=v.from(u,"base64");return m.prototype.decode.call(this,w,p)}},6984:(V,_,y)=>{const x=y(5717),v=y(2399).Buffer,m=y(1949),S=y(160);function a(l){this.enc="der",this.name=l.name,this.entity=l,this.tree=new p,this.tree._init(l.body)}function p(l){m.call(this,"der",l)}function c(l){return l<10?"0"+l:l}V.exports=a,a.prototype.encode=function(l,f){return this.tree._encode(l,f).join()},x(p,m),p.prototype._encodeComposite=function(l,f,g,h){const u=function(E,I,M,B){let P;if(E==="seqof"?E="seq":E==="setof"&&(E="set"),S.tagByName.hasOwnProperty(E))P=S.tagByName[E];else{if(typeof E!="number"||(0|E)!==E)return B.error("Unknown tag: "+E);P=E}return P>=31?B.error("Multi-octet tag encoding unsupported"):(I||(P|=32),P|=S.tagClassByName[M||"universal"]<<6,P)}(l,f,g,this.reporter);if(h.length<128){const E=v.alloc(2);return E[0]=u,E[1]=h.length,this._createEncoderBuffer([E,h])}let w=1;for(let E=h.length;E>=256;E>>=8)w++;const b=v.alloc(2+w);b[0]=u,b[1]=128|w;for(let E=1+w,I=h.length;I>0;E--,I>>=8)b[E]=255&I;return this._createEncoderBuffer([b,h])},p.prototype._encodeStr=function(l,f){if(f==="bitstr")return this._createEncoderBuffer([0|l.unused,l.data]);if(f==="bmpstr"){const g=v.alloc(2*l.length);for(let h=0;h<l.length;h++)g.writeUInt16BE(l.charCodeAt(h),2*h);return this._createEncoderBuffer(g)}return f==="numstr"?this._isNumstr(l)?this._createEncoderBuffer(l):this.reporter.error("Encoding of string type: numstr supports only digits and space"):f==="printstr"?this._isPrintstr(l)?this._createEncoderBuffer(l):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(f)||f==="objDesc"?this._createEncoderBuffer(l):this.reporter.error("Encoding of string type: "+f+" unsupported")},p.prototype._encodeObjid=function(l,f,g){if(typeof l=="string"){if(!f)return this.reporter.error("string objid given, but no values map found");if(!f.hasOwnProperty(l))return this.reporter.error("objid not found in values map");l=f[l].split(/[\s.]+/g);for(let b=0;b<l.length;b++)l[b]|=0}else if(Array.isArray(l)){l=l.slice();for(let b=0;b<l.length;b++)l[b]|=0}if(!Array.isArray(l))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(l));if(!g){if(l[1]>=40)return this.reporter.error("Second objid identifier OOB");l.splice(0,2,40*l[0]+l[1])}let h=0;for(let b=0;b<l.length;b++){let E=l[b];for(h++;E>=128;E>>=7)h++}const u=v.alloc(h);let w=u.length-1;for(let b=l.length-1;b>=0;b--){let E=l[b];for(u[w--]=127&E;(E>>=7)>0;)u[w--]=128|127&E}return this._createEncoderBuffer(u)},p.prototype._encodeTime=function(l,f){let g;const h=new Date(l);return f==="gentime"?g=[c(h.getUTCFullYear()),c(h.getUTCMonth()+1),c(h.getUTCDate()),c(h.getUTCHours()),c(h.getUTCMinutes()),c(h.getUTCSeconds()),"Z"].join(""):f==="utctime"?g=[c(h.getUTCFullYear()%100),c(h.getUTCMonth()+1),c(h.getUTCDate()),c(h.getUTCHours()),c(h.getUTCMinutes()),c(h.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+f+" time is not supported yet"),this._encodeStr(g,"octstr")},p.prototype._encodeNull=function(){return this._createEncoderBuffer("")},p.prototype._encodeInt=function(l,f){if(typeof l=="string"){if(!f)return this.reporter.error("String int or enum given, but no values map");if(!f.hasOwnProperty(l))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(l));l=f[l]}if(typeof l!="number"&&!v.isBuffer(l)){const u=l.toArray();!l.sign&&128&u[0]&&u.unshift(0),l=v.from(u)}if(v.isBuffer(l)){let u=l.length;l.length===0&&u++;const w=v.alloc(u);return l.copy(w),l.length===0&&(w[0]=0),this._createEncoderBuffer(w)}if(l<128)return this._createEncoderBuffer(l);if(l<256)return this._createEncoderBuffer([0,l]);let g=1;for(let u=l;u>=256;u>>=8)g++;const h=new Array(g);for(let u=h.length-1;u>=0;u--)h[u]=255&l,l>>=8;return 128&h[0]&&h.unshift(0),this._createEncoderBuffer(v.from(h))},p.prototype._encodeBool=function(l){return this._createEncoderBuffer(l?255:0)},p.prototype._use=function(l,f){return typeof l=="function"&&(l=l(f)),l._getEncoder("der").tree},p.prototype._skipDefault=function(l,f,g){const h=this._baseState;let u;if(h.default===null)return!1;const w=l.join();if(h.defaultBuffer===void 0&&(h.defaultBuffer=this._encodeValue(h.default,f,g).join()),w.length!==h.defaultBuffer.length)return!1;for(u=0;u<w.length;u++)if(w[u]!==h.defaultBuffer[u])return!1;return!0}},6579:(V,_,y)=>{const x=_;x.der=y(6984),x.pem=y(2883)},2883:(V,_,y)=>{const x=y(5717),v=y(6984);function m(S){v.call(this,S),this.enc="pem"}x(m,v),V.exports=m,m.prototype.encode=function(S,a){const p=v.pr