mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-11-04 04:12:25 +01:00
7 lines
115 KiB
JavaScript
7 lines
115 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Setup-BH1KCx1-.js","assets/index-B3_WAJA_.js","assets/chunk-DECur_0Z.js","assets/createLucideIcon-BH1m6EQf.js","assets/runtime-core.esm-bundler-Bf9AMS9g.js","assets/runtime-dom.esm-bundler-BEOB_s5k.js","assets/Spinner-CuS2e8w-.js","assets/useMultiRadioConfig-CbvSq4WW.js","assets/system-DycvJgJD.js","assets/packets-LMZdG6Cm.js","assets/modemTransport-D55ElK4Q.js","assets/useTheme-DUiKrGLN.js","assets/dataService-CW0vYsq9.js","assets/formatters-vw234I-c.js","assets/websocket-CZrnsthL.js","assets/constants-DSLPbHDj.js","assets/index-CLWe7yuE.css","assets/TxPowerNoticeModal-B0UTtOKj.js","assets/Setup-C62P1LoZ.css","assets/Login-BZvzK4Y0.js","assets/Login-DL53-MUV.css","assets/Dashboard-BPOf4Sny.js","assets/ChartCard-DkUDxN-u.js","assets/PacketTable-DKzmPSXc.js","assets/PacketDetailsModal-Ds97-QxM.js","assets/SignalBars-vI1a7o1t.js","assets/PacketDetailsModal-DyxYLoUF.css","assets/PacketTable-RZCY_WAa.css","assets/streamingFetch-BfBAE1L-.js","assets/Dashboard-CnyKxu85.css","assets/Neighbors-niOCi7jA.js","assets/mapTiles-CcnZuqDv.js","assets/leaflet-src-Bw3sb7vA.js","assets/mapTiles-BXDUrBAr.css","assets/CopyLabel-C2uXZ-y_.js","assets/Neighbors-wUruP4BA.css","assets/Statistics-O2PqmtYg.js","assets/chartjs-adapter-date-fns.esm-DQ6UT87Y.js","assets/RadioScopeSelector-Dtm_gWE-.js","assets/Sparkline-BuWA0MVa.js","assets/Sparkline-C0HuREuA.css","assets/radioAnalytics-CWBET8Wd.js","assets/RfHealthCorrelation-DwdXeM2U.js","assets/RfHealthCorrelation-OJP3k9nw.css","assets/NeighbourLinks-CVha8cRp.js","assets/GPSDiagnostics-DPwhC0rG.js","assets/GPSDiagnostics-CHd4G-Fs.css","assets/SystemStats-DGa00-z0.js","assets/SystemStats-DrVK4Tr6.css","assets/Plugins-BolwYgk_.js","assets/Sensors-BmokaFAs.js","assets/Configuration-BS5B8g9k.js","assets/ConfirmDialog-Li2OnOVG.js","assets/LocationPicker-wbFLsx3_.js","assets/LocationPicker-B7Jr7h0G.css","assets/Configuration-DnukW6kc.css","assets/CADCalibration-CpDyFAzi.js","assets/CADCalibration-DJLKVgpM.css","assets/Sessions-DRSuJ0uy.js","assets/RoomServers-BeQrWLvS.js","assets/MessageDialog-MiOmpnWG.js","assets/Companions-DeW1oYBU.js","assets/PacketArchive-9qsKiViX.js","assets/Logs-B15LC3ei.js","assets/Terminal-DbKb9rc4.js","assets/Terminal-DX3-65Pp.css","assets/Help-CPf1Rq4d.js","assets/websocket--IA7Vjz3.js","assets/packets-9J-Pb20s.js","assets/system-0FEoONxW.js","assets/dataService-DfMJb_XE.js"])))=>i.map(i=>d[i]);
|
||
import{n as e}from"./chunk-DECur_0Z.js";import{B as t,C as n,D as r,G as i,H as a,J as o,K as s,L as c,N as l,Q as u,R as d,T as f,U as p,V as m,X as h,Y as g,_,b as ee,g as v,o as y,q as te,v as b,x,y as S,z as ne}from"./runtime-core.esm-bundler-Bf9AMS9g.js";var re=typeof window<`u`,C,ie=e=>C=e,w=Symbol();function ae(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var oe;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(oe||={});var se=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function ce(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function le(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){pe(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function ue(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function de(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var T=typeof navigator==`object`?navigator:{userAgent:``},fe=/Macintosh/.test(T.userAgent)&&/AppleWebKit/.test(T.userAgent)&&!/Safari/.test(T.userAgent),pe=re?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!fe?me:`msSaveOrOpenBlob`in T?he:ge:()=>{};function me(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?de(r):ue(r.href)?le(e,t,n):(r.target=`_blank`,de(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){de(r)},0))}function he(e,t=`download`,n){if(typeof e==`string`)if(ue(e))le(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){de(t)})}else navigator.msSaveOrOpenBlob(ce(e,n),t)}function ge(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return le(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(se.HTMLElement))||`safari`in se,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||fe)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:_e}=Object;function ve(){let e=c(!0),t=e.run(()=>i({})),n=[],r=[],a=m({install(e){ie(a),a._a=e,e.provide(w,a),e.config.globalProperties.$pinia=a,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}var E=()=>{};function D(e,t,n,r=E){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&d()&&a(i),i}function ye(e,...t){e.forEach(e=>{e(...t)})}var be=e=>e(),xe=Symbol(),Se=Symbol();function Ce(e,n){e instanceof Map&&n instanceof Map?n.forEach((t,n)=>e.set(n,t)):e instanceof Set&&n instanceof Set&&n.forEach(e.add,e);for(let r in n){if(!n.hasOwnProperty(r))continue;let i=n[r],a=e[r];ae(a)&&ae(i)&&e.hasOwnProperty(r)&&!t(i)&&!ne(i)?e[r]=Ce(a,i):e[r]=i}return e}var we=Symbol();function Te(e){return!ae(e)||!Object.prototype.hasOwnProperty.call(e,we)}var{assign:O}=Object;function Ee(e){return!!(t(e)&&e.effect)}function De(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),O(h(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=m(y(()=>{ie(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=Oe(e,l,t,n,r,!0),c}function Oe(e,n,r={},a,s,u){let d,f=O({actions:{}},r),m={deep:!0},h,g,_=new Set,v=new Set,y=a.state.value[e];!u&&!y&&(a.state.value[e]={}),i({});let te;function b(t){let n;h=g=!1,typeof t==`function`?(t(a.state.value[e]),n={type:oe.patchFunction,storeId:e,events:void 0}):(Ce(a.state.value[e],t),n={type:oe.patchObject,payload:t,storeId:e,events:void 0});let r=te=Symbol();ee().then(()=>{te===r&&(h=!0)}),g=!0,ye(_,n,a.state.value[e])}let x=u?function(){let{state:e}=r,t=e?e():{};this.$patch(e=>{O(e,t)})}:E;function S(){d.stop(),_.clear(),v.clear(),a._s.delete(e)}let re=(t,n=``)=>{if(xe in t)return t[Se]=n,t;let r=function(){ie(a);let n=Array.from(arguments),i=new Set,o=new Set;function s(e){i.add(e)}function c(e){o.add(e)}ye(v,{args:n,name:r[Se],store:C,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:C,n)}catch(e){throw ye(o,e),e}return l instanceof Promise?l.then(e=>(ye(i,e),e)).catch(e=>(ye(o,e),Promise.reject(e))):(ye(i,l),l)};return r[xe]=!0,r[Se]=n,r},C=p({_p:a,$id:e,$onAction:D.bind(null,v),$patch:b,$reset:x,$subscribe(t,n={}){let r=D(_,t,n.detached,()=>i()),i=d.run(()=>l(()=>a.state.value[e],r=>{(n.flush===`sync`?g:h)&&t({storeId:e,type:oe.direct,events:void 0},r)},O({},m,n)));return r},$dispose:S});a._s.set(e,C);let w=(a._a&&a._a.runWithContext||be)(()=>a._e.run(()=>(d=c()).run(()=>n({action:re}))));for(let n in w){let r=w[n];t(r)&&!Ee(r)||ne(r)?u||(y&&Te(r)&&(t(r)?r.value=y[n]:Ce(r,y[n])),a.state.value[e][n]=r):typeof r==`function`&&(w[n]=re(r,n),f.actions[n]=r)}return O(C,w),O(o(C),w),Object.defineProperty(C,`$state`,{get:()=>a.state.value[e],set:e=>{b(t=>{O(t,e)})}}),a._p.forEach(e=>{O(C,d.run(()=>e({store:C,app:a._a,pinia:a,options:f})))}),y&&u&&r.hydrate&&r.hydrate(C.$state,y),h=!0,g=!0,C}function ke(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=b();return n||=o?S(w,null):null,n&&ie(n),n=C,n._s.has(e)||(i?Oe(e,t,r,n):De(e,r,n)),n._s.get(e)}return a.$id=e,a}function Ae(e){let n=o(e),r={};for(let i in n){let a=n[i];a.effect?r[i]=y({get:()=>e[i],set(t){e[i]=t}}):(t(a)||ne(a))&&(r[i]=g(e,i))}return r}var je=typeof document<`u`;function Me(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Ne(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Me(e.default)}var k=Object.assign;function Pe(e,t){let n={};for(let r in t){let i=t[r];n[r]=A(i)?i.map(e):e(i)}return n}var Fe=()=>{},A=Array.isArray;function Ie(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var j=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Le=Symbol(``);j.MATCHER_NOT_FOUND,j.NAVIGATION_GUARD_REDIRECT,j.NAVIGATION_ABORTED,j.NAVIGATION_CANCELLED,j.NAVIGATION_DUPLICATED;function Re(e,t){return k(Error(),{type:e,[Le]:!0},t)}function M(e,t){return e instanceof Error&&Le in e&&(t==null||!!(e.type&t))}var ze=Symbol(``),Be=Symbol(``),Ve=Symbol(``),He=Symbol(``),Ue=Symbol(``);function We(){return S(Ve)}function Ge(e){return S(He)}var Ke=/#/g,qe=/&/g,Je=/\//g,Ye=/=/g,Xe=/\?/g,Ze=/\+/g,Qe=/%5B/g,$e=/%5D/g,et=/%5E/g,tt=/%60/g,nt=/%7B/g,rt=/%7C/g,it=/%7D/g,at=/%20/g;function ot(e){return e==null?``:encodeURI(``+e).replace(rt,`|`).replace(Qe,`[`).replace($e,`]`)}function st(e){return ot(e).replace(nt,`{`).replace(it,`}`).replace(et,`^`)}function ct(e){return ot(e).replace(Ze,`%2B`).replace(at,`+`).replace(Ke,`%23`).replace(qe,`%26`).replace(tt,"`").replace(nt,`{`).replace(it,`}`).replace(et,`^`)}function lt(e){return ct(e).replace(Ye,`%3D`)}function ut(e){return ot(e).replace(Ke,`%23`).replace(Xe,`%3F`)}function dt(e){return ut(e).replace(Je,`%2F`)}function ft(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var pt=/\/$/,mt=e=>e.replace(pt,``);function ht(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=Ct(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:ft(o)}}function gt(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function _t(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function vt(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&yt(t.matched[r],n.matched[i])&&bt(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function yt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function bt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!xt(e[n],t[n]))return!1;return!0}function xt(e,t){return A(e)?St(e,t):A(t)?St(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function St(e,t){return A(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function Ct(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var N={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},wt=function(e){return e.pop=`pop`,e.push=`push`,e}({}),Tt=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function Et(e){if(!e)if(je){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),mt(e)}var Dt=/^[^#]+#/;function Ot(e,t){return e.replace(Dt,`#`)+t}function kt(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var At=()=>({left:window.scrollX,top:window.scrollY});function jt(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=kt(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Mt(e,t){return(history.state?history.state.position-t:-1)+e}var Nt=new Map;function Pt(e,t){Nt.set(e,t)}function Ft(e){let t=Nt.get(e);return Nt.delete(e),t}function It(e){return typeof e==`string`||e&&typeof e==`object`}function Lt(e){return typeof e==`string`||typeof e==`symbol`}function Rt(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(Ze,` `),i=r.indexOf(`=`),a=ft(i<0?r:r.slice(0,i)),o=i<0?null:ft(r.slice(i+1));if(a in t){let e=t[a];A(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function zt(e){let t=``;for(let n in e){let r=e[n];if(n=lt(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(A(r)?r.map(e=>e&&ct(e)):[r&&ct(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Bt(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=A(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Vt(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ht(e,t,r){let i=e.value;if(!i)return;let a=i,o=()=>{a[t].delete(r)};f(o),n(o),x(()=>{let n=e.value;n&&(a=n),a[t].add(r)}),a[t].add(r)}function Ut(e){Ht(S(ze,{}),`leaveGuards`,e)}function Wt(e){Ht(S(ze,{}),`updateGuards`,e)}function P(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Re(j.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):It(e)?c(Re(j.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Gt(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Me(s)){let c=(s.__vccOpts||s)[t];c&&a.push(P(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Ne(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&P(c,n,r,o,e,i)()}))}}return a}function Kt(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>yt(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>yt(e,s))||i.push(s))}return[n,r,i]}var qt=()=>location.protocol+`//`+location.host;function Jt(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),_t(n,``)}return _t(n,e)+r+i}function Yt(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Jt(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:wt.pop,direction:u?u>0?Tt.forward:Tt.back:Tt.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(k({},e.state,{scroll:At()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Xt(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?At():null}}function Zt(e){let{history:t,location:n}=window,r={value:Jt(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:qt()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,k({},t.state,Xt(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=k({},i.value,t.state,{forward:e,scroll:At()});a(o.current,o,!0),a(e,k({},Xt(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Qt(e){e=Et(e);let t=Zt(e),n=Yt(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=k({location:``,base:e,go:r,createHref:Ot.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}var F=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),I=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(I||{}),$t={type:F.Static,value:``},en=/[a-zA-Z0-9_]/;function tn(e){if(!e)return[[]];if(e===`/`)return[[$t]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=I.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===I.Static?a.push({type:F.Static,value:l}):n===I.Param||n===I.ParamRegExp||n===I.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:F.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==I.ParamRegExp){r=n,n=I.EscapeNext;continue}switch(n){case I.Static:c===`/`?(l&&d(),o()):c===`:`?(d(),n=I.Param):f();break;case I.EscapeNext:f(),n=r;break;case I.Param:c===`(`?n=I.ParamRegExp:en.test(c)?f():(d(),n=I.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case I.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=I.ParamRegExpEnd:u+=c;break;case I.ParamRegExpEnd:d(),n=I.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}}return n===I.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var nn=`[^/]+?`,rn={sensitive:!1,strict:!1,start:!0,end:!0},L=function(e){return e[e._multiplier=10]=`_multiplier`,e[e.Root=90]=`Root`,e[e.Segment=40]=`Segment`,e[e.SubSegment=30]=`SubSegment`,e[e.Static=40]=`Static`,e[e.Dynamic=20]=`Dynamic`,e[e.BonusCustomRegExp=10]=`BonusCustomRegExp`,e[e.BonusWildcard=-50]=`BonusWildcard`,e[e.BonusRepeatable=-20]=`BonusRepeatable`,e[e.BonusOptional=-8]=`BonusOptional`,e[e.BonusStrict=.7000000000000001]=`BonusStrict`,e[e.BonusCaseSensitive=.25]=`BonusCaseSensitive`,e}(L||{}),an=/[.+*?^${}()[\]/\\]/g;function on(e,t){let n=k({},rn,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[L.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=L.Segment+(n.sensitive?L.BonusCaseSensitive:0);if(o.type===F.Static)r||(i+=`/`),i+=o.value.replace(an,`\\$&`),s+=L.Static;else if(o.type===F.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||nn;if(u!==nn){s+=L.BonusCustomRegExp;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=L.Dynamic,c&&(s+=L.BonusOptional),n&&(s+=L.BonusRepeatable),u===`.*`&&(s+=L.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=L.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===F.Static)n+=e.value;else if(e.type===F.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(A(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=A(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function sn(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===L.Static+L.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===L.Static+L.Segment?1:-1:0}function cn(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=sn(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(ln(r))return 1;if(ln(i))return-1}return i.length-r.length}function ln(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var un={strict:!1,end:!0,sensitive:!1};function dn(e,t,n){let r=k(on(tn(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fn(e,t){let n=[],r=new Map;t=Ie(un,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=mn(e);s.aliasOf=r&&r.record;let l=Ie(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(mn(k({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=dn(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!gn(d)&&o(e.name)),bn(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:Fe}function o(e){if(Lt(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=vn(e,n);n.splice(t,0,e),e.record.name&&!gn(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Re(j.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=k(pn(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&pn(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Re(j.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=k({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:_n(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function pn(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function mn(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:hn(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function hn(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function gn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function _n(e){return e.reduce((e,t)=>k(e,t.meta),{})}function vn(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;cn(e,t[i])<0?r=i:n=i+1}let i=yn(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function yn(e){let t=e;for(;t=t.parent;)if(bn(t)&&cn(e,t)===0)return t}function bn({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function xn(e){let t=S(Ve),n=S(He),r=y(()=>{let n=u(e.to);return t.resolve(n)}),i=y(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(yt.bind(null,i));if(o>-1)return o;let s=En(e[t-2]);return t>1&&En(i)===s&&a[a.length-1].path!==s?a.findIndex(yt.bind(null,e[t-2])):o}),a=y(()=>i.value>-1&&Tn(n.params,r.value.params)),o=y(()=>i.value>-1&&i.value===n.matched.length-1&&bt(n.params,r.value.params));function s(n={}){if(wn(n)){let n=t[u(e.replace)?`replace`:`push`](u(e.to)).catch(Fe);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:y(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function Sn(e){return e.length===1?e[0]:e}var Cn=v({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:xn,setup(e,{slots:t}){let n=p(xn(e)),{options:r}=S(Ve),i=y(()=>({[Dn(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[Dn(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&Sn(t.default(n));return e.custom?r:_(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function wn(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Tn(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!A(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function En(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Dn=(e,t,n)=>e??t??n,On=v({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let a=S(Ue),o=y(()=>e.route||a.value),s=S(Be,0),c=y(()=>{let e=u(s),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),d=y(()=>o.value.matched[c.value]);r(Be,y(()=>c.value+1)),r(ze,d),r(Ue,o);let f=i();return l(()=>[f.value,d.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!yt(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=o.value,i=e.name,a=d.value,s=a&&a.components[i];if(!s)return kn(n.default,{Component:s,route:r});let c=a.props[i],l=_(s,k({},c?c===!0?r.params:typeof c==`function`?c(r):c:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[i]=null)},ref:f}));return kn(n.default,{Component:l,route:r})||l}}});function kn(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var An=On;function jn(e){let t=fn(e.routes,e),n=e.parseQuery||Rt,r=e.stringifyQuery||zt,i=e.history,a=Vt(),o=Vt(),c=Vt(),l=te(N),d=N;je&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let f=Pe.bind(null,e=>``+e),p=Pe.bind(null,dt),m=Pe.bind(null,ft);function h(e,n){let r,i;return Lt(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function g(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function _(){return t.getRoutes().map(e=>e.record)}function v(e){return!!t.getRecordMatcher(e)}function y(e,a){if(a=k({},a||l.value),typeof e==`string`){let r=ht(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return k(r,o,{params:m(o.params),hash:ft(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=k({},e,{path:ht(n,e.path,a.path).path});else{let t=k({},e.params);for(let e in t)t[e]??delete t[e];o=k({},e,{params:p(t)}),a.params=p(a.params)}let s=t.resolve(o,a),c=e.hash||``;s.params=f(m(s.params));let u=gt(r,k({},e,{hash:st(c),path:s.path})),d=i.createHref(u);return k({fullPath:u,hash:c,query:r===zt?Bt(e.query):e.query||{}},s,{redirectedFrom:void 0,href:d})}function b(e){return typeof e==`string`?ht(n,e,l.value.path):k({},e)}function x(e,t){if(d!==e)return Re(j.NAVIGATION_CANCELLED,{from:t,to:e})}function S(e){return C(e)}function ne(e){return S(k(b(e),{replace:!0}))}function re(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=b(i):{path:i},i.params={}),k({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=d=y(e),i=l.value,a=e.state,o=e.force,s=e.replace===!0,c=re(n,i);if(c)return C(k(b(c),{state:typeof c==`object`?k({},a,c.state):a,force:o,replace:s}),t||n);let u=n;u.redirectedFrom=t;let f;return!o&&vt(r,i,n)&&(f=Re(j.NAVIGATION_DUPLICATED,{to:u,from:i}),he(i,i,!0,!1)),(f?Promise.resolve(f):ae(u,i)).catch(e=>M(e)?M(e,j.NAVIGATION_GUARD_REDIRECT)?e:me(e):fe(e,u,i)).then(e=>{if(e){if(M(e,j.NAVIGATION_GUARD_REDIRECT))return C(k({replace:s},b(e.to),{state:typeof e.to==`object`?k({},a,e.to.state):a,force:o}),t||u)}else e=se(u,i,!0,s,a);return oe(u,i,e),e})}function ie(e,t){let n=x(e,t);return n?Promise.reject(n):Promise.resolve()}function w(e){let t=ve.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function ae(e,t){let n,[r,i,s]=Kt(e,t);n=Gt(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(P(r,e,t))});let c=ie.bind(null,e,t);return n.push(c),D(n).then(()=>{n=[];for(let r of a.list())n.push(P(r,e,t));return n.push(c),D(n)}).then(()=>{n=Gt(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(P(r,e,t))});return n.push(c),D(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(A(r.beforeEnter))for(let i of r.beforeEnter)n.push(P(i,e,t));else n.push(P(r.beforeEnter,e,t));return n.push(c),D(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Gt(s,`beforeRouteEnter`,e,t,w),n.push(c),D(n))).then(()=>{n=[];for(let r of o.list())n.push(P(r,e,t));return n.push(c),D(n)}).catch(e=>M(e,j.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function oe(e,t,n){c.list().forEach(r=>w(()=>r(e,t,n)))}function se(e,t,n,r,a){let o=x(e,t);if(o)return o;let s=t===N,c=je?history.state:{};n&&(r||s?i.replace(e.fullPath,k({scroll:s&&c&&c.scroll},a)):i.push(e.fullPath,a)),l.value=e,he(e,t,n,s),me()}let ce;function le(){ce||=i.listen((e,t,n)=>{if(!E.listening)return;let r=y(e),a=re(r,E.currentRoute.value);if(a){C(k(a,{replace:!0,force:!0}),r).catch(Fe);return}d=r;let o=l.value;je&&Pt(Mt(o.fullPath,n.delta),At()),ae(r,o).catch(e=>M(e,j.NAVIGATION_ABORTED|j.NAVIGATION_CANCELLED)?e:M(e,j.NAVIGATION_GUARD_REDIRECT)?(C(k(b(e.to),{force:!0}),r).then(e=>{M(e,j.NAVIGATION_ABORTED|j.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===wt.pop&&i.go(-1,!1)}).catch(Fe),Promise.reject()):(n.delta&&i.go(-n.delta,!1),fe(e,r,o))).then(e=>{e||=se(r,o,!1),e&&(n.delta&&!M(e,j.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===wt.pop&&M(e,j.NAVIGATION_ABORTED|j.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),oe(r,o,e)}).catch(Fe)})}let ue=Vt(),de=Vt(),T;function fe(e,t,n){me(e);let r=de.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function pe(){return T&&l.value!==N?Promise.resolve():new Promise((e,t)=>{ue.add([e,t])})}function me(e){return T||(T=!e,le(),ue.list().forEach(([t,n])=>e?n(e):t()),ue.reset()),e}function he(t,n,r,i){let{scrollBehavior:a}=e;if(!je||!a)return Promise.resolve();let o=!r&&Ft(Mt(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return ee().then(()=>a(t,n,o)).then(e=>e&&jt(e)).catch(e=>fe(e,t,n))}let ge=e=>i.go(e),_e,ve=new Set,E={currentRoute:l,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:_,resolve:y,options:e,push:S,replace:ne,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:a.add,beforeResolve:o.add,afterEach:c.add,onError:de.add,isReady:pe,install(e){e.component(`RouterLink`,Cn),e.component(`RouterView`,An),e.config.globalProperties.$router=E,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>u(l)}),je&&!_e&&l.value===N&&(_e=!0,S(i.location).catch(e=>{}));let t={};for(let e in N)Object.defineProperty(t,e,{get:()=>l.value[e],enumerable:!0});e.provide(Ve,E),e.provide(He,s(t)),e.provide(Ue,l);let n=e.unmount;ve.add(e),e.unmount=function(){ve.delete(e),ve.size<1&&(d=N,ce&&ce(),ce=null,l.value=N,_e=!1,T=!1),n()}}};function D(e){return e.reduce((e,t)=>e.then(()=>w(t)),Promise.resolve())}return E}function Mn(e,t){return function(){return e.apply(t,arguments)}}var{toString:Nn}=Object.prototype,{getPrototypeOf:Pn}=Object,{iterator:Fn,toStringTag:In}=Symbol,Ln=(e=>t=>{let n=Nn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),R=e=>(e=e.toLowerCase(),t=>Ln(t)===e),Rn=e=>t=>typeof t===e,{isArray:zn}=Array,Bn=Rn(`undefined`);function Vn(e){return e!==null&&!Bn(e)&&e.constructor!==null&&!Bn(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Hn=R(`ArrayBuffer`);function Un(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Hn(e.buffer),t}var Wn=Rn(`string`),z=Rn(`function`),Gn=Rn(`number`),Kn=e=>typeof e==`object`&&!!e,qn=e=>e===!0||e===!1,Jn=e=>{if(Ln(e)!==`object`)return!1;let t=Pn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(In in e)&&!(Fn in e)},Yn=e=>{if(!Kn(e)||Vn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Xn=R(`Date`),Zn=R(`File`),Qn=e=>!!(e&&e.uri!==void 0),$n=e=>e&&e.getParts!==void 0,er=R(`Blob`),tr=R(`FileList`),nr=e=>Kn(e)&&z(e.pipe);function rr(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var ir=rr(),ar=ir.FormData===void 0?void 0:ir.FormData,or=e=>{let t;return e&&(ar&&e instanceof ar||z(e.append)&&((t=Ln(e))===`formdata`||t===`object`&&z(e.toString)&&e.toString()===`[object FormData]`))},sr=R(`URLSearchParams`),[cr,lr,ur,dr]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(R),fr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function pr(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),zn(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Vn(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function mr(e,t){if(Vn(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var B=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,hr=e=>!Bn(e)&&e!==B;function gr(){let{caseless:e,skipUndefined:t}=hr(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&mr(n,i)||i;Jn(n[a])&&Jn(r)?n[a]=gr(n[a],r):Jn(r)?n[a]=gr({},r):zn(r)?n[a]=r.slice():(!t||!Bn(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&pr(arguments[e],r);return n}var _r=(e,t,n,{allOwnKeys:r}={})=>(pr(t,(t,r)=>{n&&z(t)?Object.defineProperty(e,r,{value:Mn(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),vr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},br=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Pn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Sr=e=>{if(!e)return null;if(zn(e))return e;let t=e.length;if(!Gn(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Cr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Pn(Uint8Array)),wr=(e,t)=>{let n=(e&&e[Fn]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Tr=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Er=R(`HTMLFormElement`),Dr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Or=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kr=R(`RegExp`),Ar=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};pr(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},jr=e=>{Ar(e,(t,n)=>{if(z(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(z(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Mr=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return zn(e)?r(e):r(String(e).split(t)),n},Nr=()=>{},Pr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fr(e){return!!(e&&z(e.append)&&e[In]===`FormData`&&e[Fn])}var Ir=e=>{let t=Array(10),n=(e,r)=>{if(Kn(e)){if(t.indexOf(e)>=0)return;if(Vn(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=zn(e)?[]:{};return pr(e,(e,t)=>{let a=n(e,r+1);!Bn(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},Lr=R(`AsyncFunction`),Rr=e=>e&&(Kn(e)||z(e))&&z(e.then)&&z(e.catch),zr=((e,t)=>e?setImmediate:t?((e,t)=>(B.addEventListener(`message`,({source:n,data:r})=>{n===B&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),B.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,z(B.postMessage)),V={isArray:zn,isArrayBuffer:Hn,isBuffer:Vn,isFormData:or,isArrayBufferView:Un,isString:Wn,isNumber:Gn,isBoolean:qn,isObject:Kn,isPlainObject:Jn,isEmptyObject:Yn,isReadableStream:cr,isRequest:lr,isResponse:ur,isHeaders:dr,isUndefined:Bn,isDate:Xn,isFile:Zn,isReactNativeBlob:Qn,isReactNative:$n,isBlob:er,isRegExp:kr,isFunction:z,isStream:nr,isURLSearchParams:sr,isTypedArray:Cr,isFileList:tr,forEach:pr,merge:gr,extend:_r,trim:fr,stripBOM:vr,inherits:yr,toFlatObject:br,kindOf:Ln,kindOfTest:R,endsWith:xr,toArray:Sr,forEachEntry:wr,matchAll:Tr,isHTMLForm:Er,hasOwnProperty:Or,hasOwnProp:Or,reduceDescriptors:Ar,freezeMethods:jr,toObjectSet:Mr,toCamelCase:Dr,noop:Nr,toFiniteNumber:Pr,findKey:mr,global:B,isContextDefined:hr,isSpecCompliantForm:Fr,toJSONObject:Ir,isAsyncFn:Lr,isThenable:Rr,setImmediate:zr,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(B):typeof process<`u`&&process.nextTick||zr,isIterable:e=>e!=null&&z(e[Fn])},H=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){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:V.toJSONObject(this.config),code:this.code,status:this.status}}};H.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,H.ERR_BAD_OPTION=`ERR_BAD_OPTION`,H.ECONNABORTED=`ECONNABORTED`,H.ETIMEDOUT=`ETIMEDOUT`,H.ERR_NETWORK=`ERR_NETWORK`,H.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,H.ERR_DEPRECATED=`ERR_DEPRECATED`,H.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,H.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,H.ERR_CANCELED=`ERR_CANCELED`,H.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,H.ERR_INVALID_URL=`ERR_INVALID_URL`;function Br(e){return V.isPlainObject(e)||V.isArray(e)}function Vr(e){return V.endsWith(e,`[]`)?e.slice(0,-2):e}function Hr(e,t,n){return e?e.concat(t).map(function(e,t){return e=Vr(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Ur(e){return V.isArray(e)&&!e.some(Br)}var Wr=V.toFlatObject(V,{},null,function(e){return/^is[A-Z]/.test(e)});function Gr(e,t,n){if(!V.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!V.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||typeof Blob<`u`&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(i))throw TypeError(`visitor must be a function`);function c(e){if(e===null)return``;if(V.isDate(e))return e.toISOString();if(V.isBoolean(e))return e.toString();if(!s&&V.isBlob(e))throw new H(`Blob is not supported. Use a Buffer instead.`);return V.isArrayBuffer(e)||V.isTypedArray(e)?s&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(V.isReactNative(t)&&V.isReactNativeBlob(e))return t.append(Hr(i,n,a),c(e)),!1;if(e&&!i&&typeof e==`object`){if(V.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(V.isArray(e)&&Ur(e)||(V.isFileList(e)||V.endsWith(n,`[]`))&&(s=V.toArray(e)))return n=Vr(n),s.forEach(function(e,r){!(V.isUndefined(e)||e===null)&&t.append(o===!0?Hr([n],r,a):o===null?n:n+`[]`,c(e))}),!1}return Br(e)?!0:(t.append(Hr(i,n,a),c(e)),!1)}let u=[],d=Object.assign(Wr,{defaultVisitor:l,convertValue:c,isVisitable:Br});function f(e,n){if(!V.isUndefined(e)){if(u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),V.forEach(e,function(e,r){(!(V.isUndefined(e)||e===null)&&i.call(t,e,V.isString(r)?r.trim():r,n,d))===!0&&f(e,n?n.concat(r):[r])}),u.pop()}}if(!V.isObject(e))throw TypeError(`data must be an object`);return f(e),t}function Kr(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`,"%00":`\0`};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function qr(e,t){this._pairs=[],e&&Gr(e,this,t)}var Jr=qr.prototype;Jr.append=function(e,t){this._pairs.push([e,t])},Jr.toString=function(e){let t=e?function(t){return e.call(this,t,Kr)}:Kr;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function Yr(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Xr(e,t,n){if(!t)return e;let r=n&&n.encode||Yr,i=V.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):V.isURLSearchParams(t)?t.toString():new qr(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Zr=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){V.forEach(this.handlers,function(t){t!==null&&e(t)})}},Qr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},$r={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:qr,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},ei=e({hasBrowserEnv:()=>ti,hasStandardBrowserEnv:()=>ri,hasStandardBrowserWebWorkerEnv:()=>ii,navigator:()=>ni,origin:()=>ai}),ti=typeof window<`u`&&typeof document<`u`,ni=typeof navigator==`object`&&navigator||void 0,ri=ti&&(!ni||[`ReactNative`,`NativeScript`,`NS`].indexOf(ni.product)<0),ii=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,ai=ti&&window.location.href||`http://localhost`,U={...ei,...$r};function oi(e,t){return Gr(e,new U.classes.URLSearchParams,{visitor:function(e,t,n,r){return U.isNode&&V.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function si(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function ci(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function li(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&V.isArray(r)?r.length:a,s?(V.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):((!r[a]||!V.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&V.isArray(r[a])&&(r[a]=ci(r[a])),!o)}if(V.isFormData(e)&&V.isFunction(e.entries)){let n={};return V.forEachEntry(e,(e,r)=>{t(si(e),r,n,0)}),n}return null}function ui(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var di={transitional:Qr,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=V.isObject(e);if(i&&V.isHTMLForm(e)&&(e=new FormData(e)),V.isFormData(e))return r?JSON.stringify(li(e)):e;if(V.isArrayBuffer(e)||V.isBuffer(e)||V.isStream(e)||V.isFile(e)||V.isBlob(e)||V.isReadableStream(e))return e;if(V.isArrayBufferView(e))return e.buffer;if(V.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return oi(e,this.formSerializer).toString();if((a=V.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let t=this.env&&this.env.FormData;return Gr(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType(`application/json`,!1),ui(e)):e}],transformResponse:[function(e){let t=this.transitional||di.transitional,n=t&&t.forcedJSONParsing,r=this.responseType===`json`;if(V.isResponse(e)||V.isReadableStream(e))return e;if(e&&V.isString(e)&&(n&&!this.responseType||r)){let n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n)throw e.name===`SyntaxError`?H.from(e,H.ERR_BAD_RESPONSE,this,null,this.response):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};V.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{di.headers[e]={}});var fi=V.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`]),pi=e=>{let t={},n,r,i;return e&&e.split(`
|
||
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&fi[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},mi=Symbol(`internals`);function hi(e){return e&&String(e).trim().toLowerCase()}function gi(e){return e===!1||e==null?e:V.isArray(e)?e.map(gi):String(e).replace(/[\r\n]+$/,``)}function _i(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var vi=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function yi(e,t,n,r,i){if(V.isFunction(r))return r.call(this,t,n);if(i&&(t=n),V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function bi(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function xi(e,t){let n=V.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var W=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=hi(t);if(!i)throw Error(`header name must be a non-empty string`);let a=V.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=gi(e))}let a=(e,t)=>V.forEach(e,(e,n)=>i(e,n,t));if(V.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(V.isString(e)&&(e=e.trim())&&!vi(e))a(pi(e),t);else if(V.isObject(e)&&V.isIterable(e)){let n={},r,i;for(let t of e){if(!V.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?V.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=hi(e),e){let n=V.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return _i(e);if(V.isFunction(t))return t.call(this,e,n);if(V.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=hi(e),e){let n=V.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||yi(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=hi(e),e){let i=V.findKey(n,e);i&&(!t||yi(n,n[i],i,t))&&(delete n[i],r=!0)}}return V.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||yi(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return V.forEach(this,(r,i)=>{let a=V.findKey(n,i);if(a){t[a]=gi(r),delete t[i];return}let o=e?bi(i):String(i).trim();o!==i&&delete t[i],t[o]=gi(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return V.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&V.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
||
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[mi]=this[mi]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=hi(e);t[r]||(xi(n,e),t[r]=!0)}return V.isArray(e)?e.forEach(r):r(e),this}};W.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),V.reduceDescriptors(W.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),V.freezeMethods(W);function Si(e,t){let n=this||di,r=t||n,i=W.from(r.headers),a=r.data;return V.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Ci(e){return!!(e&&e.__CANCEL__)}var wi=class extends H{constructor(e,t,n){super(e??`canceled`,H.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Ti(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new H(`Request failed with status code `+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ei(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function Di(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Oi(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var ki=(e,t,n=3)=>{let r=0,i=Di(50,250);return Oi(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Ai=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ji=e=>(...t)=>V.asap(()=>e(...t)),Mi=U.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,U.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0,Ni=U.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&s.push(`path=${r}`),V.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),V.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Pi(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Fi(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function Ii(e,t,n){let r=!Pi(t);return e&&(r||n==0)?Fi(e,t):t}var Li=e=>e instanceof W?{...e}:e;function G(e,t){t||={};let n={};function r(e,t,n,r){return V.isPlainObject(e)&&V.isPlainObject(t)?V.merge.call({caseless:r},e,t):V.isPlainObject(t)?V.merge({},t):V.isArray(t)?t.slice():t}function i(e,t,n,i){if(!V.isUndefined(t))return r(e,t,n,i);if(!V.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!V.isUndefined(t))return r(void 0,t)}function o(e,t){if(!V.isUndefined(t))return r(void 0,t);if(!V.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,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:s,headers:(e,t,n)=>i(Li(e),Li(t),n,!0)};return V.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=V.hasOwnProp(c,r)?c[r]:i,o=a(e[r],t[r],r);V.isUndefined(o)&&a!==s||(n[r]=o)}),n}var Ri=e=>{let t=G({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=W.from(o),t.url=Xr(Ii(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),V.isFormData(n)){if(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(V.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(U.hasStandardBrowserEnv&&(r&&V.isFunction(r)&&(r=r(t)),r||r!==!1&&Mi(t.url))){let e=i&&a&&Ni.read(a);e&&o.set(i,e)}return t},zi=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Ri(e),i=r.data,a=W.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=W.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Ti(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new H(`Request aborted`,H.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new H(t&&t.message?t.message:`Network Error`,H.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||Qr;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new H(t,i.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&V.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),V.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=ki(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=ki(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new wi(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Ei(r.url);if(_&&U.protocols.indexOf(_)===-1){n(new H(`Unsupported protocol `+_+`:`,H.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Bi=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof H?t:new wi(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new H(`timeout of ${t}ms exceeded`,H.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>V.asap(o),s}},Vi=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Hi=async function*(e,t){for await(let n of Ui(e))yield*Vi(n,t)},Ui=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Wi=(e,t,n,r)=>{let i=Hi(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},Gi=64*1024,{isFunction:Ki}=V,qi=(({Request:e,Response:t})=>({Request:e,Response:t}))(V.global),{ReadableStream:Ji,TextEncoder:Yi}=V.global,Xi=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Zi=e=>{e=V.merge.call({skipUndefined:!0},qi,e);let{fetch:t,Request:n,Response:r}=e,i=t?Ki(t):typeof fetch==`function`,a=Ki(n),o=Ki(r);if(!i)return!1;let s=i&&Ki(Ji),c=i&&(typeof Yi==`function`?(e=>t=>e.encode(t))(new Yi):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&Xi(()=>{let e=!1,t=new Ji,r=new n(U.origin,{body:t,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return t.cancel(),e&&!r}),u=o&&s&&Xi(()=>V.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new H(`Response type '${e}' is not supported`,H.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(V.isBlob(e))return e.size;if(V.isSpecCompliantForm(e))return(await new n(U.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(V.isArrayBufferView(e)||V.isArrayBuffer(e))return e.byteLength;if(V.isURLSearchParams(e)&&(e+=``),V.isString(e))return(await c(e)).byteLength},p=async(e,t)=>V.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:ee,withCredentials:v=`same-origin`,fetchOptions:y}=Ri(e),te=t||fetch;_=_?(_+``).toLowerCase():`text`;let b=Bi([c,f&&f.toAbortSignal()],m),x=null,S=b&&b.unsubscribe&&(()=>{b.unsubscribe()}),ne;try{if(g&&l&&o!==`get`&&o!==`head`&&(ne=await p(ee,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(V.isFormData(s)&&(t=e.headers.get(`content-type`))&&ee.setContentType(t),e.body){let[t,n]=Ai(ne,ki(ji(g)));s=Wi(e.body,Gi,t,n)}}V.isString(v)||(v=v?`include`:`omit`);let t=a&&`credentials`in n.prototype,c={...y,signal:b,method:o.toUpperCase(),headers:ee.normalize().toJSON(),body:s,duplex:`half`,credentials:t?v:void 0};x=a&&new n(i,c);let f=await(a?te(x,y):te(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&S)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=V.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&Ai(t,ki(ji(h),!0))||[];f=new r(Wi(f.body,Gi,n,()=>{i&&i(),S&&S()}),e)}_||=`text`;let re=await d[V.findKey(d,_)||`text`](f,e);return!m&&S&&S(),await new Promise((t,n)=>{Ti(t,n,{data:re,headers:W.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:x})})}catch(t){throw S&&S(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new H(`Network Error`,H.ERR_NETWORK,e,x,t&&t.response),{cause:t.cause||t}):H.from(t,t&&t.code,e,x,t&&t.response)}}},Qi=new Map,$i=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Qi;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Zi(t)),l=c;return c};$i();var ea={http:null,xhr:zi,fetch:{get:$i}};V.forEach(ea,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var ta=e=>`- ${e}`,na=e=>V.isFunction(e)||e===null||e===!1;function ra(e,t){e=V.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!na(r)&&(i=ea[(n=String(r)).toLowerCase()],i===void 0))throw new H(`Unknown adapter '${n}'`);if(i&&(V.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new H(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
||
`+e.map(ta).join(`
|
||
`):` `+ta(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var ia={getAdapter:ra,adapters:ea};function aa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wi(null,e)}function oa(e){return aa(e),e.headers=W.from(e.headers),e.data=Si.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),ia.getAdapter(e.adapter||di.adapter,e)(e).then(function(t){return aa(e),t.data=Si.call(e,e.transformResponse,t),t.headers=W.from(t.headers),t},function(t){return Ci(t)||(aa(e),t&&t.response&&(t.response.data=Si.call(e,e.transformResponse,t.response),t.response.headers=W.from(t.response.headers))),Promise.reject(t)})}var sa=`1.14.0`,ca={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{ca[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var la={};ca.transitional=function(e,t,n){function r(e,t){return`[Axios v`+sa+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new H(r(i,` has been removed`+(t?` in `+t:``)),H.ERR_DEPRECATED);return t&&!la[i]&&(la[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},ca.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function ua(e,t,n){if(typeof e!=`object`)throw new H(`options must be an object`,H.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new H(`option `+a+` must be `+n,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H(`Unknown option `+a,H.ERR_BAD_OPTION)}}var da={assertOptions:ua,validators:ca},K=da.validators,q=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Zr,response:new Zr}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,``):``;try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,``))&&(e.stack+=`
|
||
`+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=G(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&da.assertOptions(n,{silentJSONParsing:K.transitional(K.boolean),forcedJSONParsing:K.transitional(K.boolean),clarifyTimeoutError:K.transitional(K.boolean),legacyInterceptorReqResOrdering:K.transitional(K.boolean)},!1),r!=null&&(V.isFunction(r)?t.paramsSerializer={serialize:r}:da.assertOptions(r,{encode:K.function,serialize:K.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),da.assertOptions(t,{baseUrl:K.spelling(`baseURL`),withXsrfToken:K.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&V.merge(i.common,i[t.method]);i&&V.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=W.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Qr;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[oa.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=oa.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=G(this.defaults,e),Xr(Ii(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};V.forEach([`delete`,`get`,`head`,`options`],function(e){q.prototype[e]=function(t,n){return this.request(G(n||{},{method:e,url:t,data:(n||{}).data}))}}),V.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(G(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}q.prototype[e]=t(),q.prototype[e+`Form`]=t(!0)});var fa=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new wi(e,r,i),t(n.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;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function pa(e){return function(t){return e.apply(null,t)}}function ma(e){return V.isObject(e)&&e.isAxiosError===!0}var ha={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ha).forEach(([e,t])=>{ha[t]=e});function ga(e){let t=new q(e),n=Mn(q.prototype.request,t);return V.extend(n,q.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return ga(G(e,t))},n}var J=ga(di);J.Axios=q,J.CanceledError=wi,J.CancelToken=fa,J.isCancel=Ci,J.VERSION=sa,J.toFormData=Gr,J.AxiosError=H,J.Cancel=J.CanceledError,J.all=function(e){return Promise.all(e)},J.spread=pa,J.isAxiosError=ma,J.mergeConfig=G,J.AxiosHeaders=W,J.formToJSON=e=>li(V.isHTMLForm(e)?new FormData(e):e),J.getAdapter=ia.getAdapter,J.HttpStatusCode=ha,J.default=J;var _a=`pymc_jwt_token`,va=`pymc_client_id`;function ya(){let e=localStorage.getItem(va);return e||(e=`${Date.now()}-${Math.random().toString(36).substring(2,15)}`,localStorage.setItem(va,e)),e}function Y(){return localStorage.getItem(_a)}function ba(e){localStorage.setItem(_a,e)}function xa(){localStorage.removeItem(_a)}function Sa(){return!!Y()&&!wa()}function Ca(e){try{let t=e.split(`.`)[1].replace(/-/g,`+`).replace(/_/g,`/`),n=decodeURIComponent(atob(t).split(``).map(e=>`%`+(`00`+e.charCodeAt(0).toString(16)).slice(-2)).join(``));return JSON.parse(n)}catch{return null}}function wa(){let e=Y();if(!e)return!0;let t=Ca(e);return!t||!t.exp?!0:Date.now()>=t.exp*1e3-3e4}function Ta(){let e=Y();if(!e)return!1;let t=Ca(e);if(!t||!t.exp)return!1;let n=t.exp*1e3-Date.now();return n>0&&n<3e5}function Ea(){let e=Y();if(!e)return null;let t=Ca(e);return!t||!t.sub?null:t.sub}var Da=`modulepreload`,Oa=function(e){return`/`+e},ka={},X=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Oa(t,n),t in ka)return;ka[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Da,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Aa=jn({history:Qt(`/`),routes:[{path:`/setup`,name:`setup`,component:()=>X(()=>import(`./Setup-BH1KCx1-.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),meta:{requiresAuth:!1,requiresSetup:!1}},{path:`/login`,name:`login`,component:()=>X(()=>import(`./Login-BZvzK4Y0.js`),__vite__mapDeps([19,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20])),meta:{requiresAuth:!1}},{path:`/`,name:`dashboard`,component:()=>X(()=>import(`./Dashboard-BPOf4Sny.js`),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,23,24,25,26,27,28,29])),meta:{requiresAuth:!0}},{path:`/neighbors`,name:`neighbors`,component:()=>X(()=>import(`./Neighbors-niOCi7jA.js`),__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,31,32,33,34,25,35])),meta:{requiresAuth:!0}},{path:`/statistics`,name:`statistics`,component:()=>X(()=>import(`./Statistics-O2PqmtYg.js`),__vite__mapDeps([36,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,37,38,39,40,41,28])),meta:{requiresAuth:!0}},{path:`/rf-health-correlation`,name:`rf-health-correlation`,component:()=>X(()=>import(`./RfHealthCorrelation-DwdXeM2U.js`),__vite__mapDeps([42,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,37,24,25,26,38,28,43])),meta:{requiresAuth:!0}},{path:`/neighbor-links`,name:`neighbor-links`,component:()=>X(()=>import(`./NeighbourLinks-CVha8cRp.js`),__vite__mapDeps([44,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,37,38,41])),meta:{requiresAuth:!0}},{path:`/gps`,name:`gps-diagnostics`,component:()=>X(()=>import(`./GPSDiagnostics-DPwhC0rG.js`),__vite__mapDeps([45,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,46])),meta:{requiresAuth:!0}},{path:`/system-stats`,name:`system-stats`,component:()=>X(()=>import(`./SystemStats-DGa00-z0.js`),__vite__mapDeps([47,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,37,39,40,28,48])),meta:{requiresAuth:!0}},{path:`/plugins`,name:`plugins`,component:()=>X(()=>import(`./Plugins-BolwYgk_.js`),__vite__mapDeps([49,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),meta:{requiresAuth:!0}},{path:`/sensors`,name:`sensors`,component:()=>X(()=>import(`./Sensors-BmokaFAs.js`),__vite__mapDeps([50,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),meta:{requiresAuth:!0}},{path:`/configuration`,name:`configuration`,component:()=>X(()=>import(`./Configuration-BS5B8g9k.js`),__vite__mapDeps([51,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,52,53,31,32,33,54,34,55])),meta:{requiresAuth:!0}},{path:`/cad-calibration`,name:`cad-calibration`,component:()=>X(()=>import(`./CADCalibration-CpDyFAzi.js`),__vite__mapDeps([56,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,57])),meta:{requiresAuth:!0}},{path:`/sessions`,name:`sessions`,component:()=>X(()=>import(`./Sessions-DRSuJ0uy.js`),__vite__mapDeps([58,4,5,52,6])),meta:{requiresAuth:!0}},{path:`/room-servers`,name:`room-servers`,component:()=>X(()=>import(`./RoomServers-BeQrWLvS.js`),__vite__mapDeps([59,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,52,53,31,32,33,54,60])),meta:{requiresAuth:!0}},{path:`/companions`,name:`companions`,component:()=>X(()=>import(`./Companions-DeW1oYBU.js`),__vite__mapDeps([61,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,52,60])),meta:{requiresAuth:!0}},{path:`/packet-archive`,name:`packet-archive`,component:()=>X(()=>import(`./PacketArchive-9qsKiViX.js`),__vite__mapDeps([62,4,23,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,24,25,26,27])),meta:{requiresAuth:!0}},{path:`/logs`,name:`logs`,component:()=>X(()=>import(`./Logs-B15LC3ei.js`),__vite__mapDeps([63,4,5,6])),meta:{requiresAuth:!0}},{path:`/terminal`,name:`terminal`,component:()=>X(()=>import(`./Terminal-DbKb9rc4.js`),__vite__mapDeps([64,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,65])),meta:{requiresAuth:!0}},{path:`/help`,name:`help`,component:()=>X(()=>import(`./Help-CPf1Rq4d.js`),__vite__mapDeps([66,4])),meta:{requiresAuth:!0}}]}),ja=!1;async function Ma(){if(ja)return!1;try{let e=await fetch(`/api/needs_setup`,{headers:{Accept:`application/json`}});if(!e.ok)return console.error(`Setup check failed:`,e.status),!1;let t=(await e.json()).needs_setup===!0;return t||(ja=!0),t}catch(e){return console.error(`Error checking setup status:`,e),!1}}Aa.beforeEach(async e=>{if(await Ma())return e.path===`/setup`?void 0:`/setup`;if(e.path===`/setup`)return`/login`;let t=e.meta.requiresAuth!==!1,n=Sa();if(t&&!n)return`/login`;if(e.path===`/login`&&n)return`/`});var Na=ke(`appRuntime`,()=>{let e=i(typeof navigator>`u`?!0:navigator.onLine),t=i(typeof document>`u`?!0:document.visibilityState===`visible`),n=i(!1),r=i(null),a=i(!1),o=y(()=>e.value&&t.value&&n.value&&!a.value);function s(){n.value=!!Y()&&!wa(),n.value||(r.value=r.value??`expired`)}function c(){n.value=!0,r.value=null,a.value=!1}function l(t){e.value=t}function u(e){t.value=e}async function d(e){if(a.value)return;a.value=!0,r.value=e,n.value=!1;let{useWebSocketStore:t}=await X(async()=>{let{useWebSocketStore:e}=await import(`./websocket--IA7Vjz3.js`);return{useWebSocketStore:e}},__vite__mapDeps([67,14,4,12,9,8,13])),{usePacketStore:i}=await X(async()=>{let{usePacketStore:e}=await import(`./packets-9J-Pb20s.js`);return{usePacketStore:e}},__vite__mapDeps([68,9,4])),{useSystemStore:o}=await X(async()=>{let{useSystemStore:e}=await import(`./system-0FEoONxW.js`);return{useSystemStore:e}},__vite__mapDeps([69,8,4,9])),{useDataService:s}=await X(async()=>{let{useDataService:e}=await import(`./dataService-DfMJb_XE.js`);return{useDataService:e}},__vite__mapDeps([70,12,4,9,8,13])),c=t(),l=i(),u=o(),d=s();c.disconnect({preventReconnect:!0,silent:e!==`logout`}),l.reset(),u.reset(),d.reset(),xa(),Aa.currentRoute.value.path!==`/login`&&await Aa.push(`/login`),a.value=!1}async function f(e){await d(e)}return{isOnline:e,isDocumentVisible:t,isAuthenticated:n,authFailureReason:r,canMaintainConnections:o,syncAuthState:s,markAuthenticated:c,setOnline:l,setDocumentVisible:u,stopSession:d,handleAuthFailure:f}}),Z=function(e){return e.Json=`application/json`,e.JsonApi=`application/vnd.api+json`,e.FormData=`multipart/form-data`,e.UrlEncoded=`application/x-www-form-urlencoded`,e.Text=`text/plain`,e}({}),Pa=class{baseUrl=`/api`;securityData=null;securityWorker;abortControllers=new Map;customFetch=(...e)=>fetch(...e);baseApiParams={credentials:`same-origin`,headers:{},redirect:`follow`,referrerPolicy:`no-referrer`};constructor(e={}){Object.assign(this,e)}setSecurityData=e=>{this.securityData=e};encodeQueryParam(e,t){return`${encodeURIComponent(e)}=${encodeURIComponent(typeof t==`number`?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addArrayQueryParam(e,t){return e[t].map(e=>this.encodeQueryParam(t,e)).join(`&`)}toQueryString(e){let t=e||{};return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>Array.isArray(t[e])?this.addArrayQueryParam(t,e):this.addQueryParam(t,e)).join(`&`)}addQueryParams(e){let t=this.toQueryString(e);return t?`?${t}`:``}contentFormatters={[Z.Json]:e=>e!==null&&(typeof e==`object`||typeof e==`string`)?JSON.stringify(e):e,[Z.JsonApi]:e=>e!==null&&(typeof e==`object`||typeof e==`string`)?JSON.stringify(e):e,[Z.Text]:e=>e!==null&&typeof e!=`string`?JSON.stringify(e):e,[Z.FormData]:e=>e instanceof FormData?e:Object.keys(e||{}).reduce((t,n)=>{let r=e[n];return t.append(n,r instanceof Blob?r:typeof r==`object`&&r?JSON.stringify(r):`${r}`),t},new FormData),[Z.UrlEncoded]:e=>this.toQueryString(e)};mergeRequestParams(e,t){return{...this.baseApiParams,...e,...t||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...t&&t.headers||{}}}}createAbortSignal=e=>{if(this.abortControllers.has(e)){let t=this.abortControllers.get(e);return t?t.signal:void 0}let t=new AbortController;return this.abortControllers.set(e,t),t.signal};abortRequest=e=>{let t=this.abortControllers.get(e);t&&(t.abort(),this.abortControllers.delete(e))};request=async({body:e,secure:t,path:n,type:r,query:i,format:a,baseUrl:o,cancelToken:s,...c})=>{let l=(typeof t==`boolean`?t:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(c,l),d=i&&this.toQueryString(i),f=this.contentFormatters[r||Z.Json],p=a||u.format;return this.customFetch(`${o||this.baseUrl||``}${n}${d?`?${d}`:``}`,{...u,headers:{...u.headers||{},...r&&r!==Z.FormData?{"Content-Type":r}:{}},signal:(s?this.createAbortSignal(s):u.signal)||null,body:e==null?null:f(e)}).then(async e=>{let t=e;t.data=null,t.error=null;let n=p?e.clone():e,r=p?await n[p]().then(e=>(t.ok?t.data=e:t.error=e,t)).catch(e=>(t.error=e,t)):t;if(s&&this.abortControllers.delete(s),!e.ok)throw r;return r})}},Q=new class extends Pa{auth={loginCreate:(e,t={})=>this.request({path:`/auth/login`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),refreshCreate:(e,t={})=>this.request({path:`/auth/refresh`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t}),verifyList:(e={})=>this.request({path:`/auth/verify`,method:`GET`,secure:!0,format:`json`,...e}),changePasswordCreate:(e,t={})=>this.request({path:`/auth/change_password`,method:`POST`,body:e,secure:!0,type:Z.Json,...t}),tokensList:(e={})=>this.request({path:`/auth/tokens`,method:`GET`,secure:!0,format:`json`,...e}),tokensCreate:(e,t={})=>this.request({path:`/auth/tokens`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t}),tokensDelete:(e,t={})=>this.request({path:`/auth/tokens/${e}`,method:`DELETE`,secure:!0,...t})};stats={statsList:(e={})=>this.request({path:`/stats`,method:`GET`,format:`json`,...e})};gps={getGps:(e={})=>this.request({path:`/gps`,method:`GET`,secure:!0,format:`json`,...e})};gpsStream={gpsStreamList:(e={})=>this.request({path:`/gps_stream`,method:`GET`,...e})};sendAdvert={sendAdvertCreate:(e,t={})=>this.request({path:`/send_advert`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};logs={logsList:(e={})=>this.request({path:`/logs`,method:`GET`,format:`json`,...e})};logsStream={logsStreamList:(e,t={})=>this.request({path:`/logs_stream`,method:`GET`,query:e,...t})};hardwareStats={hardwareStatsList:(e={})=>this.request({path:`/hardware_stats`,method:`GET`,format:`json`,...e})};hardwareProcesses={hardwareProcessesList:(e={})=>this.request({path:`/hardware_processes`,method:`GET`,format:`json`,...e})};restartService={restartServiceCreate:(e={})=>this.request({path:`/restart_service`,method:`POST`,secure:!0,format:`json`,...e})};validateConfig={validateConfigList:(e={})=>this.request({path:`/validate_config`,method:`GET`,secure:!0,format:`json`,...e})};openapi={openapiList:(e={})=>this.request({path:`/openapi`,method:`GET`,format:`json`,...e})};setMode={setModeCreate:(e,t={})=>this.request({path:`/set_mode`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};packetStats={packetStatsList:(e,t={})=>this.request({path:`/packet_stats`,method:`GET`,query:e,format:`json`,...t})};setDutyCycle={setDutyCycleCreate:(e,t={})=>this.request({path:`/set_duty_cycle`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};updateDutyCycleConfig={updateDutyCycleConfigCreate:(e,t={})=>this.request({path:`/update_duty_cycle_config`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};updateRadioConfig={updateRadioConfigCreate:(e,t={})=>this.request({path:`/update_radio_config`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};sensorsTypes={sensorsTypesList:(e={})=>this.request({path:`/sensors_types`,method:`GET`,format:`json`,...e})};sensorsConfig={sensorsConfigList:(e={})=>this.request({path:`/sensors_config`,method:`GET`,format:`json`,...e})};sensorsConfigUpdate={sensorsConfigUpdateCreate:(e,t={})=>this.request({path:`/sensors_config_update`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};sensorsRead={sensorsReadCreate:(e={})=>this.request({path:`/sensors_read`,method:`POST`,format:`json`,...e})};recentPackets={recentPacketsList:(e,t={})=>this.request({path:`/recent_packets`,method:`GET`,query:e,format:`json`,...t})};packetByHash={packetByHashList:(e,t={})=>this.request({path:`/packet_by_hash`,method:`GET`,query:e,...t})};packetById={packetByIdList:(e,t={})=>this.request({path:`/packet_by_id`,method:`GET`,query:e,...t})};packetTypeStats={packetTypeStatsList:(e,t={})=>this.request({path:`/packet_type_stats`,method:`GET`,query:e,format:`json`,...t})};routeStats={routeStatsList:(e,t={})=>this.request({path:`/route_stats`,method:`GET`,query:e,format:`json`,...t})};filteredPackets={filteredPacketsList:(e,t={})=>this.request({path:`/filtered_packets`,method:`GET`,query:e,format:`json`,...t})};neighborLinks={neighborLinksList:(e,t={})=>this.request({path:`/neighbor_links`,method:`GET`,query:e,format:`json`,...t})};neighborLinkHistory={neighborLinkHistoryList:(e,t={})=>this.request({path:`/neighbor_link_history`,method:`GET`,query:e,format:`json`,...t})};rrdData={rrdDataList:(e={})=>this.request({path:`/rrd_data`,method:`GET`,format:`json`,...e})};packetTypeGraphData={packetTypeGraphDataList:(e,t={})=>this.request({path:`/packet_type_graph_data`,method:`GET`,query:e,format:`json`,...t})};metricsGraphData={metricsGraphDataList:(e,t={})=>this.request({path:`/metrics_graph_data`,method:`GET`,query:e,format:`json`,...t})};lbtDiagnostics={lbtDiagnosticsList:(e,t={})=>this.request({path:`/lbt_diagnostics`,method:`GET`,query:e,format:`json`,...t})};noiseFloorHistory={noiseFloorHistoryList:(e,t={})=>this.request({path:`/noise_floor_history`,method:`GET`,query:e,format:`json`,...t})};noiseFloorStats={noiseFloorStatsList:(e,t={})=>this.request({path:`/noise_floor_stats`,method:`GET`,query:e,format:`json`,...t})};noiseFloorChartData={noiseFloorChartDataList:(e,t={})=>this.request({path:`/noise_floor_chart_data`,method:`GET`,query:e,format:`json`,...t})};cadCalibrationStart={cadCalibrationStartCreate:(e,t={})=>this.request({path:`/cad_calibration_start`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};cadCalibrationStop={cadCalibrationStopCreate:(e={})=>this.request({path:`/cad_calibration_stop`,method:`POST`,format:`json`,...e})};cadManualCheck={cadManualCheckCreate:(e,t={})=>this.request({path:`/cad_manual_check`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};saveCadSettings={saveCadSettingsCreate:(e,t={})=>this.request({path:`/save_cad_settings`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};cadCalibrationStream={cadCalibrationStreamList:(e={})=>this.request({path:`/cad_calibration_stream`,method:`GET`,...e})};advertsByContactType={advertsByContactTypeList:(e,t={})=>this.request({path:`/adverts_by_contact_type`,method:`GET`,query:e,format:`json`,...t})};advert={advertDelete:(e,t={})=>this.request({path:`/advert`,method:`DELETE`,query:e,format:`json`,...t})};transportKeys={transportKeysList:(e={})=>this.request({path:`/transport_keys`,method:`GET`,secure:!0,format:`json`,...e}),transportKeysCreate:(e,t={})=>this.request({path:`/transport_keys`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};transportKey={transportKeyList:(e,t={})=>this.request({path:`/transport_key`,method:`GET`,query:e,secure:!0,format:`json`,...t}),transportKeyUpdate:(e,t,n={})=>this.request({path:`/transport_key`,method:`PUT`,query:e,body:t,secure:!0,type:Z.Json,format:`json`,...n}),transportKeyDelete:(e,t={})=>this.request({path:`/transport_key`,method:`DELETE`,query:e,secure:!0,format:`json`,...t})};unscopedFloodPolicy={unscopedFloodPolicyCreate:(e,t={})=>this.request({path:`/unscoped_flood_policy`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};defaultRegion={defaultRegionList:(e={})=>this.request({path:`/default_region`,method:`GET`,secure:!0,format:`json`,...e}),defaultRegionCreate:(e,t={})=>this.request({path:`/default_region`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};pingNeighbor={pingNeighborCreate:(e,t={})=>this.request({path:`/ping_neighbor`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};discoverNeighborsStart={discoverNeighborsStartCreate:(e,t={})=>this.request({path:`/discover_neighbors_start`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};discoverNeighborsStream={discoverNeighborsStreamList:(e,t={})=>this.request({path:`/discover_neighbors_stream`,method:`GET`,query:e,secure:!0,...t})};addDiscoveredNeighbor={addDiscoveredNeighborCreate:(e,t={})=>this.request({path:`/add_discovered_neighbor`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};policy={policyList:(e={})=>this.request({path:`/policy`,method:`GET`,secure:!0,format:`json`,...e}),policyCreate:(e,t={})=>this.request({path:`/policy`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};policyValidate={policyValidateCreate:(e,t={})=>this.request({path:`/policy_validate`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};policyGroups={policyGroupsList:(e,t={})=>this.request({path:`/policy_groups`,method:`GET`,query:e,secure:!0,format:`json`,...t}),policyGroupsCreate:(e,t={})=>this.request({path:`/policy_groups`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t}),policyGroupsDelete:(e,t={})=>this.request({path:`/policy_groups`,method:`DELETE`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};policyGroupEntries={policyGroupEntriesList:(e,t={})=>this.request({path:`/policy_group_entries`,method:`GET`,query:e,secure:!0,format:`json`,...t}),policyGroupEntriesCreate:(e,t={})=>this.request({path:`/policy_group_entries`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t}),policyGroupEntriesDelete:(e,t={})=>this.request({path:`/policy_group_entries`,method:`DELETE`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};createIdentity={createIdentityCreate:(e,t={})=>this.request({path:`/create_identity`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};identities={identitiesList:(e={})=>this.request({path:`/identities`,method:`GET`,format:`json`,...e})};identity={identityList:(e,t={})=>this.request({path:`/identity`,method:`GET`,query:e,format:`json`,...t})};updateIdentity={updateIdentityUpdate:(e,t={})=>this.request({path:`/update_identity`,method:`PUT`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};deleteIdentity={deleteIdentityDelete:(e,t={})=>this.request({path:`/delete_identity`,method:`DELETE`,query:e,secure:!0,format:`json`,...t})};sendRoomServerAdvert={sendRoomServerAdvertCreate:(e,t={})=>this.request({path:`/send_room_server_advert`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};aclInfo={aclInfoList:(e={})=>this.request({path:`/acl_info`,method:`GET`,format:`json`,...e})};aclClients={aclClientsList:(e,t={})=>this.request({path:`/acl_clients`,method:`GET`,query:e,format:`json`,...t})};aclRemoveClient={aclRemoveClientCreate:(e,t={})=>this.request({path:`/acl_remove_client`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};aclSetPermissions={aclSetPermissionsCreate:(e,t={})=>this.request({path:`/acl_set_permissions`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};aclStats={aclStatsList:(e={})=>this.request({path:`/acl_stats`,method:`GET`,format:`json`,...e})};roomMessages={roomMessagesList:(e,t={})=>this.request({path:`/room_messages`,method:`GET`,query:e,format:`json`,...t})};roomPostMessage={roomPostMessageCreate:(e,t={})=>this.request({path:`/room_post_message`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};roomStats={roomStatsList:(e,t={})=>this.request({path:`/room_stats`,method:`GET`,query:e,format:`json`,...t})};roomClients={roomClientsList:(e,t={})=>this.request({path:`/room_clients`,method:`GET`,query:e,format:`json`,...t})};roomMessage={roomMessageDelete:(e,t={})=>this.request({path:`/room_message`,method:`DELETE`,query:e,...t})};roomMessagesClear={roomMessagesClearDelete:(e,t={})=>this.request({path:`/room_messages_clear`,method:`DELETE`,query:e,format:`json`,...t})};needsSetup={needsSetupList:(e={})=>this.request({path:`/needs_setup`,method:`GET`,format:`json`,...e})};siteInfo={siteInfoList:(e={})=>this.request({path:`/site_info`,method:`GET`,format:`json`,...e})};hardwareOptions={hardwareOptionsList:(e={})=>this.request({path:`/hardware_options`,method:`GET`,format:`json`,...e})};radioPresets={radioPresetsList:(e={})=>this.request({path:`/radio_presets`,method:`GET`,format:`json`,...e})};serialPorts={serialPortsList:(e={})=>this.request({path:`/serial_ports`,method:`GET`,format:`json`,...e})};setupWizard={setupWizardCreate:(e,t={})=>this.request({path:`/setup_wizard`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};webFrontends={webFrontendsList:(e={})=>this.request({path:`/web_frontends`,method:`GET`,format:`json`,...e})};checkPymcConsole={checkPymcConsoleList:(e={})=>this.request({path:`/check_pymc_console`,method:`GET`,format:`json`,...e})};mqttStatus={mqttStatusList:(e={})=>this.request({path:`/mqtt_status`,method:`GET`,format:`json`,...e})};brokerPresets={brokerPresetsList:(e={})=>this.request({path:`/broker_presets`,method:`GET`,format:`json`,...e})};publishNeighbors={publishNeighborsCreate:(e={})=>this.request({path:`/publish_neighbors`,method:`POST`,secure:!0,format:`json`,...e})};neighborScopes={neighborScopesList:(e={})=>this.request({path:`/neighbor_scopes`,method:`GET`,secure:!0,format:`json`,...e})};queryNeighborScopes={queryNeighborScopesCreate:(e,t={})=>this.request({path:`/query_neighbor_scopes`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};updateWebConfig={updateWebConfigCreate:(e,t={})=>this.request({path:`/update_web_config`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};updateMqttConfig={updateMqttConfigCreate:(e,t={})=>this.request({path:`/update_mqtt_config`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};updateAdvertRateLimitConfig={updateAdvertRateLimitConfigCreate:(e,t={})=>this.request({path:`/update_advert_rate_limit_config`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};bulkPackets={bulkPacketsList:(e,t={})=>this.request({path:`/bulk_packets`,method:`GET`,query:e,format:`json`,...t})};airtimeData={airtimeDataList:(e,t={})=>this.request({path:`/airtime_data`,method:`GET`,query:e,format:`json`,...t})};radioPacketRates={radioPacketRatesList:(e,t={})=>this.request({path:`/radio_packet_rates`,method:`GET`,query:e,format:`json`,...t})};airtimeChartData={airtimeChartDataList:(e,t={})=>this.request({path:`/airtime_chart_data`,method:`GET`,query:e,format:`json`,...t})};advertsCountByContactType={advertsCountByContactTypeList:(e,t={})=>this.request({path:`/adverts_count_by_contact_type`,method:`GET`,query:e,format:`json`,...t})};advertRateLimitStats={advertRateLimitStatsList:(e={})=>this.request({path:`/advert_rate_limit_stats`,method:`GET`,format:`json`,...e})};crcErrorCount={crcErrorCountList:(e,t={})=>this.request({path:`/crc_error_count`,method:`GET`,query:e,format:`json`,...t})};crcErrorHistory={crcErrorHistoryList:(e,t={})=>this.request({path:`/crc_error_history`,method:`GET`,query:e,format:`json`,...t})};memoryDebug={memoryDebugList:(e={})=>this.request({path:`/memory_debug`,method:`GET`,format:`json`,...e}),memoryDebugCreate:(e,t={})=>this.request({path:`/memory_debug`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};configExport={configExportList:(e,t={})=>this.request({path:`/config_export`,method:`GET`,query:e,format:`json`,...t})};configImport={configImportCreate:(e,t={})=>this.request({path:`/config_import`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};identityExport={identityExportList:(e={})=>this.request({path:`/identity_export`,method:`GET`,format:`json`,...e})};generateVanityKey={generateVanityKeyCreate:(e,t={})=>this.request({path:`/generate_vanity_key`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};dbStats={dbStatsList:(e={})=>this.request({path:`/db_stats`,method:`GET`,format:`json`,...e})};dbPurge={dbPurgeCreate:(e,t={})=>this.request({path:`/db_purge`,method:`POST`,body:e,type:Z.Json,format:`json`,...t})};dbVacuum={dbVacuumCreate:(e={})=>this.request({path:`/db_vacuum`,method:`POST`,format:`json`,...e})};docs={docsList:(e={})=>this.request({path:`/docs`,method:`GET`,...e})};api={authTokensList:(e={})=>this.request({path:`/api/auth/tokens`,method:`GET`,format:`json`,...e}),authTokensCreate:(e,t={})=>this.request({path:`/api/auth/tokens`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),authTokensDelete:(e,t={})=>this.request({path:`/api/auth/tokens/${e}`,method:`DELETE`,format:`json`,...t})};companion={companionList:(e={})=>this.request({path:`/companion`,method:`GET`,format:`json`,...e}),selfInfoList:(e={})=>this.request({path:`/companion/self_info`,method:`GET`,format:`json`,...e}),contactsList:(e={})=>this.request({path:`/companion/contacts`,method:`GET`,format:`json`,...e}),contactList:(e,t={})=>this.request({path:`/companion/contact`,method:`GET`,query:e,format:`json`,...t}),importRepeaterContactsCreate:(e,t={})=>this.request({path:`/companion/import_repeater_contacts`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),channelsList:(e={})=>this.request({path:`/companion/channels`,method:`GET`,format:`json`,...e}),statsList:(e={})=>this.request({path:`/companion/stats`,method:`GET`,format:`json`,...e}),sendTextCreate:(e,t={})=>this.request({path:`/companion/send_text`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),sendChannelMessageCreate:(e,t={})=>this.request({path:`/companion/send_channel_message`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),loginCreate:(e,t={})=>this.request({path:`/companion/login`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),requestStatusCreate:(e={})=>this.request({path:`/companion/request_status`,method:`POST`,format:`json`,...e}),requestTelemetryCreate:(e={})=>this.request({path:`/companion/request_telemetry`,method:`POST`,format:`json`,...e}),sendCommandCreate:(e,t={})=>this.request({path:`/companion/send_command`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),resetPathCreate:(e={})=>this.request({path:`/companion/reset_path`,method:`POST`,format:`json`,...e}),setAdvertNameCreate:(e,t={})=>this.request({path:`/companion/set_advert_name`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),setAdvertLocationCreate:(e,t={})=>this.request({path:`/companion/set_advert_location`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),eventsList:(e={})=>this.request({path:`/companion/events`,method:`GET`,...e})};update={statusList:(e={})=>this.request({path:`/update/status`,method:`GET`,format:`json`,...e}),checkList:(e={})=>this.request({path:`/update/check`,method:`GET`,format:`json`,...e}),checkCreate:(e,t={})=>this.request({path:`/update/check`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),installCreate:(e,t={})=>this.request({path:`/update/install`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),progressList:(e={})=>this.request({path:`/update/progress`,method:`GET`,...e}),channelsList:(e={})=>this.request({path:`/update/channels`,method:`GET`,format:`json`,...e}),setChannelCreate:(e,t={})=>this.request({path:`/update/set_channel`,method:`POST`,body:e,type:Z.Json,format:`json`,...t}),changelogList:(e={})=>this.request({path:`/update/changelog`,method:`GET`,format:`json`,...e})};cli={postCli:(e,t={})=>this.request({path:`/cli`,method:`POST`,body:e,secure:!0,type:Z.Json,format:`json`,...t})};plugins={pluginsList:(e={})=>this.request({path:`/plugins`,method:`GET`,secure:!0,format:`json`,...e}),catalogueList:(e,t={})=>this.request({path:`/plugins/catalogue`,method:`GET`,query:e,...t}),catalogueInstallCreate:(e,t={})=>this.request({path:`/plugins/catalogue_install`,method:`POST`,body:e,type:Z.Json,...t}),updatesList:(e,t={})=>this.request({path:`/plugins/updates`,method:`GET`,query:e,...t}),updateCreate:(e,t={})=>this.request({path:`/plugins/update`,method:`POST`,body:e,type:Z.Json,...t}),progressList:(e,t={})=>this.request({path:`/plugins/progress`,method:`GET`,query:e,secure:!0,...t}),settingsList:(e,t={})=>this.request({path:`/plugins/settings`,method:`GET`,query:e,secure:!0,...t}),settingsCreate:(e,t={})=>this.request({path:`/plugins/settings`,method:`POST`,body:e,secure:!0,type:Z.Json,...t}),runtimeList:(e,t={})=>this.request({path:`/plugins/runtime`,method:`GET`,query:e,secure:!0,...t}),installCreate:(e,t={})=>this.request({path:`/plugins/install`,method:`POST`,body:e,secure:!0,type:Z.FormData,...t}),enableCreate:(e,t={})=>this.request({path:`/plugins/enable`,method:`POST`,body:e,secure:!0,type:Z.Json,...t}),disableCreate:(e,t={})=>this.request({path:`/plugins/disable`,method:`POST`,body:e,secure:!0,type:Z.Json,...t}),startCreate:(e,t={})=>this.request({path:`/plugins/start`,method:`POST`,body:e,secure:!0,type:Z.Json,...t}),stopCreate:(e,t={})=>this.request({path:`/plugins/stop`,method:`POST`,body:e,secure:!0,type:Z.Json,...t}),restartCreate:(e,t={})=>this.request({path:`/plugins/restart`,method:`POST`,body:e,secure:!0,type:Z.Json,...t}),logsList:(e,t={})=>this.request({path:`/plugins/logs`,method:`GET`,query:e,secure:!0,format:`json`,...t}),uninstallCreate:(e,t={})=>this.request({path:`/plugins/uninstall`,method:`POST`,body:e,secure:!0,type:Z.Json,...t}),pluginsDetail:(e,t={})=>this.request({path:`/plugins/${e}`,method:`GET`,secure:!0,format:`json`,...t}),pluginsDelete:(e,t,n={})=>this.request({path:`/plugins/${e}`,method:`DELETE`,query:t,secure:!0,...n})}}({baseUrl:`/api`}),Fa=e=>{if(e)return Object.fromEntries(new Headers(e).entries())},Ia=`/api`,La=!1,Ra=null;async function za(){return La&&Ra?Ra:(La=!0,Ra=(async()=>{try{let e=Y();if(!e)throw Error(`No token to refresh`);let t=ya(),n=await J.post(`/auth/refresh`,{client_id:t},{headers:{Authorization:`Bearer ${e}`,"Content-Type":`application/json`}});if(n.data.success&&n.data.token){let e=n.data.token;return ba(e),e}else throw Error(`Token refresh failed`)}catch(e){throw console.error(`Token refresh error:`,e),await Na().handleAuthFailure(`expired`),e}finally{La=!1,Ra=null}})(),Ra)}var $=J.create({baseURL:Ia,timeout:1e4,headers:{"Content-Type":`application/json`}}),Ba=J.create({baseURL:``,timeout:1e4,headers:{"Content-Type":`application/json`}});Ba.interceptors.request.use(async e=>{if(e.url?.includes(`/auth/login`)||e.url?.includes(`/auth/refresh`))return e;let t=Y();if(t){if(Ta())try{let t=await za();return e.headers.Authorization=`Bearer ${t}`,e}catch(e){return Promise.reject(e)}if(wa())return Na().handleAuthFailure(`expired`),Promise.reject(Error(`Token expired`));e.headers.Authorization=`Bearer ${t}`}return e},e=>(console.error(`Auth API Request Error:`,e),Promise.reject(e))),Ba.interceptors.response.use(e=>e,e=>{if(e.response?.status===401||e.response?.status===403){let t=(e.config?.headers?.Authorization)?.replace(`Bearer `,``),n=Y();(!t||t===n)&&Na().handleAuthFailure(e.response?.status===403?`forbidden`:`unauthorized`)}return console.error(`Auth API Response Error:`,e.response?.data||e.message),Promise.reject(e)}),$.interceptors.request.use(async e=>{if(e.url?.includes(`/auth/login`))return e;let t=Y();if(t){if(Ta())try{let t=await za();return e.headers.Authorization=`Bearer ${t}`,e}catch(e){return Promise.reject(e)}if(wa())return Na().handleAuthFailure(`expired`),Promise.reject(Error(`Token expired`));e.headers.Authorization=`Bearer ${t}`}return e},e=>(console.error(`API Request Error:`,e),Promise.reject(e))),$.interceptors.response.use(e=>e,e=>{if(e.response?.status===401||e.response?.status===403){let t=(e.config?.headers?.Authorization)?.replace(`Bearer `,``),n=Y();(!t||t===n)&&Na().handleAuthFailure(e.response?.status===403?`forbidden`:`unauthorized`)}return console.error(`API Response Error:`,e.response?.data||e.message),Promise.reject(e)});var Va=class{static async resolveRequestToken(){let e=Y();if(e){if(Ta())return za();if(wa())throw Na().handleAuthFailure(`expired`),Error(`Token expired`);return e}}static async getGeneratedRequestParams(){let e=await this.resolveRequestToken();return e?{headers:{Authorization:`Bearer ${e}`}}:{}}static async get(e,t,n){try{return(await $.get(e,{params:t,...n})).data}catch(e){throw this.handleError(e)}}static async post(e,t,n){try{return(await $.post(e,t,n)).data}catch(e){throw this.handleError(e)}}static async put(e,t,n){try{return(await $.put(e,t,n)).data}catch(e){throw this.handleError(e)}}static async delete(e,t){try{return(await $.delete(e,t)).data}catch(e){throw this.handleError(e)}}static async getTransportKeys(){try{let e=await this.getGeneratedRequestParams();return(await Q.transportKeys.transportKeysList(e)).data}catch(e){throw this.handleError(e)}}static async sendAdvert(){try{let e=await this.getGeneratedRequestParams();return(await Q.sendAdvert.sendAdvertCreate(void 0,e)).data}catch(e){throw this.handleError(e)}}static async getGpsDiagnostics(){try{let e=await this.getGeneratedRequestParams();return(await Q.gps.getGps(e)).data}catch(e){throw this.handleError(e)}}static async getSerialPorts(){try{let e=await this.getGeneratedRequestParams();return(await Q.serialPorts.serialPortsList(e)).data}catch(e){throw this.handleError(e)}}static async getLbtDiagnostics(e){try{let t=await this.getGeneratedRequestParams();return(await Q.lbtDiagnostics.lbtDiagnosticsList(e,t)).data}catch(e){throw this.handleError(e)}}static async getNeighborLinks(e){try{let t=await this.getGeneratedRequestParams();return(await Q.neighborLinks.neighborLinksList(e,t)).data}catch(e){throw this.handleError(e)}}static async getNeighborLinkHistory(e,t){try{let n=await this.getGeneratedRequestParams();return(await Q.neighborLinkHistory.neighborLinkHistoryList(e,{...n,signal:t?.signal})).data}catch(e){throw this.handleError(e)}}static async createTransportKey(e,t,n,r,i){let a={name:e,flood_policy:t,parent_id:r,last_used:i};n!==void 0&&(a.transport_key=n);try{let e=await this.getGeneratedRequestParams();return(await Q.transportKeys.transportKeysCreate(a,e)).data}catch(e){throw this.handleError(e)}}static async getTransportKey(e){try{let t=await this.getGeneratedRequestParams();return(await Q.transportKey.transportKeyList({key_id:String(e)},t)).data}catch(e){throw this.handleError(e)}}static async updateTransportKey(e,t,n,r,i,a){try{let o=await this.getGeneratedRequestParams();return(await Q.transportKey.transportKeyUpdate({key_id:String(e)},{name:t,flood_policy:n,transport_key:r,parent_id:i,last_used:a},o)).data}catch(e){throw this.handleError(e)}}static async deleteTransportKey(e){try{let t=await this.getGeneratedRequestParams();return(await Q.transportKey.transportKeyDelete({key_id:String(e)},t)).data}catch(e){throw this.handleError(e)}}static async updateUnscopedFloodPolicy(e){try{let t=await this.getGeneratedRequestParams();return(await Q.unscopedFloodPolicy.unscopedFloodPolicyCreate({unscoped_flood_allow:e},t)).data}catch(e){throw this.handleError(e)}}static async getDefaultRegion(){try{let e=await this.getGeneratedRequestParams();return(await Q.defaultRegion.defaultRegionList(e)).data}catch(e){throw this.handleError(e)}}static async updateDefaultRegion(e){try{let t=await this.getGeneratedRequestParams();return(await Q.defaultRegion.defaultRegionCreate({default_region:e},t)).data}catch(e){throw this.handleError(e)}}static async getPolicyDocument(){try{let e=await this.getGeneratedRequestParams();return(await Q.policy.policyList(e)).data}catch(e){throw this.handleError(e)}}static async updatePolicyDocument(e){try{let t=await this.getGeneratedRequestParams();return(await Q.policy.policyCreate(e,t)).data}catch(e){throw this.handleError(e)}}static async validatePolicyDocument(e){try{let t=await this.getGeneratedRequestParams();return(await Q.policyValidate.policyValidateCreate(e,t)).data}catch(e){throw this.handleError(e)}}static async getPolicyGroups(e){try{let t=await this.getGeneratedRequestParams();return(await Q.policyGroups.policyGroupsList(e?{kind:e}:void 0,t)).data}catch(e){throw this.handleError(e)}}static async createPolicyGroup(e){try{let t=await this.getGeneratedRequestParams();return(await Q.policyGroups.policyGroupsCreate(e,t)).data}catch(e){throw this.handleError(e)}}static async deletePolicyGroup(e){try{let t=await this.getGeneratedRequestParams();return(await $.delete(`/policy_groups`,{headers:Fa(t.headers),data:e,params:e})).data}catch(e){throw this.handleError(e)}}static async getPolicyGroupEntries(e){try{let t=await this.getGeneratedRequestParams();return(await Q.policyGroupEntries.policyGroupEntriesList(e,t)).data}catch(e){throw this.handleError(e)}}static async createPolicyGroupEntry(e){try{let t=await this.getGeneratedRequestParams();return(await Q.policyGroupEntries.policyGroupEntriesCreate(e,t)).data}catch(e){throw this.handleError(e)}}static async deletePolicyGroupEntry(e){try{let t=await this.getGeneratedRequestParams();return(await $.delete(`/policy_group_entries`,{headers:Fa(t.headers),data:e,params:e})).data}catch(e){throw this.handleError(e)}}static async getLogs(){try{let e=await this.getGeneratedRequestParams();return(await Q.logs.logsList(e)).data}catch(e){throw this.handleError(e)}}static async deleteAdvert(e){try{let t=await this.getGeneratedRequestParams();return(await Q.advert.advertDelete({advert_id:e},t)).data}catch(e){throw this.handleError(e)}}static async pingNeighbor(e,t=10){try{let n=await this.getGeneratedRequestParams();return(await Q.pingNeighbor.pingNeighborCreate({target_id:e,timeout:t},n)).data}catch(e){throw this.handleError(e)}}static async startNeighborDiscovery(e=5,t=4,n=0,r=!1){try{let i=await this.getGeneratedRequestParams();return(await Q.discoverNeighborsStart.discoverNeighborsStartCreate({timeout:e,filter_mask:t,since:n,prefix_only:r},i)).data}catch(e){throw this.handleError(e)}}static getNeighborDiscoveryStreamUrl(e,t){let n=new URLSearchParams({session_id:e}),r=Y();return r&&n.set(`token`,r),t!==void 0&&n.set(`last_event_id`,String(t)),`${Ia}/discover_neighbors_stream?${n.toString()}`}static async addDiscoveredNeighbor(e){try{let t=await this.getGeneratedRequestParams();return(await Q.addDiscoveredNeighbor.addDiscoveredNeighborCreate(e,t)).data}catch(e){throw this.handleError(e)}}static async getNeighborScopes(){try{let e=await this.getGeneratedRequestParams();return(await Q.neighborScopes.neighborScopesList(e)).data}catch(e){throw this.handleError(e)}}static async queryNeighborScopes(e){try{let t=await this.getGeneratedRequestParams();return(await Q.queryNeighborScopes.queryNeighborScopesCreate({pubkey:e},t)).data}catch(e){throw this.handleError(e)}}static async getIdentities(){try{let e=await this.getGeneratedRequestParams();return(await Q.identities.identitiesList(e)).data}catch(e){throw this.handleError(e)}}static async getIdentity(e){try{let t=await this.getGeneratedRequestParams();return(await Q.identity.identityList({name:e},t)).data}catch(e){throw this.handleError(e)}}static async createIdentity(e){try{let t=await this.getGeneratedRequestParams();if(e.type!==`companion`&&e.type!==`room_server`)throw Error(`Unsupported identity type: ${e.type}`);return(await Q.createIdentity.createIdentityCreate({name:e.name,identity_key:e.identity_key,type:e.type,settings:e.settings},t)).data}catch(e){throw this.handleError(e)}}static async updateIdentity(e){try{let t=await this.getGeneratedRequestParams(),n={type:e.type,name:e.name,new_name:e.new_name,identity_key:e.identity_key,settings:e.settings};return(await Q.updateIdentity.updateIdentityUpdate(n,t)).data}catch(e){throw this.handleError(e)}}static async deleteIdentity(e,t=`room_server`){try{let n=await this.getGeneratedRequestParams();return(await Q.deleteIdentity.deleteIdentityDelete({name:e,type:t},n)).data}catch(e){throw this.handleError(e)}}static async sendRoomServerAdvert(e){try{let t=await this.getGeneratedRequestParams();return(await Q.sendRoomServerAdvert.sendRoomServerAdvertCreate({name:e},t)).data}catch(e){throw this.handleError(e)}}static async importRepeaterContacts(e){try{let t=await this.getGeneratedRequestParams();return(await Q.companion.importRepeaterContactsCreate(e,t)).data}catch(e){throw this.handleError(e)}}static async getACLInfo(){try{let e=await this.getGeneratedRequestParams();return(await Q.aclInfo.aclInfoList(e)).data}catch(e){throw this.handleError(e)}}static async getACLClients(e){try{let t=await this.getGeneratedRequestParams();return(await Q.aclClients.aclClientsList(e,t)).data}catch(e){throw this.handleError(e)}}static async removeACLClient(e){if(!e.identity_name&&!e.identity_hash)throw Error(`removeACLClient needs identity_name or identity_hash`);try{let t=await this.getGeneratedRequestParams();return(await Q.aclRemoveClient.aclRemoveClientCreate({client_pubkey:e.public_key,...e.identity_name?{identity_name:e.identity_name}:{},...e.identity_hash?{identity_hash:e.identity_hash}:{}},t)).data}catch(e){throw this.handleError(e)}}static async setACLPermissions(e){try{let t=await this.getGeneratedRequestParams();return(await Q.aclSetPermissions.aclSetPermissionsCreate(e,t)).data}catch(e){throw this.handleError(e)}}static async getACLStats(){try{let e=await this.getGeneratedRequestParams();return(await Q.aclStats.aclStatsList(e)).data}catch(e){throw this.handleError(e)}}static async getRoomMessages(e){try{let t=await this.getGeneratedRequestParams();return(await Q.roomMessages.roomMessagesList(e,t)).data}catch(e){throw this.handleError(e)}}static async postRoomMessage(e){try{let t=await this.getGeneratedRequestParams();return(await Q.roomPostMessage.roomPostMessageCreate(e,t)).data}catch(e){throw this.handleError(e)}}static async deleteRoomMessage(e){try{let t=await this.getGeneratedRequestParams();return await Q.roomMessage.roomMessageDelete({room_name:e.room_name,message_id:e.message_id},t),{success:!0}}catch(e){throw this.handleError(e)}}static async clearRoomMessages(e){try{let t=await this.getGeneratedRequestParams();return(await Q.roomMessagesClear.roomMessagesClearDelete({room_name:e},t)).data}catch(e){throw this.handleError(e)}}static async getRoomStats(e){try{let t=await this.getGeneratedRequestParams();return(await Q.roomStats.roomStatsList(e?{room_name:e}:void 0,t)).data}catch(e){throw this.handleError(e)}}static async getRoomClients(e){try{let t=await this.getGeneratedRequestParams();return(await Q.roomClients.roomClientsList({room_name:e},t)).data}catch(e){throw this.handleError(e)}}static async exportConfig(e=!1){try{let t=await this.getGeneratedRequestParams();return(await Q.configExport.configExportList(e?{include_secrets:!0}:void 0,t)).data}catch(e){throw this.handleError(e)}}static async importConfig(e){try{let t=await this.getGeneratedRequestParams();return(await Q.configImport.configImportCreate({config:e},t)).data}catch(e){throw this.handleError(e)}}static async exportIdentityKey(){try{let e=await this.getGeneratedRequestParams();return(await Q.identityExport.identityExportList(e)).data}catch(e){throw this.handleError(e)}}static async generateVanityKey(e,t=!1){try{let n=await this.getGeneratedRequestParams();return(await Q.generateVanityKey.generateVanityKeyCreate({prefix:e,apply:t},n)).data}catch(e){throw this.handleError(e)}}static async getDbStats(){try{let e=await this.getGeneratedRequestParams();return(await Q.dbStats.dbStatsList(e)).data}catch(e){throw this.handleError(e)}}static async purgeTable(e){try{let t=await this.getGeneratedRequestParams();return(await Q.dbPurge.dbPurgeCreate({tables:e},t)).data}catch(e){throw this.handleError(e)}}static async vacuumDb(){try{let e=await this.getGeneratedRequestParams();return(await Q.dbVacuum.dbVacuumCreate(e)).data}catch(e){throw this.handleError(e)}}static async listPlugins(){return this.get(`/plugins/`)}static async getPlugin(e){return this.get(`/plugins/${encodeURIComponent(e)}`)}static async installPluginWheel(e){let t=new FormData;t.append(`wheel`,e);try{return(await $.post(`/plugins/install`,t,{headers:{"Content-Type":`multipart/form-data`}})).data}catch(e){throw this.handleError(e)}}static async enablePlugin(e){return this.post(`/plugins/enable`,{id:e})}static async disablePlugin(e){return this.post(`/plugins/disable`,{id:e})}static async startPlugin(e){return this.post(`/plugins/start`,{id:e})}static async stopPlugin(e){return this.post(`/plugins/stop`,{id:e})}static async restartPlugin(e){return this.post(`/plugins/restart`,{id:e})}static async getPluginLogs(e,t=200){return this.get(`/plugins/logs`,{id:e,tail:t})}static async uninstallPlugin(e,t=!1){return this.post(`/plugins/uninstall`,{id:e,delete_data:t})}static async getPluginConfig(e){return this.get(`/plugins/settings`,{id:e})}static async setPluginConfig(e,t,n=!1){return this.post(`/plugins/settings`,{id:e,config:t,restart:n})}static async listPluginCatalogue(e=!1){return this.get(`/plugins/catalogue`,e?{refresh:1}:void 0)}static async installCataloguePlugin(e,t){let n={id:e};t&&(n.version=t);try{return(await $.post(`/plugins/catalogue_install`,n,{timeout:18e4})).data}catch(e){throw this.handleError(e)}}static async checkPluginUpdate(e,t=!1){return this.get(`/plugins/updates`,{id:e,...t?{refresh:1}:{}})}static async updatePlugin(e,t){let n={id:e};t&&(n.version=t);try{return(await $.post(`/plugins/update`,n,{timeout:18e4})).data}catch(e){throw this.handleError(e)}}static openPluginProgressStream(e,t=0,n=!0){let r=new URLSearchParams({id:e,since:String(t)});n&&r.set(`fresh`,`1`);let i=Y();return i&&r.set(`token`,i),new EventSource(`${Ia}/plugins/progress?${r.toString()}`)}static async getSensorTypes(){return this.get(`/sensors_types`)}static async getSensorConfig(){return this.get(`/sensors_config`)}static async updateSensorConfig(e){return this.post(`/sensors_config_update`,e)}static async readSensors(){return this.post(`/sensors_read`)}static handleError(e){if(J.isAxiosError(e)){if(e.response){let t=e.response.data?.error||e.response.data?.message||`HTTP ${e.response.status}`;return Error(t)}else if(e.request)return Error(`Network error - no response received`)}return Error(e instanceof Error?e.message:`Unknown error occurred`)}};export{Ge as _,Aa as a,ke as b,ya as c,wa as d,ba as f,Ve as g,He as h,Na as i,Y as l,Wt as m,$ as n,X as o,Ut as p,Ba as r,xa as s,Va as t,Ea as u,We as v,Ae as x,ve as y};
|