@openc3/js-common 5.21.0-beta0
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/LICENSE.txt +729 -0
- package/README.md +25 -0
- package/dist/services.cjs +9 -0
- package/dist/services.cjs.map +1 -0
- package/dist/services.js +2747 -0
- package/dist/services.js.map +1 -0
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.js +8 -0
- package/dist/utils.js.map +1 -0
- package/package.json +64 -0
- package/viteDevServerPlugin.mjs +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
## OpenC3 JS Common Javascript Library
|
|
2
|
+
|
|
3
|
+
[Documentation](https://openc3.com)
|
|
4
|
+
|
|
5
|
+
This package contains library code for all COSMOS frontend development across stacks and frameworks
|
|
6
|
+
|
|
7
|
+
## Contributing
|
|
8
|
+
|
|
9
|
+
We encourage you to contribute to OpenC3!
|
|
10
|
+
|
|
11
|
+
Contributing is easy.
|
|
12
|
+
|
|
13
|
+
1. Fork the project
|
|
14
|
+
2. Create a feature branch
|
|
15
|
+
3. Make your changes
|
|
16
|
+
4. Submit a pull request
|
|
17
|
+
|
|
18
|
+
Before any contributions can be incorporated we do require all contributors to sign a Contributor License Agreement here:
|
|
19
|
+
[Contributor License Agreement](https://docs.google.com/forms/d/1ppnHUSXtY1GRTNPIyUaB1OYHbW5Ca67GFMgMRPBG8u0/viewform)
|
|
20
|
+
|
|
21
|
+
This protects both you and us and you retain full rights to any code you write.
|
|
22
|
+
|
|
23
|
+
## License
|
|
24
|
+
|
|
25
|
+
This OpenC3 plugin is released under the AGPLv3.0 with a few addendums. See [LICENSE.txt](LICENSE.txt)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";var pt=Object.defineProperty;var mt=(t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var P=(t,e,n)=>mt(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function $e(t,e){return function(){return t.apply(e,arguments)}}const{toString:gt}=Object.prototype,{getPrototypeOf:we}=Object,Z=(t=>e=>{const n=gt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),C=t=>(t=t.toLowerCase(),e=>Z(e)===t),ee=t=>e=>typeof e===t,{isArray:B}=Array,H=ee("undefined");function _t(t){return t!==null&&!H(t)&&t.constructor!==null&&!H(t.constructor)&&O(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ze=C("ArrayBuffer");function bt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ze(t.buffer),e}const yt=ee("string"),O=ee("function"),We=ee("number"),te=t=>t!==null&&typeof t=="object",wt=t=>t===!0||t===!1,G=t=>{if(Z(t)!=="object")return!1;const e=we(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},St=C("Date"),Et=C("File"),At=C("Blob"),Rt=C("FileList"),xt=t=>te(t)&&O(t.pipe),Tt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||O(t.append)&&((e=Z(t))==="formdata"||e==="object"&&O(t.toString)&&t.toString()==="[object FormData]"))},Ot=C("URLSearchParams"),[Ct,kt,Nt,Pt]=["ReadableStream","Request","Response","Headers"].map(C),Dt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),B(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let c;for(r=0;r<o;r++)c=i[r],e.call(null,t[c],c,t)}}function Ve(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Je=t=>!H(t)&&t!==L;function ue(){const{caseless:t}=Je(this)&&this||{},e={},n=(r,s)=>{const i=t&&Ve(e,s)||s;G(e[i])&&G(r)?e[i]=ue(e[i],r):G(r)?e[i]=ue({},r):B(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&$(arguments[r],n);return e}const Ft=(t,e,n,{allOwnKeys:r}={})=>($(e,(s,i)=>{n&&O(s)?t[i]=$e(s,n):t[i]=s},{allOwnKeys:r}),t),Lt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),jt=(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)},vt=(t,e,n,r)=>{let s,i,o;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!c[o]&&(e[o]=t[o],c[o]=!0);t=n!==!1&&we(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Bt=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Ut=t=>{if(!t)return null;if(B(t))return t;let e=t.length;if(!We(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},It=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&we(Uint8Array)),qt=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Mt=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Ht=C("HTMLFormElement"),$t=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Oe=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),zt=C("RegExp"),Ge=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};$(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},Wt=t=>{Ge(t,(e,n)=>{if(O(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(O(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Vt=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return B(t)?r(t):r(String(t).split(e)),n},Jt=()=>{},Gt=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,oe="abcdefghijklmnopqrstuvwxyz",Ce="0123456789",Ke={DIGIT:Ce,ALPHA:oe,ALPHA_DIGIT:oe+oe.toUpperCase()+Ce},Kt=(t=16,e=Ke.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Xt(t){return!!(t&&O(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Qt=t=>{const e=new Array(10),n=(r,s)=>{if(te(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=B(r)?[]:{};return $(r,(o,c)=>{const f=n(o,s+1);!H(f)&&(i[c]=f)}),e[s]=void 0,i}}return r};return n(t,0)},Yt=C("AsyncFunction"),Zt=t=>t&&(te(t)||O(t))&&O(t.then)&&O(t.catch),Xe=((t,e)=>t?setImmediate:e?((n,r)=>(L.addEventListener("message",({source:s,data:i})=>{s===L&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),L.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",O(L.postMessage)),en=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Xe,a={isArray:B,isArrayBuffer:ze,isBuffer:_t,isFormData:Tt,isArrayBufferView:bt,isString:yt,isNumber:We,isBoolean:wt,isObject:te,isPlainObject:G,isReadableStream:Ct,isRequest:kt,isResponse:Nt,isHeaders:Pt,isUndefined:H,isDate:St,isFile:Et,isBlob:At,isRegExp:zt,isFunction:O,isStream:xt,isURLSearchParams:Ot,isTypedArray:It,isFileList:Rt,forEach:$,merge:ue,extend:Ft,trim:Dt,stripBOM:Lt,inherits:jt,toFlatObject:vt,kindOf:Z,kindOfTest:C,endsWith:Bt,toArray:Ut,forEachEntry:qt,matchAll:Mt,isHTMLForm:Ht,hasOwnProperty:Oe,hasOwnProp:Oe,reduceDescriptors:Ge,freezeMethods:Wt,toObjectSet:Vt,toCamelCase:$t,noop:Jt,toFiniteNumber:Gt,findKey:Ve,global:L,isContextDefined:Je,ALPHABET:Ke,generateString:Kt,isSpecCompliantForm:Xt,toJSONObject:Qt,isAsyncFn:Yt,isThenable:Zt,setImmediate:Xe,asap:en};function g(t,e,n,r,s){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),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(g,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:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Qe=g.prototype,Ye={};["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=>{Ye[t]={value:t}});Object.defineProperties(g,Ye);Object.defineProperty(Qe,"isAxiosError",{value:!0});g.from=(t,e,n,r,s,i)=>{const o=Object.create(Qe);return a.toFlatObject(t,o,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),g.call(o,t.message,e,n,r,s),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const tn=null;function fe(t){return a.isPlainObject(t)||a.isArray(t)}function Ze(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function ke(t,e,n){return t?t.concat(e).map(function(s,i){return s=Ze(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function nn(t){return a.isArray(t)&&!t.some(fe)}const rn=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||l,i=n.dots,o=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(!f&&a.isBlob(d))throw new g("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,m,p){let b=d;if(d&&!p&&typeof d=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&nn(d)||(a.isFileList(d)||a.endsWith(m,"[]"))&&(b=a.toArray(d)))return m=Ze(m),b.forEach(function(A,k){!(a.isUndefined(A)||A===null)&&e.append(o===!0?ke([m],k,i):o===null?m:m+"[]",u(A))}),!1}return fe(d)?!0:(e.append(ke(p,m,i),u(d)),!1)}const h=[],_=Object.assign(rn,{defaultVisitor:l,convertValue:u,isVisitable:fe});function y(d,m){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(d),a.forEach(d,function(b,w){(!(a.isUndefined(b)||b===null)&&s.call(e,b,a.isString(w)?w.trim():w,m,_))===!0&&y(b,m?m.concat(w):[w])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return y(t),e}function Ne(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Se(t,e){this._pairs=[],t&&ne(t,this,e)}const et=Se.prototype;et.append=function(e,n){this._pairs.push([e,n])};et.toString=function(e){const n=e?function(r){return e.call(this,r,Ne)}:Ne;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function sn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tt(t,e,n){if(!e)return t;const r=n&&n.encode||sn,s=n&&n.serialize;let i;if(s?i=s(e,n):i=a.isURLSearchParams(e)?e.toString():new Se(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Pe{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}}const nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},on=typeof URLSearchParams<"u"?URLSearchParams:Se,cn=typeof FormData<"u"?FormData:null,an=typeof Blob<"u"?Blob:null,ln={isBrowser:!0,classes:{URLSearchParams:on,FormData:cn,Blob:an},protocols:["http","https","file","blob","url","data"]},Ee=typeof window<"u"&&typeof document<"u",de=typeof navigator=="object"&&navigator||void 0,un=Ee&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),fn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dn=Ee&&window.location.href||"http://localhost",hn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ee,hasStandardBrowserEnv:un,hasStandardBrowserWebWorkerEnv:fn,navigator:de,origin:dn},Symbol.toStringTag,{value:"Module"})),x={...hn,...ln};function pn(t,e){return ne(t,new x.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return x.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function mn(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function gn(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function rt(t){function e(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),f=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,f?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=gn(s[o])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,s)=>{e(mn(r),s,n,0)}),n}return null}function _n(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const z={transitional:nt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(e);if(i&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(rt(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pn(e,this.formSerializer).toString();if((c=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ne(c?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),_n(e)):e}],transformResponse:[function(e){const n=this.transitional||z.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(o)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{z.headers[t]={}});const bn=a.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"]),yn=t=>{const e={};let n,r,s;return t&&t.split(`
|
|
2
|
+
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||e[n]&&bn[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},De=Symbol("internals");function I(t){return t&&String(t).trim().toLowerCase()}function K(t){return t===!1||t==null?t:a.isArray(t)?t.map(K):String(t)}function wn(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}const Sn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ce(t,e,n,r,s){if(a.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function En(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function An(t,e){const n=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}class T{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function i(c,f,u){const l=I(f);if(!l)throw new Error("header name must be a non-empty string");const h=a.findKey(s,l);(!h||s[h]===void 0||u===!0||u===void 0&&s[h]!==!1)&&(s[h||f]=K(c))}const o=(c,f)=>a.forEach(c,(u,l)=>i(u,l,f));if(a.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(a.isString(e)&&(e=e.trim())&&!Sn(e))o(yn(e),n);else if(a.isHeaders(e))for(const[c,f]of e.entries())i(f,c,r);else e!=null&&i(n,e,r);return this}get(e,n){if(e=I(e),e){const r=a.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return wn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=I(e),e){const r=a.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ce(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(o){if(o=I(o),o){const c=a.findKey(r,o);c&&(!n||ce(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(e)?e.forEach(i):i(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!e||ce(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=K(s),delete n[i];return}const c=e?En(i):String(i).trim();c!==i&&delete n[i],n[c]=K(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
3
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[De]=this[De]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=I(o);r[c]||(An(s,o),r[c]=!0)}return a.isArray(e)?e.forEach(i):i(e),this}}T.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(T.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});a.freezeMethods(T);function ae(t,e){const n=this||z,r=e||n,s=T.from(r.headers);let i=r.data;return a.forEach(t,function(c){i=c.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function st(t){return!!(t&&t.__CANCEL__)}function U(t,e,n){g.call(this,t??"canceled",g.ERR_CANCELED,e,n),this.name="CanceledError"}a.inherits(U,g,{__CANCEL__:!0});function it(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new g("Request failed with status code "+n.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Rn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function xn(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(f){const u=Date.now(),l=r[i];o||(o=u),n[s]=f,r[s]=u;let h=i,_=0;for(;h!==s;)_+=n[h++],h=h%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),u-o<e)return;const y=l&&u-l;return y?Math.round(_*1e3/y):void 0}}function Tn(t,e){let n=0,r=1e3/e,s,i;const o=(u,l=Date.now())=>{n=l,s=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{const l=Date.now(),h=l-n;h>=r?o(u,l):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const Q=(t,e,n=3)=>{let r=0;const s=xn(50,250);return Tn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,f=o-r,u=s(f),l=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:f,rate:u||void 0,estimated:u&&c&&l?(c-o)/u:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(h)},n)},Fe=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Le=t=>(...e)=>a.asap(()=>t(...e)),On=x.hasStandardBrowserEnv?function(){const e=x.navigator&&/(msie|trident)/i.test(x.navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const c=a.isString(o)?s(o):o;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Cn=x.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const o=[t+"="+encodeURIComponent(e)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(r)&&o.push("path="+r),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Nn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ot(t,e){return t&&!kn(e)?Nn(t,e):e}const je=t=>t instanceof T?{...t}:t;function v(t,e){e=e||{};const n={};function r(u,l,h){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:h},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(u,l,h){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u,h)}else return r(u,l,h)}function i(u,l){if(!a.isUndefined(l))return r(void 0,l)}function o(u,l){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function c(u,l,h){if(h in e)return r(u,l);if(h in t)return r(void 0,u)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(u,l)=>s(je(u),je(l),!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(l){const h=f[l]||s,_=h(t[l],e[l],l);a.isUndefined(_)&&h!==c||(n[l]=_)}),n}const ct=t=>{const e=v({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=e;e.headers=o=T.from(o),e.url=tt(ot(e.baseURL,e.url),t.params,t.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(a.isFormData(n)){if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((f=o.getContentType())!==!1){const[u,...l]=f?f.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...l].join("; "))}}if(x.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(e)),r||r!==!1&&On(e.url))){const u=s&&i&&Cn.read(i);u&&o.set(s,u)}return e},Pn=typeof XMLHttpRequest<"u",Dn=Pn&&function(t){return new Promise(function(n,r){const s=ct(t);let i=s.data;const o=T.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:u}=s,l,h,_,y,d;function m(){y&&y(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function b(){if(!p)return;const A=T.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),R={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:A,config:t,request:p};it(function(F){n(F),m()},function(F){r(F),m()},R),p=null}"onloadend"in p?p.onloadend=b:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(b)},p.onabort=function(){p&&(r(new g("Request aborted",g.ECONNABORTED,t,p)),p=null)},p.onerror=function(){r(new g("Network Error",g.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||nt;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),r(new g(k,R.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&a.forEach(o.toJSON(),function(k,R){p.setRequestHeader(R,k)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),u&&([_,d]=Q(u,!0),p.addEventListener("progress",_)),f&&p.upload&&([h,y]=Q(f),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(l=A=>{p&&(r(!A||A.type?new U(null,t,p):A),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const w=Rn(s.url);if(w&&x.protocols.indexOf(w)===-1){r(new g("Unsupported protocol "+w+":",g.ERR_BAD_REQUEST,t));return}p.send(i||null)})},Fn=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,c();const l=u instanceof Error?u:this.reason;r.abort(l instanceof g?l:new U(l instanceof Error?l.message:l))}};let o=e&&setTimeout(()=>{o=null,i(new g(`timeout ${e} of ms exceeded`,g.ETIMEDOUT))},e);const c=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:f}=r;return f.unsubscribe=()=>a.asap(c),f}},Ln=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},jn=async function*(t,e){for await(const n of vn(t))yield*Ln(n,e)},vn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},ve=(t,e,n,r)=>{const s=jn(t,e);let i=0,o,c=f=>{o||(o=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:u,value:l}=await s.next();if(u){c(),f.close();return}let h=l.byteLength;if(n){let _=i+=h;n(_)}f.enqueue(new Uint8Array(l))}catch(u){throw c(u),u}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",at=re&&typeof ReadableStream=="function",Bn=re&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),lt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Un=at&<(()=>{let t=!1;const e=new Request(x.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Be=64*1024,he=at&<(()=>a.isReadableStream(new Response("").body)),Y={stream:he&&(t=>t.body)};re&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Y[e]&&(Y[e]=a.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new g(`Response type '${e}' is not supported`,g.ERR_NOT_SUPPORT,r)})})})(new Response);const In=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(x.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await Bn(t)).byteLength},qn=async(t,e)=>{const n=a.toFiniteNumber(t.getContentLength());return n??In(e)},Mn=re&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:f,responseType:u,headers:l,withCredentials:h="same-origin",fetchOptions:_}=ct(t);u=u?(u+"").toLowerCase():"text";let y=Fn([s,i&&i.toAbortSignal()],o),d;const m=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let p;try{if(f&&Un&&n!=="get"&&n!=="head"&&(p=await qn(l,r))!==0){let R=new Request(e,{method:"POST",body:r,duplex:"half"}),N;if(a.isFormData(r)&&(N=R.headers.get("content-type"))&&l.setContentType(N),R.body){const[F,W]=Fe(p,Q(Le(f)));r=ve(R.body,Be,F,W)}}a.isString(h)||(h=h?"include":"omit");const b="credentials"in Request.prototype;d=new Request(e,{..._,signal:y,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:b?h:void 0});let w=await fetch(d);const A=he&&(u==="stream"||u==="response");if(he&&(c||A&&m)){const R={};["status","statusText","headers"].forEach(Te=>{R[Te]=w[Te]});const N=a.toFiniteNumber(w.headers.get("content-length")),[F,W]=c&&Fe(N,Q(Le(c),!0))||[];w=new Response(ve(w.body,Be,F,()=>{W&&W(),m&&m()}),R)}u=u||"text";let k=await Y[a.findKey(Y,u)||"text"](w,t);return!A&&m&&m(),await new Promise((R,N)=>{it(R,N,{data:k,headers:T.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:d})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,t,d),{cause:b.cause||b}):g.from(b,b&&b.code,t,d)}}),pe={http:tn,xhr:Dn,fetch:Mn};a.forEach(pe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ue=t=>`- ${t}`,Hn=t=>a.isFunction(t)||t===null||t===!1,ut={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let i=0;i<e;i++){n=t[i];let o;if(r=n,!Hn(n)&&(r=pe[(o=String(n)).toLowerCase()],r===void 0))throw new g(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
|
|
4
|
+
`+i.map(Ue).join(`
|
|
5
|
+
`):" "+Ue(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:pe};function le(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new U(null,t)}function Ie(t){return le(t),t.headers=T.from(t.headers),t.data=ae.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ut.getAdapter(t.adapter||z.adapter)(t).then(function(r){return le(t),r.data=ae.call(t,t.transformResponse,r),r.headers=T.from(r.headers),r},function(r){return st(r)||(le(t),r&&r.response&&(r.response.data=ae.call(t,t.transformResponse,r.response),r.response.headers=T.from(r.response.headers))),Promise.reject(r)})}const ft="1.7.7",Ae={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ae[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const qe={};Ae.transitional=function(e,n,r){function s(i,o){return"[Axios v"+ft+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(e===!1)throw new g(s(o," has been removed"+(n?" in "+n:"")),g.ERR_DEPRECATED);return n&&!qe[o]&&(qe[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,c):!0}};function $n(t,e,n){if(typeof t!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const c=t[i],f=c===void 0||o(c,i,t);if(f!==!0)throw new g("option "+i+" must be "+f,g.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new g("Unknown option "+i,g.ERR_BAD_OPTION)}}const me={assertOptions:$n,validators:Ae},D=me.validators;class j{constructor(e){this.defaults=e,this.interceptors={request:new Pe,response:new Pe}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=v(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&me.assertOptions(r,{silentJSONParsing:D.transitional(D.boolean),forcedJSONParsing:D.transitional(D.boolean),clarifyTimeoutError:D.transitional(D.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:me.assertOptions(s,{encode:D.function,serialize:D.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=T.concat(o,i);const c=[];let f=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(f=f&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let l,h=0,_;if(!f){const d=[Ie.bind(this),void 0];for(d.unshift.apply(d,c),d.push.apply(d,u),_=d.length,l=Promise.resolve(n);h<_;)l=l.then(d[h++],d[h++]);return l}_=c.length;let y=n;for(h=0;h<_;){const d=c[h++],m=c[h++];try{y=d(y)}catch(p){m.call(this,p);break}}try{l=Ie.call(this,y)}catch(d){return Promise.reject(d)}for(h=0,_=u.length;h<_;)l=l.then(u[h++],u[h++]);return l}getUri(e){e=v(this.defaults,e);const n=ot(e.baseURL,e.url);return tt(n,e.params,e.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(e){j.prototype[e]=function(n,r){return this.request(v(r||{},{method:e,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(e){function n(r){return function(i,o,c){return this.request(v(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}j.prototype[e]=n(),j.prototype[e+"Form"]=n(!0)});class Re{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},e(function(i,o,c){r.reason||(r.reason=new U(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Re(function(s){e=s}),cancel:e}}}function zn(t){return function(n){return t.apply(null,n)}}function Wn(t){return a.isObject(t)&&t.isAxiosError===!0}const ge={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};Object.entries(ge).forEach(([t,e])=>{ge[e]=t});function dt(t){const e=new j(t),n=$e(j.prototype.request,e);return a.extend(n,j.prototype,e,{allOwnKeys:!0}),a.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return dt(v(t,s))},n}const E=dt(z);E.Axios=j;E.CanceledError=U;E.CancelToken=Re;E.isCancel=st;E.VERSION=ft;E.toFormData=ne;E.AxiosError=g;E.Cancel=E.CanceledError;E.all=function(e){return Promise.all(e)};E.spread=zn;E.isAxiosError=Wn;E.mergeConfig=v;E.AxiosHeaders=T;E.formToJSON=t=>rt(a.isHTMLForm(t)?new FormData(t):t);E.getAdapter=ut.getAdapter;E.HttpStatusCode=ge;E.default=E;const se=E.create({baseURL:location.origin,timeout:6e4,params:{}});se.interceptors.response.use(t=>t,t=>{var e,n,r,s,i,o,c,f,u,l,h;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(d){d&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let _=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(_+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(_+=`${t.response.config.data} `),(i=(s=t.response)==null?void 0:s.data)!=null&&i.message?_+=`${t.response.data.message}`:(c=(o=t.response)==null?void 0:o.data)!=null&&c.exception?_+=`${t.response.data.exception}`:(l=(u=(f=t.response)==null?void 0:f.data)==null?void 0:u.error)!=null&&l.message?(t.response.data.error.class&&(_+=`${t.response.data.error.class} `),_+=`${t.response.data.error.message}`):_+=`${(h=t.response)==null?void 0:h.data}`;const{$cosmosNotify:y}=window;throw y&&y.serious({title:"Network error",body:_}),t}else throw t});const V=async function(t,e,{data:n,params:r={},headers:s,noAuth:i=!1,noScope:o=!1,onUploadProgress:c=!1}={}){if(!i){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}s.Authorization=localStorage.openc3Token}return s.manual=!0,!o&&!r.scope&&(r.scope=window.openc3Scope),se({method:t,url:e,data:n,params:r,headers:s,onUploadProgress:c})},_e={Accept:"application/json"},Me={..._e,"Content-Type":"application/json"},Vn={get:function(t,{params:e,headers:n=_e,noScope:r,noAuth:s,onUploadProgress:i}={}){return V("get",t,{params:e,headers:n,noScope:r,noAuth:s,onUploadProgress:i})},put:function(t,{data:e,params:n,headers:r=Me,noScope:s,noAuth:i,onUploadProgress:o}={}){return V("put",t,{data:e,params:n,headers:r,noScope:s,noAuth:i,onUploadProgress:o})},post:function(t,{data:e,params:n,headers:r=Me,noScope:s,noAuth:i,onUploadProgress:o}={}){return V("post",t,{data:e,params:n,headers:r,noScope:s,noAuth:i,onUploadProgress:o})},delete:function(t,{params:e,headers:n=_e,noScope:r,noAuth:s,onUploadProgress:i}={}){return V("delete",t,{params:e,headers:n,noScope:r,noAuth:s,onUploadProgress:i})}};var X={logger:typeof console<"u"?console:void 0,WebSocket:typeof WebSocket<"u"?WebSocket:void 0},S={log(...t){this.enabled&&(t.push(Date.now()),X.logger.log("[ActionCable]",...t))}};const M=()=>new Date().getTime(),J=t=>(M()-t)/1e3;class ie{constructor(e){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=M(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),S.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=M(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),S.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=M()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,S.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=M(),S.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){const{staleThreshold:e,reconnectionBackoffRate:n}=this.constructor,r=Math.pow(1+n,Math.min(this.reconnectAttempts,10)),i=(this.reconnectAttempts===0?1:n)*Math.random();return e*1e3*r*(1+i)}reconnectIfStale(){this.connectionIsStale()&&(S.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${J(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?S.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${J(this.disconnectedAt)} s`):(S.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return J(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&J(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){document.visibilityState==="visible"&&setTimeout(()=>{(this.connectionIsStale()||!this.connection.isOpen())&&(S.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())},200)}}ie.staleThreshold=6;ie.reconnectionBackoffRate=.15;var ht={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:q,protocols:be}=ht,Jn=be.slice(0,be.length-1),He=[].indexOf;class xe{constructor(e){this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new ie(this),this.disconnected=!0}send(e){return this.isOpen()?(this.webSocket.send(JSON.stringify(e)),!0):!1}open(){if(this.isActive())return S.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{const e=[...be,...this.consumer.subprotocols||[]];return S.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${e}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new X.WebSocket(this.consumer.url,e),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:e}={allowReconnect:!0}){if(e||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(S.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(e){S.log("Failed to reopen WebSocket",e)}finally{S.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return He.call(Jn,this.getProtocol())>=0}isState(...e){return He.call(e,this.getState())>=0}getState(){if(this.webSocket){for(let e in X.WebSocket)if(X.WebSocket[e]===this.webSocket.readyState)return e.toLowerCase()}return null}installEventHandlers(){for(let e in this.events){const n=this.events[e].bind(this);this.webSocket[`on${e}`]=n}}uninstallEventHandlers(){for(let e in this.events)this.webSocket[`on${e}`]=function(){}}}xe.reopenDelay=500;xe.prototype.events={message(t){if(!this.isProtocolSupported())return;const{identifier:e,message:n,reason:r,reconnect:s,type:i}=JSON.parse(t.data);switch(i){case q.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case q.disconnect:return S.log(`Disconnecting. Reason: ${r}`),this.close({allowReconnect:s});case q.ping:return this.monitor.recordPing();case q.confirmation:return this.subscriptions.confirmSubscription(e),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(e,"connected",{reconnected:!0})):this.subscriptions.notify(e,"connected",{reconnected:!1});case q.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open(){if(S.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return S.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(t){if(S.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){S.log("WebSocket onerror event")}};const Gn=function(t,e){if(e!=null)for(let n in e){const r=e[n];t[n]=r}return t};class Kn{constructor(e,n={},r){this.consumer=e,this.identifier=JSON.stringify(n),Gn(this,r)}perform(e,n={}){return n.action=e,this.send(n)}send(e){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(e)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class Xn{constructor(e){this.subscriptions=e,this.pendingSubscriptions=[]}guarantee(e){this.pendingSubscriptions.indexOf(e)==-1?(S.log(`SubscriptionGuarantor guaranteeing ${e.identifier}`),this.pendingSubscriptions.push(e)):S.log(`SubscriptionGuarantor already guaranteeing ${e.identifier}`),this.startGuaranteeing()}forget(e){S.log(`SubscriptionGuarantor forgetting ${e.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter(n=>n!==e)}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout(()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map(e=>{S.log(`SubscriptionGuarantor resubscribing ${e.identifier}`),this.subscriptions.subscribe(e)})},500)}}class Qn{constructor(e){this.consumer=e,this.guarantor=new Xn(this),this.subscriptions=[]}create(e,n){const r=e,s=typeof r=="object"?r:{channel:r},i=new Kn(this.consumer,s,n);return this.add(i)}add(e){return this.subscriptions.push(e),this.consumer.ensureActiveConnection(),this.notify(e,"initialized"),this.subscribe(e),e}remove(e){return this.forget(e),this.findAll(e.identifier).length||this.sendCommand(e,"unsubscribe"),e}reject(e){return this.findAll(e).map(n=>(this.forget(n),this.notify(n,"rejected"),n))}forget(e){return this.guarantor.forget(e),this.subscriptions=this.subscriptions.filter(n=>n!==e),e}findAll(e){return this.subscriptions.filter(n=>n.identifier===e)}reload(){return this.subscriptions.map(e=>this.subscribe(e))}notifyAll(e,...n){return this.subscriptions.map(r=>this.notify(r,e,...n))}notify(e,n,...r){let s;return typeof e=="string"?s=this.findAll(e):s=[e],s.map(i=>typeof i[n]=="function"?i[n](...r):void 0)}subscribe(e){this.sendCommand(e,"subscribe")&&this.guarantor.guarantee(e)}confirmSubscription(e){S.log(`Subscription confirmed ${e}`),this.findAll(e).map(n=>this.guarantor.forget(n))}sendCommand(e,n){const{identifier:r}=e;return this.consumer.send({command:n,identifier:r})}}class Yn{constructor(e){this._url=e,this.subscriptions=new Qn(this),this.connection=new xe(this),this.subprotocols=[]}get url(){return Zn(this._url)}send(e){return this.connection.send(e)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(e){this.subprotocols=[...this.subprotocols,e]}}function Zn(t){if(typeof t=="function"&&(t=t()),t&&!/^wss?:/i.test(t)){const e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}else return t}function er(t=tr("url")||ht.default_mount_path){return new Yn(t)}function tr(t){const e=document.head.querySelector(`meta[name='action-cable-${t}']`);if(e)return e.getAttribute("content")}ie.staleThreshold=10;class nr{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&this._cable.disconnect()}createSubscription(e,n,r={},s={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{if(i&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);this._cable=er(o)}return this._cable.subscriptions.create({channel:e,...s},r)})}recordPing(){this._cable.connection.monitor.recordPing()}}class ye{constructor(e,n,r="",s=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=n,this.usage=r,this.url=s}}class rr{constructor(){P(this,"keyword",null);P(this,"parameters",[]);P(this,"filename","");P(this,"line","");P(this,"lineNumber",0);P(this,"url","https://docs.openc3.com/docs/configuration")}verify_num_parameters(e,n,r=""){for(let s=1;s<=e;s++)if(this.parameters[s-1]===void 0)throw new ye(this,`Not enough parameters for ${this.keyword}.`,r,this.url);if(n&&this.parameters[n]!==void 0)throw new ye(this,`Too many parameters for ${this.keyword}.`,r,this.url)}remove_quotes(e){if(e.length<2)return e;let n=e.charAt(0);if(n!=='"'&&n!=="'")return e;let r=e.charAt(e.length-1);return n!==r?e:e.substring(1,e.length-1)}scan_string(e,n){if(!n.global)throw"rx must have 'global' flag set";let r=[];return e.replace(n,function(s){return r.push(s),s}),r}parse_string(e,n,r,s,i){let o=!1;this.line="",this.keyword=null,this.parameters=[],this.filename=n;let c=e.split(`
|
|
7
|
+
`),f=c.length;for(let u=0;u<f;u++){this.lineNumber=u+1;let l=c[u].trim();if(l.length===0)continue;if(o===!0){if(l[0]==="#")continue;l=l.substring(1,l.length)}let h=l.charAt(l.length-1),_=!1;switch(h){case"+":_=!0;case"\\":let b=l.substring(0,l.length-1).trim();this.line+=b.substring(0,b.length-1),_&&(this.line+=`
|
|
8
|
+
`),o=!0;continue;case"&":this.line+=l.substring(0,l.length-1);continue;default:this.line+=l}o=!1;let y=/("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,d=this.scan_string(this.line,y),m="";if(d.length>0&&(m=m+d[0]),m.length===0||m.charAt(0)==="#"?this.keyword=null:this.keyword=m.toUpperCase(),this.parameters=[],this.keyword===null){r&&i(this.keyword,this.parameters,this.line,this.lineNumber),this.line="";continue}let p=d.length;if(p>1)for(let b=1;b<p;b++){let w=d[b];if(w.length>0&&w.charAt(0)==="#")break;s?this.parameters.push(this.remove_quotes(w)):this.parameters.push(w)}i(this.keyword,this.parameters,this.line,this.lineNumber),this.line=""}}}class sr{constructor(){P(this,"id",1)}async exec(e,n,r={},s={},i=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,s.manual=!0,(await se.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...s},timeout:i})).data.result}catch(o){let c=new Error;throw o.response?(c.name=o.response.data.error.data.class,c.message=o.response.data.error.data.message,c.object=o.response.data.error):o.request?(c.name="Request error",c.message="Request error, no response received"):c.name="Unknown error",c}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}async get_tlm_packet(e,n,r,s=30){const i=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:s});if(i!=null){let o=i.length,c=null;for(let f=0;f<o;f++)c=this.decode_openc3_type(i[f][1]),c!==null&&(i[f][1]=c)}return i}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,r=null){let s={stale_time:n};r!==null&&(s.cache_timeout=r);const i=await this.exec("get_tlm_values",[e],s,{},1e4);let o=i[0].length,c=null;for(let f=0;f<o;f++)c=this.decode_openc3_type(i[0][f]),c!==null&&(i[0][f]=c);return i}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,s="CONVERTED"){let i=null;if(n===void 0)i=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))i=await this.exec("tlm",[e],{type:n});else{let c=new Error;throw c.name="TypeError",c.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,c}else i=await this.exec("tlm",[e,n,r],{type:s});let o=this.decode_openc3_type(i);return o!==null&&(i=o),i}async inject_tlm(e,n,r=null,s="CONVERTED"){data=await this.exec("inject_tlm",[e,n,r],{type:s})}set_tlm(e,n,r,s){return this.exec("set_tlm",[e,n,r],{type:s})}override_tlm(e,n,r,s){return this.exec("override_tlm",[e,n,r],{type:s})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,s){return this.exec("normalize_tlm",[e,n,r],{type:s})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,s="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,s])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,s,i){let o=null;for(let c in s)Object.prototype.hasOwnProperty.call(s,c)&&(o=this.encode_openc3_type(s[c]),o!==null&&(s[c]=o));return this.exec(e,[n,r,s],{},i)}get_cmd_hazardous(e,n,r,s={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},s):this._cmd("get_cmd_hazardous",e,n,r,s)}cmd(e,n,r,s={}){return n===void 0?this.exec("cmd",e,{},s):this._cmd("cmd",e,n,r,s)}cmd_no_range_check(e,n,r,s={}){return n===void 0?this.exec("cmd_no_range_check",e,{},s):this._cmd("cmd_no_range_check",e,n,r,s)}cmd_raw(e,n,r,s={}){return n===void 0?this.exec("cmd_raw",e,{},s):this._cmd("cmd_raw",e,n,r,s)}cmd_raw_no_range_check(e,n,r,s={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},s):this._cmd("cmd_raw_no_range_check",e,n,r,s)}cmd_no_hazardous_check(e,n,r,s={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},s):this._cmd("cmd_no_hazardous_check",e,n,r,s)}cmd_no_checks(e,n,r,s={}){return n===void 0?this.exec("cmd_no_checks",e,{},s):this._cmd("cmd_no_checks",e,n,r,s)}cmd_raw_no_hazardous_check(e,n,r,s={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},s):this._cmd("cmd_raw_no_hazardous_check",e,n,r,s)}cmd_raw_no_checks(e,n,r,s={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},s):this._cmd("cmd_raw_no_checks",e,n,r,s)}build_cmd(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}build_command(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,n){return this.exec("set_setting",[e,n])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>i.toString(16).padStart(2,"0")).join("")}}}exports.Api=Vn;exports.Cable=nr;exports.ConfigParserError=ye;exports.ConfigParserService=rr;exports.OpenC3Api=sr;exports.axios=se;
|
|
9
|
+
//# sourceMappingURL=services.cjs.map
|